@luma.gl/core 9.0.0-alpha.9 → 9.0.0-beta.2

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.
Files changed (306) hide show
  1. package/LICENSE +3 -1
  2. package/README.md +4 -4
  3. package/dist/adapter/attribute-utils/get-attribute-from-layouts.d.ts +52 -0
  4. package/dist/adapter/attribute-utils/get-attribute-from-layouts.d.ts.map +1 -0
  5. package/dist/adapter/attribute-utils/get-attribute-from-layouts.js +130 -0
  6. package/dist/adapter/attribute-utils/get-attribute-from-layouts.js.map +1 -0
  7. package/dist/adapter/canvas-context.d.ts +109 -0
  8. package/dist/adapter/canvas-context.d.ts.map +1 -0
  9. package/dist/adapter/canvas-context.js +254 -0
  10. package/dist/adapter/canvas-context.js.map +1 -0
  11. package/dist/adapter/device.d.ts +219 -0
  12. package/dist/adapter/device.d.ts.map +1 -0
  13. package/dist/adapter/device.js +99 -0
  14. package/dist/adapter/device.js.map +1 -0
  15. package/dist/adapter/resources/buffer.d.ts +56 -0
  16. package/dist/adapter/resources/buffer.d.ts.map +1 -0
  17. package/dist/adapter/resources/buffer.js +62 -0
  18. package/dist/adapter/resources/buffer.js.map +1 -0
  19. package/dist/adapter/resources/command-buffer.d.ts +12 -0
  20. package/dist/adapter/resources/command-buffer.d.ts.map +1 -0
  21. package/dist/adapter/resources/command-buffer.js +15 -0
  22. package/dist/adapter/resources/command-buffer.js.map +1 -0
  23. package/dist/adapter/resources/command-encoder.d.ts +113 -0
  24. package/dist/adapter/resources/command-encoder.d.ts.map +1 -0
  25. package/dist/adapter/resources/command-encoder.js +19 -0
  26. package/dist/adapter/resources/command-encoder.js.map +1 -0
  27. package/dist/adapter/resources/compute-pass.d.ts +31 -0
  28. package/dist/adapter/resources/compute-pass.d.ts.map +1 -0
  29. package/dist/adapter/resources/compute-pass.js +15 -0
  30. package/dist/adapter/resources/compute-pass.js.map +1 -0
  31. package/dist/adapter/resources/compute-pipeline.d.ts +24 -0
  32. package/dist/adapter/resources/compute-pipeline.d.ts.map +1 -0
  33. package/dist/adapter/resources/compute-pipeline.js +20 -0
  34. package/dist/adapter/resources/compute-pipeline.js.map +1 -0
  35. package/dist/adapter/resources/external-texture.d.ts +12 -0
  36. package/dist/adapter/resources/external-texture.d.ts.map +1 -0
  37. package/dist/adapter/resources/external-texture.js +17 -0
  38. package/dist/adapter/resources/external-texture.js.map +1 -0
  39. package/dist/adapter/resources/framebuffer.d.ts +50 -0
  40. package/dist/adapter/resources/framebuffer.d.ts.map +1 -0
  41. package/dist/adapter/resources/framebuffer.js +102 -0
  42. package/dist/adapter/resources/framebuffer.js.map +1 -0
  43. package/dist/adapter/resources/render-pass.d.ts +51 -0
  44. package/dist/adapter/resources/render-pass.d.ts.map +1 -0
  45. package/dist/adapter/resources/render-pass.js +23 -0
  46. package/dist/adapter/resources/render-pass.js.map +1 -0
  47. package/dist/adapter/resources/render-pipeline.d.ts +89 -0
  48. package/dist/adapter/resources/render-pipeline.d.ts.map +1 -0
  49. package/dist/adapter/resources/render-pipeline.js +36 -0
  50. package/dist/adapter/resources/render-pipeline.js.map +1 -0
  51. package/dist/adapter/resources/resource.d.ts +73 -0
  52. package/dist/adapter/resources/resource.d.ts.map +1 -0
  53. package/dist/adapter/resources/resource.js +101 -0
  54. package/dist/adapter/resources/resource.js.map +1 -0
  55. package/dist/adapter/resources/sampler.d.ts +42 -0
  56. package/dist/adapter/resources/sampler.d.ts.map +1 -0
  57. package/dist/adapter/resources/sampler.js +26 -0
  58. package/dist/adapter/resources/sampler.js.map +1 -0
  59. package/dist/adapter/resources/shader.d.ts +45 -0
  60. package/dist/adapter/resources/shader.d.ts.map +1 -0
  61. package/dist/adapter/resources/shader.js +90 -0
  62. package/dist/adapter/resources/shader.js.map +1 -0
  63. package/dist/adapter/resources/texture.d.ts +90 -0
  64. package/dist/adapter/resources/texture.d.ts.map +1 -0
  65. package/dist/adapter/resources/texture.js +45 -0
  66. package/dist/adapter/resources/texture.js.map +1 -0
  67. package/dist/adapter/resources/transform-feedback.d.ts +30 -0
  68. package/dist/adapter/resources/transform-feedback.d.ts.map +1 -0
  69. package/dist/adapter/resources/transform-feedback.js +17 -0
  70. package/dist/adapter/resources/transform-feedback.js.map +1 -0
  71. package/dist/adapter/resources/vertex-array.d.ts +40 -0
  72. package/dist/adapter/resources/vertex-array.d.ts.map +1 -0
  73. package/dist/adapter/resources/vertex-array.js +24 -0
  74. package/dist/adapter/resources/vertex-array.js.map +1 -0
  75. package/dist/adapter/type-utils/decode-attribute-type.d.ts +20 -0
  76. package/dist/adapter/type-utils/decode-attribute-type.d.ts.map +1 -0
  77. package/dist/adapter/type-utils/decode-attribute-type.js +60 -0
  78. package/dist/adapter/type-utils/decode-attribute-type.js.map +1 -0
  79. package/dist/adapter/type-utils/decode-data-type.d.ts +16 -0
  80. package/dist/adapter/type-utils/decode-data-type.d.ts.map +1 -0
  81. package/dist/adapter/type-utils/decode-data-type.js +43 -0
  82. package/dist/adapter/type-utils/decode-data-type.js.map +1 -0
  83. package/dist/adapter/type-utils/decode-shader-types.d.ts +9 -0
  84. package/dist/adapter/type-utils/decode-shader-types.d.ts.map +1 -0
  85. package/dist/adapter/type-utils/decode-shader-types.js +103 -0
  86. package/dist/adapter/type-utils/decode-shader-types.js.map +1 -0
  87. package/dist/adapter/type-utils/decode-texture-format.d.ts +19 -0
  88. package/dist/adapter/type-utils/decode-texture-format.d.ts.map +1 -0
  89. package/dist/adapter/type-utils/decode-texture-format.js +101 -0
  90. package/dist/adapter/type-utils/decode-texture-format.js.map +1 -0
  91. package/dist/adapter/type-utils/decode-vertex-format.d.ts +22 -0
  92. package/dist/adapter/type-utils/decode-vertex-format.d.ts.map +1 -0
  93. package/dist/adapter/type-utils/decode-vertex-format.js +25 -0
  94. package/dist/adapter/type-utils/decode-vertex-format.js.map +1 -0
  95. package/dist/adapter/type-utils/vertex-format-from-attribute.d.ts +10 -0
  96. package/dist/adapter/type-utils/vertex-format-from-attribute.d.ts.map +1 -0
  97. package/dist/adapter/type-utils/vertex-format-from-attribute.js +76 -0
  98. package/dist/adapter/type-utils/vertex-format-from-attribute.js.map +1 -0
  99. package/dist/adapter/type-utils/wgsl-utils.d.ts +4 -0
  100. package/dist/adapter/type-utils/wgsl-utils.d.ts.map +1 -0
  101. package/dist/adapter/type-utils/wgsl-utils.js +15 -0
  102. package/dist/adapter/type-utils/wgsl-utils.js.map +1 -0
  103. package/dist/adapter/types/accessor.d.ts +23 -0
  104. package/dist/adapter/types/accessor.d.ts.map +1 -0
  105. package/dist/adapter/types/accessor.js +2 -0
  106. package/dist/adapter/types/accessor.js.map +1 -0
  107. package/dist/adapter/types/buffer-layout.d.ts +59 -0
  108. package/dist/adapter/types/buffer-layout.d.ts.map +1 -0
  109. package/dist/adapter/types/buffer-layout.js +2 -0
  110. package/dist/adapter/types/buffer-layout.js.map +1 -0
  111. package/dist/adapter/types/parameters.d.ts +97 -0
  112. package/dist/adapter/types/parameters.d.ts.map +1 -0
  113. package/dist/adapter/types/parameters.js +28 -0
  114. package/dist/adapter/types/parameters.js.map +1 -0
  115. package/dist/adapter/types/shader-layout.d.ts +145 -0
  116. package/dist/adapter/types/shader-layout.d.ts.map +1 -0
  117. package/dist/adapter/types/shader-layout.js +2 -0
  118. package/dist/adapter/types/shader-layout.js.map +1 -0
  119. package/dist/adapter/types/shader-types.d.ts +21 -0
  120. package/dist/adapter/types/shader-types.d.ts.map +1 -0
  121. package/dist/adapter/types/shader-types.js +2 -0
  122. package/dist/adapter/types/shader-types.js.map +1 -0
  123. package/dist/adapter/types/texture-formats.d.ts +12 -0
  124. package/dist/adapter/types/texture-formats.d.ts.map +1 -0
  125. package/dist/adapter/types/texture-formats.js +2 -0
  126. package/dist/adapter/types/texture-formats.js.map +1 -0
  127. package/dist/adapter/types/types.d.ts +90 -0
  128. package/dist/adapter/types/types.d.ts.map +1 -0
  129. package/dist/adapter/types/types.js +2 -0
  130. package/dist/adapter/types/types.js.map +1 -0
  131. package/dist/adapter/types/vertex-formats.d.ts +14 -0
  132. package/dist/adapter/types/vertex-formats.d.ts.map +1 -0
  133. package/dist/adapter/types/vertex-formats.js +2 -0
  134. package/dist/adapter/types/vertex-formats.js.map +1 -0
  135. package/dist/dist.dev.js +2976 -0
  136. package/dist/index.cjs +2445 -0
  137. package/dist/index.d.ts +81 -128
  138. package/dist/index.d.ts.map +1 -1
  139. package/dist/index.js +45 -18
  140. package/dist/index.js.map +1 -1
  141. package/dist/init.d.ts +5 -0
  142. package/dist/init.d.ts.map +1 -0
  143. package/dist/init.js +24 -0
  144. package/dist/init.js.map +1 -0
  145. package/dist/lib/compiler-log/compiler-message.d.ts +8 -0
  146. package/dist/lib/compiler-log/compiler-message.d.ts.map +1 -0
  147. package/dist/lib/compiler-log/compiler-message.js +2 -0
  148. package/dist/lib/compiler-log/compiler-message.js.map +1 -0
  149. package/dist/lib/compiler-log/format-compiler-log.d.ts +8 -0
  150. package/dist/lib/compiler-log/format-compiler-log.d.ts.map +1 -0
  151. package/dist/lib/compiler-log/format-compiler-log.js +64 -0
  152. package/dist/lib/compiler-log/format-compiler-log.js.map +1 -0
  153. package/dist/lib/compiler-log/get-shader-info.d.ts +9 -0
  154. package/dist/lib/compiler-log/get-shader-info.d.ts.map +1 -0
  155. package/dist/lib/compiler-log/get-shader-info.js +25 -0
  156. package/dist/lib/compiler-log/get-shader-info.js.map +1 -0
  157. package/dist/lib/luma.d.ts +22 -0
  158. package/dist/lib/luma.d.ts.map +1 -0
  159. package/dist/lib/luma.js +63 -0
  160. package/dist/lib/luma.js.map +1 -0
  161. package/dist/lib/uniforms/uniform-block.d.ts +29 -0
  162. package/dist/lib/uniforms/uniform-block.d.ts.map +1 -0
  163. package/dist/lib/uniforms/uniform-block.js +48 -0
  164. package/dist/lib/uniforms/uniform-block.js.map +1 -0
  165. package/dist/lib/uniforms/uniform-buffer-layout.d.ts +27 -0
  166. package/dist/lib/uniforms/uniform-buffer-layout.d.ts.map +1 -0
  167. package/dist/lib/uniforms/uniform-buffer-layout.js +76 -0
  168. package/dist/lib/uniforms/uniform-buffer-layout.js.map +1 -0
  169. package/dist/lib/uniforms/uniform-store.d.ts +62 -0
  170. package/dist/lib/uniforms/uniform-store.d.ts.map +1 -0
  171. package/dist/lib/uniforms/uniform-store.js +89 -0
  172. package/dist/lib/uniforms/uniform-store.js.map +1 -0
  173. package/dist/lib/uniforms/uniform.d.ts +10 -0
  174. package/dist/lib/uniforms/uniform.d.ts.map +1 -0
  175. package/dist/lib/uniforms/uniform.js +20 -0
  176. package/dist/lib/uniforms/uniform.js.map +1 -0
  177. package/dist/types.d.ts +19 -0
  178. package/dist/types.d.ts.map +1 -0
  179. package/dist/types.js +3 -0
  180. package/dist/types.js.map +1 -0
  181. package/dist/utils/array-equal.d.ts +5 -0
  182. package/dist/utils/array-equal.d.ts.map +1 -0
  183. package/dist/utils/array-equal.js +28 -0
  184. package/dist/utils/array-equal.js.map +1 -0
  185. package/dist/utils/array-utils-flat.d.ts +10 -0
  186. package/dist/utils/array-utils-flat.d.ts.map +1 -0
  187. package/dist/utils/array-utils-flat.js +36 -0
  188. package/dist/utils/array-utils-flat.js.map +1 -0
  189. package/dist/utils/assert.d.ts +2 -0
  190. package/dist/utils/assert.d.ts.map +1 -0
  191. package/dist/utils/assert.js +6 -0
  192. package/dist/utils/assert.js.map +1 -0
  193. package/dist/utils/cast.d.ts +3 -0
  194. package/dist/utils/cast.d.ts.map +1 -0
  195. package/dist/utils/cast.js +4 -0
  196. package/dist/utils/cast.js.map +1 -0
  197. package/dist/utils/check-props.d.ts +7 -0
  198. package/dist/utils/check-props.d.ts.map +1 -0
  199. package/dist/utils/check-props.js +32 -0
  200. package/dist/utils/check-props.js.map +1 -0
  201. package/dist/utils/deep-equal.d.ts +9 -0
  202. package/dist/utils/deep-equal.d.ts.map +1 -0
  203. package/dist/utils/deep-equal.js +40 -0
  204. package/dist/utils/deep-equal.js.map +1 -0
  205. package/dist/utils/format-value.d.ts +7 -0
  206. package/dist/utils/format-value.d.ts.map +1 -0
  207. package/dist/utils/format-value.js +42 -0
  208. package/dist/utils/format-value.js.map +1 -0
  209. package/dist/utils/is-array.d.ts +16 -0
  210. package/dist/utils/is-array.d.ts.map +1 -0
  211. package/dist/utils/is-array.js +10 -0
  212. package/dist/utils/is-array.js.map +1 -0
  213. package/dist/utils/load-file.d.ts +35 -0
  214. package/dist/utils/load-file.d.ts.map +1 -0
  215. package/dist/utils/load-file.js +48 -0
  216. package/dist/utils/load-file.js.map +1 -0
  217. package/dist/utils/log.d.ts +4 -0
  218. package/dist/utils/log.d.ts.map +1 -0
  219. package/dist/utils/log.js +5 -0
  220. package/dist/utils/log.js.map +1 -0
  221. package/dist/utils/random.d.ts +5 -0
  222. package/dist/utils/random.d.ts.map +1 -0
  223. package/dist/utils/random.js +14 -0
  224. package/dist/utils/random.js.map +1 -0
  225. package/dist/utils/request-animation-frame.d.ts +3 -0
  226. package/dist/utils/request-animation-frame.d.ts.map +1 -0
  227. package/dist/utils/request-animation-frame.js +7 -0
  228. package/dist/utils/request-animation-frame.js.map +1 -0
  229. package/dist/utils/stats-manager.d.ts +12 -0
  230. package/dist/utils/stats-manager.d.ts.map +1 -0
  231. package/dist/utils/stats-manager.js +19 -0
  232. package/dist/utils/stats-manager.js.map +1 -0
  233. package/dist/utils/stub-methods.d.ts +2 -0
  234. package/dist/utils/stub-methods.d.ts.map +1 -0
  235. package/dist/utils/stub-methods.js +16 -0
  236. package/dist/utils/stub-methods.js.map +1 -0
  237. package/dist/utils/utils.d.ts +15 -0
  238. package/dist/utils/utils.d.ts.map +1 -0
  239. package/dist/utils/utils.js +19 -0
  240. package/dist/utils/utils.js.map +1 -0
  241. package/dist.min.js +33 -0
  242. package/package.json +17 -12
  243. package/src/adapter/attribute-utils/get-attribute-from-layouts.ts +259 -0
  244. package/src/adapter/canvas-context.ts +433 -0
  245. package/src/adapter/device.ts +435 -0
  246. package/src/adapter/resources/buffer.ts +106 -0
  247. package/src/adapter/resources/command-buffer.ts +38 -0
  248. package/src/adapter/resources/command-encoder.ts +172 -0
  249. package/src/adapter/resources/compute-pass.ts +52 -0
  250. package/src/adapter/resources/compute-pipeline.ts +39 -0
  251. package/src/adapter/resources/external-texture.ts +20 -0
  252. package/src/adapter/resources/framebuffer.ts +230 -0
  253. package/src/adapter/resources/render-pass.ts +117 -0
  254. package/src/adapter/resources/render-pipeline.ts +133 -0
  255. package/src/adapter/resources/resource.ts +176 -0
  256. package/src/adapter/resources/sampler.ts +69 -0
  257. package/src/adapter/resources/shader.ts +143 -0
  258. package/src/adapter/resources/texture.ts +140 -0
  259. package/src/adapter/resources/transform-feedback.ts +45 -0
  260. package/src/adapter/resources/vertex-array.ts +65 -0
  261. package/src/adapter/type-utils/decode-attribute-type.ts +82 -0
  262. package/src/adapter/type-utils/decode-data-type.ts +62 -0
  263. package/src/adapter/type-utils/decode-shader-types.ts +48 -0
  264. package/src/adapter/type-utils/decode-texture-format.ts +190 -0
  265. package/src/adapter/type-utils/decode-vertex-format.ts +49 -0
  266. package/src/adapter/type-utils/vertex-format-from-attribute.ts +103 -0
  267. package/src/adapter/type-utils/wgsl-utils.ts +18 -0
  268. package/src/adapter/types/accessor.ts +34 -0
  269. package/src/adapter/types/buffer-layout.ts +62 -0
  270. package/src/adapter/types/parameters.ts +250 -0
  271. package/src/adapter/types/shader-layout.ts +193 -0
  272. package/src/adapter/types/shader-types.ts +77 -0
  273. package/src/adapter/types/texture-formats.ts +168 -0
  274. package/src/adapter/types/types.ts +109 -0
  275. package/src/adapter/types/vertex-formats.ts +91 -0
  276. package/src/index.ts +160 -92
  277. package/src/init.ts +47 -0
  278. package/src/lib/compiler-log/compiler-message.ts +10 -0
  279. package/src/lib/compiler-log/format-compiler-log.ts +113 -0
  280. package/src/lib/compiler-log/get-shader-info.ts +41 -0
  281. package/src/lib/luma.ts +84 -0
  282. package/src/lib/uniforms/uniform-block.ts +80 -0
  283. package/src/lib/uniforms/uniform-buffer-layout.ts +109 -0
  284. package/src/lib/uniforms/uniform-store.ts +173 -0
  285. package/src/lib/uniforms/uniform.ts +25 -0
  286. package/src/types.ts +33 -0
  287. package/src/utils/array-equal.ts +33 -0
  288. package/src/utils/array-utils-flat.ts +43 -0
  289. package/src/utils/assert.ts +7 -0
  290. package/src/utils/cast.ts +4 -0
  291. package/src/utils/check-props.ts +74 -0
  292. package/src/utils/deep-equal.ts +47 -0
  293. package/src/utils/format-value.ts +40 -0
  294. package/src/utils/is-array.ts +24 -0
  295. package/src/utils/load-file.ts +89 -0
  296. package/src/utils/log.ts +4 -0
  297. package/src/utils/random.ts +17 -0
  298. package/src/utils/request-animation-frame.ts +15 -0
  299. package/src/utils/stats-manager.ts +23 -0
  300. package/src/utils/stub-methods.ts +20 -0
  301. package/src/utils/utils.ts +36 -0
  302. package/dist/bundle.d.ts +0 -2
  303. package/dist/bundle.d.ts.map +0 -1
  304. package/dist/bundle.js +0 -5
  305. package/dist/bundle.js.map +0 -1
  306. package/src/bundle.ts +0 -4
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.js","names":["uidCounters","uid","id","arguments","length","undefined","count","isPowerOfTwo","n","isObjectEmpty","obj","isEmpty","key"],"sources":["../../src/utils/utils.ts"],"sourcesContent":["// luma.gl, MIT license\n// Copyright (c) vis.gl contributors\n\nconst uidCounters: Record<string, number> = {};\n\n/**\n * Returns a UID.\n * @param id= - Identifier base name\n * @return uid\n **/\nexport function uid(id: string = 'id'): string {\n uidCounters[id] = uidCounters[id] || 1;\n const count = uidCounters[id]++;\n return `${id}-${count}`;\n}\n\n/**\n * Verifies if a given number is power of two or not.\n * @param n - The number to check.\n * @return Returns true if the given number is power of 2, false otherwise.\n **/\nexport function isPowerOfTwo(n: number): boolean {\n return (n > 0) && (n & (n - 1)) === 0;\n}\n\n/** Returns true if given object is empty, false otherwise. */\nexport function isObjectEmpty(obj: object): boolean {\n let isEmpty = true;\n // @ts-ignore key is unused\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n for (const key in obj) {\n isEmpty = false;\n break;\n }\n return isEmpty;\n}\n"],"mappings":"AAGA,MAAMA,WAAmC,GAAG,CAAC,CAAC;AAO9C,OAAO,SAASC,GAAGA,CAAA,EAA4B;EAAA,IAA3BC,EAAU,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,IAAI;EACnCH,WAAW,CAACE,EAAE,CAAC,GAAGF,WAAW,CAACE,EAAE,CAAC,IAAI,CAAC;EACtC,MAAMI,KAAK,GAAGN,WAAW,CAACE,EAAE,CAAC,EAAE;EAC/B,OAAQ,GAAEA,EAAG,IAAGI,KAAM,EAAC;AACzB;AAOA,OAAO,SAASC,YAAYA,CAACC,CAAS,EAAW;EAC/C,OAAQA,CAAC,GAAG,CAAC,IAAK,CAACA,CAAC,GAAIA,CAAC,GAAG,CAAE,MAAM,CAAC;AACvC;AAGA,OAAO,SAASC,aAAaA,CAACC,GAAW,EAAW;EAClD,IAAIC,OAAO,GAAG,IAAI;EAGlB,KAAK,MAAMC,GAAG,IAAIF,GAAG,EAAE;IACrBC,OAAO,GAAG,KAAK;IACf;EACF;EACA,OAAOA,OAAO;AAChB"}
package/dist.min.js ADDED
@@ -0,0 +1,33 @@
1
+ (function webpackUniversalModuleDefinition(root, factory) {
2
+ if (typeof exports === 'object' && typeof module === 'object')
3
+ module.exports = factory();
4
+ else if (typeof define === 'function' && define.amd) define([], factory);
5
+ else if (typeof exports === 'object') exports['luma'] = factory();
6
+ else root['luma'] = factory();})(globalThis, function () {
7
+ "use strict";var __exports__=(()=>{var dt=Object.defineProperty;var Qo=Object.getOwnPropertyDescriptor;var ei=Object.getOwnPropertyNames;var ti=Object.prototype.hasOwnProperty;var ri=(e,t)=>{for(var r in t)dt(e,r,{get:t[r],enumerable:!0})},ni=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of ei(t))!ti.call(e,o)&&o!==r&&dt(e,o,{get:()=>t[o],enumerable:!(n=Qo(t,o))||n.enumerable});return e};var oi=e=>ni(dt({},"__esModule",{value:!0}),e);var Qc={};ri(Qc,{Buffer:()=>R,CanvasContext:()=>Tt,CommandBuffer:()=>Xt,CommandEncoder:()=>Yt,ComputePass:()=>Wt,ComputePipeline:()=>Ft,Device:()=>Z,ExternalTexture:()=>At,Framebuffer:()=>Mt,RenderPass:()=>Ht,RenderPipeline:()=>Ut,Resource:()=>O,Sampler:()=>Nt,Shader:()=>Lt,StatsManager:()=>bt,Texture:()=>F,TransformFeedback:()=>tr,UniformBlock:()=>lt,UniformBufferLayout:()=>st,UniformStore:()=>Lo,VERSION:()=>Fe,VertexArray:()=>Qt,assert:()=>ae,cancelAnimationFrame:()=>Jo,cast:()=>Uo,checkProps:()=>Ho,decodeShaderAttributeType:()=>ot,decodeShaderUniformType:()=>ft,decodeTextureFormat:()=>Co,decodeVertexFormat:()=>Re,deepEqual:()=>ht,fillArray:()=>vo,formatCompilerLog:()=>$e,formatValue:()=>or,getAttributeInfosFromLayouts:()=>Zt,getDataTypeFromTypedArray:()=>rr,getScratchArray:()=>bo,getScratchArrayBuffer:()=>De,getTypedArrayFromDataType:()=>Mo,getVertexFormatFromAttribute:()=>ko,glsl:()=>Jc,isNumberArray:()=>z,isObjectEmpty:()=>Sr,isPowerOfTwo:()=>Or,isTypedArray:()=>vt,isUniformValue:()=>nr,loadFile:()=>Ko,loadImage:()=>$o,loadImageBitmap:()=>Yo,loadScript:()=>Xo,log:()=>_,luma:()=>He,makeRandomNumberGenerator:()=>sr,mergeShaderLayout:()=>io,random:()=>qo,requestAnimationFrame:()=>Zo,setPathPrefix:()=>Wo,splitUniformsAndBindings:()=>Go,stubRemovedMethods:()=>Fo,uid:()=>Y});function gt(e){if(typeof window<"u"&&typeof window.process=="object"&&window.process.type==="renderer"||typeof process<"u"&&typeof process.versions=="object"&&Boolean(process.versions.electron))return!0;let t=typeof navigator=="object"&&typeof navigator.userAgent=="string"&&navigator.userAgent,r=e||t;return!!(r&&r.indexOf("Electron")>=0)}function B(){return!(typeof process=="object"&&String(process)==="[object process]"&&!process.browser)||gt()}var ii=globalThis.self||globalThis.window||globalThis.global,ee=globalThis.window||globalThis.self||globalThis.global,ai=globalThis.document||{},$=globalThis.process||{},ui=globalThis.console,os=globalThis.navigator||{};var Me=typeof __VERSION__<"u"?__VERSION__:"untranspiled source",us=B();function fi(e){try{let t=window[e],r="__storage_test__";return t.setItem(r,r),t.removeItem(r),t}catch{return null}}var ke=class{constructor(t,r){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"sessionStorage";this.storage=void 0,this.id=void 0,this.config=void 0,this.storage=fi(n),this.id=t,this.config=r,this._loadConfiguration()}getConfiguration(){return this.config}setConfiguration(t){if(Object.assign(this.config,t),this.storage){let r=JSON.stringify(this.config);this.storage.setItem(this.id,r)}}_loadConfiguration(){let t={};if(this.storage){let r=this.storage.getItem(this.id);t=r?JSON.parse(r):{}}return Object.assign(this.config,t),this}};function lr(e){let t;return e<10?t="".concat(e.toFixed(2),"ms"):e<100?t="".concat(e.toFixed(1),"ms"):e<1e3?t="".concat(e.toFixed(0),"ms"):t="".concat((e/1e3).toFixed(2),"s"),t}function pr(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:8,r=Math.max(t-e.length,0);return"".concat(" ".repeat(r)).concat(e)}function Ue(e,t,r){let n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:600,o=e.src.replace(/\(/g,"%28").replace(/\)/g,"%29");e.width>n&&(r=Math.min(r,n/e.width));let i=e.width*r,f=e.height*r,s=["font-size:1px;","padding:".concat(Math.floor(f/2),"px ").concat(Math.floor(i/2),"px;"),"line-height:".concat(f,"px;"),"background:url(".concat(o,");"),"background-size:".concat(i,"px ").concat(f,"px;"),"color:transparent;"].join("");return["".concat(t," %c+"),s]}var Ge;(function(e){e[e.BLACK=30]="BLACK",e[e.RED=31]="RED",e[e.GREEN=32]="GREEN",e[e.YELLOW=33]="YELLOW",e[e.BLUE=34]="BLUE",e[e.MAGENTA=35]="MAGENTA",e[e.CYAN=36]="CYAN",e[e.WHITE=37]="WHITE",e[e.BRIGHT_BLACK=90]="BRIGHT_BLACK",e[e.BRIGHT_RED=91]="BRIGHT_RED",e[e.BRIGHT_GREEN=92]="BRIGHT_GREEN",e[e.BRIGHT_YELLOW=93]="BRIGHT_YELLOW",e[e.BRIGHT_BLUE=94]="BRIGHT_BLUE",e[e.BRIGHT_MAGENTA=95]="BRIGHT_MAGENTA",e[e.BRIGHT_CYAN=96]="BRIGHT_CYAN",e[e.BRIGHT_WHITE=97]="BRIGHT_WHITE"})(Ge||(Ge={}));var ci=10;function yr(e){return typeof e!="string"?e:(e=e.toUpperCase(),Ge[e]||Ge.WHITE)}function mr(e,t,r){if(!B&&typeof e=="string"){if(t){let n=yr(t);e="\x1B[".concat(n,"m").concat(e,"\x1B[39m")}if(r){let n=yr(r);e="\x1B[".concat(n+ci,"m").concat(e,"\x1B[49m")}}return e}function hr(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:["constructor"],r=Object.getPrototypeOf(e),n=Object.getOwnPropertyNames(r),o=e;for(let i of n){let f=o[i];typeof f=="function"&&(t.find(s=>i===s)||(o[i]=f.bind(e)))}}function te(e,t){if(!e)throw new Error(t||"Assertion failed")}function X(){let e;if(B()&&ee.performance){var t,r;e=ee===null||ee===void 0||(t=ee.performance)===null||t===void 0||(r=t.now)===null||r===void 0?void 0:r.call(t)}else if("hrtime"in $){var n;let o=$===null||$===void 0||(n=$.hrtime)===null||n===void 0?void 0:n.call($);e=o[0]*1e3+o[1]/1e6}else e=Date.now();return e}var re={debug:B()&&console.debug||console.log,log:console.log,info:console.info,warn:console.warn,error:console.error},si={enabled:!0,level:0};function C(){}var dr={},gr={once:!0},K=class{constructor(){let{id:t}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{id:""};this.id=void 0,this.VERSION=Me,this._startTs=X(),this._deltaTs=X(),this._storage=void 0,this.userData={},this.LOG_THROTTLE_TIMEOUT=0,this.id=t,this.userData={},this._storage=new ke("__probe-".concat(this.id,"__"),si),this.timeStamp("".concat(this.id," started")),hr(this),Object.seal(this)}set level(t){this.setLevel(t)}get level(){return this.getLevel()}isEnabled(){return this._storage.config.enabled}getLevel(){return this._storage.config.level}getTotal(){return Number((X()-this._startTs).toPrecision(10))}getDelta(){return Number((X()-this._deltaTs).toPrecision(10))}set priority(t){this.level=t}get priority(){return this.level}getPriority(){return this.level}enable(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;return this._storage.setConfiguration({enabled:t}),this}setLevel(t){return this._storage.setConfiguration({level:t}),this}get(t){return this._storage.config[t]}set(t,r){this._storage.setConfiguration({[t]:r})}settings(){console.table?console.table(this._storage.config):console.log(this._storage.config)}assert(t,r){te(t,r)}warn(t){return this._getLogFunction(0,t,re.warn,arguments,gr)}error(t){return this._getLogFunction(0,t,re.error,arguments)}deprecated(t,r){return this.warn("`".concat(t,"` is deprecated and will be removed in a later version. Use `").concat(r,"` instead"))}removed(t,r){return this.error("`".concat(t,"` has been removed. Use `").concat(r,"` instead"))}probe(t,r){return this._getLogFunction(t,r,re.log,arguments,{time:!0,once:!0})}log(t,r){return this._getLogFunction(t,r,re.debug,arguments)}info(t,r){return this._getLogFunction(t,r,console.info,arguments)}once(t,r){return this._getLogFunction(t,r,re.debug||re.info,arguments,gr)}table(t,r,n){return r?this._getLogFunction(t,r,console.table||C,n&&[n],{tag:mi(r)}):C}image(t){let{logLevel:r,priority:n,image:o,message:i="",scale:f=1}=t;return this._shouldLog(r||n)?B()?yi({image:o,message:i,scale:f}):pi({image:o,message:i,scale:f}):C}time(t,r){return this._getLogFunction(t,r,console.time?console.time:console.info)}timeEnd(t,r){return this._getLogFunction(t,r,console.timeEnd?console.timeEnd:console.info)}timeStamp(t,r){return this._getLogFunction(t,r,console.timeStamp||C)}group(t,r){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{collapsed:!1},o=br({logLevel:t,message:r,opts:n}),{collapsed:i}=n;return o.method=(i?console.groupCollapsed:console.group)||console.info,this._getLogFunction(o)}groupCollapsed(t,r){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.group(t,r,Object.assign({},n,{collapsed:!0}))}groupEnd(t){return this._getLogFunction(t,"",console.groupEnd||C)}withGroup(t,r,n){this.group(t,r)();try{n()}finally{this.groupEnd(t)()}}trace(){console.trace&&console.trace()}_shouldLog(t){return this.isEnabled()&&this.getLevel()>=vr(t)}_getLogFunction(t,r,n,o,i){if(this._shouldLog(t)){i=br({logLevel:t,message:r,args:o,opts:i}),n=n||i.method,te(n),i.total=this.getTotal(),i.delta=this.getDelta(),this._deltaTs=X();let f=i.tag||i.message;if(i.once&&f)if(!dr[f])dr[f]=X();else return C;return r=li(this.id,i.message,i),n.bind(console,r,...i.args)}return C}};K.VERSION=Me;function vr(e){if(!e)return 0;let t;switch(typeof e){case"number":t=e;break;case"object":t=e.logLevel||e.priority||0;break;default:return 0}return te(Number.isFinite(t)&&t>=0),t}function br(e){let{logLevel:t,message:r}=e;e.logLevel=vr(t);let n=e.args?Array.from(e.args):[];for(;n.length&&n.shift()!==r;);switch(typeof t){case"string":case"function":r!==void 0&&n.unshift(r),e.message=t;break;case"object":Object.assign(e,t);break;default:}typeof e.message=="function"&&(e.message=e.message());let o=typeof e.message;return te(o==="string"||o==="object"),Object.assign(e,{args:n},e.opts)}function li(e,t,r){if(typeof t=="string"){let n=r.time?pr(lr(r.total)):"";t=r.time?"".concat(e,": ").concat(n," ").concat(t):"".concat(e,": ").concat(t),t=mr(t,r.color,r.background)}return t}function pi(e){let{image:t,message:r="",scale:n=1}=e;return console.warn("removed"),C}function yi(e){let{image:t,message:r="",scale:n=1}=e;if(typeof t=="string"){let i=new Image;return i.onload=()=>{let f=Ue(i,r,n);console.log(...f)},i.src=t,C}let o=t.nodeName||"";if(o.toLowerCase()==="img")return console.log(...Ue(t,r,n)),C;if(o.toLowerCase()==="canvas"){let i=new Image;return i.onload=()=>console.log(...Ue(i,r,n)),i.src=t.toDataURL(),C}return C}function mi(e){for(let t in e)for(let r in e[t])return r||"untitled";return"empty"}var Ds=new K({id:"@probe.gl/log"});var _=new K({id:"luma.gl"});function _e(){let e;if(typeof window<"u"&&window.performance)e=window.performance.now();else if(typeof process<"u"&&process.hrtime){let t=process.hrtime();e=t[0]*1e3+t[1]/1e6}else e=Date.now();return e}var q=class{constructor(t,r){this.name=void 0,this.type=void 0,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=t,this.type=r,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(t){return this.sampleSize=t,this}incrementCount(){return this.addCount(1),this}decrementCount(){return this.subtractCount(1),this}addCount(t){return this._count+=t,this._samples++,this._checkSampling(),this}subtractCount(t){return this._count-=t,this._samples++,this._checkSampling(),this}addTime(t){return this._time+=t,this.lastTiming=t,this._samples++,this._checkSampling(),this}timeStart(){return this._startTime=_e(),this._timerPending=!0,this}timeEnd(){return this._timerPending?(this.addTime(_e()-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 ne=class{constructor(t){this.id=void 0,this.stats={},this.id=t.id,this.stats={},this._initializeStats(t.stats),Object.seal(this)}get(t){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"count";return this._getOrCreate({name:t,type:r})}get size(){return Object.keys(this.stats).length}reset(){for(let t of Object.values(this.stats))t.reset();return this}forEach(t){for(let r of Object.values(this.stats))t(r)}getTable(){let t={};return this.forEach(r=>{t[r.name]={time:r.time||0,count:r.count||0,average:r.getAverageTime()||0,hz:r.getHz()||0}}),t}_initializeStats(){(arguments.length>0&&arguments[0]!==void 0?arguments[0]:[]).forEach(r=>this._getOrCreate(r))}_getOrCreate(t){let{name:r,type:n}=t,o=this.stats[r];return o||(t instanceof q?o=t:o=new q(r,n),this.stats[r]=o),o}};function Te(e){return Te=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Te(e)}function wr(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,di(n.key),n)}}function hi(e,t,r){return t&&wr(e.prototype,t),r&&wr(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function di(e){var t=gi(e,"string");return Te(t)==="symbol"?t:String(t)}function gi(e,t){if(Te(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Te(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function bi(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var bt=function(){function e(){bi(this,e),this.stats=new Map}var t=e.prototype;return t.getStats=function(n){return this.get(n)},t.get=function(n){return this.stats.has(n)||this.stats.set(n,new ne({id:n})),this.stats.get(n)},hi(e)}(),oe=new bt;function vi(){var e=typeof __VERSION__<"u"?__VERSION__:"running from source",t="set luma.log.level=1 (or higher) to trace rendering";if(globalThis.luma&&globalThis.luma.VERSION!==e)throw new Error("luma.gl - multiple VERSIONs detected: ".concat(globalThis.luma.VERSION," vs ").concat(e));return globalThis.luma||(B()&&_.log(1,"".concat(e," - ").concat(t))(),globalThis.luma=globalThis.luma||{VERSION:e,version:e,log:_,stats:oe}),e}var Fe=vi();function vt(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)?e:null}function z(e){return Array.isArray(e)?e.length===0||typeof e[0]=="number"?e:null:vt(e)}var wt={};function Y(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"id";wt[e]=wt[e]||1;var t=wt[e]++;return"".concat(e,"-").concat(t)}function Or(e){return e>0&&(e&e-1)===0}function Sr(e){var t=!0;for(var r in e){t=!1;break}return t}function je(e){return je=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},je(e)}function Pr(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function wi(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Pr(Object(r),!0).forEach(function(n){Oi(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Pr(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Oi(e,t,r){return t=Tr(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _r(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Tr(n.key),n)}}function Si(e,t,r){return t&&_r(e.prototype,t),r&&_r(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function Tr(e){var t=Pi(e,"string");return je(t)==="symbol"?t:String(t)}function Pi(e,t){if(je(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(je(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function _i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var O=function(){function e(r,n,o){if(_i(this,e),this.id=void 0,this.props=void 0,this.userData={},this.device=void 0,this._device=void 0,this.destroyed=!1,this.allocatedBytes=0,this._attachedResources=new Set,!r)throw new Error("no device");this._device=r,this.props=Ti(n,o);var i=this.props.id!=="undefined"?this.props.id:Y(this[Symbol.toStringTag]);this.props.id=i,this.id=i,this.userData=this.props.userData||{},this.addStats()}var t=e.prototype;return t.destroy=function(){this.destroyResource()},t.delete=function(){return this.destroy(),this},t.toString=function(){return"".concat(this[Symbol.toStringTag]||this.constructor.name,"(").concat(this.id,")")},t.getProps=function(){return this.props},t.attachResource=function(n){this._attachedResources.add(n)},t.detachResource=function(n){this._attachedResources.delete(n)},t.destroyAttachedResource=function(n){this._attachedResources.delete(n)&&n.destroy()},t.destroyAttachedResources=function(){for(var n=0,o=Object.values(this._attachedResources);n<o.length;n++){var i=o[n];i.destroy()}this._attachedResources=new Set},t.destroyResource=function(){this.destroyAttachedResources(),this.removeStats(),this.destroyed=!0},t.removeStats=function(){var n=this._device.statsManager.getStats("Resource Counts"),o=this[Symbol.toStringTag];n.get("".concat(o,"s Active")).decrementCount()},t.trackAllocatedMemory=function(n){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this[Symbol.toStringTag],i=this._device.statsManager.getStats("Resource Counts");i.get("GPU Memory").addCount(n),i.get("".concat(o," Memory")).addCount(n),this.allocatedBytes=n},t.trackDeallocatedMemory=function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this[Symbol.toStringTag],o=this._device.statsManager.getStats("Resource Counts");o.get("GPU Memory").subtractCount(this.allocatedBytes),o.get("".concat(n," Memory")).subtractCount(this.allocatedBytes),this.allocatedBytes=0},t.addStats=function(){var n=this._device.statsManager.getStats("Resource Counts"),o=this[Symbol.toStringTag];n.get("Resources Created").incrementCount(),n.get("".concat(o,"s Created")).incrementCount(),n.get("".concat(o,"s Active")).incrementCount()},Si(e)}();O.defaultProps={id:"undefined",handle:void 0,userData:void 0};function Ti(e,t){var r=wi({},t);for(var n in e)e[n]!==void 0&&(r[n]=e[n]);return r}function ie(e){return ie=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ie(e)}var Ar;function jr(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function Ot(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?jr(Object(r),!0).forEach(function(n){ji(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):jr(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function ji(e,t,r){return t=xr(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Ei(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Er(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,xr(n.key),n)}}function Ai(e,t,r){return t&&Er(e.prototype,t),r&&Er(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function xr(e){var t=xi(e,"string");return ie(t)==="symbol"?t:String(t)}function xi(e,t){if(ie(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(ie(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Ri(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&St(e,t)}function St(e,t){return St=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,o){return n.__proto__=o,n},St(e,t)}function Ii(e){var t=Bi();return function(){var n=ze(e),o;if(t){var i=ze(this).constructor;o=Reflect.construct(n,arguments,i)}else o=n.apply(this,arguments);return Di(this,o)}}function Di(e,t){if(t&&(ie(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Li(e)}function Li(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Bi(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function ze(e){return ze=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},ze(e)}Ar=Symbol.toStringTag;var R=function(e){Ri(r,e);var t=Ii(r);function r(o,i){var f;Ei(this,r);var s=Ot({},i);return(i.usage||0)&r.INDEX&&!i.indexType&&(i.data instanceof Uint32Array?s.indexType="uint32":i.data instanceof Uint16Array&&(s.indexType="uint16")),f=t.call(this,o,s,r.defaultProps),f.usage=void 0,f.indexType=void 0,f.byteLength=void 0,f.debugData=new ArrayBuffer(0),f.usage=i.usage||0,f.indexType=s.indexType,f}var n=r.prototype;return n.readSyncWebGL2=function(i,f){throw new Error("not implemented")},n._setDebugData=function(i,f,s){var u=ArrayBuffer.isView(i)?i.buffer:i,p=Math.min(i?i.byteLength:s,r.DEBUG_DATA_MAX_LENGTH);i===null?this.debugData=new ArrayBuffer(p):f===0&&s===i.byteLength?this.debugData=u.slice(0,p):this.debugData=u.slice(f,f+p)},Ai(r,[{key:Ar,get:function(){return"Buffer"}}]),r}(O);R.defaultProps=Ot(Ot({},O.defaultProps),{},{usage:0,byteLength:0,byteOffset:0,data:null,indexType:"uint16",mappedAtCreation:!1});R.MAP_READ=1;R.MAP_WRITE=2;R.COPY_SRC=4;R.COPY_DST=8;R.INDEX=16;R.VERTEX=32;R.UNIFORM=64;R.STORAGE=128;R.INDIRECT=256;R.QUERY_RESOLVE=512;R.DEBUG_DATA_MAX_LENGTH=32;function Ee(e){return Ee=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ee(e)}var Dr;function Rr(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function Pt(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Rr(Object(r),!0).forEach(function(n){Ni(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Rr(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Ni(e,t,r){return t=Lr(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Ci(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ir(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Lr(n.key),n)}}function Mi(e,t,r){return t&&Ir(e.prototype,t),r&&Ir(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function Lr(e){var t=ki(e,"string");return Ee(t)==="symbol"?t:String(t)}function ki(e,t){if(Ee(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Ee(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}Dr=Symbol.toStringTag;var Z=function(){function e(r){Ci(this,e),this.id=void 0,this.statsManager=oe,this.props=void 0,this.userData={},this._lumaData={},this.info=void 0,this.lost=void 0,this.canvasContext=void 0,this.props=Pt(Pt({},e.defaultProps),r),this.id=this.props.id||Y(this[Symbol.toStringTag].toLowerCase())}var t=e.prototype;return t.loseDevice=function(){return!1},t.getCanvasContext=function(){if(!this.canvasContext)throw new Error("Device has no CanvasContext");return this.canvasContext},t.createTexture=function(n){return(n instanceof Promise||typeof n=="string")&&(n={data:n}),this._createTexture(n)},t.createCommandEncoder=function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};throw new Error("not implemented")},t.readPixelsToArrayWebGL=function(n,o){throw new Error("not implemented")},t.readPixelsToBufferWebGL2=function(n,o){throw new Error("not implemented")},t.setParametersWebGL=function(n){throw new Error("not implemented")},t.withParametersWebGL=function(n,o){throw new Error("not implemented")},t.clearWebGL=function(n){throw new Error("not implemented")},t._getBufferProps=function(n){(n instanceof ArrayBuffer||ArrayBuffer.isView(n))&&(n={data:n});var o=Pt({},n);return(n.usage||0)&R.INDEX&&!n.indexType&&(n.data instanceof Uint32Array?o.indexType="uint32":n.data instanceof Uint16Array?o.indexType="uint16":_.warn("indices buffer content must be of integer type")()),o},Mi(e,[{key:Dr,get:function(){return"Device"}}]),e}();Z.defaultProps={id:null,type:"best-available",canvas:null,container:null,webgl2:!0,webgl1:!0,manageState:!0,width:800,height:600,debug:Boolean(_.get("debug")),break:[],gl:null};Z.VERSION=Fe;function ae(e,t){if(!e)throw new Error(t||"luma.gl: assertion failed.")}function ue(e){return ue=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ue(e)}function _t(){"use strict";_t=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(l,a,c){l[a]=c.value},o=typeof Symbol=="function"?Symbol:{},i=o.iterator||"@@iterator",f=o.asyncIterator||"@@asyncIterator",s=o.toStringTag||"@@toStringTag";function u(l,a,c){return Object.defineProperty(l,a,{value:c,enumerable:!0,configurable:!0,writable:!0}),l[a]}try{u({},"")}catch{u=function(c,y,h){return c[y]=h}}function p(l,a,c,y){var h=a&&a.prototype instanceof v?a:v,m=Object.create(h.prototype),d=new U(y||[]);return n(m,"_invoke",{value:Se(l,c,d)}),m}function g(l,a,c){try{return{type:"normal",arg:l.call(a,c)}}catch(y){return{type:"throw",arg:y}}}e.wrap=p;var b={};function v(){}function T(){}function P(){}var D={};u(D,i,function(){return this});var L=Object.getPrototypeOf,I=L&&L(L(G([])));I&&I!==t&&r.call(I,i)&&(D=I);var E=P.prototype=v.prototype=Object.create(D);function M(l){["next","throw","return"].forEach(function(a){u(l,a,function(c){return this._invoke(a,c)})})}function N(l,a){function c(h,m,d,w){var S=g(l[h],l,m);if(S.type!=="throw"){var A=S.arg,j=A.value;return j&&ue(j)=="object"&&r.call(j,"__await")?a.resolve(j.__await).then(function(x){c("next",x,d,w)},function(x){c("throw",x,d,w)}):a.resolve(j).then(function(x){A.value=x,d(A)},function(x){return c("throw",x,d,w)})}w(S.arg)}var y;n(this,"_invoke",{value:function(m,d){function w(){return new a(function(S,A){c(m,d,S,A)})}return y=y?y.then(w,w):w()}})}function Se(l,a,c){var y="suspendedStart";return function(h,m){if(y==="executing")throw new Error("Generator is already running");if(y==="completed"){if(h==="throw")throw m;return W()}for(c.method=h,c.arg=m;;){var d=c.delegate;if(d){var w=V(d,c);if(w){if(w===b)continue;return w}}if(c.method==="next")c.sent=c._sent=c.arg;else if(c.method==="throw"){if(y==="suspendedStart")throw y="completed",c.arg;c.dispatchException(c.arg)}else c.method==="return"&&c.abrupt("return",c.arg);y="executing";var S=g(l,a,c);if(S.type==="normal"){if(y=c.done?"completed":"suspendedYield",S.arg===b)continue;return{value:S.arg,done:c.done}}S.type==="throw"&&(y="completed",c.method="throw",c.arg=S.arg)}}}function V(l,a){var c=a.method,y=l.iterator[c];if(y===void 0)return a.delegate=null,c==="throw"&&l.iterator.return&&(a.method="return",a.arg=void 0,V(l,a),a.method==="throw")||c!=="return"&&(a.method="throw",a.arg=new TypeError("The iterator does not provide a '"+c+"' method")),b;var h=g(y,l.iterator,a.arg);if(h.type==="throw")return a.method="throw",a.arg=h.arg,a.delegate=null,b;var m=h.arg;return m?m.done?(a[l.resultName]=m.value,a.next=l.nextLoc,a.method!=="return"&&(a.method="next",a.arg=void 0),a.delegate=null,b):m:(a.method="throw",a.arg=new TypeError("iterator result is not an object"),a.delegate=null,b)}function Pe(l){var a={tryLoc:l[0]};1 in l&&(a.catchLoc=l[1]),2 in l&&(a.finallyLoc=l[2],a.afterLoc=l[3]),this.tryEntries.push(a)}function k(l){var a=l.completion||{};a.type="normal",delete a.arg,l.completion=a}function U(l){this.tryEntries=[{tryLoc:"root"}],l.forEach(Pe,this),this.reset(!0)}function G(l){if(l){var a=l[i];if(a)return a.call(l);if(typeof l.next=="function")return l;if(!isNaN(l.length)){var c=-1,y=function h(){for(;++c<l.length;)if(r.call(l,c))return h.value=l[c],h.done=!1,h;return h.value=void 0,h.done=!0,h};return y.next=y}}return{next:W}}function W(){return{value:void 0,done:!0}}return T.prototype=P,n(E,"constructor",{value:P,configurable:!0}),n(P,"constructor",{value:T,configurable:!0}),T.displayName=u(P,s,"GeneratorFunction"),e.isGeneratorFunction=function(l){var a=typeof l=="function"&&l.constructor;return!!a&&(a===T||(a.displayName||a.name)==="GeneratorFunction")},e.mark=function(l){return Object.setPrototypeOf?Object.setPrototypeOf(l,P):(l.__proto__=P,u(l,s,"GeneratorFunction")),l.prototype=Object.create(E),l},e.awrap=function(l){return{__await:l}},M(N.prototype),u(N.prototype,f,function(){return this}),e.AsyncIterator=N,e.async=function(l,a,c,y,h){h===void 0&&(h=Promise);var m=new N(p(l,a,c,y),h);return e.isGeneratorFunction(a)?m:m.next().then(function(d){return d.done?d.value:m.next()})},M(E),u(E,s,"Generator"),u(E,i,function(){return this}),u(E,"toString",function(){return"[object Generator]"}),e.keys=function(l){var a=Object(l),c=[];for(var y in a)c.push(y);return c.reverse(),function h(){for(;c.length;){var m=c.pop();if(m in a)return h.value=m,h.done=!1,h}return h.done=!0,h}},e.values=G,U.prototype={constructor:U,reset:function(a){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(k),!a)for(var c in this)c.charAt(0)==="t"&&r.call(this,c)&&!isNaN(+c.slice(1))&&(this[c]=void 0)},stop:function(){this.done=!0;var a=this.tryEntries[0].completion;if(a.type==="throw")throw a.arg;return this.rval},dispatchException:function(a){if(this.done)throw a;var c=this;function y(A,j){return d.type="throw",d.arg=a,c.next=A,j&&(c.method="next",c.arg=void 0),!!j}for(var h=this.tryEntries.length-1;h>=0;--h){var m=this.tryEntries[h],d=m.completion;if(m.tryLoc==="root")return y("end");if(m.tryLoc<=this.prev){var w=r.call(m,"catchLoc"),S=r.call(m,"finallyLoc");if(w&&S){if(this.prev<m.catchLoc)return y(m.catchLoc,!0);if(this.prev<m.finallyLoc)return y(m.finallyLoc)}else if(w){if(this.prev<m.catchLoc)return y(m.catchLoc,!0)}else{if(!S)throw new Error("try statement without catch or finally");if(this.prev<m.finallyLoc)return y(m.finallyLoc)}}}},abrupt:function(a,c){for(var y=this.tryEntries.length-1;y>=0;--y){var h=this.tryEntries[y];if(h.tryLoc<=this.prev&&r.call(h,"finallyLoc")&&this.prev<h.finallyLoc){var m=h;break}}m&&(a==="break"||a==="continue")&&m.tryLoc<=c&&c<=m.finallyLoc&&(m=null);var d=m?m.completion:{};return d.type=a,d.arg=c,m?(this.method="next",this.next=m.finallyLoc,b):this.complete(d)},complete:function(a,c){if(a.type==="throw")throw a.arg;return a.type==="break"||a.type==="continue"?this.next=a.arg:a.type==="return"?(this.rval=this.arg=a.arg,this.method="return",this.next="end"):a.type==="normal"&&c&&(this.next=c),b},finish:function(a){for(var c=this.tryEntries.length-1;c>=0;--c){var y=this.tryEntries[c];if(y.finallyLoc===a)return this.complete(y.completion,y.afterLoc),k(y),b}},catch:function(a){for(var c=this.tryEntries.length-1;c>=0;--c){var y=this.tryEntries[c];if(y.tryLoc===a){var h=y.completion;if(h.type==="throw"){var m=h.arg;k(y)}return m}}throw new Error("illegal catch attempt")},delegateYield:function(a,c,y){return this.delegate={iterator:G(a),resultName:c,nextLoc:y},this.method==="next"&&(this.arg=void 0),b}},e}function Br(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function Nr(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Br(Object(r),!0).forEach(function(n){Ui(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Br(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Ui(e,t,r){return t=Ur(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Cr(e,t,r,n,o,i,f){try{var s=e[i](f),u=s.value}catch(p){r(p);return}s.done?t(u):Promise.resolve(u).then(n,o)}function Gi(e){return function(){var t=this,r=arguments;return new Promise(function(n,o){var i=e.apply(t,r);function f(u){Cr(i,n,o,f,s,"next",u)}function s(u){Cr(i,n,o,f,s,"throw",u)}f(void 0)})}}function Fi(e,t){var r=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=zi(e))||t&&e&&typeof e.length=="number"){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(p){throw p},f:o}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
8
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var i=!0,f=!1,s;return{s:function(){r=r.call(e)},n:function(){var p=r.next();return i=p.done,p},e:function(p){f=!0,s=p},f:function(){try{!i&&r.return!=null&&r.return()}finally{if(f)throw s}}}}function zi(e,t){if(e){if(typeof e=="string")return Mr(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Mr(e,t)}}function Mr(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function kr(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Ur(n.key),n)}}function Hi(e,t,r){return t&&kr(e.prototype,t),r&&kr(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function Ur(e){var t=Vi(e,"string");return ue(t)==="symbol"?t:String(t)}function Vi(e,t){if(ue(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(ue(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Wi(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var J=new Map,He=function(){function e(){Wi(this,e)}return e.registerDevices=function(r){var n=Fi(r),o;try{for(n.s();!(o=n.n()).done;){var i=o.value;ae(i.type&&i.isSupported&&i.create),J.set(i.type,i)}}catch(f){n.e(f)}finally{n.f()}},e.getAvailableDevices=function(){return Array.from(J).map(function(r){return r.type})},e.getSupportedDevices=function(){return Array.from(J).filter(function(r){return r.isSupported()}).map(function(r){return r.type})},e.setDefaultDeviceProps=function(r){Object.assign(Z.defaultProps,r)},e.createDevice=function(){var t=Gi(_t().mark(function n(){var o,i,f=arguments;return _t().wrap(function(u){for(;;)switch(u.prev=u.next){case 0:o=f.length>0&&f[0]!==void 0?f[0]:{},o=Nr(Nr({},Z.defaultProps),o),o.gl&&(o.type="webgl"),u.t0=o.type,u.next=u.t0==="webgpu"?6:u.t0==="webgl"||u.t0==="webgl1"||u.t0==="webgl2"?12:u.t0==="best-available"?18:29;break;case 6:if(i=J.get("webgpu"),!i){u.next=11;break}return u.next=10,i.create(o);case 10:return u.abrupt("return",u.sent);case 11:return u.abrupt("break",29);case 12:if(i=J.get("webgl"),!i){u.next=17;break}return u.next=16,i.create(o);case 16:return u.abrupt("return",u.sent);case 17:return u.abrupt("break",29);case 18:if(i=J.get("webgpu"),!(i&&i.isSupported())){u.next=23;break}return u.next=22,i.create(o);case 22:return u.abrupt("return",u.sent);case 23:if(i=J.get("webgl"),!(i&&i.isSupported())){u.next=28;break}return u.next=27,i.create(o);case 27:return u.abrupt("return",u.sent);case 28:return u.abrupt("break",29);case 29:throw new Error("No matching device found. Ensure `@luma.gl/webgl` and/or `@luma.gl/webgpu` modules are imported.");case 30:case"end":return u.stop()}},n)}));function r(){return t.apply(this,arguments)}return r}(),Hi(e)}();He.stats=oe;He.log=_;function Ae(e){return Ae=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ae(e)}function Ve(e,t){return $i(e)||Yi(e,t)||Kr(e,t)||Ki()}function Ki(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
9
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Yi(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,o,i,f,s=[],u=!0,p=!1;try{if(i=(r=r.call(e)).next,t===0){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=i.call(r)).done)&&(s.push(n.value),s.length!==t);u=!0);}catch(g){p=!0,o=g}finally{try{if(!u&&r.return!=null&&(f=r.return(),Object(f)!==f))return}finally{if(p)throw o}}return s}}function $i(e){if(Array.isArray(e))return e}function Xi(e,t){var r=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=Kr(e))||t&&e&&typeof e.length=="number"){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(p){throw p},f:o}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
10
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var i=!0,f=!1,s;return{s:function(){r=r.call(e)},n:function(){var p=r.next();return i=p.done,p},e:function(p){f=!0,s=p},f:function(){try{!i&&r.return!=null&&r.return()}finally{if(f)throw s}}}}function Kr(e,t){if(e){if(typeof e=="string")return Gr(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Gr(e,t)}}function Gr(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Fr(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function zr(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Fr(Object(r),!0).forEach(function(n){qi(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Fr(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function qi(e,t,r){return t=Yr(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Zi(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Hr(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Yr(n.key),n)}}function Ji(e,t,r){return t&&Hr(e.prototype,t),r&&Hr(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function Yr(e){var t=Qi(e,"string");return Ae(t)==="symbol"?t:String(t)}function Qi(e,t){if(Ae(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Ae(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var ea=B()&&typeof document<"u",We=function(){return ea&&document.readyState==="complete"},ta={canvas:null,width:800,height:600,useDevicePixels:!0,autoResize:!0,container:null,visible:!0,colorSpace:"srgb",alphaMode:"opaque"},Tt=function(){function e(r){var n=this;if(Zi(this,e),this.device=void 0,this.id=void 0,this.props=void 0,this.canvas=void 0,this.htmlCanvas=void 0,this.offscreenCanvas=void 0,this.type=void 0,this.width=1,this.height=1,this.resizeObserver=void 0,this._canvasSizeInfo={clientWidth:0,clientHeight:0,devicePixelRatio:1},this.props=zr(zr({},ta),r),r=this.props,!B()){this.id="node-canvas-context",this.type="node",this.width=this.props.width,this.height=this.props.height,this.canvas=null;return}if(r.canvas)typeof r.canvas=="string"?this.canvas=oa(r.canvas):this.canvas=r.canvas;else{var o,i,f=ia(r),s=na(((o=r)===null||o===void 0?void 0:o.container)||null);s.insertBefore(f,s.firstChild),this.canvas=f,(i=r)!==null&&i!==void 0&&i.visible||(this.canvas.style.visibility="hidden")}this.canvas instanceof HTMLCanvasElement?(this.id=this.canvas.id,this.type="html-canvas",this.htmlCanvas=this.canvas):(this.id="offscreen-canvas",this.type="offscreen-canvas",this.offscreenCanvas=this.canvas),this.canvas instanceof HTMLCanvasElement&&r.autoResize&&(this.resizeObserver=new ResizeObserver(function(u){var p=Xi(u),g;try{for(p.s();!(g=p.n()).done;){var b=g.value;b.target===n.canvas&&n.update()}}catch(v){p.e(v)}finally{p.f()}}),this.resizeObserver.observe(this.canvas))}var t=e.prototype;return t.getDevicePixelRatio=function(n){if(typeof OffscreenCanvas<"u"&&this.canvas instanceof OffscreenCanvas||(n=n===void 0?this.props.useDevicePixels:n,!n||n<=0))return 1;if(n===!0){var o=typeof window<"u"&&window.devicePixelRatio;return o||1}return n},t.getPixelSize=function(){switch(this.type){case"node":return[this.width,this.height];case"offscreen-canvas":return[this.canvas.width,this.canvas.height];case"html-canvas":var n=this.getDevicePixelRatio(),o=this.canvas;return o.parentElement?[o.clientWidth*n,o.clientHeight*n]:[this.canvas.width,this.canvas.height];default:throw new Error(this.type)}},t.getAspect=function(){var n=this.getPixelSize(),o=Ve(n,2),i=o[0],f=o[1];return i/f},t.cssToDeviceRatio=function(){try{var n=this.getDrawingBufferSize(),o=Ve(n,1),i=o[0],f=this._canvasSizeInfo.clientWidth;return f?i/f:1}catch{return 1}},t.cssToDevicePixels=function(n){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,i=this.cssToDeviceRatio(),f=this.getDrawingBufferSize(),s=Ve(f,2),u=s[0],p=s[1];return aa(n,i,u,p,o)},t.setDevicePixelRatio=function(n){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.htmlCanvas){var i="width"in o?o.width:this.htmlCanvas.clientWidth,f="height"in o?o.height:this.htmlCanvas.clientHeight;(!i||!f)&&(_.log(1,"Canvas clientWidth/clientHeight is 0")(),n=1,i=this.htmlCanvas.width||1,f=this.htmlCanvas.height||1);var s=this._canvasSizeInfo;if(s.clientWidth!==i||s.clientHeight!==f||s.devicePixelRatio!==n){var u=n,p=Math.floor(i*u),g=Math.floor(f*u);this.htmlCanvas.width=p,this.htmlCanvas.height=g;var b=this.getDrawingBufferSize(),v=Ve(b,2),T=v[0],P=v[1];(T!==p||P!==g)&&(u=Math.min(T/i,P/f),this.htmlCanvas.width=Math.floor(i*u),this.htmlCanvas.height=Math.floor(f*u),_.warn("Device pixel ratio clamped")()),this._canvasSizeInfo.clientWidth=i,this._canvasSizeInfo.clientHeight=f,this._canvasSizeInfo.devicePixelRatio=n}}},t.getDrawingBufferSize=function(){var n=this.device.gl;if(!n)throw new Error("canvas size");return[n.drawingBufferWidth,n.drawingBufferHeight]},t._setAutoCreatedCanvasId=function(n){var o;((o=this.htmlCanvas)===null||o===void 0?void 0:o.id)==="lumagl-auto-created-canvas"&&(this.htmlCanvas.id=n)},Ji(e,null,[{key:"isPageLoaded",get:function(){return We()}}]),e}();Tt.pageLoaded=ra();function ra(){return We()||typeof window>"u"?Promise.resolve():new Promise(function(e){window.addEventListener("load",function(){return e()})})}function na(e){if(typeof e=="string"){var t=document.getElementById(e);if(!t&&!We())throw new Error("Accessing '".concat(e,"' before page was loaded"));if(!t)throw new Error("".concat(e," is not an HTML element"));return t}else if(e)return e;return document.body}function oa(e){var t=document.getElementById(e);if(!t&&!We())throw new Error("Accessing '".concat(e,"' before page was loaded"));if(!(t instanceof HTMLCanvasElement))throw new Error("Object is not a canvas element");return t}function ia(e){var t=e.width,r=e.height,n=document.createElement("canvas");return n.id="lumagl-auto-created-canvas",n.width=t||1,n.height=r||1,n.style.width=Number.isFinite(t)?"".concat(t,"px"):"100%",n.style.height=Number.isFinite(r)?"".concat(r,"px"):"100%",n}function aa(e,t,r,n,o){var i=e,f=Vr(i[0],t,r),s=Wr(i[1],t,n,o),u=Vr(i[0]+1,t,r),p=u===r-1?u:u-1;u=Wr(i[1]+1,t,n,o);var g;return o?(u=u===0?u:u+1,g=s,s=u):g=u===n-1?u:u-1,{x:f,y:s,width:Math.max(p-f+1,1),height:Math.max(g-s+1,1)}}function Vr(e,t,r){var n=Math.min(Math.round(e*t),r-1);return n}function Wr(e,t,r,n){return n?Math.max(0,r-1-Math.round(e*t)):Math.min(Math.round(e*t),r-1)}function fe(e){return fe=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},fe(e)}var Zr;function $r(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function Xr(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?$r(Object(r),!0).forEach(function(n){ua(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):$r(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function ua(e,t,r){return t=Jr(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function fa(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function qr(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Jr(n.key),n)}}function ca(e,t,r){return t&&qr(e.prototype,t),r&&qr(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function Jr(e){var t=sa(e,"string");return fe(t)==="symbol"?t:String(t)}function sa(e,t){if(fe(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(fe(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function la(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&jt(e,t)}function jt(e,t){return jt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,o){return n.__proto__=o,n},jt(e,t)}function pa(e){var t=ha();return function(){var n=Ke(e),o;if(t){var i=Ke(this).constructor;o=Reflect.construct(n,arguments,i)}else o=n.apply(this,arguments);return ya(this,o)}}function ya(e,t){if(t&&(fe(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return ma(e)}function ma(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ha(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Ke(e){return Ke=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Ke(e)}Zr=Symbol.toStringTag;var F=function(e){la(r,e);var t=pa(r);function r(n,o){var i,f=arguments.length>2&&arguments[2]!==void 0?arguments[2]:r.defaultProps;return fa(this,r),i=t.call(this,n,o,f),i.dimension=void 0,i.format=void 0,i.width=void 0,i.height=void 0,i.depth=void 0,i.sampler=void 0,i.dimension=i.props.dimension,i.format=i.props.format,i.width=i.props.width,i.height=i.props.height,i.depth=i.props.depth,i}return ca(r,[{key:Zr,get:function(){return"Texture"}}]),r}(O);F.defaultProps=Xr(Xr({},O.defaultProps),{},{data:null,dimension:"2d",format:"rgba8unorm",width:void 0,height:void 0,depth:1,mipmaps:!0,sampler:{},compressed:!1,usage:0,mipLevels:void 0,samples:void 0,type:void 0});F.COPY_SRC=1;F.COPY_DST=2;F.TEXTURE_BINDING=4;F.STORAGE_BINDING=8;F.RENDER_ATTACHMENT=16;function ce(e){return ce=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ce(e)}var rn;function Qr(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function en(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Qr(Object(r),!0).forEach(function(n){da(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Qr(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function da(e,t,r){return t=nn(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ga(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function tn(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,nn(n.key),n)}}function ba(e,t,r){return t&&tn(e.prototype,t),r&&tn(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function nn(e){var t=va(e,"string");return ce(t)==="symbol"?t:String(t)}function va(e,t){if(ce(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(ce(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function wa(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Et(e,t)}function Et(e,t){return Et=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,o){return n.__proto__=o,n},Et(e,t)}function Oa(e){var t=_a();return function(){var n=Ye(e),o;if(t){var i=Ye(this).constructor;o=Reflect.construct(n,arguments,i)}else o=n.apply(this,arguments);return Sa(this,o)}}function Sa(e,t){if(t&&(ce(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Pa(e)}function Pa(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _a(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Ye(e){return Ye=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Ye(e)}rn=Symbol.toStringTag;var At=function(e){wa(r,e);var t=Oa(r);function r(n,o){return ga(this,r),t.call(this,n,o,r.defaultProps)}return ba(r,[{key:rn,get:function(){return"ExternalTexture"}}]),r}(O);At.defaultProps=en(en({},O.defaultProps),{},{source:null,colorSpace:"srgb"});function xe(e){return xe=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},xe(e)}function Ta(e,t){var r=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=ja(e))||t&&e&&typeof e.length=="number"){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(p){throw p},f:o}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
11
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var i=!0,f=!1,s;return{s:function(){r=r.call(e)},n:function(){var p=r.next();return i=p.done,p},e:function(p){f=!0,s=p},f:function(){try{!i&&r.return!=null&&r.return()}finally{if(f)throw s}}}}function ja(e,t){if(e){if(typeof e=="string")return on(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return on(e,t)}}function on(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function an(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function un(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?an(Object(r),!0).forEach(function(n){Ea(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):an(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Ea(e,t,r){return t=Aa(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Aa(e){var t=xa(e,"string");return xe(t)==="symbol"?t:String(t)}function xa(e,t){if(xe(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(xe(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function $e(e,t,r){var n="",o=t.split(/\r?\n/),i=e.slice().sort(function(v,T){return v.lineNum-T.lineNum});switch(r?.showSourceCode||"no"){case"all":for(var f=0,s=1;s<=o.length;s++)for(n+=cn(o[s-1],s,r);i.length>f&&i[f].lineNum===s;){var u=i[f++];n+=fn(u,o,u.lineNum,un(un({},r),{},{inlineSource:!1}))}return n;case"issues":case"no":var p=Ta(e),g;try{for(p.s();!(g=p.n()).done;){var b=g.value;n+=fn(b,o,b.lineNum,{inlineSource:r?.showSourceCode!=="no"})}}catch(v){p.e(v)}finally{p.f()}return n}}function fn(e,t,r,n){if(n!=null&&n.inlineSource){var o=Ra(t,r),i=e.linePos>0?"".concat(" ".repeat(e.linePos+5),`^^^
12
+ `):"";return`
13
+ `.concat(o).concat(i).concat(e.type.toUpperCase(),": ").concat(e.message,`
14
+
15
+ `)}return n!=null&&n.html?`<div class='luma-compiler-log-error' style="color:red;"><b> `.concat(e.type.toUpperCase(),": ").concat(e.message,"</b></div>"):"".concat(e.type.toUpperCase(),": ").concat(e.message)}function Ra(e,t,r){for(var n="",o=t-2;o<=t;o++){var i=e[o-1];i!==void 0&&(n+=cn(i,t,r))}return n}function cn(e,t,r){var n=r!=null&&r.html?Da(e):e;return"".concat(Ia(String(t),4),": ").concat(n).concat(r!=null&&r.html?"<br/>":`
16
+ `)}function Ia(e,t){for(var r="",n=e.length;n<t;++n)r+=" ";return r+e}function Da(e){return e.replaceAll("&","&amp;").replaceAll("<","&lt;").replaceAll(">","&gt;").replaceAll('"',"&quot;").replaceAll("'","&#039;")}function xt(e,t){return{name:La(e,t),language:"glsl",version:Ba(e)}}function La(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"unnamed",r=/#define[\s*]SHADER_NAME[\s*]([A-Za-z0-9_-]+)[\s*]/,n=r.exec(e);return n?n[1]:t}function Ba(e){var t=100,r=e.match(/[^\s]+/g);if(r&&r.length>=2&&r[0]==="#version"){var n=parseInt(r[1],10);Number.isFinite(n)&&(t=n)}return t}function Q(e){return Q=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Q(e)}var yn;function Rt(){"use strict";Rt=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(l,a,c){l[a]=c.value},o=typeof Symbol=="function"?Symbol:{},i=o.iterator||"@@iterator",f=o.asyncIterator||"@@asyncIterator",s=o.toStringTag||"@@toStringTag";function u(l,a,c){return Object.defineProperty(l,a,{value:c,enumerable:!0,configurable:!0,writable:!0}),l[a]}try{u({},"")}catch{u=function(c,y,h){return c[y]=h}}function p(l,a,c,y){var h=a&&a.prototype instanceof v?a:v,m=Object.create(h.prototype),d=new U(y||[]);return n(m,"_invoke",{value:Se(l,c,d)}),m}function g(l,a,c){try{return{type:"normal",arg:l.call(a,c)}}catch(y){return{type:"throw",arg:y}}}e.wrap=p;var b={};function v(){}function T(){}function P(){}var D={};u(D,i,function(){return this});var L=Object.getPrototypeOf,I=L&&L(L(G([])));I&&I!==t&&r.call(I,i)&&(D=I);var E=P.prototype=v.prototype=Object.create(D);function M(l){["next","throw","return"].forEach(function(a){u(l,a,function(c){return this._invoke(a,c)})})}function N(l,a){function c(h,m,d,w){var S=g(l[h],l,m);if(S.type!=="throw"){var A=S.arg,j=A.value;return j&&Q(j)=="object"&&r.call(j,"__await")?a.resolve(j.__await).then(function(x){c("next",x,d,w)},function(x){c("throw",x,d,w)}):a.resolve(j).then(function(x){A.value=x,d(A)},function(x){return c("throw",x,d,w)})}w(S.arg)}var y;n(this,"_invoke",{value:function(m,d){function w(){return new a(function(S,A){c(m,d,S,A)})}return y=y?y.then(w,w):w()}})}function Se(l,a,c){var y="suspendedStart";return function(h,m){if(y==="executing")throw new Error("Generator is already running");if(y==="completed"){if(h==="throw")throw m;return W()}for(c.method=h,c.arg=m;;){var d=c.delegate;if(d){var w=V(d,c);if(w){if(w===b)continue;return w}}if(c.method==="next")c.sent=c._sent=c.arg;else if(c.method==="throw"){if(y==="suspendedStart")throw y="completed",c.arg;c.dispatchException(c.arg)}else c.method==="return"&&c.abrupt("return",c.arg);y="executing";var S=g(l,a,c);if(S.type==="normal"){if(y=c.done?"completed":"suspendedYield",S.arg===b)continue;return{value:S.arg,done:c.done}}S.type==="throw"&&(y="completed",c.method="throw",c.arg=S.arg)}}}function V(l,a){var c=a.method,y=l.iterator[c];if(y===void 0)return a.delegate=null,c==="throw"&&l.iterator.return&&(a.method="return",a.arg=void 0,V(l,a),a.method==="throw")||c!=="return"&&(a.method="throw",a.arg=new TypeError("The iterator does not provide a '"+c+"' method")),b;var h=g(y,l.iterator,a.arg);if(h.type==="throw")return a.method="throw",a.arg=h.arg,a.delegate=null,b;var m=h.arg;return m?m.done?(a[l.resultName]=m.value,a.next=l.nextLoc,a.method!=="return"&&(a.method="next",a.arg=void 0),a.delegate=null,b):m:(a.method="throw",a.arg=new TypeError("iterator result is not an object"),a.delegate=null,b)}function Pe(l){var a={tryLoc:l[0]};1 in l&&(a.catchLoc=l[1]),2 in l&&(a.finallyLoc=l[2],a.afterLoc=l[3]),this.tryEntries.push(a)}function k(l){var a=l.completion||{};a.type="normal",delete a.arg,l.completion=a}function U(l){this.tryEntries=[{tryLoc:"root"}],l.forEach(Pe,this),this.reset(!0)}function G(l){if(l){var a=l[i];if(a)return a.call(l);if(typeof l.next=="function")return l;if(!isNaN(l.length)){var c=-1,y=function h(){for(;++c<l.length;)if(r.call(l,c))return h.value=l[c],h.done=!1,h;return h.value=void 0,h.done=!0,h};return y.next=y}}return{next:W}}function W(){return{value:void 0,done:!0}}return T.prototype=P,n(E,"constructor",{value:P,configurable:!0}),n(P,"constructor",{value:T,configurable:!0}),T.displayName=u(P,s,"GeneratorFunction"),e.isGeneratorFunction=function(l){var a=typeof l=="function"&&l.constructor;return!!a&&(a===T||(a.displayName||a.name)==="GeneratorFunction")},e.mark=function(l){return Object.setPrototypeOf?Object.setPrototypeOf(l,P):(l.__proto__=P,u(l,s,"GeneratorFunction")),l.prototype=Object.create(E),l},e.awrap=function(l){return{__await:l}},M(N.prototype),u(N.prototype,f,function(){return this}),e.AsyncIterator=N,e.async=function(l,a,c,y,h){h===void 0&&(h=Promise);var m=new N(p(l,a,c,y),h);return e.isGeneratorFunction(a)?m:m.next().then(function(d){return d.done?d.value:m.next()})},M(E),u(E,s,"Generator"),u(E,i,function(){return this}),u(E,"toString",function(){return"[object Generator]"}),e.keys=function(l){var a=Object(l),c=[];for(var y in a)c.push(y);return c.reverse(),function h(){for(;c.length;){var m=c.pop();if(m in a)return h.value=m,h.done=!1,h}return h.done=!0,h}},e.values=G,U.prototype={constructor:U,reset:function(a){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(k),!a)for(var c in this)c.charAt(0)==="t"&&r.call(this,c)&&!isNaN(+c.slice(1))&&(this[c]=void 0)},stop:function(){this.done=!0;var a=this.tryEntries[0].completion;if(a.type==="throw")throw a.arg;return this.rval},dispatchException:function(a){if(this.done)throw a;var c=this;function y(A,j){return d.type="throw",d.arg=a,c.next=A,j&&(c.method="next",c.arg=void 0),!!j}for(var h=this.tryEntries.length-1;h>=0;--h){var m=this.tryEntries[h],d=m.completion;if(m.tryLoc==="root")return y("end");if(m.tryLoc<=this.prev){var w=r.call(m,"catchLoc"),S=r.call(m,"finallyLoc");if(w&&S){if(this.prev<m.catchLoc)return y(m.catchLoc,!0);if(this.prev<m.finallyLoc)return y(m.finallyLoc)}else if(w){if(this.prev<m.catchLoc)return y(m.catchLoc,!0)}else{if(!S)throw new Error("try statement without catch or finally");if(this.prev<m.finallyLoc)return y(m.finallyLoc)}}}},abrupt:function(a,c){for(var y=this.tryEntries.length-1;y>=0;--y){var h=this.tryEntries[y];if(h.tryLoc<=this.prev&&r.call(h,"finallyLoc")&&this.prev<h.finallyLoc){var m=h;break}}m&&(a==="break"||a==="continue")&&m.tryLoc<=c&&c<=m.finallyLoc&&(m=null);var d=m?m.completion:{};return d.type=a,d.arg=c,m?(this.method="next",this.next=m.finallyLoc,b):this.complete(d)},complete:function(a,c){if(a.type==="throw")throw a.arg;return a.type==="break"||a.type==="continue"?this.next=a.arg:a.type==="return"?(this.rval=this.arg=a.arg,this.method="return",this.next="end"):a.type==="normal"&&c&&(this.next=c),b},finish:function(a){for(var c=this.tryEntries.length-1;c>=0;--c){var y=this.tryEntries[c];if(y.finallyLoc===a)return this.complete(y.completion,y.afterLoc),k(y),b}},catch:function(a){for(var c=this.tryEntries.length-1;c>=0;--c){var y=this.tryEntries[c];if(y.tryLoc===a){var h=y.completion;if(h.type==="throw"){var m=h.arg;k(y)}return m}}throw new Error("illegal catch attempt")},delegateYield:function(a,c,y){return this.delegate={iterator:G(a),resultName:c,nextLoc:y},this.method==="next"&&(this.arg=void 0),b}},e}function sn(e,t,r,n,o,i,f){try{var s=e[i](f),u=s.value}catch(p){r(p);return}s.done?t(u):Promise.resolve(u).then(n,o)}function Na(e){return function(){var t=this,r=arguments;return new Promise(function(n,o){var i=e.apply(t,r);function f(u){sn(i,n,o,f,s,"next",u)}function s(u){sn(i,n,o,f,s,"throw",u)}f(void 0)})}}function ln(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function It(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?ln(Object(r),!0).forEach(function(n){Ca(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ln(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Ca(e,t,r){return t=mn(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Ma(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function pn(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,mn(n.key),n)}}function ka(e,t,r){return t&&pn(e.prototype,t),r&&pn(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function mn(e){var t=Ua(e,"string");return Q(t)==="symbol"?t:String(t)}function Ua(e,t){if(Q(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Q(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Ga(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Dt(e,t)}function Dt(e,t){return Dt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,o){return n.__proto__=o,n},Dt(e,t)}function Fa(e){var t=Va();return function(){var n=Xe(e),o;if(t){var i=Xe(this).constructor;o=Reflect.construct(n,arguments,i)}else o=n.apply(this,arguments);return za(this,o)}}function za(e,t){if(t&&(Q(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Ha(e)}function Ha(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Va(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Xe(e){return Xe=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Xe(e)}yn=Symbol.toStringTag;var Lt=function(e){Ga(r,e);var t=Fa(r);function r(o,i){var f;return Ma(this,r),f=t.call(this,o,It({id:Wa(i)},i),r.defaultProps),f.stage=void 0,f.source=void 0,f.compilationStatus="pending",f.stage=f.props.stage,f.source=f.props.source,f}var n=r.prototype;return n.getCompilationInfoSync=function(){return null},n.debugShader=function(){var o=Na(Rt().mark(function f(){var s;return Rt().wrap(function(p){for(;;)switch(p.prev=p.next){case 0:p.t0=this.props.debug,p.next=p.t0==="never"?3:p.t0==="errors"?4:p.t0==="warnings"||p.t0==="always"?7:8;break;case 3:return p.abrupt("return");case 4:if(this.compilationStatus!=="success"){p.next=6;break}return p.abrupt("return");case 6:return p.abrupt("break",8);case 7:return p.abrupt("break",8);case 8:return p.next=10,this.getCompilationInfo();case 10:if(s=p.sent,!(this.props.debug==="warnings"&&s?.length===0)){p.next=13;break}return p.abrupt("return");case 13:this._displayShaderLog(s);case 14:case"end":return p.stop()}},f,this)}));function i(){return o.apply(this,arguments)}return i}(),n._displayShaderLog=function(i){var f,s,u=this;if(!(typeof document>"u"||!((f=document)!==null&&f!==void 0&&f.createElement))){var p=xt(this.source).name,g="".concat(this.stage," ").concat(p),b=$e(i,this.source,{showSourceCode:"all",html:!0}),v=document.createElement("Button");v.innerHTML=`
17
+ <h1>Shader Compilation Error in `.concat(g,`</h1><br /><br />
18
+ <code style="user-select:text;"><pre>
19
+ `).concat(b,`
20
+ </pre></code>`),v.style.top="10px",v.style.left="10px",v.style.position="absolute",v.style.zIndex="9999",v.style.width="100%",v.style.textAlign="left",document.body.appendChild(v);var T=document.getElementsByClassName("luma-compiler-log-error");(s=T[0])!==null&&s!==void 0&&s.scrollIntoView&&T[0].scrollIntoView(),v.onclick=function(){var P="data:text/plain,".concat(encodeURIComponent(u.source));navigator.clipboard.writeText(P)}}},ka(r,[{key:yn,get:function(){return"Shader"}}]),r}(O);Lt.defaultProps=It(It({},O.defaultProps),{},{language:"auto",stage:"vertex",source:"",sourceMap:null,entryPoint:"main",debug:"errors"});function Wa(e){return xt(e.source).name||e.id||Y("unnamed ".concat(e.stage,"-shader"))}function se(e){return se=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},se(e)}var bn;function hn(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function dn(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?hn(Object(r),!0).forEach(function(n){Ka(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):hn(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Ka(e,t,r){return t=vn(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Ya(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function gn(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,vn(n.key),n)}}function $a(e,t,r){return t&&gn(e.prototype,t),r&&gn(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function vn(e){var t=Xa(e,"string");return se(t)==="symbol"?t:String(t)}function Xa(e,t){if(se(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(se(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function qa(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Bt(e,t)}function Bt(e,t){return Bt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,o){return n.__proto__=o,n},Bt(e,t)}function Za(e){var t=eu();return function(){var n=qe(e),o;if(t){var i=qe(this).constructor;o=Reflect.construct(n,arguments,i)}else o=n.apply(this,arguments);return Ja(this,o)}}function Ja(e,t){if(t&&(se(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Qa(e)}function Qa(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function eu(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function qe(e){return qe=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},qe(e)}bn=Symbol.toStringTag;var Nt=function(e){qa(r,e);var t=Za(r);function r(n,o){return Ya(this,r),t.call(this,n,o,r.defaultProps)}return $a(r,[{key:bn,get:function(){return"Sampler"}}]),r}(O);Nt.defaultProps=dn(dn({},O.defaultProps),{},{type:"color-sampler",addressModeU:"clamp-to-edge",addressModeV:"clamp-to-edge",addressModeW:"clamp-to-edge",magFilter:"nearest",minFilter:"nearest",mipmapFilter:"nearest",lodMinClamp:0,lodMaxClamp:32,compare:"less-equal",maxAnisotropy:1});function pe(e){return pe=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},pe(e)}var Pn;function wn(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function le(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?wn(Object(r),!0).forEach(function(n){tu(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):wn(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function tu(e,t,r){return t=_n(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ru(e,t){return au(e)||iu(e,t)||ou(e,t)||nu()}function nu(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
21
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ou(e,t){if(e){if(typeof e=="string")return On(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return On(e,t)}}function On(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function iu(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,o,i,f,s=[],u=!0,p=!1;try{if(i=(r=r.call(e)).next,t===0){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=i.call(r)).done)&&(s.push(n.value),s.length!==t);u=!0);}catch(g){p=!0,o=g}finally{try{if(!u&&r.return!=null&&(f=r.return(),Object(f)!==f))return}finally{if(p)throw o}}return s}}function au(e){if(Array.isArray(e))return e}function uu(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Sn(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,_n(n.key),n)}}function fu(e,t,r){return t&&Sn(e.prototype,t),r&&Sn(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function _n(e){var t=cu(e,"string");return pe(t)==="symbol"?t:String(t)}function cu(e,t){if(pe(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(pe(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function su(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Ct(e,t)}function Ct(e,t){return Ct=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,o){return n.__proto__=o,n},Ct(e,t)}function lu(e){var t=mu();return function(){var n=Ze(e),o;if(t){var i=Ze(this).constructor;o=Reflect.construct(n,arguments,i)}else o=n.apply(this,arguments);return pu(this,o)}}function pu(e,t){if(t&&(pe(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return yu(e)}function yu(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function mu(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Ze(e){return Ze=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Ze(e)}Pn=Symbol.toStringTag;var Mt=function(e){su(r,e);var t=lu(r);function r(o){var i,f=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return uu(this,r),i=t.call(this,o,f,r.defaultProps),i.width=void 0,i.height=void 0,i.colorAttachments=[],i.depthStencilAttachment=null,i.width=i.props.width,i.height=i.props.height,i}var n=r.prototype;return n.resize=function(i){var f=!i;if(i){var s=Array.isArray(i)?i:[i.width,i.height],u=ru(s,2),p=u[0],g=u[1];f=f||g!==this.height||p!==this.width,this.width=p,this.height=g}f&&(_.log(2,"Resizing framebuffer ".concat(this.id," to ").concat(this.width,"x").concat(this.height))(),this.resizeAttachments(this.width,this.height))},n.autoCreateAttachmentTextures=function(){var i=this;if(this.colorAttachments=this.props.colorAttachments.map(function(s){if(typeof s=="string"){var u=i.createColorTexture(s);return i.attachResource(u),u}return s}),this.props.depthStencilAttachment)if(typeof this.props.depthStencilAttachment=="string"){var f=this.createDepthStencilTexture(this.props.depthStencilAttachment);this.attachResource(f),this.depthStencilAttachment=f}else this.depthStencilAttachment=this.props.depthStencilAttachment},n.createColorTexture=function(i){return this.device.createTexture({id:"color-attachment",usage:F.RENDER_ATTACHMENT,format:i,width:this.width,height:this.height})},n.createDepthStencilTexture=function(i){return this.device.createTexture({id:"depth-stencil-attachment",usage:F.RENDER_ATTACHMENT,format:i,width:this.width,height:this.height})},n.resizeAttachments=function(i,f){for(var s=0;s<this.colorAttachments.length;++s)if(this.colorAttachments[s]){var u=this.device._createTexture(le(le({},this.colorAttachments[s].props),{},{width:i,height:f}));this.destroyAttachedResource(this.colorAttachments[s]),this.colorAttachments[s]=u,this.attachResource(u)}if(this.depthStencilAttachment){var p=this.device._createTexture(le(le({},this.depthStencilAttachment.props),{},{width:i,height:f}));this.destroyAttachedResource(this.depthStencilAttachment),this.depthStencilAttachment=p,this.attachResource(p)}},fu(r,[{key:Pn,get:function(){return"Framebuffer"}}]),r}(O);Mt.defaultProps=le(le({},O.defaultProps),{},{width:1,height:1,colorAttachments:[],depthStencilAttachment:null});function ye(e){return ye=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ye(e)}var An;function Tn(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function jn(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Tn(Object(r),!0).forEach(function(n){hu(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Tn(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function hu(e,t,r){return t=xn(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function du(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function En(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,xn(n.key),n)}}function gu(e,t,r){return t&&En(e.prototype,t),r&&En(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function xn(e){var t=bu(e,"string");return ye(t)==="symbol"?t:String(t)}function bu(e,t){if(ye(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(ye(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function vu(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&kt(e,t)}function kt(e,t){return kt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,o){return n.__proto__=o,n},kt(e,t)}function wu(e){var t=Pu();return function(){var n=Je(e),o;if(t){var i=Je(this).constructor;o=Reflect.construct(n,arguments,i)}else o=n.apply(this,arguments);return Ou(this,o)}}function Ou(e,t){if(t&&(ye(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Su(e)}function Su(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Pu(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Je(e){return Je=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Je(e)}An=Symbol.toStringTag;var Ut=function(e){vu(r,e);var t=wu(r);function r(n,o){var i;return du(this,r),i=t.call(this,n,o,r.defaultProps),i.hash="",i.vs=void 0,i.fs=void 0,i.shaderLayout=void 0,i.bufferLayout=void 0,i.shaderLayout=i.props.shaderLayout,i.bufferLayout=i.props.bufferLayout||[],i}return gu(r,[{key:An,get:function(){return"RenderPipeline"}}]),r}(O);Ut.defaultProps=jn(jn({},O.defaultProps),{},{vs:null,vsEntryPoint:"",vsConstants:{},fs:null,fsEntryPoint:"",fsConstants:{},shaderLayout:null,bufferLayout:[],topology:"triangle-list",parameters:{},vertexCount:0,instanceCount:0,bindings:{},uniforms:{}});function me(e){return me=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},me(e)}var Ln;function Rn(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function In(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Rn(Object(r),!0).forEach(function(n){_u(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Rn(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function _u(e,t,r){return t=Bn(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Tu(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Dn(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Bn(n.key),n)}}function ju(e,t,r){return t&&Dn(e.prototype,t),r&&Dn(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function Bn(e){var t=Eu(e,"string");return me(t)==="symbol"?t:String(t)}function Eu(e,t){if(me(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(me(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Au(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Gt(e,t)}function Gt(e,t){return Gt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,o){return n.__proto__=o,n},Gt(e,t)}function xu(e){var t=Du();return function(){var n=Qe(e),o;if(t){var i=Qe(this).constructor;o=Reflect.construct(n,arguments,i)}else o=n.apply(this,arguments);return Ru(this,o)}}function Ru(e,t){if(t&&(me(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Iu(e)}function Iu(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Du(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Qe(e){return Qe=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Qe(e)}Ln=Symbol.toStringTag;var Ft=function(e){Au(r,e);var t=xu(r);function r(n,o){var i;return Tu(this,r),i=t.call(this,n,o,r.defaultProps),i.hash="",i}return ju(r,[{key:Ln,get:function(){return"ComputePipeline"}}]),r}(O);Ft.defaultProps=In(In({},O.defaultProps),{},{cs:void 0,csEntryPoint:void 0,csConstants:{},shaderLayout:[]});function he(e){return he=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},he(e)}var kn;function Nn(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function Cn(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Nn(Object(r),!0).forEach(function(n){Lu(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Nn(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Lu(e,t,r){return t=Un(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Bu(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Mn(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Un(n.key),n)}}function Nu(e,t,r){return t&&Mn(e.prototype,t),r&&Mn(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function Un(e){var t=Cu(e,"string");return he(t)==="symbol"?t:String(t)}function Cu(e,t){if(he(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(he(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Mu(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&zt(e,t)}function zt(e,t){return zt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,o){return n.__proto__=o,n},zt(e,t)}function ku(e){var t=Fu();return function(){var n=et(e),o;if(t){var i=et(this).constructor;o=Reflect.construct(n,arguments,i)}else o=n.apply(this,arguments);return Uu(this,o)}}function Uu(e,t){if(t&&(he(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Gu(e)}function Gu(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Fu(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function et(e){return et=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},et(e)}kn=Symbol.toStringTag;var Ht=function(e){Mu(r,e);var t=ku(r);function r(n,o){return Bu(this,r),t.call(this,n,o,r.defaultProps)}return Nu(r,[{key:kn,get:function(){return"RenderPass"}}]),r}(O);Ht.defaultProps=Cn(Cn({},O.defaultProps),{},{framebuffer:null,parameters:void 0,clearColor:[0,0,0,0],clearDepth:1,clearStencil:0,depthReadOnly:!1,stencilReadOnly:!1,discard:!1});function de(e){return de=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},de(e)}var zn;function Gn(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function zu(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Gn(Object(r),!0).forEach(function(n){Hu(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Gn(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Hu(e,t,r){return t=Hn(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Vu(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Fn(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Hn(n.key),n)}}function Wu(e,t,r){return t&&Fn(e.prototype,t),r&&Fn(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function Hn(e){var t=Ku(e,"string");return de(t)==="symbol"?t:String(t)}function Ku(e,t){if(de(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(de(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Yu(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Vt(e,t)}function Vt(e,t){return Vt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,o){return n.__proto__=o,n},Vt(e,t)}function $u(e){var t=Zu();return function(){var n=tt(e),o;if(t){var i=tt(this).constructor;o=Reflect.construct(n,arguments,i)}else o=n.apply(this,arguments);return Xu(this,o)}}function Xu(e,t){if(t&&(de(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return qu(e)}function qu(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Zu(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function tt(e){return tt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},tt(e)}zn=Symbol.toStringTag;var Wt=function(e){Yu(r,e);var t=$u(r);function r(n,o){return Vu(this,r),t.call(this,n,o,O.defaultProps)}return Wu(r,[{key:zn,get:function(){return"ComputePass"}}]),r}(O);Wt.defaultProps=zu({},O.defaultProps);function ge(e){return ge=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ge(e)}var Yn;function Vn(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function Wn(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Vn(Object(r),!0).forEach(function(n){Ju(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Vn(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Ju(e,t,r){return t=$n(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Qu(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Kn(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,$n(n.key),n)}}function ef(e,t,r){return t&&Kn(e.prototype,t),r&&Kn(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function $n(e){var t=tf(e,"string");return ge(t)==="symbol"?t:String(t)}function tf(e,t){if(ge(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(ge(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function rf(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Kt(e,t)}function Kt(e,t){return Kt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,o){return n.__proto__=o,n},Kt(e,t)}function nf(e){var t=uf();return function(){var n=rt(e),o;if(t){var i=rt(this).constructor;o=Reflect.construct(n,arguments,i)}else o=n.apply(this,arguments);return of(this,o)}}function of(e,t){if(t&&(ge(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return af(e)}function af(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function uf(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function rt(e){return rt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},rt(e)}Yn=Symbol.toStringTag;var Yt=function(e){rf(r,e);var t=nf(r);function r(o,i){return Qu(this,r),t.call(this,o,i,r.defaultProps)}var n=r.prototype;return n.pushDebugGroup=function(i){},n.popDebugGroup=function(){},n.insertDebugMarker=function(i){},ef(r,[{key:Yn,get:function(){return"CommandEncoder"}}]),r}(O);Yt.defaultProps=Wn(Wn({},O.defaultProps),{},{measureExecutionTime:void 0});function be(e){return be=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},be(e)}var Zn;function Xn(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function ff(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Xn(Object(r),!0).forEach(function(n){cf(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Xn(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function cf(e,t,r){return t=Jn(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function sf(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function qn(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Jn(n.key),n)}}function lf(e,t,r){return t&&qn(e.prototype,t),r&&qn(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function Jn(e){var t=pf(e,"string");return be(t)==="symbol"?t:String(t)}function pf(e,t){if(be(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(be(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function yf(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&$t(e,t)}function $t(e,t){return $t=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,o){return n.__proto__=o,n},$t(e,t)}function mf(e){var t=gf();return function(){var n=nt(e),o;if(t){var i=nt(this).constructor;o=Reflect.construct(n,arguments,i)}else o=n.apply(this,arguments);return hf(this,o)}}function hf(e,t){if(t&&(be(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return df(e)}function df(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function gf(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function nt(e){return nt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},nt(e)}Zn=Symbol.toStringTag;var Xt=function(e){yf(r,e);var t=mf(r);function r(n,o){return sf(this,r),t.call(this,n,o,r.defaultProps)}return lf(r,[{key:Zn,get:function(){return"CommandBuffer"}}]),r}(O);Xt.defaultProps=ff({},O.defaultProps);function bf(e,t){return Sf(e)||Of(e,t)||wf(e,t)||vf()}function vf(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
22
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function wf(e,t){if(e){if(typeof e=="string")return Qn(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Qn(e,t)}}function Qn(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Of(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,o,i,f,s=[],u=!0,p=!1;try{if(i=(r=r.call(e)).next,t===0){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=i.call(r)).done)&&(s.push(n.value),s.length!==t);u=!0);}catch(g){p=!0,o=g}finally{try{if(!u&&r.return!=null&&(f=r.return(),Object(f)!==f))return}finally{if(p)throw o}}return s}}function Sf(e){if(Array.isArray(e))return e}function ot(e){var t=bf(_f[e],2),r=t[0],n=t[1],o=r==="i32"||r==="u32",i=r!=="u32",f=Tf[r]*n,s=Pf(r,n);return{dataType:r,components:n,defaultVertexFormat:s,byteLength:f,integer:o,signed:i}}function Pf(e,t){var r;switch(e){case"f32":r="float32";break;case"i32":r="sint32";break;case"u32":r="uint32";break;case"f16":return t<=2?"float16x2":"float16x4"}return t===1?r:"".concat(r,"x").concat(t)}var _f={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]},Tf={f32:4,f16:2,i32:4,u32:4};function it(e){var t=eo[e],r=jf(t),n=e.includes("norm"),o=!n&&!e.startsWith("float"),i=e.startsWith("s");return{dataType:eo[e],byteLength:r,integer:o,signed:i,normalized:n}}function jf(e){var t=Ef[e];return t}var eo={uint8:"uint8",sint8:"sint8",unorm8:"uint8",snorm8:"sint8",uint16:"uint16",sint16:"sint16",unorm16:"uint16",snorm16:"sint16",float16:"float16",float32:"float32",uint32:"uint32",sint32:"sint32"},Ef={uint8:1,sint8:1,uint16:2,sint16:2,float16:2,float32:4,uint32:4,sint32:4};function Af(e,t){return Df(e)||If(e,t)||Rf(e,t)||xf()}function xf(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
23
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Rf(e,t){if(e){if(typeof e=="string")return to(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return to(e,t)}}function to(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function If(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,o,i,f,s=[],u=!0,p=!1;try{if(i=(r=r.call(e)).next,t===0){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=i.call(r)).done)&&(s.push(n.value),s.length!==t);u=!0);}catch(g){p=!0,o=g}finally{try{if(!u&&r.return!=null&&(f=r.return(),Object(f)!==f))return}finally{if(p)throw o}}return s}}function Df(e){if(Array.isArray(e))return e}function Re(e){var t;e.endsWith("-webgl")&&(e.replace("-webgl",""),t=!0);var r=e.split("x"),n=Af(r,2),o=n[0],i=n[1],f=o,s=i?parseInt(i):1,u=it(f),p={type:f,components:s,byteLength:u.byteLength*s,integer:u.integer,signed:u.signed,normalized:u.normalized};return t&&(p.webglOnly=!0),p}function Ie(e){return Ie=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ie(e)}function ro(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function qt(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?ro(Object(r),!0).forEach(function(n){Lf(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ro(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Lf(e,t,r){return t=Bf(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Bf(e){var t=Nf(e,"string");return Ie(t)==="symbol"?t:String(t)}function Nf(e,t){if(Ie(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Ie(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function ve(e,t){var r=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=Cf(e))||t&&e&&typeof e.length=="number"){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(p){throw p},f:o}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
24
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var i=!0,f=!1,s;return{s:function(){r=r.call(e)},n:function(){var p=r.next();return i=p.done,p},e:function(p){f=!0,s=p},f:function(){try{!i&&r.return!=null&&r.return()}finally{if(f)throw s}}}}function Cf(e,t){if(e){if(typeof e=="string")return no(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return no(e,t)}}function no(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Zt(e,t){var r={},n=ve(e.attributes),o;try{for(n.s();!(o=n.n()).done;){var i=o.value;r[i.name]=Mf(e,t,i.name)}}catch(f){n.e(f)}finally{n.f()}return r}function oo(e,t){for(var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:16,n=Zt(e,t),o=new Array(r).fill(null),i=0,f=Object.values(n);i<f.length;i++){var s=f[i];o[s.location]=s}return o}function Mf(e,t,r){var n=kf(e,r),o=Uf(t,r);if(!n)return null;var i=ot(n.type),f=o?.vertexFormat||i.defaultVertexFormat,s=Re(f);return{attributeName:o?.attributeName||n.name,bufferName:o?.bufferName||n.name,location:n.location,shaderType:n.type,shaderDataType:i.dataType,shaderComponents:i.components,vertexFormat:f,bufferDataType:s.type,bufferComponents:s.components,normalized:s.normalized,integer:i.integer,stepMode:o?.stepMode||n.stepMode,byteOffset:o?.byteOffset||0,byteStride:o?.byteStride||0}}function kf(e,t){var r=e.attributes.find(function(n){return n.name===t});return r||_.warn('shader layout attribute "'.concat(t,'" not present in shader')),r||null}function Uf(e,t){Gf(e);var r=Ff(e,t);return r||(r=zf(e,t),r)?r:(_.warn('layout for attribute "'.concat(t,'" not present in buffer layout')),null)}function Gf(e){var t=ve(e),r;try{for(t.s();!(r=t.n()).done;){var n=r.value;(n.attributes&&n.format||!n.attributes&&!n.format)&&_.warn("BufferLayout ".concat(name," must have either 'attributes' or 'format' field"))}}catch(o){t.e(o)}finally{t.f()}}function Ff(e,t){var r=ve(e),n;try{for(r.s();!(n=r.n()).done;){var o=n.value;if(o.format&&o.name===t)return{attributeName:o.name,bufferName:t,stepMode:o.stepMode,vertexFormat:o.format,byteOffset:0,byteStride:o.byteStride||0}}}catch(i){r.e(i)}finally{r.f()}return null}function zf(e,t){var r=ve(e),n;try{for(r.s();!(n=r.n()).done;){var o,i=n.value,f=i.byteStride;if(typeof i.byteStride!="number"){var s=ve(i.attributes||[]),u;try{for(s.s();!(u=s.n()).done;){var p=u.value,g=Re(p.format);f+=g.byteLength}}catch(v){s.e(v)}finally{s.f()}}var b=(o=i.attributes)===null||o===void 0?void 0:o.find(function(v){return v.attribute===t});if(b)return{attributeName:b.attribute,bufferName:i.name,stepMode:i.stepMode,vertexFormat:b.format,byteOffset:b.byteOffset,byteStride:f}}}catch(v){r.e(v)}finally{r.f()}return null}function io(e,t){var r=qt(qt({},e),{},{attributes:e.attributes.map(function(f){return qt({},f)})}),n=ve(t?.attributes||[]),o;try{var i=function(){var s=o.value,u=r.attributes.find(function(p){return p.name===s.name});u?(u.type=s.type||u.type,u.stepMode=s.stepMode||u.stepMode):_.warn("shader layout attribute ".concat(s.name," not present in shader"))};for(n.s();!(o=n.n()).done;)i()}catch(f){n.e(f)}finally{n.f()}return r}function we(e){return we=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},we(e)}var co;function ao(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function uo(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?ao(Object(r),!0).forEach(function(n){Hf(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ao(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Hf(e,t,r){return t=so(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Vf(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function fo(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,so(n.key),n)}}function Wf(e,t,r){return t&&fo(e.prototype,t),r&&fo(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function so(e){var t=Kf(e,"string");return we(t)==="symbol"?t:String(t)}function Kf(e,t){if(we(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(we(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Yf(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Jt(e,t)}function Jt(e,t){return Jt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,o){return n.__proto__=o,n},Jt(e,t)}function $f(e){var t=Zf();return function(){var n=at(e),o;if(t){var i=at(this).constructor;o=Reflect.construct(n,arguments,i)}else o=n.apply(this,arguments);return Xf(this,o)}}function Xf(e,t){if(t&&(we(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return qf(e)}function qf(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Zf(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function at(e){return at=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},at(e)}co=Symbol.toStringTag;var Qt=function(e){Yf(r,e);var t=$f(r);function r(n,o){var i;return Vf(this,r),i=t.call(this,n,o,r.defaultProps),i.maxVertexAttributes=void 0,i.attributeInfos=void 0,i.indexBuffer=null,i.attributes=void 0,i.maxVertexAttributes=n.limits.maxVertexAttributes,i.attributes=new Array(i.maxVertexAttributes).fill(null),i.attributeInfos=oo(o.renderPipeline.shaderLayout,o.renderPipeline.bufferLayout,i.maxVertexAttributes),i}return Wf(r,[{key:co,get:function(){return"VertexArray"}}]),r}(O);Qt.defaultProps=uo(uo({},O.defaultProps),{},{renderPipeline:null});function Oe(e){return Oe=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Oe(e)}var mo;function lo(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function po(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?lo(Object(r),!0).forEach(function(n){Jf(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):lo(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Jf(e,t,r){return t=ho(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Qf(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function yo(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,ho(n.key),n)}}function ec(e,t,r){return t&&yo(e.prototype,t),r&&yo(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function ho(e){var t=tc(e,"string");return Oe(t)==="symbol"?t:String(t)}function tc(e,t){if(Oe(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Oe(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function rc(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&er(e,t)}function er(e,t){return er=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,o){return n.__proto__=o,n},er(e,t)}function nc(e){var t=ac();return function(){var n=ut(e),o;if(t){var i=ut(this).constructor;o=Reflect.construct(n,arguments,i)}else o=n.apply(this,arguments);return oc(this,o)}}function oc(e,t){if(t&&(Oe(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return ic(e)}function ic(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ac(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function ut(e){return ut=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},ut(e)}mo=Symbol.toStringTag;var tr=function(e){rc(r,e);var t=nc(r);function r(n,o){return Qf(this,r),t.call(this,n,o,r.defaultProps)}return ec(r,[{key:mo,get:function(){return"TransformFeedback"}}]),r}(O);tr.defaultProps=po(po({},O.defaultProps),{},{layout:void 0,buffers:{}});var uc={f32:{type:"f32",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<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}};function ft(e){var t=uc[e];return ae(e),t}function go(e,t){switch(t){case 1:return e;case 2:return e+e%2;default:return e+(4-e%4)%4}}var ct;function De(e){return(!ct||ct.byteLength<e)&&(ct=new ArrayBuffer(e)),ct}function bo(e,t){var r=De(e.BYTES_PER_ELEMENT*t);return new e(r,0,t)}function vo(e){for(var t=e.target,r=e.source,n=e.start,o=n===void 0?0:n,i=e.count,f=i===void 0?1:i,s=r.length,u=f*s,p=0,g=o;p<s;p++)t[g++]=r[p];for(;p<u;)p<u-p?(t.copyWithin(o+p,o,o+p),p*=2):(t.copyWithin(o+p,o,o+u-p),p=u);return e.target}function Le(e){return Le=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Le(e)}function wo(e,t){return lc(e)||sc(e,t)||cc(e,t)||fc()}function fc(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
25
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function cc(e,t){if(e){if(typeof e=="string")return Oo(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Oo(e,t)}}function Oo(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function sc(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,o,i,f,s=[],u=!0,p=!1;try{if(i=(r=r.call(e)).next,t===0){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=i.call(r)).done)&&(s.push(n.value),s.length!==t);u=!0);}catch(g){p=!0,o=g}finally{try{if(!u&&r.return!=null&&(f=r.return(),Object(f)!==f))return}finally{if(p)throw o}}return s}}function lc(e){if(Array.isArray(e))return e}function So(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,yc(n.key),n)}}function pc(e,t,r){return t&&So(e.prototype,t),r&&So(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function yc(e){var t=mc(e,"string");return Le(t)==="symbol"?t:String(t)}function mc(e,t){if(Le(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Le(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function hc(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var Po=1024,st=function(){function e(r){hc(this,e),this.layout={},this.byteLength=void 0;for(var n=0,o=0,i=Object.entries(r);o<i.length;o++){var f=wo(i[o],2),s=f[0],u=f[1],p=ft(u),g=p.type,b=p.components;n=go(n,b);var v=n;n+=b,this.layout[s]={type:g,size:b,offset:v}}n+=(4-n%4)%4;var T=n*4;this.byteLength=Math.max(T,Po)}var t=e.prototype;return t.getData=function(n){for(var o=Math.max(this.byteLength,Po),i=De(o),f={i32:new Int32Array(i),u32:new Uint32Array(i),f32:new Float32Array(i),f16:new Uint16Array(i)},s=0,u=Object.entries(n);s<u.length;s++){var p=wo(u[s],2),g=p[0],b=p[1],v=this.layout[g];if(!v){_.warn("Supplied uniform value ".concat(g," not present in uniform block layout"))();continue}var T=v.type,P=v.size,D=v.offset,L=f[T];if(P===1){if(typeof b!="number"&&typeof b!="boolean"){_.warn("Supplied value for single component uniform ".concat(g," is not a number: ").concat(b))();continue}L[D]=Number(b)}else{var I=z(b);if(!I){_.warn("Supplied value for multi component / array uniform ".concat(g," is not a numeric array: ").concat(b))();continue}L.set(I,D)}}return new Uint8Array(i)},t.has=function(n){return Boolean(this.layout[n])},t.get=function(n){var o=this.layout[n];return o},pc(e)}();function _o(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:16;if(e!==t)return!1;var n=z(e);if(!n)return!1;var o=z(t);if(o&&n.length===o.length){for(var i=0;i<n.length;++i)if(o[i]!==n[i])return!1}return!0}function To(e){var t=z(e);return t?t.slice():e}function Be(e){return Be=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Be(e)}function dc(e,t){return vc(e)||bc(e,t)||Ao(e,t)||gc()}function gc(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
26
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function bc(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,o,i,f,s=[],u=!0,p=!1;try{if(i=(r=r.call(e)).next,t===0){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=i.call(r)).done)&&(s.push(n.value),s.length!==t);u=!0);}catch(g){p=!0,o=g}finally{try{if(!u&&r.return!=null&&(f=r.return(),Object(f)!==f))return}finally{if(p)throw o}}return s}}function vc(e){if(Array.isArray(e))return e}function wc(e,t){var r=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=Ao(e))||t&&e&&typeof e.length=="number"){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(p){throw p},f:o}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
27
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var i=!0,f=!1,s;return{s:function(){r=r.call(e)},n:function(){var p=r.next();return i=p.done,p},e:function(p){f=!0,s=p},f:function(){try{!i&&r.return!=null&&r.return()}finally{if(f)throw s}}}}function Ao(e,t){if(e){if(typeof e=="string")return jo(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return jo(e,t)}}function jo(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Eo(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Sc(n.key),n)}}function Oc(e,t,r){return t&&Eo(e.prototype,t),r&&Eo(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function Sc(e){var t=Pc(e,"string");return Be(t)==="symbol"?t:String(t)}function Pc(e,t){if(Be(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Be(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function _c(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var lt=function(){function e(r){if(_c(this,e),this.name=void 0,this.uniforms={},this.modifiedUniforms={},this.modified=!0,this.bindingLayout={},this.needsRedraw="initialized",this.name=r?.name,r!=null&&r.name&&r!==null&&r!==void 0&&r.shaderLayout){var n,o=r==null||(n=r.shaderLayout.bindings)===null||n===void 0?void 0:n.find(function(p){return p.type==="uniform"&&p.name===r?.name});if(!o)throw new Error(r?.name);var i=o,f=wc(i.uniforms||[]),s;try{for(f.s();!(s=f.n()).done;){var u=s.value;this.bindingLayout[u.name]=u}}catch(p){f.e(p)}finally{f.f()}}}var t=e.prototype;return t.setUniforms=function(n){for(var o=0,i=Object.entries(n);o<i.length;o++){var f=dc(i[o],2),s=f[0],u=f[1];this._setUniform(s,u),this.needsRedraw||this.setNeedsRedraw("".concat(this.name,".").concat(s,"=").concat(u))}},t.setNeedsRedraw=function(n){this.needsRedraw=this.needsRedraw||n},t.getAllUniforms=function(){return this.modifiedUniforms={},this.needsRedraw=!1,this.uniforms||{}},t._setUniform=function(n,o){_o(this.uniforms[n],o)||(this.uniforms[n]=To(o),this.modifiedUniforms[n]=!0,this.modified=!0)},Oc(e)}();function Ne(e){return Ne=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ne(e)}function Tc(e,t){var r=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=Do(e))||t&&e&&typeof e.length=="number"){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(p){throw p},f:o}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
28
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var i=!0,f=!1,s;return{s:function(){r=r.call(e)},n:function(){var p=r.next();return i=p.done,p},e:function(p){f=!0,s=p},f:function(){try{!i&&r.return!=null&&r.return()}finally{if(f)throw s}}}}function xo(e,t){return Ac(e)||Ec(e,t)||Do(e,t)||jc()}function jc(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
29
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Do(e,t){if(e){if(typeof e=="string")return Ro(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Ro(e,t)}}function Ro(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Ec(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,o,i,f,s=[],u=!0,p=!1;try{if(i=(r=r.call(e)).next,t===0){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=i.call(r)).done)&&(s.push(n.value),s.length!==t);u=!0);}catch(g){p=!0,o=g}finally{try{if(!u&&r.return!=null&&(f=r.return(),Object(f)!==f))return}finally{if(p)throw o}}return s}}function Ac(e){if(Array.isArray(e))return e}function Io(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Rc(n.key),n)}}function xc(e,t,r){return t&&Io(e.prototype,t),r&&Io(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function Rc(e){var t=Ic(e,"string");return Ne(t)==="symbol"?t:String(t)}function Ic(e,t){if(Ne(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Ne(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Dc(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var Lo=function(){function e(r){Dc(this,e),this.uniformBlocks=new Map,this.uniformBufferLayouts=new Map,this.uniformBuffers=new Map;for(var n=0,o=Object.entries(r);n<o.length;n++){var i=xo(o[n],2),f=i[0],s=i[1],u=f,p=new st(s.uniformTypes||{});this.uniformBufferLayouts.set(u,p);var g=new lt({name:f});g.setUniforms(s.defaultUniforms||{}),this.uniformBlocks.set(u,g)}}var t=e.prototype;return t.destroy=function(){for(var n=0,o=Object.values(this.uniformBuffers);n<o.length;n++){var i=o[n];i.destroy()}},t.setUniforms=function(n){for(var o=0,i=Object.entries(n);o<i.length;o++){var f=xo(i[o],2),s=f[0],u=f[1];this.uniformBlocks.get(s).setUniforms(u)}this.updateUniformBuffers()},t.getUniformBufferByteLength=function(n){return this.uniformBufferLayouts.get(n).byteLength},t.getUniformBufferData=function(n){var o=this.uniformBlocks.get(n).getAllUniforms();return this.uniformBufferLayouts.get(n).getData(o)},t.createUniformBuffer=function(n,o,i){i&&this.setUniforms(i);var f=this.getUniformBufferByteLength(o),s=n.createBuffer({usage:R.UNIFORM|R.COPY_DST,byteLength:f}),u=this.getUniformBufferData(o);return s.write(u),s},t.getManagedUniformBuffer=function(n,o){if(!this.uniformBuffers.get(o)){var i=this.getUniformBufferByteLength(o),f=n.createBuffer({usage:R.UNIFORM|R.COPY_DST,byteLength:i});this.uniformBuffers.set(o,f)}return this.uniformBuffers.get(o)},t.updateUniformBuffers=function(){var n=!1,o=Tc(this.uniformBlocks.keys()),i;try{for(o.s();!(i=o.n()).done;){var f=i.value,s=this.updateUniformBuffer(f);n||(n=s)}}catch(u){o.e(u)}finally{o.f()}return n&&_.log(3,"UniformStore.updateUniformBuffers(): ".concat(n))(),n},t.updateUniformBuffer=function(n){var o=this.uniformBlocks.get(n),i=this.uniformBuffers.get(n),f=!1;if(i&&o.needsRedraw){f||(f=o.needsRedraw);var s=this.getUniformBufferData(n),u=this.uniformBuffers.get(n);u.write(s);var p=this.uniformBlocks.get(n).getAllUniforms();_.log(4,"Writing to uniform buffer ".concat(String(n)),s,p)()}return f},xc(e)}();function Ce(e){return Ce=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ce(e)}function Bo(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function Lc(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Bo(Object(r),!0).forEach(function(n){Bc(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Bo(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Bc(e,t,r){return t=Nc(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Nc(e){var t=Cc(e,"string");return Ce(t)==="symbol"?t:String(t)}function Cc(e,t){if(Ce(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Ce(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Mc(e,t){return Fc(e)||Gc(e,t)||Uc(e,t)||kc()}function kc(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
30
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Uc(e,t){if(e){if(typeof e=="string")return No(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return No(e,t)}}function No(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Gc(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,o,i,f,s=[],u=!0,p=!1;try{if(i=(r=r.call(e)).next,t===0){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=i.call(r)).done)&&(s.push(n.value),s.length!==t);u=!0);}catch(g){p=!0,o=g}finally{try{if(!u&&r.return!=null&&(f=r.return(),Object(f)!==f))return}finally{if(p)throw o}}return s}}function Fc(e){if(Array.isArray(e))return e}var zc=/^(rg?b?a?)([0-9]*)([a-z]*)(-srgb)?(-webgl|-unsized)?$/;function Co(e){var t=zc.exec(e);if(t){var r=Mc(t,6),n=r[1],o=r[2],i=r[3],f=r[4],s=r[5];if(n){var u="".concat(i).concat(o),p=it(u);return Lc({format:n,components:n.length,srgb:f==="-srgb",unsized:s==="-unsized",webgl:s==="-webgl"},p)}}return Vc(e)}var Hc={"rgba4unorm-webgl":{format:"rgba",bpp:2},"rgb565unorm-webgl":{format:"rgb",bpp:2},"rgb5a1unorm-webgl":{format:"rgba",bbp:2},rgb9e5ufloat:{format:"rgb",bbp:4},rg11b10ufloat:{format:"rgb",bbp:4},rgb10a2unorm:{format:"rgba",bbp:4},"rgb10a2unorm-webgl":{format:"rgba",bbp:4},stencil8:{components:1,bpp:1,a:"stencil"},depth16unorm:{components:1,bpp:2,a:"depth"},depth24plus:{components:1,bpp:3,a:"depth"},depth32float:{components:1,bpp:4,a:"depth"},"depth24plus-stencil8":{components:2,bpp:4,a:"depth-stencil"},"depth24unorm-stencil8":{components:2,bpp:4,a:"depth-stencil"},"depth32float-stencil8":{components:2,bpp:4,a:"depth-stencil"}};function Vc(e){var t,r=Hc[e];if(!r)throw new Error("Unknown format ".concat(e));return{format:r.format||"",components:r.components||((t=r.format)===null||t===void 0?void 0:t.length)||1,byteLength:r.bpp||1,srgb:!1,unsized:!1}}function rr(e){var t=ArrayBuffer.isView(e)?e.constructor:e;switch(t){case Float32Array:return"float32";case Uint16Array:return"uint16";case Uint32Array:return"uint32";case Uint8Array:case Uint8ClampedArray:return"uint8";case Int8Array:return"sint8";case Int16Array:return"sint16";case Int32Array:return"sint32";default:throw new Error(t.constructor.name)}}function Mo(e){switch(e){case"float32":return Float32Array;case"uint32":return Uint32Array;case"sint32":return Int32Array;case"uint16":case"unorm16":return Uint16Array;case"sint16":case"snorm16":return Int16Array;case"uint8":case"unorm8":return Uint8Array;case"sint8":case"snorm8":return Int8Array;default:throw new Error(e)}}function ko(e,t,r){if(!t||t>4)throw new Error("size ".concat(t));var n=t,o=rr(e);if(o==="uint8"||o==="sint8"){if(n===1||n===3)throw new Error("size: ".concat(t));return r&&(o=o.replace("int","norm")),"".concat(o,"x").concat(n)}if(o==="uint16"||o==="sint16"){if(n===1||n===3)throw new Error("size: ".concat(t));return r&&(o=o.replace("int","norm")),"".concat(o,"x").concat(n)}return n===1?o:"".concat(o,"x").concat(n)}function Uo(e){return e}function nr(e){return z(e)!==null||typeof e=="number"||typeof e=="boolean"}function Go(e){var t={bindings:{},uniforms:{}};return Object.keys(e).forEach(function(r){var n=e[r];nr(n)?t.uniforms[r]=n:t.bindings[r]=n}),t}function Wc(e){for(var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=t.maxElts,n=r===void 0?16:r,o=t.size,i=o===void 0?1:o,f="[",s=0;s<e.length&&s<n;++s)s>0&&(f+=",".concat(s%i===0?" ":"")),f+=or(e[s],t);var u=e.length>n?"...":"]";return"".concat(f).concat(u)}function or(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=1e-16,n=t.isInteger,o=n===void 0?!1:n;if(Array.isArray(e)||ArrayBuffer.isView(e))return Wc(e,t);if(typeof e!="number")return String(e);if(Math.abs(e)<r)return o?"0":"0.";if(o||Math.abs(e)>100&&Math.abs(e)<1e4)return e.toFixed(0);var i=e.toPrecision(2),f=i.indexOf(".0");return f===i.length-2?i.slice(0,-1):i}function Fo(e,t,r,n){var o="See luma.gl ".concat(r," Upgrade Guide at https://luma.gl/docs/upgrade-guide"),i=Object.getPrototypeOf(e);n.forEach(function(f){i.methodName||(i[f]=function(){throw _.removed("Calling removed method ".concat(t,".").concat(f,": "),o)(),new Error(f)})})}function Kc(e,t){return qc(e)||Xc(e,t)||$c(e,t)||Yc()}function Yc(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
31
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function $c(e,t){if(e){if(typeof e=="string")return zo(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return zo(e,t)}}function zo(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Xc(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,o,i,f,s=[],u=!0,p=!1;try{if(i=(r=r.call(e)).next,t===0){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=i.call(r)).done)&&(s.push(n.value),s.length!==t);u=!0);}catch(g){p=!0,o=g}finally{try{if(!u&&r.return!=null&&(f=r.return(),Object(f)!==f))return}finally{if(p)throw o}}return s}}function qc(e){if(Array.isArray(e))return e}function Ho(e,t,r){var n=r.removedProps,o=n===void 0?{}:n,i=r.deprecatedProps,f=i===void 0?{}:i,s=r.replacedProps,u=s===void 0?{}:s;for(var p in o)if(p in t){var g=o[p],b=g?"".concat(e,".").concat(o[p]):"N/A";_.removed("".concat(e,".").concat(p),b)()}for(var v in f)if(v in t){var T=f[v];_.deprecated("".concat(e,".").concat(v),"".concat(e,".").concat(T))()}for(var P=null,D=0,L=Object.entries(u);D<L.length;D++){var I=Kc(L[D],2),E=I[0],M=I[1];E in t&&(_.deprecated("".concat(e,".").concat(E),"".concat(e,".").concat(M))(),P=P||Object.assign({},t),P[M]=t[E],delete P[E])}return P||t}function ir(e){return ir=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ir(e)}function H(){"use strict";H=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(l,a,c){l[a]=c.value},o=typeof Symbol=="function"?Symbol:{},i=o.iterator||"@@iterator",f=o.asyncIterator||"@@asyncIterator",s=o.toStringTag||"@@toStringTag";function u(l,a,c){return Object.defineProperty(l,a,{value:c,enumerable:!0,configurable:!0,writable:!0}),l[a]}try{u({},"")}catch{u=function(c,y,h){return c[y]=h}}function p(l,a,c,y){var h=a&&a.prototype instanceof v?a:v,m=Object.create(h.prototype),d=new U(y||[]);return n(m,"_invoke",{value:Se(l,c,d)}),m}function g(l,a,c){try{return{type:"normal",arg:l.call(a,c)}}catch(y){return{type:"throw",arg:y}}}e.wrap=p;var b={};function v(){}function T(){}function P(){}var D={};u(D,i,function(){return this});var L=Object.getPrototypeOf,I=L&&L(L(G([])));I&&I!==t&&r.call(I,i)&&(D=I);var E=P.prototype=v.prototype=Object.create(D);function M(l){["next","throw","return"].forEach(function(a){u(l,a,function(c){return this._invoke(a,c)})})}function N(l,a){function c(h,m,d,w){var S=g(l[h],l,m);if(S.type!=="throw"){var A=S.arg,j=A.value;return j&&ir(j)=="object"&&r.call(j,"__await")?a.resolve(j.__await).then(function(x){c("next",x,d,w)},function(x){c("throw",x,d,w)}):a.resolve(j).then(function(x){A.value=x,d(A)},function(x){return c("throw",x,d,w)})}w(S.arg)}var y;n(this,"_invoke",{value:function(m,d){function w(){return new a(function(S,A){c(m,d,S,A)})}return y=y?y.then(w,w):w()}})}function Se(l,a,c){var y="suspendedStart";return function(h,m){if(y==="executing")throw new Error("Generator is already running");if(y==="completed"){if(h==="throw")throw m;return W()}for(c.method=h,c.arg=m;;){var d=c.delegate;if(d){var w=V(d,c);if(w){if(w===b)continue;return w}}if(c.method==="next")c.sent=c._sent=c.arg;else if(c.method==="throw"){if(y==="suspendedStart")throw y="completed",c.arg;c.dispatchException(c.arg)}else c.method==="return"&&c.abrupt("return",c.arg);y="executing";var S=g(l,a,c);if(S.type==="normal"){if(y=c.done?"completed":"suspendedYield",S.arg===b)continue;return{value:S.arg,done:c.done}}S.type==="throw"&&(y="completed",c.method="throw",c.arg=S.arg)}}}function V(l,a){var c=a.method,y=l.iterator[c];if(y===void 0)return a.delegate=null,c==="throw"&&l.iterator.return&&(a.method="return",a.arg=void 0,V(l,a),a.method==="throw")||c!=="return"&&(a.method="throw",a.arg=new TypeError("The iterator does not provide a '"+c+"' method")),b;var h=g(y,l.iterator,a.arg);if(h.type==="throw")return a.method="throw",a.arg=h.arg,a.delegate=null,b;var m=h.arg;return m?m.done?(a[l.resultName]=m.value,a.next=l.nextLoc,a.method!=="return"&&(a.method="next",a.arg=void 0),a.delegate=null,b):m:(a.method="throw",a.arg=new TypeError("iterator result is not an object"),a.delegate=null,b)}function Pe(l){var a={tryLoc:l[0]};1 in l&&(a.catchLoc=l[1]),2 in l&&(a.finallyLoc=l[2],a.afterLoc=l[3]),this.tryEntries.push(a)}function k(l){var a=l.completion||{};a.type="normal",delete a.arg,l.completion=a}function U(l){this.tryEntries=[{tryLoc:"root"}],l.forEach(Pe,this),this.reset(!0)}function G(l){if(l){var a=l[i];if(a)return a.call(l);if(typeof l.next=="function")return l;if(!isNaN(l.length)){var c=-1,y=function h(){for(;++c<l.length;)if(r.call(l,c))return h.value=l[c],h.done=!1,h;return h.value=void 0,h.done=!0,h};return y.next=y}}return{next:W}}function W(){return{value:void 0,done:!0}}return T.prototype=P,n(E,"constructor",{value:P,configurable:!0}),n(P,"constructor",{value:T,configurable:!0}),T.displayName=u(P,s,"GeneratorFunction"),e.isGeneratorFunction=function(l){var a=typeof l=="function"&&l.constructor;return!!a&&(a===T||(a.displayName||a.name)==="GeneratorFunction")},e.mark=function(l){return Object.setPrototypeOf?Object.setPrototypeOf(l,P):(l.__proto__=P,u(l,s,"GeneratorFunction")),l.prototype=Object.create(E),l},e.awrap=function(l){return{__await:l}},M(N.prototype),u(N.prototype,f,function(){return this}),e.AsyncIterator=N,e.async=function(l,a,c,y,h){h===void 0&&(h=Promise);var m=new N(p(l,a,c,y),h);return e.isGeneratorFunction(a)?m:m.next().then(function(d){return d.done?d.value:m.next()})},M(E),u(E,s,"Generator"),u(E,i,function(){return this}),u(E,"toString",function(){return"[object Generator]"}),e.keys=function(l){var a=Object(l),c=[];for(var y in a)c.push(y);return c.reverse(),function h(){for(;c.length;){var m=c.pop();if(m in a)return h.value=m,h.done=!1,h}return h.done=!0,h}},e.values=G,U.prototype={constructor:U,reset:function(a){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(k),!a)for(var c in this)c.charAt(0)==="t"&&r.call(this,c)&&!isNaN(+c.slice(1))&&(this[c]=void 0)},stop:function(){this.done=!0;var a=this.tryEntries[0].completion;if(a.type==="throw")throw a.arg;return this.rval},dispatchException:function(a){if(this.done)throw a;var c=this;function y(A,j){return d.type="throw",d.arg=a,c.next=A,j&&(c.method="next",c.arg=void 0),!!j}for(var h=this.tryEntries.length-1;h>=0;--h){var m=this.tryEntries[h],d=m.completion;if(m.tryLoc==="root")return y("end");if(m.tryLoc<=this.prev){var w=r.call(m,"catchLoc"),S=r.call(m,"finallyLoc");if(w&&S){if(this.prev<m.catchLoc)return y(m.catchLoc,!0);if(this.prev<m.finallyLoc)return y(m.finallyLoc)}else if(w){if(this.prev<m.catchLoc)return y(m.catchLoc,!0)}else{if(!S)throw new Error("try statement without catch or finally");if(this.prev<m.finallyLoc)return y(m.finallyLoc)}}}},abrupt:function(a,c){for(var y=this.tryEntries.length-1;y>=0;--y){var h=this.tryEntries[y];if(h.tryLoc<=this.prev&&r.call(h,"finallyLoc")&&this.prev<h.finallyLoc){var m=h;break}}m&&(a==="break"||a==="continue")&&m.tryLoc<=c&&c<=m.finallyLoc&&(m=null);var d=m?m.completion:{};return d.type=a,d.arg=c,m?(this.method="next",this.next=m.finallyLoc,b):this.complete(d)},complete:function(a,c){if(a.type==="throw")throw a.arg;return a.type==="break"||a.type==="continue"?this.next=a.arg:a.type==="return"?(this.rval=this.arg=a.arg,this.method="return",this.next="end"):a.type==="normal"&&c&&(this.next=c),b},finish:function(a){for(var c=this.tryEntries.length-1;c>=0;--c){var y=this.tryEntries[c];if(y.finallyLoc===a)return this.complete(y.completion,y.afterLoc),k(y),b}},catch:function(a){for(var c=this.tryEntries.length-1;c>=0;--c){var y=this.tryEntries[c];if(y.tryLoc===a){var h=y.completion;if(h.type==="throw"){var m=h.arg;k(y)}return m}}throw new Error("illegal catch attempt")},delegateYield:function(a,c,y){return this.delegate={iterator:G(a),resultName:c,nextLoc:y},this.method==="next"&&(this.arg=void 0),b}},e}function Vo(e,t,r,n,o,i,f){try{var s=e[i](f),u=s.value}catch(p){r(p);return}s.done?t(u):Promise.resolve(u).then(n,o)}function pt(e){return function(){var t=this,r=arguments;return new Promise(function(n,o){var i=e.apply(t,r);function f(u){Vo(i,n,o,f,s,"next",u)}function s(u){Vo(i,n,o,f,s,"throw",u)}f(void 0)})}}var yt="";function Wo(e){yt=e}function Ko(e,t){return ar.apply(this,arguments)}function ar(){return ar=pt(H().mark(function e(t,r){var n,o;return H().wrap(function(f){for(;;)switch(f.prev=f.next){case 0:return t=t.startsWith("http")?t:yt+t,n=r?.dataType||"text",f.next=4,fetch(t,r);case 4:return o=f.sent,f.next=7,o[n]();case 7:return f.abrupt("return",f.sent);case 8:case"end":return f.stop()}},e)})),ar.apply(this,arguments)}function Yo(e,t){return ur.apply(this,arguments)}function ur(){return ur=pt(H().mark(function e(t,r){var n;return H().wrap(function(i){for(;;)switch(i.prev=i.next){case 0:return n=new Image,n.crossOrigin=r?.crossOrigin||"anonymous",n.src=t.startsWith("http")?t:yt+t,i.next=5,n.decode();case 5:return i.next=7,createImageBitmap(n);case 7:return i.abrupt("return",i.sent);case 8:case"end":return i.stop()}},e)})),ur.apply(this,arguments)}function $o(e,t){return fr.apply(this,arguments)}function fr(){return fr=pt(H().mark(function e(t,r){return H().wrap(function(o){for(;;)switch(o.prev=o.next){case 0:return o.abrupt("return",new Promise(function(i,f){try{var s=new Image;s.onload=function(){return i(s)},s.onerror=function(){return f(new Error("Could not load image ".concat(t,".")))},s.crossOrigin=r?.crossOrigin||"anonymous",s.src=t.startsWith("http")?t:yt+t}catch(u){f(u)}}));case 1:case"end":return o.stop()}},e)})),fr.apply(this,arguments)}function Xo(e,t){return cr.apply(this,arguments)}function cr(){return cr=pt(H().mark(function e(t,r){var n,o;return H().wrap(function(f){for(;;)switch(f.prev=f.next){case 0:if(n=document.getElementsByTagName("head")[0],n){f.next=3;break}throw new Error("loadScript");case 3:return o=document.createElement("script"),o.setAttribute("type","text/javascript"),o.setAttribute("src",t),r&&(o.id=r),f.abrupt("return",new Promise(function(s,u){o.onload=s,o.onerror=function(p){return u(new Error("Unable to load script '".concat(t,"': ").concat(p)))},n.appendChild(o)}));case 8:case"end":return f.stop()}},e)})),cr.apply(this,arguments)}function sr(){var e=1,t=1;return function(){return e=Math.sin(t*17.23),t=Math.cos(e*27.92),Zc(Math.abs(e*t)*1432.71)}}function Zc(e){return e-Math.floor(e)}var qo=sr();function mt(e){return mt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},mt(e)}function ht(e,t,r){if(e===t)return!0;if(!r||!e||!t)return!1;if(Array.isArray(e)){if(!Array.isArray(t)||e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(!ht(e[n],t[n],r-1))return!1;return!0}if(Array.isArray(t))return!1;if(mt(e)==="object"&&mt(t)==="object"){var o=Object.keys(e),i=Object.keys(t);if(o.length!==i.length)return!1;for(var f=0,s=o;f<s.length;f++){var u=s[f];if(!t.hasOwnProperty(u)||!ht(e[u],t[u],r-1))return!1}return!0}return!1}function Zo(e){return typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame(e):setTimeout(e,1e3/60)}function Jo(e){return typeof window<"u"&&window.cancelAnimationFrame?window.cancelAnimationFrame(e):clearTimeout(e)}var Jc=function(t){return"".concat(t)};return oi(Qc);})();
32
+ return __exports__;
33
+ });
package/package.json CHANGED
@@ -1,8 +1,9 @@
1
1
  {
2
2
  "name": "@luma.gl/core",
3
- "version": "9.0.0-alpha.9",
4
- "description": "WebGL2 Components for High Performance Rendering and Computation",
3
+ "version": "9.0.0-beta.2",
4
+ "description": "luma.gl API",
5
5
  "license": "MIT",
6
+ "type": "module",
6
7
  "publishConfig": {
7
8
  "access": "public"
8
9
  },
@@ -16,26 +17,30 @@
16
17
  "animation",
17
18
  "3d"
18
19
  ],
19
- "types": "src/index.ts",
20
- "main": "dist/index.js",
20
+ "types": "dist/index.d.ts",
21
+ "main": "dist/index.cjs",
21
22
  "module": "dist/index.js",
23
+ "exports": {
24
+ ".": {
25
+ "types": "./dist/index.d.ts",
26
+ "import": "./dist/index.js",
27
+ "require": "./dist/index.cjs"
28
+ }
29
+ },
22
30
  "files": [
23
31
  "src",
24
32
  "dist",
33
+ "dist.min.js",
25
34
  "README.md"
26
35
  ],
27
36
  "sideEffects": false,
28
37
  "scripts": {
29
- "pre-build": "npm run build-bundle",
30
- "build-bundle": "webpack --display=minimal --config ../../scripts/bundle.config.js"
38
+ "build-bundle": "ocular-bundle ./src/index.ts",
39
+ "pre-build": "npm run build-bundle && npm run build-bundle -- --env=dev"
31
40
  },
32
41
  "dependencies": {
33
42
  "@babel/runtime": "^7.0.0",
34
- "@luma.gl/constants": "9.0.0-alpha.9",
35
- "@luma.gl/engine": "9.0.0-alpha.9",
36
- "@luma.gl/gltools": "9.0.0-alpha.9",
37
- "@luma.gl/shadertools": "9.0.0-alpha.9",
38
- "@luma.gl/webgl": "9.0.0-alpha.9"
43
+ "@types/offscreencanvas": "^2019.6.4"
39
44
  },
40
- "gitHead": "b84aae16edcdee2be84d2861c81cc6584e336b28"
45
+ "gitHead": "d90ddd6231c3d405d88dfb9e8c232c4dfefcc056"
41
46
  }