@loaders.gl/3d-tiles 3.1.0-alpha.1 → 3.1.0-alpha.5

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 (197) hide show
  1. package/dist/bundle.d.ts +1 -0
  2. package/dist/cesium-ion-loader.d.ts +5 -0
  3. package/dist/dist.min.js +1 -1
  4. package/dist/dist.min.js.map +1 -1
  5. package/dist/es5/bundle.js +7 -0
  6. package/dist/es5/bundle.js.map +1 -0
  7. package/dist/es5/cesium-ion-loader.js +45 -0
  8. package/dist/es5/cesium-ion-loader.js.map +1 -0
  9. package/dist/es5/index.js +64 -0
  10. package/dist/es5/index.js.map +1 -0
  11. package/dist/es5/lib/classes/helpers/tile-3d-accessor-utils.js +108 -0
  12. package/dist/es5/lib/classes/helpers/tile-3d-accessor-utils.js.map +1 -0
  13. package/dist/es5/lib/classes/tile-3d-batch-table-hierarchy.js +223 -0
  14. package/dist/es5/lib/classes/tile-3d-batch-table-hierarchy.js.map +1 -0
  15. package/dist/es5/lib/classes/tile-3d-batch-table.js +301 -0
  16. package/dist/es5/lib/classes/tile-3d-batch-table.js.map +1 -0
  17. package/dist/es5/lib/classes/tile-3d-feature-table.js +97 -0
  18. package/dist/es5/lib/classes/tile-3d-feature-table.js.map +1 -0
  19. package/dist/es5/lib/constants.js +31 -0
  20. package/dist/es5/lib/constants.js.map +1 -0
  21. package/dist/es5/lib/encoders/encode-3d-tile-batched-model.js +56 -0
  22. package/dist/es5/lib/encoders/encode-3d-tile-batched-model.js.map +1 -0
  23. package/dist/es5/lib/encoders/encode-3d-tile-composite.js +34 -0
  24. package/dist/es5/lib/encoders/encode-3d-tile-composite.js.map +1 -0
  25. package/dist/es5/lib/encoders/encode-3d-tile-instanced-model.js +48 -0
  26. package/dist/es5/lib/encoders/encode-3d-tile-instanced-model.js.map +1 -0
  27. package/dist/es5/lib/encoders/encode-3d-tile-point-cloud.js +52 -0
  28. package/dist/es5/lib/encoders/encode-3d-tile-point-cloud.js.map +1 -0
  29. package/dist/es5/lib/encoders/encode-3d-tile.js +48 -0
  30. package/dist/es5/lib/encoders/encode-3d-tile.js.map +1 -0
  31. package/dist/es5/lib/encoders/helpers/encode-3d-tile-header.js +41 -0
  32. package/dist/es5/lib/encoders/helpers/encode-3d-tile-header.js.map +1 -0
  33. package/dist/es5/lib/ion/ion.js +91 -0
  34. package/dist/es5/lib/ion/ion.js.map +1 -0
  35. package/dist/es5/lib/parsers/helpers/normalize-3d-tile-colors.js +75 -0
  36. package/dist/es5/lib/parsers/helpers/normalize-3d-tile-colors.js.map +1 -0
  37. package/dist/es5/lib/parsers/helpers/normalize-3d-tile-normals.js +40 -0
  38. package/dist/es5/lib/parsers/helpers/normalize-3d-tile-normals.js.map +1 -0
  39. package/dist/es5/lib/parsers/helpers/normalize-3d-tile-positions.js +40 -0
  40. package/dist/es5/lib/parsers/helpers/normalize-3d-tile-positions.js.map +1 -0
  41. package/dist/es5/lib/parsers/helpers/parse-3d-tile-gltf-view.js +83 -0
  42. package/dist/es5/lib/parsers/helpers/parse-3d-tile-gltf-view.js.map +1 -0
  43. package/dist/es5/lib/parsers/helpers/parse-3d-tile-header.js +24 -0
  44. package/dist/es5/lib/parsers/helpers/parse-3d-tile-header.js.map +1 -0
  45. package/dist/es5/lib/parsers/helpers/parse-3d-tile-tables.js +100 -0
  46. package/dist/es5/lib/parsers/helpers/parse-3d-tile-tables.js.map +1 -0
  47. package/dist/es5/lib/parsers/helpers/parse-utils.js +31 -0
  48. package/dist/es5/lib/parsers/helpers/parse-utils.js.map +1 -0
  49. package/dist/es5/lib/parsers/parse-3d-tile-batched-model.js +43 -0
  50. package/dist/es5/lib/parsers/parse-3d-tile-batched-model.js.map +1 -0
  51. package/dist/es5/lib/parsers/parse-3d-tile-composite.js +25 -0
  52. package/dist/es5/lib/parsers/parse-3d-tile-composite.js.map +1 -0
  53. package/dist/es5/lib/parsers/parse-3d-tile-header.js +86 -0
  54. package/dist/es5/lib/parsers/parse-3d-tile-header.js.map +1 -0
  55. package/dist/es5/lib/parsers/parse-3d-tile-instanced-model.js +195 -0
  56. package/dist/es5/lib/parsers/parse-3d-tile-instanced-model.js.map +1 -0
  57. package/dist/es5/lib/parsers/parse-3d-tile-point-cloud.js +265 -0
  58. package/dist/es5/lib/parsers/parse-3d-tile-point-cloud.js.map +1 -0
  59. package/dist/es5/lib/parsers/parse-3d-tile.js +41 -0
  60. package/dist/es5/lib/parsers/parse-3d-tile.js.map +1 -0
  61. package/dist/es5/lib/utils/version.js +9 -0
  62. package/dist/es5/lib/utils/version.js.map +1 -0
  63. package/dist/es5/tile-3d-writer.js +32 -0
  64. package/dist/es5/tile-3d-writer.js.map +1 -0
  65. package/dist/es5/tiles-3d-loader.js +85 -0
  66. package/dist/es5/tiles-3d-loader.js.map +1 -0
  67. package/dist/es5/types.js +2 -0
  68. package/dist/{types.js.map → es5/types.js.map} +0 -0
  69. package/dist/esm/bundle.js +5 -0
  70. package/dist/esm/bundle.js.map +1 -0
  71. package/dist/{cesium-ion-loader.js → esm/cesium-ion-loader.js} +0 -0
  72. package/dist/esm/cesium-ion-loader.js.map +1 -0
  73. package/dist/{index.js → esm/index.js} +0 -0
  74. package/dist/esm/index.js.map +1 -0
  75. package/dist/{lib → esm/lib}/classes/helpers/tile-3d-accessor-utils.js +0 -0
  76. package/dist/esm/lib/classes/helpers/tile-3d-accessor-utils.js.map +1 -0
  77. package/dist/{lib → esm/lib}/classes/tile-3d-batch-table-hierarchy.js +1 -1
  78. package/dist/esm/lib/classes/tile-3d-batch-table-hierarchy.js.map +1 -0
  79. package/dist/{lib → esm/lib}/classes/tile-3d-batch-table.js +4 -4
  80. package/dist/esm/lib/classes/tile-3d-batch-table.js.map +1 -0
  81. package/dist/{lib → esm/lib}/classes/tile-3d-feature-table.js +0 -0
  82. package/dist/esm/lib/classes/tile-3d-feature-table.js.map +1 -0
  83. package/dist/{lib → esm/lib}/constants.js +0 -0
  84. package/dist/esm/lib/constants.js.map +1 -0
  85. package/dist/{lib → esm/lib}/encoders/encode-3d-tile-batched-model.js +0 -0
  86. package/dist/esm/lib/encoders/encode-3d-tile-batched-model.js.map +1 -0
  87. package/dist/{lib → esm/lib}/encoders/encode-3d-tile-composite.js +0 -0
  88. package/dist/esm/lib/encoders/encode-3d-tile-composite.js.map +1 -0
  89. package/dist/{lib → esm/lib}/encoders/encode-3d-tile-instanced-model.js +0 -0
  90. package/dist/esm/lib/encoders/encode-3d-tile-instanced-model.js.map +1 -0
  91. package/dist/{lib → esm/lib}/encoders/encode-3d-tile-point-cloud.js +0 -0
  92. package/dist/esm/lib/encoders/encode-3d-tile-point-cloud.js.map +1 -0
  93. package/dist/{lib → esm/lib}/encoders/encode-3d-tile.js +0 -0
  94. package/dist/esm/lib/encoders/encode-3d-tile.js.map +1 -0
  95. package/dist/{lib → esm/lib}/encoders/helpers/encode-3d-tile-header.js +0 -0
  96. package/dist/esm/lib/encoders/helpers/encode-3d-tile-header.js.map +1 -0
  97. package/dist/{lib → esm/lib}/ion/ion.js +6 -6
  98. package/dist/esm/lib/ion/ion.js.map +1 -0
  99. package/dist/{lib → esm/lib}/parsers/helpers/normalize-3d-tile-colors.js +0 -0
  100. package/dist/esm/lib/parsers/helpers/normalize-3d-tile-colors.js.map +1 -0
  101. package/dist/{lib → esm/lib}/parsers/helpers/normalize-3d-tile-normals.js +0 -0
  102. package/dist/esm/lib/parsers/helpers/normalize-3d-tile-normals.js.map +1 -0
  103. package/dist/{lib → esm/lib}/parsers/helpers/normalize-3d-tile-positions.js +0 -0
  104. package/dist/esm/lib/parsers/helpers/normalize-3d-tile-positions.js.map +1 -0
  105. package/dist/{lib → esm/lib}/parsers/helpers/parse-3d-tile-gltf-view.js +2 -2
  106. package/dist/esm/lib/parsers/helpers/parse-3d-tile-gltf-view.js.map +1 -0
  107. package/dist/{lib → esm/lib}/parsers/helpers/parse-3d-tile-header.js +1 -1
  108. package/dist/esm/lib/parsers/helpers/parse-3d-tile-header.js.map +1 -0
  109. package/dist/{lib → esm/lib}/parsers/helpers/parse-3d-tile-tables.js +1 -1
  110. package/dist/esm/lib/parsers/helpers/parse-3d-tile-tables.js.map +1 -0
  111. package/dist/{lib → esm/lib}/parsers/helpers/parse-utils.js +1 -5
  112. package/dist/esm/lib/parsers/helpers/parse-utils.js.map +1 -0
  113. package/dist/{lib → esm/lib}/parsers/parse-3d-tile-batched-model.js +0 -0
  114. package/dist/esm/lib/parsers/parse-3d-tile-batched-model.js.map +1 -0
  115. package/dist/{lib → esm/lib}/parsers/parse-3d-tile-composite.js +0 -0
  116. package/dist/esm/lib/parsers/parse-3d-tile-composite.js.map +1 -0
  117. package/dist/{lib → esm/lib}/parsers/parse-3d-tile-header.js +1 -1
  118. package/dist/esm/lib/parsers/parse-3d-tile-header.js.map +1 -0
  119. package/dist/{lib → esm/lib}/parsers/parse-3d-tile-instanced-model.js +1 -1
  120. package/dist/esm/lib/parsers/parse-3d-tile-instanced-model.js.map +1 -0
  121. package/dist/{lib → esm/lib}/parsers/parse-3d-tile-point-cloud.js +0 -0
  122. package/dist/esm/lib/parsers/parse-3d-tile-point-cloud.js.map +1 -0
  123. package/dist/{lib → esm/lib}/parsers/parse-3d-tile.js +1 -1
  124. package/dist/esm/lib/parsers/parse-3d-tile.js.map +1 -0
  125. package/dist/esm/lib/utils/version.js +2 -0
  126. package/dist/esm/lib/utils/version.js.map +1 -0
  127. package/dist/{tile-3d-writer.js → esm/tile-3d-writer.js} +0 -0
  128. package/dist/esm/tile-3d-writer.js.map +1 -0
  129. package/dist/{tiles-3d-loader.js → esm/tiles-3d-loader.js} +0 -0
  130. package/dist/esm/tiles-3d-loader.js.map +1 -0
  131. package/dist/{types.js → esm/types.js} +0 -0
  132. package/dist/esm/types.js.map +1 -0
  133. package/dist/index.d.ts +8 -0
  134. package/dist/lib/classes/helpers/tile-3d-accessor-utils.d.ts +7 -0
  135. package/dist/lib/classes/tile-3d-batch-table-hierarchy.d.ts +9 -0
  136. package/dist/lib/classes/tile-3d-batch-table.d.ts +40 -0
  137. package/dist/lib/classes/tile-3d-feature-table.d.ts +14 -0
  138. package/dist/lib/constants.d.ts +22 -0
  139. package/dist/lib/encoders/encode-3d-tile-batched-model.d.ts +1 -0
  140. package/dist/lib/encoders/encode-3d-tile-composite.d.ts +1 -0
  141. package/dist/lib/encoders/encode-3d-tile-instanced-model.d.ts +1 -0
  142. package/dist/lib/encoders/encode-3d-tile-point-cloud.d.ts +1 -0
  143. package/dist/lib/encoders/encode-3d-tile.d.ts +1 -0
  144. package/dist/lib/encoders/helpers/encode-3d-tile-header.d.ts +2 -0
  145. package/dist/lib/ion/ion.d.ts +3 -0
  146. package/dist/lib/parsers/helpers/normalize-3d-tile-colors.d.ts +6 -0
  147. package/dist/lib/parsers/helpers/normalize-3d-tile-normals.d.ts +5 -0
  148. package/dist/lib/parsers/helpers/normalize-3d-tile-positions.d.ts +1 -0
  149. package/dist/lib/parsers/helpers/parse-3d-tile-gltf-view.d.ts +6 -0
  150. package/dist/lib/parsers/helpers/parse-3d-tile-header.d.ts +1 -0
  151. package/dist/lib/parsers/helpers/parse-3d-tile-tables.d.ts +2 -0
  152. package/dist/lib/parsers/helpers/parse-utils.d.ts +3 -0
  153. package/dist/lib/parsers/parse-3d-tile-batched-model.d.ts +1 -0
  154. package/dist/lib/parsers/parse-3d-tile-composite.d.ts +1 -0
  155. package/dist/lib/parsers/parse-3d-tile-header.d.ts +2 -0
  156. package/dist/lib/parsers/parse-3d-tile-instanced-model.d.ts +1 -0
  157. package/dist/lib/parsers/parse-3d-tile-point-cloud.d.ts +2 -0
  158. package/dist/lib/parsers/parse-3d-tile.d.ts +1 -0
  159. package/dist/lib/utils/version.d.ts +1 -0
  160. package/dist/tile-3d-writer.d.ts +5 -0
  161. package/dist/tiles-3d-loader.d.ts +5 -0
  162. package/dist/types.d.ts +47 -0
  163. package/package.json +14 -11
  164. package/src/bundle.ts +2 -3
  165. package/dist/bundle.js +0 -7
  166. package/dist/bundle.js.map +0 -1
  167. package/dist/cesium-ion-loader.js.map +0 -1
  168. package/dist/index.js.map +0 -1
  169. package/dist/lib/classes/helpers/tile-3d-accessor-utils.js.map +0 -1
  170. package/dist/lib/classes/tile-3d-batch-table-hierarchy.js.map +0 -1
  171. package/dist/lib/classes/tile-3d-batch-table.js.map +0 -1
  172. package/dist/lib/classes/tile-3d-feature-table.js.map +0 -1
  173. package/dist/lib/constants.js.map +0 -1
  174. package/dist/lib/encoders/encode-3d-tile-batched-model.js.map +0 -1
  175. package/dist/lib/encoders/encode-3d-tile-composite.js.map +0 -1
  176. package/dist/lib/encoders/encode-3d-tile-instanced-model.js.map +0 -1
  177. package/dist/lib/encoders/encode-3d-tile-point-cloud.js.map +0 -1
  178. package/dist/lib/encoders/encode-3d-tile.js.map +0 -1
  179. package/dist/lib/encoders/helpers/encode-3d-tile-header.js.map +0 -1
  180. package/dist/lib/ion/ion.js.map +0 -1
  181. package/dist/lib/parsers/helpers/normalize-3d-tile-colors.js.map +0 -1
  182. package/dist/lib/parsers/helpers/normalize-3d-tile-normals.js.map +0 -1
  183. package/dist/lib/parsers/helpers/normalize-3d-tile-positions.js.map +0 -1
  184. package/dist/lib/parsers/helpers/parse-3d-tile-gltf-view.js.map +0 -1
  185. package/dist/lib/parsers/helpers/parse-3d-tile-header.js.map +0 -1
  186. package/dist/lib/parsers/helpers/parse-3d-tile-tables.js.map +0 -1
  187. package/dist/lib/parsers/helpers/parse-utils.js.map +0 -1
  188. package/dist/lib/parsers/parse-3d-tile-batched-model.js.map +0 -1
  189. package/dist/lib/parsers/parse-3d-tile-composite.js.map +0 -1
  190. package/dist/lib/parsers/parse-3d-tile-header.js.map +0 -1
  191. package/dist/lib/parsers/parse-3d-tile-instanced-model.js.map +0 -1
  192. package/dist/lib/parsers/parse-3d-tile-point-cloud.js.map +0 -1
  193. package/dist/lib/parsers/parse-3d-tile.js.map +0 -1
  194. package/dist/lib/utils/version.js +0 -2
  195. package/dist/lib/utils/version.js.map +0 -1
  196. package/dist/tile-3d-writer.js.map +0 -1
  197. package/dist/tiles-3d-loader.js.map +0 -1
package/dist/dist.min.js CHANGED
@@ -1,2 +1,2 @@
1
- !function(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var r=e();for(var n in r)("object"==typeof exports?exports:t)[n]=r[n]}}(window,(function(){return function(t){var e={};function r(n){if(e[n])return e[n].exports;var s=e[n]={i:n,l:!1,exports:{}};return t[n].call(s.exports,s,s.exports,r),s.l=!0,s.exports}return r.m=t,r.c=e,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var s in t)r.d(n,s,function(e){return t[e]}.bind(null,s));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=27)}([function(t,e,r){"use strict";r.d(e,"b",(function(){return n})),r.d(e,"a",(function(){return s})),r.d(e,"c",(function(){return i}));var n=1e-6,s="undefined"!=typeof Float32Array?Float32Array:Array,i=Math.random;Math.PI;Math.hypot||(Math.hypot=function(){for(var t=0,e=arguments.length;e--;)t+=arguments[e]*arguments[e];return Math.sqrt(t)})},function(t,e,r){"use strict";r.d(e,"a",(function(){return s})),r.d(e,"b",(function(){return i})),r.d(e,"c",(function(){return a}));var n=r(3);function s(t){if(!Number.isFinite(t))throw new Error("Invalid number ".concat(t));return t}function i(t,e,r=""){if(n.b.debug&&!function(t,e){if(t.length!==e)return!1;for(let e=0;e<t.length;++e)if(!Number.isFinite(t[e]))return!1;return!0}(t,e))throw new Error("math.gl: ".concat(r," some fields set to invalid numbers'"));return t}const o={};function a(t,e){o[t]||(o[t]=!0,console.warn("".concat(t," has been removed in version ").concat(e,", see upgrade guide for more information")))}},function(t,e,r){"use strict";r.d(e,"b",(function(){return s})),r.d(e,"g",(function(){return i})),r.d(e,"e",(function(){return o})),r.d(e,"h",(function(){return a})),r.d(e,"d",(function(){return c})),r.d(e,"c",(function(){return u})),r.d(e,"m",(function(){return h})),r.d(e,"l",(function(){return f})),r.d(e,"n",(function(){return l})),r.d(e,"i",(function(){return d})),r.d(e,"j",(function(){return y})),r.d(e,"k",(function(){return m})),r.d(e,"a",(function(){return g})),r.d(e,"f",(function(){return b}));var n=r(0);function s(){var t=new n.a(3);return n.a!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t}function i(t){var e=t[0],r=t[1],n=t[2];return Math.hypot(e,r,n)}function o(t,e,r){var s=new n.a(3);return s[0]=t,s[1]=e,s[2]=r,s}function a(t,e){var r=e[0],n=e[1],s=e[2],i=r*r+n*n+s*s;return i>0&&(i=1/Math.sqrt(i)),t[0]=e[0]*i,t[1]=e[1]*i,t[2]=e[2]*i,t}function c(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function u(t,e,r){var n=e[0],s=e[1],i=e[2],o=r[0],a=r[1],c=r[2];return t[0]=s*c-i*a,t[1]=i*o-n*c,t[2]=n*a-s*o,t}function h(t,e,r){var n=e[0],s=e[1],i=e[2],o=r[3]*n+r[7]*s+r[11]*i+r[15];return o=o||1,t[0]=(r[0]*n+r[4]*s+r[8]*i+r[12])/o,t[1]=(r[1]*n+r[5]*s+r[9]*i+r[13])/o,t[2]=(r[2]*n+r[6]*s+r[10]*i+r[14])/o,t}function f(t,e,r){var n=e[0],s=e[1],i=e[2];return t[0]=n*r[0]+s*r[3]+i*r[6],t[1]=n*r[1]+s*r[4]+i*r[7],t[2]=n*r[2]+s*r[5]+i*r[8],t}function l(t,e,r){var n=r[0],s=r[1],i=r[2],o=r[3],a=e[0],c=e[1],u=e[2],h=s*u-i*c,f=i*a-n*u,l=n*c-s*a,d=s*l-i*f,y=i*h-n*l,m=n*f-s*h,g=2*o;return h*=g,f*=g,l*=g,d*=2,y*=2,m*=2,t[0]=a+h+d,t[1]=c+f+y,t[2]=u+l+m,t}function d(t,e,r,n){var s=[],i=[];return s[0]=e[0]-r[0],s[1]=e[1]-r[1],s[2]=e[2]-r[2],i[0]=s[0],i[1]=s[1]*Math.cos(n)-s[2]*Math.sin(n),i[2]=s[1]*Math.sin(n)+s[2]*Math.cos(n),t[0]=i[0]+r[0],t[1]=i[1]+r[1],t[2]=i[2]+r[2],t}function y(t,e,r,n){var s=[],i=[];return s[0]=e[0]-r[0],s[1]=e[1]-r[1],s[2]=e[2]-r[2],i[0]=s[2]*Math.sin(n)+s[0]*Math.cos(n),i[1]=s[1],i[2]=s[2]*Math.cos(n)-s[0]*Math.sin(n),t[0]=i[0]+r[0],t[1]=i[1]+r[1],t[2]=i[2]+r[2],t}function m(t,e,r,n){var s=[],i=[];return s[0]=e[0]-r[0],s[1]=e[1]-r[1],s[2]=e[2]-r[2],i[0]=s[0]*Math.cos(n)-s[1]*Math.sin(n),i[1]=s[0]*Math.sin(n)+s[1]*Math.cos(n),i[2]=s[2],t[0]=i[0]+r[0],t[1]=i[1]+r[1],t[2]=i[2]+r[2],t}function g(t,e){var r=t[0],n=t[1],s=t[2],i=e[0],o=e[1],a=e[2],u=Math.sqrt(r*r+n*n+s*s)*Math.sqrt(i*i+o*o+a*a),h=u&&c(t,e)/u;return Math.acos(Math.min(Math.max(h,-1),1))}var p,b=i;p=s()},function(t,e,r){"use strict";r.d(e,"b",(function(){return i})),r.d(e,"d",(function(){return o})),r.d(e,"e",(function(){return a})),r.d(e,"g",(function(){return u})),r.d(e,"f",(function(){return h})),r.d(e,"a",(function(){return f})),r.d(e,"c",(function(){return l}));r(6);const n=1/Math.PI*180,s=1/180*Math.PI,i={};function o(t,{precision:e=i.precision||4}={}){return t=function(t){return Math.round(t/i.EPSILON)*i.EPSILON}(t),"".concat(parseFloat(t.toPrecision(e)))}function a(t){return Array.isArray(t)||ArrayBuffer.isView(t)&&!(t instanceof DataView)}function c(t,e,r){if(a(t)){r=r||((n=t).clone?n.clone():new Array(n.length));for(let n=0;n<r.length&&n<t.length;++n)r[n]=e(t[n],n,r);return r}var n;return e(t)}function u(t){return function(t,e){return c(t,t=>t*s,e)}(t)}function h(t){return function(t,e){return c(t,t=>t*n,e)}(t)}function f(t,e,r){return c(t,t=>Math.max(e,Math.min(r,t)))}function l(t,e,r){const n=i.EPSILON;r&&(i.EPSILON=r);try{if(t===e)return!0;if(a(t)&&a(e)){if(t.length!==e.length)return!1;for(let r=0;r<t.length;++r)if(!l(t[r],e[r]))return!1;return!0}return t&&t.equals?t.equals(e):e&&e.equals?e.equals(t):!(!Number.isFinite(t)||!Number.isFinite(e))&&Math.abs(t-e)<=i.EPSILON*Math.max(1,Math.abs(t),Math.abs(e))}finally{i.EPSILON=n}}i.EPSILON=1e-12,i.debug=!1,i.precision=4,i.printTypes=!1,i.printDegrees=!1,i.printRowMajor=!0},function(t,e,r){"use strict";r.d(e,"b",(function(){return s})),r.d(e,"g",(function(){return i})),r.d(e,"c",(function(){return o})),r.d(e,"l",(function(){return a})),r.d(e,"a",(function(){return c})),r.d(e,"k",(function(){return u})),r.d(e,"h",(function(){return h})),r.d(e,"m",(function(){return f})),r.d(e,"j",(function(){return l})),r.d(e,"d",(function(){return d})),r.d(e,"i",(function(){return y})),r.d(e,"n",(function(){return m})),r.d(e,"o",(function(){return g})),r.d(e,"f",(function(){return p})),r.d(e,"e",(function(){return b}));var n=r(0);function s(t){var e=new n.a(4);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e}function i(t,e,r,s){var i=new n.a(4);return i[0]=t,i[1]=e,i[2]=r,i[3]=s,i}function o(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t}function a(t,e,r,n,s){return t[0]=e,t[1]=r,t[2]=n,t[3]=s,t}function c(t,e,r){return t[0]=e[0]+r[0],t[1]=e[1]+r[1],t[2]=e[2]+r[2],t[3]=e[3]+r[3],t}function u(t,e,r){return t[0]=e[0]*r,t[1]=e[1]*r,t[2]=e[2]*r,t[3]=e[3]*r,t}function h(t){var e=t[0],r=t[1],n=t[2],s=t[3];return Math.hypot(e,r,n,s)}function f(t){var e=t[0],r=t[1],n=t[2],s=t[3];return e*e+r*r+n*n+s*s}function l(t,e){var r=e[0],n=e[1],s=e[2],i=e[3],o=r*r+n*n+s*s+i*i;return o>0&&(o=1/Math.sqrt(o)),t[0]=r*o,t[1]=n*o,t[2]=s*o,t[3]=i*o,t}function d(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]+t[3]*e[3]}function y(t,e,r,n){var s=e[0],i=e[1],o=e[2],a=e[3];return t[0]=s+n*(r[0]-s),t[1]=i+n*(r[1]-i),t[2]=o+n*(r[2]-o),t[3]=a+n*(r[3]-a),t}function m(t,e,r){var n=e[0],s=e[1],i=e[2],o=e[3];return t[0]=r[0]*n+r[4]*s+r[8]*i+r[12]*o,t[1]=r[1]*n+r[5]*s+r[9]*i+r[13]*o,t[2]=r[2]*n+r[6]*s+r[10]*i+r[14]*o,t[3]=r[3]*n+r[7]*s+r[11]*i+r[15]*o,t}function g(t,e,r){var n=e[0],s=e[1],i=e[2],o=r[0],a=r[1],c=r[2],u=r[3],h=u*n+a*i-c*s,f=u*s+c*n-o*i,l=u*i+o*s-a*n,d=-o*n-a*s-c*i;return t[0]=h*u+d*-o+f*-c-l*-a,t[1]=f*u+d*-a+l*-o-h*-c,t[2]=l*u+d*-c+h*-a-f*-o,t[3]=e[3],t}function p(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]&&t[3]===e[3]}function b(t,e){var r=t[0],s=t[1],i=t[2],o=t[3],a=e[0],c=e[1],u=e[2],h=e[3];return Math.abs(r-a)<=n.b*Math.max(1,Math.abs(r),Math.abs(a))&&Math.abs(s-c)<=n.b*Math.max(1,Math.abs(s),Math.abs(c))&&Math.abs(i-u)<=n.b*Math.max(1,Math.abs(i),Math.abs(u))&&Math.abs(o-h)<=n.b*Math.max(1,Math.abs(o),Math.abs(h))}var T,w;T=new n.a(4),n.a!=Float32Array&&(T[0]=0,T[1]=0,T[2]=0,T[3]=0),w=T},function(t,e,r){"use strict";r.d(e,"o",(function(){return s})),r.d(e,"d",(function(){return i})),r.d(e,"a",(function(){return o})),r.d(e,"f",(function(){return a})),r.d(e,"n",(function(){return c})),r.d(e,"m",(function(){return u})),r.d(e,"i",(function(){return h})),r.d(e,"j",(function(){return f})),r.d(e,"k",(function(){return l})),r.d(e,"l",(function(){return d})),r.d(e,"b",(function(){return y})),r.d(e,"c",(function(){return m})),r.d(e,"h",(function(){return g})),r.d(e,"g",(function(){return p})),r.d(e,"e",(function(){return b}));var n=r(0);function s(t,e){if(t===e){var r=e[1],n=e[2],s=e[3],i=e[6],o=e[7],a=e[11];t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=r,t[6]=e[9],t[7]=e[13],t[8]=n,t[9]=i,t[11]=e[14],t[12]=s,t[13]=o,t[14]=a}else t[0]=e[0],t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=e[1],t[5]=e[5],t[6]=e[9],t[7]=e[13],t[8]=e[2],t[9]=e[6],t[10]=e[10],t[11]=e[14],t[12]=e[3],t[13]=e[7],t[14]=e[11],t[15]=e[15];return t}function i(t,e){var r=e[0],n=e[1],s=e[2],i=e[3],o=e[4],a=e[5],c=e[6],u=e[7],h=e[8],f=e[9],l=e[10],d=e[11],y=e[12],m=e[13],g=e[14],p=e[15],b=r*a-n*o,T=r*c-s*o,w=r*u-i*o,E=n*c-s*a,O=n*u-i*a,_=s*u-i*c,A=h*m-f*y,I=h*g-l*y,v=h*p-d*y,S=f*g-l*m,N=f*p-d*m,x=l*p-d*g,M=b*x-T*N+w*S+E*v-O*I+_*A;return M?(M=1/M,t[0]=(a*x-c*N+u*S)*M,t[1]=(s*N-n*x-i*S)*M,t[2]=(m*_-g*O+p*E)*M,t[3]=(l*O-f*_-d*E)*M,t[4]=(c*v-o*x-u*I)*M,t[5]=(r*x-s*v+i*I)*M,t[6]=(g*w-y*_-p*T)*M,t[7]=(h*_-l*w+d*T)*M,t[8]=(o*N-a*v+u*A)*M,t[9]=(n*v-r*N-i*A)*M,t[10]=(y*O-m*w+p*b)*M,t[11]=(f*w-h*O-d*b)*M,t[12]=(a*I-o*S-c*A)*M,t[13]=(r*S-n*I+s*A)*M,t[14]=(m*T-y*E-g*b)*M,t[15]=(h*E-f*T+l*b)*M,t):null}function o(t){var e=t[0],r=t[1],n=t[2],s=t[3],i=t[4],o=t[5],a=t[6],c=t[7],u=t[8],h=t[9],f=t[10],l=t[11],d=t[12],y=t[13],m=t[14],g=t[15];return(e*o-r*i)*(f*g-l*m)-(e*a-n*i)*(h*g-l*y)+(e*c-s*i)*(h*m-f*y)+(r*a-n*o)*(u*g-l*d)-(r*c-s*o)*(u*m-f*d)+(n*c-s*a)*(u*y-h*d)}function a(t,e,r){var n=e[0],s=e[1],i=e[2],o=e[3],a=e[4],c=e[5],u=e[6],h=e[7],f=e[8],l=e[9],d=e[10],y=e[11],m=e[12],g=e[13],p=e[14],b=e[15],T=r[0],w=r[1],E=r[2],O=r[3];return t[0]=T*n+w*a+E*f+O*m,t[1]=T*s+w*c+E*l+O*g,t[2]=T*i+w*u+E*d+O*p,t[3]=T*o+w*h+E*y+O*b,T=r[4],w=r[5],E=r[6],O=r[7],t[4]=T*n+w*a+E*f+O*m,t[5]=T*s+w*c+E*l+O*g,t[6]=T*i+w*u+E*d+O*p,t[7]=T*o+w*h+E*y+O*b,T=r[8],w=r[9],E=r[10],O=r[11],t[8]=T*n+w*a+E*f+O*m,t[9]=T*s+w*c+E*l+O*g,t[10]=T*i+w*u+E*d+O*p,t[11]=T*o+w*h+E*y+O*b,T=r[12],w=r[13],E=r[14],O=r[15],t[12]=T*n+w*a+E*f+O*m,t[13]=T*s+w*c+E*l+O*g,t[14]=T*i+w*u+E*d+O*p,t[15]=T*o+w*h+E*y+O*b,t}function c(t,e,r){var n,s,i,o,a,c,u,h,f,l,d,y,m=r[0],g=r[1],p=r[2];return e===t?(t[12]=e[0]*m+e[4]*g+e[8]*p+e[12],t[13]=e[1]*m+e[5]*g+e[9]*p+e[13],t[14]=e[2]*m+e[6]*g+e[10]*p+e[14],t[15]=e[3]*m+e[7]*g+e[11]*p+e[15]):(n=e[0],s=e[1],i=e[2],o=e[3],a=e[4],c=e[5],u=e[6],h=e[7],f=e[8],l=e[9],d=e[10],y=e[11],t[0]=n,t[1]=s,t[2]=i,t[3]=o,t[4]=a,t[5]=c,t[6]=u,t[7]=h,t[8]=f,t[9]=l,t[10]=d,t[11]=y,t[12]=n*m+a*g+f*p+e[12],t[13]=s*m+c*g+l*p+e[13],t[14]=i*m+u*g+d*p+e[14],t[15]=o*m+h*g+y*p+e[15]),t}function u(t,e,r){var n=r[0],s=r[1],i=r[2];return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t[3]=e[3]*n,t[4]=e[4]*s,t[5]=e[5]*s,t[6]=e[6]*s,t[7]=e[7]*s,t[8]=e[8]*i,t[9]=e[9]*i,t[10]=e[10]*i,t[11]=e[11]*i,t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t}function h(t,e,r,s){var i,o,a,c,u,h,f,l,d,y,m,g,p,b,T,w,E,O,_,A,I,v,S,N,x=s[0],M=s[1],L=s[2],j=Math.hypot(x,M,L);return j<n.b?null:(x*=j=1/j,M*=j,L*=j,i=Math.sin(r),a=1-(o=Math.cos(r)),c=e[0],u=e[1],h=e[2],f=e[3],l=e[4],d=e[5],y=e[6],m=e[7],g=e[8],p=e[9],b=e[10],T=e[11],w=x*x*a+o,E=M*x*a+L*i,O=L*x*a-M*i,_=x*M*a-L*i,A=M*M*a+o,I=L*M*a+x*i,v=x*L*a+M*i,S=M*L*a-x*i,N=L*L*a+o,t[0]=c*w+l*E+g*O,t[1]=u*w+d*E+p*O,t[2]=h*w+y*E+b*O,t[3]=f*w+m*E+T*O,t[4]=c*_+l*A+g*I,t[5]=u*_+d*A+p*I,t[6]=h*_+y*A+b*I,t[7]=f*_+m*A+T*I,t[8]=c*v+l*S+g*N,t[9]=u*v+d*S+p*N,t[10]=h*v+y*S+b*N,t[11]=f*v+m*S+T*N,e!==t&&(t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t)}function f(t,e,r){var n=Math.sin(r),s=Math.cos(r),i=e[4],o=e[5],a=e[6],c=e[7],u=e[8],h=e[9],f=e[10],l=e[11];return e!==t&&(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[4]=i*s+u*n,t[5]=o*s+h*n,t[6]=a*s+f*n,t[7]=c*s+l*n,t[8]=u*s-i*n,t[9]=h*s-o*n,t[10]=f*s-a*n,t[11]=l*s-c*n,t}function l(t,e,r){var n=Math.sin(r),s=Math.cos(r),i=e[0],o=e[1],a=e[2],c=e[3],u=e[8],h=e[9],f=e[10],l=e[11];return e!==t&&(t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[0]=i*s-u*n,t[1]=o*s-h*n,t[2]=a*s-f*n,t[3]=c*s-l*n,t[8]=i*n+u*s,t[9]=o*n+h*s,t[10]=a*n+f*s,t[11]=c*n+l*s,t}function d(t,e,r){var n=Math.sin(r),s=Math.cos(r),i=e[0],o=e[1],a=e[2],c=e[3],u=e[4],h=e[5],f=e[6],l=e[7];return e!==t&&(t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[0]=i*s+u*n,t[1]=o*s+h*n,t[2]=a*s+f*n,t[3]=c*s+l*n,t[4]=u*s-i*n,t[5]=h*s-o*n,t[6]=f*s-a*n,t[7]=l*s-c*n,t}function y(t,e){var r=e[0],n=e[1],s=e[2],i=e[3],o=r+r,a=n+n,c=s+s,u=r*o,h=n*o,f=n*a,l=s*o,d=s*a,y=s*c,m=i*o,g=i*a,p=i*c;return t[0]=1-f-y,t[1]=h+p,t[2]=l-g,t[3]=0,t[4]=h-p,t[5]=1-u-y,t[6]=d+m,t[7]=0,t[8]=l+g,t[9]=d-m,t[10]=1-u-f,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function m(t,e,r,n,s,i,o){var a=1/(r-e),c=1/(s-n),u=1/(i-o);return t[0]=2*i*a,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=2*i*c,t[6]=0,t[7]=0,t[8]=(r+e)*a,t[9]=(s+n)*c,t[10]=(o+i)*u,t[11]=-1,t[12]=0,t[13]=0,t[14]=o*i*2*u,t[15]=0,t}function g(t,e,r,n,s){var i,o=1/Math.tan(e/2);return t[0]=o/r,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=o,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=-1,t[12]=0,t[13]=0,t[15]=0,null!=s&&s!==1/0?(i=1/(n-s),t[10]=(s+n)*i,t[14]=2*s*n*i):(t[10]=-1,t[14]=-2*n),t}function p(t,e,r,n,s,i,o){var a=1/(e-r),c=1/(n-s),u=1/(i-o);return t[0]=-2*a,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=-2*c,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=2*u,t[11]=0,t[12]=(e+r)*a,t[13]=(s+n)*c,t[14]=(o+i)*u,t[15]=1,t}function b(t,e,r,s){var i,o,a,c,u,h,f,l,d,y,m=e[0],g=e[1],p=e[2],b=s[0],T=s[1],w=s[2],E=r[0],O=r[1],_=r[2];return Math.abs(m-E)<n.b&&Math.abs(g-O)<n.b&&Math.abs(p-_)<n.b?function(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}(t):(f=m-E,l=g-O,d=p-_,i=T*(d*=y=1/Math.hypot(f,l,d))-w*(l*=y),o=w*(f*=y)-b*d,a=b*l-T*f,(y=Math.hypot(i,o,a))?(i*=y=1/y,o*=y,a*=y):(i=0,o=0,a=0),c=l*a-d*o,u=d*i-f*a,h=f*o-l*i,(y=Math.hypot(c,u,h))?(c*=y=1/y,u*=y,h*=y):(c=0,u=0,h=0),t[0]=i,t[1]=c,t[2]=f,t[3]=0,t[4]=o,t[5]=u,t[6]=l,t[7]=0,t[8]=a,t[9]=h,t[10]=d,t[11]=0,t[12]=-(i*m+o*g+a*p),t[13]=-(c*m+u*g+h*p),t[14]=-(f*m+l*g+d*p),t[15]=1,t)}},function(t,e,r){"use strict";function n(t,e){if(!t)throw new Error("math.gl assertion ".concat(e))}r.d(e,"a",(function(){return n}))},function(t,e,r){"use strict";r.d(e,"a",(function(){return s})),r.d(e,"i",(function(){return i})),r.d(e,"d",(function(){return o})),r.d(e,"b",(function(){return a})),r.d(e,"e",(function(){return c})),r.d(e,"h",(function(){return u})),r.d(e,"f",(function(){return h})),r.d(e,"g",(function(){return f})),r.d(e,"c",(function(){return l}));var n=r(0);function s(){var t=new n.a(9);return n.a!=Float32Array&&(t[1]=0,t[2]=0,t[3]=0,t[5]=0,t[6]=0,t[7]=0),t[0]=1,t[4]=1,t[8]=1,t}function i(t,e){if(t===e){var r=e[1],n=e[2],s=e[5];t[1]=e[3],t[2]=e[6],t[3]=r,t[5]=e[7],t[6]=n,t[7]=s}else t[0]=e[0],t[1]=e[3],t[2]=e[6],t[3]=e[1],t[4]=e[4],t[5]=e[7],t[6]=e[2],t[7]=e[5],t[8]=e[8];return t}function o(t,e){var r=e[0],n=e[1],s=e[2],i=e[3],o=e[4],a=e[5],c=e[6],u=e[7],h=e[8],f=h*o-a*u,l=-h*i+a*c,d=u*i-o*c,y=r*f+n*l+s*d;return y?(y=1/y,t[0]=f*y,t[1]=(-h*n+s*u)*y,t[2]=(a*n-s*o)*y,t[3]=l*y,t[4]=(h*r-s*c)*y,t[5]=(-a*r+s*i)*y,t[6]=d*y,t[7]=(-u*r+n*c)*y,t[8]=(o*r-n*i)*y,t):null}function a(t){var e=t[0],r=t[1],n=t[2],s=t[3],i=t[4],o=t[5],a=t[6],c=t[7],u=t[8];return e*(u*i-o*c)+r*(-u*s+o*a)+n*(c*s-i*a)}function c(t,e,r){var n=e[0],s=e[1],i=e[2],o=e[3],a=e[4],c=e[5],u=e[6],h=e[7],f=e[8],l=r[0],d=r[1],y=r[2],m=r[3],g=r[4],p=r[5],b=r[6],T=r[7],w=r[8];return t[0]=l*n+d*o+y*u,t[1]=l*s+d*a+y*h,t[2]=l*i+d*c+y*f,t[3]=m*n+g*o+p*u,t[4]=m*s+g*a+p*h,t[5]=m*i+g*c+p*f,t[6]=b*n+T*o+w*u,t[7]=b*s+T*a+w*h,t[8]=b*i+T*c+w*f,t}function u(t,e,r){var n=e[0],s=e[1],i=e[2],o=e[3],a=e[4],c=e[5],u=e[6],h=e[7],f=e[8],l=r[0],d=r[1];return t[0]=n,t[1]=s,t[2]=i,t[3]=o,t[4]=a,t[5]=c,t[6]=l*n+d*o+u,t[7]=l*s+d*a+h,t[8]=l*i+d*c+f,t}function h(t,e,r){var n=e[0],s=e[1],i=e[2],o=e[3],a=e[4],c=e[5],u=e[6],h=e[7],f=e[8],l=Math.sin(r),d=Math.cos(r);return t[0]=d*n+l*o,t[1]=d*s+l*a,t[2]=d*i+l*c,t[3]=d*o-l*n,t[4]=d*a-l*s,t[5]=d*c-l*i,t[6]=u,t[7]=h,t[8]=f,t}function f(t,e,r){var n=r[0],s=r[1];return t[0]=n*e[0],t[1]=n*e[1],t[2]=n*e[2],t[3]=s*e[3],t[4]=s*e[4],t[5]=s*e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t}function l(t,e){var r=e[0],n=e[1],s=e[2],i=e[3],o=r+r,a=n+n,c=s+s,u=r*o,h=n*o,f=n*a,l=s*o,d=s*a,y=s*c,m=i*o,g=i*a,p=i*c;return t[0]=1-f-y,t[3]=h-p,t[6]=l+g,t[1]=h+p,t[4]=1-u-y,t[7]=d-m,t[2]=l-g,t[5]=d+m,t[8]=1-u-f,t}},function(t,e,r){"use strict";function n(t,e,r){const n=e[0],s=e[1],i=r[3]*n+r[7]*s||1;return t[0]=(r[0]*n+r[4]*s)/i,t[1]=(r[1]*n+r[5]*s)/i,t}function s(t,e,r){const n=e[0],s=e[1],i=e[2],o=r[3]*n+r[7]*s+r[11]*i||1;return t[0]=(r[0]*n+r[4]*s+r[8]*i)/o,t[1]=(r[1]*n+r[5]*s+r[9]*i)/o,t[2]=(r[2]*n+r[6]*s+r[10]*i)/o,t}function i(t,e,r){const n=e[0],s=e[1];return t[0]=r[0]*n+r[2]*s,t[1]=r[1]*n+r[3]*s,t[2]=e[2],t}function o(t,e,r){const n=e[0],s=e[1],i=e[2];return t[0]=r[0]*n+r[3]*s+r[6]*i,t[1]=r[1]*n+r[4]*s+r[7]*i,t[2]=r[2]*n+r[5]*s+r[8]*i,t[3]=e[3],t}r.d(e,"a",(function(){return n})),r.d(e,"c",(function(){return s})),r.d(e,"b",(function(){return i})),r.d(e,"d",(function(){return o}))},function(t,e,r){"use strict";r.d(e,"a",(function(){return s})),r.d(e,"b",(function(){return i})),r.d(e,"c",(function(){return o})),r.d(e,"d",(function(){return a}));var n=r(0);function s(t,e,r){var n=e[0],s=e[1];return t[0]=r[0]*n+r[2]*s,t[1]=r[1]*n+r[3]*s,t}function i(t,e,r){var n=e[0],s=e[1];return t[0]=r[0]*n+r[2]*s+r[4],t[1]=r[1]*n+r[3]*s+r[5],t}function o(t,e,r){var n=e[0],s=e[1];return t[0]=r[0]*n+r[3]*s+r[6],t[1]=r[1]*n+r[4]*s+r[7],t}function a(t,e,r){var n=e[0],s=e[1];return t[0]=r[0]*n+r[4]*s+r[12],t[1]=r[1]*n+r[5]*s+r[13],t}var c,u;c=new n.a(2),n.a!=Float32Array&&(c[0]=0,c[1]=0),u=c},,function(t,e,r){"use strict";(function(t,n){r.d(e,"a",(function(){return i})),r.d(e,"b",(function(){return o})),r.d(e,"c",(function(){return a}));const s={self:"undefined"!=typeof self&&self,window:"undefined"!=typeof window&&window,global:void 0!==t&&t,document:"undefined"!=typeof document&&document},i=s.global||s.self||s.window||{},o="object"!=typeof n||"[object process]"!==String(n)||n.browser,a="function"==typeof importScripts,c=("undefined"!=typeof window&&window.orientation,void 0!==n&&n.version&&/v([0-9]*)/.exec(n.version));c&&parseFloat(c[1])}).call(this,r(20),r(26))},,,function(t,e,r){"use strict";r.d(e,"a",(function(){return i}));var n=r(3),s=r(6);class i extends(function(t){function e(){var e=Reflect.construct(t,Array.from(arguments));return Object.setPrototypeOf(e,Object.getPrototypeOf(this)),e}return e.prototype=Object.create(t.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t,e}(Array)){get ELEMENTS(){return Object(s.a)(!1),0}clone(){return(new this.constructor).copy(this)}from(t){return Array.isArray(t)?this.copy(t):this.fromObject(t)}fromArray(t,e=0){for(let r=0;r<this.ELEMENTS;++r)this[r]=t[r+e];return this.check()}to(t){return t===this?this:Object(n.e)(t)?this.toArray(t):this.toObject(t)}toTarget(t){return t?this.to(t):this}toArray(t=[],e=0){for(let r=0;r<this.ELEMENTS;++r)t[e+r]=this[r];return t}toFloat32Array(){return new Float32Array(this)}toString(){return this.formatString(n.b)}formatString(t){let e="";for(let r=0;r<this.ELEMENTS;++r)e+=(r>0?", ":"")+Object(n.d)(this[r],t);return"".concat(t.printTypes?this.constructor.name:"","[").concat(e,"]")}equals(t){if(!t||this.length!==t.length)return!1;for(let e=0;e<this.ELEMENTS;++e)if(!Object(n.c)(this[e],t[e]))return!1;return!0}exactEquals(t){if(!t||this.length!==t.length)return!1;for(let e=0;e<this.ELEMENTS;++e)if(this[e]!==t[e])return!1;return!0}negate(){for(let t=0;t<this.ELEMENTS;++t)this[t]=-this[t];return this.check()}lerp(t,e,r){void 0===r&&(r=e,e=t,t=this);for(let n=0;n<this.ELEMENTS;++n){const s=t[n];this[n]=s+r*(e[n]-s)}return this.check()}min(t){for(let e=0;e<this.ELEMENTS;++e)this[e]=Math.min(t[e],this[e]);return this.check()}max(t){for(let e=0;e<this.ELEMENTS;++e)this[e]=Math.max(t[e],this[e]);return this.check()}clamp(t,e){for(let r=0;r<this.ELEMENTS;++r)this[r]=Math.min(Math.max(this[r],t[r]),e[r]);return this.check()}add(...t){for(const e of t)for(let t=0;t<this.ELEMENTS;++t)this[t]+=e[t];return this.check()}subtract(...t){for(const e of t)for(let t=0;t<this.ELEMENTS;++t)this[t]-=e[t];return this.check()}scale(t){if(Array.isArray(t))return this.multiply(t);for(let e=0;e<this.ELEMENTS;++e)this[e]*=t;return this.check()}sub(t){return this.subtract(t)}setScalar(t){for(let e=0;e<this.ELEMENTS;++e)this[e]=t;return this.check()}addScalar(t){for(let e=0;e<this.ELEMENTS;++e)this[e]+=t;return this.check()}subScalar(t){return this.addScalar(-t)}multiplyScalar(t){for(let e=0;e<this.ELEMENTS;++e)this[e]*=t;return this.check()}divideScalar(t){return this.scale(1/t)}clampScalar(t,e){for(let r=0;r<this.ELEMENTS;++r)this[r]=Math.min(Math.max(this[r],t),e);return this.check()}multiplyByScalar(t){return this.scale(t)}get elements(){return this}check(){if(n.b.debug&&!this.validate())throw new Error("math.gl: ".concat(this.constructor.name," some fields set to invalid numbers'"));return this}validate(){let t=this.length===this.ELEMENTS;for(let e=0;e<this.ELEMENTS;++e)t=t&&Number.isFinite(this[e]);return t}}},function(t,e,r){"use strict";(function(t,n){r.d(e,"a",(function(){return i})),r.d(e,"b",(function(){return o}));const s={self:"undefined"!=typeof self&&self,window:"undefined"!=typeof window&&window,global:void 0!==t&&t,document:"undefined"!=typeof document&&document},i=s.global||s.self||s.window,o="object"!=typeof n||"[object process]"!==String(n)||n.browser,a=void 0!==n&&n.version&&/v([0-9]*)/.exec(n.version);a&&parseFloat(a[1])}).call(this,r(20),r(26))},function(t,e){},,function(t,e,r){"use strict";r.d(e,"a",(function(){return o}));var n=r(14),s=r(1),i=r(6);class o extends n.a{get ELEMENTS(){return Object(i.a)(!1),0}copy(t){return Object(i.a)(!1),this}get x(){return this[0]}set x(t){this[0]=Object(s.a)(t)}get y(){return this[1]}set y(t){this[1]=Object(s.a)(t)}len(){return Math.sqrt(this.lengthSquared())}magnitude(){return this.len()}lengthSquared(){let t=0;for(let e=0;e<this.ELEMENTS;++e)t+=this[e]*this[e];return t}magnitudeSquared(){return this.lengthSquared()}distance(t){return Math.sqrt(this.distanceSquared(t))}distanceSquared(t){let e=0;for(let r=0;r<this.ELEMENTS;++r){const n=this[r]-t[r];e+=n*n}return Object(s.a)(e)}dot(t){let e=0;for(let r=0;r<this.ELEMENTS;++r)e+=this[r]*t[r];return Object(s.a)(e)}normalize(){const t=this.magnitude();if(0!==t)for(let e=0;e<this.ELEMENTS;++e)this[e]/=t;return this.check()}multiply(...t){for(const e of t)for(let t=0;t<this.ELEMENTS;++t)this[t]*=e[t];return this.check()}divide(...t){for(const e of t)for(let t=0;t<this.ELEMENTS;++t)this[t]/=e[t];return this.check()}lengthSq(){return this.lengthSquared()}distanceTo(t){return this.distance(t)}distanceToSquared(t){return this.distanceSquared(t)}getComponent(t){return Object(i.a)(t>=0&&t<this.ELEMENTS,"index is out of range"),Object(s.a)(this[t])}setComponent(t,e){return Object(i.a)(t>=0&&t<this.ELEMENTS,"index is out of range"),this[t]=e,this.check()}addVectors(t,e){return this.copy(t).add(e)}subVectors(t,e){return this.copy(t).subtract(e)}multiplyVectors(t,e){return this.copy(t).multiply(e)}addScaledVector(t,e){return this.add(new this.constructor(t).multiplyScalar(e))}}},function(t,e,r){"use strict";r.d(e,"a",(function(){return a}));var n=r(14),s=r(1),i=r(3),o=r(6);class a extends n.a{get ELEMENTS(){return Object(o.a)(!1),0}get RANK(){return Object(o.a)(!1),0}toString(){let t="[";if(i.b.printRowMajor){t+="row-major:";for(let e=0;e<this.RANK;++e)for(let r=0;r<this.RANK;++r)t+=" ".concat(this[r*this.RANK+e])}else{t+="column-major:";for(let e=0;e<this.ELEMENTS;++e)t+=" ".concat(this[e])}return t+="]",t}getElementIndex(t,e){return e*this.RANK+t}getElement(t,e){return this[e*this.RANK+t]}setElement(t,e,r){return this[e*this.RANK+t]=Object(s.a)(r),this}getColumn(t,e=new Array(this.RANK).fill(-0)){const r=t*this.RANK;for(let t=0;t<this.RANK;++t)e[t]=this[r+t];return e}setColumn(t,e){const r=t*this.RANK;for(let t=0;t<this.RANK;++t)this[r+t]=e[t];return this}}},function(t,e){var r;r=function(){return this}();try{r=r||new Function("return this")()}catch(t){"object"==typeof window&&(r=window)}t.exports=r},function(t,e){},,,,function(t,e){},function(t,e){var r,n,s=t.exports={};function i(){throw new Error("setTimeout has not been defined")}function o(){throw new Error("clearTimeout has not been defined")}function a(t){if(r===setTimeout)return setTimeout(t,0);if((r===i||!r)&&setTimeout)return r=setTimeout,setTimeout(t,0);try{return r(t,0)}catch(e){try{return r.call(null,t,0)}catch(e){return r.call(this,t,0)}}}!function(){try{r="function"==typeof setTimeout?setTimeout:i}catch(t){r=i}try{n="function"==typeof clearTimeout?clearTimeout:o}catch(t){n=o}}();var c,u=[],h=!1,f=-1;function l(){h&&c&&(h=!1,c.length?u=c.concat(u):f=-1,u.length&&d())}function d(){if(!h){var t=a(l);h=!0;for(var e=u.length;e;){for(c=u,u=[];++f<e;)c&&c[f].run();f=-1,e=u.length}c=null,h=!1,function(t){if(n===clearTimeout)return clearTimeout(t);if((n===o||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(t);try{n(t)}catch(e){try{return n.call(null,t)}catch(e){return n.call(this,t)}}}(t)}}function y(t,e){this.fun=t,this.array=e}function m(){}s.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)e[r-1]=arguments[r];u.push(new y(t,e)),1!==u.length||h||a(d)},y.prototype.run=function(){this.fun.apply(null,this.array)},s.title="browser",s.browser=!0,s.env={},s.argv=[],s.version="",s.versions={},s.on=m,s.addListener=m,s.once=m,s.off=m,s.removeListener=m,s.removeAllListeners=m,s.emit=m,s.prependListener=m,s.prependOnceListener=m,s.listeners=function(t){return[]},s.binding=function(t){throw new Error("process.binding is not supported")},s.cwd=function(){return"/"},s.chdir=function(t){throw new Error("process.chdir is not supported")},s.umask=function(){return 0}},function(t,e,r){(function(e){const n=r(35),s="undefined"==typeof window?e:window;s.loaders=s.loaders||{},t.exports=Object.assign(s.loaders,n)}).call(this,r(20))},,,,,,,,function(t,e,r){"use strict";r.r(e),r.d(e,"Tiles3DLoader",(function(){return Kr})),r.d(e,"CesiumIonLoader",(function(){return un})),r.d(e,"Tile3DWriter",(function(){return bn})),r.d(e,"Tile3DFeatureTable",(function(){return pt})),r.d(e,"Tile3DBatchTable",(function(){return Nt})),r.d(e,"TILE3D_TYPE",(function(){return p})),r.d(e,"_getIonTilesetMetadata",(function(){return cn}));var n={};r.r(n),r.d(n,"dirname",(function(){return c})),r.d(n,"join",(function(){return u}));var s={};r.r(s),r.d(s,"decode",(function(){return De})),r.d(s,"encode",(function(){return Ce}));var i={};r.r(i),r.d(i,"decode",(function(){return ze})),r.d(i,"encode",(function(){return Ve}));var o={};r.r(o),r.d(o,"decode",(function(){return Ge})),r.d(o,"encode",(function(){return qe}));var a={};function c(t){const e=t&&t.lastIndexOf("/");return e>=0?t.substr(0,e):""}function u(...t){return(t=t.map((e,r)=>(r&&(e=e.replace(new RegExp("^/"),"")),r!==t.length-1&&(e=e.replace(new RegExp("/$"),"")),e))).join("/")}r.r(a),r.d(a,"decode",(function(){return He})),r.d(a,"encode",(function(){return We}));r(25);const h=1,f=2,l="empty",d="scenegraph",y="pointcloud",m="TILES3D",g="geometricError",p={COMPOSITE:"cmpt",POINT_CLOUD:"pnts",BATCHED_3D_MODEL:"b3dm",INSTANCED_3D_MODEL:"i3dm",GEOMETRY:"geom",VECTOR:"vect"},b=(Object.keys(p),{BATCHED_MODEL:[98,51,100,109],INSTANCED_MODEL:[105,51,100,109],POINT_CLOUD:[112,110,116,115],COMPOSITE:[99,109,112,116]});function T(t,e){if(!t)throw new Error(e||"loader assertion failed.")}function w(t,e,r){T(t instanceof ArrayBuffer);const n=new TextDecoder("utf8"),s=new Uint8Array(t,e,r);return n.decode(s)}const E={name:"Draco",id:"draco",module:"draco",shapes:["mesh"],version:"3.1.0-alpha.1",worker:!0,extensions:["drc"],mimeTypes:["application/octet-stream"],binary:!0,tests:["DRACO"],options:{draco:{decoderType:"object"==typeof WebAssembly?"wasm":"js",libraryPath:"libs/",extraAttributes:{},attributeNameEntry:void 0}}};function O(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}class _{constructor(t,e){O(this,"fields",void 0),O(this,"metadata",void 0),function(t,e){if(!t)throw new Error(e||"loader assertion failed.")}(Array.isArray(t)),function(t){const e={};for(const r of t)e[r.name]&&console.warn("Schema: duplicated field name",r.name,r),e[r.name]=!0}(t),this.fields=t,this.metadata=e||new Map}compareTo(t){if(this.metadata!==t.metadata)return!1;if(this.fields.length!==t.fields.length)return!1;for(let e=0;e<this.fields.length;++e)if(!this.fields[e].compareTo(t.fields[e]))return!1;return!0}select(...t){const e=Object.create(null);for(const r of t)e[r]=!0;const r=this.fields.filter(t=>e[t.name]);return new _(r,this.metadata)}selectAt(...t){const e=t.map(t=>this.fields[t]).filter(Boolean);return new _(e,this.metadata)}assign(t){let e,r=this.metadata;if(t instanceof _){const n=t;e=n.fields,r=A(A(new Map,this.metadata),n.metadata)}else e=t;const n=Object.create(null);for(const t of this.fields)n[t.name]=t;for(const t of e)n[t.name]=t;const s=Object.values(n);return new _(s,r)}}function A(t,e){return new Map([...t||new Map,...e||new Map])}function I(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}class v{constructor(t,e,r=!1,n=new Map){I(this,"name",void 0),I(this,"type",void 0),I(this,"nullable",void 0),I(this,"metadata",void 0),this.name=t,this.type=e,this.nullable=r,this.metadata=n}get typeId(){return this.type&&this.type.typeId}clone(){return new v(this.name,this.type,this.nullable,this.metadata)}compareTo(t){return this.name===t.name&&this.type===t.type&&this.nullable===t.nullable&&this.metadata===t.metadata}toString(){return`${this.type}${this.nullable?", nullable":""}${this.metadata?", metadata: "+this.metadata:""}`}}let S,N,x,M,L,j,R,U,P;function B(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}!function(t){t[t.NONE=0]="NONE",t[t.Null=1]="Null",t[t.Int=2]="Int",t[t.Float=3]="Float",t[t.Binary=4]="Binary",t[t.Utf8=5]="Utf8",t[t.Bool=6]="Bool",t[t.Decimal=7]="Decimal",t[t.Date=8]="Date",t[t.Time=9]="Time",t[t.Timestamp=10]="Timestamp",t[t.Interval=11]="Interval",t[t.List=12]="List",t[t.Struct=13]="Struct",t[t.Union=14]="Union",t[t.FixedSizeBinary=15]="FixedSizeBinary",t[t.FixedSizeList=16]="FixedSizeList",t[t.Map=17]="Map",t[t.Dictionary=-1]="Dictionary",t[t.Int8=-2]="Int8",t[t.Int16=-3]="Int16",t[t.Int32=-4]="Int32",t[t.Int64=-5]="Int64",t[t.Uint8=-6]="Uint8",t[t.Uint16=-7]="Uint16",t[t.Uint32=-8]="Uint32",t[t.Uint64=-9]="Uint64",t[t.Float16=-10]="Float16",t[t.Float32=-11]="Float32",t[t.Float64=-12]="Float64",t[t.DateDay=-13]="DateDay",t[t.DateMillisecond=-14]="DateMillisecond",t[t.TimestampSecond=-15]="TimestampSecond",t[t.TimestampMillisecond=-16]="TimestampMillisecond",t[t.TimestampMicrosecond=-17]="TimestampMicrosecond",t[t.TimestampNanosecond=-18]="TimestampNanosecond",t[t.TimeSecond=-19]="TimeSecond",t[t.TimeMillisecond=-20]="TimeMillisecond",t[t.TimeMicrosecond=-21]="TimeMicrosecond",t[t.TimeNanosecond=-22]="TimeNanosecond",t[t.DenseUnion=-23]="DenseUnion",t[t.SparseUnion=-24]="SparseUnion",t[t.IntervalDayTime=-25]="IntervalDayTime",t[t.IntervalYearMonth=-26]="IntervalYearMonth"}(S||(S={}));class D{static isNull(t){return t&&t.typeId===S.Null}static isInt(t){return t&&t.typeId===S.Int}static isFloat(t){return t&&t.typeId===S.Float}static isBinary(t){return t&&t.typeId===S.Binary}static isUtf8(t){return t&&t.typeId===S.Utf8}static isBool(t){return t&&t.typeId===S.Bool}static isDecimal(t){return t&&t.typeId===S.Decimal}static isDate(t){return t&&t.typeId===S.Date}static isTime(t){return t&&t.typeId===S.Time}static isTimestamp(t){return t&&t.typeId===S.Timestamp}static isInterval(t){return t&&t.typeId===S.Interval}static isList(t){return t&&t.typeId===S.List}static isStruct(t){return t&&t.typeId===S.Struct}static isUnion(t){return t&&t.typeId===S.Union}static isFixedSizeBinary(t){return t&&t.typeId===S.FixedSizeBinary}static isFixedSizeList(t){return t&&t.typeId===S.FixedSizeList}static isMap(t){return t&&t.typeId===S.Map}static isDictionary(t){return t&&t.typeId===S.Dictionary}get typeId(){return S.NONE}compareTo(t){return this===t}}Symbol.toStringTag;Symbol.toStringTag;N=Symbol.toStringTag;class C extends D{constructor(t,e){super(),B(this,"isSigned",void 0),B(this,"bitWidth",void 0),this.isSigned=t,this.bitWidth=e}get typeId(){return S.Int}get[N](){return"Int"}toString(){return`${this.isSigned?"I":"Ui"}nt${this.bitWidth}`}}class k extends C{constructor(){super(!0,8)}}class F extends C{constructor(){super(!0,16)}}class z extends C{constructor(){super(!0,32)}}class V extends C{constructor(){super(!1,8)}}class G extends C{constructor(){super(!1,16)}}class q extends C{constructor(){super(!1,32)}}const H=32,W=64;x=Symbol.toStringTag;class $ extends D{constructor(t){super(),B(this,"precision",void 0),this.precision=t}get typeId(){return S.Float}get[x](){return"Float"}toString(){return"Float"+this.precision}}class K extends ${constructor(){super(H)}}class Q extends ${constructor(){super(W)}}Symbol.toStringTag;Symbol.toStringTag;M=Symbol.toStringTag;L=Symbol.toStringTag;j=Symbol.toStringTag;R=Symbol.toStringTag;U=Symbol.toStringTag;class Y extends D{constructor(t,e){super(),B(this,"listSize",void 0),B(this,"children",void 0),this.listSize=t,this.children=[e]}get typeId(){return S.FixedSizeList}get valueType(){return this.children[0].type}get valueField(){return this.children[0]}get[U](){return"FixedSizeList"}toString(){return`FixedSizeList[${this.listSize}]<${this.valueType}>`}}P=Symbol.toStringTag;function Z(t,e,r){const n=function(t){switch(t.constructor){case Int8Array:return new k;case Uint8Array:return new V;case Int16Array:return new F;case Uint16Array:return new G;case Int32Array:return new z;case Uint32Array:return new q;case Float32Array:return new K;case Float64Array:return new Q;default:throw new Error("array type not supported")}}(e.value),s=r||function(t){const e=new Map;"byteOffset"in t&&e.set("byteOffset",t.byteOffset.toString(10));"byteStride"in t&&e.set("byteStride",t.byteStride.toString(10));"normalized"in t&&e.set("normalized",t.normalized.toString());return e}(e);return new v(t,new Y(e.size,new v("value",n)),!1,s)}function J(t,e,r){return Z(t,e,r?X(r.metadata):void 0)}function X(t){const e=new Map;for(const r in t)e.set(r+".string",JSON.stringify(t[r]));return e}function tt(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}const et={POSITION:"POSITION",NORMAL:"NORMAL",COLOR:"COLOR_0",TEX_COORD:"TEXCOORD_0"},rt={1:Int8Array,2:Uint8Array,3:Int16Array,4:Uint16Array,5:Int32Array,6:Uint32Array,9:Float32Array};class nt{constructor(t){tt(this,"draco",void 0),tt(this,"decoder",void 0),tt(this,"metadataQuerier",void 0),this.draco=t,this.decoder=new this.draco.Decoder,this.metadataQuerier=new this.draco.MetadataQuerier}destroy(){this.draco.destroy(this.decoder),this.draco.destroy(this.metadataQuerier)}parseSync(t,e={}){const r=new this.draco.DecoderBuffer;r.Init(new Int8Array(t),t.byteLength),this._disableAttributeTransforms(e);const n=this.decoder.GetEncodedGeometryType(r),s=n===this.draco.TRIANGULAR_MESH?new this.draco.Mesh:new this.draco.PointCloud;try{let t;switch(n){case this.draco.TRIANGULAR_MESH:t=this.decoder.DecodeBufferToMesh(r,s);break;case this.draco.POINT_CLOUD:t=this.decoder.DecodeBufferToPointCloud(r,s);break;default:throw new Error("DRACO: Unknown geometry type.")}if(!t.ok()||!s.ptr){const e="DRACO decompression failed: "+t.error_msg();throw new Error(e)}const i=this._getDracoLoaderData(s,n,e),o=this._getMeshData(s,i,e),a=function(t){let e=1/0,r=1/0,n=1/0,s=-1/0,i=-1/0,o=-1/0;const a=t.POSITION?t.POSITION.value:[],c=a&&a.length;for(let t=0;t<c;t+=3){const c=a[t],u=a[t+1],h=a[t+2];e=c<e?c:e,r=u<r?u:r,n=h<n?h:n,s=c>s?c:s,i=u>i?u:i,o=h>o?h:o}return[[e,r,n],[s,i,o]]}(o.attributes),c=function(t,e,r){const n=X(e.metadata),s=[],i=function(t){const e={};for(const r in t){const n=t[r];e[n.name||"undefined"]=n}return e}(e.attributes);for(const e in t){const r=J(e,t[e],i[e]);s.push(r)}if(r){const t=J("indices",r);s.push(t)}return new _(s,n)}(o.attributes,i,o.indices);return{loader:"draco",loaderData:i,header:{vertexCount:s.num_points(),boundingBox:a},...o,schema:c}}finally{this.draco.destroy(r),s&&this.draco.destroy(s)}}_getDracoLoaderData(t,e,r){const n=this._getTopLevelMetadata(t),s=this._getDracoAttributes(t,r);return{geometry_type:e,num_attributes:t.num_attributes(),num_points:t.num_points(),num_faces:t instanceof this.draco.Mesh?t.num_faces():0,metadata:n,attributes:s}}_getDracoAttributes(t,e){const r={};for(let n=0;n<t.num_attributes();n++){const s=this.decoder.GetAttribute(t,n),i=this._getAttributeMetadata(t,n);r[s.unique_id()]={unique_id:s.unique_id(),attribute_type:s.attribute_type(),data_type:s.data_type(),num_components:s.num_components(),byte_offset:s.byte_offset(),byte_stride:s.byte_stride(),normalized:s.normalized(),attribute_index:n,metadata:i};const o=this._getQuantizationTransform(s,e);o&&(r[s.unique_id()].quantization_transform=o);const a=this._getOctahedronTransform(s,e);a&&(r[s.unique_id()].octahedron_transform=a)}return r}_getMeshData(t,e,r){const n=this._getMeshAttributes(e,t,r);if(!n.POSITION)throw new Error("DRACO: No position attribute found.");if(t instanceof this.draco.Mesh)switch(r.topology){case"triangle-strip":return{topology:"triangle-strip",mode:4,attributes:n,indices:{value:this._getTriangleStripIndices(t),size:1}};case"triangle-list":default:return{topology:"triangle-list",mode:5,attributes:n,indices:{value:this._getTriangleListIndices(t),size:1}}}return{topology:"point-list",mode:0,attributes:n}}_getMeshAttributes(t,e,r){const n={};for(const s of Object.values(t.attributes)){const t=this._deduceAttributeName(s,r);s.name=t;const{value:i,size:o}=this._getAttributeValues(e,s);n[t]={value:i,size:o,byteOffset:s.byte_offset,byteStride:s.byte_stride,normalized:s.normalized}}return n}_getTriangleListIndices(t){const e=3*t.num_faces(),r=4*e,n=this.draco._malloc(r);try{return this.decoder.GetTrianglesUInt32Array(t,r,n),new Uint32Array(this.draco.HEAPF32.buffer,n,e).slice()}finally{this.draco._free(n)}}_getTriangleStripIndices(t){const e=new this.draco.DracoInt32Array;try{return this.decoder.GetTriangleStripsFromMesh(t,e),function(t){const e=t.size(),r=new Int32Array(e);for(let n=0;n<e;n++)r[n]=t.GetValue(n);return r}(e)}finally{this.draco.destroy(e)}}_getAttributeValues(t,e){const r=rt[e.data_type],n=e.num_components,s=t.num_points()*n,i=s*r.BYTES_PER_ELEMENT,o=function(t,e){switch(e){case Float32Array:return t.DT_FLOAT32;case Int8Array:return t.DT_INT8;case Int16Array:return t.DT_INT16;case Int32Array:return t.DT_INT32;case Uint8Array:return t.DT_UINT8;case Uint16Array:return t.DT_UINT16;case Uint32Array:return t.DT_UINT32;default:return t.DT_INVALID}}(this.draco,r);let a;const c=this.draco._malloc(i);try{const n=this.decoder.GetAttribute(t,e.attribute_index);this.decoder.GetAttributeDataArrayForAllPoints(t,n,o,i,c),a=new r(this.draco.HEAPF32.buffer,c,s).slice()}finally{this.draco._free(c)}return{value:a,size:n}}_deduceAttributeName(t,e){const r=t.unique_id;for(const[t,n]of Object.entries(e.extraAttributes||{}))if(n===r)return t;const n=t.attribute_type;for(const t in et){if(this.draco[t]===n)return et[t]}const s=e.attributeNameEntry||"name";return t.metadata[s]?t.metadata[s].string:"CUSTOM_ATTRIBUTE_"+r}_getTopLevelMetadata(t){const e=this.decoder.GetMetadata(t);return this._getDracoMetadata(e)}_getAttributeMetadata(t,e){const r=this.decoder.GetAttributeMetadata(t,e);return this._getDracoMetadata(r)}_getDracoMetadata(t){if(!t||!t.ptr)return{};const e={},r=this.metadataQuerier.NumEntries(t);for(let n=0;n<r;n++){const r=this.metadataQuerier.GetEntryName(t,n);e[r]=this._getDracoMetadataField(t,r)}return e}_getDracoMetadataField(t,e){const r=new this.draco.DracoInt32Array;try{this.metadataQuerier.GetIntEntryArray(t,e,r);const n=function(t){const e=t.size(),r=new Int32Array(e);for(let n=0;n<e;n++)r[n]=t.GetValue(n);return r}(r);return{int:this.metadataQuerier.GetIntEntry(t,e),string:this.metadataQuerier.GetStringEntry(t,e),double:this.metadataQuerier.GetDoubleEntry(t,e),intArray:n}}finally{this.draco.destroy(r)}}_disableAttributeTransforms(t){const{quantizedAttributes:e=[],octahedronAttributes:r=[]}=t,n=[...e,...r];for(const t of n)this.decoder.SkipAttributeTransform(this.draco[t])}_getQuantizationTransform(t,e){const{quantizedAttributes:r=[]}=e,n=t.attribute_type();if(r.map(t=>this.decoder[t]).includes(n)){const e=new this.draco.AttributeQuantizationTransform;try{if(e.InitFromAttribute(t))return{quantization_bits:e.quantization_bits(),range:e.range(),min_values:new Float32Array([1,2,3]).map(t=>e.min_value(t))}}finally{this.draco.destroy(e)}}return null}_getOctahedronTransform(t,e){const{octahedronAttributes:r=[]}=e,n=t.attribute_type();if(r.map(t=>this.decoder[t]).includes(n)){const e=new this.draco.AttributeQuantizationTransform;try{if(e.InitFromAttribute(t))return{quantization_bits:e.quantization_bits()}}finally{this.draco.destroy(e)}}return null}}var st=r(11),it=r(16);const ot={};async function at(t,e=null,r={}){return e&&(t=function(t,e,r){if(t.startsWith("http"))return t;const n=r.modules||{};if(n[t])return n[t];if(!st.b)return`modules/${e}/dist/libs/${t}`;if(r.CDN)return function(t,e){if(!t)throw new Error(e||"loaders.gl assertion failed.")}(r.CDN.startsWith("http")),`${r.CDN}/${e}@3.1.0-alpha.1/dist/libs/${t}`;if(st.c)return"../src/libs/"+t;return`modules/${e}/src/libs/${t}`}(t,e,r)),ot[t]=ot[t]||async function(t){if(t.endsWith("wasm")){const e=await fetch(t);return await e.arrayBuffer()}if(!st.b)return it.requireFromFile&&await it.requireFromFile(t);if(st.c)return importScripts(t);const e=await fetch(t);return function(t,e){if(!st.b)return it.requireFromString&&it.requireFromString(t,e);if(st.c)return eval.call(st.a,t),null;const r=document.createElement("script");r.id=e;try{r.appendChild(document.createTextNode(t))}catch(e){r.text=t}return document.body.appendChild(r),null}(await e.text(),t)}(t),await ot[t]}let ct;async function ut(t){const e=t.modules||{};return ct=e.draco3d?ct||e.draco3d.createDecoderModule({}).then(t=>({draco:t})):ct||async function(t){let e,r;switch(t.draco&&t.draco.decoderType){case"js":e=await at("https://www.gstatic.com/draco/versioned/decoders/1.4.1/draco_decoder.js","draco",t);break;case"wasm":default:[e,r]=await Promise.all([await at("https://www.gstatic.com/draco/versioned/decoders/1.4.1/draco_wasm_wrapper.js","draco",t),await at("https://www.gstatic.com/draco/versioned/decoders/1.4.1/draco_decoder.wasm","draco",t)])}return e=e||globalThis.DracoDecoderModule,await function(t,e){const r={};e&&(r.wasmBinary=e);return new Promise(e=>{t({...r,onModuleLoaded:t=>e({draco:t})})})}(e,r)}(t),await ct}const ht={...E,parse:async function(t,e){const{draco:r}=await ut(e),n=new nt(r);try{return n.parseSync(t,null==e?void 0:e.draco)}finally{n.destroy()}}};const ft={BYTE:5120,UNSIGNED_BYTE:5121,SHORT:5122,UNSIGNED_SHORT:5123,INT:5124,UNSIGNED_INT:5125,FLOAT:5126,DOUBLE:5130},lt={POINTS:0,LINES:1,LINE_LOOP:2,LINE_STRIP:3,TRIANGLES:4,TRIANGLE_STRIP:5,TRIANGLE_FAN:6,...ft};var dt=r(40);const yt={[ft.DOUBLE]:Float64Array,[ft.FLOAT]:Float32Array,[ft.UNSIGNED_SHORT]:Uint16Array,[ft.UNSIGNED_INT]:Uint32Array,[ft.UNSIGNED_BYTE]:Uint8Array,[ft.BYTE]:Int8Array,[ft.SHORT]:Int16Array,[ft.INT]:Int32Array},mt={DOUBLE:ft.DOUBLE,FLOAT:ft.FLOAT,UNSIGNED_SHORT:ft.UNSIGNED_SHORT,UNSIGNED_INT:ft.UNSIGNED_INT,UNSIGNED_BYTE:ft.UNSIGNED_BYTE,BYTE:ft.BYTE,SHORT:ft.SHORT,INT:ft.INT};class gt{static fromTypedArray(t){t=ArrayBuffer.isView(t)?t.constructor:t;for(const e in yt){if(yt[e]===t)return e}throw new Error("Failed to convert GL type")}static fromName(t){const e=mt[t];if(!e)throw new Error("Failed to convert GL type");return e}static getArrayType(t){switch(t){case ft.UNSIGNED_SHORT_5_6_5:case ft.UNSIGNED_SHORT_4_4_4_4:case ft.UNSIGNED_SHORT_5_5_5_1:return Uint16Array;default:const e=yt[t];if(!e)throw new Error("Failed to convert GL type");return e}}static getByteSize(t){return gt.getArrayType(t).BYTES_PER_ELEMENT}static validate(t){return Boolean(gt.getArrayType(t))}static createTypedArray(t,e,r=0,n){void 0===n&&(n=(e.byteLength-r)/gt.getByteSize(t));return new(gt.getArrayType(t))(e,r,n)}}class pt{constructor(t,e){this.json=t,this.buffer=e,this.featuresLength=0,this._cachedTypedArrays={}}getExtension(t){return this.json.extensions&&this.json.extensions[t]}hasProperty(t){return Boolean(this.json[t])}getGlobalProperty(t,e=lt.UNSIGNED_INT,r=1){const n=this.json[t];return n&&Number.isFinite(n.byteOffset)?this._getTypedArrayFromBinary(t,e,r,1,n.byteOffset):n}getPropertyArray(t,e,r){const n=this.json[t];return n&&Number.isFinite(n.byteOffset)?("componentType"in n&&(e=gt.fromName(n.componentType)),this._getTypedArrayFromBinary(t,e,r,this.featuresLength,n.byteOffset)):this._getTypedArrayFromArray(t,e,n)}getProperty(t,e,r,n,s){const i=this.json[t];if(!i)return i;const o=this.getPropertyArray(t,e,r);if(1===r)return o[n];for(let t=0;t<r;++t)s[t]=o[r*n+t];return s}_getTypedArrayFromBinary(t,e,r,n,s){const i=this._cachedTypedArrays;let o=i[t];return o||(o=gt.createTypedArray(e,this.buffer.buffer,this.buffer.byteOffset+s,n*r),i[t]=o),o}_getTypedArrayFromArray(t,e,r){const n=this._cachedTypedArrays;let s=n[t];return s||(s=gt.createTypedArray(e,r),n[t]=s),s}}const bt={SCALAR:1,VEC2:2,VEC3:3,VEC4:4,MAT2:4,MAT3:9,MAT4:16},Tt={SCALAR:(t,e)=>t[e],VEC2:(t,e)=>[t[2*e+0],t[2*e+1]],VEC3:(t,e)=>[t[3*e+0],t[3*e+1],t[3*e+2]],VEC4:(t,e)=>[t[4*e+0],t[4*e+1],t[4*e+2],t[4*e+3]],MAT2:(t,e)=>[t[4*e+0],t[4*e+1],t[4*e+2],t[4*e+3]],MAT3:(t,e)=>[t[9*e+0],t[9*e+1],t[9*e+2],t[9*e+3],t[9*e+4],t[9*e+5],t[9*e+6],t[9*e+7],t[9*e+8]],MAT4:(t,e)=>[t[16*e+0],t[16*e+1],t[16*e+2],t[16*e+3],t[16*e+4],t[16*e+5],t[16*e+6],t[16*e+7],t[16*e+8],t[16*e+9],t[16*e+10],t[16*e+11],t[16*e+12],t[16*e+13],t[16*e+14],t[16*e+15]]},wt={SCALAR:(t,e,r)=>{e[r]=t},VEC2:(t,e,r)=>{e[2*r+0]=t[0],e[2*r+1]=t[1]},VEC3:(t,e,r)=>{e[3*r+0]=t[0],e[3*r+1]=t[1],e[3*r+2]=t[2]},VEC4:(t,e,r)=>{e[4*r+0]=t[0],e[4*r+1]=t[1],e[4*r+2]=t[2],e[4*r+3]=t[3]},MAT2:(t,e,r)=>{e[4*r+0]=t[0],e[4*r+1]=t[1],e[4*r+2]=t[2],e[4*r+3]=t[3]},MAT3:(t,e,r)=>{e[9*r+0]=t[0],e[9*r+1]=t[1],e[9*r+2]=t[2],e[9*r+3]=t[3],e[9*r+4]=t[4],e[9*r+5]=t[5],e[9*r+6]=t[6],e[9*r+7]=t[7],e[9*r+8]=t[8],e[9*r+9]=t[9]},MAT4:(t,e,r)=>{e[16*r+0]=t[0],e[16*r+1]=t[1],e[16*r+2]=t[2],e[16*r+3]=t[3],e[16*r+4]=t[4],e[16*r+5]=t[5],e[16*r+6]=t[6],e[16*r+7]=t[7],e[16*r+8]=t[8],e[16*r+9]=t[9],e[16*r+10]=t[10],e[16*r+11]=t[11],e[16*r+12]=t[12],e[16*r+13]=t[13],e[16*r+14]=t[14],e[16*r+15]=t[15]}};const Et=t=>void 0!==t;function Ot(t,e,r){if(!e)return null;let n=t.getExtension("3DTILES_batch_table_hierarchy");const s=e.HIERARCHY;return s&&(console.warn("3D Tile Parser: HIERARCHY is deprecated. Use 3DTILES_batch_table_hierarchy."),e.extensions=e.extensions||{},e.extensions["3DTILES_batch_table_hierarchy"]=s,n=s),n?function(t,e){let r,n,s;const i=t.instancesLength,o=t.classes;let a,c=t.classIds,u=t.parentCounts,h=t.parentIds,f=i;Et(c.byteOffset)&&(c.componentType=defaultValue(c.componentType,GL.UNSIGNED_SHORT),c.type=AttributeType.SCALAR,s=getBinaryAccessor(c),c=s.createArrayBufferView(e.buffer,e.byteOffset+c.byteOffset,i));if(Et(u))for(Et(u.byteOffset)&&(u.componentType=defaultValue(u.componentType,GL.UNSIGNED_SHORT),u.type=AttributeType.SCALAR,s=getBinaryAccessor(u),u=s.createArrayBufferView(e.buffer,e.byteOffset+u.byteOffset,i)),a=new Uint16Array(i),f=0,r=0;r<i;++r)a[r]=f,f+=u[r];Et(h)&&Et(h.byteOffset)&&(h.componentType=defaultValue(h.componentType,GL.UNSIGNED_SHORT),h.type=AttributeType.SCALAR,s=getBinaryAccessor(h),h=s.createArrayBufferView(e.buffer,e.byteOffset+h.byteOffset,f));const l=o.length;for(r=0;r<l;++r){const t=o[r].length,n=o[r].instances,s=getBinaryProperties(t,n,e);o[r].instances=combine(s,n)}const d=new Array(l).fill(0),y=new Uint16Array(i);for(r=0;r<i;++r)n=c[r],y[r]=d[n],++d[n];const m={classes:o,classIds:c,classIndexes:y,parentCounts:u,parentIndexes:a,parentIds:h};return function(t){const e=t.classIds.length;for(let r=0;r<e;++r)At(t,r,stack)}(m),m}(n,r):null}function _t(t,e,r){if(!t)return;const n=t.parentCounts;return t.parentIds?r(t,e):n>0?function(t,e,r){const n=t.classIds,s=t.parentCounts,i=t.parentIds,o=t.parentIndexes,a=n.length,c=scratchVisited;c.length=Math.max(c.length,a);const u=++marker,h=scratchStack;h.length=0,h.push(e);for(;h.length>0;){if(e=h.pop(),c[e]===u)continue;c[e]=u;const n=r(t,e);if(Et(n))return n;const a=s[e],f=o[e];for(let t=0;t<a;++t){const r=i[f+t];r!==e&&h.push(r)}}return null}(t,e,r):function(t,e,r){let n=!0;for(;n;){const s=r(t,e);if(Et(s))return s;const i=t.parentIds[e];n=i!==e,e=i}throw new Error("traverseHierarchySingleParent")}(t,e,r)}function At(t,e,r){const n=t.parentCounts,s=t.parentIds,i=t.parentIndexes,o=t.classIds.length;if(!Et(s))return;assert(e<o,`Parent index ${e} exceeds the total number of instances: ${o}`),assert(-1===r.indexOf(e),"Circular dependency detected in the batch table hierarchy."),r.push(e);const a=Et(n)?n[e]:1,c=Et(n)?i[e]:e;for(let n=0;n<a;++n){const i=s[c+n];i!==e&&At(t,i,r)}r.pop(e)}function It(t){return null!=t}const vt=(t,e)=>t,St={HIERARCHY:!0,extensions:!0,extras:!0};class Nt{constructor(t,e,r,n={}){var s;T(r>=0),this.json=t||{},this.binary=e,this.featureCount=r,this._extensions=(null===(s=this.json)||void 0===s?void 0:s.extensions)||{},this._properties={};for(const t in this.json)St[t]||(this._properties[t]=this.json[t]);this._binaryProperties=this._initializeBinaryProperties(),n["3DTILES_batch_table_hierarchy"]&&(this._hierarchy=Ot(this,this.json,this.binary))}getExtension(t){return this.json&&this.json.extensions&&this.json.extensions[t]}memorySizeInBytes(){return 0}isClass(t,e){if(this._checkBatchId(t),T("string"==typeof e,e),this._hierarchy){return It(_t(this._hierarchy,t,(t,r)=>{const n=t.classIds[r];return t.classes[n].name===e}))}return!1}isExactClass(t,e){return T("string"==typeof e,e),this.getExactClassName(t)===e}getExactClassName(t){if(this._checkBatchId(t),this._hierarchy){const e=this._hierarchy.classIds[t];return this._hierarchy.classes[e].name}}hasProperty(t,e){return this._checkBatchId(t),T("string"==typeof e,e),It(this._properties[e])||this._hasPropertyInHierarchy(t,e)}getPropertyNames(t,e){this._checkBatchId(t),(e=It(e)?e:[]).length=0;const r=Object.keys(this._properties);return e.push(...r),this._hierarchy&&this._getPropertyNamesInHierarchy(t,e),e}getProperty(t,e){if(this._checkBatchId(t),T("string"==typeof e,e),this._binaryProperties){const r=this._binaryProperties[e];if(It(r))return this._getBinaryProperty(r,t)}const r=this._properties[e];if(It(r))return vt(r[t]);if(this._hierarchy){const r=this._getHierarchyProperty(t,e);if(It(r))return r}}setProperty(t,e,r){const n=this.featureCount;if(this._checkBatchId(t),T("string"==typeof e,e),this._binaryProperties){const n=this._binaryProperties[e];if(n)return void this._setBinaryProperty(n,t,r)}if(this._hierarchy&&this._setHierarchyProperty(this,t,e,r))return;let s=this._properties[e];It(s)||(this._properties[e]=new Array(n),s=this._properties[e]),s[t]=vt(r)}_checkBatchId(t){if(!(t>=0&&t<this.featureCount))throw new Error("batchId not in range [0, featureCount - 1].")}_getBinaryProperty(t,e){return t.unpack(t.typedArray,e)}_setBinaryProperty(t,e,r){t.pack(r,t.typedArray,e)}_initializeBinaryProperties(){let t=null;for(const e in this._properties){const r=this._properties[e],n=this._initializeBinaryProperty(e,r);n&&(t=t||{},t[e]=n)}return t}_initializeBinaryProperty(t,e){if("byteOffset"in e){const r=e;T(this.binary,`Property ${t} requires a batch table binary.`),T(r.type,`Property ${t} requires a type.`);const n=function(t,e,r,n){const{componentType:s}=t;T(t.componentType);const i="string"==typeof s?gt.fromName(s):s,o=bt[t.type],a=Tt[t.type],c=wt[t.type];return r+=t.byteOffset,{values:gt.createTypedArray(i,e,r,o*n),type:i,size:o,unpacker:a,packer:c}}(r,this.binary.buffer,0|this.binary.byteOffset,this.featureCount);return{typedArray:n.values,componentCount:n.size,unpack:n.unpacker,pack:n.packer}}return null}_hasPropertyInHierarchy(t,e){if(!this._hierarchy)return!1;const r=_t(this._hierarchy,t,(t,r)=>{const n=t.classIds[r];return It(t.classes[n].instances[e])});return It(r)}_getPropertyNamesInHierarchy(t,e){_t(this._hierarchy,t,(t,r)=>{const n=t.classIds[r],s=t.classes[n].instances;for(const t in s)s.hasOwnProperty(t)&&-1===e.indexOf(t)&&e.push(t)})}_getHierarchyProperty(t,e){return _t(this._hierarchy,t,(t,r)=>{const n=t.classIds[r],s=t.classes[n],i=t.classIndexes[r],o=s.instances[e];return It(o)?It(o.typedArray)?this._getBinaryProperty(o,i):vt(o[i]):null})}_setHierarchyProperty(t,e,r,n){const s=_t(this._hierarchy,e,(t,s)=>{const i=t.classIds[s],o=t.classes[i],a=t.classIndexes[s],c=o.instances[r];return!!It(c)&&(T(s===e,`Inherited property "${r}" is read-only.`),It(c.typedArray)?this._setBinaryProperty(c,a,n):c[a]=vt(n),!0)});return It(s)}}function xt(t,e,r=0){const n=new DataView(e);if(t.magic=n.getUint32(r,!0),r+=4,t.version=n.getUint32(r,!0),r+=4,t.byteLength=n.getUint32(r,!0),r+=4,1!==t.version)throw new Error(`3D Tile Version ${t.version} not supported`);return r}function Mt(t,e,r){const n=new DataView(e);let s;t.header=t.header||{};let i=n.getUint32(r,!0);r+=4;let o=n.getUint32(r,!0);r+=4;let a=n.getUint32(r,!0);r+=4;let c=n.getUint32(r,!0);return r+=4,a>=570425344?(r-=8,s=i,a=o,c=0,i=0,o=0,console.warn("b3dm tile in legacy format.")):c>=570425344&&(r-=4,s=a,a=i,c=o,i=0,o=0,console.warn("b3dm tile in legacy format.")),t.header.featureTableJsonByteLength=i,t.header.featureTableBinaryByteLength=o,t.header.batchTableJsonByteLength=a,t.header.batchTableBinaryByteLength=c,t.header.batchLength=s,r}function Lt(t,e,r,n){return r=function(t,e,r,n){const{featureTableJsonByteLength:s,featureTableBinaryByteLength:i,batchLength:o}=t.header;if(t.featureTableJson={BATCH_LENGTH:o||0},s>0){const n=w(e,r,s);t.featureTableJson=JSON.parse(n)}return r+=s,t.featureTableBinary=new Uint8Array(e,r,i),r+=i}(t,e,r),r=function(t,e,r,n){const{batchTableJsonByteLength:s,batchTableBinaryByteLength:i}=t.header;if(s>0){const n=w(e,r,s);t.batchTableJson=JSON.parse(n),r+=s,i>0&&(t.batchTableBinary=new Uint8Array(e,r,i),t.batchTableBinary=new Uint8Array(t.batchTableBinary),r+=i)}return r}(t,e,r)}function jt(t,e=[0,0,0]){const r=t>>11&31,n=t>>5&63,s=31&t;return e[0]=r<<3,e[1]=n<<2,e[2]=s<<3,e}function Rt(t,e,r){if(!(e||t&&t.batchIds&&r))return null;const{batchIds:n,isRGB565:s,pointCount:i}=t;if(n&&r){const t=new Uint8ClampedArray(3*i);for(let e=0;e<i;e++){const s=n[e],i=r.getProperty(s,"dimensions").map(t=>255*t);t[3*e]=i[0],t[3*e+1]=i[1],t[3*e+2]=i[2]}return{type:lt.UNSIGNED_BYTE,value:t,size:3,normalized:!0}}if(s){const t=new Uint8ClampedArray(3*i);for(let r=0;r<i;r++){const n=jt(e[r]);t[3*r]=n[0],t[3*r+1]=n[1],t[3*r+2]=n[2]}return{type:lt.UNSIGNED_BYTE,value:t,size:3,normalized:!0}}return e&&e.length===3*i?{type:lt.UNSIGNED_BYTE,value:e,size:3,normalized:!0}:{type:lt.UNSIGNED_BYTE,value:e,size:4,normalized:!0}}var Ut=r(18),Pt=r(3),Bt=r(1),Dt=r(9),Ct=r(8);class kt extends Ut.a{constructor(t=0,e=0){super(2),Object(Pt.e)(t)&&1===arguments.length?this.copy(t):(Pt.b.debug&&(Object(Bt.a)(t),Object(Bt.a)(e)),this[0]=t,this[1]=e)}set(t,e){return this[0]=t,this[1]=e,this.check()}copy(t){return this[0]=t[0],this[1]=t[1],this.check()}fromObject(t){return Pt.b.debug&&(Object(Bt.a)(t.x),Object(Bt.a)(t.y)),this[0]=t.x,this[1]=t.y,this.check()}toObject(t){return t.x=this[0],t.y=this[1],t}get ELEMENTS(){return 2}horizontalAngle(){return Math.atan2(this.y,this.x)}verticalAngle(){return Math.atan2(this.x,this.y)}transform(t){return this.transformAsPoint(t)}transformAsPoint(t){return Dt.d(this,this,t),this.check()}transformAsVector(t){return Object(Ct.a)(this,this,t),this.check()}transformByMatrix3(t){return Dt.c(this,this,t),this.check()}transformByMatrix2x3(t){return Dt.b(this,this,t),this.check()}transformByMatrix2(t){return Dt.a(this,this,t),this.check()}}var Ft=r(41);function zt(t,e){if(!t)throw new Error("math.gl assertion failed. "+e)}new kt,new dt.a,new kt,new kt,new Uint8Array(1);function Vt(t,e=255){return Object(Pt.a)(t,0,e)/e*2-1}function Gt(t){return t<0?-1:1}function qt(t,e,r,n){if(zt(n),t<0||t>r||e<0||e>r)throw new Error("x and y must be unsigned normalized integers between 0 and "+r);if(n.x=Vt(t,r),n.y=Vt(e,r),n.z=1-(Math.abs(n.x)+Math.abs(n.y)),n.z<0){const t=n.x;n.x=(1-Math.abs(n.y))*Gt(t),n.y=(1-Math.abs(t))*Gt(n.y)}return n.normalize()}function Ht(t,e,r){return qt(t,e,255,r)}const Wt=new dt.a;function $t(t,e,r){return t.isQuantized?r["3d-tiles"]&&r["3d-tiles"].decodeQuantizedPositions?(t.isQuantized=!1,function(t,e){const r=new dt.a,n=new Float32Array(3*t.pointCount);for(let s=0;s<t.pointCount;s++)r.set(e[3*s],e[3*s+1],e[3*s+2]).scale(1/t.quantizedRange).multiply(t.quantizedVolumeScale).add(t.quantizedVolumeOffset).toArray(n,3*s);return n}(t,e)):{type:lt.UNSIGNED_SHORT,value:e,size:3,normalized:!0}:e}async function Kt(t,e,r,n,s){r=Lt(t,e,r=Mt(t,e,r=xt(t,e,r))),function(t){t.attributes={positions:null,colors:null,normals:null,batchIds:null},t.isQuantized=!1,t.isTranslucent=!1,t.isRGB565=!1,t.isOctEncoded16P=!1}(t);const{featureTable:i,batchTable:o}=function(t){const e=new pt(t.featureTableJson,t.featureTableBinary),r=e.getGlobalProperty("POINTS_LENGTH");if(!Number.isFinite(r))throw new Error("POINTS_LENGTH must be defined");e.featuresLength=r,t.featuresLength=r,t.pointsLength=r,t.pointCount=r,t.rtcCenter=e.getGlobalProperty("RTC_CENTER",lt.FLOAT,3);const n=function(t,e){let r=null;if(!t.batchIds&&e.hasProperty("BATCH_ID")&&(t.batchIds=e.getPropertyArray("BATCH_ID",lt.UNSIGNED_SHORT,1),t.batchIds)){const n=e.getGlobalProperty("BATCH_LENGTH");if(!n)throw new Error("Global property: BATCH_LENGTH must be defined when BATCH_ID is defined.");const{batchTableJson:s,batchTableBinary:i}=t;r=new Nt(s,i,n)}return r}(t,e);return{featureTable:e,batchTable:n}}(t);return await async function(t,e,r,n,s){let i,o,a;const c=t.batchTableJson&&t.batchTableJson.extensions&&t.batchTableJson.extensions["3DTILES_draco_point_compression"];c&&(a=c.properties);const u=e.getExtension("3DTILES_draco_point_compression");if(u){o=u.properties;const e=u.byteOffset,r=u.byteLength;if(!o||!Number.isFinite(e)||!r)throw new Error("Draco properties, byteOffset, and byteLength must be defined");i=t.featureTableBinary.slice(e,e+r),t.hasPositions=Number.isFinite(o.POSITION),t.hasColors=Number.isFinite(o.RGB)||Number.isFinite(o.RGBA),t.hasNormals=Number.isFinite(o.NORMAL),t.hasBatchIds=Number.isFinite(o.BATCH_ID),t.isTranslucent=Number.isFinite(o.RGBA)}if(!i)return!0;const h={buffer:i,properties:{...o,...a},featureTableProperties:o,batchTableProperties:a,dequantizeInShader:!1};return await async function(t,e,r,n){const{parse:s}=n,i={...r,draco:{...r.draco,extraAttributes:e.batchTableProperties||{}}};delete i["3d-tiles"];const o=await s(e.buffer,ht,i),a=o.attributes.POSITION&&o.attributes.POSITION.value,c=o.attributes.COLOR_0&&o.attributes.COLOR_0.value,u=o.attributes.NORMAL&&o.attributes.NORMAL.value,h=o.attributes.BATCH_ID&&o.attributes.BATCH_ID.value,f=a&&o.attributes.POSITION.value.quantization,l=u&&o.attributes.NORMAL.value.quantization;if(f){const e=o.POSITION.data.quantization,r=e.range;t.quantizedVolumeScale=new dt.a(r,r,r),t.quantizedVolumeOffset=new dt.a(e.minValues),t.quantizedRange=(1<<e.quantizationBits)-1,t.isQuantizedDraco=!0}l&&(t.octEncodedRange=(1<<o.NORMAL.data.quantization.quantizationBits)-1,t.isOctEncodedDraco=!0);const d={};if(e.batchTableProperties)for(const t of Object.keys(e.batchTableProperties))o.attributes[t]&&o.attributes[t].value&&(d[t.toLowerCase()]=o.attributes[t].value);t.attributes={positions:a,colors:Rt(t,c),normals:u,batchIds:h,...d}}(t,h,n,s)}(t,i,0,n,s),function(t,e,r){if(!t.attributes.positions)if(e.hasProperty("POSITION"))t.attributes.positions=e.getPropertyArray("POSITION",lt.FLOAT,3);else if(e.hasProperty("POSITION_QUANTIZED")){const n=e.getPropertyArray("POSITION_QUANTIZED",lt.UNSIGNED_SHORT,3);if(t.isQuantized=!0,t.quantizedRange=65535,t.quantizedVolumeScale=e.getGlobalProperty("QUANTIZED_VOLUME_SCALE",lt.FLOAT,3),!t.quantizedVolumeScale)throw new Error("QUANTIZED_VOLUME_SCALE must be defined for quantized positions.");if(t.quantizedVolumeOffset=e.getGlobalProperty("QUANTIZED_VOLUME_OFFSET",lt.FLOAT,3),!t.quantizedVolumeOffset)throw new Error("QUANTIZED_VOLUME_OFFSET must be defined for quantized positions.");t.attributes.positions=$t(t,n,r)}if(!t.attributes.positions)throw new Error("Either POSITION or POSITION_QUANTIZED must be defined.")}(t,i,n),function(t,e,r){if(!t.attributes.colors){let n=null;e.hasProperty("RGBA")?(n=e.getPropertyArray("RGBA",lt.UNSIGNED_BYTE,4),t.isTranslucent=!0):e.hasProperty("RGB")?n=e.getPropertyArray("RGB",lt.UNSIGNED_BYTE,3):e.hasProperty("RGB565")&&(n=e.getPropertyArray("RGB565",lt.UNSIGNED_SHORT,1),t.isRGB565=!0),t.attributes.colors=Rt(t,n,r)}e.hasProperty("CONSTANT_RGBA")&&(t.constantRGBA=e.getGlobalProperty("CONSTANT_RGBA",lt.UNSIGNED_BYTE,4))}(t,i,o),function(t,e){if(!t.attributes.normals){let r=null;e.hasProperty("NORMAL")?r=e.getPropertyArray("NORMAL",lt.FLOAT,3):e.hasProperty("NORMAL_OCT16P")&&(r=e.getPropertyArray("NORMAL_OCT16P",lt.UNSIGNED_BYTE,2),t.isOctEncoded16P=!0),t.attributes.normals=function(t,e){if(!e)return null;if(t.isOctEncoded16P){const r=new Float32Array(3*t.pointsLength);for(let n=0;n<t.pointsLength;n++)Ht(e[2*n],e[2*n+1],Wt),Wt.toArray(r,3*n);return{type:lt.FLOAT,size:2,value:r}}return{type:lt.FLOAT,size:2,value:e}}(t,r)}}(t,i),r}function Qt(t,e){if(!t)throw new Error(e)}var Yt=r(15);const{_parseImageNode:Zt}=Yt.a,Jt="undefined"!=typeof Image,Xt="undefined"!=typeof ImageBitmap,te=Boolean(Zt),ee=!!Yt.b||te;function re(t){const e=se(t);if(!e)throw new Error("Not an image");return e}function ne(t){switch(re(t)){case"data":return t;case"image":case"imagebitmap":const e=document.createElement("canvas"),r=e.getContext("2d");if(!r)throw new Error("getImageData");return e.width=t.width,e.height=t.height,r.drawImage(t,0,0),r.getImageData(0,0,t.width,t.height);default:throw new Error("getImageData")}}function se(t){return"undefined"!=typeof ImageBitmap&&t instanceof ImageBitmap?"imagebitmap":"undefined"!=typeof Image&&t instanceof Image?"image":t&&"object"==typeof t&&t.data&&t.width&&t.height?"data":null}const ie=/^data:image\/svg\+xml/,oe=/\.svg((\?|#).*)?$/;function ae(t){return t&&(ie.test(t)||oe.test(t))}function ce(t,e){if(ae(e))throw new Error("SVG cannot be parsed directly to imagebitmap");return new Blob([new Uint8Array(t)])}async function ue(t,e,r){const n=function(t,e){if(ae(e)){let e=(new TextDecoder).decode(t);try{"function"==typeof unescape&&"function"==typeof encodeURIComponent&&(e=unescape(encodeURIComponent(e)))}catch(t){throw new Error(t.message)}return"data:image/svg+xml;base64,"+btoa(e)}return ce(t,e)}(t,r),s=self.URL||self.webkitURL,i="string"!=typeof n&&s.createObjectURL(n);try{return await async function(t,e){const r=new Image;if(r.src=t,e.image&&e.image.decode&&r.decode)return await r.decode(),r;return await new Promise((e,n)=>{try{r.onload=()=>e(r),r.onerror=e=>n(new Error(`Could not load image ${t}: ${e}`))}catch(t){n(t)}})}(i||n,e)}finally{i&&s.revokeObjectURL(i)}}const he={};let fe=!0;async function le(t,e,r){let n;if(ae(r)){n=await ue(t,e,r)}else n=ce(t,r);const s=e&&e.imagebitmap;return await async function(t,e=null){!function(t){for(const e in t||he)return!1;return!0}(e)&&fe||(e=null);if(e)try{return await createImageBitmap(t,e)}catch(t){console.warn(t),fe=!1}return await createImageBitmap(t)}(n,s)}function de(t){const e=ye(t);return function(t){const e=ye(t);if(!(e.byteLength>=24&&2303741511===e.getUint32(0,!1)))return null;return{mimeType:"image/png",width:e.getUint32(16,!1),height:e.getUint32(20,!1)}}(e)||function(t){const e=ye(t);if(!(e.byteLength>=3&&65496===e.getUint16(0,!1)&&255===e.getUint8(2)))return null;const{tableMarkers:r,sofMarkers:n}=function(){const t=new Set([65499,65476,65484,65501,65534]);for(let e=65504;e<65520;++e)t.add(e);const e=new Set([65472,65473,65474,65475,65477,65478,65479,65481,65482,65483,65485,65486,65487,65502]);return{tableMarkers:t,sofMarkers:e}}();let s=2;for(;s+9<e.byteLength;){const t=e.getUint16(s,!1);if(n.has(t))return{mimeType:"image/jpeg",height:e.getUint16(s+5,!1),width:e.getUint16(s+7,!1)};if(!r.has(t))return null;s+=2,s+=e.getUint16(s,!1)}return null}(e)||function(t){const e=ye(t);if(!(e.byteLength>=10&&1195984440===e.getUint32(0,!1)))return null;return{mimeType:"image/gif",width:e.getUint16(6,!0),height:e.getUint16(8,!0)}}(e)||function(t){const e=ye(t);if(!(e.byteLength>=14&&16973===e.getUint16(0,!1)&&e.getUint32(2,!0)===e.byteLength))return null;return{mimeType:"image/bmp",width:e.getUint32(18,!0),height:e.getUint32(22,!0)}}(e)}function ye(t){if(t instanceof DataView)return t;if(ArrayBuffer.isView(t))return new DataView(t.buffer);if(t instanceof ArrayBuffer)return new DataView(t);throw new Error("toDataView")}const me={id:"image",module:"images",name:"Images",version:"3.1.0-alpha.1",mimeTypes:["image/png","image/jpeg","image/gif","image/webp","image/bmp","image/vnd.microsoft.icon","image/svg+xml"],extensions:["png","jpg","jpeg","gif","webp","bmp","ico","svg"],parse:async function(t,e,r){const n=((e=e||{}).image||{}).type||"auto",{url:s}=r||{};let i;switch(function(t){switch(t){case"auto":case"data":return function(){if(Xt)return"imagebitmap";if(Jt)return"image";if(ee)return"data";throw new Error("Install '@loaders.gl/polyfills' to parse images under Node.js")}();default:return function(t){switch(t){case"auto":return Xt||Jt||ee;case"imagebitmap":return Xt;case"image":return Jt;case"data":return ee;default:throw new Error(`@loaders.gl/images: image ${t} not supported in this environment`)}}(t),t}}(n)){case"imagebitmap":i=await le(t,e,s);break;case"image":i=await ue(t,e,s);break;case"data":i=await function(t,e){const{mimeType:r}=de(t)||{},{_parseImageNode:n}=Yt.a;return Qt(n),n(t,r,e)}(t,e);break;default:Qt(!1)}return"data"===n&&(i=ne(i)),i},tests:[t=>Boolean(de(new DataView(t)))],options:{image:{type:"auto",decode:!0}}};function ge(t,e,r){if(t.byteLength<=e+r)return"";const n=new DataView(t);let s="";for(let t=0;t<r;t++)s+=String.fromCharCode(n.getUint8(e+t));return s}function pe(t){try{return JSON.parse(t)}catch(e){throw new Error(`Failed to parse JSON from data starting with "${function(t,e=5){if("string"==typeof t)return t.slice(0,e);if(ArrayBuffer.isView(t))return ge(t.buffer,t.byteOffset,e);if(t instanceof ArrayBuffer){return ge(t,0,e)}return""}(t)}"`)}}r(21);function be(t,e,r){const n=void 0!==r?new Uint8Array(t).subarray(e,e+r):new Uint8Array(t).subarray(e);return new Uint8Array(n).buffer}function Te(t,e){if(!t)throw new Error(e||"assert failed: gltf")}function we(t,e){if(t.startsWith("data:")||t.startsWith("http:")||t.startsWith("https:"))return t;const r=e.baseUri||e.uri;if(!r)throw new Error("'baseUri' must be provided to resolve relative url "+t);return r.substr(0,r.lastIndexOf("/")+1)+t}function Ee(t,e,r){const n=t.bufferViews[r];Te(n);const s=e[n.buffer];Te(s);const i=(n.byteOffset||0)+s.byteOffset;return new Uint8Array(s.arrayBuffer,i,n.byteLength)}function Oe(t,e){return T(t>=0),T(e>0),t+(e-1)&~(e-1)}function _e(t,e,r){let n;if(t instanceof ArrayBuffer)n=new Uint8Array(t);else{const e=t.byteOffset,r=t.byteLength;n=new Uint8Array(t.buffer||t.arrayBuffer,e,r)}return e.set(n,r),r+Oe(n.byteLength,4)}const Ae=["SCALAR","VEC2","VEC3","VEC4"],Ie=[[Int8Array,5120],[Uint8Array,5121],[Int16Array,5122],[Uint16Array,5123],[Uint32Array,5125],[Float32Array,5126],[Float64Array,5130]],ve=new Map(Ie),Se={SCALAR:1,VEC2:2,VEC3:3,VEC4:4,MAT2:4,MAT3:9,MAT4:16},Ne={5120:1,5121:1,5122:2,5123:2,5125:4,5126:4},xe={5120:Int8Array,5121:Uint8Array,5122:Int16Array,5123:Uint16Array,5125:Uint32Array,5126:Float32Array};function Me(t){return Ae[t-1]||Ae[0]}function Le(t){const e=ve.get(t.constructor);if(!e)throw new Error("Illegal typed array");return e}function je(t,e){const r=xe[t.componentType],n=Se[t.type],s=Ne[t.componentType],i=t.count*n,o=t.count*n*s;return Te(o>=0&&o<=e.byteLength),{ArrayType:r,length:i,byteLength:o}}function Re(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}const Ue={asset:{version:"2.0",generator:"loaders.gl"},buffers:[]};class Pe{constructor(t){Re(this,"gltf",void 0),Re(this,"sourceBuffers",void 0),Re(this,"byteLength",void 0),this.gltf=t||{json:{...Ue},buffers:[]},this.sourceBuffers=[],this.byteLength=0,this.gltf.buffers&&this.gltf.buffers[0]&&(this.byteLength=this.gltf.buffers[0].byteLength,this.sourceBuffers=[this.gltf.buffers[0]])}get json(){return this.gltf.json}getApplicationData(t){return this.json[t]}getExtraData(t){return(this.json.extras||{})[t]}getExtension(t){const e=this.getUsedExtensions().find(e=>e===t),r=this.json.extensions||{};return e?r[t]||!0:null}getRequiredExtension(t){return this.getRequiredExtensions().find(e=>e===t)?this.getExtension(t):null}getRequiredExtensions(){return this.json.extensionsRequired||[]}getUsedExtensions(){return this.json.extensionsUsed||[]}getObjectExtension(t,e){return(t.extensions||{})[e]}getScene(t){return this.getObject("scenes",t)}getNode(t){return this.getObject("nodes",t)}getSkin(t){return this.getObject("skins",t)}getMesh(t){return this.getObject("meshes",t)}getMaterial(t){return this.getObject("materials",t)}getAccessor(t){return this.getObject("accessors",t)}getTexture(t){return this.getObject("textures",t)}getSampler(t){return this.getObject("samplers",t)}getImage(t){return this.getObject("images",t)}getBufferView(t){return this.getObject("bufferViews",t)}getBuffer(t){return this.getObject("buffers",t)}getObject(t,e){if("object"==typeof e)return e;const r=this.json[t]&&this.json[t][e];if(!r)throw new Error(`glTF file error: Could not find ${t}[${e}]`);return r}getTypedArrayForBufferView(t){const e=(t=this.getBufferView(t)).buffer,r=this.gltf.buffers[e];Te(r);const n=(t.byteOffset||0)+r.byteOffset;return new Uint8Array(r.arrayBuffer,n,t.byteLength)}getTypedArrayForAccessor(t){t=this.getAccessor(t);const e=this.getBufferView(t.bufferView),r=this.getBuffer(e.buffer).data,{ArrayType:n,length:s}=je(t,e);return new n(r,e.byteOffset+t.byteOffset,s)}getTypedArrayForImageData(t){t=this.getAccessor(t);const e=this.getBufferView(t.bufferView),r=this.getBuffer(e.buffer).data,n=e.byteOffset||0;return new Uint8Array(r,n,e.byteLength)}addApplicationData(t,e){return this.json[t]=e,this}addExtraData(t,e){return this.json.extras=this.json.extras||{},this.json.extras[t]=e,this}addObjectExtension(t,e,r){return t.extensions=t.extensions||{},t.extensions[e]=r,this.registerUsedExtension(e),this}setObjectExtension(t,e,r){(t.extensions||{})[e]=r}removeObjectExtension(t,e){const r=t.extensions||{},n=r[e];return delete r[e],n}addExtension(t,e={}){return Te(e),this.json.extensions=this.json.extensions||{},this.json.extensions[t]=e,this.registerUsedExtension(t),e}addRequiredExtension(t,e={}){return Te(e),this.addExtension(t,e),this.registerRequiredExtension(t),e}registerUsedExtension(t){this.json.extensionsUsed=this.json.extensionsUsed||[],this.json.extensionsUsed.find(e=>e===t)||this.json.extensionsUsed.push(t)}registerRequiredExtension(t){this.registerUsedExtension(t),this.json.extensionsRequired=this.json.extensionsRequired||[],this.json.extensionsRequired.find(e=>e===t)||this.json.extensionsRequired.push(t)}removeExtension(t){this.json.extensionsRequired&&this._removeStringFromArray(this.json.extensionsRequired,t),this.json.extensionsUsed&&this._removeStringFromArray(this.json.extensionsUsed,t),this.json.extensions&&delete this.json.extensions[t]}setDefaultScene(t){this.json.scene=t}addScene(t){const{nodeIndices:e}=t;return this.json.scenes=this.json.scenes||[],this.json.scenes.push({nodes:e}),this.json.scenes.length-1}addNode(t){const{meshIndex:e,matrix:r}=t;this.json.nodes=this.json.nodes||[];const n={mesh:e};return r&&(n.matrix=r),this.json.nodes.push(n),this.json.nodes.length-1}addMesh(t){const{attributes:e,indices:r,material:n,mode:s=4}=t,i={primitives:[{attributes:this._addAttributes(e),mode:s}]};if(r){const t=this._addIndices(r);i.primitives[0].indices=t}return Number.isFinite(n)&&(i.primitives[0].material=n),this.json.meshes=this.json.meshes||[],this.json.meshes.push(i),this.json.meshes.length-1}addPointCloud(t){const e={primitives:[{attributes:this._addAttributes(t),mode:0}]};return this.json.meshes=this.json.meshes||[],this.json.meshes.push(e),this.json.meshes.length-1}addImage(t,e){const r=de(t),n=e||(null==r?void 0:r.mimeType),s={bufferView:this.addBufferView(t),mimeType:n};return this.json.images=this.json.images||[],this.json.images.push(s),this.json.images.length-1}addBufferView(t){const e=t.byteLength;Te(Number.isFinite(e)),this.sourceBuffers=this.sourceBuffers||[],this.sourceBuffers.push(t);const r={buffer:0,byteOffset:this.byteLength,byteLength:e};return this.byteLength+=Oe(e,4),this.json.bufferViews=this.json.bufferViews||[],this.json.bufferViews.push(r),this.json.bufferViews.length-1}addAccessor(t,e){const r={bufferView:t,type:Me(e.size),componentType:e.componentType,count:e.count,max:e.max,min:e.min};return this.json.accessors=this.json.accessors||[],this.json.accessors.push(r),this.json.accessors.length-1}addBinaryBuffer(t,e={size:3}){const r=this.addBufferView(t);let n={min:e.min,max:e.max};n.min&&n.max||(n=this._getAccessorMinMax(t,e.size));const s={size:e.size,componentType:Le(t),count:Math.round(t.length/e.size),min:n.min,max:n.max};return this.addAccessor(r,Object.assign(s,e))}addTexture(t){const{imageIndex:e}=t,r={source:e};return this.json.textures=this.json.textures||[],this.json.textures.push(r),this.json.textures.length-1}addMaterial(t){return this.json.materials=this.json.materials||[],this.json.materials.push(t),this.json.materials.length-1}createBinaryChunk(){var t,e;this.gltf.buffers=[];const r=this.byteLength,n=new ArrayBuffer(r),s=new Uint8Array(n);let i=0;for(const t of this.sourceBuffers||[])i=_e(t,s,i);null!==(t=this.json)&&void 0!==t&&null!==(e=t.buffers)&&void 0!==e&&e[0]?this.json.buffers[0].byteLength=r:this.json.buffers=[{byteLength:r}],this.gltf.binary=n,this.sourceBuffers=[n]}_removeStringFromArray(t,e){let r=!0;for(;r;){const n=t.indexOf(e);n>-1?t.splice(n,1):r=!1}}_addAttributes(t={}){const e={};for(const r in t){const n=t[r],s=this._getGltfAttributeName(r),i=this.addBinaryBuffer(n.value,n);e[s]=i}return e}_addIndices(t){return this.addBinaryBuffer(t,{size:1})}_getGltfAttributeName(t){switch(t.toLowerCase()){case"position":case"positions":case"vertices":return"POSITION";case"normal":case"normals":return"NORMAL";case"color":case"colors":return"COLOR_0";case"texcoord":case"texcoords":return"TEXCOORD_0";default:return t}}_getAccessorMinMax(t,e){const r={min:null,max:null};if(t.length<e)return r;r.min=[],r.max=[];const n=t.subarray(0,e);for(const t of n)r.min.push(t),r.max.push(t);for(let n=e;n<t.length;n+=e)for(let s=0;s<e;s++)r.min[0+s]=Math.min(r.min[0+s],t[n+s]),r.max[0+s]=Math.max(r.max[0+s],t[n+s]);return r}}function Be(t){const{buffer:e,size:r,count:n}=function(t){let e=t,r=1,n=0;t&&t.value&&(e=t.value,r=t.size||1);e&&(ArrayBuffer.isView(e)||(e=function(t,e,r=!1){if(!t)return null;if(Array.isArray(t))return new e(t);if(r&&!(t instanceof e))return new e(t);return t}(e,Float32Array)),n=e.length/r);return{buffer:e,size:r,count:n}}(t);return{value:e,size:r,byteOffset:0,count:n,type:Me(r),componentType:Le(e)}}async function De(t,e,r){var n;if(null==e||null===(n=e.gltf)||void 0===n||!n.decompressMeshes)return;const s=new Pe(t),i=[];for(const t of function*(t){for(const e of t.json.meshes||[])for(const t of e.primitives)yield t}(s))s.getObjectExtension(t,"KHR_draco_mesh_compression")&&i.push(ke(s,t,e,r));await Promise.all(i),s.removeExtension("KHR_draco_mesh_compression")}function Ce(t,e={}){const r=new Pe(t);for(const t of r.json.meshes||[])Fe(t,e),r.addRequiredExtension("KHR_draco_mesh_compression")}async function ke(t,e,r,n){const s=t.getObjectExtension(e,"KHR_draco_mesh_compression");if(!s)return;const i=t.getTypedArrayForBufferView(s.bufferView),o=be(i.buffer,i.byteOffset),{parse:a}=n,c={...r};delete c["3d-tiles"];const u=await a(o,ht,c,n),h=function(t){const e={};for(const r in t){const n=t[r];if("indices"!==r){const t=Be(n);e[r]=t}}return e}(u.attributes);for(const[r,n]of Object.entries(h))if(r in e.attributes){const s=e.attributes[r],i=t.getAccessor(s);null!=i&&i.min&&null!=i&&i.max&&(n.min=i.min,n.max=i.max)}e.attributes=h,u.indices&&(e.indices=Be(u.indices)),function(t){if(!t.attributes&&Object.keys(t.attributes).length>0)throw new Error("glTF: Empty primitive detected: Draco decompression failure?")}(e)}function Fe(t,e,r=4,n,s){var i;if(!n.DracoWriter)throw new Error("options.gltf.DracoWriter not provided");const o=n.DracoWriter.encodeSync({attributes:t}),a=null==s||null===(i=s.parseSync)||void 0===i?void 0:i.call(s,{attributes:t}),c=n._addFauxAttributes(a.attributes);return{primitives:[{attributes:c,mode:r,extensions:{KHR_draco_mesh_compression:{bufferView:n.addBufferView(o),attributes:c}}}]}}async function ze(t){const e=new Pe(t),{json:r}=e;e.removeExtension("KHR_materials_unlit");for(const t of r.materials||[]){t.extensions&&t.extensions.KHR_materials_unlit&&(t.unlit=!0),e.removeObjectExtension(t,"KHR_materials_unlit")}}function Ve(t){const e=new Pe(t),{json:r}=e;if(e.materials)for(const t of r.materials||[])t.unlit&&(delete t.unlit,e.addObjectExtension(t,"KHR_materials_unlit",{}),e.addExtension("KHR_materials_unlit"))}async function Ge(t){const e=new Pe(t),{json:r}=e,n=e.getExtension("KHR_lights_punctual");n&&(e.json.lights=n.lights,e.removeExtension("KHR_lights_punctual"));for(const t of r.nodes||[]){const r=e.getObjectExtension(t,"KHR_lights_punctual");r&&(t.light=r.light),e.removeObjectExtension(t,"KHR_lights_punctual")}}async function qe(t){const e=new Pe(t),{json:r}=e;if(r.lights){const t=e.addExtension("KHR_lights_punctual");Te(!t.lights),t.lights=r.lights,delete r.lights}if(e.json.lights){for(const t of e.json.lights){const r=t.node;e.addObjectExtension(r,"KHR_lights_punctual",t)}delete e.json.lights}}async function He(t){const e=new Pe(t),{json:r}=e,n=e.getExtension("KHR_techniques_webgl");if(n){const t=function(t,e){const{programs:r=[],shaders:n=[],techniques:s=[]}=t,i=new TextDecoder;return n.forEach(t=>{if(!Number.isFinite(t.bufferView))throw new Error("KHR_techniques_webgl: no shader code");t.code=i.decode(e.getTypedArrayForBufferView(t.bufferView))}),r.forEach(t=>{t.fragmentShader=n[t.fragmentShader],t.vertexShader=n[t.vertexShader]}),s.forEach(t=>{t.program=r[t.program]}),s}(n,e);for(const n of r.materials||[]){const r=e.getObjectExtension(n,"KHR_techniques_webgl");r&&(n.technique=Object.assign({},r,t[r.technique]),n.technique.values=$e(n.technique,e)),e.removeObjectExtension(n,"KHR_techniques_webgl")}e.removeExtension("KHR_techniques_webgl")}}async function We(t,e){}function $e(t,e){const r=Object.assign({},t.values);return Object.keys(t.uniforms||{}).forEach(e=>{t.uniforms[e].value&&!(e in r)&&(r[e]=t.uniforms[e].value)}),Object.keys(r).forEach(t=>{"object"==typeof r[t]&&void 0!==r[t].index&&(r[t].texture=e.getTexture(r[t].index))}),r}const Ke={KHR_draco_mesh_compression:s,KHR_materials_unlit:i,KHR_lights_punctual:o,KHR_techniques_webgl:a};const Qe={accessors:"accessor",animations:"animation",buffers:"buffer",bufferViews:"bufferView",images:"image",materials:"material",meshes:"mesh",nodes:"node",samplers:"sampler",scenes:"scene",skins:"skin",textures:"texture"},Ye={accessor:"accessors",animations:"animation",buffer:"buffers",bufferView:"bufferViews",image:"images",material:"materials",mesh:"meshes",node:"nodes",sampler:"samplers",scene:"scenes",skin:"skins",texture:"textures"};class Ze{constructor(t){this.idToIndexMap={animations:{},accessors:{},buffers:{},bufferViews:{},images:{},materials:{},meshes:{},nodes:{},samplers:{},scenes:{},skins:{},textures:{}}}normalize(t,e){this.json=t.json;const r=t.json;switch(r.asset&&r.asset.version){case"2.0":return;case void 0:case"1.0":break;default:return void console.warn("glTF: Unknown version "+r.asset.version)}if(!e.normalize)throw new Error("glTF v1 is not supported.");console.warn("Converting glTF v1 to glTF v2 format. This is experimental and may fail."),this._addAsset(r),this._convertTopLevelObjectsToArrays(r),function(t){const e=new Pe(t),{json:r}=e;for(const t of r.images||[]){const r=e.removeObjectExtension(t,"KHR_binary_glTF");r&&Object.assign(t,r)}r.buffers&&r.buffers[0]&&delete r.buffers[0].uri,e.removeExtension("KHR_binary_glTF")}(t),this._convertObjectIdsToArrayIndices(r),this._updateObjects(r),this._updateMaterial(r)}_addAsset(t){t.asset=t.asset||{},t.asset.version="2.0",t.asset.generator=t.asset.generator||"Normalized to glTF 2.0 by loaders.gl"}_convertTopLevelObjectsToArrays(t){for(const e in Qe)this._convertTopLevelObjectToArray(t,e)}_convertTopLevelObjectToArray(t,e){const r=t[e];if(r&&!Array.isArray(r)){t[e]=[];for(const n in r){const s=r[n];s.id=s.id||n;const i=t[e].length;t[e].push(s),this.idToIndexMap[e][n]=i}}}_convertObjectIdsToArrayIndices(t){for(const e in Qe)this._convertIdsToIndices(t,e);"scene"in t&&(t.scene=this._convertIdToIndex(t.scene,"scene"));for(const e of t.textures)this._convertTextureIds(e);for(const e of t.meshes)this._convertMeshIds(e);for(const e of t.nodes)this._convertNodeIds(e);for(const e of t.scenes)this._convertSceneIds(e)}_convertTextureIds(t){t.source&&(t.source=this._convertIdToIndex(t.source,"image"))}_convertMeshIds(t){for(const e of t.primitives){const{attributes:t,indices:r,material:n}=e;for(const e in t)t[e]=this._convertIdToIndex(t[e],"accessor");r&&(e.indices=this._convertIdToIndex(r,"accessor")),n&&(e.material=this._convertIdToIndex(n,"material"))}}_convertNodeIds(t){t.children&&(t.children=t.children.map(t=>this._convertIdToIndex(t,"node"))),t.meshes&&(t.meshes=t.meshes.map(t=>this._convertIdToIndex(t,"mesh")))}_convertSceneIds(t){t.nodes&&(t.nodes=t.nodes.map(t=>this._convertIdToIndex(t,"node")))}_convertIdsToIndices(t,e){t[e]||(console.warn("gltf v1: json doesn't contain attribute "+e),t[e]=[]);for(const r of t[e])for(const t in r){const e=r[t],n=this._convertIdToIndex(e,t);r[t]=n}}_convertIdToIndex(t,e){const r=Ye[e];if(r in this.idToIndexMap){const n=this.idToIndexMap[r][t];if(!Number.isFinite(n))throw new Error(`gltf v1: failed to resolve ${e} with id ${t}`);return n}return t}_updateObjects(t){for(const t of this.json.buffers)delete t.type}_updateMaterial(t){for(const e of t.materials){e.pbrMetallicRoughness={baseColorFactor:[1,1,1,1],metallicFactor:1,roughnessFactor:1};const r=e.values&&e.values.tex,n=t.textures.findIndex(t=>t.id===r);-1!==n&&(e.pbrMetallicRoughness.baseColorTexture={index:n})}}}const Je={SCALAR:1,VEC2:2,VEC3:3,VEC4:4,MAT2:4,MAT3:9,MAT4:16},Xe={5120:1,5121:1,5122:2,5123:2,5125:4,5126:4},tr={TEXTURE_MAG_FILTER:10240,TEXTURE_MIN_FILTER:10241,TEXTURE_WRAP_S:10242,TEXTURE_WRAP_T:10243,REPEAT:10497,LINEAR:9729,NEAREST_MIPMAP_LINEAR:9986},er={magFilter:tr.TEXTURE_MAG_FILTER,minFilter:tr.TEXTURE_MIN_FILTER,wrapS:tr.TEXTURE_WRAP_S,wrapT:tr.TEXTURE_WRAP_T},rr={[tr.TEXTURE_MAG_FILTER]:tr.LINEAR,[tr.TEXTURE_MIN_FILTER]:tr.NEAREST_MIPMAP_LINEAR,[tr.TEXTURE_WRAP_S]:tr.REPEAT,[tr.TEXTURE_WRAP_]:tr.REPEAT};class nr{postProcess(t,e={}){const{json:r,buffers:n=[],images:s=[],baseUri:i=""}=t;return Te(r),this.baseUri=i,this.json=r,this.buffers=n,this.images=s,this._resolveTree(this.json,e),this.json}_resolveTree(t,e={}){t.bufferViews&&(t.bufferViews=t.bufferViews.map((t,e)=>this._resolveBufferView(t,e))),t.images&&(t.images=t.images.map((t,e)=>this._resolveImage(t,e))),t.samplers&&(t.samplers=t.samplers.map((t,e)=>this._resolveSampler(t,e))),t.textures&&(t.textures=t.textures.map((t,e)=>this._resolveTexture(t,e))),t.accessors&&(t.accessors=t.accessors.map((t,e)=>this._resolveAccessor(t,e))),t.materials&&(t.materials=t.materials.map((t,e)=>this._resolveMaterial(t,e))),t.meshes&&(t.meshes=t.meshes.map((t,e)=>this._resolveMesh(t,e))),t.nodes&&(t.nodes=t.nodes.map((t,e)=>this._resolveNode(t,e))),t.skins&&(t.skins=t.skins.map((t,e)=>this._resolveSkin(t,e))),t.scenes&&(t.scenes=t.scenes.map((t,e)=>this._resolveScene(t,e))),void 0!==t.scene&&(t.scene=t.scenes[this.json.scene])}getScene(t){return this._get("scenes",t)}getNode(t){return this._get("nodes",t)}getSkin(t){return this._get("skins",t)}getMesh(t){return this._get("meshes",t)}getMaterial(t){return this._get("materials",t)}getAccessor(t){return this._get("accessors",t)}getCamera(t){return null}getTexture(t){return this._get("textures",t)}getSampler(t){return this._get("samplers",t)}getImage(t){return this._get("images",t)}getBufferView(t){return this._get("bufferViews",t)}getBuffer(t){return this._get("buffers",t)}_get(t,e){if("object"==typeof e)return e;const r=this.json[t]&&this.json[t][e];return r||console.warn(`glTF file error: Could not find ${t}[${e}]`),r}_resolveScene(t,e){return t.id=t.id||"scene-"+e,t.nodes=(t.nodes||[]).map(t=>this.getNode(t)),t}_resolveNode(t,e){return t.id=t.id||"node-"+e,t.children&&(t.children=t.children.map(t=>this.getNode(t))),void 0!==t.mesh?t.mesh=this.getMesh(t.mesh):void 0!==t.meshes&&t.meshes.length&&(t.mesh=t.meshes.reduce((t,e)=>{const r=this.getMesh(e);return t.id=r.id,t.primitives=t.primitives.concat(r.primitives),t},{primitives:[]})),void 0!==t.camera&&(t.camera=this.getCamera(t.camera)),void 0!==t.skin&&(t.skin=this.getSkin(t.skin)),t}_resolveSkin(t,e){return t.id=t.id||"skin-"+e,t.inverseBindMatrices=this.getAccessor(t.inverseBindMatrices),t}_resolveMesh(t,e){return t.id=t.id||"mesh-"+e,t.primitives&&(t.primitives=t.primitives.map(t=>{const e=(t={...t}).attributes;t.attributes={};for(const r in e)t.attributes[r]=this.getAccessor(e[r]);return void 0!==t.indices&&(t.indices=this.getAccessor(t.indices)),void 0!==t.material&&(t.material=this.getMaterial(t.material)),t})),t}_resolveMaterial(t,e){if(t.id=t.id||"material-"+e,t.normalTexture&&(t.normalTexture={...t.normalTexture},t.normalTexture.texture=this.getTexture(t.normalTexture.index)),t.occlusionTexture&&(t.occlustionTexture={...t.occlustionTexture},t.occlusionTexture.texture=this.getTexture(t.occlusionTexture.index)),t.emissiveTexture&&(t.emmisiveTexture={...t.emmisiveTexture},t.emissiveTexture.texture=this.getTexture(t.emissiveTexture.index)),t.emissiveFactor||(t.emissiveFactor=t.emmisiveTexture?[1,1,1]:[0,0,0]),t.pbrMetallicRoughness){t.pbrMetallicRoughness={...t.pbrMetallicRoughness};const e=t.pbrMetallicRoughness;e.baseColorTexture&&(e.baseColorTexture={...e.baseColorTexture},e.baseColorTexture.texture=this.getTexture(e.baseColorTexture.index)),e.metallicRoughnessTexture&&(e.metallicRoughnessTexture={...e.metallicRoughnessTexture},e.metallicRoughnessTexture.texture=this.getTexture(e.metallicRoughnessTexture.index))}return t}_resolveAccessor(t,e){var r,n;if(t.id=t.id||"accessor-"+e,void 0!==t.bufferView&&(t.bufferView=this.getBufferView(t.bufferView)),t.bytesPerComponent=(r=t.componentType,Xe[r]),t.components=(n=t.type,Je[n]),t.bytesPerElement=t.bytesPerComponent*t.components,t.bufferView){const e=t.bufferView.buffer,{ArrayType:r,byteLength:n}=je(t,t.bufferView),s=(t.bufferView.byteOffset||0)+(t.byteOffset||0)+e.byteOffset,i=e.arrayBuffer.slice(s,s+n);t.value=new r(i)}return t}_resolveTexture(t,e){return t.id=t.id||"texture-"+e,t.sampler="sampler"in t?this.getSampler(t.sampler):rr,t.source=this.getImage(t.source),t}_resolveSampler(t,e){t.id=t.id||"sampler-"+e,t.parameters={};for(const e in t){const r=this._enumSamplerParameter(e);void 0!==r&&(t.parameters[r]=t[e])}return t}_enumSamplerParameter(t){return er[t]}_resolveImage(t,e){t.id=t.id||"image-"+e,void 0!==t.bufferView&&(t.bufferView=this.getBufferView(t.bufferView));const r=this.images[e];return r&&(t.image=r),t}_resolveBufferView(t,e){t.id=t.id||"bufferView-"+e;const r=t.buffer;t.buffer=this.buffers[r];const n=this.buffers[r].arrayBuffer;let s=this.buffers[r].byteOffset||0;return"byteOffset"in t&&(s+=t.byteOffset),t.data=new Uint8Array(n,s,t.byteLength),t}_resolveCamera(t,e){return t.id=t.id||"camera-"+e,t.perspective,t.orthographic,t}}const sr=1735152710;function ir(t,e=0,r={}){const n=new DataView(t),{magic:s=sr}=r,i=n.getUint32(e,!1);return i===s||i===sr}function or(t,e,r=0,n={}){const s=new DataView(e),i=function(t,e=0){return`${String.fromCharCode(t.getUint8(e+0))}${String.fromCharCode(t.getUint8(e+1))}${String.fromCharCode(t.getUint8(e+2))}${String.fromCharCode(t.getUint8(e+3))}`}(s,r+0),o=s.getUint32(r+4,!0),a=s.getUint32(r+8,!0);switch(Object.assign(t,{header:{byteOffset:r,byteLength:a,hasBinChunk:!1},type:i,version:o,json:{},binChunks:[]}),r+=12,t.version){case 1:return function(t,e,r){T(t.header.byteLength>20);const n=e.getUint32(r+0,!0),s=e.getUint32(r+4,!0);return r+=8,T(0===s),ar(t,e,r,n),r+=n,r+=cr(t,e,r,t.header.byteLength)}(t,s,r);case 2:return function(t,e,r,n){return T(t.header.byteLength>20),function(t,e,r,n){for(;r+8<=t.header.byteLength;){const s=e.getUint32(r+0,!0),i=e.getUint32(r+4,!0);switch(r+=8,i){case 1313821514:ar(t,e,r,s);break;case 5130562:cr(t,e,r,s);break;case 0:n.strict||ar(t,e,r,s);break;case 1:n.strict||cr(t,e,r,s)}r+=Oe(s,4)}}(t,e,r,n),r+t.header.byteLength}(t,s,r,{});default:throw new Error(`Invalid GLB version ${t.version}. Only supports v1 and v2.`)}}function ar(t,e,r,n){const s=new Uint8Array(e.buffer,r,n),i=new TextDecoder("utf8").decode(s);return t.json=JSON.parse(i),Oe(n,4)}function cr(t,e,r,n){return t.header.hasBinChunk=!0,t.binChunks.push({byteOffset:r,byteLength:n,arrayBuffer:e.buffer}),Oe(n,4)}async function ur(t,e,r=0,n,s){var i,o,a,c;!function(t,e,r,n){n.uri&&(t.baseUri=n.uri);if(e instanceof ArrayBuffer&&!ir(e,r,n)){const t=new TextDecoder;e=t.decode(e)}if("string"==typeof e)t.json=pe(e);else if(e instanceof ArrayBuffer){const s={};r=or(s,e,r,n.glb),Te("glTF"===s.type,"Invalid GLB magic string "+s.type),t._glb=s,t.json=s.json}else Te(!1,"GLTF: must be ArrayBuffer or string");const s=t.json.buffers||[];if(t.buffers=new Array(s.length).fill(null),t._glb&&t._glb.header.hasBinChunk){const{binChunks:e}=t._glb;t.buffers[0]={arrayBuffer:e[0].arrayBuffer,byteOffset:e[0].byteOffset,byteLength:e[0].byteLength}}const i=t.json.images||[];t.images=new Array(i.length).fill({})}(t,e,r,n),function(t,e={}){(new Ze).normalize(t,e)}(t,{normalize:null==n||null===(i=n.gltf)||void 0===i?void 0:i.normalize});const u=[];if(null!=n&&null!==(o=n.gltf)&&void 0!==o&&o.loadBuffers&&t.json.buffers&&await async function(t,e,r){for(let i=0;i<t.json.buffers.length;++i){const o=t.json.buffers[i];if(o.uri){var n,s;const{fetch:a}=r;Te(a);const c=we(o.uri,e),u=await(null==r||null===(n=r.fetch)||void 0===n?void 0:n.call(r,c)),h=await(null==u||null===(s=u.arrayBuffer)||void 0===s?void 0:s.call(u));t.buffers[i]={arrayBuffer:h,byteOffset:0,byteLength:h.byteLength},delete o.uri}}}(t,n,s),null!=n&&null!==(a=n.gltf)&&void 0!==a&&a.loadImages){const e=async function(t,e,r){const n=t.json.images||[],s=[];for(let i=0;i<n.length;++i)s.push(hr(t,n[i],i,e,r));return await Promise.all(s)}(t,n,s);u.push(e)}const h=async function(t,e={},r){for(const s in Ke){var n;const i=(null==e||null===(n=e.gltf)||void 0===n?void 0:n.excludeExtensions)||{};if(!(s in i&&!i[s])){const n=Ke[s];await n.decode(t,e,r)}}}(t,n,s);return u.push(h),await Promise.all(u),null!=n&&null!==(c=n.gltf)&&void 0!==c&&c.postProcess?function(t,e){return(new nr).postProcess(t,e)}(t,n):t}async function hr(t,e,r,n,s){const{fetch:i,parse:o}=s;let a;if(e.uri){const t=we(e.uri,n),r=await i(t);a=await r.arrayBuffer()}if(Number.isFinite(e.bufferView)){const r=Ee(t.json,t.buffers,e.bufferView);a=be(r.buffer,r.byteOffset,r.byteLength)}Te(a,"glTF image has no data");const c=await o(a,me,{},s);t.images[r]=c}const fr={name:"glTF",id:"gltf",module:"gltf",version:"3.1.0-alpha.1",extensions:["gltf","glb"],mimeTypes:["model/gltf+json","model/gltf-binary"],text:!0,binary:!0,tests:["glTF"],parse:async function(t,e={},r){(e={...fr.options,...e}).gltf={...fr.options.gltf,...e.gltf};const{byteOffset:n=0}=e;return await ur({},t,n,e,r)},options:{gltf:{normalize:!0,loadBuffers:!0,loadImages:!0,decompressMeshes:!0,postProcess:!0},log:console},deprecatedOptions:{fetchImages:"gltf.loadImages",createImages:"gltf.loadImages",decompress:"gltf.decompressMeshes",postProcess:"gltf.postProcess",gltf:{decompress:"gltf.decompressMeshes"}}};const lr=0,dr=1;function yr(t,e,r,n){t.rotateYtoZ=!0;const s=t.byteOffset+t.byteLength-r;if(0===s)throw new Error("glTF byte length must be greater than 0.");return t.gltfUpAxis=n["3d-tiles"]&&n["3d-tiles"].assetGltfUpAxis?n["3d-tiles"].assetGltfUpAxis:"Y",t.gltfArrayBuffer=be(e,r,s),t.gltfByteOffset=0,t.gltfByteLength=s,r%4==0||console.warn(t.type+": embedded glb is not aligned to a 4-byte boundary."),t.byteOffset+t.byteLength}async function mr(t,e,r,n){const s=r["3d-tiles"]||{};if(function(t,e,r){switch(e){case lr:const e=new Uint8Array(t.gltfArrayBuffer,t.gltfByteOffset),r=(new TextDecoder).decode(e);t.gltfUrl=r.replace(/[\s\0]+$/,""),delete t.gltfArrayBuffer,delete t.gltfByteOffset,delete t.gltfByteLength;break;case dr:break;default:throw new Error("b3dm: Illegal glTF format field")}}(t,e),s.loadGLTF){const{parse:e,fetch:s}=n;t.gltfUrl&&(t.gltfArrayBuffer=await s(t.gltfUrl,r),t.gltfByteOffset=0),t.gltfArrayBuffer&&(t.gltf=await e(t.gltfArrayBuffer,fr,r,n),delete t.gltfArrayBuffer,delete t.gltfByteOffset,delete t.gltfByteLength)}}async function gr(t,e,r,n,s){var i;r=function(t,e,r,n,s){r=xt(t,e,r),r=Mt(t,e,r),r=Lt(t,e,r),r=yr(t,e,r,n);const i=new pt(t.featureTableJson,t.featureTableBinary);return t.rtcCenter=i.getGlobalProperty("RTC_CENTER",lt.FLOAT,3),r}(t,e,r,n),await mr(t,dr,n,s);const o=null==t||null===(i=t.gltf)||void 0===i?void 0:i.extensions;return o&&o.CESIUM_RTC&&(t.rtcCenter=o.CESIUM_RTC.center),r}var pr=r(43),br=r(44),Tr=r(42),wr=r(6),Er=r(2);Math.max(6378137,6378137,6356752.314245179);const Or=t=>t,_r=new dt.a;function Ar(t,e,r=Or){return Object(Pt.e)(t)?(e[0]=r(t[0]),e[1]=r(t[1]),e[2]=t[2]):"longitude"in t?(e[0]=r(t.longitude),e[1]=r(t.latitude),e[2]=t.height):(e[0]=r(t.x),e[1]=r(t.y),e[2]=t.z),e}function Ir(t,e,r=Or){return Object(Pt.e)(e)?(e[0]=r(t[0]),e[1]=r(t[1]),e[2]=t[2]):"longitude"in e?(e.longitude=r(t[0]),e.latitude=r(t[1]),e.height=t[2]):(e.x=r(t[0]),e.y=r(t[1]),e.z=t[2]),e}const vr=new dt.a,Sr=new dt.a,Nr=new dt.a;const xr=new dt.a,Mr={up:{south:"east",north:"west",west:"south",east:"north"},down:{south:"west",north:"east",west:"north",east:"south"},south:{up:"west",down:"east",west:"down",east:"up"},north:{up:"east",down:"west",west:"up",east:"down"},west:{up:"north",down:"south",north:"down",south:"up"},east:{up:"south",down:"north",north:"up",south:"down"}},Lr={north:[-1,0,0],east:[0,1,0],up:[0,0,1],south:[1,0,0],west:[0,-1,0],down:[0,0,-1]},jr={east:new dt.a,north:new dt.a,up:new dt.a,west:new dt.a,south:new dt.a,down:new dt.a},Rr=new dt.a,Ur=new dt.a,Pr=new dt.a;function Br(t,e,r,n,s,i){const o=Mr[e]&&Mr[e][r];let a,c,u;Object(wr.a)(o&&(!n||n===o));const h=xr.copy(s);if(Object(Pt.c)(h.x,0,1e-14)&&Object(Pt.c)(h.y,0,1e-14)){const t=Math.sign(h.z);a=Rr.fromArray(Lr[e]),"east"!==e&&"west"!==e&&a.scale(t),c=Ur.fromArray(Lr[r]),"east"!==r&&"west"!==r&&c.scale(t),u=Pr.fromArray(Lr[n]),"east"!==n&&"west"!==n&&u.scale(t)}else{const{up:s,east:i,north:o}=jr;i.set(-h.y,h.x,0).normalize(),t.geodeticSurfaceNormal(h,s),o.copy(s).cross(i);const{down:f,west:l,south:d}=jr;f.copy(s).scale(-1),l.copy(i).scale(-1),d.copy(o).scale(-1),a=jr[e],c=jr[r],u=jr[n]}return i[0]=a.x,i[1]=a.y,i[2]=a.z,i[3]=0,i[4]=c.x,i[5]=c.y,i[6]=c.z,i[7]=0,i[8]=u.x,i[9]=u.y,i[10]=u.z,i[11]=0,i[12]=h.x,i[13]=h.y,i[14]=h.z,i[15]=1,i}const Dr=new dt.a,Cr=new dt.a,kr=new dt.a,Fr=new dt.a,zr=new dt.a,Vr=new dt.a;let Gr;class qr{static get WGS84(){return Gr=Gr||new qr(6378137,6378137,6356752.314245179),Gr}constructor(t=0,e=0,r=0){Object(wr.a)(t>=0),Object(wr.a)(e>=0),Object(wr.a)(r>=0),this.radii=new dt.a(t,e,r),this.radiiSquared=new dt.a(t*t,e*e,r*r),this.radiiToTheFourth=new dt.a(t*t*t*t,e*e*e*e,r*r*r*r),this.oneOverRadii=new dt.a(0===t?0:1/t,0===e?0:1/e,0===r?0:1/r),this.oneOverRadiiSquared=new dt.a(0===t?0:1/(t*t),0===e?0:1/(e*e),0===r?0:1/(r*r)),this.minimumRadius=Math.min(t,e,r),this.maximumRadius=Math.max(t,e,r),this.centerToleranceSquared=Ft.a.EPSILON1,0!==this.radiiSquared.z&&(this.squaredXOverSquaredZ=this.radiiSquared.x/this.radiiSquared.z),Object.freeze(this)}equals(t){return this===t||Boolean(t&&this.radii.equals(t.radii))}toString(){return this.radii.toString()}cartographicToCartesian(t,e=[0,0,0]){const r=Cr,n=kr,[,,s]=t;this.geodeticSurfaceNormalCartographic(t,r),n.copy(this.radiiSquared).scale(r);const i=Math.sqrt(r.dot(n));return n.scale(1/i),r.scale(s),n.add(r),n.to(e)}cartesianToCartographic(t,e=[0,0,0]){Vr.from(t);const r=this.scaleToGeodeticSurface(Vr,Fr);if(!r)return;const n=this.geodeticSurfaceNormal(r,Cr),s=zr;s.copy(Vr).subtract(r);const i=Math.atan2(n.y,n.x),o=Math.asin(n.z),a=Math.sign(Er.d(s,Vr))*Er.g(s);return Ir([i,o,a],e,Pt.b._cartographicRadians?Or:Pt.f)}eastNorthUpToFixedFrame(t,e=new Tr.a){return Br(this,"east","north","up",t,e)}localFrameToFixedFrame(t,e,r,n,s=new Tr.a){return Br(this,t,e,r,n,s)}geocentricSurfaceNormal(t,e=[0,0,0]){return Dr.from(t).normalize().to(e)}geodeticSurfaceNormalCartographic(t,e=[0,0,0]){const r=function(t,e=_r){return Ar(t,e,Pt.b._cartographicRadians?Or:Pt.g)}(t),n=r[0],s=r[1],i=Math.cos(s);return Dr.set(i*Math.cos(n),i*Math.sin(n),Math.sin(s)).normalize(),Dr.to(e)}geodeticSurfaceNormal(t,e=[0,0,0]){return Dr.from(t).scale(this.oneOverRadiiSquared).normalize().to(e)}scaleToGeodeticSurface(t,e){return function(t,e,r=new dt.a){const{oneOverRadii:n,oneOverRadiiSquared:s,centerToleranceSquared:i}=e;vr.from(t);const o=t.x,a=t.y,c=t.z,u=n.x,h=n.y,f=n.z,l=o*o*u*u,d=a*a*h*h,y=c*c*f*f,m=l+d+y,g=Math.sqrt(1/m);if(!Number.isFinite(g))return;const p=Sr;if(p.copy(t).scale(g),m<i)return p.to(r);const b=s.x,T=s.y,w=s.z,E=Nr;E.set(p.x*b*2,p.y*T*2,p.z*w*2);let O,_,A,I,v=(1-g)*t.len()/(.5*E.len()),S=0;do{v-=S,O=1/(1+v*b),_=1/(1+v*T),A=1/(1+v*w);const t=O*O,e=_*_,r=A*A;I=l*t+d*e+y*r-1;S=I/(-2*(l*(t*O)*b+d*(e*_)*T+y*(r*A)*w))}while(Math.abs(I)>Ft.a.EPSILON12);return vr.scale([O,_,A]).to(r)}(t,this,e)}scaleToGeocentricSurface(t,e=[0,0,0]){Fr.from(t);const r=Fr.x,n=Fr.y,s=Fr.z,i=this.oneOverRadiiSquared,o=1/Math.sqrt(r*r*i.x+n*n*i.y+s*s*i.z);return Fr.multiplyScalar(o).to(e)}transformPositionToScaledSpace(t,e=[0,0,0]){return Fr.from(t).scale(this.oneOverRadii).to(e)}transformPositionFromScaledSpace(t,e=[0,0,0]){return Fr.from(t).scale(this.radii).to(e)}getSurfaceNormalIntersectionWithZAxis(t,e=0,r=[0,0,0]){Object(wr.a)(Object(Pt.c)(this.radii.x,this.radii.y,Ft.a.EPSILON15)),Object(wr.a)(this.radii.z>0),Fr.from(t);const n=Fr.z*(1-this.squaredXOverSquaredZ);if(!(Math.abs(n)>=this.radii.z-e))return Fr.set(0,0,n).to(r)}}async function Hr(t,e,r,n,s){return r=function(t,e,r,n,s){if(r=xt(t,e,r),1!==t.version)throw new Error(`Instanced 3D Model version ${t.version} is not supported`);r=Mt(t,e,r);const i=new DataView(e);if(t.gltfFormat=i.getUint32(r,!0),r=Lt(t,e,r+=4),r=yr(t,e,r,n),0===t.featureTableJsonByteLength)throw new Error("i3dm parser: featureTableJsonByteLength is zero.");const o=new pt(t.featureTableJson,t.featureTableBinary),a=o.getGlobalProperty("INSTANCES_LENGTH");if(o.featuresLength=a,!Number.isFinite(a))throw new Error("i3dm parser: INSTANCES_LENGTH must be defined");t.eastNorthUp=o.getGlobalProperty("EAST_NORTH_UP"),t.rtcCenter=o.getGlobalProperty("RTC_CENTER",lt.FLOAT,3);new Nt(t.batchTableJson,t.batchTableBinary,a);return function(t,e,r,n){const s=[new Array(n),t._batchTable][0],i=new dt.a,o=new dt.a,a=new dt.a,c=new dt.a,u=new pr.a,h=new br.a,f=new dt.a,l={},d=new Tr.a,y=[],m=[],g=new dt.a,p=new dt.a;for(let r=0;r<n;r++){let n;if(e.hasProperty("POSITION"))n=e.getProperty("POSITION",lt.FLOAT,3,r,i);else if(e.hasProperty("POSITION_QUANTIZED")){n=e.getProperty("POSITION_QUANTIZED",lt.UNSIGNED_SHORT,3,r,i);const t=e.getGlobalProperty("QUANTIZED_VOLUME_OFFSET",lt.FLOAT,3,g);if(!t)throw new Error("i3dm parser: QUANTIZED_VOLUME_OFFSET must be defined for quantized positions.");const s=e.getGlobalProperty("QUANTIZED_VOLUME_SCALE",lt.FLOAT,3,p);if(!s)throw new Error("i3dm parser: QUANTIZED_VOLUME_SCALE must be defined for quantized positions.");const o=65535;for(let e=0;e<3;e++)n[e]=n[e]/o*s[e]+t[e]}if(!n)throw new Error("i3dm: POSITION or POSITION_QUANTIZED must be defined for each instance.");i.copy(n),l.translation=i,t.normalUp=e.getProperty("NORMAL_UP",lt.FLOAT,3,r,y),t.normalRight=e.getProperty("NORMAL_RIGHT",lt.FLOAT,3,r,m);const b=!1;if(t.normalUp){if(!t.normalRight)throw new Error("i3dm: Custom orientation requires both NORMAL_UP and NORMAL_RIGHT.");t.hasCustomOrientation=!0}else{if(t.octNormalUp=e.getProperty("NORMAL_UP_OCT32P",lt.UNSIGNED_SHORT,2,y),t.octNormalRight=e.getProperty("NORMAL_RIGHT_OCT32P",lt.UNSIGNED_SHORT,2,m),t.octNormalUp){if(!t.octNormalRight)throw new Error("i3dm: oct-encoded orientation requires NORMAL_UP_OCT32P and NORMAL_RIGHT_OCT32P");throw new Error("i3dm: oct-encoded orientation not implemented")}t.eastNorthUp?(qr.WGS84.eastNorthUpToFixedFrame(i,d),d.getRotationMatrix3(u)):u.identity()}b&&(c.copy(o).cross(a).normalize(),u.setColumn(0,o),u.setColumn(1,a),u.setColumn(2,c)),h.fromMatrix3(u),l.rotation=h,f.set(1,1,1);const T=e.getProperty("SCALE",lt.FLOAT,1,r);Number.isFinite(T)&&f.multiplyByScalar(T);const w=e.getProperty("SCALE_NON_UNIFORM",lt.FLOAT,3,r,y);w&&f.scale(w),l.scale=f;let E=e.getProperty("BATCH_ID",lt.UNSIGNED_SHORT,1,r);void 0===E&&(E=r);const O=(new Tr.a).fromQuaternion(l.rotation);d.identity(),d.translate(l.translation),d.multiplyRight(O),d.scale(l.scale);const _=d.clone();s[r]={modelMatrix:_,batchId:E}}t.instances=s}(t,o,0,a),r}(t,e,r,n),await mr(t,t.gltfFormat,n,s),r}async function Wr(t,e=0,r,n,s={}){switch(s.byteOffset=e,s.type=function(t,e=0){const r=new DataView(t);return`${String.fromCharCode(r.getUint8(e+0))}${String.fromCharCode(r.getUint8(e+1))}${String.fromCharCode(r.getUint8(e+2))}${String.fromCharCode(r.getUint8(e+3))}`}(t,e),s.type){case p.COMPOSITE:return await async function(t,e,r,n,s,i){r=xt(t,e,r);const o=new DataView(e);for(t.tilesLength=o.getUint32(r,!0),r+=4,t.tiles=[];t.tiles.length<t.tilesLength&&t.byteLength-r>12;){const o={};t.tiles.push(o),r=await i(e,r,n,s,o)}return r}(s,t,e,r,n,Wr);case p.BATCHED_3D_MODEL:return await gr(s,t,e,r,n);case p.INSTANCED_3D_MODEL:return await Hr(s,t,e,r,n);case p.POINT_CLOUD:return await Kt(s,t,e,r,n);default:throw new Error("3DTileLoader: unknown type "+s.type)}}function $r(t,e){if(!t)return null;if(t.content){const r=t.content.uri||t.content.url;t.contentUrl=`${e.basePath}/${r}`}return t.id=t.contentUrl,t.lodMetricType=g,t.lodMetricValue=t.geometricError,t.transformMatrix=t.transform,t.type=function(t){if(!t.contentUrl)return l;const e=t.contentUrl.split(".").pop();switch(e){case"pnts":return y;case"i3dm":case"b3dm":return d;default:return e}}(t),t.refine=function(t){switch(t){case"REPLACE":case"replace":return f;case"ADD":case"add":return h;default:return t}}(t.refine),t}const Kr={id:"3d-tiles",name:"3D Tiles",module:"3d-tiles",version:"3.1.0-alpha.1",extensions:["cmpt","pnts","b3dm","i3dm"],mimeTypes:["application/octet-stream"],tests:["cmpt","pnts","b3dm","i3dm"],parse:async function(t,e,r){const s=e["3d-tiles"]||{};let i;i="auto"===s.isTileset?r.url&&-1!==r.url.indexOf(".json"):s.isTileset;t=i?await async function(t,e,r){var s;const i=JSON.parse((new TextDecoder).decode(t));return i.loader=e.loader||Kr,i.url=r.url,i.basePath=function(t){return n.dirname(t.url)}(i),i.root=function(t){const e=t.basePath,r=$r(t.root,t),n=[];for(n.push(r);n.length>0;){const t=(n.pop()||{}).children||[];for(const r of t)$r(r,{basePath:e}),n.push(r)}return r}(i),i.type=m,i.lodMetricType=g,i.lodMetricValue=(null===(s=i.root)||void 0===s?void 0:s.lodMetricValue)||0,i}(t,e,r):await async function(t,e,r){const n={content:{featureIds:null}};return await Wr(t,0,e,r,n.content),n.content}(t,e,r);return t},options:{"3d-tiles":{loadGLTF:!0,decodeQuantizedPositions:!1,isTileset:"auto",assetGltfUpAxis:null}}};let Qr="";const Yr={};const Zr=t=>"undefined"!=typeof Response&&t instanceof Response||t&&t.arrayBuffer&&t.text&&t.json,Jr=t=>"undefined"!=typeof Blob&&t instanceof Blob,Xr=/^data:([-\w.]+\/[-\w.+]+)(;|,)/,tn=/^([-\w.]+\/[-\w.+]+)/;function en(t){const e=tn.exec(t);return e?e[1]:t}function rn(t){const e=Xr.exec(t);return e?e[1]:""}const nn=/\?.*/;function sn(t){return t.replace(nn,"")}async function on(t){if(Zr(t))return t;const e={},r=function(t){return Zr(t)?t.headers["content-length"]||-1:Jr(t)?t.size:"string"==typeof t?t.length:t instanceof ArrayBuffer||ArrayBuffer.isView(t)?t.byteLength:-1}(t);r>=0&&(e["content-length"]=String(r));const{url:n,type:s}=function(t){if(Zr(t)){const e=sn(t.url||"");return{url:e,type:en(t.headers.get("content-type")||"")||rn(e)}}return Jr(t)?{url:sn(t.name||""),type:t.type||""}:"string"==typeof t?{url:sn(t),type:rn(t)}:{url:"",type:""}}(t);s&&(e["content-type"]=s);const i=await async function(t){if("string"==typeof t)return"data:,"+t.slice(0,5);if(t instanceof Blob){const e=t.slice(0,5);return await new Promise(t=>{const r=new FileReader;r.onload=e=>{var r;return t(null==e||null===(r=e.target)||void 0===r?void 0:r.result)},r.readAsDataURL(e)})}if(t instanceof ArrayBuffer){const e=t.slice(0,5);return"data:base64,"+function(t){let e="";const r=new Uint8Array(t);for(let t=0;t<r.byteLength;t++)e+=String.fromCharCode(r[t]);return btoa(e)}(e)}return null}(t);i&&(e["x-first-bytes"]=i),"string"==typeof t&&(t=(new TextEncoder).encode(t));const o=new Response(t,{headers:e});return Object.defineProperty(o,"url",{value:n}),o}async function an(t,e){if("string"==typeof t){t=function(t){for(const e in Yr)if(t.startsWith(e)){const r=Yr[e];t=t.replace(e,r)}return t.startsWith("http://")||t.startsWith("https://")||(t=`${Qr}${t}`),t}(t);let r=e;return null!=e&&e.fetch&&"function"!=typeof(null==e?void 0:e.fetch)&&(r=e.fetch),await fetch(t,r)}return await on(t)}async function cn(t,e){if(!e){const r=await async function(t){T(t);const e={Authorization:"Bearer "+t},r=await an("https://api.cesium.com/v1/assets",{fetch:{headers:e}});if(!r.ok)throw new Error(r.statusText);return await r.json()}(t);for(const t of r.items)"3DTILES"===t.type&&(e=t.id)}const r=await async function(t,e){T(t,e);const r={Authorization:"Bearer "+t},n="https://api.cesium.com/v1/assets/"+e;let s=await an(""+n,{fetch:{headers:r}});if(!s.ok)throw new Error(s.statusText);let i=await s.json();if(s=await an(n+"/endpoint",{fetch:{headers:r}}),!s.ok)throw new Error(s.statusText);const o=await s.json();return i={...i,...o},i}(t,e),{type:n,url:s}=r;return T("3DTILES"===n&&s),r.headers={Authorization:"Bearer "+r.accessToken},r}const un={...Kr,id:"cesium-ion",name:"Cesium Ion",preload:async function(t,e={}){e=e["cesium-ion"]||{};const{accessToken:r}=e;let n=e.assetId;if(!Number.isFinite(n)){const e=t.match(/\/([0-9]+)\/tileset.json/);n=e&&e[1]}return cn(r,n)},parse:async(t,e,r)=>((e={...e})["3d-tiles"]=e["cesium-ion"],e.loader=un,Kr.parse(t,e,r)),options:{"cesium-ion":{...Kr.options["3d-tiles"],accessToken:null}}};function hn(t,e,r){if(!e)return r+12;const{magic:n,version:s=1,byteLength:i=12}=t;return T(Array.isArray(n)&&Number.isFinite(s)&&Number.isFinite(i)),e.setUint8(r+0,n[0]),e.setUint8(r+1,n[1]),e.setUint8(r+2,n[2]),e.setUint8(r+3,n[3]),e.setUint32(r+4,s,!0),e.setUint32(r+8,i,!0),r+=12}function fn(t,e,r){t&&t.setUint32(e+8,r,!0)}function ln(t,e,r,n){return e=function(t,e,r,n){const s=Oe(r.byteLength,n),i=s-r.byteLength;if(t){const n=new Uint8Array(t.buffer,t.byteOffset+e,r.byteLength),s=new Uint8Array(r);n.set(s);for(let n=0;n<i;++n)t.setUint8(e+r.byteLength+n,32)}return e+=s}(t,e,(new TextEncoder).encode(r),n)}function dn(t,e,r,n){if(t)for(let s=0;s<n;s++)t.setUint8(e+s,r.charCodeAt(s));return e+n}function yn(t,e,r,n){if(t)for(let s=0;s<n;s++)t.setUint8(e+s,r[s]);return e+n}const mn={POINTS_LENGTH:1,POSITIONS:{byteOffset:0}};function gn(t,e,r,n){const{featureTableJson:s=mn}=t;let i=JSON.stringify(s);i=function(t,e){const r=t.length,n=Math.ceil(r/e)*e-r;let s="";for(let t=0;t<n;++t)s+=" ";return t+s}(i,4);const{featureTableJsonByteLength:o=i.length}=t,a=new ArrayBuffer(12),c=a.byteLength,u=r;return r+=hn(t={magic:b.POINT_CLOUD,...t},e,0),e&&(e.setUint32(r+0,o,!0),e.setUint32(r+4,c,!0),e.setUint32(r+8,0,!0),e.setUint32(r+12,0,!0)),r+=16,r+=dn(e,r,i,o),fn(e,u,(r+=yn(e,r,a,c))-u),r}function pn(t,e,r,n){switch(T("string"==typeof t.type),t.type){case p.COMPOSITE:return function(t,e,r,n,s){const i=r;r+=hn(t={magic:b.COMPOSITE,tiles:[],...t},e,r),e&&e.setUint32(r,t.tiles.length,!0),r+=4;for(let i=0;i<t.tiles.length;++i)r+=s(t.tiles[i],e,r,n);return fn(e,i,r-i),r}(t,e,r,n,pn);case p.POINT_CLOUD:return gn(t,e,r);case p.BATCHED_3D_MODEL:return function(t,e,r,n){const{featuresLength:s=0,batchTable:i}=t,o={BATCH_LENGTH:s},a=JSON.stringify(o),c=i?JSON.stringify(i):"",u=Oe(a.length,8),h=c?Oe(c.length,8):0,f=r;r=hn(t={magic:b.BATCHED_MODEL,...t},e,r),e&&(e.setUint32(12,u,!0),e.setUint32(16,0,!0),e.setUint32(20,h,!0),e.setUint32(24,0,!0)),r=ln(e,r+=16,a,8),i&&(r=ln(e,r,c,8));const l=t.gltfEncoded;return l&&(r=yn(e,r,l,l.byteLength)),fn(e,f,r-f),r}(t,e,r);case p.INSTANCED_3D_MODEL:return function(t,e,r,n){const{featuresLength:s=1,gltfFormat:i=1,gltfUri:o=""}=t,a=o.length,c={INSTANCES_LENGTH:s,POSITION:new Array(3*s).fill(0)},u=JSON.stringify(c),h=u.length,f=r;return r=hn(t={magic:b.INSTANCED_MODEL,...t},e,0),e&&(e.setUint32(12,h,!0),e.setUint32(16,0,!0),e.setUint32(20,0,!0),e.setUint32(24,0,!0),e.setUint32(28,i,!0)),r+=20,r+=dn(e,r,u,h),fn(e,f,(r+=dn(e,r,o,a))-f),r}(t,e,r);default:throw new Error("3D Tiles: unknown tile type")}}const bn={name:"3D Tile",id:"3d-tiles",module:"3d-tiles",version:"3.1.0-alpha.1",extensions:["cmpt","pnts","b3dm","i3dm"],mimeTypes:["application/octet-stream"],encodeSync:function(t,e){return function(t,e){const r=pn(t,null,0,e),n=new ArrayBuffer(r);return pn(t,new DataView(n),0,e),n}(t,e)},binary:!0,options:{"3d-tiles":{}}}},,,,,function(t,e,r){"use strict";r.d(e,"a",(function(){return h}));var n=r(18),s=r(3),i=r(1),o=r(2),a=r(8);const c=[0,0,0],u={};class h extends n.a{static get ZERO(){return u.ZERO=u.ZERO||Object.freeze(new h(0,0,0,0))}constructor(t=0,e=0,r=0){super(-0,-0,-0),1===arguments.length&&Object(s.e)(t)?this.copy(t):(s.b.debug&&(Object(i.a)(t),Object(i.a)(e),Object(i.a)(r)),this[0]=t,this[1]=e,this[2]=r)}set(t,e,r){return this[0]=t,this[1]=e,this[2]=r,this.check()}copy(t){return this[0]=t[0],this[1]=t[1],this[2]=t[2],this.check()}fromObject(t){return s.b.debug&&(Object(i.a)(t.x),Object(i.a)(t.y),Object(i.a)(t.z)),this[0]=t.x,this[1]=t.y,this[2]=t.z,this.check()}toObject(t){return t.x=this[0],t.y=this[1],t.z=this[2],t}get ELEMENTS(){return 3}get z(){return this[2]}set z(t){this[2]=Object(i.a)(t)}angle(t){return o.a(this,t)}cross(t){return o.c(this,this,t),this.check()}rotateX({radians:t,origin:e=c}){return o.i(this,this,e,t),this.check()}rotateY({radians:t,origin:e=c}){return o.j(this,this,e,t),this.check()}rotateZ({radians:t,origin:e=c}){return o.k(this,this,e,t),this.check()}transform(t){return this.transformAsPoint(t)}transformAsPoint(t){return o.m(this,this,t),this.check()}transformAsVector(t){return Object(a.c)(this,this,t),this.check()}transformByMatrix3(t){return o.l(this,this,t),this.check()}transformByMatrix2(t){return Object(a.b)(this,this,t),this.check()}transformByQuaternion(t){return o.n(this,this,t),this.check()}}},function(t,e,r){"use strict";e.a={EPSILON1:.1,EPSILON2:.01,EPSILON3:.001,EPSILON4:1e-4,EPSILON5:1e-5,EPSILON6:1e-6,EPSILON7:1e-7,EPSILON8:1e-8,EPSILON9:1e-9,EPSILON10:1e-10,EPSILON11:1e-11,EPSILON12:1e-12,EPSILON13:1e-13,EPSILON14:1e-14,EPSILON15:1e-15,EPSILON16:1e-16,EPSILON17:1e-17,EPSILON18:1e-18,EPSILON19:1e-19,EPSILON20:1e-20,PI_OVER_TWO:Math.PI/2,PI_OVER_FOUR:Math.PI/4,PI_OVER_SIX:Math.PI/6,TWO_PI:2*Math.PI}},function(t,e,r){"use strict";r.d(e,"a",(function(){return y}));var n=r(1),s=r(19),i=r(8),o=r(5),a=r(9),c=r(2),u=r(4);const h=Object.freeze([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),f=Object.freeze([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]),l=Object.freeze({COL0ROW0:0,COL0ROW1:1,COL0ROW2:2,COL0ROW3:3,COL1ROW0:4,COL1ROW1:5,COL1ROW2:6,COL1ROW3:7,COL2ROW0:8,COL2ROW1:9,COL2ROW2:10,COL2ROW3:11,COL3ROW0:12,COL3ROW1:13,COL3ROW2:14,COL3ROW3:15}),d={};class y extends s.a{static get IDENTITY(){return d.IDENTITY=d.IDENTITY||Object.freeze(new y(h)),d.IDENTITY}static get ZERO(){return d.ZERO=d.ZERO||Object.freeze(new y(f)),d.ZERO}get INDICES(){return l}get ELEMENTS(){return 16}get RANK(){return 4}constructor(t){super(-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0),1===arguments.length&&Array.isArray(t)?this.copy(t):this.identity()}copy(t){return this[0]=t[0],this[1]=t[1],this[2]=t[2],this[3]=t[3],this[4]=t[4],this[5]=t[5],this[6]=t[6],this[7]=t[7],this[8]=t[8],this[9]=t[9],this[10]=t[10],this[11]=t[11],this[12]=t[12],this[13]=t[13],this[14]=t[14],this[15]=t[15],this.check()}set(t,e,r,n,s,i,o,a,c,u,h,f,l,d,y,m){return this[0]=t,this[1]=e,this[2]=r,this[3]=n,this[4]=s,this[5]=i,this[6]=o,this[7]=a,this[8]=c,this[9]=u,this[10]=h,this[11]=f,this[12]=l,this[13]=d,this[14]=y,this[15]=m,this.check()}setRowMajor(t,e,r,n,s,i,o,a,c,u,h,f,l,d,y,m){return this[0]=t,this[1]=s,this[2]=c,this[3]=l,this[4]=e,this[5]=i,this[6]=u,this[7]=d,this[8]=r,this[9]=o,this[10]=h,this[11]=y,this[12]=n,this[13]=a,this[14]=f,this[15]=m,this.check()}toRowMajor(t){return t[0]=this[0],t[1]=this[4],t[2]=this[8],t[3]=this[12],t[4]=this[1],t[5]=this[5],t[6]=this[9],t[7]=this[13],t[8]=this[2],t[9]=this[6],t[10]=this[10],t[11]=this[14],t[12]=this[3],t[13]=this[7],t[14]=this[11],t[15]=this[15],t}identity(){return this.copy(h)}fromQuaternion(t){return o.b(this,t),this.check()}frustum({left:t,right:e,bottom:r,top:n,near:s,far:i}){return i===1/0?y._computeInfinitePerspectiveOffCenter(this,t,e,r,n,s):o.c(this,t,e,r,n,s,i),this.check()}static _computeInfinitePerspectiveOffCenter(t,e,r,n,s,i){const o=2*i/(r-e),a=2*i/(s-n),c=(r+e)/(r-e),u=(s+n)/(s-n),h=-2*i;return t[0]=o,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=a,t[6]=0,t[7]=0,t[8]=c,t[9]=u,t[10]=-1,t[11]=-1,t[12]=0,t[13]=0,t[14]=h,t[15]=0,t}lookAt(t,e,r){return 1===arguments.length&&({eye:t,center:e,up:r}=t),e=e||[0,0,0],r=r||[0,1,0],o.e(this,t,e,r),this.check()}ortho({left:t,right:e,bottom:r,top:n,near:s=.1,far:i=500}){return o.g(this,t,e,r,n,s,i),this.check()}orthographic({fovy:t=45*Math.PI/180,aspect:e=1,focalDistance:r=1,near:n=.1,far:s=500}){if(t>2*Math.PI)throw Error("radians");const i=t/2,o=r*Math.tan(i),a=o*e;return(new y).ortho({left:-a,right:a,bottom:-o,top:o,near:n,far:s})}perspective({fovy:t,fov:e=45*Math.PI/180,aspect:r=1,near:n=.1,far:s=500}={}){if((t=t||e)>2*Math.PI)throw Error("radians");return o.h(this,t,r,n,s),this.check()}determinant(){return o.a(this)}getScale(t=[-0,-0,-0]){return t[0]=Math.sqrt(this[0]*this[0]+this[1]*this[1]+this[2]*this[2]),t[1]=Math.sqrt(this[4]*this[4]+this[5]*this[5]+this[6]*this[6]),t[2]=Math.sqrt(this[8]*this[8]+this[9]*this[9]+this[10]*this[10]),t}getTranslation(t=[-0,-0,-0]){return t[0]=this[12],t[1]=this[13],t[2]=this[14],t}getRotation(t=[-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0],e=null){const r=this.getScale(e||[-0,-0,-0]),n=1/r[0],s=1/r[1],i=1/r[2];return t[0]=this[0]*n,t[1]=this[1]*s,t[2]=this[2]*i,t[3]=0,t[4]=this[4]*n,t[5]=this[5]*s,t[6]=this[6]*i,t[7]=0,t[8]=this[8]*n,t[9]=this[9]*s,t[10]=this[10]*i,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}getRotationMatrix3(t=[-0,-0,-0,-0,-0,-0,-0,-0,-0],e=null){const r=this.getScale(e||[-0,-0,-0]),n=1/r[0],s=1/r[1],i=1/r[2];return t[0]=this[0]*n,t[1]=this[1]*s,t[2]=this[2]*i,t[3]=this[4]*n,t[4]=this[5]*s,t[5]=this[6]*i,t[6]=this[8]*n,t[7]=this[9]*s,t[8]=this[10]*i,t}transpose(){return o.o(this,this),this.check()}invert(){return o.d(this,this),this.check()}multiplyLeft(t){return o.f(this,t,this),this.check()}multiplyRight(t){return o.f(this,this,t),this.check()}rotateX(t){return o.j(this,this,t),this.check()}rotateY(t){return o.k(this,this,t),this.check()}rotateZ(t){return o.l(this,this,t),this.check()}rotateXYZ([t,e,r]){return this.rotateX(t).rotateY(e).rotateZ(r)}rotateAxis(t,e){return o.i(this,this,t,e),this.check()}scale(t){return Array.isArray(t)?o.m(this,this,t):o.m(this,this,[t,t,t]),this.check()}translate(t){return o.n(this,this,t),this.check()}transform(t,e){return 4===t.length?(e=u.n(e||[-0,-0,-0,-0],t,this),Object(n.b)(e,4),e):this.transformAsPoint(t,e)}transformAsPoint(t,e){const{length:r}=t;switch(r){case 2:e=a.d(e||[-0,-0],t,this);break;case 3:e=c.m(e||[-0,-0,-0],t,this);break;default:throw new Error("Illegal vector")}return Object(n.b)(e,t.length),e}transformAsVector(t,e){switch(t.length){case 2:e=Object(i.a)(e||[-0,-0],t,this);break;case 3:e=Object(i.c)(e||[-0,-0,-0],t,this);break;default:throw new Error("Illegal vector")}return Object(n.b)(e,t.length),e}makeRotationX(t){return this.identity().rotateX(t)}makeTranslation(t,e,r){return this.identity().translate([t,e,r])}transformPoint(t,e){return Object(n.c)("Matrix4.transformPoint","3.0"),this.transformAsPoint(t,e)}transformVector(t,e){return Object(n.c)("Matrix4.transformVector","3.0"),this.transformAsPoint(t,e)}transformDirection(t,e){return Object(n.c)("Matrix4.transformDirection","3.0"),this.transformAsVector(t,e)}}},function(t,e,r){"use strict";r.d(e,"a",(function(){return d}));var n=r(19),s=r(1),i=r(8),o=r(7),a=r(9),c=r(2);const u=Object.freeze([1,0,0,0,1,0,0,0,1]),h=Object.freeze([0,0,0,0,0,0,0,0,0]),f=Object.freeze({COL0ROW0:0,COL0ROW1:1,COL0ROW2:2,COL1ROW0:3,COL1ROW1:4,COL1ROW2:5,COL2ROW0:6,COL2ROW1:7,COL2ROW2:8}),l={};class d extends n.a{static get IDENTITY(){return l.IDENTITY=l.IDENTITY||Object.freeze(new d(u)),l.IDENTITY}static get ZERO(){return l.ZERO=l.ZERO||Object.freeze(new d(h)),l.ZERO}get ELEMENTS(){return 9}get RANK(){return 3}get INDICES(){return f}constructor(t){super(-0,-0,-0,-0,-0,-0,-0,-0,-0),1===arguments.length&&Array.isArray(t)?this.copy(t):this.identity()}copy(t){return this[0]=t[0],this[1]=t[1],this[2]=t[2],this[3]=t[3],this[4]=t[4],this[5]=t[5],this[6]=t[6],this[7]=t[7],this[8]=t[8],this.check()}set(t,e,r,n,s,i,o,a,c){return this[0]=t,this[1]=e,this[2]=r,this[3]=n,this[4]=s,this[5]=i,this[6]=o,this[7]=a,this[8]=c,this.check()}setRowMajor(t,e,r,n,s,i,o,a,c){return this[0]=t,this[1]=n,this[2]=o,this[3]=e,this[4]=s,this[5]=a,this[6]=r,this[7]=i,this[8]=c,this.check()}determinant(){return o.b(this)}identity(){return this.copy(u)}fromQuaternion(t){return o.c(this,t),this.check()}transpose(){return o.i(this,this),this.check()}invert(){return o.d(this,this),this.check()}multiplyLeft(t){return o.e(this,t,this),this.check()}multiplyRight(t){return o.e(this,this,t),this.check()}rotate(t){return o.f(this,this,t),this.check()}scale(t){return Array.isArray(t)?o.g(this,this,t):o.g(this,this,[t,t,t]),this.check()}translate(t){return o.h(this,this,t),this.check()}transform(t,e){switch(t.length){case 2:e=a.c(e||[-0,-0],t,this);break;case 3:e=c.l(e||[-0,-0,-0],t,this);break;case 4:e=Object(i.d)(e||[-0,-0,-0,-0],t,this);break;default:throw new Error("Illegal vector")}return Object(s.b)(e,t.length),e}transformVector(t,e){return Object(s.c)("Matrix3.transformVector"),this.transform(t,e)}transformVector2(t,e){return Object(s.c)("Matrix3.transformVector"),this.transform(t,e)}transformVector3(t,e){return Object(s.c)("Matrix3.transformVector"),this.transform(t,e)}}},function(t,e,r){"use strict";r.d(e,"a",(function(){return M}));var n=r(14),s=r(1),i=r(6),o=r(0),a=r(7),c=r(2),u=r(4);function h(){var t=new o.a(4);return o.a!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t[3]=1,t}function f(t,e,r){r*=.5;var n=Math.sin(r);return t[0]=n*e[0],t[1]=n*e[1],t[2]=n*e[2],t[3]=Math.cos(r),t}function l(t,e,r){var n=e[0],s=e[1],i=e[2],o=e[3],a=r[0],c=r[1],u=r[2],h=r[3];return t[0]=n*h+o*a+s*u-i*c,t[1]=s*h+o*c+i*a-n*u,t[2]=i*h+o*u+n*c-s*a,t[3]=o*h-n*a-s*c-i*u,t}function d(t,e,r,n){var s,i,a,c,u,h=e[0],f=e[1],l=e[2],d=e[3],y=r[0],m=r[1],g=r[2],p=r[3];return(i=h*y+f*m+l*g+d*p)<0&&(i=-i,y=-y,m=-m,g=-g,p=-p),1-i>o.b?(s=Math.acos(i),a=Math.sin(s),c=Math.sin((1-n)*s)/a,u=Math.sin(n*s)/a):(c=1-n,u=n),t[0]=c*h+u*y,t[1]=c*f+u*m,t[2]=c*l+u*g,t[3]=c*d+u*p,t}function y(t,e){var r,n=e[0]+e[4]+e[8];if(n>0)r=Math.sqrt(n+1),t[3]=.5*r,r=.5/r,t[0]=(e[5]-e[7])*r,t[1]=(e[6]-e[2])*r,t[2]=(e[1]-e[3])*r;else{var s=0;e[4]>e[0]&&(s=1),e[8]>e[3*s+s]&&(s=2);var i=(s+1)%3,o=(s+2)%3;r=Math.sqrt(e[3*s+s]-e[3*i+i]-e[3*o+o]+1),t[s]=.5*r,r=.5/r,t[3]=(e[3*i+o]-e[3*o+i])*r,t[i]=(e[3*i+s]+e[3*s+i])*r,t[o]=(e[3*o+s]+e[3*s+o])*r}return t}u.b,u.g,u.c,u.l;var m,g,p,b,T,w,E=u.a,O=u.k,_=u.d,A=u.i,I=u.h,v=u.m,S=u.j,N=(u.f,u.e,m=c.b(),g=c.e(1,0,0),p=c.e(0,1,0),function(t,e,r){var n=c.d(e,r);return n<-.999999?(c.c(m,g,e),c.f(m)<1e-6&&c.c(m,p,e),c.h(m,m),f(t,m,Math.PI),t):n>.999999?(t[0]=0,t[1]=0,t[2]=0,t[3]=1,t):(c.c(m,e,r),t[0]=m[0],t[1]=m[1],t[2]=m[2],t[3]=1+n,S(t,t))});b=h(),T=h(),w=a.a();const x=[0,0,0,1];class M extends n.a{constructor(t=0,e=0,r=0,n=1){super(-0,-0,-0,-0),Array.isArray(t)&&1===arguments.length?this.copy(t):this.set(t,e,r,n)}copy(t){return this[0]=t[0],this[1]=t[1],this[2]=t[2],this[3]=t[3],this.check()}set(t,e,r,n){return this[0]=t,this[1]=e,this[2]=r,this[3]=n,this.check()}fromMatrix3(t){return y(this,t),this.check()}identity(){var t;return(t=this)[0]=0,t[1]=0,t[2]=0,t[3]=1,this.check()}fromAxisRotation(t,e){return f(this,t,e),this.check()}setAxisAngle(t,e){return this.fromAxisRotation(t,e)}get ELEMENTS(){return 4}get x(){return this[0]}set x(t){this[0]=Object(s.a)(t)}get y(){return this[1]}set y(t){this[1]=Object(s.a)(t)}get z(){return this[2]}set z(t){this[2]=Object(s.a)(t)}get w(){return this[3]}set w(t){this[3]=Object(s.a)(t)}len(){return I(this)}lengthSquared(){return v(this)}dot(t,e){if(void 0!==e)throw new Error("Quaternion.dot only takes one argument");return _(this,t)}rotationTo(t,e){return N(this,t,e),this.check()}add(t,e){if(void 0!==e)throw new Error("Quaternion.add only takes one argument");return E(this,this,t),this.check()}calculateW(){var t,e,r,n,s;return t=this,r=(e=this)[0],n=e[1],s=e[2],t[0]=r,t[1]=n,t[2]=s,t[3]=Math.sqrt(Math.abs(1-r*r-n*n-s*s)),this.check()}conjugate(){var t,e;return e=this,(t=this)[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t[3]=e[3],this.check()}invert(){var t,e,r,n,s,i,o,a;return t=this,r=(e=this)[0],n=e[1],s=e[2],i=e[3],a=(o=r*r+n*n+s*s+i*i)?1/o:0,t[0]=-r*a,t[1]=-n*a,t[2]=-s*a,t[3]=i*a,this.check()}lerp(t,e,r){return A(this,t,e,r),this.check()}multiplyRight(t,e){return Object(i.a)(!e),l(this,this,t),this.check()}multiplyLeft(t,e){return Object(i.a)(!e),l(this,t,this),this.check()}normalize(){const t=this.len(),e=t>0?1/t:0;return this[0]=this[0]*e,this[1]=this[1]*e,this[2]=this[2]*e,this[3]=this[3]*e,0===t&&(this[3]=1),this.check()}rotateX(t){return function(t,e,r){r*=.5;var n=e[0],s=e[1],i=e[2],o=e[3],a=Math.sin(r),c=Math.cos(r);t[0]=n*c+o*a,t[1]=s*c+i*a,t[2]=i*c-s*a,t[3]=o*c-n*a}(this,this,t),this.check()}rotateY(t){return function(t,e,r){r*=.5;var n=e[0],s=e[1],i=e[2],o=e[3],a=Math.sin(r),c=Math.cos(r);t[0]=n*c-i*a,t[1]=s*c+o*a,t[2]=i*c+n*a,t[3]=o*c-s*a}(this,this,t),this.check()}rotateZ(t){return function(t,e,r){r*=.5;var n=e[0],s=e[1],i=e[2],o=e[3],a=Math.sin(r),c=Math.cos(r);t[0]=n*c+s*a,t[1]=s*c-n*a,t[2]=i*c+o*a,t[3]=o*c-i*a}(this,this,t),this.check()}scale(t){return O(this,this,t),this.check()}slerp(t,e,r){switch(arguments.length){case 1:({start:t=x,target:e,ratio:r}=arguments[0]);break;case 2:[e,r]=arguments,t=this}return d(this,t,e,r),this.check()}transformVector4(t,e=t){return u.o(e,t,this),Object(s.b)(e,4)}lengthSq(){return this.lengthSquared()}setFromAxisAngle(t,e){return this.setAxisAngle(t,e)}premultiply(t,e){return this.multiplyLeft(t,e)}multiply(t,e){return this.multiplyRight(t,e)}}}])}));
1
+ !function(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e(require("loaders"));else if("function"==typeof define&&define.amd)define(["loaders"],e);else{var r="object"==typeof exports?e(require("loaders")):e(t.loaders);for(var n in r)("object"==typeof exports?exports:t)[n]=r[n]}}(window,(function(t){return function(t){var e={};function r(n){if(e[n])return e[n].exports;var s=e[n]={i:n,l:!1,exports:{}};return t[n].call(s.exports,s,s.exports,r),s.l=!0,s.exports}return r.m=t,r.c=e,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var s in t)r.d(n,s,function(e){return t[e]}.bind(null,s));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=30)}([function(t,e,r){"use strict";r.d(e,"b",(function(){return n})),r.d(e,"a",(function(){return s})),r.d(e,"c",(function(){return i}));var n=1e-6,s="undefined"!=typeof Float32Array?Float32Array:Array,i=Math.random;Math.PI;Math.hypot||(Math.hypot=function(){for(var t=0,e=arguments.length;e--;)t+=arguments[e]*arguments[e];return Math.sqrt(t)})},function(t,e,r){"use strict";r.d(e,"a",(function(){return s})),r.d(e,"b",(function(){return i})),r.d(e,"c",(function(){return a}));var n=r(3);function s(t){if(!Number.isFinite(t))throw new Error("Invalid number ".concat(t));return t}function i(t,e,r=""){if(n.b.debug&&!function(t,e){if(t.length!==e)return!1;for(let e=0;e<t.length;++e)if(!Number.isFinite(t[e]))return!1;return!0}(t,e))throw new Error("math.gl: ".concat(r," some fields set to invalid numbers'"));return t}const o={};function a(t,e){o[t]||(o[t]=!0,console.warn("".concat(t," has been removed in version ").concat(e,", see upgrade guide for more information")))}},function(t,e,r){"use strict";r.d(e,"b",(function(){return s})),r.d(e,"g",(function(){return i})),r.d(e,"e",(function(){return o})),r.d(e,"h",(function(){return a})),r.d(e,"d",(function(){return c})),r.d(e,"c",(function(){return u})),r.d(e,"m",(function(){return A})),r.d(e,"l",(function(){return h})),r.d(e,"n",(function(){return B})),r.d(e,"i",(function(){return f})),r.d(e,"j",(function(){return l})),r.d(e,"k",(function(){return d})),r.d(e,"a",(function(){return C})),r.d(e,"f",(function(){return E}));var n=r(0);function s(){var t=new n.a(3);return n.a!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t}function i(t){var e=t[0],r=t[1],n=t[2];return Math.hypot(e,r,n)}function o(t,e,r){var s=new n.a(3);return s[0]=t,s[1]=e,s[2]=r,s}function a(t,e){var r=e[0],n=e[1],s=e[2],i=r*r+n*n+s*s;return i>0&&(i=1/Math.sqrt(i)),t[0]=e[0]*i,t[1]=e[1]*i,t[2]=e[2]*i,t}function c(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function u(t,e,r){var n=e[0],s=e[1],i=e[2],o=r[0],a=r[1],c=r[2];return t[0]=s*c-i*a,t[1]=i*o-n*c,t[2]=n*a-s*o,t}function A(t,e,r){var n=e[0],s=e[1],i=e[2],o=r[3]*n+r[7]*s+r[11]*i+r[15];return o=o||1,t[0]=(r[0]*n+r[4]*s+r[8]*i+r[12])/o,t[1]=(r[1]*n+r[5]*s+r[9]*i+r[13])/o,t[2]=(r[2]*n+r[6]*s+r[10]*i+r[14])/o,t}function h(t,e,r){var n=e[0],s=e[1],i=e[2];return t[0]=n*r[0]+s*r[3]+i*r[6],t[1]=n*r[1]+s*r[4]+i*r[7],t[2]=n*r[2]+s*r[5]+i*r[8],t}function B(t,e,r){var n=r[0],s=r[1],i=r[2],o=r[3],a=e[0],c=e[1],u=e[2],A=s*u-i*c,h=i*a-n*u,B=n*c-s*a,f=s*B-i*h,l=i*A-n*B,d=n*h-s*A,C=2*o;return A*=C,h*=C,B*=C,f*=2,l*=2,d*=2,t[0]=a+A+f,t[1]=c+h+l,t[2]=u+B+d,t}function f(t,e,r,n){var s=[],i=[];return s[0]=e[0]-r[0],s[1]=e[1]-r[1],s[2]=e[2]-r[2],i[0]=s[0],i[1]=s[1]*Math.cos(n)-s[2]*Math.sin(n),i[2]=s[1]*Math.sin(n)+s[2]*Math.cos(n),t[0]=i[0]+r[0],t[1]=i[1]+r[1],t[2]=i[2]+r[2],t}function l(t,e,r,n){var s=[],i=[];return s[0]=e[0]-r[0],s[1]=e[1]-r[1],s[2]=e[2]-r[2],i[0]=s[2]*Math.sin(n)+s[0]*Math.cos(n),i[1]=s[1],i[2]=s[2]*Math.cos(n)-s[0]*Math.sin(n),t[0]=i[0]+r[0],t[1]=i[1]+r[1],t[2]=i[2]+r[2],t}function d(t,e,r,n){var s=[],i=[];return s[0]=e[0]-r[0],s[1]=e[1]-r[1],s[2]=e[2]-r[2],i[0]=s[0]*Math.cos(n)-s[1]*Math.sin(n),i[1]=s[0]*Math.sin(n)+s[1]*Math.cos(n),i[2]=s[2],t[0]=i[0]+r[0],t[1]=i[1]+r[1],t[2]=i[2]+r[2],t}function C(t,e){var r=t[0],n=t[1],s=t[2],i=e[0],o=e[1],a=e[2],u=Math.sqrt(r*r+n*n+s*s)*Math.sqrt(i*i+o*o+a*a),A=u&&c(t,e)/u;return Math.acos(Math.min(Math.max(A,-1),1))}var m,E=i;m=s()},function(t,e,r){"use strict";r.d(e,"b",(function(){return i})),r.d(e,"d",(function(){return o})),r.d(e,"e",(function(){return a})),r.d(e,"g",(function(){return u})),r.d(e,"f",(function(){return A})),r.d(e,"a",(function(){return h})),r.d(e,"c",(function(){return B}));r(6);const n=1/Math.PI*180,s=1/180*Math.PI,i={};function o(t,{precision:e=i.precision||4}={}){return t=function(t){return Math.round(t/i.EPSILON)*i.EPSILON}(t),"".concat(parseFloat(t.toPrecision(e)))}function a(t){return Array.isArray(t)||ArrayBuffer.isView(t)&&!(t instanceof DataView)}function c(t,e,r){if(a(t)){r=r||((n=t).clone?n.clone():new Array(n.length));for(let n=0;n<r.length&&n<t.length;++n)r[n]=e(t[n],n,r);return r}var n;return e(t)}function u(t){return function(t,e){return c(t,t=>t*s,e)}(t)}function A(t){return function(t,e){return c(t,t=>t*n,e)}(t)}function h(t,e,r){return c(t,t=>Math.max(e,Math.min(r,t)))}function B(t,e,r){const n=i.EPSILON;r&&(i.EPSILON=r);try{if(t===e)return!0;if(a(t)&&a(e)){if(t.length!==e.length)return!1;for(let r=0;r<t.length;++r)if(!B(t[r],e[r]))return!1;return!0}return t&&t.equals?t.equals(e):e&&e.equals?e.equals(t):!(!Number.isFinite(t)||!Number.isFinite(e))&&Math.abs(t-e)<=i.EPSILON*Math.max(1,Math.abs(t),Math.abs(e))}finally{i.EPSILON=n}}i.EPSILON=1e-12,i.debug=!1,i.precision=4,i.printTypes=!1,i.printDegrees=!1,i.printRowMajor=!0},function(t,e,r){"use strict";r.d(e,"b",(function(){return s})),r.d(e,"g",(function(){return i})),r.d(e,"c",(function(){return o})),r.d(e,"l",(function(){return a})),r.d(e,"a",(function(){return c})),r.d(e,"k",(function(){return u})),r.d(e,"h",(function(){return A})),r.d(e,"m",(function(){return h})),r.d(e,"j",(function(){return B})),r.d(e,"d",(function(){return f})),r.d(e,"i",(function(){return l})),r.d(e,"n",(function(){return d})),r.d(e,"o",(function(){return C})),r.d(e,"f",(function(){return m})),r.d(e,"e",(function(){return E}));var n=r(0);function s(t){var e=new n.a(4);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e}function i(t,e,r,s){var i=new n.a(4);return i[0]=t,i[1]=e,i[2]=r,i[3]=s,i}function o(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t}function a(t,e,r,n,s){return t[0]=e,t[1]=r,t[2]=n,t[3]=s,t}function c(t,e,r){return t[0]=e[0]+r[0],t[1]=e[1]+r[1],t[2]=e[2]+r[2],t[3]=e[3]+r[3],t}function u(t,e,r){return t[0]=e[0]*r,t[1]=e[1]*r,t[2]=e[2]*r,t[3]=e[3]*r,t}function A(t){var e=t[0],r=t[1],n=t[2],s=t[3];return Math.hypot(e,r,n,s)}function h(t){var e=t[0],r=t[1],n=t[2],s=t[3];return e*e+r*r+n*n+s*s}function B(t,e){var r=e[0],n=e[1],s=e[2],i=e[3],o=r*r+n*n+s*s+i*i;return o>0&&(o=1/Math.sqrt(o)),t[0]=r*o,t[1]=n*o,t[2]=s*o,t[3]=i*o,t}function f(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]+t[3]*e[3]}function l(t,e,r,n){var s=e[0],i=e[1],o=e[2],a=e[3];return t[0]=s+n*(r[0]-s),t[1]=i+n*(r[1]-i),t[2]=o+n*(r[2]-o),t[3]=a+n*(r[3]-a),t}function d(t,e,r){var n=e[0],s=e[1],i=e[2],o=e[3];return t[0]=r[0]*n+r[4]*s+r[8]*i+r[12]*o,t[1]=r[1]*n+r[5]*s+r[9]*i+r[13]*o,t[2]=r[2]*n+r[6]*s+r[10]*i+r[14]*o,t[3]=r[3]*n+r[7]*s+r[11]*i+r[15]*o,t}function C(t,e,r){var n=e[0],s=e[1],i=e[2],o=r[0],a=r[1],c=r[2],u=r[3],A=u*n+a*i-c*s,h=u*s+c*n-o*i,B=u*i+o*s-a*n,f=-o*n-a*s-c*i;return t[0]=A*u+f*-o+h*-c-B*-a,t[1]=h*u+f*-a+B*-o-A*-c,t[2]=B*u+f*-c+A*-a-h*-o,t[3]=e[3],t}function m(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]&&t[3]===e[3]}function E(t,e){var r=t[0],s=t[1],i=t[2],o=t[3],a=e[0],c=e[1],u=e[2],A=e[3];return Math.abs(r-a)<=n.b*Math.max(1,Math.abs(r),Math.abs(a))&&Math.abs(s-c)<=n.b*Math.max(1,Math.abs(s),Math.abs(c))&&Math.abs(i-u)<=n.b*Math.max(1,Math.abs(i),Math.abs(u))&&Math.abs(o-A)<=n.b*Math.max(1,Math.abs(o),Math.abs(A))}var b,g;b=new n.a(4),n.a!=Float32Array&&(b[0]=0,b[1]=0,b[2]=0,b[3]=0),g=b},function(t,e,r){"use strict";r.d(e,"o",(function(){return s})),r.d(e,"d",(function(){return i})),r.d(e,"a",(function(){return o})),r.d(e,"f",(function(){return a})),r.d(e,"n",(function(){return c})),r.d(e,"m",(function(){return u})),r.d(e,"i",(function(){return A})),r.d(e,"j",(function(){return h})),r.d(e,"k",(function(){return B})),r.d(e,"l",(function(){return f})),r.d(e,"b",(function(){return l})),r.d(e,"c",(function(){return d})),r.d(e,"h",(function(){return C})),r.d(e,"g",(function(){return m})),r.d(e,"e",(function(){return E}));var n=r(0);function s(t,e){if(t===e){var r=e[1],n=e[2],s=e[3],i=e[6],o=e[7],a=e[11];t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=r,t[6]=e[9],t[7]=e[13],t[8]=n,t[9]=i,t[11]=e[14],t[12]=s,t[13]=o,t[14]=a}else t[0]=e[0],t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=e[1],t[5]=e[5],t[6]=e[9],t[7]=e[13],t[8]=e[2],t[9]=e[6],t[10]=e[10],t[11]=e[14],t[12]=e[3],t[13]=e[7],t[14]=e[11],t[15]=e[15];return t}function i(t,e){var r=e[0],n=e[1],s=e[2],i=e[3],o=e[4],a=e[5],c=e[6],u=e[7],A=e[8],h=e[9],B=e[10],f=e[11],l=e[12],d=e[13],C=e[14],m=e[15],E=r*a-n*o,b=r*c-s*o,g=r*u-i*o,y=n*c-s*a,p=n*u-i*a,I=s*u-i*c,T=A*d-h*l,M=A*C-B*l,G=A*m-f*l,F=h*C-B*d,D=h*m-f*d,O=B*m-f*C,R=E*O-b*D+g*F+y*G-p*M+I*T;return R?(R=1/R,t[0]=(a*O-c*D+u*F)*R,t[1]=(s*D-n*O-i*F)*R,t[2]=(d*I-C*p+m*y)*R,t[3]=(B*p-h*I-f*y)*R,t[4]=(c*G-o*O-u*M)*R,t[5]=(r*O-s*G+i*M)*R,t[6]=(C*g-l*I-m*b)*R,t[7]=(A*I-B*g+f*b)*R,t[8]=(o*D-a*G+u*T)*R,t[9]=(n*G-r*D-i*T)*R,t[10]=(l*p-d*g+m*E)*R,t[11]=(h*g-A*p-f*E)*R,t[12]=(a*M-o*F-c*T)*R,t[13]=(r*F-n*M+s*T)*R,t[14]=(d*b-l*y-C*E)*R,t[15]=(A*y-h*b+B*E)*R,t):null}function o(t){var e=t[0],r=t[1],n=t[2],s=t[3],i=t[4],o=t[5],a=t[6],c=t[7],u=t[8],A=t[9],h=t[10],B=t[11],f=t[12],l=t[13],d=t[14],C=t[15];return(e*o-r*i)*(h*C-B*d)-(e*a-n*i)*(A*C-B*l)+(e*c-s*i)*(A*d-h*l)+(r*a-n*o)*(u*C-B*f)-(r*c-s*o)*(u*d-h*f)+(n*c-s*a)*(u*l-A*f)}function a(t,e,r){var n=e[0],s=e[1],i=e[2],o=e[3],a=e[4],c=e[5],u=e[6],A=e[7],h=e[8],B=e[9],f=e[10],l=e[11],d=e[12],C=e[13],m=e[14],E=e[15],b=r[0],g=r[1],y=r[2],p=r[3];return t[0]=b*n+g*a+y*h+p*d,t[1]=b*s+g*c+y*B+p*C,t[2]=b*i+g*u+y*f+p*m,t[3]=b*o+g*A+y*l+p*E,b=r[4],g=r[5],y=r[6],p=r[7],t[4]=b*n+g*a+y*h+p*d,t[5]=b*s+g*c+y*B+p*C,t[6]=b*i+g*u+y*f+p*m,t[7]=b*o+g*A+y*l+p*E,b=r[8],g=r[9],y=r[10],p=r[11],t[8]=b*n+g*a+y*h+p*d,t[9]=b*s+g*c+y*B+p*C,t[10]=b*i+g*u+y*f+p*m,t[11]=b*o+g*A+y*l+p*E,b=r[12],g=r[13],y=r[14],p=r[15],t[12]=b*n+g*a+y*h+p*d,t[13]=b*s+g*c+y*B+p*C,t[14]=b*i+g*u+y*f+p*m,t[15]=b*o+g*A+y*l+p*E,t}function c(t,e,r){var n,s,i,o,a,c,u,A,h,B,f,l,d=r[0],C=r[1],m=r[2];return e===t?(t[12]=e[0]*d+e[4]*C+e[8]*m+e[12],t[13]=e[1]*d+e[5]*C+e[9]*m+e[13],t[14]=e[2]*d+e[6]*C+e[10]*m+e[14],t[15]=e[3]*d+e[7]*C+e[11]*m+e[15]):(n=e[0],s=e[1],i=e[2],o=e[3],a=e[4],c=e[5],u=e[6],A=e[7],h=e[8],B=e[9],f=e[10],l=e[11],t[0]=n,t[1]=s,t[2]=i,t[3]=o,t[4]=a,t[5]=c,t[6]=u,t[7]=A,t[8]=h,t[9]=B,t[10]=f,t[11]=l,t[12]=n*d+a*C+h*m+e[12],t[13]=s*d+c*C+B*m+e[13],t[14]=i*d+u*C+f*m+e[14],t[15]=o*d+A*C+l*m+e[15]),t}function u(t,e,r){var n=r[0],s=r[1],i=r[2];return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t[3]=e[3]*n,t[4]=e[4]*s,t[5]=e[5]*s,t[6]=e[6]*s,t[7]=e[7]*s,t[8]=e[8]*i,t[9]=e[9]*i,t[10]=e[10]*i,t[11]=e[11]*i,t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t}function A(t,e,r,s){var i,o,a,c,u,A,h,B,f,l,d,C,m,E,b,g,y,p,I,T,M,G,F,D,O=s[0],R=s[1],_=s[2],S=Math.hypot(O,R,_);return S<n.b?null:(O*=S=1/S,R*=S,_*=S,i=Math.sin(r),a=1-(o=Math.cos(r)),c=e[0],u=e[1],A=e[2],h=e[3],B=e[4],f=e[5],l=e[6],d=e[7],C=e[8],m=e[9],E=e[10],b=e[11],g=O*O*a+o,y=R*O*a+_*i,p=_*O*a-R*i,I=O*R*a-_*i,T=R*R*a+o,M=_*R*a+O*i,G=O*_*a+R*i,F=R*_*a-O*i,D=_*_*a+o,t[0]=c*g+B*y+C*p,t[1]=u*g+f*y+m*p,t[2]=A*g+l*y+E*p,t[3]=h*g+d*y+b*p,t[4]=c*I+B*T+C*M,t[5]=u*I+f*T+m*M,t[6]=A*I+l*T+E*M,t[7]=h*I+d*T+b*M,t[8]=c*G+B*F+C*D,t[9]=u*G+f*F+m*D,t[10]=A*G+l*F+E*D,t[11]=h*G+d*F+b*D,e!==t&&(t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t)}function h(t,e,r){var n=Math.sin(r),s=Math.cos(r),i=e[4],o=e[5],a=e[6],c=e[7],u=e[8],A=e[9],h=e[10],B=e[11];return e!==t&&(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[4]=i*s+u*n,t[5]=o*s+A*n,t[6]=a*s+h*n,t[7]=c*s+B*n,t[8]=u*s-i*n,t[9]=A*s-o*n,t[10]=h*s-a*n,t[11]=B*s-c*n,t}function B(t,e,r){var n=Math.sin(r),s=Math.cos(r),i=e[0],o=e[1],a=e[2],c=e[3],u=e[8],A=e[9],h=e[10],B=e[11];return e!==t&&(t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[0]=i*s-u*n,t[1]=o*s-A*n,t[2]=a*s-h*n,t[3]=c*s-B*n,t[8]=i*n+u*s,t[9]=o*n+A*s,t[10]=a*n+h*s,t[11]=c*n+B*s,t}function f(t,e,r){var n=Math.sin(r),s=Math.cos(r),i=e[0],o=e[1],a=e[2],c=e[3],u=e[4],A=e[5],h=e[6],B=e[7];return e!==t&&(t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[0]=i*s+u*n,t[1]=o*s+A*n,t[2]=a*s+h*n,t[3]=c*s+B*n,t[4]=u*s-i*n,t[5]=A*s-o*n,t[6]=h*s-a*n,t[7]=B*s-c*n,t}function l(t,e){var r=e[0],n=e[1],s=e[2],i=e[3],o=r+r,a=n+n,c=s+s,u=r*o,A=n*o,h=n*a,B=s*o,f=s*a,l=s*c,d=i*o,C=i*a,m=i*c;return t[0]=1-h-l,t[1]=A+m,t[2]=B-C,t[3]=0,t[4]=A-m,t[5]=1-u-l,t[6]=f+d,t[7]=0,t[8]=B+C,t[9]=f-d,t[10]=1-u-h,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function d(t,e,r,n,s,i,o){var a=1/(r-e),c=1/(s-n),u=1/(i-o);return t[0]=2*i*a,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=2*i*c,t[6]=0,t[7]=0,t[8]=(r+e)*a,t[9]=(s+n)*c,t[10]=(o+i)*u,t[11]=-1,t[12]=0,t[13]=0,t[14]=o*i*2*u,t[15]=0,t}function C(t,e,r,n,s){var i,o=1/Math.tan(e/2);return t[0]=o/r,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=o,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=-1,t[12]=0,t[13]=0,t[15]=0,null!=s&&s!==1/0?(i=1/(n-s),t[10]=(s+n)*i,t[14]=2*s*n*i):(t[10]=-1,t[14]=-2*n),t}function m(t,e,r,n,s,i,o){var a=1/(e-r),c=1/(n-s),u=1/(i-o);return t[0]=-2*a,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=-2*c,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=2*u,t[11]=0,t[12]=(e+r)*a,t[13]=(s+n)*c,t[14]=(o+i)*u,t[15]=1,t}function E(t,e,r,s){var i,o,a,c,u,A,h,B,f,l,d=e[0],C=e[1],m=e[2],E=s[0],b=s[1],g=s[2],y=r[0],p=r[1],I=r[2];return Math.abs(d-y)<n.b&&Math.abs(C-p)<n.b&&Math.abs(m-I)<n.b?function(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}(t):(h=d-y,B=C-p,f=m-I,i=b*(f*=l=1/Math.hypot(h,B,f))-g*(B*=l),o=g*(h*=l)-E*f,a=E*B-b*h,(l=Math.hypot(i,o,a))?(i*=l=1/l,o*=l,a*=l):(i=0,o=0,a=0),c=B*a-f*o,u=f*i-h*a,A=h*o-B*i,(l=Math.hypot(c,u,A))?(c*=l=1/l,u*=l,A*=l):(c=0,u=0,A=0),t[0]=i,t[1]=c,t[2]=h,t[3]=0,t[4]=o,t[5]=u,t[6]=B,t[7]=0,t[8]=a,t[9]=A,t[10]=f,t[11]=0,t[12]=-(i*d+o*C+a*m),t[13]=-(c*d+u*C+A*m),t[14]=-(h*d+B*C+f*m),t[15]=1,t)}},function(t,e,r){"use strict";function n(t,e){if(!t)throw new Error("math.gl assertion ".concat(e))}r.d(e,"a",(function(){return n}))},function(t,e,r){"use strict";r.d(e,"a",(function(){return s})),r.d(e,"i",(function(){return i})),r.d(e,"d",(function(){return o})),r.d(e,"b",(function(){return a})),r.d(e,"e",(function(){return c})),r.d(e,"h",(function(){return u})),r.d(e,"f",(function(){return A})),r.d(e,"g",(function(){return h})),r.d(e,"c",(function(){return B}));var n=r(0);function s(){var t=new n.a(9);return n.a!=Float32Array&&(t[1]=0,t[2]=0,t[3]=0,t[5]=0,t[6]=0,t[7]=0),t[0]=1,t[4]=1,t[8]=1,t}function i(t,e){if(t===e){var r=e[1],n=e[2],s=e[5];t[1]=e[3],t[2]=e[6],t[3]=r,t[5]=e[7],t[6]=n,t[7]=s}else t[0]=e[0],t[1]=e[3],t[2]=e[6],t[3]=e[1],t[4]=e[4],t[5]=e[7],t[6]=e[2],t[7]=e[5],t[8]=e[8];return t}function o(t,e){var r=e[0],n=e[1],s=e[2],i=e[3],o=e[4],a=e[5],c=e[6],u=e[7],A=e[8],h=A*o-a*u,B=-A*i+a*c,f=u*i-o*c,l=r*h+n*B+s*f;return l?(l=1/l,t[0]=h*l,t[1]=(-A*n+s*u)*l,t[2]=(a*n-s*o)*l,t[3]=B*l,t[4]=(A*r-s*c)*l,t[5]=(-a*r+s*i)*l,t[6]=f*l,t[7]=(-u*r+n*c)*l,t[8]=(o*r-n*i)*l,t):null}function a(t){var e=t[0],r=t[1],n=t[2],s=t[3],i=t[4],o=t[5],a=t[6],c=t[7],u=t[8];return e*(u*i-o*c)+r*(-u*s+o*a)+n*(c*s-i*a)}function c(t,e,r){var n=e[0],s=e[1],i=e[2],o=e[3],a=e[4],c=e[5],u=e[6],A=e[7],h=e[8],B=r[0],f=r[1],l=r[2],d=r[3],C=r[4],m=r[5],E=r[6],b=r[7],g=r[8];return t[0]=B*n+f*o+l*u,t[1]=B*s+f*a+l*A,t[2]=B*i+f*c+l*h,t[3]=d*n+C*o+m*u,t[4]=d*s+C*a+m*A,t[5]=d*i+C*c+m*h,t[6]=E*n+b*o+g*u,t[7]=E*s+b*a+g*A,t[8]=E*i+b*c+g*h,t}function u(t,e,r){var n=e[0],s=e[1],i=e[2],o=e[3],a=e[4],c=e[5],u=e[6],A=e[7],h=e[8],B=r[0],f=r[1];return t[0]=n,t[1]=s,t[2]=i,t[3]=o,t[4]=a,t[5]=c,t[6]=B*n+f*o+u,t[7]=B*s+f*a+A,t[8]=B*i+f*c+h,t}function A(t,e,r){var n=e[0],s=e[1],i=e[2],o=e[3],a=e[4],c=e[5],u=e[6],A=e[7],h=e[8],B=Math.sin(r),f=Math.cos(r);return t[0]=f*n+B*o,t[1]=f*s+B*a,t[2]=f*i+B*c,t[3]=f*o-B*n,t[4]=f*a-B*s,t[5]=f*c-B*i,t[6]=u,t[7]=A,t[8]=h,t}function h(t,e,r){var n=r[0],s=r[1];return t[0]=n*e[0],t[1]=n*e[1],t[2]=n*e[2],t[3]=s*e[3],t[4]=s*e[4],t[5]=s*e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t}function B(t,e){var r=e[0],n=e[1],s=e[2],i=e[3],o=r+r,a=n+n,c=s+s,u=r*o,A=n*o,h=n*a,B=s*o,f=s*a,l=s*c,d=i*o,C=i*a,m=i*c;return t[0]=1-h-l,t[3]=A-m,t[6]=B+C,t[1]=A+m,t[4]=1-u-l,t[7]=f-d,t[2]=B-C,t[5]=f+d,t[8]=1-u-h,t}},function(t,e,r){"use strict";function n(t,e,r){const n=e[0],s=e[1],i=r[3]*n+r[7]*s||1;return t[0]=(r[0]*n+r[4]*s)/i,t[1]=(r[1]*n+r[5]*s)/i,t}function s(t,e,r){const n=e[0],s=e[1],i=e[2],o=r[3]*n+r[7]*s+r[11]*i||1;return t[0]=(r[0]*n+r[4]*s+r[8]*i)/o,t[1]=(r[1]*n+r[5]*s+r[9]*i)/o,t[2]=(r[2]*n+r[6]*s+r[10]*i)/o,t}function i(t,e,r){const n=e[0],s=e[1];return t[0]=r[0]*n+r[2]*s,t[1]=r[1]*n+r[3]*s,t[2]=e[2],t}function o(t,e,r){const n=e[0],s=e[1],i=e[2];return t[0]=r[0]*n+r[3]*s+r[6]*i,t[1]=r[1]*n+r[4]*s+r[7]*i,t[2]=r[2]*n+r[5]*s+r[8]*i,t[3]=e[3],t}r.d(e,"a",(function(){return n})),r.d(e,"c",(function(){return s})),r.d(e,"b",(function(){return i})),r.d(e,"d",(function(){return o}))},function(t,e,r){"use strict";r.d(e,"a",(function(){return s})),r.d(e,"b",(function(){return i})),r.d(e,"c",(function(){return o})),r.d(e,"d",(function(){return a}));var n=r(0);function s(t,e,r){var n=e[0],s=e[1];return t[0]=r[0]*n+r[2]*s,t[1]=r[1]*n+r[3]*s,t}function i(t,e,r){var n=e[0],s=e[1];return t[0]=r[0]*n+r[2]*s+r[4],t[1]=r[1]*n+r[3]*s+r[5],t}function o(t,e,r){var n=e[0],s=e[1];return t[0]=r[0]*n+r[3]*s+r[6],t[1]=r[1]*n+r[4]*s+r[7],t}function a(t,e,r){var n=e[0],s=e[1];return t[0]=r[0]*n+r[4]*s+r[12],t[1]=r[1]*n+r[5]*s+r[13],t}var c,u;c=new n.a(2),n.a!=Float32Array&&(c[0]=0,c[1]=0),u=c},,function(t,e,r){"use strict";(function(t,n){r.d(e,"a",(function(){return s}));"undefined"!=typeof self&&self,"undefined"!=typeof window&&window,"undefined"!=typeof document&&document;const s=Boolean("object"!=typeof n||"[object process]"!==String(n)||n.browser),i=void 0!==n&&n.version&&/v([0-9]*)/.exec(n.version);i&&parseFloat(i[1])}).call(this,r(28),r(29))},function(t,e,r){"use strict";(function(t,n){r.d(e,"a",(function(){return i})),r.d(e,"b",(function(){return o})),r.d(e,"c",(function(){return a}));const s={self:"undefined"!=typeof self&&self,window:"undefined"!=typeof window&&window,global:void 0!==t&&t,document:"undefined"!=typeof document&&document},i=s.global||s.self||s.window||{},o="object"!=typeof n||"[object process]"!==String(n)||n.browser,a="function"==typeof importScripts,c=("undefined"!=typeof window&&window.orientation,void 0!==n&&n.version&&/v([0-9]*)/.exec(n.version));c&&parseFloat(c[1])}).call(this,r(28),r(29))},,function(t,e,r){"use strict";r.d(e,"a",(function(){return i}));var n=r(3),s=r(6);class i extends(function(t){function e(){var e=Reflect.construct(t,Array.from(arguments));return Object.setPrototypeOf(e,Object.getPrototypeOf(this)),e}return e.prototype=Object.create(t.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t,e}(Array)){get ELEMENTS(){return Object(s.a)(!1),0}clone(){return(new this.constructor).copy(this)}from(t){return Array.isArray(t)?this.copy(t):this.fromObject(t)}fromArray(t,e=0){for(let r=0;r<this.ELEMENTS;++r)this[r]=t[r+e];return this.check()}to(t){return t===this?this:Object(n.e)(t)?this.toArray(t):this.toObject(t)}toTarget(t){return t?this.to(t):this}toArray(t=[],e=0){for(let r=0;r<this.ELEMENTS;++r)t[e+r]=this[r];return t}toFloat32Array(){return new Float32Array(this)}toString(){return this.formatString(n.b)}formatString(t){let e="";for(let r=0;r<this.ELEMENTS;++r)e+=(r>0?", ":"")+Object(n.d)(this[r],t);return"".concat(t.printTypes?this.constructor.name:"","[").concat(e,"]")}equals(t){if(!t||this.length!==t.length)return!1;for(let e=0;e<this.ELEMENTS;++e)if(!Object(n.c)(this[e],t[e]))return!1;return!0}exactEquals(t){if(!t||this.length!==t.length)return!1;for(let e=0;e<this.ELEMENTS;++e)if(this[e]!==t[e])return!1;return!0}negate(){for(let t=0;t<this.ELEMENTS;++t)this[t]=-this[t];return this.check()}lerp(t,e,r){void 0===r&&(r=e,e=t,t=this);for(let n=0;n<this.ELEMENTS;++n){const s=t[n];this[n]=s+r*(e[n]-s)}return this.check()}min(t){for(let e=0;e<this.ELEMENTS;++e)this[e]=Math.min(t[e],this[e]);return this.check()}max(t){for(let e=0;e<this.ELEMENTS;++e)this[e]=Math.max(t[e],this[e]);return this.check()}clamp(t,e){for(let r=0;r<this.ELEMENTS;++r)this[r]=Math.min(Math.max(this[r],t[r]),e[r]);return this.check()}add(...t){for(const e of t)for(let t=0;t<this.ELEMENTS;++t)this[t]+=e[t];return this.check()}subtract(...t){for(const e of t)for(let t=0;t<this.ELEMENTS;++t)this[t]-=e[t];return this.check()}scale(t){if(Array.isArray(t))return this.multiply(t);for(let e=0;e<this.ELEMENTS;++e)this[e]*=t;return this.check()}sub(t){return this.subtract(t)}setScalar(t){for(let e=0;e<this.ELEMENTS;++e)this[e]=t;return this.check()}addScalar(t){for(let e=0;e<this.ELEMENTS;++e)this[e]+=t;return this.check()}subScalar(t){return this.addScalar(-t)}multiplyScalar(t){for(let e=0;e<this.ELEMENTS;++e)this[e]*=t;return this.check()}divideScalar(t){return this.scale(1/t)}clampScalar(t,e){for(let r=0;r<this.ELEMENTS;++r)this[r]=Math.min(Math.max(this[r],t),e);return this.check()}multiplyByScalar(t){return this.scale(t)}get elements(){return this}check(){if(n.b.debug&&!this.validate())throw new Error("math.gl: ".concat(this.constructor.name," some fields set to invalid numbers'"));return this}validate(){let t=this.length===this.ELEMENTS;for(let e=0;e<this.ELEMENTS;++e)t=t&&Number.isFinite(this[e]);return t}}},,function(t,e){},,function(t,e){},function(t,e,r){"use strict";r.d(e,"a",(function(){return o}));var n=r(14),s=r(1),i=r(6);class o extends n.a{get ELEMENTS(){return Object(i.a)(!1),0}copy(t){return Object(i.a)(!1),this}get x(){return this[0]}set x(t){this[0]=Object(s.a)(t)}get y(){return this[1]}set y(t){this[1]=Object(s.a)(t)}len(){return Math.sqrt(this.lengthSquared())}magnitude(){return this.len()}lengthSquared(){let t=0;for(let e=0;e<this.ELEMENTS;++e)t+=this[e]*this[e];return t}magnitudeSquared(){return this.lengthSquared()}distance(t){return Math.sqrt(this.distanceSquared(t))}distanceSquared(t){let e=0;for(let r=0;r<this.ELEMENTS;++r){const n=this[r]-t[r];e+=n*n}return Object(s.a)(e)}dot(t){let e=0;for(let r=0;r<this.ELEMENTS;++r)e+=this[r]*t[r];return Object(s.a)(e)}normalize(){const t=this.magnitude();if(0!==t)for(let e=0;e<this.ELEMENTS;++e)this[e]/=t;return this.check()}multiply(...t){for(const e of t)for(let t=0;t<this.ELEMENTS;++t)this[t]*=e[t];return this.check()}divide(...t){for(const e of t)for(let t=0;t<this.ELEMENTS;++t)this[t]/=e[t];return this.check()}lengthSq(){return this.lengthSquared()}distanceTo(t){return this.distance(t)}distanceToSquared(t){return this.distanceSquared(t)}getComponent(t){return Object(i.a)(t>=0&&t<this.ELEMENTS,"index is out of range"),Object(s.a)(this[t])}setComponent(t,e){return Object(i.a)(t>=0&&t<this.ELEMENTS,"index is out of range"),this[t]=e,this.check()}addVectors(t,e){return this.copy(t).add(e)}subVectors(t,e){return this.copy(t).subtract(e)}multiplyVectors(t,e){return this.copy(t).multiply(e)}addScaledVector(t,e){return this.add(new this.constructor(t).multiplyScalar(e))}}},function(t,e,r){"use strict";r.d(e,"a",(function(){return a}));var n=r(14),s=r(1),i=r(3),o=r(6);class a extends n.a{get ELEMENTS(){return Object(o.a)(!1),0}get RANK(){return Object(o.a)(!1),0}toString(){let t="[";if(i.b.printRowMajor){t+="row-major:";for(let e=0;e<this.RANK;++e)for(let r=0;r<this.RANK;++r)t+=" ".concat(this[r*this.RANK+e])}else{t+="column-major:";for(let e=0;e<this.ELEMENTS;++e)t+=" ".concat(this[e])}return t+="]",t}getElementIndex(t,e){return e*this.RANK+t}getElement(t,e){return this[e*this.RANK+t]}setElement(t,e,r){return this[e*this.RANK+t]=Object(s.a)(r),this}getColumn(t,e=new Array(this.RANK).fill(-0)){const r=t*this.RANK;for(let t=0;t<this.RANK;++t)e[t]=this[r+t];return e}setColumn(t,e){const r=t*this.RANK;for(let t=0;t<this.RANK;++t)this[r+t]=e[t];return this}}},function(e,r){e.exports=t},function(t,e){},,,,,function(t,e){},function(t,e){var r;r=function(){return this}();try{r=r||new Function("return this")()}catch(t){"object"==typeof window&&(r=window)}t.exports=r},function(t,e){var r,n,s=t.exports={};function i(){throw new Error("setTimeout has not been defined")}function o(){throw new Error("clearTimeout has not been defined")}function a(t){if(r===setTimeout)return setTimeout(t,0);if((r===i||!r)&&setTimeout)return r=setTimeout,setTimeout(t,0);try{return r(t,0)}catch(e){try{return r.call(null,t,0)}catch(e){return r.call(this,t,0)}}}!function(){try{r="function"==typeof setTimeout?setTimeout:i}catch(t){r=i}try{n="function"==typeof clearTimeout?clearTimeout:o}catch(t){n=o}}();var c,u=[],A=!1,h=-1;function B(){A&&c&&(A=!1,c.length?u=c.concat(u):h=-1,u.length&&f())}function f(){if(!A){var t=a(B);A=!0;for(var e=u.length;e;){for(c=u,u=[];++h<e;)c&&c[h].run();h=-1,e=u.length}c=null,A=!1,function(t){if(n===clearTimeout)return clearTimeout(t);if((n===o||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(t);try{n(t)}catch(e){try{return n.call(null,t)}catch(e){return n.call(this,t)}}}(t)}}function l(t,e){this.fun=t,this.array=e}function d(){}s.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)e[r-1]=arguments[r];u.push(new l(t,e)),1!==u.length||A||a(f)},l.prototype.run=function(){this.fun.apply(null,this.array)},s.title="browser",s.browser=!0,s.env={},s.argv=[],s.version="",s.versions={},s.on=d,s.addListener=d,s.once=d,s.off=d,s.removeListener=d,s.removeAllListeners=d,s.emit=d,s.prependListener=d,s.prependOnceListener=d,s.listeners=function(t){return[]},s.binding=function(t){throw new Error("process.binding is not supported")},s.cwd=function(){return"/"},s.chdir=function(t){throw new Error("process.chdir is not supported")},s.umask=function(){return 0}},function(t,e,r){const n=r(40);globalThis.loaders=globalThis.loaders||{},t.exports=Object.assign(globalThis.loaders,n)},,,,,,,,,,function(t,e,r){"use strict";r.r(e),r.d(e,"Tiles3DLoader",(function(){return qn})),r.d(e,"CesiumIonLoader",(function(){return ts})),r.d(e,"Tile3DWriter",(function(){return us})),r.d(e,"Tile3DFeatureTable",(function(){return yt})),r.d(e,"Tile3DBatchTable",(function(){return St})),r.d(e,"TILE3D_TYPE",(function(){return y})),r.d(e,"_getIonTilesetMetadata",(function(){return $n}));var n={};r.r(n),r.d(n,"filename",(function(){return h})),r.d(n,"dirname",(function(){return B})),r.d(n,"join",(function(){return f}));var s={};r.r(s),r.d(s,"name",(function(){return gr})),r.d(s,"preprocess",(function(){return yr})),r.d(s,"decode",(function(){return pr}));var i={};r.r(i),r.d(i,"name",(function(){return Fr})),r.d(i,"preprocess",(function(){return Dr}));var o={};r.r(o),r.d(o,"name",(function(){return Or})),r.d(o,"preprocess",(function(){return Rr}));var a={};r.r(a),r.d(a,"name",(function(){return Sr})),r.d(a,"preprocess",(function(){return wr})),r.d(a,"decode",(function(){return Hr})),r.d(a,"encode",(function(){return Lr}));var c={};r.r(c),r.d(c,"name",(function(){return Nr})),r.d(c,"decode",(function(){return vr})),r.d(c,"encode",(function(){return xr}));var u={};r.r(u),r.d(u,"name",(function(){return jr})),r.d(u,"decode",(function(){return Kr})),r.d(u,"encode",(function(){return Qr}));var A={};function h(t){const e=t&&t.lastIndexOf("/");return e>=0?t.substr(e+1):""}function B(t){const e=t&&t.lastIndexOf("/");return e>=0?t.substr(0,e):""}function f(...t){return(t=t.map((e,r)=>(r&&(e=e.replace(new RegExp("^/"),"")),r!==t.length-1&&(e=e.replace(new RegExp("/$"),"")),e))).join("/")}r.r(A),r.d(A,"name",(function(){return Xr})),r.d(A,"decode",(function(){return kr})),r.d(A,"encode",(function(){return Yr}));r(18),r(27);const l=1,d=2,C="empty",m="scenegraph",E="pointcloud",b="TILES3D",g="geometricError",y={COMPOSITE:"cmpt",POINT_CLOUD:"pnts",BATCHED_3D_MODEL:"b3dm",INSTANCED_3D_MODEL:"i3dm",GEOMETRY:"geom",VECTOR:"vect"},p=(Object.keys(y),{BATCHED_MODEL:[98,51,100,109],INSTANCED_MODEL:[105,51,100,109],POINT_CLOUD:[112,110,116,115],COMPOSITE:[99,109,112,116]});function I(t,e){if(!t)throw new Error(e||"loader assertion failed.")}function T(t,e,r){I(t instanceof ArrayBuffer);const n=new TextDecoder("utf8"),s=new Uint8Array(t,e,r);return n.decode(s)}const M={name:"Draco",id:"draco",module:"draco",shapes:["mesh"],version:"3.1.0-alpha.5",worker:!0,extensions:["drc"],mimeTypes:["application/octet-stream"],binary:!0,tests:["DRACO"],options:{draco:{decoderType:"object"==typeof WebAssembly?"wasm":"js",libraryPath:"libs/",extraAttributes:{},attributeNameEntry:void 0}}};function G(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}class F{constructor(t,e){G(this,"fields",void 0),G(this,"metadata",void 0),function(t,e){if(!t)throw new Error(e||"loader assertion failed.")}(Array.isArray(t)),function(t){const e={};for(const r of t)e[r.name]&&console.warn("Schema: duplicated field name",r.name,r),e[r.name]=!0}(t),this.fields=t,this.metadata=e||new Map}compareTo(t){if(this.metadata!==t.metadata)return!1;if(this.fields.length!==t.fields.length)return!1;for(let e=0;e<this.fields.length;++e)if(!this.fields[e].compareTo(t.fields[e]))return!1;return!0}select(...t){const e=Object.create(null);for(const r of t)e[r]=!0;const r=this.fields.filter(t=>e[t.name]);return new F(r,this.metadata)}selectAt(...t){const e=t.map(t=>this.fields[t]).filter(Boolean);return new F(e,this.metadata)}assign(t){let e,r=this.metadata;if(t instanceof F){const n=t;e=n.fields,r=D(D(new Map,this.metadata),n.metadata)}else e=t;const n=Object.create(null);for(const t of this.fields)n[t.name]=t;for(const t of e)n[t.name]=t;const s=Object.values(n);return new F(s,r)}}function D(t,e){return new Map([...t||new Map,...e||new Map])}function O(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}class R{constructor(t,e,r=!1,n=new Map){O(this,"name",void 0),O(this,"type",void 0),O(this,"nullable",void 0),O(this,"metadata",void 0),this.name=t,this.type=e,this.nullable=r,this.metadata=n}get typeId(){return this.type&&this.type.typeId}clone(){return new R(this.name,this.type,this.nullable,this.metadata)}compareTo(t){return this.name===t.name&&this.type===t.type&&this.nullable===t.nullable&&this.metadata===t.metadata}toString(){return`${this.type}${this.nullable?", nullable":""}${this.metadata?", metadata: "+this.metadata:""}`}}let _,S,w,H,L,U,J,P,N;function v(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}!function(t){t[t.NONE=0]="NONE",t[t.Null=1]="Null",t[t.Int=2]="Int",t[t.Float=3]="Float",t[t.Binary=4]="Binary",t[t.Utf8=5]="Utf8",t[t.Bool=6]="Bool",t[t.Decimal=7]="Decimal",t[t.Date=8]="Date",t[t.Time=9]="Time",t[t.Timestamp=10]="Timestamp",t[t.Interval=11]="Interval",t[t.List=12]="List",t[t.Struct=13]="Struct",t[t.Union=14]="Union",t[t.FixedSizeBinary=15]="FixedSizeBinary",t[t.FixedSizeList=16]="FixedSizeList",t[t.Map=17]="Map",t[t.Dictionary=-1]="Dictionary",t[t.Int8=-2]="Int8",t[t.Int16=-3]="Int16",t[t.Int32=-4]="Int32",t[t.Int64=-5]="Int64",t[t.Uint8=-6]="Uint8",t[t.Uint16=-7]="Uint16",t[t.Uint32=-8]="Uint32",t[t.Uint64=-9]="Uint64",t[t.Float16=-10]="Float16",t[t.Float32=-11]="Float32",t[t.Float64=-12]="Float64",t[t.DateDay=-13]="DateDay",t[t.DateMillisecond=-14]="DateMillisecond",t[t.TimestampSecond=-15]="TimestampSecond",t[t.TimestampMillisecond=-16]="TimestampMillisecond",t[t.TimestampMicrosecond=-17]="TimestampMicrosecond",t[t.TimestampNanosecond=-18]="TimestampNanosecond",t[t.TimeSecond=-19]="TimeSecond",t[t.TimeMillisecond=-20]="TimeMillisecond",t[t.TimeMicrosecond=-21]="TimeMicrosecond",t[t.TimeNanosecond=-22]="TimeNanosecond",t[t.DenseUnion=-23]="DenseUnion",t[t.SparseUnion=-24]="SparseUnion",t[t.IntervalDayTime=-25]="IntervalDayTime",t[t.IntervalYearMonth=-26]="IntervalYearMonth"}(_||(_={}));class x{static isNull(t){return t&&t.typeId===_.Null}static isInt(t){return t&&t.typeId===_.Int}static isFloat(t){return t&&t.typeId===_.Float}static isBinary(t){return t&&t.typeId===_.Binary}static isUtf8(t){return t&&t.typeId===_.Utf8}static isBool(t){return t&&t.typeId===_.Bool}static isDecimal(t){return t&&t.typeId===_.Decimal}static isDate(t){return t&&t.typeId===_.Date}static isTime(t){return t&&t.typeId===_.Time}static isTimestamp(t){return t&&t.typeId===_.Timestamp}static isInterval(t){return t&&t.typeId===_.Interval}static isList(t){return t&&t.typeId===_.List}static isStruct(t){return t&&t.typeId===_.Struct}static isUnion(t){return t&&t.typeId===_.Union}static isFixedSizeBinary(t){return t&&t.typeId===_.FixedSizeBinary}static isFixedSizeList(t){return t&&t.typeId===_.FixedSizeList}static isMap(t){return t&&t.typeId===_.Map}static isDictionary(t){return t&&t.typeId===_.Dictionary}get typeId(){return _.NONE}compareTo(t){return this===t}}Symbol.toStringTag;Symbol.toStringTag;S=Symbol.toStringTag;class j extends x{constructor(t,e){super(),v(this,"isSigned",void 0),v(this,"bitWidth",void 0),this.isSigned=t,this.bitWidth=e}get typeId(){return _.Int}get[S](){return"Int"}toString(){return`${this.isSigned?"I":"Ui"}nt${this.bitWidth}`}}class K extends j{constructor(){super(!0,8)}}class Q extends j{constructor(){super(!0,16)}}class X extends j{constructor(){super(!0,32)}}class k extends j{constructor(){super(!1,8)}}class Y extends j{constructor(){super(!1,16)}}class V extends j{constructor(){super(!1,32)}}const W=32,Z=64;w=Symbol.toStringTag;class q extends x{constructor(t){super(),v(this,"precision",void 0),this.precision=t}get typeId(){return _.Float}get[w](){return"Float"}toString(){return"Float"+this.precision}}class z extends q{constructor(){super(W)}}class $ extends q{constructor(){super(Z)}}Symbol.toStringTag;Symbol.toStringTag;H=Symbol.toStringTag;L=Symbol.toStringTag;U=Symbol.toStringTag;J=Symbol.toStringTag;P=Symbol.toStringTag;class tt extends x{constructor(t,e){super(),v(this,"listSize",void 0),v(this,"children",void 0),this.listSize=t,this.children=[e]}get typeId(){return _.FixedSizeList}get valueType(){return this.children[0].type}get valueField(){return this.children[0]}get[P](){return"FixedSizeList"}toString(){return`FixedSizeList[${this.listSize}]<${this.valueType}>`}}N=Symbol.toStringTag;function et(t,e,r){const n=function(t){switch(t.constructor){case Int8Array:return new K;case Uint8Array:return new k;case Int16Array:return new Q;case Uint16Array:return new Y;case Int32Array:return new X;case Uint32Array:return new V;case Float32Array:return new z;case Float64Array:return new $;default:throw new Error("array type not supported")}}(e.value),s=r||function(t){const e=new Map;"byteOffset"in t&&e.set("byteOffset",t.byteOffset.toString(10));"byteStride"in t&&e.set("byteStride",t.byteStride.toString(10));"normalized"in t&&e.set("normalized",t.normalized.toString());return e}(e);return new R(t,new tt(e.size,new R("value",n)),!1,s)}function rt(t,e,r){return et(t,e,r?nt(r.metadata):void 0)}function nt(t){const e=new Map;for(const r in t)e.set(r+".string",JSON.stringify(t[r]));return e}function st(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}const it={POSITION:"POSITION",NORMAL:"NORMAL",COLOR:"COLOR_0",TEX_COORD:"TEXCOORD_0"},ot={1:Int8Array,2:Uint8Array,3:Int16Array,4:Uint16Array,5:Int32Array,6:Uint32Array,9:Float32Array};class at{constructor(t){st(this,"draco",void 0),st(this,"decoder",void 0),st(this,"metadataQuerier",void 0),this.draco=t,this.decoder=new this.draco.Decoder,this.metadataQuerier=new this.draco.MetadataQuerier}destroy(){this.draco.destroy(this.decoder),this.draco.destroy(this.metadataQuerier)}parseSync(t,e={}){const r=new this.draco.DecoderBuffer;r.Init(new Int8Array(t),t.byteLength),this._disableAttributeTransforms(e);const n=this.decoder.GetEncodedGeometryType(r),s=n===this.draco.TRIANGULAR_MESH?new this.draco.Mesh:new this.draco.PointCloud;try{let t;switch(n){case this.draco.TRIANGULAR_MESH:t=this.decoder.DecodeBufferToMesh(r,s);break;case this.draco.POINT_CLOUD:t=this.decoder.DecodeBufferToPointCloud(r,s);break;default:throw new Error("DRACO: Unknown geometry type.")}if(!t.ok()||!s.ptr){const e="DRACO decompression failed: "+t.error_msg();throw new Error(e)}const i=this._getDracoLoaderData(s,n,e),o=this._getMeshData(s,i,e),a=function(t){let e=1/0,r=1/0,n=1/0,s=-1/0,i=-1/0,o=-1/0;const a=t.POSITION?t.POSITION.value:[],c=a&&a.length;for(let t=0;t<c;t+=3){const c=a[t],u=a[t+1],A=a[t+2];e=c<e?c:e,r=u<r?u:r,n=A<n?A:n,s=c>s?c:s,i=u>i?u:i,o=A>o?A:o}return[[e,r,n],[s,i,o]]}(o.attributes),c=function(t,e,r){const n=nt(e.metadata),s=[],i=function(t){const e={};for(const r in t){const n=t[r];e[n.name||"undefined"]=n}return e}(e.attributes);for(const e in t){const r=rt(e,t[e],i[e]);s.push(r)}if(r){const t=rt("indices",r);s.push(t)}return new F(s,n)}(o.attributes,i,o.indices);return{loader:"draco",loaderData:i,header:{vertexCount:s.num_points(),boundingBox:a},...o,schema:c}}finally{this.draco.destroy(r),s&&this.draco.destroy(s)}}_getDracoLoaderData(t,e,r){const n=this._getTopLevelMetadata(t),s=this._getDracoAttributes(t,r);return{geometry_type:e,num_attributes:t.num_attributes(),num_points:t.num_points(),num_faces:t instanceof this.draco.Mesh?t.num_faces():0,metadata:n,attributes:s}}_getDracoAttributes(t,e){const r={};for(let n=0;n<t.num_attributes();n++){const s=this.decoder.GetAttribute(t,n),i=this._getAttributeMetadata(t,n);r[s.unique_id()]={unique_id:s.unique_id(),attribute_type:s.attribute_type(),data_type:s.data_type(),num_components:s.num_components(),byte_offset:s.byte_offset(),byte_stride:s.byte_stride(),normalized:s.normalized(),attribute_index:n,metadata:i};const o=this._getQuantizationTransform(s,e);o&&(r[s.unique_id()].quantization_transform=o);const a=this._getOctahedronTransform(s,e);a&&(r[s.unique_id()].octahedron_transform=a)}return r}_getMeshData(t,e,r){const n=this._getMeshAttributes(e,t,r);if(!n.POSITION)throw new Error("DRACO: No position attribute found.");if(t instanceof this.draco.Mesh)switch(r.topology){case"triangle-strip":return{topology:"triangle-strip",mode:4,attributes:n,indices:{value:this._getTriangleStripIndices(t),size:1}};case"triangle-list":default:return{topology:"triangle-list",mode:5,attributes:n,indices:{value:this._getTriangleListIndices(t),size:1}}}return{topology:"point-list",mode:0,attributes:n}}_getMeshAttributes(t,e,r){const n={};for(const s of Object.values(t.attributes)){const t=this._deduceAttributeName(s,r);s.name=t;const{value:i,size:o}=this._getAttributeValues(e,s);n[t]={value:i,size:o,byteOffset:s.byte_offset,byteStride:s.byte_stride,normalized:s.normalized}}return n}_getTriangleListIndices(t){const e=3*t.num_faces(),r=4*e,n=this.draco._malloc(r);try{return this.decoder.GetTrianglesUInt32Array(t,r,n),new Uint32Array(this.draco.HEAPF32.buffer,n,e).slice()}finally{this.draco._free(n)}}_getTriangleStripIndices(t){const e=new this.draco.DracoInt32Array;try{return this.decoder.GetTriangleStripsFromMesh(t,e),function(t){const e=t.size(),r=new Int32Array(e);for(let n=0;n<e;n++)r[n]=t.GetValue(n);return r}(e)}finally{this.draco.destroy(e)}}_getAttributeValues(t,e){const r=ot[e.data_type],n=e.num_components,s=t.num_points()*n,i=s*r.BYTES_PER_ELEMENT,o=function(t,e){switch(e){case Float32Array:return t.DT_FLOAT32;case Int8Array:return t.DT_INT8;case Int16Array:return t.DT_INT16;case Int32Array:return t.DT_INT32;case Uint8Array:return t.DT_UINT8;case Uint16Array:return t.DT_UINT16;case Uint32Array:return t.DT_UINT32;default:return t.DT_INVALID}}(this.draco,r);let a;const c=this.draco._malloc(i);try{const n=this.decoder.GetAttribute(t,e.attribute_index);this.decoder.GetAttributeDataArrayForAllPoints(t,n,o,i,c),a=new r(this.draco.HEAPF32.buffer,c,s).slice()}finally{this.draco._free(c)}return{value:a,size:n}}_deduceAttributeName(t,e){const r=t.unique_id;for(const[t,n]of Object.entries(e.extraAttributes||{}))if(n===r)return t;const n=t.attribute_type;for(const t in it){if(this.draco[t]===n)return it[t]}const s=e.attributeNameEntry||"name";return t.metadata[s]?t.metadata[s].string:"CUSTOM_ATTRIBUTE_"+r}_getTopLevelMetadata(t){const e=this.decoder.GetMetadata(t);return this._getDracoMetadata(e)}_getAttributeMetadata(t,e){const r=this.decoder.GetAttributeMetadata(t,e);return this._getDracoMetadata(r)}_getDracoMetadata(t){if(!t||!t.ptr)return{};const e={},r=this.metadataQuerier.NumEntries(t);for(let n=0;n<r;n++){const r=this.metadataQuerier.GetEntryName(t,n);e[r]=this._getDracoMetadataField(t,r)}return e}_getDracoMetadataField(t,e){const r=new this.draco.DracoInt32Array;try{this.metadataQuerier.GetIntEntryArray(t,e,r);const n=function(t){const e=t.size(),r=new Int32Array(e);for(let n=0;n<e;n++)r[n]=t.GetValue(n);return r}(r);return{int:this.metadataQuerier.GetIntEntry(t,e),string:this.metadataQuerier.GetStringEntry(t,e),double:this.metadataQuerier.GetDoubleEntry(t,e),intArray:n}}finally{this.draco.destroy(r)}}_disableAttributeTransforms(t){const{quantizedAttributes:e=[],octahedronAttributes:r=[]}=t,n=[...e,...r];for(const t of n)this.decoder.SkipAttributeTransform(this.draco[t])}_getQuantizationTransform(t,e){const{quantizedAttributes:r=[]}=e,n=t.attribute_type();if(r.map(t=>this.decoder[t]).includes(n)){const e=new this.draco.AttributeQuantizationTransform;try{if(e.InitFromAttribute(t))return{quantization_bits:e.quantization_bits(),range:e.range(),min_values:new Float32Array([1,2,3]).map(t=>e.min_value(t))}}finally{this.draco.destroy(e)}}return null}_getOctahedronTransform(t,e){const{octahedronAttributes:r=[]}=e,n=t.attribute_type();if(r.map(t=>this.decoder[t]).includes(n)){const e=new this.draco.AttributeQuantizationTransform;try{if(e.InitFromAttribute(t))return{quantization_bits:e.quantization_bits()}}finally{this.draco.destroy(e)}}return null}}var ct=r(12),ut=r(16);const At={};async function ht(t,e=null,r={}){return e&&(t=function(t,e,r){if(t.startsWith("http"))return t;const n=r.modules||{};if(n[t])return n[t];if(!ct.b)return`modules/${e}/dist/libs/${t}`;if(r.CDN)return function(t,e){if(!t)throw new Error(e||"loaders.gl assertion failed.")}(r.CDN.startsWith("http")),`${r.CDN}/${e}@3.1.0-alpha.5/dist/libs/${t}`;if(ct.c)return"../src/libs/"+t;return`modules/${e}/src/libs/${t}`}(t,e,r)),At[t]=At[t]||async function(t){if(t.endsWith("wasm")){const e=await fetch(t);return await e.arrayBuffer()}if(!ct.b)return ut.requireFromFile&&await ut.requireFromFile(t);if(ct.c)return importScripts(t);const e=await fetch(t);return function(t,e){if(!ct.b)return ut.requireFromString&&ut.requireFromString(t,e);if(ct.c)return eval.call(ct.a,t),null;const r=document.createElement("script");r.id=e;try{r.appendChild(document.createTextNode(t))}catch(e){r.text=t}return document.body.appendChild(r),null}(await e.text(),t)}(t),await At[t]}let Bt;async function ft(t){const e=t.modules||{};return Bt=e.draco3d?Bt||e.draco3d.createDecoderModule({}).then(t=>({draco:t})):Bt||async function(t){let e,r;switch(t.draco&&t.draco.decoderType){case"js":e=await ht("https://www.gstatic.com/draco/versioned/decoders/1.4.1/draco_decoder.js","draco",t);break;case"wasm":default:[e,r]=await Promise.all([await ht("https://www.gstatic.com/draco/versioned/decoders/1.4.1/draco_wasm_wrapper.js","draco",t),await ht("https://www.gstatic.com/draco/versioned/decoders/1.4.1/draco_decoder.wasm","draco",t)])}return e=e||globalThis.DracoDecoderModule,await function(t,e){const r={};e&&(r.wasmBinary=e);return new Promise(e=>{t({...r,onModuleLoaded:t=>e({draco:t})})})}(e,r)}(t),await Bt}const lt={...M,parse:async function(t,e){const{draco:r}=await ft(e),n=new at(r);try{return n.parseSync(t,null==e?void 0:e.draco)}finally{n.destroy()}}};const dt={BYTE:5120,UNSIGNED_BYTE:5121,SHORT:5122,UNSIGNED_SHORT:5123,INT:5124,UNSIGNED_INT:5125,FLOAT:5126,DOUBLE:5130},Ct={POINTS:0,LINES:1,LINE_LOOP:2,LINE_STRIP:3,TRIANGLES:4,TRIANGLE_STRIP:5,TRIANGLE_FAN:6,...dt};var mt=r(43);const Et={[dt.DOUBLE]:Float64Array,[dt.FLOAT]:Float32Array,[dt.UNSIGNED_SHORT]:Uint16Array,[dt.UNSIGNED_INT]:Uint32Array,[dt.UNSIGNED_BYTE]:Uint8Array,[dt.BYTE]:Int8Array,[dt.SHORT]:Int16Array,[dt.INT]:Int32Array},bt={DOUBLE:dt.DOUBLE,FLOAT:dt.FLOAT,UNSIGNED_SHORT:dt.UNSIGNED_SHORT,UNSIGNED_INT:dt.UNSIGNED_INT,UNSIGNED_BYTE:dt.UNSIGNED_BYTE,BYTE:dt.BYTE,SHORT:dt.SHORT,INT:dt.INT};class gt{static fromTypedArray(t){t=ArrayBuffer.isView(t)?t.constructor:t;for(const e in Et){if(Et[e]===t)return e}throw new Error("Failed to convert GL type")}static fromName(t){const e=bt[t];if(!e)throw new Error("Failed to convert GL type");return e}static getArrayType(t){switch(t){case dt.UNSIGNED_SHORT_5_6_5:case dt.UNSIGNED_SHORT_4_4_4_4:case dt.UNSIGNED_SHORT_5_5_5_1:return Uint16Array;default:const e=Et[t];if(!e)throw new Error("Failed to convert GL type");return e}}static getByteSize(t){return gt.getArrayType(t).BYTES_PER_ELEMENT}static validate(t){return Boolean(gt.getArrayType(t))}static createTypedArray(t,e,r=0,n){void 0===n&&(n=(e.byteLength-r)/gt.getByteSize(t));return new(gt.getArrayType(t))(e,r,n)}}class yt{constructor(t,e){this.json=t,this.buffer=e,this.featuresLength=0,this._cachedTypedArrays={}}getExtension(t){return this.json.extensions&&this.json.extensions[t]}hasProperty(t){return Boolean(this.json[t])}getGlobalProperty(t,e=Ct.UNSIGNED_INT,r=1){const n=this.json[t];return n&&Number.isFinite(n.byteOffset)?this._getTypedArrayFromBinary(t,e,r,1,n.byteOffset):n}getPropertyArray(t,e,r){const n=this.json[t];return n&&Number.isFinite(n.byteOffset)?("componentType"in n&&(e=gt.fromName(n.componentType)),this._getTypedArrayFromBinary(t,e,r,this.featuresLength,n.byteOffset)):this._getTypedArrayFromArray(t,e,n)}getProperty(t,e,r,n,s){const i=this.json[t];if(!i)return i;const o=this.getPropertyArray(t,e,r);if(1===r)return o[n];for(let t=0;t<r;++t)s[t]=o[r*n+t];return s}_getTypedArrayFromBinary(t,e,r,n,s){const i=this._cachedTypedArrays;let o=i[t];return o||(o=gt.createTypedArray(e,this.buffer.buffer,this.buffer.byteOffset+s,n*r),i[t]=o),o}_getTypedArrayFromArray(t,e,r){const n=this._cachedTypedArrays;let s=n[t];return s||(s=gt.createTypedArray(e,r),n[t]=s),s}}const pt={SCALAR:1,VEC2:2,VEC3:3,VEC4:4,MAT2:4,MAT3:9,MAT4:16},It={SCALAR:(t,e)=>t[e],VEC2:(t,e)=>[t[2*e+0],t[2*e+1]],VEC3:(t,e)=>[t[3*e+0],t[3*e+1],t[3*e+2]],VEC4:(t,e)=>[t[4*e+0],t[4*e+1],t[4*e+2],t[4*e+3]],MAT2:(t,e)=>[t[4*e+0],t[4*e+1],t[4*e+2],t[4*e+3]],MAT3:(t,e)=>[t[9*e+0],t[9*e+1],t[9*e+2],t[9*e+3],t[9*e+4],t[9*e+5],t[9*e+6],t[9*e+7],t[9*e+8]],MAT4:(t,e)=>[t[16*e+0],t[16*e+1],t[16*e+2],t[16*e+3],t[16*e+4],t[16*e+5],t[16*e+6],t[16*e+7],t[16*e+8],t[16*e+9],t[16*e+10],t[16*e+11],t[16*e+12],t[16*e+13],t[16*e+14],t[16*e+15]]},Tt={SCALAR:(t,e,r)=>{e[r]=t},VEC2:(t,e,r)=>{e[2*r+0]=t[0],e[2*r+1]=t[1]},VEC3:(t,e,r)=>{e[3*r+0]=t[0],e[3*r+1]=t[1],e[3*r+2]=t[2]},VEC4:(t,e,r)=>{e[4*r+0]=t[0],e[4*r+1]=t[1],e[4*r+2]=t[2],e[4*r+3]=t[3]},MAT2:(t,e,r)=>{e[4*r+0]=t[0],e[4*r+1]=t[1],e[4*r+2]=t[2],e[4*r+3]=t[3]},MAT3:(t,e,r)=>{e[9*r+0]=t[0],e[9*r+1]=t[1],e[9*r+2]=t[2],e[9*r+3]=t[3],e[9*r+4]=t[4],e[9*r+5]=t[5],e[9*r+6]=t[6],e[9*r+7]=t[7],e[9*r+8]=t[8],e[9*r+9]=t[9]},MAT4:(t,e,r)=>{e[16*r+0]=t[0],e[16*r+1]=t[1],e[16*r+2]=t[2],e[16*r+3]=t[3],e[16*r+4]=t[4],e[16*r+5]=t[5],e[16*r+6]=t[6],e[16*r+7]=t[7],e[16*r+8]=t[8],e[16*r+9]=t[9],e[16*r+10]=t[10],e[16*r+11]=t[11],e[16*r+12]=t[12],e[16*r+13]=t[13],e[16*r+14]=t[14],e[16*r+15]=t[15]}};const Mt=t=>void 0!==t;function Gt(t,e,r){if(!e)return null;let n=t.getExtension("3DTILES_batch_table_hierarchy");const s=e.HIERARCHY;return s&&(console.warn("3D Tile Parser: HIERARCHY is deprecated. Use 3DTILES_batch_table_hierarchy."),e.extensions=e.extensions||{},e.extensions["3DTILES_batch_table_hierarchy"]=s,n=s),n?function(t,e){let r,n,s;const i=t.instancesLength,o=t.classes;let a,c=t.classIds,u=t.parentCounts,A=t.parentIds,h=i;Mt(c.byteOffset)&&(c.componentType=defaultValue(c.componentType,GL.UNSIGNED_SHORT),c.type=AttributeType.SCALAR,s=getBinaryAccessor(c),c=s.createArrayBufferView(e.buffer,e.byteOffset+c.byteOffset,i));if(Mt(u))for(Mt(u.byteOffset)&&(u.componentType=defaultValue(u.componentType,GL.UNSIGNED_SHORT),u.type=AttributeType.SCALAR,s=getBinaryAccessor(u),u=s.createArrayBufferView(e.buffer,e.byteOffset+u.byteOffset,i)),a=new Uint16Array(i),h=0,r=0;r<i;++r)a[r]=h,h+=u[r];Mt(A)&&Mt(A.byteOffset)&&(A.componentType=defaultValue(A.componentType,GL.UNSIGNED_SHORT),A.type=AttributeType.SCALAR,s=getBinaryAccessor(A),A=s.createArrayBufferView(e.buffer,e.byteOffset+A.byteOffset,h));const B=o.length;for(r=0;r<B;++r){const t=o[r].length,n=o[r].instances,s=getBinaryProperties(t,n,e);o[r].instances=combine(s,n)}const f=new Array(B).fill(0),l=new Uint16Array(i);for(r=0;r<i;++r)n=c[r],l[r]=f[n],++f[n];const d={classes:o,classIds:c,classIndexes:l,parentCounts:u,parentIndexes:a,parentIds:A};return function(t){const e=t.classIds.length;for(let r=0;r<e;++r)Dt(t,r,stack)}(d),d}(n,r):null}function Ft(t,e,r){if(!t)return;const n=t.parentCounts;return t.parentIds?r(t,e):n>0?function(t,e,r){const n=t.classIds,s=t.parentCounts,i=t.parentIds,o=t.parentIndexes,a=n.length,c=scratchVisited;c.length=Math.max(c.length,a);const u=++marker,A=scratchStack;A.length=0,A.push(e);for(;A.length>0;){if(e=A.pop(),c[e]===u)continue;c[e]=u;const n=r(t,e);if(Mt(n))return n;const a=s[e],h=o[e];for(let t=0;t<a;++t){const r=i[h+t];r!==e&&A.push(r)}}return null}(t,e,r):function(t,e,r){let n=!0;for(;n;){const s=r(t,e);if(Mt(s))return s;const i=t.parentIds[e];n=i!==e,e=i}throw new Error("traverseHierarchySingleParent")}(t,e,r)}function Dt(t,e,r){const n=t.parentCounts,s=t.parentIds,i=t.parentIndexes,o=t.classIds.length;if(!Mt(s))return;assert(e<o,`Parent index ${e} exceeds the total number of instances: ${o}`),assert(-1===r.indexOf(e),"Circular dependency detected in the batch table hierarchy."),r.push(e);const a=Mt(n)?n[e]:1,c=Mt(n)?i[e]:e;for(let n=0;n<a;++n){const i=s[c+n];i!==e&&Dt(t,i,r)}r.pop(e)}function Ot(t){return null!=t}const Rt=(t,e)=>t,_t={HIERARCHY:!0,extensions:!0,extras:!0};class St{constructor(t,e,r,n={}){var s;I(r>=0),this.json=t||{},this.binary=e,this.featureCount=r,this._extensions=(null===(s=this.json)||void 0===s?void 0:s.extensions)||{},this._properties={};for(const t in this.json)_t[t]||(this._properties[t]=this.json[t]);this._binaryProperties=this._initializeBinaryProperties(),n["3DTILES_batch_table_hierarchy"]&&(this._hierarchy=Gt(this,this.json,this.binary))}getExtension(t){return this.json&&this.json.extensions&&this.json.extensions[t]}memorySizeInBytes(){return 0}isClass(t,e){if(this._checkBatchId(t),I("string"==typeof e,e),this._hierarchy){return Ot(Ft(this._hierarchy,t,(t,r)=>{const n=t.classIds[r];return t.classes[n].name===e}))}return!1}isExactClass(t,e){return I("string"==typeof e,e),this.getExactClassName(t)===e}getExactClassName(t){if(this._checkBatchId(t),this._hierarchy){const e=this._hierarchy.classIds[t];return this._hierarchy.classes[e].name}}hasProperty(t,e){return this._checkBatchId(t),I("string"==typeof e,e),Ot(this._properties[e])||this._hasPropertyInHierarchy(t,e)}getPropertyNames(t,e){this._checkBatchId(t),(e=Ot(e)?e:[]).length=0;const r=Object.keys(this._properties);return e.push(...r),this._hierarchy&&this._getPropertyNamesInHierarchy(t,e),e}getProperty(t,e){if(this._checkBatchId(t),I("string"==typeof e,e),this._binaryProperties){const r=this._binaryProperties[e];if(Ot(r))return this._getBinaryProperty(r,t)}const r=this._properties[e];if(Ot(r))return Rt(r[t]);if(this._hierarchy){const r=this._getHierarchyProperty(t,e);if(Ot(r))return r}}setProperty(t,e,r){const n=this.featureCount;if(this._checkBatchId(t),I("string"==typeof e,e),this._binaryProperties){const n=this._binaryProperties[e];if(n)return void this._setBinaryProperty(n,t,r)}if(this._hierarchy&&this._setHierarchyProperty(this,t,e,r))return;let s=this._properties[e];Ot(s)||(this._properties[e]=new Array(n),s=this._properties[e]),s[t]=Rt(r)}_checkBatchId(t){if(!(t>=0&&t<this.featureCount))throw new Error("batchId not in range [0, featureCount - 1].")}_getBinaryProperty(t,e){return t.unpack(t.typedArray,e)}_setBinaryProperty(t,e,r){t.pack(r,t.typedArray,e)}_initializeBinaryProperties(){let t=null;for(const e in this._properties){const r=this._properties[e],n=this._initializeBinaryProperty(e,r);n&&(t=t||{},t[e]=n)}return t}_initializeBinaryProperty(t,e){if("byteOffset"in e){const r=e;I(this.binary,`Property ${t} requires a batch table binary.`),I(r.type,`Property ${t} requires a type.`);const n=function(t,e,r,n){const{componentType:s}=t;I(t.componentType);const i="string"==typeof s?gt.fromName(s):s,o=pt[t.type],a=It[t.type],c=Tt[t.type];return r+=t.byteOffset,{values:gt.createTypedArray(i,e,r,o*n),type:i,size:o,unpacker:a,packer:c}}(r,this.binary.buffer,0|this.binary.byteOffset,this.featureCount);return{typedArray:n.values,componentCount:n.size,unpack:n.unpacker,pack:n.packer}}return null}_hasPropertyInHierarchy(t,e){if(!this._hierarchy)return!1;const r=Ft(this._hierarchy,t,(t,r)=>{const n=t.classIds[r];return Ot(t.classes[n].instances[e])});return Ot(r)}_getPropertyNamesInHierarchy(t,e){Ft(this._hierarchy,t,(t,r)=>{const n=t.classIds[r],s=t.classes[n].instances;for(const t in s)s.hasOwnProperty(t)&&-1===e.indexOf(t)&&e.push(t)})}_getHierarchyProperty(t,e){return Ft(this._hierarchy,t,(t,r)=>{const n=t.classIds[r],s=t.classes[n],i=t.classIndexes[r],o=s.instances[e];return Ot(o)?Ot(o.typedArray)?this._getBinaryProperty(o,i):Rt(o[i]):null})}_setHierarchyProperty(t,e,r,n){const s=Ft(this._hierarchy,e,(t,s)=>{const i=t.classIds[s],o=t.classes[i],a=t.classIndexes[s],c=o.instances[r];return!!Ot(c)&&(I(s===e,`Inherited property "${r}" is read-only.`),Ot(c.typedArray)?this._setBinaryProperty(c,a,n):c[a]=Rt(n),!0)});return Ot(s)}}function wt(t,e,r=0){const n=new DataView(e);if(t.magic=n.getUint32(r,!0),r+=4,t.version=n.getUint32(r,!0),r+=4,t.byteLength=n.getUint32(r,!0),r+=4,1!==t.version)throw new Error(`3D Tile Version ${t.version} not supported`);return r}function Ht(t,e,r){const n=new DataView(e);let s;t.header=t.header||{};let i=n.getUint32(r,!0);r+=4;let o=n.getUint32(r,!0);r+=4;let a=n.getUint32(r,!0);r+=4;let c=n.getUint32(r,!0);return r+=4,a>=570425344?(r-=8,s=i,a=o,c=0,i=0,o=0,console.warn("b3dm tile in legacy format.")):c>=570425344&&(r-=4,s=a,a=i,c=o,i=0,o=0,console.warn("b3dm tile in legacy format.")),t.header.featureTableJsonByteLength=i,t.header.featureTableBinaryByteLength=o,t.header.batchTableJsonByteLength=a,t.header.batchTableBinaryByteLength=c,t.header.batchLength=s,r}function Lt(t,e,r,n){return r=function(t,e,r,n){const{featureTableJsonByteLength:s,featureTableBinaryByteLength:i,batchLength:o}=t.header;if(t.featureTableJson={BATCH_LENGTH:o||0},s>0){const n=T(e,r,s);t.featureTableJson=JSON.parse(n)}return r+=s,t.featureTableBinary=new Uint8Array(e,r,i),r+=i}(t,e,r),r=function(t,e,r,n){const{batchTableJsonByteLength:s,batchTableBinaryByteLength:i}=t.header;if(s>0){const n=T(e,r,s);t.batchTableJson=JSON.parse(n),r+=s,i>0&&(t.batchTableBinary=new Uint8Array(e,r,i),t.batchTableBinary=new Uint8Array(t.batchTableBinary),r+=i)}return r}(t,e,r)}function Ut(t,e=[0,0,0]){const r=t>>11&31,n=t>>5&63,s=31&t;return e[0]=r<<3,e[1]=n<<2,e[2]=s<<3,e}function Jt(t,e,r){if(!(e||t&&t.batchIds&&r))return null;const{batchIds:n,isRGB565:s,pointCount:i}=t;if(n&&r){const t=new Uint8ClampedArray(3*i);for(let e=0;e<i;e++){const s=n[e],i=r.getProperty(s,"dimensions").map(t=>255*t);t[3*e]=i[0],t[3*e+1]=i[1],t[3*e+2]=i[2]}return{type:Ct.UNSIGNED_BYTE,value:t,size:3,normalized:!0}}if(s){const t=new Uint8ClampedArray(3*i);for(let r=0;r<i;r++){const n=Ut(e[r]);t[3*r]=n[0],t[3*r+1]=n[1],t[3*r+2]=n[2]}return{type:Ct.UNSIGNED_BYTE,value:t,size:3,normalized:!0}}return e&&e.length===3*i?{type:Ct.UNSIGNED_BYTE,value:e,size:3,normalized:!0}:{type:Ct.UNSIGNED_BYTE,value:e,size:4,normalized:!0}}var Pt=r(19),Nt=r(3),vt=r(1),xt=r(9),jt=r(8);class Kt extends Pt.a{constructor(t=0,e=0){super(2),Object(Nt.e)(t)&&1===arguments.length?this.copy(t):(Nt.b.debug&&(Object(vt.a)(t),Object(vt.a)(e)),this[0]=t,this[1]=e)}set(t,e){return this[0]=t,this[1]=e,this.check()}copy(t){return this[0]=t[0],this[1]=t[1],this.check()}fromObject(t){return Nt.b.debug&&(Object(vt.a)(t.x),Object(vt.a)(t.y)),this[0]=t.x,this[1]=t.y,this.check()}toObject(t){return t.x=this[0],t.y=this[1],t}get ELEMENTS(){return 2}horizontalAngle(){return Math.atan2(this.y,this.x)}verticalAngle(){return Math.atan2(this.x,this.y)}transform(t){return this.transformAsPoint(t)}transformAsPoint(t){return xt.d(this,this,t),this.check()}transformAsVector(t){return Object(jt.a)(this,this,t),this.check()}transformByMatrix3(t){return xt.c(this,this,t),this.check()}transformByMatrix2x3(t){return xt.b(this,this,t),this.check()}transformByMatrix2(t){return xt.a(this,this,t),this.check()}}var Qt=r(44);function Xt(t,e){if(!t)throw new Error("math.gl assertion failed. "+e)}new Kt,new mt.a,new Kt,new Kt,new Uint8Array(1);function kt(t,e=255){return Object(Nt.a)(t,0,e)/e*2-1}function Yt(t){return t<0?-1:1}function Vt(t,e,r,n){if(Xt(n),t<0||t>r||e<0||e>r)throw new Error("x and y must be unsigned normalized integers between 0 and "+r);if(n.x=kt(t,r),n.y=kt(e,r),n.z=1-(Math.abs(n.x)+Math.abs(n.y)),n.z<0){const t=n.x;n.x=(1-Math.abs(n.y))*Yt(t),n.y=(1-Math.abs(t))*Yt(n.y)}return n.normalize()}function Wt(t,e,r){return Vt(t,e,255,r)}const Zt=new mt.a;function qt(t,e,r){return t.isQuantized?r["3d-tiles"]&&r["3d-tiles"].decodeQuantizedPositions?(t.isQuantized=!1,function(t,e){const r=new mt.a,n=new Float32Array(3*t.pointCount);for(let s=0;s<t.pointCount;s++)r.set(e[3*s],e[3*s+1],e[3*s+2]).scale(1/t.quantizedRange).multiply(t.quantizedVolumeScale).add(t.quantizedVolumeOffset).toArray(n,3*s);return n}(t,e)):{type:Ct.UNSIGNED_SHORT,value:e,size:3,normalized:!0}:e}async function zt(t,e,r,n,s){r=Lt(t,e,r=Ht(t,e,r=wt(t,e,r))),function(t){t.attributes={positions:null,colors:null,normals:null,batchIds:null},t.isQuantized=!1,t.isTranslucent=!1,t.isRGB565=!1,t.isOctEncoded16P=!1}(t);const{featureTable:i,batchTable:o}=function(t){const e=new yt(t.featureTableJson,t.featureTableBinary),r=e.getGlobalProperty("POINTS_LENGTH");if(!Number.isFinite(r))throw new Error("POINTS_LENGTH must be defined");e.featuresLength=r,t.featuresLength=r,t.pointsLength=r,t.pointCount=r,t.rtcCenter=e.getGlobalProperty("RTC_CENTER",Ct.FLOAT,3);const n=function(t,e){let r=null;if(!t.batchIds&&e.hasProperty("BATCH_ID")&&(t.batchIds=e.getPropertyArray("BATCH_ID",Ct.UNSIGNED_SHORT,1),t.batchIds)){const n=e.getGlobalProperty("BATCH_LENGTH");if(!n)throw new Error("Global property: BATCH_LENGTH must be defined when BATCH_ID is defined.");const{batchTableJson:s,batchTableBinary:i}=t;r=new St(s,i,n)}return r}(t,e);return{featureTable:e,batchTable:n}}(t);return await async function(t,e,r,n,s){let i,o,a;const c=t.batchTableJson&&t.batchTableJson.extensions&&t.batchTableJson.extensions["3DTILES_draco_point_compression"];c&&(a=c.properties);const u=e.getExtension("3DTILES_draco_point_compression");if(u){o=u.properties;const e=u.byteOffset,r=u.byteLength;if(!o||!Number.isFinite(e)||!r)throw new Error("Draco properties, byteOffset, and byteLength must be defined");i=t.featureTableBinary.slice(e,e+r),t.hasPositions=Number.isFinite(o.POSITION),t.hasColors=Number.isFinite(o.RGB)||Number.isFinite(o.RGBA),t.hasNormals=Number.isFinite(o.NORMAL),t.hasBatchIds=Number.isFinite(o.BATCH_ID),t.isTranslucent=Number.isFinite(o.RGBA)}if(!i)return!0;const A={buffer:i,properties:{...o,...a},featureTableProperties:o,batchTableProperties:a,dequantizeInShader:!1};return await async function(t,e,r,n){const{parse:s}=n,i={...r,draco:{...r.draco,extraAttributes:e.batchTableProperties||{}}};delete i["3d-tiles"];const o=await s(e.buffer,lt,i),a=o.attributes.POSITION&&o.attributes.POSITION.value,c=o.attributes.COLOR_0&&o.attributes.COLOR_0.value,u=o.attributes.NORMAL&&o.attributes.NORMAL.value,A=o.attributes.BATCH_ID&&o.attributes.BATCH_ID.value,h=a&&o.attributes.POSITION.value.quantization,B=u&&o.attributes.NORMAL.value.quantization;if(h){const e=o.POSITION.data.quantization,r=e.range;t.quantizedVolumeScale=new mt.a(r,r,r),t.quantizedVolumeOffset=new mt.a(e.minValues),t.quantizedRange=(1<<e.quantizationBits)-1,t.isQuantizedDraco=!0}B&&(t.octEncodedRange=(1<<o.NORMAL.data.quantization.quantizationBits)-1,t.isOctEncodedDraco=!0);const f={};if(e.batchTableProperties)for(const t of Object.keys(e.batchTableProperties))o.attributes[t]&&o.attributes[t].value&&(f[t.toLowerCase()]=o.attributes[t].value);t.attributes={positions:a,colors:Jt(t,c),normals:u,batchIds:A,...f}}(t,A,n,s)}(t,i,0,n,s),function(t,e,r){if(!t.attributes.positions)if(e.hasProperty("POSITION"))t.attributes.positions=e.getPropertyArray("POSITION",Ct.FLOAT,3);else if(e.hasProperty("POSITION_QUANTIZED")){const n=e.getPropertyArray("POSITION_QUANTIZED",Ct.UNSIGNED_SHORT,3);if(t.isQuantized=!0,t.quantizedRange=65535,t.quantizedVolumeScale=e.getGlobalProperty("QUANTIZED_VOLUME_SCALE",Ct.FLOAT,3),!t.quantizedVolumeScale)throw new Error("QUANTIZED_VOLUME_SCALE must be defined for quantized positions.");if(t.quantizedVolumeOffset=e.getGlobalProperty("QUANTIZED_VOLUME_OFFSET",Ct.FLOAT,3),!t.quantizedVolumeOffset)throw new Error("QUANTIZED_VOLUME_OFFSET must be defined for quantized positions.");t.attributes.positions=qt(t,n,r)}if(!t.attributes.positions)throw new Error("Either POSITION or POSITION_QUANTIZED must be defined.")}(t,i,n),function(t,e,r){if(!t.attributes.colors){let n=null;e.hasProperty("RGBA")?(n=e.getPropertyArray("RGBA",Ct.UNSIGNED_BYTE,4),t.isTranslucent=!0):e.hasProperty("RGB")?n=e.getPropertyArray("RGB",Ct.UNSIGNED_BYTE,3):e.hasProperty("RGB565")&&(n=e.getPropertyArray("RGB565",Ct.UNSIGNED_SHORT,1),t.isRGB565=!0),t.attributes.colors=Jt(t,n,r)}e.hasProperty("CONSTANT_RGBA")&&(t.constantRGBA=e.getGlobalProperty("CONSTANT_RGBA",Ct.UNSIGNED_BYTE,4))}(t,i,o),function(t,e){if(!t.attributes.normals){let r=null;e.hasProperty("NORMAL")?r=e.getPropertyArray("NORMAL",Ct.FLOAT,3):e.hasProperty("NORMAL_OCT16P")&&(r=e.getPropertyArray("NORMAL_OCT16P",Ct.UNSIGNED_BYTE,2),t.isOctEncoded16P=!0),t.attributes.normals=function(t,e){if(!e)return null;if(t.isOctEncoded16P){const r=new Float32Array(3*t.pointsLength);for(let n=0;n<t.pointsLength;n++)Wt(e[2*n],e[2*n+1],Zt),Zt.toArray(r,3*n);return{type:Ct.FLOAT,size:2,value:r}}return{type:Ct.FLOAT,size:2,value:e}}(t,r)}}(t,i),r}let $t,te;async function ee(t){const e=t.modules||{};return e.basis?e.basis:($t=$t||async function(t){let e=null,r=null;return[e,r]=await Promise.all([await ht("basis_transcoder.js","textures",t),await ht("basis_transcoder.wasm","textures",t)]),e=e||globalThis.BASIS,await function(t,e){const r={};e&&(r.wasmBinary=e);return new Promise(e=>{t(r).then(t=>{const{BasisFile:r,initializeBasis:n}=t;n(),e({BasisFile:r})})})}(e,r)}(t),await $t)}async function re(t){const e=t.modules||{};return e.basisEncoder?e.basisEncoder:(te=te||async function(t){let e=null,r=null;return[e,r]=await Promise.all([await ht("https://unpkg.com/@loaders.gl/textures@3.1.0-alpha.5/dist/libs/basis_encoder.js","textures",t),await ht("https://unpkg.com/@loaders.gl/textures@3.1.0-alpha.5/dist/libs/basis_encoder.wasm","textures",t)]),e=e||globalThis.BASIS,await function(t,e){const r={};e&&(r.wasmBinary=e);return new Promise(e=>{t(r).then(t=>{const{BasisFile:r,KTX2File:n,initializeBasis:s,BasisEncoder:i}=t;s(),e({BasisFile:r,KTX2File:n,BasisEncoder:i})})})}(e,r)}(t),await te)}const ne={COMPRESSED_RGB_S3TC_DXT1_EXT:33776,COMPRESSED_RGBA_S3TC_DXT1_EXT:33777,COMPRESSED_RGBA_S3TC_DXT3_EXT:33778,COMPRESSED_RGBA_S3TC_DXT5_EXT:33779,COMPRESSED_R11_EAC:37488,COMPRESSED_SIGNED_R11_EAC:37489,COMPRESSED_RG11_EAC:37490,COMPRESSED_SIGNED_RG11_EAC:37491,COMPRESSED_RGB8_ETC2:37492,COMPRESSED_RGBA8_ETC2_EAC:37493,COMPRESSED_SRGB8_ETC2:37494,COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:37495,COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2:37496,COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2:37497,COMPRESSED_RGB_PVRTC_4BPPV1_IMG:35840,COMPRESSED_RGBA_PVRTC_4BPPV1_IMG:35842,COMPRESSED_RGB_PVRTC_2BPPV1_IMG:35841,COMPRESSED_RGBA_PVRTC_2BPPV1_IMG:35843,COMPRESSED_RGB_ETC1_WEBGL:36196,COMPRESSED_RGB_ATC_WEBGL:35986,COMPRESSED_RGBA_ATC_EXPLICIT_ALPHA_WEBGL:35987,COMPRESSED_RGBA_ATC_INTERPOLATED_ALPHA_WEBGL:34798,COMPRESSED_RGBA_ASTC_4X4_KHR:37808,COMPRESSED_RGBA_ASTC_5X4_KHR:37809,COMPRESSED_RGBA_ASTC_5X5_KHR:37810,COMPRESSED_RGBA_ASTC_6X5_KHR:37811,COMPRESSED_RGBA_ASTC_6X6_KHR:37812,COMPRESSED_RGBA_ASTC_8X5_KHR:37813,COMPRESSED_RGBA_ASTC_8X6_KHR:37814,COMPRESSED_RGBA_ASTC_8X8_KHR:37815,COMPRESSED_RGBA_ASTC_10X5_KHR:37816,COMPRESSED_RGBA_ASTC_10X6_KHR:37817,COMPRESSED_RGBA_ASTC_10X8_KHR:37818,COMPRESSED_RGBA_ASTC_10X10_KHR:37819,COMPRESSED_RGBA_ASTC_12X10_KHR:37820,COMPRESSED_RGBA_ASTC_12X12_KHR:37821,COMPRESSED_SRGB8_ALPHA8_ASTC_4X4_KHR:37840,COMPRESSED_SRGB8_ALPHA8_ASTC_5X4_KHR:37841,COMPRESSED_SRGB8_ALPHA8_ASTC_5X5_KHR:37842,COMPRESSED_SRGB8_ALPHA8_ASTC_6X5_KHR:37843,COMPRESSED_SRGB8_ALPHA8_ASTC_6X6_KHR:37844,COMPRESSED_SRGB8_ALPHA8_ASTC_8X5_KHR:37845,COMPRESSED_SRGB8_ALPHA8_ASTC_8X6_KHR:37846,COMPRESSED_SRGB8_ALPHA8_ASTC_8X8_KHR:37847,COMPRESSED_SRGB8_ALPHA8_ASTC_10X5_KHR:37848,COMPRESSED_SRGB8_ALPHA8_ASTC_10X6_KHR:37849,COMPRESSED_SRGB8_ALPHA8_ASTC_10X8_KHR:37850,COMPRESSED_SRGB8_ALPHA8_ASTC_10X10_KHR:37851,COMPRESSED_SRGB8_ALPHA8_ASTC_12X10_KHR:37852,COMPRESSED_SRGB8_ALPHA8_ASTC_12X12_KHR:37853,COMPRESSED_RED_RGTC1_EXT:36283,COMPRESSED_SIGNED_RED_RGTC1_EXT:36284,COMPRESSED_RED_GREEN_RGTC2_EXT:36285,COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT:36286,COMPRESSED_SRGB_S3TC_DXT1_EXT:35916,COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT:35917,COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT:35918,COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT:35919},se=["","WEBKIT_","MOZ_"],ie={WEBGL_compressed_texture_s3tc:"dxt",WEBGL_compressed_texture_s3tc_srgb:"dxt-srgb",WEBGL_compressed_texture_etc1:"etc1",WEBGL_compressed_texture_etc:"etc2",WEBGL_compressed_texture_pvrtc:"pvrtc",WEBGL_compressed_texture_atc:"atc",WEBGL_compressed_texture_astc:"astc",EXT_texture_compression_rgtc:"rgtc"};let oe=null;function ae(t){if(!oe){t=t||function(){try{return document.createElement("canvas").getContext("webgl")}catch(t){return null}}()||void 0,oe=new Set;for(const e of se)for(const r in ie)if(t&&t.getExtension(`${e}${r}`)){const t=ie[r];oe.add(t)}}return oe}new Uint8Array([0]);var ce,ue,Ae,he,Be,fe,le,de;!function(t){t[t.NONE=0]="NONE",t[t.BASISLZ=1]="BASISLZ",t[t.ZSTD=2]="ZSTD",t[t.ZLIB=3]="ZLIB"}(ce||(ce={})),function(t){t[t.BASICFORMAT=0]="BASICFORMAT"}(ue||(ue={})),function(t){t[t.UNSPECIFIED=0]="UNSPECIFIED",t[t.ETC1S=163]="ETC1S",t[t.UASTC=166]="UASTC"}(Ae||(Ae={})),function(t){t[t.UNSPECIFIED=0]="UNSPECIFIED",t[t.SRGB=1]="SRGB"}(he||(he={})),function(t){t[t.UNSPECIFIED=0]="UNSPECIFIED",t[t.LINEAR=1]="LINEAR",t[t.SRGB=2]="SRGB",t[t.ITU=3]="ITU",t[t.NTSC=4]="NTSC",t[t.SLOG=5]="SLOG",t[t.SLOG2=6]="SLOG2"}(Be||(Be={})),function(t){t[t.ALPHA_STRAIGHT=0]="ALPHA_STRAIGHT",t[t.ALPHA_PREMULTIPLIED=1]="ALPHA_PREMULTIPLIED"}(fe||(fe={})),function(t){t[t.RGB=0]="RGB",t[t.RRR=3]="RRR",t[t.GGG=4]="GGG",t[t.AAA=15]="AAA"}(le||(le={})),function(t){t[t.RGB=0]="RGB",t[t.RGBA=3]="RGBA",t[t.RRR=4]="RRR",t[t.RRRG=5]="RRRG"}(de||(de={}));const Ce=[171,75,84,88,32,50,48,187,13,10,26,10];const me={etc1:{basisFormat:0,compressed:!0,format:ne.COMPRESSED_RGB_ETC1_WEBGL},etc2:{basisFormat:1,compressed:!0},bc1:{basisFormat:2,compressed:!0,format:ne.COMPRESSED_RGB_S3TC_DXT1_EXT},bc3:{basisFormat:3,compressed:!0,format:ne.COMPRESSED_RGBA_S3TC_DXT5_EXT},bc4:{basisFormat:4,compressed:!0},bc5:{basisFormat:5,compressed:!0},"bc7-m6-opaque-only":{basisFormat:6,compressed:!0},"bc7-m5":{basisFormat:7,compressed:!0},"pvrtc1-4-rgb":{basisFormat:8,compressed:!0,format:ne.COMPRESSED_RGB_PVRTC_4BPPV1_IMG},"pvrtc1-4-rgba":{basisFormat:9,compressed:!0,format:ne.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG},"astc-4x4":{basisFormat:10,compressed:!0,format:ne.COMPRESSED_RGBA_ASTC_4X4_KHR},"atc-rgb":{basisFormat:11,compressed:!0},"atc-rgba-interpolated-alpha":{basisFormat:12,compressed:!0},rgba32:{basisFormat:13,compressed:!1},rgb565:{basisFormat:14,compressed:!1},bgr565:{basisFormat:15,compressed:!1},rgba4444:{basisFormat:16,compressed:!1}};function Ee(t,e,r){const n=new t(new Uint8Array(e));try{if(!n.startTranscoding())return null;const t=n.getNumImages(),e=[];for(let s=0;s<t;s++){const t=n.getNumLevels(s),i=[];for(let e=0;e<t;e++)i.push(be(n,s,e,r));e.push(i)}return e}finally{n.close(),n.delete()}}function be(t,e,r,n){const s=t.getImageWidth(e,r),i=t.getImageHeight(e,r),o=t.getHasAlpha(),{compressed:a,format:c,basisFormat:u}=pe(n,o),A=t.getImageTranscodedSizeInBytes(e,r,u),h=new Uint8Array(A);return t.transcodeImage(h,e,r,u,0,0)?{width:s,height:i,data:h,compressed:a,hasAlpha:o,format:c}:null}function ge(t,e,r){const n=new t(new Uint8Array(e));try{if(!n.startTranscoding())return null;const t=n.getLevels(),e=[];for(let s=0;s<t;s++){e.push(ye(n,s,r));break}return e}finally{n.close(),n.delete()}}function ye(t,e,r){const{alphaFlag:n,height:s,width:i}=t.getImageLevelInfo(e,0,0),{compressed:o,format:a,basisFormat:c}=pe(r,n),u=t.getImageTranscodedSizeInBytes(e,0,0,c),A=new Uint8Array(u);return t.transcodeImage(A,e,0,0,c,0,-1,-1)?{width:i,height:s,data:A,compressed:o,alphaFlag:n,format:a}:null}function pe(t,e){let r=t&&t.basis&&t.basis.format;return"auto"===r&&(r=Ie()),"object"==typeof r&&(r=e?r.alpha:r.noAlpha),r=r.toLowerCase(),me[r]}function Ie(){const t=ae();return t.has("astc")?"astc-4x4":t.has("dxt")?{alpha:"bc3",noAlpha:"bc1"}:t.has("pvrtc")?{alpha:"pvrtc1-4-rgba",noAlpha:"pvrtc1-4-rgb"}:t.has("etc1")?"etc1":t.has("etc2")?"etc2":"rgb565"}const Te={name:"Basis",id:"basis",module:"textures",version:"3.1.0-alpha.5",worker:!0,extensions:["basis","ktx2"],mimeTypes:["application/octet-stream","image/ktx2"],tests:["sB"],binary:!0,options:{basis:{format:"auto",libraryPath:"libs/",containerFormat:"auto",module:"transcoder"}}},Me={...Te,parse:async function(t,e){if("auto"===e.basis.containerFormat){if(function(t){const e=new Uint8Array(t.buffer||t,t.byteOffset||0,Ce.length);return!(e[0]!==Ce[0]||e[1]!==Ce[1]||e[2]!==Ce[2]||e[3]!==Ce[3]||e[4]!==Ce[4]||e[5]!==Ce[5]||e[6]!==Ce[6]||e[7]!==Ce[7]||e[8]!==Ce[8]||e[9]!==Ce[9]||e[10]!==Ce[10]||e[11]!==Ce[11])}(t)){return ge((await re(e)).KTX2File,t,e)}const{BasisFile:r}=await ee(e);return Ee(r,t,e)}switch(e.basis.module){case"encoder":const r=await re(e);switch(e.basis.containerFormat){case"ktx2":return ge(r.KTX2File,t,e);case"basis":default:return Ee(r.BasisFile,t,e)}case"transcoder":default:const{BasisFile:n}=await ee(e);return Ee(n,t,e)}}};var Ge=r(11);const{_parseImageNode:Fe}=globalThis,De="undefined"!=typeof Image,Oe="undefined"!=typeof ImageBitmap,Re=Boolean(Fe),_e=!!Ge.a||Re;function Se(t){const e=He(t);if(!e)throw new Error("Not an image");return e}function we(t){switch(Se(t)){case"data":return t;case"image":case"imagebitmap":const e=document.createElement("canvas"),r=e.getContext("2d");if(!r)throw new Error("getImageData");return e.width=t.width,e.height=t.height,r.drawImage(t,0,0),r.getImageData(0,0,t.width,t.height);default:throw new Error("getImageData")}}function He(t){return"undefined"!=typeof ImageBitmap&&t instanceof ImageBitmap?"imagebitmap":"undefined"!=typeof Image&&t instanceof Image?"image":t&&"object"==typeof t&&t.data&&t.width&&t.height?"data":null}const Le=/^data:image\/svg\+xml/,Ue=/\.svg((\?|#).*)?$/;function Je(t){return t&&(Le.test(t)||Ue.test(t))}function Pe(t,e){if(Je(e))throw new Error("SVG cannot be parsed directly to imagebitmap");return new Blob([new Uint8Array(t)])}async function Ne(t,e,r){const n=function(t,e){if(Je(e)){let e=(new TextDecoder).decode(t);try{"function"==typeof unescape&&"function"==typeof encodeURIComponent&&(e=unescape(encodeURIComponent(e)))}catch(t){throw new Error(t.message)}return"data:image/svg+xml;base64,"+btoa(e)}return Pe(t,e)}(t,r),s=self.URL||self.webkitURL,i="string"!=typeof n&&s.createObjectURL(n);try{return await async function(t,e){const r=new Image;if(r.src=t,e.image&&e.image.decode&&r.decode)return await r.decode(),r;return await new Promise((e,n)=>{try{r.onload=()=>e(r),r.onerror=e=>n(new Error(`Could not load image ${t}: ${e}`))}catch(t){n(t)}})}(i||n,e)}finally{i&&s.revokeObjectURL(i)}}const ve={};let xe=!0;async function je(t,e,r){let n;if(Je(r)){n=await Ne(t,e,r)}else n=Pe(t,r);const s=e&&e.imagebitmap;return await async function(t,e=null){!function(t){for(const e in t||ve)return!1;return!0}(e)&&xe||(e=null);if(e)try{return await createImageBitmap(t,e)}catch(t){console.warn(t),xe=!1}return await createImageBitmap(t)}(n,s)}function Ke(t){const e=Qe(t);return function(t){const e=Qe(t);if(!(e.byteLength>=24&&2303741511===e.getUint32(0,!1)))return null;return{mimeType:"image/png",width:e.getUint32(16,!1),height:e.getUint32(20,!1)}}(e)||function(t){const e=Qe(t);if(!(e.byteLength>=3&&65496===e.getUint16(0,!1)&&255===e.getUint8(2)))return null;const{tableMarkers:r,sofMarkers:n}=function(){const t=new Set([65499,65476,65484,65501,65534]);for(let e=65504;e<65520;++e)t.add(e);const e=new Set([65472,65473,65474,65475,65477,65478,65479,65481,65482,65483,65485,65486,65487,65502]);return{tableMarkers:t,sofMarkers:e}}();let s=2;for(;s+9<e.byteLength;){const t=e.getUint16(s,!1);if(n.has(t))return{mimeType:"image/jpeg",height:e.getUint16(s+5,!1),width:e.getUint16(s+7,!1)};if(!r.has(t))return null;s+=2,s+=e.getUint16(s,!1)}return null}(e)||function(t){const e=Qe(t);if(!(e.byteLength>=10&&1195984440===e.getUint32(0,!1)))return null;return{mimeType:"image/gif",width:e.getUint16(6,!0),height:e.getUint16(8,!0)}}(e)||function(t){const e=Qe(t);if(!(e.byteLength>=14&&16973===e.getUint16(0,!1)&&e.getUint32(2,!0)===e.byteLength))return null;return{mimeType:"image/bmp",width:e.getUint32(18,!0),height:e.getUint32(22,!0)}}(e)}function Qe(t){if(t instanceof DataView)return t;if(ArrayBuffer.isView(t))return new DataView(t.buffer);if(t instanceof ArrayBuffer)return new DataView(t);throw new Error("toDataView")}const Xe={id:"image",module:"images",name:"Images",version:"3.1.0-alpha.5",mimeTypes:["image/png","image/jpeg","image/gif","image/webp","image/bmp","image/vnd.microsoft.icon","image/svg+xml"],extensions:["png","jpg","jpeg","gif","webp","bmp","ico","svg"],parse:async function(t,e,r){const n=((e=e||{}).image||{}).type||"auto",{url:s}=r||{};let i;switch(function(t){switch(t){case"auto":case"data":return function(){if(Oe)return"imagebitmap";if(De)return"image";if(_e)return"data";throw new Error("Install '@loaders.gl/polyfills' to parse images under Node.js")}();default:return function(t){switch(t){case"auto":return Oe||De||_e;case"imagebitmap":return Oe;case"image":return De;case"data":return _e;default:throw new Error(`@loaders.gl/images: image ${t} not supported in this environment`)}}(t),t}}(n)){case"imagebitmap":i=await je(t,e,s);break;case"image":i=await Ne(t,e,s);break;case"data":i=await async function(t,e){const{mimeType:r}=Ke(t)||{},n=globalThis._parseImageNode;return I(n),await n(t,r)}(t);break;default:I(!1)}return"data"===n&&(i=we(i)),i},tests:[t=>Boolean(Ke(new DataView(t)))],options:{image:{type:"auto",decode:!0}}};function ke(t,e,r){if(t.byteLength<=e+r)return"";const n=new DataView(t);let s="";for(let t=0;t<r;t++)s+=String.fromCharCode(n.getUint8(e+t));return s}function Ye(t){try{return JSON.parse(t)}catch(e){throw new Error(`Failed to parse JSON from data starting with "${function(t,e=5){if("string"==typeof t)return t.slice(0,e);if(ArrayBuffer.isView(t))return ke(t.buffer,t.byteOffset,e);if(t instanceof ArrayBuffer){return ke(t,0,e)}return""}(t)}"`)}}r(22);function Ve(t,e,r){const n=void 0!==r?new Uint8Array(t).subarray(e,e+r):new Uint8Array(t).subarray(e);return new Uint8Array(n).buffer}function We(t,e){if(!t)throw new Error(e||"assert failed: gltf")}function Ze(t,e){if(t.startsWith("data:")||t.startsWith("http:")||t.startsWith("https:"))return t;const r=e.baseUri||e.uri;if(!r)throw new Error("'baseUri' must be provided to resolve relative url "+t);return r.substr(0,r.lastIndexOf("/")+1)+t}function qe(t,e,r){const n=t.bufferViews[r];We(n);const s=e[n.buffer];We(s);const i=(n.byteOffset||0)+s.byteOffset;return new Uint8Array(s.arrayBuffer,i,n.byteLength)}function ze(t,e){return I(t>=0),I(e>0),t+(e-1)&~(e-1)}function $e(t,e,r){let n;if(t instanceof ArrayBuffer)n=new Uint8Array(t);else{const e=t.byteOffset,r=t.byteLength;n=new Uint8Array(t.buffer||t.arrayBuffer,e,r)}return e.set(n,r),r+ze(n.byteLength,4)}const tr=["SCALAR","VEC2","VEC3","VEC4"],er=[[Int8Array,5120],[Uint8Array,5121],[Int16Array,5122],[Uint16Array,5123],[Uint32Array,5125],[Float32Array,5126],[Float64Array,5130]],rr=new Map(er),nr={SCALAR:1,VEC2:2,VEC3:3,VEC4:4,MAT2:4,MAT3:9,MAT4:16},sr={5120:1,5121:1,5122:2,5123:2,5125:4,5126:4},ir={5120:Int8Array,5121:Uint8Array,5122:Int16Array,5123:Uint16Array,5125:Uint32Array,5126:Float32Array};function or(t){return tr[t-1]||tr[0]}function ar(t){const e=rr.get(t.constructor);if(!e)throw new Error("Illegal typed array");return e}function cr(t,e){const r=ir[t.componentType],n=nr[t.type],s=sr[t.componentType],i=t.count*n,o=t.count*n*s;return We(o>=0&&o<=e.byteLength),{ArrayType:r,length:i,byteLength:o}}function ur(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}const Ar={asset:{version:"2.0",generator:"loaders.gl"},buffers:[]};class hr{constructor(t){ur(this,"gltf",void 0),ur(this,"sourceBuffers",void 0),ur(this,"byteLength",void 0),this.gltf=t||{json:{...Ar},buffers:[]},this.sourceBuffers=[],this.byteLength=0,this.gltf.buffers&&this.gltf.buffers[0]&&(this.byteLength=this.gltf.buffers[0].byteLength,this.sourceBuffers=[this.gltf.buffers[0]])}get json(){return this.gltf.json}getApplicationData(t){return this.json[t]}getExtraData(t){return(this.json.extras||{})[t]}getExtension(t){const e=this.getUsedExtensions().find(e=>e===t),r=this.json.extensions||{};return e?r[t]||!0:null}getRequiredExtension(t){return this.getRequiredExtensions().find(e=>e===t)?this.getExtension(t):null}getRequiredExtensions(){return this.json.extensionsRequired||[]}getUsedExtensions(){return this.json.extensionsUsed||[]}getObjectExtension(t,e){return(t.extensions||{})[e]}getScene(t){return this.getObject("scenes",t)}getNode(t){return this.getObject("nodes",t)}getSkin(t){return this.getObject("skins",t)}getMesh(t){return this.getObject("meshes",t)}getMaterial(t){return this.getObject("materials",t)}getAccessor(t){return this.getObject("accessors",t)}getTexture(t){return this.getObject("textures",t)}getSampler(t){return this.getObject("samplers",t)}getImage(t){return this.getObject("images",t)}getBufferView(t){return this.getObject("bufferViews",t)}getBuffer(t){return this.getObject("buffers",t)}getObject(t,e){if("object"==typeof e)return e;const r=this.json[t]&&this.json[t][e];if(!r)throw new Error(`glTF file error: Could not find ${t}[${e}]`);return r}getTypedArrayForBufferView(t){const e=(t=this.getBufferView(t)).buffer,r=this.gltf.buffers[e];We(r);const n=(t.byteOffset||0)+r.byteOffset;return new Uint8Array(r.arrayBuffer,n,t.byteLength)}getTypedArrayForAccessor(t){t=this.getAccessor(t);const e=this.getBufferView(t.bufferView),r=this.getBuffer(e.buffer).data,{ArrayType:n,length:s}=cr(t,e);return new n(r,e.byteOffset+t.byteOffset,s)}getTypedArrayForImageData(t){t=this.getAccessor(t);const e=this.getBufferView(t.bufferView),r=this.getBuffer(e.buffer).data,n=e.byteOffset||0;return new Uint8Array(r,n,e.byteLength)}addApplicationData(t,e){return this.json[t]=e,this}addExtraData(t,e){return this.json.extras=this.json.extras||{},this.json.extras[t]=e,this}addObjectExtension(t,e,r){return t.extensions=t.extensions||{},t.extensions[e]=r,this.registerUsedExtension(e),this}setObjectExtension(t,e,r){(t.extensions||{})[e]=r}removeObjectExtension(t,e){const r=t.extensions||{},n=r[e];return delete r[e],n}addExtension(t,e={}){return We(e),this.json.extensions=this.json.extensions||{},this.json.extensions[t]=e,this.registerUsedExtension(t),e}addRequiredExtension(t,e={}){return We(e),this.addExtension(t,e),this.registerRequiredExtension(t),e}registerUsedExtension(t){this.json.extensionsUsed=this.json.extensionsUsed||[],this.json.extensionsUsed.find(e=>e===t)||this.json.extensionsUsed.push(t)}registerRequiredExtension(t){this.registerUsedExtension(t),this.json.extensionsRequired=this.json.extensionsRequired||[],this.json.extensionsRequired.find(e=>e===t)||this.json.extensionsRequired.push(t)}removeExtension(t){this.json.extensionsRequired&&this._removeStringFromArray(this.json.extensionsRequired,t),this.json.extensionsUsed&&this._removeStringFromArray(this.json.extensionsUsed,t),this.json.extensions&&delete this.json.extensions[t]}setDefaultScene(t){this.json.scene=t}addScene(t){const{nodeIndices:e}=t;return this.json.scenes=this.json.scenes||[],this.json.scenes.push({nodes:e}),this.json.scenes.length-1}addNode(t){const{meshIndex:e,matrix:r}=t;this.json.nodes=this.json.nodes||[];const n={mesh:e};return r&&(n.matrix=r),this.json.nodes.push(n),this.json.nodes.length-1}addMesh(t){const{attributes:e,indices:r,material:n,mode:s=4}=t,i={primitives:[{attributes:this._addAttributes(e),mode:s}]};if(r){const t=this._addIndices(r);i.primitives[0].indices=t}return Number.isFinite(n)&&(i.primitives[0].material=n),this.json.meshes=this.json.meshes||[],this.json.meshes.push(i),this.json.meshes.length-1}addPointCloud(t){const e={primitives:[{attributes:this._addAttributes(t),mode:0}]};return this.json.meshes=this.json.meshes||[],this.json.meshes.push(e),this.json.meshes.length-1}addImage(t,e){const r=Ke(t),n=e||(null==r?void 0:r.mimeType),s={bufferView:this.addBufferView(t),mimeType:n};return this.json.images=this.json.images||[],this.json.images.push(s),this.json.images.length-1}addBufferView(t){const e=t.byteLength;We(Number.isFinite(e)),this.sourceBuffers=this.sourceBuffers||[],this.sourceBuffers.push(t);const r={buffer:0,byteOffset:this.byteLength,byteLength:e};return this.byteLength+=ze(e,4),this.json.bufferViews=this.json.bufferViews||[],this.json.bufferViews.push(r),this.json.bufferViews.length-1}addAccessor(t,e){const r={bufferView:t,type:or(e.size),componentType:e.componentType,count:e.count,max:e.max,min:e.min};return this.json.accessors=this.json.accessors||[],this.json.accessors.push(r),this.json.accessors.length-1}addBinaryBuffer(t,e={size:3}){const r=this.addBufferView(t);let n={min:e.min,max:e.max};n.min&&n.max||(n=this._getAccessorMinMax(t,e.size));const s={size:e.size,componentType:ar(t),count:Math.round(t.length/e.size),min:n.min,max:n.max};return this.addAccessor(r,Object.assign(s,e))}addTexture(t){const{imageIndex:e}=t,r={source:e};return this.json.textures=this.json.textures||[],this.json.textures.push(r),this.json.textures.length-1}addMaterial(t){return this.json.materials=this.json.materials||[],this.json.materials.push(t),this.json.materials.length-1}createBinaryChunk(){var t,e;this.gltf.buffers=[];const r=this.byteLength,n=new ArrayBuffer(r),s=new Uint8Array(n);let i=0;for(const t of this.sourceBuffers||[])i=$e(t,s,i);null!==(t=this.json)&&void 0!==t&&null!==(e=t.buffers)&&void 0!==e&&e[0]?this.json.buffers[0].byteLength=r:this.json.buffers=[{byteLength:r}],this.gltf.binary=n,this.sourceBuffers=[n]}_removeStringFromArray(t,e){let r=!0;for(;r;){const n=t.indexOf(e);n>-1?t.splice(n,1):r=!1}}_addAttributes(t={}){const e={};for(const r in t){const n=t[r],s=this._getGltfAttributeName(r),i=this.addBinaryBuffer(n.value,n);e[s]=i}return e}_addIndices(t){return this.addBinaryBuffer(t,{size:1})}_getGltfAttributeName(t){switch(t.toLowerCase()){case"position":case"positions":case"vertices":return"POSITION";case"normal":case"normals":return"NORMAL";case"color":case"colors":return"COLOR_0";case"texcoord":case"texcoords":return"TEXCOORD_0";default:return t}}_getAccessorMinMax(t,e){const r={min:null,max:null};if(t.length<e)return r;r.min=[],r.max=[];const n=t.subarray(0,e);for(const t of n)r.min.push(t),r.max.push(t);for(let n=e;n<t.length;n+=e)for(let s=0;s<e;s++)r.min[0+s]=Math.min(r.min[0+s],t[n+s]),r.max[0+s]=Math.max(r.max[0+s],t[n+s]);return r}}const Br="object"!=typeof WebAssembly,fr=new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,3,2,0,0,5,3,1,0,1,12,1,0,10,22,2,12,0,65,0,65,0,65,0,252,10,0,0,11,7,0,65,0,253,15,26,11]),lr=new Uint8Array([32,0,65,253,3,1,2,34,4,106,6,5,11,8,7,20,13,33,12,16,128,9,116,64,19,113,127,15,10,21,22,14,255,66,24,54,136,107,18,23,192,26,114,118,132,17,77,101,130,144,27,87,131,44,45,74,156,154,70,167]),dr={0:"",1:"meshopt_decodeFilterOct",2:"meshopt_decodeFilterQuat",3:"meshopt_decodeFilterExp",NONE:"",OCTAHEDRAL:"meshopt_decodeFilterOct",QUATERNION:"meshopt_decodeFilterQuat",EXPONENTIAL:"meshopt_decodeFilterExp"},Cr={0:"meshopt_decodeVertexBuffer",1:"meshopt_decodeIndexBuffer",2:"meshopt_decodeIndexSequence",ATTRIBUTES:"meshopt_decodeVertexBuffer",TRIANGLES:"meshopt_decodeIndexBuffer",INDICES:"meshopt_decodeIndexSequence"};let mr;async function Er(){return mr||(mr=async function(){let t="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";WebAssembly.validate(fr)&&(t="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",console.log("Warning: meshopt_decoder is using experimental SIMD support"));const e=await WebAssembly.instantiate(function(t){const e=new Uint8Array(t.length);for(let r=0;r<t.length;++r){const n=t.charCodeAt(r);e[r]=n>96?n-71:n>64?n-65:n>47?n+4:n>46?63:62}let r=0;for(let n=0;n<t.length;++n)e[r++]=e[n]<60?lr[e[n]]:64*(e[n]-60)+e[++n];return e.buffer.slice(0,r)}(t),{});return await e.instance.exports.__wasm_call_ctors(),e.instance}()),mr}function br(t,e,r,n,s,i,o){const a=t.exports.sbrk,c=n+3&-4,u=a(c*s),A=a(i.length),h=new Uint8Array(t.exports.memory.buffer);h.set(i,A);const B=e(u,n,s,A,i.length);if(0===B&&o&&o(u,c,s),r.set(h.subarray(u,u+n*s)),a(u-a(0)),0!==B)throw new Error("Malformed buffer data: "+B)}const gr="EXT_meshopt_compression";function yr(t){if(new hr(t).getRequiredExtensions().includes("EXT_meshopt_compression")&&!Br)throw new Error("gltf: Required extension EXT_meshopt_compression not supported by browser")}async function pr(t,e){var r;const n=new hr(t);if(null==e||null===(r=e.gltf)||void 0===r||!r.decompressMeshes)return;const s=[];for(const e of t.json.bufferViews||[])s.push(Ir(n,e));await Promise.all(s),n.removeExtension("EXT_meshopt_compression")}async function Ir(t,e){const r=t.getObjectExtension(e,"EXT_meshopt_compression");if(r){const t=e.buffer,{byteOffset:n=0,byteLength:s=0,byteStride:i,count:o,mode:a,filter:c="NONE"}=r,u=new Uint8Array(t,n,s),A=new ArrayBuffer(o*i);return await async function(t,e,r,n,s,i="NONE"){const o=await Er();br(o,o.exports[Cr[s]],t,e,r,n,o.exports[dr[i||"NONE"]])}(new Uint8Array(A),o,i,u,a,c),A}return null}const Tr=["image/png","image/jpeg","image/gif"],Mr={};function Gr(t){return void 0===Mr[t]&&(Mr[t]=function(t){switch(t){case"image/webp":return function(){if(!Ge.a)return!1;try{return 0===document.createElement("canvas").toDataURL("image/webp").indexOf("data:image/webp")}catch{return!1}}();case"image/svg":return Ge.a;default:if(!Ge.a){const{_parseImageNode:e}=globalThis;return Boolean(e)&&Tr.includes(t)}return!0}}(t)),Mr[t]}const Fr="EXT_texture_webp";function Dr(t,e){const r=new hr(t);if(!Gr("image/webp")){if(r.getRequiredExtensions().includes("EXT_texture_webp"))throw new Error("gltf: Required extension EXT_texture_webp not supported by browser");return}const{json:n}=r;for(const t of n.textures||[]){const e=r.getObjectExtension(t,"EXT_texture_webp");e&&(t.source=e.source),r.removeObjectExtension(t,"EXT_texture_webp")}r.removeExtension("EXT_texture_webp")}const Or="KHR_texture_basisu";function Rr(t,e){const r=new hr(t),{json:n}=r;for(const t of n.textures||[]){const e=r.getObjectExtension(t,"KHR_texture_basisu");e&&(t.source=e.source),r.removeObjectExtension(t,"KHR_texture_basisu")}r.removeExtension("KHR_texture_basisu")}function _r(t){const{buffer:e,size:r,count:n}=function(t){let e=t,r=1,n=0;t&&t.value&&(e=t.value,r=t.size||1);e&&(ArrayBuffer.isView(e)||(e=function(t,e,r=!1){if(!t)return null;if(Array.isArray(t))return new e(t);if(r&&!(t instanceof e))return new e(t);return t}(e,Float32Array)),n=e.length/r);return{buffer:e,size:r,count:n}}(t);return{value:e,size:r,byteOffset:0,count:n,type:or(r),componentType:ar(e)}}const Sr="KHR_draco_mesh_compression";function wr(t,e,r){const n=new hr(t);for(const t of Pr(n))n.getObjectExtension(t,"KHR_draco_mesh_compression")}async function Hr(t,e,r){var n;if(null==e||null===(n=e.gltf)||void 0===n||!n.decompressMeshes)return;const s=new hr(t),i=[];for(const t of Pr(s))s.getObjectExtension(t,"KHR_draco_mesh_compression")&&i.push(Ur(s,t,e,r));await Promise.all(i),s.removeExtension("KHR_draco_mesh_compression")}function Lr(t,e={}){const r=new hr(t);for(const t of r.json.meshes||[])Jr(t,e),r.addRequiredExtension("KHR_draco_mesh_compression")}async function Ur(t,e,r,n){const s=t.getObjectExtension(e,"KHR_draco_mesh_compression");if(!s)return;const i=t.getTypedArrayForBufferView(s.bufferView),o=Ve(i.buffer,i.byteOffset),{parse:a}=n,c={...r};delete c["3d-tiles"];const u=await a(o,lt,c,n),A=function(t){const e={};for(const r in t){const n=t[r];if("indices"!==r){const t=_r(n);e[r]=t}}return e}(u.attributes);for(const[r,n]of Object.entries(A))if(r in e.attributes){const s=e.attributes[r],i=t.getAccessor(s);null!=i&&i.min&&null!=i&&i.max&&(n.min=i.min,n.max=i.max)}e.attributes=A,u.indices&&(e.indices=_r(u.indices)),function(t){if(!t.attributes&&Object.keys(t.attributes).length>0)throw new Error("glTF: Empty primitive detected: Draco decompression failure?")}(e)}function Jr(t,e,r=4,n,s){var i;if(!n.DracoWriter)throw new Error("options.gltf.DracoWriter not provided");const o=n.DracoWriter.encodeSync({attributes:t}),a=null==s||null===(i=s.parseSync)||void 0===i?void 0:i.call(s,{attributes:t}),c=n._addFauxAttributes(a.attributes);return{primitives:[{attributes:c,mode:r,extensions:{KHR_draco_mesh_compression:{bufferView:n.addBufferView(o),attributes:c}}}]}}function*Pr(t){for(const e of t.json.meshes||[])for(const t of e.primitives)yield t}const Nr="KHR_lights_punctual";async function vr(t){const e=new hr(t),{json:r}=e,n=e.getExtension("KHR_lights_punctual");n&&(e.json.lights=n.lights,e.removeExtension("KHR_lights_punctual"));for(const t of r.nodes||[]){const r=e.getObjectExtension(t,"KHR_lights_punctual");r&&(t.light=r.light),e.removeObjectExtension(t,"KHR_lights_punctual")}}async function xr(t){const e=new hr(t),{json:r}=e;if(r.lights){const t=e.addExtension("KHR_lights_punctual");We(!t.lights),t.lights=r.lights,delete r.lights}if(e.json.lights){for(const t of e.json.lights){const r=t.node;e.addObjectExtension(r,"KHR_lights_punctual",t)}delete e.json.lights}}const jr="KHR_materials_unlit";async function Kr(t){const e=new hr(t),{json:r}=e;e.removeExtension("KHR_materials_unlit");for(const t of r.materials||[]){t.extensions&&t.extensions.KHR_materials_unlit&&(t.unlit=!0),e.removeObjectExtension(t,"KHR_materials_unlit")}}function Qr(t){const e=new hr(t),{json:r}=e;if(e.materials)for(const t of r.materials||[])t.unlit&&(delete t.unlit,e.addObjectExtension(t,"KHR_materials_unlit",{}),e.addExtension("KHR_materials_unlit"))}const Xr="KHR_techniques_webgl";async function kr(t){const e=new hr(t),{json:r}=e,n=e.getExtension("KHR_techniques_webgl");if(n){const t=function(t,e){const{programs:r=[],shaders:n=[],techniques:s=[]}=t,i=new TextDecoder;return n.forEach(t=>{if(!Number.isFinite(t.bufferView))throw new Error("KHR_techniques_webgl: no shader code");t.code=i.decode(e.getTypedArrayForBufferView(t.bufferView))}),r.forEach(t=>{t.fragmentShader=n[t.fragmentShader],t.vertexShader=n[t.vertexShader]}),s.forEach(t=>{t.program=r[t.program]}),s}(n,e);for(const n of r.materials||[]){const r=e.getObjectExtension(n,"KHR_techniques_webgl");r&&(n.technique=Object.assign({},r,t[r.technique]),n.technique.values=Vr(n.technique,e)),e.removeObjectExtension(n,"KHR_techniques_webgl")}e.removeExtension("KHR_techniques_webgl")}}async function Yr(t,e){}function Vr(t,e){const r=Object.assign({},t.values);return Object.keys(t.uniforms||{}).forEach(e=>{t.uniforms[e].value&&!(e in r)&&(r[e]=t.uniforms[e].value)}),Object.keys(r).forEach(t=>{"object"==typeof r[t]&&void 0!==r[t].index&&(r[t].texture=e.getTexture(r[t].index))}),r}const Wr=[s,i,o,a,c,u,A];function Zr(t,e){var r;const n=(null==e||null===(r=e.gltf)||void 0===r?void 0:r.excludeExtensions)||{};return!(t in n&&!n[t])}const qr={accessors:"accessor",animations:"animation",buffers:"buffer",bufferViews:"bufferView",images:"image",materials:"material",meshes:"mesh",nodes:"node",samplers:"sampler",scenes:"scene",skins:"skin",textures:"texture"},zr={accessor:"accessors",animations:"animation",buffer:"buffers",bufferView:"bufferViews",image:"images",material:"materials",mesh:"meshes",node:"nodes",sampler:"samplers",scene:"scenes",skin:"skins",texture:"textures"};class $r{constructor(t){this.idToIndexMap={animations:{},accessors:{},buffers:{},bufferViews:{},images:{},materials:{},meshes:{},nodes:{},samplers:{},scenes:{},skins:{},textures:{}}}normalize(t,e){this.json=t.json;const r=t.json;switch(r.asset&&r.asset.version){case"2.0":return;case void 0:case"1.0":break;default:return void console.warn("glTF: Unknown version "+r.asset.version)}if(!e.normalize)throw new Error("glTF v1 is not supported.");console.warn("Converting glTF v1 to glTF v2 format. This is experimental and may fail."),this._addAsset(r),this._convertTopLevelObjectsToArrays(r),function(t){const e=new hr(t),{json:r}=e;for(const t of r.images||[]){const r=e.getObjectExtension(t,"KHR_binary_glTF");r&&Object.assign(t,r),e.removeObjectExtension(t,"KHR_binary_glTF")}r.buffers&&r.buffers[0]&&delete r.buffers[0].uri,e.removeExtension("KHR_binary_glTF")}(t),this._convertObjectIdsToArrayIndices(r),this._updateObjects(r),this._updateMaterial(r)}_addAsset(t){t.asset=t.asset||{},t.asset.version="2.0",t.asset.generator=t.asset.generator||"Normalized to glTF 2.0 by loaders.gl"}_convertTopLevelObjectsToArrays(t){for(const e in qr)this._convertTopLevelObjectToArray(t,e)}_convertTopLevelObjectToArray(t,e){const r=t[e];if(r&&!Array.isArray(r)){t[e]=[];for(const n in r){const s=r[n];s.id=s.id||n;const i=t[e].length;t[e].push(s),this.idToIndexMap[e][n]=i}}}_convertObjectIdsToArrayIndices(t){for(const e in qr)this._convertIdsToIndices(t,e);"scene"in t&&(t.scene=this._convertIdToIndex(t.scene,"scene"));for(const e of t.textures)this._convertTextureIds(e);for(const e of t.meshes)this._convertMeshIds(e);for(const e of t.nodes)this._convertNodeIds(e);for(const e of t.scenes)this._convertSceneIds(e)}_convertTextureIds(t){t.source&&(t.source=this._convertIdToIndex(t.source,"image"))}_convertMeshIds(t){for(const e of t.primitives){const{attributes:t,indices:r,material:n}=e;for(const e in t)t[e]=this._convertIdToIndex(t[e],"accessor");r&&(e.indices=this._convertIdToIndex(r,"accessor")),n&&(e.material=this._convertIdToIndex(n,"material"))}}_convertNodeIds(t){t.children&&(t.children=t.children.map(t=>this._convertIdToIndex(t,"node"))),t.meshes&&(t.meshes=t.meshes.map(t=>this._convertIdToIndex(t,"mesh")))}_convertSceneIds(t){t.nodes&&(t.nodes=t.nodes.map(t=>this._convertIdToIndex(t,"node")))}_convertIdsToIndices(t,e){t[e]||(console.warn("gltf v1: json doesn't contain attribute "+e),t[e]=[]);for(const r of t[e])for(const t in r){const e=r[t],n=this._convertIdToIndex(e,t);r[t]=n}}_convertIdToIndex(t,e){const r=zr[e];if(r in this.idToIndexMap){const n=this.idToIndexMap[r][t];if(!Number.isFinite(n))throw new Error(`gltf v1: failed to resolve ${e} with id ${t}`);return n}return t}_updateObjects(t){for(const t of this.json.buffers)delete t.type}_updateMaterial(t){for(const e of t.materials){e.pbrMetallicRoughness={baseColorFactor:[1,1,1,1],metallicFactor:1,roughnessFactor:1};const r=e.values&&e.values.tex,n=t.textures.findIndex(t=>t.id===r);-1!==n&&(e.pbrMetallicRoughness.baseColorTexture={index:n})}}}const tn={SCALAR:1,VEC2:2,VEC3:3,VEC4:4,MAT2:4,MAT3:9,MAT4:16},en={5120:1,5121:1,5122:2,5123:2,5125:4,5126:4},rn={TEXTURE_MAG_FILTER:10240,TEXTURE_MIN_FILTER:10241,TEXTURE_WRAP_S:10242,TEXTURE_WRAP_T:10243,REPEAT:10497,LINEAR:9729,NEAREST_MIPMAP_LINEAR:9986},nn={magFilter:rn.TEXTURE_MAG_FILTER,minFilter:rn.TEXTURE_MIN_FILTER,wrapS:rn.TEXTURE_WRAP_S,wrapT:rn.TEXTURE_WRAP_T},sn={[rn.TEXTURE_MAG_FILTER]:rn.LINEAR,[rn.TEXTURE_MIN_FILTER]:rn.NEAREST_MIPMAP_LINEAR,[rn.TEXTURE_WRAP_S]:rn.REPEAT,[rn.TEXTURE_WRAP_]:rn.REPEAT};class on{postProcess(t,e={}){const{json:r,buffers:n=[],images:s=[],baseUri:i=""}=t;return We(r),this.baseUri=i,this.json=r,this.buffers=n,this.images=s,this._resolveTree(this.json,e),this.json}_resolveTree(t,e={}){t.bufferViews&&(t.bufferViews=t.bufferViews.map((t,e)=>this._resolveBufferView(t,e))),t.images&&(t.images=t.images.map((t,e)=>this._resolveImage(t,e))),t.samplers&&(t.samplers=t.samplers.map((t,e)=>this._resolveSampler(t,e))),t.textures&&(t.textures=t.textures.map((t,e)=>this._resolveTexture(t,e))),t.accessors&&(t.accessors=t.accessors.map((t,e)=>this._resolveAccessor(t,e))),t.materials&&(t.materials=t.materials.map((t,e)=>this._resolveMaterial(t,e))),t.meshes&&(t.meshes=t.meshes.map((t,e)=>this._resolveMesh(t,e))),t.nodes&&(t.nodes=t.nodes.map((t,e)=>this._resolveNode(t,e))),t.skins&&(t.skins=t.skins.map((t,e)=>this._resolveSkin(t,e))),t.scenes&&(t.scenes=t.scenes.map((t,e)=>this._resolveScene(t,e))),void 0!==t.scene&&(t.scene=t.scenes[this.json.scene])}getScene(t){return this._get("scenes",t)}getNode(t){return this._get("nodes",t)}getSkin(t){return this._get("skins",t)}getMesh(t){return this._get("meshes",t)}getMaterial(t){return this._get("materials",t)}getAccessor(t){return this._get("accessors",t)}getCamera(t){return null}getTexture(t){return this._get("textures",t)}getSampler(t){return this._get("samplers",t)}getImage(t){return this._get("images",t)}getBufferView(t){return this._get("bufferViews",t)}getBuffer(t){return this._get("buffers",t)}_get(t,e){if("object"==typeof e)return e;const r=this.json[t]&&this.json[t][e];return r||console.warn(`glTF file error: Could not find ${t}[${e}]`),r}_resolveScene(t,e){return t.id=t.id||"scene-"+e,t.nodes=(t.nodes||[]).map(t=>this.getNode(t)),t}_resolveNode(t,e){return t.id=t.id||"node-"+e,t.children&&(t.children=t.children.map(t=>this.getNode(t))),void 0!==t.mesh?t.mesh=this.getMesh(t.mesh):void 0!==t.meshes&&t.meshes.length&&(t.mesh=t.meshes.reduce((t,e)=>{const r=this.getMesh(e);return t.id=r.id,t.primitives=t.primitives.concat(r.primitives),t},{primitives:[]})),void 0!==t.camera&&(t.camera=this.getCamera(t.camera)),void 0!==t.skin&&(t.skin=this.getSkin(t.skin)),t}_resolveSkin(t,e){return t.id=t.id||"skin-"+e,t.inverseBindMatrices=this.getAccessor(t.inverseBindMatrices),t}_resolveMesh(t,e){return t.id=t.id||"mesh-"+e,t.primitives&&(t.primitives=t.primitives.map(t=>{const e=(t={...t}).attributes;t.attributes={};for(const r in e)t.attributes[r]=this.getAccessor(e[r]);return void 0!==t.indices&&(t.indices=this.getAccessor(t.indices)),void 0!==t.material&&(t.material=this.getMaterial(t.material)),t})),t}_resolveMaterial(t,e){if(t.id=t.id||"material-"+e,t.normalTexture&&(t.normalTexture={...t.normalTexture},t.normalTexture.texture=this.getTexture(t.normalTexture.index)),t.occlusionTexture&&(t.occlustionTexture={...t.occlustionTexture},t.occlusionTexture.texture=this.getTexture(t.occlusionTexture.index)),t.emissiveTexture&&(t.emmisiveTexture={...t.emmisiveTexture},t.emissiveTexture.texture=this.getTexture(t.emissiveTexture.index)),t.emissiveFactor||(t.emissiveFactor=t.emmisiveTexture?[1,1,1]:[0,0,0]),t.pbrMetallicRoughness){t.pbrMetallicRoughness={...t.pbrMetallicRoughness};const e=t.pbrMetallicRoughness;e.baseColorTexture&&(e.baseColorTexture={...e.baseColorTexture},e.baseColorTexture.texture=this.getTexture(e.baseColorTexture.index)),e.metallicRoughnessTexture&&(e.metallicRoughnessTexture={...e.metallicRoughnessTexture},e.metallicRoughnessTexture.texture=this.getTexture(e.metallicRoughnessTexture.index))}return t}_resolveAccessor(t,e){var r,n;if(t.id=t.id||"accessor-"+e,void 0!==t.bufferView&&(t.bufferView=this.getBufferView(t.bufferView)),t.bytesPerComponent=(r=t.componentType,en[r]),t.components=(n=t.type,tn[n]),t.bytesPerElement=t.bytesPerComponent*t.components,t.bufferView){const e=t.bufferView.buffer,{ArrayType:r,byteLength:n}=cr(t,t.bufferView),s=(t.bufferView.byteOffset||0)+(t.byteOffset||0)+e.byteOffset,i=e.arrayBuffer.slice(s,s+n);t.value=new r(i)}return t}_resolveTexture(t,e){return t.id=t.id||"texture-"+e,t.sampler="sampler"in t?this.getSampler(t.sampler):sn,t.source=this.getImage(t.source),t}_resolveSampler(t,e){t.id=t.id||"sampler-"+e,t.parameters={};for(const e in t){const r=this._enumSamplerParameter(e);void 0!==r&&(t.parameters[r]=t[e])}return t}_enumSamplerParameter(t){return nn[t]}_resolveImage(t,e){t.id=t.id||"image-"+e,void 0!==t.bufferView&&(t.bufferView=this.getBufferView(t.bufferView));const r=this.images[e];return r&&(t.image=r),t}_resolveBufferView(t,e){t.id=t.id||"bufferView-"+e;const r=t.buffer;t.buffer=this.buffers[r];const n=this.buffers[r].arrayBuffer;let s=this.buffers[r].byteOffset||0;return"byteOffset"in t&&(s+=t.byteOffset),t.data=new Uint8Array(n,s,t.byteLength),t}_resolveCamera(t,e){return t.id=t.id||"camera-"+e,t.perspective,t.orthographic,t}}const an=1735152710;function cn(t,e=0,r={}){const n=new DataView(t),{magic:s=an}=r,i=n.getUint32(e,!1);return i===s||i===an}function un(t,e,r=0,n={}){const s=new DataView(e),i=function(t,e=0){return`${String.fromCharCode(t.getUint8(e+0))}${String.fromCharCode(t.getUint8(e+1))}${String.fromCharCode(t.getUint8(e+2))}${String.fromCharCode(t.getUint8(e+3))}`}(s,r+0),o=s.getUint32(r+4,!0),a=s.getUint32(r+8,!0);switch(Object.assign(t,{header:{byteOffset:r,byteLength:a,hasBinChunk:!1},type:i,version:o,json:{},binChunks:[]}),r+=12,t.version){case 1:return function(t,e,r){I(t.header.byteLength>20);const n=e.getUint32(r+0,!0),s=e.getUint32(r+4,!0);return r+=8,I(0===s),An(t,e,r,n),r+=n,r+=hn(t,e,r,t.header.byteLength)}(t,s,r);case 2:return function(t,e,r,n){return I(t.header.byteLength>20),function(t,e,r,n){for(;r+8<=t.header.byteLength;){const s=e.getUint32(r+0,!0),i=e.getUint32(r+4,!0);switch(r+=8,i){case 1313821514:An(t,e,r,s);break;case 5130562:hn(t,e,r,s);break;case 0:n.strict||An(t,e,r,s);break;case 1:n.strict||hn(t,e,r,s)}r+=ze(s,4)}}(t,e,r,n),r+t.header.byteLength}(t,s,r,{});default:throw new Error(`Invalid GLB version ${t.version}. Only supports v1 and v2.`)}}function An(t,e,r,n){const s=new Uint8Array(e.buffer,r,n),i=new TextDecoder("utf8").decode(s);return t.json=JSON.parse(i),ze(n,4)}function hn(t,e,r,n){return t.header.hasBinChunk=!0,t.binChunks.push({byteOffset:r,byteLength:n,arrayBuffer:e.buffer}),ze(n,4)}async function Bn(t,e,r=0,n,s){var i,o,a,c;!function(t,e,r,n){n.uri&&(t.baseUri=n.uri);if(e instanceof ArrayBuffer&&!cn(e,r,n)){const t=new TextDecoder;e=t.decode(e)}if("string"==typeof e)t.json=Ye(e);else if(e instanceof ArrayBuffer){const s={};r=un(s,e,r,n.glb),We("glTF"===s.type,"Invalid GLB magic string "+s.type),t._glb=s,t.json=s.json}else We(!1,"GLTF: must be ArrayBuffer or string");const s=t.json.buffers||[];if(t.buffers=new Array(s.length).fill(null),t._glb&&t._glb.header.hasBinChunk){const{binChunks:e}=t._glb;t.buffers[0]={arrayBuffer:e[0].arrayBuffer,byteOffset:e[0].byteOffset,byteLength:e[0].byteLength}}const i=t.json.images||[];t.images=new Array(i.length).fill({})}(t,e,r,n),function(t,e={}){(new $r).normalize(t,e)}(t,{normalize:null==n||null===(i=n.gltf)||void 0===i?void 0:i.normalize}),function(t,e={},r){const n=Wr.filter(t=>Zr(t.name,e));for(const i of n){var s;null===(s=i.preprocess)||void 0===s||s.call(i,t,e,r)}}(t,n,s);const u=[];if(null!=n&&null!==(o=n.gltf)&&void 0!==o&&o.loadBuffers&&t.json.buffers&&await async function(t,e,r){const n=t.json.buffers||[];for(let o=0;o<n.length;++o){const a=n[o];if(a.uri){var s,i;const{fetch:n}=r;We(n);const c=Ze(a.uri,e),u=await(null==r||null===(s=r.fetch)||void 0===s?void 0:s.call(r,c)),A=await(null==u||null===(i=u.arrayBuffer)||void 0===i?void 0:i.call(u));t.buffers[o]={arrayBuffer:A,byteOffset:0,byteLength:A.byteLength},delete a.uri}}}(t,n,s),null!=n&&null!==(a=n.gltf)&&void 0!==a&&a.loadImages){const e=async function(t,e,r){const n=function(t){const e=new Set,r=t.json.textures||[];for(const t of r)void 0!==t.source&&e.add(t.source);return Array.from(e).sort()}(t),s=t.json.images||[],i=[];for(const o of n)i.push(fn(t,s[o],o,e,r));return await Promise.all(i)}(t,n,s);u.push(e)}const A=async function(t,e={},r){const n=Wr.filter(t=>Zr(t.name,e));for(const i of n){var s;await(null===(s=i.decode)||void 0===s?void 0:s.call(i,t,e,r))}}(t,n,s);return u.push(A),await Promise.all(u),null!=n&&null!==(c=n.gltf)&&void 0!==c&&c.postProcess?function(t,e){return(new on).postProcess(t,e)}(t,n):t}async function fn(t,e,r,n,s){const{fetch:i,parse:o}=s;let a;if(e.uri){const t=Ze(e.uri,n),r=await i(t);a=await r.arrayBuffer()}if(Number.isFinite(e.bufferView)){const r=qe(t.json,t.buffers,e.bufferView);a=Ve(r.buffer,r.byteOffset,r.byteLength)}We(a,"glTF image has no data");let c=await o(a,[Xe,Me],{mimeType:e.mimeType,basis:{format:Ie()}},s);c&&c[0]&&(c={compressed:!0,mipmaps:!1,width:c[0].width,height:c[0].height,data:c}),t.images=t.images||[],t.images[r]=c}const ln={name:"glTF",id:"gltf",module:"gltf",version:"3.1.0-alpha.5",extensions:["gltf","glb"],mimeTypes:["model/gltf+json","model/gltf-binary"],text:!0,binary:!0,tests:["glTF"],parse:async function(t,e={},r){(e={...ln.options,...e}).gltf={...ln.options.gltf,...e.gltf};const{byteOffset:n=0}=e;return await Bn({},t,n,e,r)},options:{gltf:{normalize:!0,loadBuffers:!0,loadImages:!0,decompressMeshes:!0,postProcess:!0},log:console},deprecatedOptions:{fetchImages:"gltf.loadImages",createImages:"gltf.loadImages",decompress:"gltf.decompressMeshes",postProcess:"gltf.postProcess",gltf:{decompress:"gltf.decompressMeshes"}}};const dn=0,Cn=1;function mn(t,e,r,n){t.rotateYtoZ=!0;const s=t.byteOffset+t.byteLength-r;if(0===s)throw new Error("glTF byte length must be greater than 0.");return t.gltfUpAxis=n["3d-tiles"]&&n["3d-tiles"].assetGltfUpAxis?n["3d-tiles"].assetGltfUpAxis:"Y",t.gltfArrayBuffer=Ve(e,r,s),t.gltfByteOffset=0,t.gltfByteLength=s,r%4==0||console.warn(t.type+": embedded glb is not aligned to a 4-byte boundary."),t.byteOffset+t.byteLength}async function En(t,e,r,n){const s=r["3d-tiles"]||{};if(function(t,e,r){switch(e){case dn:const e=new Uint8Array(t.gltfArrayBuffer,t.gltfByteOffset),r=(new TextDecoder).decode(e);t.gltfUrl=r.replace(/[\s\0]+$/,""),delete t.gltfArrayBuffer,delete t.gltfByteOffset,delete t.gltfByteLength;break;case Cn:break;default:throw new Error("b3dm: Illegal glTF format field")}}(t,e),s.loadGLTF){const{parse:e,fetch:s}=n;t.gltfUrl&&(t.gltfArrayBuffer=await s(t.gltfUrl,r),t.gltfByteOffset=0),t.gltfArrayBuffer&&(t.gltf=await e(t.gltfArrayBuffer,ln,r,n),delete t.gltfArrayBuffer,delete t.gltfByteOffset,delete t.gltfByteLength)}}async function bn(t,e,r,n,s){var i;r=function(t,e,r,n,s){r=wt(t,e,r),r=Ht(t,e,r),r=Lt(t,e,r),r=mn(t,e,r,n);const i=new yt(t.featureTableJson,t.featureTableBinary);return t.rtcCenter=i.getGlobalProperty("RTC_CENTER",Ct.FLOAT,3),r}(t,e,r,n),await En(t,Cn,n,s);const o=null==t||null===(i=t.gltf)||void 0===i?void 0:i.extensions;return o&&o.CESIUM_RTC&&(t.rtcCenter=o.CESIUM_RTC.center),r}var gn=r(46),yn=r(47),pn=r(45),In=r(6),Tn=r(2);Math.max(6378137,6378137,6356752.314245179);const Mn=t=>t,Gn=new mt.a;function Fn(t,e,r=Mn){return Object(Nt.e)(t)?(e[0]=r(t[0]),e[1]=r(t[1]),e[2]=t[2]):"longitude"in t?(e[0]=r(t.longitude),e[1]=r(t.latitude),e[2]=t.height):(e[0]=r(t.x),e[1]=r(t.y),e[2]=t.z),e}function Dn(t,e,r=Mn){return Object(Nt.e)(e)?(e[0]=r(t[0]),e[1]=r(t[1]),e[2]=t[2]):"longitude"in e?(e.longitude=r(t[0]),e.latitude=r(t[1]),e.height=t[2]):(e.x=r(t[0]),e.y=r(t[1]),e.z=t[2]),e}const On=new mt.a,Rn=new mt.a,_n=new mt.a;const Sn=new mt.a,wn={up:{south:"east",north:"west",west:"south",east:"north"},down:{south:"west",north:"east",west:"north",east:"south"},south:{up:"west",down:"east",west:"down",east:"up"},north:{up:"east",down:"west",west:"up",east:"down"},west:{up:"north",down:"south",north:"down",south:"up"},east:{up:"south",down:"north",north:"up",south:"down"}},Hn={north:[-1,0,0],east:[0,1,0],up:[0,0,1],south:[1,0,0],west:[0,-1,0],down:[0,0,-1]},Ln={east:new mt.a,north:new mt.a,up:new mt.a,west:new mt.a,south:new mt.a,down:new mt.a},Un=new mt.a,Jn=new mt.a,Pn=new mt.a;function Nn(t,e,r,n,s,i){const o=wn[e]&&wn[e][r];let a,c,u;Object(In.a)(o&&(!n||n===o));const A=Sn.copy(s);if(Object(Nt.c)(A.x,0,1e-14)&&Object(Nt.c)(A.y,0,1e-14)){const t=Math.sign(A.z);a=Un.fromArray(Hn[e]),"east"!==e&&"west"!==e&&a.scale(t),c=Jn.fromArray(Hn[r]),"east"!==r&&"west"!==r&&c.scale(t),u=Pn.fromArray(Hn[n]),"east"!==n&&"west"!==n&&u.scale(t)}else{const{up:s,east:i,north:o}=Ln;i.set(-A.y,A.x,0).normalize(),t.geodeticSurfaceNormal(A,s),o.copy(s).cross(i);const{down:h,west:B,south:f}=Ln;h.copy(s).scale(-1),B.copy(i).scale(-1),f.copy(o).scale(-1),a=Ln[e],c=Ln[r],u=Ln[n]}return i[0]=a.x,i[1]=a.y,i[2]=a.z,i[3]=0,i[4]=c.x,i[5]=c.y,i[6]=c.z,i[7]=0,i[8]=u.x,i[9]=u.y,i[10]=u.z,i[11]=0,i[12]=A.x,i[13]=A.y,i[14]=A.z,i[15]=1,i}const vn=new mt.a,xn=new mt.a,jn=new mt.a,Kn=new mt.a,Qn=new mt.a,Xn=new mt.a;let kn;class Yn{static get WGS84(){return kn=kn||new Yn(6378137,6378137,6356752.314245179),kn}constructor(t=0,e=0,r=0){Object(In.a)(t>=0),Object(In.a)(e>=0),Object(In.a)(r>=0),this.radii=new mt.a(t,e,r),this.radiiSquared=new mt.a(t*t,e*e,r*r),this.radiiToTheFourth=new mt.a(t*t*t*t,e*e*e*e,r*r*r*r),this.oneOverRadii=new mt.a(0===t?0:1/t,0===e?0:1/e,0===r?0:1/r),this.oneOverRadiiSquared=new mt.a(0===t?0:1/(t*t),0===e?0:1/(e*e),0===r?0:1/(r*r)),this.minimumRadius=Math.min(t,e,r),this.maximumRadius=Math.max(t,e,r),this.centerToleranceSquared=Qt.a.EPSILON1,0!==this.radiiSquared.z&&(this.squaredXOverSquaredZ=this.radiiSquared.x/this.radiiSquared.z),Object.freeze(this)}equals(t){return this===t||Boolean(t&&this.radii.equals(t.radii))}toString(){return this.radii.toString()}cartographicToCartesian(t,e=[0,0,0]){const r=xn,n=jn,[,,s]=t;this.geodeticSurfaceNormalCartographic(t,r),n.copy(this.radiiSquared).scale(r);const i=Math.sqrt(r.dot(n));return n.scale(1/i),r.scale(s),n.add(r),n.to(e)}cartesianToCartographic(t,e=[0,0,0]){Xn.from(t);const r=this.scaleToGeodeticSurface(Xn,Kn);if(!r)return;const n=this.geodeticSurfaceNormal(r,xn),s=Qn;s.copy(Xn).subtract(r);const i=Math.atan2(n.y,n.x),o=Math.asin(n.z),a=Math.sign(Tn.d(s,Xn))*Tn.g(s);return Dn([i,o,a],e,Nt.b._cartographicRadians?Mn:Nt.f)}eastNorthUpToFixedFrame(t,e=new pn.a){return Nn(this,"east","north","up",t,e)}localFrameToFixedFrame(t,e,r,n,s=new pn.a){return Nn(this,t,e,r,n,s)}geocentricSurfaceNormal(t,e=[0,0,0]){return vn.from(t).normalize().to(e)}geodeticSurfaceNormalCartographic(t,e=[0,0,0]){const r=function(t,e=Gn){return Fn(t,e,Nt.b._cartographicRadians?Mn:Nt.g)}(t),n=r[0],s=r[1],i=Math.cos(s);return vn.set(i*Math.cos(n),i*Math.sin(n),Math.sin(s)).normalize(),vn.to(e)}geodeticSurfaceNormal(t,e=[0,0,0]){return vn.from(t).scale(this.oneOverRadiiSquared).normalize().to(e)}scaleToGeodeticSurface(t,e){return function(t,e,r=new mt.a){const{oneOverRadii:n,oneOverRadiiSquared:s,centerToleranceSquared:i}=e;On.from(t);const o=t.x,a=t.y,c=t.z,u=n.x,A=n.y,h=n.z,B=o*o*u*u,f=a*a*A*A,l=c*c*h*h,d=B+f+l,C=Math.sqrt(1/d);if(!Number.isFinite(C))return;const m=Rn;if(m.copy(t).scale(C),d<i)return m.to(r);const E=s.x,b=s.y,g=s.z,y=_n;y.set(m.x*E*2,m.y*b*2,m.z*g*2);let p,I,T,M,G=(1-C)*t.len()/(.5*y.len()),F=0;do{G-=F,p=1/(1+G*E),I=1/(1+G*b),T=1/(1+G*g);const t=p*p,e=I*I,r=T*T;M=B*t+f*e+l*r-1;F=M/(-2*(B*(t*p)*E+f*(e*I)*b+l*(r*T)*g))}while(Math.abs(M)>Qt.a.EPSILON12);return On.scale([p,I,T]).to(r)}(t,this,e)}scaleToGeocentricSurface(t,e=[0,0,0]){Kn.from(t);const r=Kn.x,n=Kn.y,s=Kn.z,i=this.oneOverRadiiSquared,o=1/Math.sqrt(r*r*i.x+n*n*i.y+s*s*i.z);return Kn.multiplyScalar(o).to(e)}transformPositionToScaledSpace(t,e=[0,0,0]){return Kn.from(t).scale(this.oneOverRadii).to(e)}transformPositionFromScaledSpace(t,e=[0,0,0]){return Kn.from(t).scale(this.radii).to(e)}getSurfaceNormalIntersectionWithZAxis(t,e=0,r=[0,0,0]){Object(In.a)(Object(Nt.c)(this.radii.x,this.radii.y,Qt.a.EPSILON15)),Object(In.a)(this.radii.z>0),Kn.from(t);const n=Kn.z*(1-this.squaredXOverSquaredZ);if(!(Math.abs(n)>=this.radii.z-e))return Kn.set(0,0,n).to(r)}}async function Vn(t,e,r,n,s){return r=function(t,e,r,n,s){if(r=wt(t,e,r),1!==t.version)throw new Error(`Instanced 3D Model version ${t.version} is not supported`);r=Ht(t,e,r);const i=new DataView(e);if(t.gltfFormat=i.getUint32(r,!0),r=Lt(t,e,r+=4),r=mn(t,e,r,n),0===t.featureTableJsonByteLength)throw new Error("i3dm parser: featureTableJsonByteLength is zero.");const o=new yt(t.featureTableJson,t.featureTableBinary),a=o.getGlobalProperty("INSTANCES_LENGTH");if(o.featuresLength=a,!Number.isFinite(a))throw new Error("i3dm parser: INSTANCES_LENGTH must be defined");t.eastNorthUp=o.getGlobalProperty("EAST_NORTH_UP"),t.rtcCenter=o.getGlobalProperty("RTC_CENTER",Ct.FLOAT,3);new St(t.batchTableJson,t.batchTableBinary,a);return function(t,e,r,n){const s=[new Array(n),t._batchTable][0],i=new mt.a,o=new mt.a,a=new mt.a,c=new mt.a,u=new gn.a,A=new yn.a,h=new mt.a,B={},f=new pn.a,l=[],d=[],C=new mt.a,m=new mt.a;for(let r=0;r<n;r++){let n;if(e.hasProperty("POSITION"))n=e.getProperty("POSITION",Ct.FLOAT,3,r,i);else if(e.hasProperty("POSITION_QUANTIZED")){n=e.getProperty("POSITION_QUANTIZED",Ct.UNSIGNED_SHORT,3,r,i);const t=e.getGlobalProperty("QUANTIZED_VOLUME_OFFSET",Ct.FLOAT,3,C);if(!t)throw new Error("i3dm parser: QUANTIZED_VOLUME_OFFSET must be defined for quantized positions.");const s=e.getGlobalProperty("QUANTIZED_VOLUME_SCALE",Ct.FLOAT,3,m);if(!s)throw new Error("i3dm parser: QUANTIZED_VOLUME_SCALE must be defined for quantized positions.");const o=65535;for(let e=0;e<3;e++)n[e]=n[e]/o*s[e]+t[e]}if(!n)throw new Error("i3dm: POSITION or POSITION_QUANTIZED must be defined for each instance.");i.copy(n),B.translation=i,t.normalUp=e.getProperty("NORMAL_UP",Ct.FLOAT,3,r,l),t.normalRight=e.getProperty("NORMAL_RIGHT",Ct.FLOAT,3,r,d);const E=!1;if(t.normalUp){if(!t.normalRight)throw new Error("i3dm: Custom orientation requires both NORMAL_UP and NORMAL_RIGHT.");t.hasCustomOrientation=!0}else{if(t.octNormalUp=e.getProperty("NORMAL_UP_OCT32P",Ct.UNSIGNED_SHORT,2,l),t.octNormalRight=e.getProperty("NORMAL_RIGHT_OCT32P",Ct.UNSIGNED_SHORT,2,d),t.octNormalUp){if(!t.octNormalRight)throw new Error("i3dm: oct-encoded orientation requires NORMAL_UP_OCT32P and NORMAL_RIGHT_OCT32P");throw new Error("i3dm: oct-encoded orientation not implemented")}t.eastNorthUp?(Yn.WGS84.eastNorthUpToFixedFrame(i,f),f.getRotationMatrix3(u)):u.identity()}E&&(c.copy(o).cross(a).normalize(),u.setColumn(0,o),u.setColumn(1,a),u.setColumn(2,c)),A.fromMatrix3(u),B.rotation=A,h.set(1,1,1);const b=e.getProperty("SCALE",Ct.FLOAT,1,r);Number.isFinite(b)&&h.multiplyByScalar(b);const g=e.getProperty("SCALE_NON_UNIFORM",Ct.FLOAT,3,r,l);g&&h.scale(g),B.scale=h;let y=e.getProperty("BATCH_ID",Ct.UNSIGNED_SHORT,1,r);void 0===y&&(y=r);const p=(new pn.a).fromQuaternion(B.rotation);f.identity(),f.translate(B.translation),f.multiplyRight(p),f.scale(B.scale);const I=f.clone();s[r]={modelMatrix:I,batchId:y}}t.instances=s}(t,o,0,a),r}(t,e,r,n),await En(t,t.gltfFormat,n,s),r}async function Wn(t,e=0,r,n,s={}){switch(s.byteOffset=e,s.type=function(t,e=0){const r=new DataView(t);return`${String.fromCharCode(r.getUint8(e+0))}${String.fromCharCode(r.getUint8(e+1))}${String.fromCharCode(r.getUint8(e+2))}${String.fromCharCode(r.getUint8(e+3))}`}(t,e),s.type){case y.COMPOSITE:return await async function(t,e,r,n,s,i){r=wt(t,e,r);const o=new DataView(e);for(t.tilesLength=o.getUint32(r,!0),r+=4,t.tiles=[];t.tiles.length<t.tilesLength&&t.byteLength-r>12;){const o={};t.tiles.push(o),r=await i(e,r,n,s,o)}return r}(s,t,e,r,n,Wn);case y.BATCHED_3D_MODEL:return await bn(s,t,e,r,n);case y.INSTANCED_3D_MODEL:return await Vn(s,t,e,r,n);case y.POINT_CLOUD:return await zt(s,t,e,r,n);default:throw new Error("3DTileLoader: unknown type "+s.type)}}function Zn(t,e){if(!t)return null;if(t.content){const r=t.content.uri||t.content.url;t.contentUrl=`${e.basePath}/${r}`}return t.id=t.contentUrl,t.lodMetricType=g,t.lodMetricValue=t.geometricError,t.transformMatrix=t.transform,t.type=function(t){if(!t.contentUrl)return C;const e=t.contentUrl.split(".").pop();switch(e){case"pnts":return E;case"i3dm":case"b3dm":return m;default:return e}}(t),t.refine=function(t){switch(t){case"REPLACE":case"replace":return d;case"ADD":case"add":return l;default:return t}}(t.refine),t}const qn={id:"3d-tiles",name:"3D Tiles",module:"3d-tiles",version:"3.1.0-alpha.5",extensions:["cmpt","pnts","b3dm","i3dm"],mimeTypes:["application/octet-stream"],tests:["cmpt","pnts","b3dm","i3dm"],parse:async function(t,e,r){const s=e["3d-tiles"]||{};let i;i="auto"===s.isTileset?r.url&&-1!==r.url.indexOf(".json"):s.isTileset;t=i?await async function(t,e,r){var s;const i=JSON.parse((new TextDecoder).decode(t));return i.loader=e.loader||qn,i.url=r.url,i.basePath=function(t){return n.dirname(t.url)}(i),i.root=function(t){const e=t.basePath,r=Zn(t.root,t),n=[];for(n.push(r);n.length>0;){const t=(n.pop()||{}).children||[];for(const r of t)Zn(r,{basePath:e}),n.push(r)}return r}(i),i.type=b,i.lodMetricType=g,i.lodMetricValue=(null===(s=i.root)||void 0===s?void 0:s.lodMetricValue)||0,i}(t,e,r):await async function(t,e,r){const n={content:{featureIds:null}};return await Wn(t,0,e,r,n.content),n.content}(t,e,r);return t},options:{"3d-tiles":{loadGLTF:!0,decodeQuantizedPositions:!1,isTileset:"auto",assetGltfUpAxis:null}}};var zn=r(21);async function $n(t,e){if(!e){const r=await async function(t){I(t);const e={Authorization:"Bearer "+t},r=await Object(zn.fetchFile)("https://api.cesium.com/v1/assets",{fetch:{headers:e}});if(!r.ok)throw new Error(r.statusText);return await r.json()}(t);for(const t of r.items)"3DTILES"===t.type&&(e=t.id)}const r=await async function(t,e){I(t,e);const r={Authorization:"Bearer "+t},n="https://api.cesium.com/v1/assets/"+e;let s=await Object(zn.fetchFile)(""+n,{fetch:{headers:r}});if(!s.ok)throw new Error(s.statusText);let i=await s.json();if(s=await Object(zn.fetchFile)(n+"/endpoint",{fetch:{headers:r}}),!s.ok)throw new Error(s.statusText);const o=await s.json();return i={...i,...o},i}(t,e),{type:n,url:s}=r;return I("3DTILES"===n&&s),r.headers={Authorization:"Bearer "+r.accessToken},r}const ts={...qn,id:"cesium-ion",name:"Cesium Ion",preload:async function(t,e={}){e=e["cesium-ion"]||{};const{accessToken:r}=e;let n=e.assetId;if(!Number.isFinite(n)){const e=t.match(/\/([0-9]+)\/tileset.json/);n=e&&e[1]}return $n(r,n)},parse:async(t,e,r)=>((e={...e})["3d-tiles"]=e["cesium-ion"],e.loader=ts,qn.parse(t,e,r)),options:{"cesium-ion":{...qn.options["3d-tiles"],accessToken:null}}};function es(t,e,r){if(!e)return r+12;const{magic:n,version:s=1,byteLength:i=12}=t;return I(Array.isArray(n)&&Number.isFinite(s)&&Number.isFinite(i)),e.setUint8(r+0,n[0]),e.setUint8(r+1,n[1]),e.setUint8(r+2,n[2]),e.setUint8(r+3,n[3]),e.setUint32(r+4,s,!0),e.setUint32(r+8,i,!0),r+=12}function rs(t,e,r){t&&t.setUint32(e+8,r,!0)}function ns(t,e,r,n){return e=function(t,e,r,n){const s=ze(r.byteLength,n),i=s-r.byteLength;if(t){const n=new Uint8Array(t.buffer,t.byteOffset+e,r.byteLength),s=new Uint8Array(r);n.set(s);for(let n=0;n<i;++n)t.setUint8(e+r.byteLength+n,32)}return e+=s}(t,e,(new TextEncoder).encode(r),n)}function ss(t,e,r,n){if(t)for(let s=0;s<n;s++)t.setUint8(e+s,r.charCodeAt(s));return e+n}function is(t,e,r,n){if(t)for(let s=0;s<n;s++)t.setUint8(e+s,r[s]);return e+n}const os={POINTS_LENGTH:1,POSITIONS:{byteOffset:0}};function as(t,e,r,n){const{featureTableJson:s=os}=t;let i=JSON.stringify(s);i=function(t,e){const r=t.length,n=Math.ceil(r/e)*e-r;let s="";for(let t=0;t<n;++t)s+=" ";return t+s}(i,4);const{featureTableJsonByteLength:o=i.length}=t,a=new ArrayBuffer(12),c=a.byteLength,u=r;return r+=es(t={magic:p.POINT_CLOUD,...t},e,0),e&&(e.setUint32(r+0,o,!0),e.setUint32(r+4,c,!0),e.setUint32(r+8,0,!0),e.setUint32(r+12,0,!0)),r+=16,r+=ss(e,r,i,o),rs(e,u,(r+=is(e,r,a,c))-u),r}function cs(t,e,r,n){switch(I("string"==typeof t.type),t.type){case y.COMPOSITE:return function(t,e,r,n,s){const i=r;r+=es(t={magic:p.COMPOSITE,tiles:[],...t},e,r),e&&e.setUint32(r,t.tiles.length,!0),r+=4;for(let i=0;i<t.tiles.length;++i)r+=s(t.tiles[i],e,r,n);return rs(e,i,r-i),r}(t,e,r,n,cs);case y.POINT_CLOUD:return as(t,e,r);case y.BATCHED_3D_MODEL:return function(t,e,r,n){const{featuresLength:s=0,batchTable:i}=t,o={BATCH_LENGTH:s},a=JSON.stringify(o),c=i?JSON.stringify(i):"",u=ze(a.length,8),A=c?ze(c.length,8):0,h=r;r=es(t={magic:p.BATCHED_MODEL,...t},e,r),e&&(e.setUint32(12,u,!0),e.setUint32(16,0,!0),e.setUint32(20,A,!0),e.setUint32(24,0,!0)),r=ns(e,r+=16,a,8),i&&(r=ns(e,r,c,8));const B=t.gltfEncoded;return B&&(r=is(e,r,B,B.byteLength)),rs(e,h,r-h),r}(t,e,r);case y.INSTANCED_3D_MODEL:return function(t,e,r,n){const{featuresLength:s=1,gltfFormat:i=1,gltfUri:o=""}=t,a=o.length,c={INSTANCES_LENGTH:s,POSITION:new Array(3*s).fill(0)},u=JSON.stringify(c),A=u.length,h=r;return r=es(t={magic:p.INSTANCED_MODEL,...t},e,0),e&&(e.setUint32(12,A,!0),e.setUint32(16,0,!0),e.setUint32(20,0,!0),e.setUint32(24,0,!0),e.setUint32(28,i,!0)),r+=20,r+=ss(e,r,u,A),rs(e,h,(r+=ss(e,r,o,a))-h),r}(t,e,r);default:throw new Error("3D Tiles: unknown tile type")}}const us={name:"3D Tile",id:"3d-tiles",module:"3d-tiles",version:"3.1.0-alpha.5",extensions:["cmpt","pnts","b3dm","i3dm"],mimeTypes:["application/octet-stream"],encodeSync:function(t,e){return function(t,e){const r=cs(t,null,0,e),n=new ArrayBuffer(r);return cs(t,new DataView(n),0,e),n}(t,e)},binary:!0,options:{"3d-tiles":{}}}},,,function(t,e,r){"use strict";r.d(e,"a",(function(){return A}));var n=r(19),s=r(3),i=r(1),o=r(2),a=r(8);const c=[0,0,0],u={};class A extends n.a{static get ZERO(){return u.ZERO=u.ZERO||Object.freeze(new A(0,0,0,0))}constructor(t=0,e=0,r=0){super(-0,-0,-0),1===arguments.length&&Object(s.e)(t)?this.copy(t):(s.b.debug&&(Object(i.a)(t),Object(i.a)(e),Object(i.a)(r)),this[0]=t,this[1]=e,this[2]=r)}set(t,e,r){return this[0]=t,this[1]=e,this[2]=r,this.check()}copy(t){return this[0]=t[0],this[1]=t[1],this[2]=t[2],this.check()}fromObject(t){return s.b.debug&&(Object(i.a)(t.x),Object(i.a)(t.y),Object(i.a)(t.z)),this[0]=t.x,this[1]=t.y,this[2]=t.z,this.check()}toObject(t){return t.x=this[0],t.y=this[1],t.z=this[2],t}get ELEMENTS(){return 3}get z(){return this[2]}set z(t){this[2]=Object(i.a)(t)}angle(t){return o.a(this,t)}cross(t){return o.c(this,this,t),this.check()}rotateX({radians:t,origin:e=c}){return o.i(this,this,e,t),this.check()}rotateY({radians:t,origin:e=c}){return o.j(this,this,e,t),this.check()}rotateZ({radians:t,origin:e=c}){return o.k(this,this,e,t),this.check()}transform(t){return this.transformAsPoint(t)}transformAsPoint(t){return o.m(this,this,t),this.check()}transformAsVector(t){return Object(a.c)(this,this,t),this.check()}transformByMatrix3(t){return o.l(this,this,t),this.check()}transformByMatrix2(t){return Object(a.b)(this,this,t),this.check()}transformByQuaternion(t){return o.n(this,this,t),this.check()}}},function(t,e,r){"use strict";e.a={EPSILON1:.1,EPSILON2:.01,EPSILON3:.001,EPSILON4:1e-4,EPSILON5:1e-5,EPSILON6:1e-6,EPSILON7:1e-7,EPSILON8:1e-8,EPSILON9:1e-9,EPSILON10:1e-10,EPSILON11:1e-11,EPSILON12:1e-12,EPSILON13:1e-13,EPSILON14:1e-14,EPSILON15:1e-15,EPSILON16:1e-16,EPSILON17:1e-17,EPSILON18:1e-18,EPSILON19:1e-19,EPSILON20:1e-20,PI_OVER_TWO:Math.PI/2,PI_OVER_FOUR:Math.PI/4,PI_OVER_SIX:Math.PI/6,TWO_PI:2*Math.PI}},function(t,e,r){"use strict";r.d(e,"a",(function(){return l}));var n=r(1),s=r(20),i=r(8),o=r(5),a=r(9),c=r(2),u=r(4);const A=Object.freeze([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),h=Object.freeze([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]),B=Object.freeze({COL0ROW0:0,COL0ROW1:1,COL0ROW2:2,COL0ROW3:3,COL1ROW0:4,COL1ROW1:5,COL1ROW2:6,COL1ROW3:7,COL2ROW0:8,COL2ROW1:9,COL2ROW2:10,COL2ROW3:11,COL3ROW0:12,COL3ROW1:13,COL3ROW2:14,COL3ROW3:15}),f={};class l extends s.a{static get IDENTITY(){return f.IDENTITY=f.IDENTITY||Object.freeze(new l(A)),f.IDENTITY}static get ZERO(){return f.ZERO=f.ZERO||Object.freeze(new l(h)),f.ZERO}get INDICES(){return B}get ELEMENTS(){return 16}get RANK(){return 4}constructor(t){super(-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0),1===arguments.length&&Array.isArray(t)?this.copy(t):this.identity()}copy(t){return this[0]=t[0],this[1]=t[1],this[2]=t[2],this[3]=t[3],this[4]=t[4],this[5]=t[5],this[6]=t[6],this[7]=t[7],this[8]=t[8],this[9]=t[9],this[10]=t[10],this[11]=t[11],this[12]=t[12],this[13]=t[13],this[14]=t[14],this[15]=t[15],this.check()}set(t,e,r,n,s,i,o,a,c,u,A,h,B,f,l,d){return this[0]=t,this[1]=e,this[2]=r,this[3]=n,this[4]=s,this[5]=i,this[6]=o,this[7]=a,this[8]=c,this[9]=u,this[10]=A,this[11]=h,this[12]=B,this[13]=f,this[14]=l,this[15]=d,this.check()}setRowMajor(t,e,r,n,s,i,o,a,c,u,A,h,B,f,l,d){return this[0]=t,this[1]=s,this[2]=c,this[3]=B,this[4]=e,this[5]=i,this[6]=u,this[7]=f,this[8]=r,this[9]=o,this[10]=A,this[11]=l,this[12]=n,this[13]=a,this[14]=h,this[15]=d,this.check()}toRowMajor(t){return t[0]=this[0],t[1]=this[4],t[2]=this[8],t[3]=this[12],t[4]=this[1],t[5]=this[5],t[6]=this[9],t[7]=this[13],t[8]=this[2],t[9]=this[6],t[10]=this[10],t[11]=this[14],t[12]=this[3],t[13]=this[7],t[14]=this[11],t[15]=this[15],t}identity(){return this.copy(A)}fromQuaternion(t){return o.b(this,t),this.check()}frustum({left:t,right:e,bottom:r,top:n,near:s,far:i}){return i===1/0?l._computeInfinitePerspectiveOffCenter(this,t,e,r,n,s):o.c(this,t,e,r,n,s,i),this.check()}static _computeInfinitePerspectiveOffCenter(t,e,r,n,s,i){const o=2*i/(r-e),a=2*i/(s-n),c=(r+e)/(r-e),u=(s+n)/(s-n),A=-2*i;return t[0]=o,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=a,t[6]=0,t[7]=0,t[8]=c,t[9]=u,t[10]=-1,t[11]=-1,t[12]=0,t[13]=0,t[14]=A,t[15]=0,t}lookAt(t,e,r){return 1===arguments.length&&({eye:t,center:e,up:r}=t),e=e||[0,0,0],r=r||[0,1,0],o.e(this,t,e,r),this.check()}ortho({left:t,right:e,bottom:r,top:n,near:s=.1,far:i=500}){return o.g(this,t,e,r,n,s,i),this.check()}orthographic({fovy:t=45*Math.PI/180,aspect:e=1,focalDistance:r=1,near:n=.1,far:s=500}){if(t>2*Math.PI)throw Error("radians");const i=t/2,o=r*Math.tan(i),a=o*e;return(new l).ortho({left:-a,right:a,bottom:-o,top:o,near:n,far:s})}perspective({fovy:t,fov:e=45*Math.PI/180,aspect:r=1,near:n=.1,far:s=500}={}){if((t=t||e)>2*Math.PI)throw Error("radians");return o.h(this,t,r,n,s),this.check()}determinant(){return o.a(this)}getScale(t=[-0,-0,-0]){return t[0]=Math.sqrt(this[0]*this[0]+this[1]*this[1]+this[2]*this[2]),t[1]=Math.sqrt(this[4]*this[4]+this[5]*this[5]+this[6]*this[6]),t[2]=Math.sqrt(this[8]*this[8]+this[9]*this[9]+this[10]*this[10]),t}getTranslation(t=[-0,-0,-0]){return t[0]=this[12],t[1]=this[13],t[2]=this[14],t}getRotation(t=[-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0],e=null){const r=this.getScale(e||[-0,-0,-0]),n=1/r[0],s=1/r[1],i=1/r[2];return t[0]=this[0]*n,t[1]=this[1]*s,t[2]=this[2]*i,t[3]=0,t[4]=this[4]*n,t[5]=this[5]*s,t[6]=this[6]*i,t[7]=0,t[8]=this[8]*n,t[9]=this[9]*s,t[10]=this[10]*i,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}getRotationMatrix3(t=[-0,-0,-0,-0,-0,-0,-0,-0,-0],e=null){const r=this.getScale(e||[-0,-0,-0]),n=1/r[0],s=1/r[1],i=1/r[2];return t[0]=this[0]*n,t[1]=this[1]*s,t[2]=this[2]*i,t[3]=this[4]*n,t[4]=this[5]*s,t[5]=this[6]*i,t[6]=this[8]*n,t[7]=this[9]*s,t[8]=this[10]*i,t}transpose(){return o.o(this,this),this.check()}invert(){return o.d(this,this),this.check()}multiplyLeft(t){return o.f(this,t,this),this.check()}multiplyRight(t){return o.f(this,this,t),this.check()}rotateX(t){return o.j(this,this,t),this.check()}rotateY(t){return o.k(this,this,t),this.check()}rotateZ(t){return o.l(this,this,t),this.check()}rotateXYZ([t,e,r]){return this.rotateX(t).rotateY(e).rotateZ(r)}rotateAxis(t,e){return o.i(this,this,t,e),this.check()}scale(t){return Array.isArray(t)?o.m(this,this,t):o.m(this,this,[t,t,t]),this.check()}translate(t){return o.n(this,this,t),this.check()}transform(t,e){return 4===t.length?(e=u.n(e||[-0,-0,-0,-0],t,this),Object(n.b)(e,4),e):this.transformAsPoint(t,e)}transformAsPoint(t,e){const{length:r}=t;switch(r){case 2:e=a.d(e||[-0,-0],t,this);break;case 3:e=c.m(e||[-0,-0,-0],t,this);break;default:throw new Error("Illegal vector")}return Object(n.b)(e,t.length),e}transformAsVector(t,e){switch(t.length){case 2:e=Object(i.a)(e||[-0,-0],t,this);break;case 3:e=Object(i.c)(e||[-0,-0,-0],t,this);break;default:throw new Error("Illegal vector")}return Object(n.b)(e,t.length),e}makeRotationX(t){return this.identity().rotateX(t)}makeTranslation(t,e,r){return this.identity().translate([t,e,r])}transformPoint(t,e){return Object(n.c)("Matrix4.transformPoint","3.0"),this.transformAsPoint(t,e)}transformVector(t,e){return Object(n.c)("Matrix4.transformVector","3.0"),this.transformAsPoint(t,e)}transformDirection(t,e){return Object(n.c)("Matrix4.transformDirection","3.0"),this.transformAsVector(t,e)}}},function(t,e,r){"use strict";r.d(e,"a",(function(){return f}));var n=r(20),s=r(1),i=r(8),o=r(7),a=r(9),c=r(2);const u=Object.freeze([1,0,0,0,1,0,0,0,1]),A=Object.freeze([0,0,0,0,0,0,0,0,0]),h=Object.freeze({COL0ROW0:0,COL0ROW1:1,COL0ROW2:2,COL1ROW0:3,COL1ROW1:4,COL1ROW2:5,COL2ROW0:6,COL2ROW1:7,COL2ROW2:8}),B={};class f extends n.a{static get IDENTITY(){return B.IDENTITY=B.IDENTITY||Object.freeze(new f(u)),B.IDENTITY}static get ZERO(){return B.ZERO=B.ZERO||Object.freeze(new f(A)),B.ZERO}get ELEMENTS(){return 9}get RANK(){return 3}get INDICES(){return h}constructor(t){super(-0,-0,-0,-0,-0,-0,-0,-0,-0),1===arguments.length&&Array.isArray(t)?this.copy(t):this.identity()}copy(t){return this[0]=t[0],this[1]=t[1],this[2]=t[2],this[3]=t[3],this[4]=t[4],this[5]=t[5],this[6]=t[6],this[7]=t[7],this[8]=t[8],this.check()}set(t,e,r,n,s,i,o,a,c){return this[0]=t,this[1]=e,this[2]=r,this[3]=n,this[4]=s,this[5]=i,this[6]=o,this[7]=a,this[8]=c,this.check()}setRowMajor(t,e,r,n,s,i,o,a,c){return this[0]=t,this[1]=n,this[2]=o,this[3]=e,this[4]=s,this[5]=a,this[6]=r,this[7]=i,this[8]=c,this.check()}determinant(){return o.b(this)}identity(){return this.copy(u)}fromQuaternion(t){return o.c(this,t),this.check()}transpose(){return o.i(this,this),this.check()}invert(){return o.d(this,this),this.check()}multiplyLeft(t){return o.e(this,t,this),this.check()}multiplyRight(t){return o.e(this,this,t),this.check()}rotate(t){return o.f(this,this,t),this.check()}scale(t){return Array.isArray(t)?o.g(this,this,t):o.g(this,this,[t,t,t]),this.check()}translate(t){return o.h(this,this,t),this.check()}transform(t,e){switch(t.length){case 2:e=a.c(e||[-0,-0],t,this);break;case 3:e=c.l(e||[-0,-0,-0],t,this);break;case 4:e=Object(i.d)(e||[-0,-0,-0,-0],t,this);break;default:throw new Error("Illegal vector")}return Object(s.b)(e,t.length),e}transformVector(t,e){return Object(s.c)("Matrix3.transformVector"),this.transform(t,e)}transformVector2(t,e){return Object(s.c)("Matrix3.transformVector"),this.transform(t,e)}transformVector3(t,e){return Object(s.c)("Matrix3.transformVector"),this.transform(t,e)}}},function(t,e,r){"use strict";r.d(e,"a",(function(){return R}));var n=r(14),s=r(1),i=r(6),o=r(0),a=r(7),c=r(2),u=r(4);function A(){var t=new o.a(4);return o.a!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t[3]=1,t}function h(t,e,r){r*=.5;var n=Math.sin(r);return t[0]=n*e[0],t[1]=n*e[1],t[2]=n*e[2],t[3]=Math.cos(r),t}function B(t,e,r){var n=e[0],s=e[1],i=e[2],o=e[3],a=r[0],c=r[1],u=r[2],A=r[3];return t[0]=n*A+o*a+s*u-i*c,t[1]=s*A+o*c+i*a-n*u,t[2]=i*A+o*u+n*c-s*a,t[3]=o*A-n*a-s*c-i*u,t}function f(t,e,r,n){var s,i,a,c,u,A=e[0],h=e[1],B=e[2],f=e[3],l=r[0],d=r[1],C=r[2],m=r[3];return(i=A*l+h*d+B*C+f*m)<0&&(i=-i,l=-l,d=-d,C=-C,m=-m),1-i>o.b?(s=Math.acos(i),a=Math.sin(s),c=Math.sin((1-n)*s)/a,u=Math.sin(n*s)/a):(c=1-n,u=n),t[0]=c*A+u*l,t[1]=c*h+u*d,t[2]=c*B+u*C,t[3]=c*f+u*m,t}function l(t,e){var r,n=e[0]+e[4]+e[8];if(n>0)r=Math.sqrt(n+1),t[3]=.5*r,r=.5/r,t[0]=(e[5]-e[7])*r,t[1]=(e[6]-e[2])*r,t[2]=(e[1]-e[3])*r;else{var s=0;e[4]>e[0]&&(s=1),e[8]>e[3*s+s]&&(s=2);var i=(s+1)%3,o=(s+2)%3;r=Math.sqrt(e[3*s+s]-e[3*i+i]-e[3*o+o]+1),t[s]=.5*r,r=.5/r,t[3]=(e[3*i+o]-e[3*o+i])*r,t[i]=(e[3*i+s]+e[3*s+i])*r,t[o]=(e[3*o+s]+e[3*s+o])*r}return t}u.b,u.g,u.c,u.l;var d,C,m,E,b,g,y=u.a,p=u.k,I=u.d,T=u.i,M=u.h,G=u.m,F=u.j,D=(u.f,u.e,d=c.b(),C=c.e(1,0,0),m=c.e(0,1,0),function(t,e,r){var n=c.d(e,r);return n<-.999999?(c.c(d,C,e),c.f(d)<1e-6&&c.c(d,m,e),c.h(d,d),h(t,d,Math.PI),t):n>.999999?(t[0]=0,t[1]=0,t[2]=0,t[3]=1,t):(c.c(d,e,r),t[0]=d[0],t[1]=d[1],t[2]=d[2],t[3]=1+n,F(t,t))});E=A(),b=A(),g=a.a();const O=[0,0,0,1];class R extends n.a{constructor(t=0,e=0,r=0,n=1){super(-0,-0,-0,-0),Array.isArray(t)&&1===arguments.length?this.copy(t):this.set(t,e,r,n)}copy(t){return this[0]=t[0],this[1]=t[1],this[2]=t[2],this[3]=t[3],this.check()}set(t,e,r,n){return this[0]=t,this[1]=e,this[2]=r,this[3]=n,this.check()}fromMatrix3(t){return l(this,t),this.check()}identity(){var t;return(t=this)[0]=0,t[1]=0,t[2]=0,t[3]=1,this.check()}fromAxisRotation(t,e){return h(this,t,e),this.check()}setAxisAngle(t,e){return this.fromAxisRotation(t,e)}get ELEMENTS(){return 4}get x(){return this[0]}set x(t){this[0]=Object(s.a)(t)}get y(){return this[1]}set y(t){this[1]=Object(s.a)(t)}get z(){return this[2]}set z(t){this[2]=Object(s.a)(t)}get w(){return this[3]}set w(t){this[3]=Object(s.a)(t)}len(){return M(this)}lengthSquared(){return G(this)}dot(t,e){if(void 0!==e)throw new Error("Quaternion.dot only takes one argument");return I(this,t)}rotationTo(t,e){return D(this,t,e),this.check()}add(t,e){if(void 0!==e)throw new Error("Quaternion.add only takes one argument");return y(this,this,t),this.check()}calculateW(){var t,e,r,n,s;return t=this,r=(e=this)[0],n=e[1],s=e[2],t[0]=r,t[1]=n,t[2]=s,t[3]=Math.sqrt(Math.abs(1-r*r-n*n-s*s)),this.check()}conjugate(){var t,e;return e=this,(t=this)[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t[3]=e[3],this.check()}invert(){var t,e,r,n,s,i,o,a;return t=this,r=(e=this)[0],n=e[1],s=e[2],i=e[3],a=(o=r*r+n*n+s*s+i*i)?1/o:0,t[0]=-r*a,t[1]=-n*a,t[2]=-s*a,t[3]=i*a,this.check()}lerp(t,e,r){return T(this,t,e,r),this.check()}multiplyRight(t,e){return Object(i.a)(!e),B(this,this,t),this.check()}multiplyLeft(t,e){return Object(i.a)(!e),B(this,t,this),this.check()}normalize(){const t=this.len(),e=t>0?1/t:0;return this[0]=this[0]*e,this[1]=this[1]*e,this[2]=this[2]*e,this[3]=this[3]*e,0===t&&(this[3]=1),this.check()}rotateX(t){return function(t,e,r){r*=.5;var n=e[0],s=e[1],i=e[2],o=e[3],a=Math.sin(r),c=Math.cos(r);t[0]=n*c+o*a,t[1]=s*c+i*a,t[2]=i*c-s*a,t[3]=o*c-n*a}(this,this,t),this.check()}rotateY(t){return function(t,e,r){r*=.5;var n=e[0],s=e[1],i=e[2],o=e[3],a=Math.sin(r),c=Math.cos(r);t[0]=n*c-i*a,t[1]=s*c+o*a,t[2]=i*c+n*a,t[3]=o*c-s*a}(this,this,t),this.check()}rotateZ(t){return function(t,e,r){r*=.5;var n=e[0],s=e[1],i=e[2],o=e[3],a=Math.sin(r),c=Math.cos(r);t[0]=n*c+s*a,t[1]=s*c-n*a,t[2]=i*c+o*a,t[3]=o*c-i*a}(this,this,t),this.check()}scale(t){return p(this,this,t),this.check()}slerp(t,e,r){switch(arguments.length){case 1:({start:t=O,target:e,ratio:r}=arguments[0]);break;case 2:[e,r]=arguments,t=this}return f(this,t,e,r),this.check()}transformVector4(t,e=t){return u.o(e,t,this),Object(s.b)(e,4)}lengthSq(){return this.lengthSquared()}setFromAxisAngle(t,e){return this.setAxisAngle(t,e)}premultiply(t,e){return this.multiplyLeft(t,e)}multiply(t,e){return this.multiplyRight(t,e)}}}])}));
2
2
  //# sourceMappingURL=dist.min.js.map