shop-components 0.1.67 → 0.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (61) hide show
  1. package/dist/__VLS_types.d.ts +124 -0
  2. package/dist/assets/loader.worker-fysOIq2s.js +7 -0
  3. package/dist/shop-components.cjs +5077 -0
  4. package/dist/shop-components.mjs +34475 -63541
  5. package/dist/{device-viewer → stories/device-viewer}/amr.d.ts +23 -5
  6. package/dist/{device-viewer → stories/device-viewer}/dimension/size-box.d.ts +2 -3
  7. package/dist/stories/device-viewer/dimension/size-line.d.ts +24 -0
  8. package/dist/{device-viewer → stories/device-viewer}/goods-box.d.ts +1 -0
  9. package/dist/{device-viewer → stories/device-viewer}/index.d.ts +18 -2
  10. package/dist/stories/device-viewer/libs/BVH/index.d.ts +342 -0
  11. package/dist/{device-viewer → stories/device-viewer}/libs/gizmo/gizmo.d.ts +2 -0
  12. package/dist/stories/device-viewer/libs/progress-shadow/ProgressiveShadows.d.ts +91 -0
  13. package/dist/{device-viewer → stories/device-viewer}/logo.d.ts +1 -1
  14. package/dist/{device-viewer → stories/device-viewer}/outerline.d.ts +12 -0
  15. package/dist/{device-viewer → stories/device-viewer}/scene.d.ts +98 -4
  16. package/dist/{device-viewer → stories/device-viewer}/slot/slot-item.d.ts +6 -0
  17. package/dist/{device-viewer → stories/device-viewer}/slot.d.ts +16 -0
  18. package/dist/stories/device-viewer/ui/camera-position.d.ts +6 -0
  19. package/dist/stories/device-viewer/utils/geometory.d.ts +3 -0
  20. package/dist/{device-viewer → stories/device-viewer}/utils/index.d.ts +2 -0
  21. package/dist/{devices → stories/devices}/index.stories.d.ts +1 -1
  22. package/dist/{devices → stories/devices}/src/connector.d.ts +1 -1
  23. package/dist/{devices → stories/devices}/src/constraints/same-device-constraint.d.ts +2 -2
  24. package/dist/{devices → stories/devices}/src/constraints/single-connection-constraint.d.ts +2 -2
  25. package/dist/{devices → stories/devices}/src/device.d.ts +1 -1
  26. package/dist/{main.d.ts → stories/main.d.ts} +0 -1
  27. package/dist/vite-env.d.ts +11 -0
  28. package/package.json +10 -8
  29. package/dist/device-viewer/dimension/size-line.d.ts +0 -15
  30. package/dist/shop-components.umd.js +0 -9981
  31. /package/dist/{cropper → stories/cropper}/index.d.ts +0 -0
  32. /package/dist/{cropper → stories/cropper}/index.stories.d.ts +0 -0
  33. /package/dist/{device-viewer → stories/device-viewer}/assembly.d.ts +0 -0
  34. /package/dist/{device-viewer → stories/device-viewer}/belt.d.ts +0 -0
  35. /package/dist/{device-viewer → stories/device-viewer}/dimension/index.d.ts +0 -0
  36. /package/dist/{device-viewer → stories/device-viewer}/dimension/line3.d.ts +0 -0
  37. /package/dist/{device-viewer → stories/device-viewer}/group-roller.d.ts +0 -0
  38. /package/dist/{device-viewer → stories/device-viewer}/index.stories.d.ts +0 -0
  39. /package/dist/{device-viewer → stories/device-viewer}/lines.d.ts +0 -0
  40. /package/dist/{device-viewer → stories/device-viewer}/main.d.ts +0 -0
  41. /package/dist/{device-viewer → stories/device-viewer}/mechanism/mechanism.d.ts +0 -0
  42. /package/dist/{device-viewer → stories/device-viewer}/pin/pin.d.ts +0 -0
  43. /package/dist/{device-viewer → stories/device-viewer}/roller.d.ts +0 -0
  44. /package/dist/{device-viewer → stories/device-viewer}/row.d.ts +0 -0
  45. /package/dist/{device-viewer → stories/device-viewer}/sound.d.ts +0 -0
  46. /package/dist/{device-viewer → stories/device-viewer}/text2.d.ts +0 -0
  47. /package/dist/{device-viewer → stories/device-viewer}/text3.d.ts +0 -0
  48. /package/dist/{device-viewer → stories/device-viewer}/ui/right-menu.d.ts +0 -0
  49. /package/dist/{device-viewer → stories/device-viewer}/worker/generate-mesh-bvh-worker.d.ts +0 -0
  50. /package/dist/{device-viewer → stories/device-viewer}/worker/generateAsync.worker.d.ts +0 -0
  51. /package/dist/{device-viewer → stories/device-viewer}/worker/path-tracing-scene-worker.d.ts +0 -0
  52. /package/dist/{devices → stories/devices}/index.d.ts +0 -0
  53. /package/dist/{devices → stories/devices}/src/constraints/constraint.d.ts +0 -0
  54. /package/dist/{devices → stories/devices}/src/pin.d.ts +0 -0
  55. /package/dist/{main → stories/main}/index.d.ts +0 -0
  56. /package/dist/{plugin.d.ts → stories/plugin.d.ts} +0 -0
  57. /package/dist/{plugins → stories/plugins}/change-slot/index.d.ts +0 -0
  58. /package/dist/{sglb → stories/sglb}/index.d.ts +0 -0
  59. /package/dist/{step-viewer → stories/step-viewer}/index.d.ts +0 -0
  60. /package/dist/{step-viewer → stories/step-viewer}/index.stories.d.ts +0 -0
  61. /package/dist/{utils → stories/utils}/index.d.ts +0 -0
@@ -0,0 +1,7 @@
1
+ (function(){"use strict";var ea=function(){var l="b9H79Tebbbe8Fv9Gbb9Gvuuuuueu9Giuuub9Geueu9Giuuueuikqbeeedddillviebeoweuec:q:Odkr;leDo9TW9T9VV95dbH9F9F939H79T9F9J9H229F9Jt9VV7bb8A9TW79O9V9Wt9F9KW9J9V9KW9wWVtW949c919M9MWVbeY9TW79O9V9Wt9F9KW9J9V9KW69U9KW949c919M9MWVbdE9TW79O9V9Wt9F9KW9J9V9KW69U9KW949tWG91W9U9JWbiL9TW79O9V9Wt9F9KW9J9V9KWS9P2tWV9p9JtblK9TW79O9V9Wt9F9KW9J9V9KWS9P2tWV9r919HtbvL9TW79O9V9Wt9F9KW9J9V9KWS9P2tWVT949Wbol79IV9Rbrq;w8Wqdbk;esezu8Jjjjjbcj;eb9Rgv8Kjjjjbc9:hodnadcefal0mbcuhoaiRbbc:Ge9hmbavaialfgrad9Radz1jjjbhwcj;abad9Uc;WFbGgocjdaocjd6EhDaicefhocbhqdnindndndnaeaq9nmbaDaeaq9RaqaDfae6Egkcsfglcl4cifcd4hxalc9WGgmTmecbhPawcjdfhsaohzinaraz9Rax6mvarazaxfgo9RcK6mvczhlcbhHinalgic9WfgOawcj;cbffhldndndndndnazaOco4fRbbaHcoG4ciGPlbedibkal9cb83ibalcwf9cb83ibxikalaoRblaoRbbgOco4gAaAciSgAE86bbawcj;cbfaifglcGfaoclfaAfgARbbaOcl4ciGgCaCciSgCE86bbalcVfaAaCfgARbbaOcd4ciGgCaCciSgCE86bbalc7faAaCfgARbbaOciGgOaOciSgOE86bbalctfaAaOfgARbbaoRbegOco4gCaCciSgCE86bbalc91faAaCfgARbbaOcl4ciGgCaCciSgCE86bbalc4faAaCfgARbbaOcd4ciGgCaCciSgCE86bbalc93faAaCfgARbbaOciGgOaOciSgOE86bbalc94faAaOfgARbbaoRbdgOco4gCaCciSgCE86bbalc95faAaCfgARbbaOcl4ciGgCaCciSgCE86bbalc96faAaCfgARbbaOcd4ciGgCaCciSgCE86bbalc97faAaCfgARbbaOciGgOaOciSgOE86bbalc98faAaOfgORbbaoRbigoco4gAaAciSgAE86bbalc99faOaAfgORbbaocl4ciGgAaAciSgAE86bbalc9:faOaAfgORbbaocd4ciGgAaAciSgAE86bbalcufaOaAfglRbbaociGgoaociSgoE86bbalaofhoxdkalaoRbwaoRbbgOcl4gAaAcsSgAE86bbawcj;cbfaifglcGfaocwfaAfgARbbaOcsGgOaOcsSgOE86bbalcVfaAaOfgORbbaoRbegAcl4gCaCcsSgCE86bbalc7faOaCfgORbbaAcsGgAaAcsSgAE86bbalctfaOaAfgORbbaoRbdgAcl4gCaCcsSgCE86bbalc91faOaCfgORbbaAcsGgAaAcsSgAE86bbalc4faOaAfgORbbaoRbigAcl4gCaCcsSgCE86bbalc93faOaCfgORbbaAcsGgAaAcsSgAE86bbalc94faOaAfgORbbaoRblgAcl4gCaCcsSgCE86bbalc95faOaCfgORbbaAcsGgAaAcsSgAE86bbalc96faOaAfgORbbaoRbvgAcl4gCaCcsSgCE86bbalc97faOaCfgORbbaAcsGgAaAcsSgAE86bbalc98faOaAfgORbbaoRbogAcl4gCaCcsSgCE86bbalc99faOaCfgORbbaAcsGgAaAcsSgAE86bbalc9:faOaAfgORbbaoRbrgocl4gAaAcsSgAE86bbalcufaOaAfglRbbaocsGgoaocsSgoE86bbalaofhoxekalao8Pbb83bbalcwfaocwf8Pbb83bbaoczfhokdnaiam9pmbaHcdfhHaiczfhlarao9RcL0mekkaiam6mvaoTmvdnakTmbawaPfRbbhHawcj;cbfhlashiakhOinaialRbbgzce4cbazceG9R7aHfgH86bbaiadfhialcefhlaOcufgOmbkkascefhsaohzaPcefgPad9hmbxikkcbc99arao9Radcaadca0ESEhoxlkaoaxad2fhCdnakmbadhlinaoTmlarao9Rax6mlaoaxfhoalcufglmbkaChoxekcbhmawcjdfhAinarao9Rax6miawamfRbbhHawcj;cbfhlaAhiakhOinaialRbbgzce4cbazceG9R7aHfgH86bbaiadfhialcefhlaOcufgOmbkaAcefhAaoaxfhoamcefgmad9hmbkaChokabaqad2fawcjdfakad2z1jjjb8Aawawcjdfakcufad2fadz1jjjb8Aakaqfhqaombkc9:hoxekc9:hokavcj;ebf8Kjjjjbaok;cseHu8Jjjjjbc;ae9Rgv8Kjjjjbc9:hodnaeci9UgrcHfal0mbcuhoaiRbbgwc;WeGc;Ge9hmbawcsGgwce0mbavc;abfcFecjez:jjjjb8AavcUf9cu83ibavc8Wf9cu83ibavcyf9cu83ibavcaf9cu83ibavcKf9cu83ibavczf9cu83ibav9cu83iwav9cu83ibaialfc9WfhDaicefgqarfhidnaeTmbcmcsawceSEhkcbhxcbhmcbhPcbhwcbhlindnaiaD9nmbc9:hoxikdndnaqRbbgoc;Ve0mbavc;abfalaocu7gscl4fcsGcitfgzydlhrazydbhzdnaocsGgHak9pmbavawasfcsGcdtfydbaxaHEhoaHThsdndnadcd9hmbabaPcetfgHaz87ebaHclfao87ebaHcdfar87ebxekabaPcdtfgHazBdbaHcwfaoBdbaHclfarBdbkaxasfhxcdhHavawcdtfaoBdbawasfhwcehsalhOxdkdndnaHcsSmbaHc987aHamffcefhoxekaicefhoai8SbbgHcFeGhsdndnaHcu9mmbaohixekaicvfhiascFbGhscrhHdninao8SbbgOcFbGaHtasVhsaOcu9kmeaocefhoaHcrfgHc8J9hmbxdkkaocefhikasce4cbasceG9R7amfhokdndnadcd9hmbabaPcetfgHaz87ebaHclfao87ebaHcdfar87ebxekabaPcdtfgHazBdbaHcwfaoBdbaHclfarBdbkcdhHavawcdtfaoBdbcehsawcefhwalhOaohmxekdnaocpe0mbaxcefgHavawaDaocsGfRbbgocl49RcsGcdtfydbaocz6gzEhravawao9RcsGcdtfydbaHazfgAaocsGgHEhoaHThCdndnadcd9hmbabaPcetfgHax87ebaHclfao87ebaHcdfar87ebxekabaPcdtfgHaxBdbaHcwfaoBdbaHclfarBdbkcdhsavawcdtfaxBdbavawcefgwcsGcdtfarBdbcihHavc;abfalcitfgOaxBdlaOarBdbavawazfgwcsGcdtfaoBdbalcefcsGhOawaCfhwaxhzaAaCfhxxekaxcbaiRbbgOEgzaoc;:eSgHfhraOcsGhCaOcl4hAdndnaOcs0mbarcefhoxekarhoavawaA9RcsGcdtfydbhrkdndnaCmbaocefhxxekaohxavawaO9RcsGcdtfydbhokdndnaHTmbaicefhHxekaicdfhHai8SbegscFeGhzdnascu9kmbaicofhXazcFbGhzcrhidninaH8SbbgscFbGaitazVhzascu9kmeaHcefhHaicrfgic8J9hmbkaXhHxekaHcefhHkazce4cbazceG9R7amfgmhzkdndnaAcsSmbaHhsxekaHcefhsaH8SbbgicFeGhrdnaicu9kmbaHcvfhXarcFbGhrcrhidninas8SbbgHcFbGaitarVhraHcu9kmeascefhsaicrfgic8J9hmbkaXhsxekascefhskarce4cbarceG9R7amfgmhrkdndnaCcsSmbashixekascefhias8SbbgocFeGhHdnaocu9kmbascvfhXaHcFbGhHcrhodninai8SbbgscFbGaotaHVhHascu9kmeaicefhiaocrfgoc8J9hmbkaXhixekaicefhikaHce4cbaHceG9R7amfgmhokdndnadcd9hmbabaPcetfgHaz87ebaHclfao87ebaHcdfar87ebxekabaPcdtfgHazBdbaHcwfaoBdbaHclfarBdbkcdhsavawcdtfazBdbavawcefgwcsGcdtfarBdbcihHavc;abfalcitfgXazBdlaXarBdbavawaOcz6aAcsSVfgwcsGcdtfaoBdbawaCTaCcsSVfhwalcefcsGhOkaqcefhqavc;abfaOcitfgOarBdlaOaoBdbavc;abfalasfcsGcitfgraoBdlarazBdbawcsGhwalaHfcsGhlaPcifgPae6mbkkcbc99aiaDSEhokavc;aef8Kjjjjbaok:flevu8Jjjjjbcz9Rhvc9:hodnaecvfal0mbcuhoaiRbbc;:eGc;qe9hmbav9cb83iwaicefhraialfc98fhwdnaeTmbdnadcdSmbcbhDindnaraw6mbc9:skarcefhoar8SbbglcFeGhidndnalcu9mmbaohrxekarcvfhraicFbGhicrhldninao8SbbgdcFbGaltaiVhiadcu9kmeaocefhoalcrfglc8J9hmbxdkkaocefhrkabaDcdtfaic8Etc8F91aicd47avcwfaiceGcdtVgoydbfglBdbaoalBdbaDcefgDae9hmbxdkkcbhDindnaraw6mbc9:skarcefhoar8SbbglcFeGhidndnalcu9mmbaohrxekarcvfhraicFbGhicrhldninao8SbbgdcFbGaltaiVhiadcu9kmeaocefhoalcrfglc8J9hmbxdkkaocefhrkabaDcetfaic8Etc8F91aicd47avcwfaiceGcdtVgoydbfgl87ebaoalBdbaDcefgDae9hmbkkcbc99arawSEhokaok:Lvoeue99dud99eud99dndnadcl9hmbaeTmeindndnabcdfgd8Sbb:Yab8Sbbgi:Ygl:l:tabcefgv8Sbbgo:Ygr:l:tgwJbb;:9cawawNJbbbbawawJbbbb9GgDEgq:mgkaqaicb9iEalMgwawNakaqaocb9iEarMgqaqNMM:r:vglNJbbbZJbbb:;aDEMgr:lJbbb9p9DTmbar:Ohixekcjjjj94hikadai86bbdndnaqalNJbbbZJbbb:;aqJbbbb9GEMgq:lJbbb9p9DTmbaq:Ohdxekcjjjj94hdkavad86bbdndnawalNJbbbZJbbb:;awJbbbb9GEMgw:lJbbb9p9DTmbaw:Ohdxekcjjjj94hdkabad86bbabclfhbaecufgembxdkkaeTmbindndnabclfgd8Ueb:Yab8Uebgi:Ygl:l:tabcdfgv8Uebgo:Ygr:l:tgwJb;:FSawawNJbbbbawawJbbbb9GgDEgq:mgkaqaicb9iEalMgwawNakaqaocb9iEarMgqaqNMM:r:vglNJbbbZJbbb:;aDEMgr:lJbbb9p9DTmbar:Ohixekcjjjj94hikadai87ebdndnaqalNJbbbZJbbb:;aqJbbbb9GEMgq:lJbbb9p9DTmbaq:Ohdxekcjjjj94hdkavad87ebdndnawalNJbbbZJbbb:;awJbbbb9GEMgw:lJbbb9p9DTmbaw:Ohdxekcjjjj94hdkabad87ebabcwfhbaecufgembkkk;oiliui99iue99dnaeTmbcbhiabhlindndnJ;Zl81Zalcof8UebgvciV:Y:vgoal8Ueb:YNgrJb;:FSNJbbbZJbbb:;arJbbbb9GEMgw:lJbbb9p9DTmbaw:OhDxekcjjjj94hDkalclf8Uebhqalcdf8UebhkabaiavcefciGfcetfaD87ebdndnaoak:YNgwJb;:FSNJbbbZJbbb:;awJbbbb9GEMgx:lJbbb9p9DTmbax:OhDxekcjjjj94hDkabaiavciGfgkcd7cetfaD87ebdndnaoaq:YNgoJb;:FSNJbbbZJbbb:;aoJbbbb9GEMgx:lJbbb9p9DTmbax:OhDxekcjjjj94hDkabaiavcufciGfcetfaD87ebdndnJbbjZararN:tawawN:taoaoN:tgrJbbbbarJbbbb9GE:rJb;:FSNJbbbZMgr:lJbbb9p9DTmbar:Ohvxekcjjjj94hvkabakcetfav87ebalcwfhlaiclfhiaecufgembkkk9mbdnadcd4ae2gdTmbinababydbgecwtcw91:Yaece91cjjj98Gcjjj;8if::NUdbabclfhbadcufgdmbkkk9teiucbcbydj1jjbgeabcifc98GfgbBdj1jjbdndnabZbcztgd9nmbcuhiabad9RcFFifcz4nbcuSmekaehikaik;LeeeudndnaeabVciGTmbabhixekdndnadcz9pmbabhixekabhiinaiaeydbBdbaiclfaeclfydbBdbaicwfaecwfydbBdbaicxfaecxfydbBdbaeczfheaiczfhiadc9Wfgdcs0mbkkadcl6mbinaiaeydbBdbaeclfheaiclfhiadc98fgdci0mbkkdnadTmbinaiaeRbb86bbaicefhiaecefheadcufgdmbkkabk;aeedudndnabciGTmbabhixekaecFeGc:b:c:ew2hldndnadcz9pmbabhixekabhiinaialBdbaicxfalBdbaicwfalBdbaiclfalBdbaiczfhiadc9Wfgdcs0mbkkadcl6mbinaialBdbaiclfhiadc98fgdci0mbkkdnadTmbinaiae86bbaicefhiadcufgdmbkkabkkkebcjwklzNbb",t="b9H79TebbbeKl9Gbb9Gvuuuuueu9Giuuub9Geueuikqbbebeedddilve9Weeeviebeoweuec:q:6dkr;leDo9TW9T9VV95dbH9F9F939H79T9F9J9H229F9Jt9VV7bb8A9TW79O9V9Wt9F9KW9J9V9KW9wWVtW949c919M9MWVbdY9TW79O9V9Wt9F9KW9J9V9KW69U9KW949c919M9MWVblE9TW79O9V9Wt9F9KW9J9V9KW69U9KW949tWG91W9U9JWbvL9TW79O9V9Wt9F9KW9J9V9KWS9P2tWV9p9JtboK9TW79O9V9Wt9F9KW9J9V9KWS9P2tWV9r919HtbrL9TW79O9V9Wt9F9KW9J9V9KWS9P2tWVT949Wbwl79IV9RbDq:p9sqlbzik9:evu8Jjjjjbcz9Rhbcbheincbhdcbhiinabcwfadfaicjuaead4ceGglE86bbaialfhiadcefgdcw9hmbkaec:q:yjjbfai86bbaecitc:q1jjbfab8Piw83ibaecefgecjd9hmbkk:N8JlHud97euo978Jjjjjbcj;kb9Rgv8Kjjjjbc9:hodnadcefal0mbcuhoaiRbbc:Ge9hmbavaialfgrad9Rad;8qbbcj;abad9UhlaicefhodnaeTmbadTmbalc;WFbGglcjdalcjd6EhwcbhDinawaeaD9RaDawfae6Egqcsfglc9WGgkci2hxakcethmalcl4cifcd4hPabaDad2fhsakc;ab6hzcbhHincbhOaohAdndninaraA9RaP6meavcj;cbfaOak2fhCaAaPfhocbhidnazmbarao9Rc;Gb6mbcbhlinaCalfhidndndndndnaAalco4fRbbgXciGPlbedibkaipxbbbbbbbbbbbbbbbbpklbxikaiaopbblaopbbbgQclp:meaQpmbzeHdOiAlCvXoQrLgQcdp:meaQpmbzeHdOiAlCvXoQrLpxiiiiiiiiiiiiiiiip9ogLpxiiiiiiiiiiiiiiiip8JgQp5b9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibaKc:q:yjjbfpbbbgYaYpmbbbbbbbbbbbbbbbbaQp5e9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibp9UpmbedilvorzHOACXQLpPaLaQp9spklbaoclfaYpQbfaKc:q:yjjbfRbbfhoxdkaiaopbbwaopbbbgQclp:meaQpmbzeHdOiAlCvXoQrLpxssssssssssssssssp9ogLpxssssssssssssssssp8JgQp5b9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibaKc:q:yjjbfpbbbgYaYpmbbbbbbbbbbbbbbbbaQp5e9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibp9UpmbedilvorzHOACXQLpPaLaQp9spklbaocwfaYpQbfaKc:q:yjjbfRbbfhoxekaiaopbbbpklbaoczfhokdndndndndnaXcd4ciGPlbedibkaipxbbbbbbbbbbbbbbbbpklzxikaiaopbblaopbbbgQclp:meaQpmbzeHdOiAlCvXoQrLgQcdp:meaQpmbzeHdOiAlCvXoQrLpxiiiiiiiiiiiiiiiip9ogLpxiiiiiiiiiiiiiiiip8JgQp5b9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibaKc:q:yjjbfpbbbgYaYpmbbbbbbbbbbbbbbbbaQp5e9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibp9UpmbedilvorzHOACXQLpPaLaQp9spklzaoclfaYpQbfaKc:q:yjjbfRbbfhoxdkaiaopbbwaopbbbgQclp:meaQpmbzeHdOiAlCvXoQrLpxssssssssssssssssp9ogLpxssssssssssssssssp8JgQp5b9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibaKc:q:yjjbfpbbbgYaYpmbbbbbbbbbbbbbbbbaQp5e9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibp9UpmbedilvorzHOACXQLpPaLaQp9spklzaocwfaYpQbfaKc:q:yjjbfRbbfhoxekaiaopbbbpklzaoczfhokdndndndndnaXcl4ciGPlbedibkaipxbbbbbbbbbbbbbbbbpklaxikaiaopbblaopbbbgQclp:meaQpmbzeHdOiAlCvXoQrLgQcdp:meaQpmbzeHdOiAlCvXoQrLpxiiiiiiiiiiiiiiiip9ogLpxiiiiiiiiiiiiiiiip8JgQp5b9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibaKc:q:yjjbfpbbbgYaYpmbbbbbbbbbbbbbbbbaQp5e9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibp9UpmbedilvorzHOACXQLpPaLaQp9spklaaoclfaYpQbfaKc:q:yjjbfRbbfhoxdkaiaopbbwaopbbbgQclp:meaQpmbzeHdOiAlCvXoQrLpxssssssssssssssssp9ogLpxssssssssssssssssp8JgQp5b9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibaKc:q:yjjbfpbbbgYaYpmbbbbbbbbbbbbbbbbaQp5e9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibp9UpmbedilvorzHOACXQLpPaLaQp9spklaaocwfaYpQbfaKc:q:yjjbfRbbfhoxekaiaopbbbpklaaoczfhokdndndndndnaXco4Plbedibkaipxbbbbbbbbbbbbbbbbpkl8WxikaiaopbblaopbbbgQclp:meaQpmbzeHdOiAlCvXoQrLgQcdp:meaQpmbzeHdOiAlCvXoQrLpxiiiiiiiiiiiiiiiip9ogLpxiiiiiiiiiiiiiiiip8JgQp5b9cjF;8;4;W;G;ab9:9cU1:NgXcitc:q1jjbfpbibaXc:q:yjjbfpbbbgYaYpmbbbbbbbbbbbbbbbbaQp5e9cjF;8;4;W;G;ab9:9cU1:NgXcitc:q1jjbfpbibp9UpmbedilvorzHOACXQLpPaLaQp9spkl8WaoclfaYpQbfaXc:q:yjjbfRbbfhoxdkaiaopbbwaopbbbgQclp:meaQpmbzeHdOiAlCvXoQrLpxssssssssssssssssp9ogLpxssssssssssssssssp8JgQp5b9cjF;8;4;W;G;ab9:9cU1:NgXcitc:q1jjbfpbibaXc:q:yjjbfpbbbgYaYpmbbbbbbbbbbbbbbbbaQp5e9cjF;8;4;W;G;ab9:9cU1:NgXcitc:q1jjbfpbibp9UpmbedilvorzHOACXQLpPaLaQp9spkl8WaocwfaYpQbfaXc:q:yjjbfRbbfhoxekaiaopbbbpkl8Waoczfhokalc;abfhialcjefak0meaihlarao9Rc;Fb0mbkkdnaiak9pmbaici4hlinarao9RcK6miaCaifhXdndndndndnaAaico4fRbbalcoG4ciGPlbedibkaXpxbbbbbbbbbbbbbbbbpkbbxikaXaopbblaopbbbgQclp:meaQpmbzeHdOiAlCvXoQrLgQcdp:meaQpmbzeHdOiAlCvXoQrLpxiiiiiiiiiiiiiiiip9ogLpxiiiiiiiiiiiiiiiip8JgQp5b9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibaKc:q:yjjbfpbbbgYaYpmbbbbbbbbbbbbbbbbaQp5e9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibp9UpmbedilvorzHOACXQLpPaLaQp9spkbbaoclfaYpQbfaKc:q:yjjbfRbbfhoxdkaXaopbbwaopbbbgQclp:meaQpmbzeHdOiAlCvXoQrLpxssssssssssssssssp9ogLpxssssssssssssssssp8JgQp5b9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibaKc:q:yjjbfpbbbgYaYpmbbbbbbbbbbbbbbbbaQp5e9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibp9UpmbedilvorzHOACXQLpPaLaQp9spkbbaocwfaYpQbfaKc:q:yjjbfRbbfhoxekaXaopbbbpkbbaoczfhokalcdfhlaiczfgiak6mbkkaoTmeaohAaOcefgOclSmdxbkkc9:hoxlkdnakTmbavcjdfaHfhiavaHfpbdbhYcbhXinaiavcj;cbfaXfglpblbgLcep9TaLpxeeeeeeeeeeeeeeeegQp9op9Hp9rgLalakfpblbg8Acep9Ta8AaQp9op9Hp9rg8ApmbzeHdOiAlCvXoQrLgEalamfpblbg3cep9Ta3aQp9op9Hp9rg3alaxfpblbg5cep9Ta5aQp9op9Hp9rg5pmbzeHdOiAlCvXoQrLg8EpmbezHdiOAlvCXorQLgQaQpmbedibedibedibediaYp9UgYp9AdbbaiadfglaYaQaQpmlvorlvorlvorlvorp9UgYp9AdbbaladfglaYaQaQpmwDqkwDqkwDqkwDqkp9UgYp9AdbbaladfglaYaQaQpmxmPsxmPsxmPsxmPsp9UgYp9AdbbaladfglaYaEa8EpmwDKYqk8AExm35Ps8E8FgQaQpmbedibedibedibedip9UgYp9AdbbaladfglaYaQaQpmlvorlvorlvorlvorp9UgYp9AdbbaladfglaYaQaQpmwDqkwDqkwDqkwDqkp9UgYp9AdbbaladfglaYaQaQpmxmPsxmPsxmPsxmPsp9UgYp9AdbbaladfglaYaLa8ApmwKDYq8AkEx3m5P8Es8FgLa3a5pmwKDYq8AkEx3m5P8Es8Fg8ApmbezHdiOAlvCXorQLgQaQpmbedibedibedibedip9UgYp9AdbbaladfglaYaQaQpmlvorlvorlvorlvorp9UgYp9AdbbaladfglaYaQaQpmwDqkwDqkwDqkwDqkp9UgYp9AdbbaladfglaYaQaQpmxmPsxmPsxmPsxmPsp9UgYp9AdbbaladfglaYaLa8ApmwDKYqk8AExm35Ps8E8FgQaQpmbedibedibedibedip9UgYp9AdbbaladfglaYaQaQpmlvorlvorlvorlvorp9UgYp9AdbbaladfglaYaQaQpmwDqkwDqkwDqkwDqkp9UgYp9AdbbaladfglaYaQaQpmxmPsxmPsxmPsxmPsp9UgYp9AdbbaladfhiaXczfgXak6mbkkaHclfgHad6mbkasavcjdfaqad2;8qbbavavcjdfaqcufad2fad;8qbbaqaDfgDae6mbkkcbc99arao9Radcaadca0ESEhokavcj;kbf8Kjjjjbaokwbz:bjjjbk::seHu8Jjjjjbc;ae9Rgv8Kjjjjbc9:hodnaeci9UgrcHfal0mbcuhoaiRbbgwc;WeGc;Ge9hmbawcsGgwce0mbavc;abfcFecje;8kbavcUf9cu83ibavc8Wf9cu83ibavcyf9cu83ibavcaf9cu83ibavcKf9cu83ibavczf9cu83ibav9cu83iwav9cu83ibaialfc9WfhDaicefgqarfhidnaeTmbcmcsawceSEhkcbhxcbhmcbhPcbhwcbhlindnaiaD9nmbc9:hoxikdndnaqRbbgoc;Ve0mbavc;abfalaocu7gscl4fcsGcitfgzydlhrazydbhzdnaocsGgHak9pmbavawasfcsGcdtfydbaxaHEhoaHThsdndnadcd9hmbabaPcetfgHaz87ebaHclfao87ebaHcdfar87ebxekabaPcdtfgHazBdbaHcwfaoBdbaHclfarBdbkaxasfhxcdhHavawcdtfaoBdbawasfhwcehsalhOxdkdndnaHcsSmbaHc987aHamffcefhoxekaicefhoai8SbbgHcFeGhsdndnaHcu9mmbaohixekaicvfhiascFbGhscrhHdninao8SbbgOcFbGaHtasVhsaOcu9kmeaocefhoaHcrfgHc8J9hmbxdkkaocefhikasce4cbasceG9R7amfhokdndnadcd9hmbabaPcetfgHaz87ebaHclfao87ebaHcdfar87ebxekabaPcdtfgHazBdbaHcwfaoBdbaHclfarBdbkcdhHavawcdtfaoBdbcehsawcefhwalhOaohmxekdnaocpe0mbaxcefgHavawaDaocsGfRbbgocl49RcsGcdtfydbaocz6gzEhravawao9RcsGcdtfydbaHazfgAaocsGgHEhoaHThCdndnadcd9hmbabaPcetfgHax87ebaHclfao87ebaHcdfar87ebxekabaPcdtfgHaxBdbaHcwfaoBdbaHclfarBdbkcdhsavawcdtfaxBdbavawcefgwcsGcdtfarBdbcihHavc;abfalcitfgOaxBdlaOarBdbavawazfgwcsGcdtfaoBdbalcefcsGhOawaCfhwaxhzaAaCfhxxekaxcbaiRbbgOEgzaoc;:eSgHfhraOcsGhCaOcl4hAdndnaOcs0mbarcefhoxekarhoavawaA9RcsGcdtfydbhrkdndnaCmbaocefhxxekaohxavawaO9RcsGcdtfydbhokdndnaHTmbaicefhHxekaicdfhHai8SbegscFeGhzdnascu9kmbaicofhXazcFbGhzcrhidninaH8SbbgscFbGaitazVhzascu9kmeaHcefhHaicrfgic8J9hmbkaXhHxekaHcefhHkazce4cbazceG9R7amfgmhzkdndnaAcsSmbaHhsxekaHcefhsaH8SbbgicFeGhrdnaicu9kmbaHcvfhXarcFbGhrcrhidninas8SbbgHcFbGaitarVhraHcu9kmeascefhsaicrfgic8J9hmbkaXhsxekascefhskarce4cbarceG9R7amfgmhrkdndnaCcsSmbashixekascefhias8SbbgocFeGhHdnaocu9kmbascvfhXaHcFbGhHcrhodninai8SbbgscFbGaotaHVhHascu9kmeaicefhiaocrfgoc8J9hmbkaXhixekaicefhikaHce4cbaHceG9R7amfgmhokdndnadcd9hmbabaPcetfgHaz87ebaHclfao87ebaHcdfar87ebxekabaPcdtfgHazBdbaHcwfaoBdbaHclfarBdbkcdhsavawcdtfazBdbavawcefgwcsGcdtfarBdbcihHavc;abfalcitfgXazBdlaXarBdbavawaOcz6aAcsSVfgwcsGcdtfaoBdbawaCTaCcsSVfhwalcefcsGhOkaqcefhqavc;abfaOcitfgOarBdlaOaoBdbavc;abfalasfcsGcitfgraoBdlarazBdbawcsGhwalaHfcsGhlaPcifgPae6mbkkcbc99aiaDSEhokavc;aef8Kjjjjbaok:flevu8Jjjjjbcz9Rhvc9:hodnaecvfal0mbcuhoaiRbbc;:eGc;qe9hmbav9cb83iwaicefhraialfc98fhwdnaeTmbdnadcdSmbcbhDindnaraw6mbc9:skarcefhoar8SbbglcFeGhidndnalcu9mmbaohrxekarcvfhraicFbGhicrhldninao8SbbgdcFbGaltaiVhiadcu9kmeaocefhoalcrfglc8J9hmbxdkkaocefhrkabaDcdtfaic8Etc8F91aicd47avcwfaiceGcdtVgoydbfglBdbaoalBdbaDcefgDae9hmbxdkkcbhDindnaraw6mbc9:skarcefhoar8SbbglcFeGhidndnalcu9mmbaohrxekarcvfhraicFbGhicrhldninao8SbbgdcFbGaltaiVhiadcu9kmeaocefhoalcrfglc8J9hmbxdkkaocefhrkabaDcetfaic8Etc8F91aicd47avcwfaiceGcdtVgoydbfgl87ebaoalBdbaDcefgDae9hmbkkcbc99arawSEhokaok:wPliuo97eue978Jjjjjbca9Rhiaec98Ghldndnadcl9hmbdnalTmbcbhvabhdinadadpbbbgocKp:RecKp:Sep;6egraocwp:RecKp:Sep;6earp;Geaoczp:RecKp:Sep;6egwp;Gep;Kep;LegDpxbbbbbbbbbbbbbbbbp:2egqarpxbbbjbbbjbbbjbbbjgkp9op9rp;Kegrpxbb;:9cbb;:9cbb;:9cbb;:9cararp;MeaDaDp;Meawaqawakp9op9rp;Kegrarp;Mep;Kep;Kep;Jep;Negwp;Mepxbbn0bbn0bbn0bbn0gqp;KepxFbbbFbbbFbbbFbbbp9oaopxbbbFbbbFbbbFbbbFp9op9qarawp;Meaqp;Kecwp:RepxbFbbbFbbbFbbbFbbp9op9qaDawp;Meaqp;Keczp:RepxbbFbbbFbbbFbbbFbp9op9qpkbbadczfhdavclfgval6mbkkalaeSmeaipxbbbbbbbbbbbbbbbbgqpklbaiabalcdtfgdaeciGglcdtgv;8qbbdnalTmbaiaipblbgocKp:RecKp:Sep;6egraocwp:RecKp:Sep;6earp;Geaoczp:RecKp:Sep;6egwp;Gep;Kep;LegDaqp:2egqarpxbbbjbbbjbbbjbbbjgkp9op9rp;Kegrpxbb;:9cbb;:9cbb;:9cbb;:9cararp;MeaDaDp;Meawaqawakp9op9rp;Kegrarp;Mep;Kep;Kep;Jep;Negwp;Mepxbbn0bbn0bbn0bbn0gqp;KepxFbbbFbbbFbbbFbbbp9oaopxbbbFbbbFbbbFbbbFp9op9qarawp;Meaqp;Kecwp:RepxbFbbbFbbbFbbbFbbp9op9qaDawp;Meaqp;Keczp:RepxbbFbbbFbbbFbbbFbp9op9qpklbkadaiav;8qbbskdnalTmbcbhvabhdinadczfgxaxpbbbgopxbbbbbbFFbbbbbbFFgkp9oadpbbbgDaopmbediwDqkzHOAKY8AEgwczp:Reczp:Sep;6egraDaopmlvorxmPsCXQL358E8FpxFubbFubbFubbFubbp9op;6eawczp:Sep;6egwp;Gearp;Gep;Kep;Legopxbbbbbbbbbbbbbbbbp:2egqarpxbbbjbbbjbbbjbbbjgmp9op9rp;Kegrpxb;:FSb;:FSb;:FSb;:FSararp;Meaoaop;Meawaqawamp9op9rp;Kegrarp;Mep;Kep;Kep;Jep;Negwp;Mepxbbn0bbn0bbn0bbn0gqp;KepxFFbbFFbbFFbbFFbbp9oaoawp;Meaqp;Keczp:Rep9qgoarawp;Meaqp;KepxFFbbFFbbFFbbFFbbp9ogrpmwDKYqk8AExm35Ps8E8Fp9qpkbbadaDakp9oaoarpmbezHdiOAlvCXorQLp9qpkbbadcafhdavclfgval6mbkkalaeSmbaiaeciGgvcitgdfcbcaad9R;8kbaiabalcitfglad;8qbbdnavTmbaiaipblzgopxbbbbbbFFbbbbbbFFgkp9oaipblbgDaopmbediwDqkzHOAKY8AEgwczp:Reczp:Sep;6egraDaopmlvorxmPsCXQL358E8FpxFubbFubbFubbFubbp9op;6eawczp:Sep;6egwp;Gearp;Gep;Kep;Legopxbbbbbbbbbbbbbbbbp:2egqarpxbbbjbbbjbbbjbbbjgmp9op9rp;Kegrpxb;:FSb;:FSb;:FSb;:FSararp;Meaoaop;Meawaqawamp9op9rp;Kegrarp;Mep;Kep;Kep;Jep;Negwp;Mepxbbn0bbn0bbn0bbn0gqp;KepxFFbbFFbbFFbbFFbbp9oaoawp;Meaqp;Keczp:Rep9qgoarawp;Meaqp;KepxFFbbFFbbFFbbFFbbp9ogrpmwDKYqk8AExm35Ps8E8Fp9qpklzaiaDakp9oaoarpmbezHdiOAlvCXorQLp9qpklbkalaiad;8qbbkk;4wllue97euv978Jjjjjbc8W9Rhidnaec98GglTmbcbhvabhoinaiaopbbbgraoczfgwpbbbgDpmlvorxmPsCXQL358E8Fgqczp:Segkclp:RepklbaopxbbjZbbjZbbjZbbjZpx;Zl81Z;Zl81Z;Zl81Z;Zl81Zakpxibbbibbbibbbibbbp9qp;6ep;NegkaraDpmbediwDqkzHOAKY8AEgrczp:Reczp:Sep;6ep;MegDaDp;Meakarczp:Sep;6ep;Megxaxp;Meakaqczp:Reczp:Sep;6ep;Megqaqp;Mep;Kep;Kep;Lepxbbbbbbbbbbbbbbbbp:4ep;Jepxb;:FSb;:FSb;:FSb;:FSgkp;Mepxbbn0bbn0bbn0bbn0grp;KepxFFbbFFbbFFbbFFbbgmp9oaxakp;Mearp;Keczp:Rep9qgxaDakp;Mearp;Keamp9oaqakp;Mearp;Keczp:Rep9qgkpmbezHdiOAlvCXorQLgrp5baipblbpEb:T:j83ibaocwfarp5eaipblbpEe:T:j83ibawaxakpmwDKYqk8AExm35Ps8E8Fgkp5baipblbpEd:T:j83ibaocKfakp5eaipblbpEi:T:j83ibaocafhoavclfgval6mbkkdnalaeSmbaiaeciGgvcitgofcbcaao9R;8kbaiabalcitfgwao;8qbbdnavTmbaiaipblbgraipblzgDpmlvorxmPsCXQL358E8Fgqczp:Segkclp:RepklaaipxbbjZbbjZbbjZbbjZpx;Zl81Z;Zl81Z;Zl81Z;Zl81Zakpxibbbibbbibbbibbbp9qp;6ep;NegkaraDpmbediwDqkzHOAKY8AEgrczp:Reczp:Sep;6ep;MegDaDp;Meakarczp:Sep;6ep;Megxaxp;Meakaqczp:Reczp:Sep;6ep;Megqaqp;Mep;Kep;Kep;Lepxbbbbbbbbbbbbbbbbp:4ep;Jepxb;:FSb;:FSb;:FSb;:FSgkp;Mepxbbn0bbn0bbn0bbn0grp;KepxFFbbFFbbFFbbFFbbgmp9oaxakp;Mearp;Keczp:Rep9qgxaDakp;Mearp;Keamp9oaqakp;Mearp;Keczp:Rep9qgkpmbezHdiOAlvCXorQLgrp5baipblapEb:T:j83ibaiarp5eaipblapEe:T:j83iwaiaxakpmwDKYqk8AExm35Ps8E8Fgkp5baipblapEd:T:j83izaiakp5eaipblapEi:T:j83iKkawaiao;8qbbkk:Pddiue978Jjjjjbc;ab9Rhidnadcd4ae2glc98GgvTmbcbheabhdinadadpbbbgocwp:Recwp:Sep;6eaocep:SepxbbjFbbjFbbjFbbjFp9opxbbjZbbjZbbjZbbjZp:Uep;Mepkbbadczfhdaeclfgeav6mbkkdnavalSmbaialciGgecdtgdVcbc;abad9R;8kbaiabavcdtfgvad;8qbbdnaeTmbaiaipblbgocwp:Recwp:Sep;6eaocep:SepxbbjFbbjFbbjFbbjFp9opxbbjZbbjZbbjZbbjZp:Uep;Mepklbkavaiad;8qbbkk9teiucbcbydj1jjbgeabcifc98GfgbBdj1jjbdndnabZbcztgd9nmbcuhiabad9RcFFifcz4nbcuSmekaehikaikkkebcjwklz:Dbb",e=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]),i=new Uint8Array([32,0,65,2,1,106,34,33,3,128,11,4,13,64,6,253,10,7,15,116,127,5,8,12,40,16,19,54,20,9,27,255,113,17,42,67,24,23,146,148,18,14,22,45,70,69,56,114,101,21,25,63,75,136,108,28,118,29,73,115]);if(typeof WebAssembly!="object")return{supported:!1};var s=WebAssembly.validate(e)?a(t):a(l),n,r=WebAssembly.instantiate(s,{}).then(function(f){n=f.instance,n.exports.__wasm_call_ctors()});function a(f){for(var m=new Uint8Array(f.length),C=0;C<f.length;++C){var B=f.charCodeAt(C);m[C]=B>96?B-97:B>64?B-39:B+4}for(var E=0,C=0;C<f.length;++C)m[E++]=m[C]<60?i[m[C]]:(m[C]-60)*64+m[++C];return m.buffer.slice(0,E)}function A(f,m,C,B,E,Q,y){var x=f.exports.sbrk,F=B+3&-4,k=x(F*E),T=x(Q.length),P=new Uint8Array(f.exports.memory.buffer);P.set(Q,T);var L=m(k,B,E,T,Q.length);if(L==0&&y&&y(k,F,E),C.set(P.subarray(k,k+B*E)),x(k-x(0)),L!=0)throw new Error("Malformed buffer data: "+L)}var o={NONE:"",OCTAHEDRAL:"meshopt_decodeFilterOct",QUATERNION:"meshopt_decodeFilterQuat",EXPONENTIAL:"meshopt_decodeFilterExp"},h={ATTRIBUTES:"meshopt_decodeVertexBuffer",TRIANGLES:"meshopt_decodeIndexBuffer",INDICES:"meshopt_decodeIndexSequence"},c=[],u=0;function d(f){var m={object:new Worker(f),pending:0,requests:{}};return m.object.onmessage=function(C){var B=C.data;m.pending-=B.count,m.requests[B.id][B.action](B.value),delete m.requests[B.id]},m}function g(f){for(var m="self.ready = WebAssembly.instantiate(new Uint8Array(["+new Uint8Array(s)+"]), {}).then(function(result) { result.instance.exports.__wasm_call_ctors(); return result.instance; });self.onmessage = "+b.name+";"+A.toString()+b.toString(),C=new Blob([m],{type:"text/javascript"}),B=URL.createObjectURL(C),E=c.length;E<f;++E)c[E]=d(B);for(var E=f;E<c.length;++E)c[E].object.postMessage({});c.length=f,URL.revokeObjectURL(B)}function p(f,m,C,B,E){for(var Q=c[0],y=1;y<c.length;++y)c[y].pending<Q.pending&&(Q=c[y]);return new Promise(function(x,F){var k=new Uint8Array(C),T=++u;Q.pending+=f,Q.requests[T]={resolve:x,reject:F},Q.object.postMessage({id:T,count:f,size:m,source:k,mode:B,filter:E},[k.buffer])})}function b(f){var m=f.data;if(!m.id)return self.close();self.ready.then(function(C){try{var B=new Uint8Array(m.count*m.size);A(C,C.exports[m.mode],B,m.count,m.size,m.source,C.exports[m.filter]),self.postMessage({id:m.id,count:m.count,action:"resolve",value:B},[B.buffer])}catch(E){self.postMessage({id:m.id,count:m.count,action:"reject",value:E})}})}return{ready:r,supported:!0,useWorkers:function(f){g(f)},decodeVertexBuffer:function(f,m,C,B,E){A(n,n.exports.meshopt_decodeVertexBuffer,f,m,C,B,n.exports[o[E]])},decodeIndexBuffer:function(f,m,C,B){A(n,n.exports.meshopt_decodeIndexBuffer,f,m,C,B)},decodeIndexSequence:function(f,m,C,B){A(n,n.exports.meshopt_decodeIndexSequence,f,m,C,B)},decodeGltfBuffer:function(f,m,C,B,E,Q){A(n,n.exports[h[E]],f,m,C,B,n.exports[o[Q]])},decodeGltfBufferAsync:function(f,m,C,B,E){return c.length>0?p(f,m,C,h[B],o[E]):r.then(function(){var Q=new Uint8Array(f*m);return A(n,n.exports[h[B]],Q,f,m,C,n.exports[o[E]]),Q})}}}();/**
2
+ * @license
3
+ * Copyright 2010-2025 Three.js Authors
4
+ * SPDX-License-Identifier: MIT
5
+ */const Js="180",We=0,ia=1,sa=2,Vs=1,Ks=100,Ys=204,Ws=205,Xs=3,na=0,Zs="attached",ra="detached",$s=300,aa=301,Fe=1e3,Vt=1001,Di=1002,Rt=1003,tn=1004,Aa=1005,Lt=1006,oa=1007,ke=1008,D=1009,Gt=1015,Kt=1016,en=35902,sn=35899,_i=1022,Nt=1023,ne=1028,Te=1030,nn=33776,Ri=33777,rn=33778,ha=33779,ca=35840,Li=35842,an=35843,la=36196,An=37492,on=37496,Xe=37808,Gi=37812,Ni=36492,ua=36495,da=36283,ga=36284,pa=36285,fa=36286,De=2300,_e=2301,Ui=2302,hn=2400,cn=2401,ln=2402,ba=2500,ma=0,un=1,zi=2,Ia=0,Ze="",N="srgb",Z="srgb-linear",dn="linear",vi="srgb",re=7680,gn=519,Hi=35044,Yt=2e3,Oi=2001;class $e{addEventListener(t,e){this._listeners===void 0&&(this._listeners={});const i=this._listeners;i[t]===void 0&&(i[t]=[]),i[t].indexOf(e)===-1&&i[t].push(e)}hasEventListener(t,e){const i=this._listeners;return i===void 0?!1:i[t]!==void 0&&i[t].indexOf(e)!==-1}removeEventListener(t,e){const i=this._listeners;if(i===void 0)return;const s=i[t];if(s!==void 0){const n=s.indexOf(e);n!==-1&&s.splice(n,1)}}dispatchEvent(t){const e=this._listeners;if(e===void 0)return;const i=e[t.type];if(i!==void 0){t.target=this;const s=i.slice(0);for(let n=0,r=s.length;n<r;n++)s[n].call(this,t);t.target=null}}}const J=["00","01","02","03","04","05","06","07","08","09","0a","0b","0c","0d","0e","0f","10","11","12","13","14","15","16","17","18","19","1a","1b","1c","1d","1e","1f","20","21","22","23","24","25","26","27","28","29","2a","2b","2c","2d","2e","2f","30","31","32","33","34","35","36","37","38","39","3a","3b","3c","3d","3e","3f","40","41","42","43","44","45","46","47","48","49","4a","4b","4c","4d","4e","4f","50","51","52","53","54","55","56","57","58","59","5a","5b","5c","5d","5e","5f","60","61","62","63","64","65","66","67","68","69","6a","6b","6c","6d","6e","6f","70","71","72","73","74","75","76","77","78","79","7a","7b","7c","7d","7e","7f","80","81","82","83","84","85","86","87","88","89","8a","8b","8c","8d","8e","8f","90","91","92","93","94","95","96","97","98","99","9a","9b","9c","9d","9e","9f","a0","a1","a2","a3","a4","a5","a6","a7","a8","a9","aa","ab","ac","ad","ae","af","b0","b1","b2","b3","b4","b5","b6","b7","b8","b9","ba","bb","bc","bd","be","bf","c0","c1","c2","c3","c4","c5","c6","c7","c8","c9","ca","cb","cc","cd","ce","cf","d0","d1","d2","d3","d4","d5","d6","d7","d8","d9","da","db","dc","dd","de","df","e0","e1","e2","e3","e4","e5","e6","e7","e8","e9","ea","eb","ec","ed","ee","ef","f0","f1","f2","f3","f4","f5","f6","f7","f8","f9","fa","fb","fc","fd","fe","ff"];let pn=1234567;const Re=Math.PI/180,Le=180/Math.PI;function At(){const l=Math.random()*4294967295|0,t=Math.random()*4294967295|0,e=Math.random()*4294967295|0,i=Math.random()*4294967295|0;return(J[l&255]+J[l>>8&255]+J[l>>16&255]+J[l>>24&255]+"-"+J[t&255]+J[t>>8&255]+"-"+J[t>>16&15|64]+J[t>>24&255]+"-"+J[e&63|128]+J[e>>8&255]+"-"+J[e>>16&255]+J[e>>24&255]+J[i&255]+J[i>>8&255]+J[i>>16&255]+J[i>>24&255]).toLowerCase()}function w(l,t,e){return Math.max(t,Math.min(e,l))}function qi(l,t){return(l%t+t)%t}function Ba(l,t,e,i,s){return i+(l-t)*(s-i)/(e-t)}function Ca(l,t,e){return l!==t?(e-l)/(t-l):0}function Ge(l,t,e){return(1-e)*l+e*t}function Ea(l,t,e,i){return Ge(l,t,1-Math.exp(-e*i))}function ya(l,t=1){return t-Math.abs(qi(l,t*2)-t)}function Qa(l,t,e){return l<=t?0:l>=e?1:(l=(l-t)/(e-t),l*l*(3-2*l))}function xa(l,t,e){return l<=t?0:l>=e?1:(l=(l-t)/(e-t),l*l*l*(l*(l*6-15)+10))}function wa(l,t){return l+Math.floor(Math.random()*(t-l+1))}function Ma(l,t){return l+Math.random()*(t-l)}function Sa(l){return l*(.5-Math.random())}function Fa(l){l!==void 0&&(pn=l);let t=pn+=1831565813;return t=Math.imul(t^t>>>15,t|1),t^=t+Math.imul(t^t>>>7,t|61),((t^t>>>14)>>>0)/4294967296}function ka(l){return l*Re}function Ta(l){return l*Le}function Da(l){return(l&l-1)===0&&l!==0}function _a(l){return Math.pow(2,Math.ceil(Math.log(l)/Math.LN2))}function Ra(l){return Math.pow(2,Math.floor(Math.log(l)/Math.LN2))}function La(l,t,e,i,s){const n=Math.cos,r=Math.sin,a=n(e/2),A=r(e/2),o=n((t+i)/2),h=r((t+i)/2),c=n((t-i)/2),u=r((t-i)/2),d=n((i-t)/2),g=r((i-t)/2);switch(s){case"XYX":l.set(a*h,A*c,A*u,a*o);break;case"YZY":l.set(A*u,a*h,A*c,a*o);break;case"ZXZ":l.set(A*c,A*u,a*h,a*o);break;case"XZX":l.set(a*h,A*g,A*d,a*o);break;case"YXY":l.set(A*d,a*h,A*g,a*o);break;case"ZYZ":l.set(A*g,A*d,a*h,a*o);break;default:console.warn("THREE.MathUtils: .setQuaternionFromProperEuler() encountered an unknown order: "+s)}}function ot(l,t){switch(t.constructor){case Float32Array:return l;case Uint32Array:return l/4294967295;case Uint16Array:return l/65535;case Uint8Array:return l/255;case Int32Array:return Math.max(l/2147483647,-1);case Int16Array:return Math.max(l/32767,-1);case Int8Array:return Math.max(l/127,-1);default:throw new Error("Invalid component type.")}}function _(l,t){switch(t.constructor){case Float32Array:return l;case Uint32Array:return Math.round(l*4294967295);case Uint16Array:return Math.round(l*65535);case Uint8Array:return Math.round(l*255);case Int32Array:return Math.round(l*2147483647);case Int16Array:return Math.round(l*32767);case Int8Array:return Math.round(l*127);default:throw new Error("Invalid component type.")}}const Ga={DEG2RAD:Re,RAD2DEG:Le,generateUUID:At,clamp:w,euclideanModulo:qi,mapLinear:Ba,inverseLerp:Ca,lerp:Ge,damp:Ea,pingpong:ya,smoothstep:Qa,smootherstep:xa,randInt:wa,randFloat:Ma,randFloatSpread:Sa,seededRandom:Fa,degToRad:ka,radToDeg:Ta,isPowerOfTwo:Da,ceilPowerOfTwo:_a,floorPowerOfTwo:Ra,setQuaternionFromProperEuler:La,normalize:_,denormalize:ot};class U{constructor(t=0,e=0){U.prototype.isVector2=!0,this.x=t,this.y=e}get width(){return this.x}set width(t){this.x=t}get height(){return this.y}set height(t){this.y=t}set(t,e){return this.x=t,this.y=e,this}setScalar(t){return this.x=t,this.y=t,this}setX(t){return this.x=t,this}setY(t){return this.y=t,this}setComponent(t,e){switch(t){case 0:this.x=e;break;case 1:this.y=e;break;default:throw new Error("index is out of range: "+t)}return this}getComponent(t){switch(t){case 0:return this.x;case 1:return this.y;default:throw new Error("index is out of range: "+t)}}clone(){return new this.constructor(this.x,this.y)}copy(t){return this.x=t.x,this.y=t.y,this}add(t){return this.x+=t.x,this.y+=t.y,this}addScalar(t){return this.x+=t,this.y+=t,this}addVectors(t,e){return this.x=t.x+e.x,this.y=t.y+e.y,this}addScaledVector(t,e){return this.x+=t.x*e,this.y+=t.y*e,this}sub(t){return this.x-=t.x,this.y-=t.y,this}subScalar(t){return this.x-=t,this.y-=t,this}subVectors(t,e){return this.x=t.x-e.x,this.y=t.y-e.y,this}multiply(t){return this.x*=t.x,this.y*=t.y,this}multiplyScalar(t){return this.x*=t,this.y*=t,this}divide(t){return this.x/=t.x,this.y/=t.y,this}divideScalar(t){return this.multiplyScalar(1/t)}applyMatrix3(t){const e=this.x,i=this.y,s=t.elements;return this.x=s[0]*e+s[3]*i+s[6],this.y=s[1]*e+s[4]*i+s[7],this}min(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this}max(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this}clamp(t,e){return this.x=w(this.x,t.x,e.x),this.y=w(this.y,t.y,e.y),this}clampScalar(t,e){return this.x=w(this.x,t,e),this.y=w(this.y,t,e),this}clampLength(t,e){const i=this.length();return this.divideScalar(i||1).multiplyScalar(w(i,t,e))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this}negate(){return this.x=-this.x,this.y=-this.y,this}dot(t){return this.x*t.x+this.y*t.y}cross(t){return this.x*t.y-this.y*t.x}lengthSq(){return this.x*this.x+this.y*this.y}length(){return Math.sqrt(this.x*this.x+this.y*this.y)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)}normalize(){return this.divideScalar(this.length()||1)}angle(){return Math.atan2(-this.y,-this.x)+Math.PI}angleTo(t){const e=Math.sqrt(this.lengthSq()*t.lengthSq());if(e===0)return Math.PI/2;const i=this.dot(t)/e;return Math.acos(w(i,-1,1))}distanceTo(t){return Math.sqrt(this.distanceToSquared(t))}distanceToSquared(t){const e=this.x-t.x,i=this.y-t.y;return e*e+i*i}manhattanDistanceTo(t){return Math.abs(this.x-t.x)+Math.abs(this.y-t.y)}setLength(t){return this.normalize().multiplyScalar(t)}lerp(t,e){return this.x+=(t.x-this.x)*e,this.y+=(t.y-this.y)*e,this}lerpVectors(t,e,i){return this.x=t.x+(e.x-t.x)*i,this.y=t.y+(e.y-t.y)*i,this}equals(t){return t.x===this.x&&t.y===this.y}fromArray(t,e=0){return this.x=t[e],this.y=t[e+1],this}toArray(t=[],e=0){return t[e]=this.x,t[e+1]=this.y,t}fromBufferAttribute(t,e){return this.x=t.getX(e),this.y=t.getY(e),this}rotateAround(t,e){const i=Math.cos(e),s=Math.sin(e),n=this.x-t.x,r=this.y-t.y;return this.x=n*i-r*s+t.x,this.y=n*s+r*i+t.y,this}random(){return this.x=Math.random(),this.y=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y}}class Ut{constructor(t=0,e=0,i=0,s=1){this.isQuaternion=!0,this._x=t,this._y=e,this._z=i,this._w=s}static slerpFlat(t,e,i,s,n,r,a){let A=i[s+0],o=i[s+1],h=i[s+2],c=i[s+3];const u=n[r+0],d=n[r+1],g=n[r+2],p=n[r+3];if(a===0){t[e+0]=A,t[e+1]=o,t[e+2]=h,t[e+3]=c;return}if(a===1){t[e+0]=u,t[e+1]=d,t[e+2]=g,t[e+3]=p;return}if(c!==p||A!==u||o!==d||h!==g){let b=1-a;const f=A*u+o*d+h*g+c*p,m=f>=0?1:-1,C=1-f*f;if(C>Number.EPSILON){const E=Math.sqrt(C),Q=Math.atan2(E,f*m);b=Math.sin(b*Q)/E,a=Math.sin(a*Q)/E}const B=a*m;if(A=A*b+u*B,o=o*b+d*B,h=h*b+g*B,c=c*b+p*B,b===1-a){const E=1/Math.sqrt(A*A+o*o+h*h+c*c);A*=E,o*=E,h*=E,c*=E}}t[e]=A,t[e+1]=o,t[e+2]=h,t[e+3]=c}static multiplyQuaternionsFlat(t,e,i,s,n,r){const a=i[s],A=i[s+1],o=i[s+2],h=i[s+3],c=n[r],u=n[r+1],d=n[r+2],g=n[r+3];return t[e]=a*g+h*c+A*d-o*u,t[e+1]=A*g+h*u+o*c-a*d,t[e+2]=o*g+h*d+a*u-A*c,t[e+3]=h*g-a*c-A*u-o*d,t}get x(){return this._x}set x(t){this._x=t,this._onChangeCallback()}get y(){return this._y}set y(t){this._y=t,this._onChangeCallback()}get z(){return this._z}set z(t){this._z=t,this._onChangeCallback()}get w(){return this._w}set w(t){this._w=t,this._onChangeCallback()}set(t,e,i,s){return this._x=t,this._y=e,this._z=i,this._w=s,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._w)}copy(t){return this._x=t.x,this._y=t.y,this._z=t.z,this._w=t.w,this._onChangeCallback(),this}setFromEuler(t,e=!0){const i=t._x,s=t._y,n=t._z,r=t._order,a=Math.cos,A=Math.sin,o=a(i/2),h=a(s/2),c=a(n/2),u=A(i/2),d=A(s/2),g=A(n/2);switch(r){case"XYZ":this._x=u*h*c+o*d*g,this._y=o*d*c-u*h*g,this._z=o*h*g+u*d*c,this._w=o*h*c-u*d*g;break;case"YXZ":this._x=u*h*c+o*d*g,this._y=o*d*c-u*h*g,this._z=o*h*g-u*d*c,this._w=o*h*c+u*d*g;break;case"ZXY":this._x=u*h*c-o*d*g,this._y=o*d*c+u*h*g,this._z=o*h*g+u*d*c,this._w=o*h*c-u*d*g;break;case"ZYX":this._x=u*h*c-o*d*g,this._y=o*d*c+u*h*g,this._z=o*h*g-u*d*c,this._w=o*h*c+u*d*g;break;case"YZX":this._x=u*h*c+o*d*g,this._y=o*d*c+u*h*g,this._z=o*h*g-u*d*c,this._w=o*h*c-u*d*g;break;case"XZY":this._x=u*h*c-o*d*g,this._y=o*d*c-u*h*g,this._z=o*h*g+u*d*c,this._w=o*h*c+u*d*g;break;default:console.warn("THREE.Quaternion: .setFromEuler() encountered an unknown order: "+r)}return e===!0&&this._onChangeCallback(),this}setFromAxisAngle(t,e){const i=e/2,s=Math.sin(i);return this._x=t.x*s,this._y=t.y*s,this._z=t.z*s,this._w=Math.cos(i),this._onChangeCallback(),this}setFromRotationMatrix(t){const e=t.elements,i=e[0],s=e[4],n=e[8],r=e[1],a=e[5],A=e[9],o=e[2],h=e[6],c=e[10],u=i+a+c;if(u>0){const d=.5/Math.sqrt(u+1);this._w=.25/d,this._x=(h-A)*d,this._y=(n-o)*d,this._z=(r-s)*d}else if(i>a&&i>c){const d=2*Math.sqrt(1+i-a-c);this._w=(h-A)/d,this._x=.25*d,this._y=(s+r)/d,this._z=(n+o)/d}else if(a>c){const d=2*Math.sqrt(1+a-i-c);this._w=(n-o)/d,this._x=(s+r)/d,this._y=.25*d,this._z=(A+h)/d}else{const d=2*Math.sqrt(1+c-i-a);this._w=(r-s)/d,this._x=(n+o)/d,this._y=(A+h)/d,this._z=.25*d}return this._onChangeCallback(),this}setFromUnitVectors(t,e){let i=t.dot(e)+1;return i<1e-8?(i=0,Math.abs(t.x)>Math.abs(t.z)?(this._x=-t.y,this._y=t.x,this._z=0,this._w=i):(this._x=0,this._y=-t.z,this._z=t.y,this._w=i)):(this._x=t.y*e.z-t.z*e.y,this._y=t.z*e.x-t.x*e.z,this._z=t.x*e.y-t.y*e.x,this._w=i),this.normalize()}angleTo(t){return 2*Math.acos(Math.abs(w(this.dot(t),-1,1)))}rotateTowards(t,e){const i=this.angleTo(t);if(i===0)return this;const s=Math.min(1,e/i);return this.slerp(t,s),this}identity(){return this.set(0,0,0,1)}invert(){return this.conjugate()}conjugate(){return this._x*=-1,this._y*=-1,this._z*=-1,this._onChangeCallback(),this}dot(t){return this._x*t._x+this._y*t._y+this._z*t._z+this._w*t._w}lengthSq(){return this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w}length(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w)}normalize(){let t=this.length();return t===0?(this._x=0,this._y=0,this._z=0,this._w=1):(t=1/t,this._x=this._x*t,this._y=this._y*t,this._z=this._z*t,this._w=this._w*t),this._onChangeCallback(),this}multiply(t){return this.multiplyQuaternions(this,t)}premultiply(t){return this.multiplyQuaternions(t,this)}multiplyQuaternions(t,e){const i=t._x,s=t._y,n=t._z,r=t._w,a=e._x,A=e._y,o=e._z,h=e._w;return this._x=i*h+r*a+s*o-n*A,this._y=s*h+r*A+n*a-i*o,this._z=n*h+r*o+i*A-s*a,this._w=r*h-i*a-s*A-n*o,this._onChangeCallback(),this}slerp(t,e){if(e===0)return this;if(e===1)return this.copy(t);const i=this._x,s=this._y,n=this._z,r=this._w;let a=r*t._w+i*t._x+s*t._y+n*t._z;if(a<0?(this._w=-t._w,this._x=-t._x,this._y=-t._y,this._z=-t._z,a=-a):this.copy(t),a>=1)return this._w=r,this._x=i,this._y=s,this._z=n,this;const A=1-a*a;if(A<=Number.EPSILON){const d=1-e;return this._w=d*r+e*this._w,this._x=d*i+e*this._x,this._y=d*s+e*this._y,this._z=d*n+e*this._z,this.normalize(),this}const o=Math.sqrt(A),h=Math.atan2(o,a),c=Math.sin((1-e)*h)/o,u=Math.sin(e*h)/o;return this._w=r*c+this._w*u,this._x=i*c+this._x*u,this._y=s*c+this._y*u,this._z=n*c+this._z*u,this._onChangeCallback(),this}slerpQuaternions(t,e,i){return this.copy(t).slerp(e,i)}random(){const t=2*Math.PI*Math.random(),e=2*Math.PI*Math.random(),i=Math.random(),s=Math.sqrt(1-i),n=Math.sqrt(i);return this.set(s*Math.sin(t),s*Math.cos(t),n*Math.sin(e),n*Math.cos(e))}equals(t){return t._x===this._x&&t._y===this._y&&t._z===this._z&&t._w===this._w}fromArray(t,e=0){return this._x=t[e],this._y=t[e+1],this._z=t[e+2],this._w=t[e+3],this._onChangeCallback(),this}toArray(t=[],e=0){return t[e]=this._x,t[e+1]=this._y,t[e+2]=this._z,t[e+3]=this._w,t}fromBufferAttribute(t,e){return this._x=t.getX(e),this._y=t.getY(e),this._z=t.getZ(e),this._w=t.getW(e),this._onChangeCallback(),this}toJSON(){return this.toArray()}_onChange(t){return this._onChangeCallback=t,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._w}}class I{constructor(t=0,e=0,i=0){I.prototype.isVector3=!0,this.x=t,this.y=e,this.z=i}set(t,e,i){return i===void 0&&(i=this.z),this.x=t,this.y=e,this.z=i,this}setScalar(t){return this.x=t,this.y=t,this.z=t,this}setX(t){return this.x=t,this}setY(t){return this.y=t,this}setZ(t){return this.z=t,this}setComponent(t,e){switch(t){case 0:this.x=e;break;case 1:this.y=e;break;case 2:this.z=e;break;default:throw new Error("index is out of range: "+t)}return this}getComponent(t){switch(t){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw new Error("index is out of range: "+t)}}clone(){return new this.constructor(this.x,this.y,this.z)}copy(t){return this.x=t.x,this.y=t.y,this.z=t.z,this}add(t){return this.x+=t.x,this.y+=t.y,this.z+=t.z,this}addScalar(t){return this.x+=t,this.y+=t,this.z+=t,this}addVectors(t,e){return this.x=t.x+e.x,this.y=t.y+e.y,this.z=t.z+e.z,this}addScaledVector(t,e){return this.x+=t.x*e,this.y+=t.y*e,this.z+=t.z*e,this}sub(t){return this.x-=t.x,this.y-=t.y,this.z-=t.z,this}subScalar(t){return this.x-=t,this.y-=t,this.z-=t,this}subVectors(t,e){return this.x=t.x-e.x,this.y=t.y-e.y,this.z=t.z-e.z,this}multiply(t){return this.x*=t.x,this.y*=t.y,this.z*=t.z,this}multiplyScalar(t){return this.x*=t,this.y*=t,this.z*=t,this}multiplyVectors(t,e){return this.x=t.x*e.x,this.y=t.y*e.y,this.z=t.z*e.z,this}applyEuler(t){return this.applyQuaternion(fn.setFromEuler(t))}applyAxisAngle(t,e){return this.applyQuaternion(fn.setFromAxisAngle(t,e))}applyMatrix3(t){const e=this.x,i=this.y,s=this.z,n=t.elements;return this.x=n[0]*e+n[3]*i+n[6]*s,this.y=n[1]*e+n[4]*i+n[7]*s,this.z=n[2]*e+n[5]*i+n[8]*s,this}applyNormalMatrix(t){return this.applyMatrix3(t).normalize()}applyMatrix4(t){const e=this.x,i=this.y,s=this.z,n=t.elements,r=1/(n[3]*e+n[7]*i+n[11]*s+n[15]);return this.x=(n[0]*e+n[4]*i+n[8]*s+n[12])*r,this.y=(n[1]*e+n[5]*i+n[9]*s+n[13])*r,this.z=(n[2]*e+n[6]*i+n[10]*s+n[14])*r,this}applyQuaternion(t){const e=this.x,i=this.y,s=this.z,n=t.x,r=t.y,a=t.z,A=t.w,o=2*(r*s-a*i),h=2*(a*e-n*s),c=2*(n*i-r*e);return this.x=e+A*o+r*c-a*h,this.y=i+A*h+a*o-n*c,this.z=s+A*c+n*h-r*o,this}project(t){return this.applyMatrix4(t.matrixWorldInverse).applyMatrix4(t.projectionMatrix)}unproject(t){return this.applyMatrix4(t.projectionMatrixInverse).applyMatrix4(t.matrixWorld)}transformDirection(t){const e=this.x,i=this.y,s=this.z,n=t.elements;return this.x=n[0]*e+n[4]*i+n[8]*s,this.y=n[1]*e+n[5]*i+n[9]*s,this.z=n[2]*e+n[6]*i+n[10]*s,this.normalize()}divide(t){return this.x/=t.x,this.y/=t.y,this.z/=t.z,this}divideScalar(t){return this.multiplyScalar(1/t)}min(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this.z=Math.min(this.z,t.z),this}max(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this.z=Math.max(this.z,t.z),this}clamp(t,e){return this.x=w(this.x,t.x,e.x),this.y=w(this.y,t.y,e.y),this.z=w(this.z,t.z,e.z),this}clampScalar(t,e){return this.x=w(this.x,t,e),this.y=w(this.y,t,e),this.z=w(this.z,t,e),this}clampLength(t,e){const i=this.length();return this.divideScalar(i||1).multiplyScalar(w(i,t,e))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this}dot(t){return this.x*t.x+this.y*t.y+this.z*t.z}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)}normalize(){return this.divideScalar(this.length()||1)}setLength(t){return this.normalize().multiplyScalar(t)}lerp(t,e){return this.x+=(t.x-this.x)*e,this.y+=(t.y-this.y)*e,this.z+=(t.z-this.z)*e,this}lerpVectors(t,e,i){return this.x=t.x+(e.x-t.x)*i,this.y=t.y+(e.y-t.y)*i,this.z=t.z+(e.z-t.z)*i,this}cross(t){return this.crossVectors(this,t)}crossVectors(t,e){const i=t.x,s=t.y,n=t.z,r=e.x,a=e.y,A=e.z;return this.x=s*A-n*a,this.y=n*r-i*A,this.z=i*a-s*r,this}projectOnVector(t){const e=t.lengthSq();if(e===0)return this.set(0,0,0);const i=t.dot(this)/e;return this.copy(t).multiplyScalar(i)}projectOnPlane(t){return Pi.copy(this).projectOnVector(t),this.sub(Pi)}reflect(t){return this.sub(Pi.copy(t).multiplyScalar(2*this.dot(t)))}angleTo(t){const e=Math.sqrt(this.lengthSq()*t.lengthSq());if(e===0)return Math.PI/2;const i=this.dot(t)/e;return Math.acos(w(i,-1,1))}distanceTo(t){return Math.sqrt(this.distanceToSquared(t))}distanceToSquared(t){const e=this.x-t.x,i=this.y-t.y,s=this.z-t.z;return e*e+i*i+s*s}manhattanDistanceTo(t){return Math.abs(this.x-t.x)+Math.abs(this.y-t.y)+Math.abs(this.z-t.z)}setFromSpherical(t){return this.setFromSphericalCoords(t.radius,t.phi,t.theta)}setFromSphericalCoords(t,e,i){const s=Math.sin(e)*t;return this.x=s*Math.sin(i),this.y=Math.cos(e)*t,this.z=s*Math.cos(i),this}setFromCylindrical(t){return this.setFromCylindricalCoords(t.radius,t.theta,t.y)}setFromCylindricalCoords(t,e,i){return this.x=t*Math.sin(e),this.y=i,this.z=t*Math.cos(e),this}setFromMatrixPosition(t){const e=t.elements;return this.x=e[12],this.y=e[13],this.z=e[14],this}setFromMatrixScale(t){const e=this.setFromMatrixColumn(t,0).length(),i=this.setFromMatrixColumn(t,1).length(),s=this.setFromMatrixColumn(t,2).length();return this.x=e,this.y=i,this.z=s,this}setFromMatrixColumn(t,e){return this.fromArray(t.elements,e*4)}setFromMatrix3Column(t,e){return this.fromArray(t.elements,e*3)}setFromEuler(t){return this.x=t._x,this.y=t._y,this.z=t._z,this}setFromColor(t){return this.x=t.r,this.y=t.g,this.z=t.b,this}equals(t){return t.x===this.x&&t.y===this.y&&t.z===this.z}fromArray(t,e=0){return this.x=t[e],this.y=t[e+1],this.z=t[e+2],this}toArray(t=[],e=0){return t[e]=this.x,t[e+1]=this.y,t[e+2]=this.z,t}fromBufferAttribute(t,e){return this.x=t.getX(e),this.y=t.getY(e),this.z=t.getZ(e),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this}randomDirection(){const t=Math.random()*Math.PI*2,e=Math.random()*2-1,i=Math.sqrt(1-e*e);return this.x=i*Math.cos(t),this.y=e,this.z=i*Math.sin(t),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z}}const Pi=new I,fn=new Ut;class Ct{constructor(t,e,i,s,n,r,a,A,o){Ct.prototype.isMatrix3=!0,this.elements=[1,0,0,0,1,0,0,0,1],t!==void 0&&this.set(t,e,i,s,n,r,a,A,o)}set(t,e,i,s,n,r,a,A,o){const h=this.elements;return h[0]=t,h[1]=s,h[2]=a,h[3]=e,h[4]=n,h[5]=A,h[6]=i,h[7]=r,h[8]=o,this}identity(){return this.set(1,0,0,0,1,0,0,0,1),this}copy(t){const e=this.elements,i=t.elements;return e[0]=i[0],e[1]=i[1],e[2]=i[2],e[3]=i[3],e[4]=i[4],e[5]=i[5],e[6]=i[6],e[7]=i[7],e[8]=i[8],this}extractBasis(t,e,i){return t.setFromMatrix3Column(this,0),e.setFromMatrix3Column(this,1),i.setFromMatrix3Column(this,2),this}setFromMatrix4(t){const e=t.elements;return this.set(e[0],e[4],e[8],e[1],e[5],e[9],e[2],e[6],e[10]),this}multiply(t){return this.multiplyMatrices(this,t)}premultiply(t){return this.multiplyMatrices(t,this)}multiplyMatrices(t,e){const i=t.elements,s=e.elements,n=this.elements,r=i[0],a=i[3],A=i[6],o=i[1],h=i[4],c=i[7],u=i[2],d=i[5],g=i[8],p=s[0],b=s[3],f=s[6],m=s[1],C=s[4],B=s[7],E=s[2],Q=s[5],y=s[8];return n[0]=r*p+a*m+A*E,n[3]=r*b+a*C+A*Q,n[6]=r*f+a*B+A*y,n[1]=o*p+h*m+c*E,n[4]=o*b+h*C+c*Q,n[7]=o*f+h*B+c*y,n[2]=u*p+d*m+g*E,n[5]=u*b+d*C+g*Q,n[8]=u*f+d*B+g*y,this}multiplyScalar(t){const e=this.elements;return e[0]*=t,e[3]*=t,e[6]*=t,e[1]*=t,e[4]*=t,e[7]*=t,e[2]*=t,e[5]*=t,e[8]*=t,this}determinant(){const t=this.elements,e=t[0],i=t[1],s=t[2],n=t[3],r=t[4],a=t[5],A=t[6],o=t[7],h=t[8];return e*r*h-e*a*o-i*n*h+i*a*A+s*n*o-s*r*A}invert(){const t=this.elements,e=t[0],i=t[1],s=t[2],n=t[3],r=t[4],a=t[5],A=t[6],o=t[7],h=t[8],c=h*r-a*o,u=a*A-h*n,d=o*n-r*A,g=e*c+i*u+s*d;if(g===0)return this.set(0,0,0,0,0,0,0,0,0);const p=1/g;return t[0]=c*p,t[1]=(s*o-h*i)*p,t[2]=(a*i-s*r)*p,t[3]=u*p,t[4]=(h*e-s*A)*p,t[5]=(s*n-a*e)*p,t[6]=d*p,t[7]=(i*A-o*e)*p,t[8]=(r*e-i*n)*p,this}transpose(){let t;const e=this.elements;return t=e[1],e[1]=e[3],e[3]=t,t=e[2],e[2]=e[6],e[6]=t,t=e[5],e[5]=e[7],e[7]=t,this}getNormalMatrix(t){return this.setFromMatrix4(t).invert().transpose()}transposeIntoArray(t){const e=this.elements;return t[0]=e[0],t[1]=e[3],t[2]=e[6],t[3]=e[1],t[4]=e[4],t[5]=e[7],t[6]=e[2],t[7]=e[5],t[8]=e[8],this}setUvTransform(t,e,i,s,n,r,a){const A=Math.cos(n),o=Math.sin(n);return this.set(i*A,i*o,-i*(A*r+o*a)+r+t,-s*o,s*A,-s*(-o*r+A*a)+a+e,0,0,1),this}scale(t,e){return this.premultiply(ji.makeScale(t,e)),this}rotate(t){return this.premultiply(ji.makeRotation(-t)),this}translate(t,e){return this.premultiply(ji.makeTranslation(t,e)),this}makeTranslation(t,e){return t.isVector2?this.set(1,0,t.x,0,1,t.y,0,0,1):this.set(1,0,t,0,1,e,0,0,1),this}makeRotation(t){const e=Math.cos(t),i=Math.sin(t);return this.set(e,-i,0,i,e,0,0,0,1),this}makeScale(t,e){return this.set(t,0,0,0,e,0,0,0,1),this}equals(t){const e=this.elements,i=t.elements;for(let s=0;s<9;s++)if(e[s]!==i[s])return!1;return!0}fromArray(t,e=0){for(let i=0;i<9;i++)this.elements[i]=t[i+e];return this}toArray(t=[],e=0){const i=this.elements;return t[e]=i[0],t[e+1]=i[1],t[e+2]=i[2],t[e+3]=i[3],t[e+4]=i[4],t[e+5]=i[5],t[e+6]=i[6],t[e+7]=i[7],t[e+8]=i[8],t}clone(){return new this.constructor().fromArray(this.elements)}}const ji=new Ct;function Na(l){for(let t=l.length-1;t>=0;--t)if(l[t]>=65535)return!0;return!1}function Ji(l){return document.createElementNS("http://www.w3.org/1999/xhtml",l)}const bn={};function mn(l){l in bn||(bn[l]=!0,console.warn(l))}const In=new Ct().set(.4123908,.3575843,.1804808,.212639,.7151687,.0721923,.0193308,.1191948,.9505322),Bn=new Ct().set(3.2409699,-1.5373832,-.4986108,-.9692436,1.8759675,.0415551,.0556301,-.203977,1.0569715);function Ua(){const l={enabled:!0,workingColorSpace:Z,spaces:{},convert:function(s,n,r){return this.enabled===!1||n===r||!n||!r||(this.spaces[n].transfer===vi&&(s.r=Et(s.r),s.g=Et(s.g),s.b=Et(s.b)),this.spaces[n].primaries!==this.spaces[r].primaries&&(s.applyMatrix3(this.spaces[n].toXYZ),s.applyMatrix3(this.spaces[r].fromXYZ)),this.spaces[r].transfer===vi&&(s.r=ae(s.r),s.g=ae(s.g),s.b=ae(s.b))),s},workingToColorSpace:function(s,n){return this.convert(s,this.workingColorSpace,n)},colorSpaceToWorking:function(s,n){return this.convert(s,n,this.workingColorSpace)},getPrimaries:function(s){return this.spaces[s].primaries},getTransfer:function(s){return s===Ze?dn:this.spaces[s].transfer},getToneMappingMode:function(s){return this.spaces[s].outputColorSpaceConfig.toneMappingMode||"standard"},getLuminanceCoefficients:function(s,n=this.workingColorSpace){return s.fromArray(this.spaces[n].luminanceCoefficients)},define:function(s){Object.assign(this.spaces,s)},_getMatrix:function(s,n,r){return s.copy(this.spaces[n].toXYZ).multiply(this.spaces[r].fromXYZ)},_getDrawingBufferColorSpace:function(s){return this.spaces[s].outputColorSpaceConfig.drawingBufferColorSpace},_getUnpackColorSpace:function(s=this.workingColorSpace){return this.spaces[s].workingColorSpaceConfig.unpackColorSpace},fromWorkingColorSpace:function(s,n){return mn("THREE.ColorManagement: .fromWorkingColorSpace() has been renamed to .workingToColorSpace()."),l.workingToColorSpace(s,n)},toWorkingColorSpace:function(s,n){return mn("THREE.ColorManagement: .toWorkingColorSpace() has been renamed to .colorSpaceToWorking()."),l.colorSpaceToWorking(s,n)}},t=[.64,.33,.3,.6,.15,.06],e=[.2126,.7152,.0722],i=[.3127,.329];return l.define({[Z]:{primaries:t,whitePoint:i,transfer:dn,toXYZ:In,fromXYZ:Bn,luminanceCoefficients:e,workingColorSpaceConfig:{unpackColorSpace:N},outputColorSpaceConfig:{drawingBufferColorSpace:N}},[N]:{primaries:t,whitePoint:i,transfer:vi,toXYZ:In,fromXYZ:Bn,luminanceCoefficients:e,outputColorSpaceConfig:{drawingBufferColorSpace:N}}}),l}const K=Ua();function Et(l){return l<.04045?l*.0773993808:Math.pow(l*.9478672986+.0521327014,2.4)}function ae(l){return l<.0031308?l*12.92:1.055*Math.pow(l,.41666)-.055}let Ae;class za{static getDataURL(t,e="image/png"){if(/^data:/i.test(t.src)||typeof HTMLCanvasElement>"u")return t.src;let i;if(t instanceof HTMLCanvasElement)i=t;else{Ae===void 0&&(Ae=Ji("canvas")),Ae.width=t.width,Ae.height=t.height;const s=Ae.getContext("2d");t instanceof ImageData?s.putImageData(t,0,0):s.drawImage(t,0,0,t.width,t.height),i=Ae}return i.toDataURL(e)}static sRGBToLinear(t){if(typeof HTMLImageElement<"u"&&t instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&t instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&t instanceof ImageBitmap){const e=Ji("canvas");e.width=t.width,e.height=t.height;const i=e.getContext("2d");i.drawImage(t,0,0,t.width,t.height);const s=i.getImageData(0,0,t.width,t.height),n=s.data;for(let r=0;r<n.length;r++)n[r]=Et(n[r]/255)*255;return i.putImageData(s,0,0),e}else if(t.data){const e=t.data.slice(0);for(let i=0;i<e.length;i++)e instanceof Uint8Array||e instanceof Uint8ClampedArray?e[i]=Math.floor(Et(e[i]/255)*255):e[i]=Et(e[i]);return{data:e,width:t.width,height:t.height}}else return console.warn("THREE.ImageUtils.sRGBToLinear(): Unsupported image type. No color space conversion applied."),t}}let va=0;class Ha{constructor(t=null){this.isSource=!0,Object.defineProperty(this,"id",{value:va++}),this.uuid=At(),this.data=t,this.dataReady=!0,this.version=0}getSize(t){const e=this.data;return typeof HTMLVideoElement<"u"&&e instanceof HTMLVideoElement?t.set(e.videoWidth,e.videoHeight,0):e instanceof VideoFrame?t.set(e.displayHeight,e.displayWidth,0):e!==null?t.set(e.width,e.height,e.depth||0):t.set(0,0,0),t}set needsUpdate(t){t===!0&&this.version++}toJSON(t){const e=t===void 0||typeof t=="string";if(!e&&t.images[this.uuid]!==void 0)return t.images[this.uuid];const i={uuid:this.uuid,url:""},s=this.data;if(s!==null){let n;if(Array.isArray(s)){n=[];for(let r=0,a=s.length;r<a;r++)s[r].isDataTexture?n.push(Vi(s[r].image)):n.push(Vi(s[r]))}else n=Vi(s);i.url=n}return e||(t.images[this.uuid]=i),i}}function Vi(l){return typeof HTMLImageElement<"u"&&l instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&l instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&l instanceof ImageBitmap?za.getDataURL(l):l.data?{data:Array.from(l.data),width:l.width,height:l.height,type:l.data.constructor.name}:(console.warn("THREE.Texture: Unable to serialize Texture."),{})}let Oa=0;const Ki=new I;class $ extends $e{constructor(t=$.DEFAULT_IMAGE,e=$.DEFAULT_MAPPING,i=Vt,s=Vt,n=Lt,r=ke,a=Nt,A=D,o=$.DEFAULT_ANISOTROPY,h=Ze){super(),this.isTexture=!0,Object.defineProperty(this,"id",{value:Oa++}),this.uuid=At(),this.name="",this.source=new Ha(t),this.mipmaps=[],this.mapping=e,this.channel=0,this.wrapS=i,this.wrapT=s,this.magFilter=n,this.minFilter=r,this.anisotropy=o,this.format=a,this.internalFormat=null,this.type=A,this.offset=new U(0,0),this.repeat=new U(1,1),this.center=new U(0,0),this.rotation=0,this.matrixAutoUpdate=!0,this.matrix=new Ct,this.generateMipmaps=!0,this.premultiplyAlpha=!1,this.flipY=!0,this.unpackAlignment=4,this.colorSpace=h,this.userData={},this.updateRanges=[],this.version=0,this.onUpdate=null,this.renderTarget=null,this.isRenderTargetTexture=!1,this.isArrayTexture=!!(t&&t.depth&&t.depth>1),this.pmremVersion=0}get width(){return this.source.getSize(Ki).x}get height(){return this.source.getSize(Ki).y}get depth(){return this.source.getSize(Ki).z}get image(){return this.source.data}set image(t=null){this.source.data=t}updateMatrix(){this.matrix.setUvTransform(this.offset.x,this.offset.y,this.repeat.x,this.repeat.y,this.rotation,this.center.x,this.center.y)}addUpdateRange(t,e){this.updateRanges.push({start:t,count:e})}clearUpdateRanges(){this.updateRanges.length=0}clone(){return new this.constructor().copy(this)}copy(t){return this.name=t.name,this.source=t.source,this.mipmaps=t.mipmaps.slice(0),this.mapping=t.mapping,this.channel=t.channel,this.wrapS=t.wrapS,this.wrapT=t.wrapT,this.magFilter=t.magFilter,this.minFilter=t.minFilter,this.anisotropy=t.anisotropy,this.format=t.format,this.internalFormat=t.internalFormat,this.type=t.type,this.offset.copy(t.offset),this.repeat.copy(t.repeat),this.center.copy(t.center),this.rotation=t.rotation,this.matrixAutoUpdate=t.matrixAutoUpdate,this.matrix.copy(t.matrix),this.generateMipmaps=t.generateMipmaps,this.premultiplyAlpha=t.premultiplyAlpha,this.flipY=t.flipY,this.unpackAlignment=t.unpackAlignment,this.colorSpace=t.colorSpace,this.renderTarget=t.renderTarget,this.isRenderTargetTexture=t.isRenderTargetTexture,this.isArrayTexture=t.isArrayTexture,this.userData=JSON.parse(JSON.stringify(t.userData)),this.needsUpdate=!0,this}setValues(t){for(const e in t){const i=t[e];if(i===void 0){console.warn(`THREE.Texture.setValues(): parameter '${e}' has value of undefined.`);continue}const s=this[e];if(s===void 0){console.warn(`THREE.Texture.setValues(): property '${e}' does not exist.`);continue}s&&i&&s.isVector2&&i.isVector2||s&&i&&s.isVector3&&i.isVector3||s&&i&&s.isMatrix3&&i.isMatrix3?s.copy(i):this[e]=i}}toJSON(t){const e=t===void 0||typeof t=="string";if(!e&&t.textures[this.uuid]!==void 0)return t.textures[this.uuid];const i={metadata:{version:4.7,type:"Texture",generator:"Texture.toJSON"},uuid:this.uuid,name:this.name,image:this.source.toJSON(t).uuid,mapping:this.mapping,channel:this.channel,repeat:[this.repeat.x,this.repeat.y],offset:[this.offset.x,this.offset.y],center:[this.center.x,this.center.y],rotation:this.rotation,wrap:[this.wrapS,this.wrapT],format:this.format,internalFormat:this.internalFormat,type:this.type,colorSpace:this.colorSpace,minFilter:this.minFilter,magFilter:this.magFilter,anisotropy:this.anisotropy,flipY:this.flipY,generateMipmaps:this.generateMipmaps,premultiplyAlpha:this.premultiplyAlpha,unpackAlignment:this.unpackAlignment};return Object.keys(this.userData).length>0&&(i.userData=this.userData),e||(t.textures[this.uuid]=i),i}dispose(){this.dispatchEvent({type:"dispose"})}transformUv(t){if(this.mapping!==$s)return t;if(t.applyMatrix3(this.matrix),t.x<0||t.x>1)switch(this.wrapS){case Fe:t.x=t.x-Math.floor(t.x);break;case Vt:t.x=t.x<0?0:1;break;case Di:Math.abs(Math.floor(t.x)%2)===1?t.x=Math.ceil(t.x)-t.x:t.x=t.x-Math.floor(t.x);break}if(t.y<0||t.y>1)switch(this.wrapT){case Fe:t.y=t.y-Math.floor(t.y);break;case Vt:t.y=t.y<0?0:1;break;case Di:Math.abs(Math.floor(t.y)%2)===1?t.y=Math.ceil(t.y)-t.y:t.y=t.y-Math.floor(t.y);break}return this.flipY&&(t.y=1-t.y),t}set needsUpdate(t){t===!0&&(this.version++,this.source.needsUpdate=!0)}set needsPMREMUpdate(t){t===!0&&this.pmremVersion++}}$.DEFAULT_IMAGE=null,$.DEFAULT_MAPPING=$s,$.DEFAULT_ANISOTROPY=1;class Y{constructor(t=0,e=0,i=0,s=1){Y.prototype.isVector4=!0,this.x=t,this.y=e,this.z=i,this.w=s}get width(){return this.z}set width(t){this.z=t}get height(){return this.w}set height(t){this.w=t}set(t,e,i,s){return this.x=t,this.y=e,this.z=i,this.w=s,this}setScalar(t){return this.x=t,this.y=t,this.z=t,this.w=t,this}setX(t){return this.x=t,this}setY(t){return this.y=t,this}setZ(t){return this.z=t,this}setW(t){return this.w=t,this}setComponent(t,e){switch(t){case 0:this.x=e;break;case 1:this.y=e;break;case 2:this.z=e;break;case 3:this.w=e;break;default:throw new Error("index is out of range: "+t)}return this}getComponent(t){switch(t){case 0:return this.x;case 1:return this.y;case 2:return this.z;case 3:return this.w;default:throw new Error("index is out of range: "+t)}}clone(){return new this.constructor(this.x,this.y,this.z,this.w)}copy(t){return this.x=t.x,this.y=t.y,this.z=t.z,this.w=t.w!==void 0?t.w:1,this}add(t){return this.x+=t.x,this.y+=t.y,this.z+=t.z,this.w+=t.w,this}addScalar(t){return this.x+=t,this.y+=t,this.z+=t,this.w+=t,this}addVectors(t,e){return this.x=t.x+e.x,this.y=t.y+e.y,this.z=t.z+e.z,this.w=t.w+e.w,this}addScaledVector(t,e){return this.x+=t.x*e,this.y+=t.y*e,this.z+=t.z*e,this.w+=t.w*e,this}sub(t){return this.x-=t.x,this.y-=t.y,this.z-=t.z,this.w-=t.w,this}subScalar(t){return this.x-=t,this.y-=t,this.z-=t,this.w-=t,this}subVectors(t,e){return this.x=t.x-e.x,this.y=t.y-e.y,this.z=t.z-e.z,this.w=t.w-e.w,this}multiply(t){return this.x*=t.x,this.y*=t.y,this.z*=t.z,this.w*=t.w,this}multiplyScalar(t){return this.x*=t,this.y*=t,this.z*=t,this.w*=t,this}applyMatrix4(t){const e=this.x,i=this.y,s=this.z,n=this.w,r=t.elements;return this.x=r[0]*e+r[4]*i+r[8]*s+r[12]*n,this.y=r[1]*e+r[5]*i+r[9]*s+r[13]*n,this.z=r[2]*e+r[6]*i+r[10]*s+r[14]*n,this.w=r[3]*e+r[7]*i+r[11]*s+r[15]*n,this}divide(t){return this.x/=t.x,this.y/=t.y,this.z/=t.z,this.w/=t.w,this}divideScalar(t){return this.multiplyScalar(1/t)}setAxisAngleFromQuaternion(t){this.w=2*Math.acos(t.w);const e=Math.sqrt(1-t.w*t.w);return e<1e-4?(this.x=1,this.y=0,this.z=0):(this.x=t.x/e,this.y=t.y/e,this.z=t.z/e),this}setAxisAngleFromRotationMatrix(t){let e,i,s,n;const A=t.elements,o=A[0],h=A[4],c=A[8],u=A[1],d=A[5],g=A[9],p=A[2],b=A[6],f=A[10];if(Math.abs(h-u)<.01&&Math.abs(c-p)<.01&&Math.abs(g-b)<.01){if(Math.abs(h+u)<.1&&Math.abs(c+p)<.1&&Math.abs(g+b)<.1&&Math.abs(o+d+f-3)<.1)return this.set(1,0,0,0),this;e=Math.PI;const C=(o+1)/2,B=(d+1)/2,E=(f+1)/2,Q=(h+u)/4,y=(c+p)/4,x=(g+b)/4;return C>B&&C>E?C<.01?(i=0,s=.707106781,n=.707106781):(i=Math.sqrt(C),s=Q/i,n=y/i):B>E?B<.01?(i=.707106781,s=0,n=.707106781):(s=Math.sqrt(B),i=Q/s,n=x/s):E<.01?(i=.707106781,s=.707106781,n=0):(n=Math.sqrt(E),i=y/n,s=x/n),this.set(i,s,n,e),this}let m=Math.sqrt((b-g)*(b-g)+(c-p)*(c-p)+(u-h)*(u-h));return Math.abs(m)<.001&&(m=1),this.x=(b-g)/m,this.y=(c-p)/m,this.z=(u-h)/m,this.w=Math.acos((o+d+f-1)/2),this}setFromMatrixPosition(t){const e=t.elements;return this.x=e[12],this.y=e[13],this.z=e[14],this.w=e[15],this}min(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this.z=Math.min(this.z,t.z),this.w=Math.min(this.w,t.w),this}max(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this.z=Math.max(this.z,t.z),this.w=Math.max(this.w,t.w),this}clamp(t,e){return this.x=w(this.x,t.x,e.x),this.y=w(this.y,t.y,e.y),this.z=w(this.z,t.z,e.z),this.w=w(this.w,t.w,e.w),this}clampScalar(t,e){return this.x=w(this.x,t,e),this.y=w(this.y,t,e),this.z=w(this.z,t,e),this.w=w(this.w,t,e),this}clampLength(t,e){const i=this.length();return this.divideScalar(i||1).multiplyScalar(w(i,t,e))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this.w=Math.floor(this.w),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this.w=Math.ceil(this.w),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this.w=Math.round(this.w),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this.w=Math.trunc(this.w),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this}dot(t){return this.x*t.x+this.y*t.y+this.z*t.z+this.w*t.w}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)+Math.abs(this.w)}normalize(){return this.divideScalar(this.length()||1)}setLength(t){return this.normalize().multiplyScalar(t)}lerp(t,e){return this.x+=(t.x-this.x)*e,this.y+=(t.y-this.y)*e,this.z+=(t.z-this.z)*e,this.w+=(t.w-this.w)*e,this}lerpVectors(t,e,i){return this.x=t.x+(e.x-t.x)*i,this.y=t.y+(e.y-t.y)*i,this.z=t.z+(e.z-t.z)*i,this.w=t.w+(e.w-t.w)*i,this}equals(t){return t.x===this.x&&t.y===this.y&&t.z===this.z&&t.w===this.w}fromArray(t,e=0){return this.x=t[e],this.y=t[e+1],this.z=t[e+2],this.w=t[e+3],this}toArray(t=[],e=0){return t[e]=this.x,t[e+1]=this.y,t[e+2]=this.z,t[e+3]=this.w,t}fromBufferAttribute(t,e){return this.x=t.getX(e),this.y=t.getY(e),this.z=t.getZ(e),this.w=t.getW(e),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this.w=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z,yield this.w}}class qa extends ${constructor(t=null,e=1,i=1,s=1){super(null),this.isData3DTexture=!0,this.image={data:t,width:e,height:i,depth:s},this.magFilter=Rt,this.minFilter=Rt,this.wrapR=Vt,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}}class yt{constructor(t=new I(1/0,1/0,1/0),e=new I(-1/0,-1/0,-1/0)){this.isBox3=!0,this.min=t,this.max=e}set(t,e){return this.min.copy(t),this.max.copy(e),this}setFromArray(t){this.makeEmpty();for(let e=0,i=t.length;e<i;e+=3)this.expandByPoint(ht.fromArray(t,e));return this}setFromBufferAttribute(t){this.makeEmpty();for(let e=0,i=t.count;e<i;e++)this.expandByPoint(ht.fromBufferAttribute(t,e));return this}setFromPoints(t){this.makeEmpty();for(let e=0,i=t.length;e<i;e++)this.expandByPoint(t[e]);return this}setFromCenterAndSize(t,e){const i=ht.copy(e).multiplyScalar(.5);return this.min.copy(t).sub(i),this.max.copy(t).add(i),this}setFromObject(t,e=!1){return this.makeEmpty(),this.expandByObject(t,e)}clone(){return new this.constructor().copy(this)}copy(t){return this.min.copy(t.min),this.max.copy(t.max),this}makeEmpty(){return this.min.x=this.min.y=this.min.z=1/0,this.max.x=this.max.y=this.max.z=-1/0,this}isEmpty(){return this.max.x<this.min.x||this.max.y<this.min.y||this.max.z<this.min.z}getCenter(t){return this.isEmpty()?t.set(0,0,0):t.addVectors(this.min,this.max).multiplyScalar(.5)}getSize(t){return this.isEmpty()?t.set(0,0,0):t.subVectors(this.max,this.min)}expandByPoint(t){return this.min.min(t),this.max.max(t),this}expandByVector(t){return this.min.sub(t),this.max.add(t),this}expandByScalar(t){return this.min.addScalar(-t),this.max.addScalar(t),this}expandByObject(t,e=!1){t.updateWorldMatrix(!1,!1);const i=t.geometry;if(i!==void 0){const n=i.getAttribute("position");if(e===!0&&n!==void 0&&t.isInstancedMesh!==!0)for(let r=0,a=n.count;r<a;r++)t.isMesh===!0?t.getVertexPosition(r,ht):ht.fromBufferAttribute(n,r),ht.applyMatrix4(t.matrixWorld),this.expandByPoint(ht);else t.boundingBox!==void 0?(t.boundingBox===null&&t.computeBoundingBox(),ti.copy(t.boundingBox)):(i.boundingBox===null&&i.computeBoundingBox(),ti.copy(i.boundingBox)),ti.applyMatrix4(t.matrixWorld),this.union(ti)}const s=t.children;for(let n=0,r=s.length;n<r;n++)this.expandByObject(s[n],e);return this}containsPoint(t){return t.x>=this.min.x&&t.x<=this.max.x&&t.y>=this.min.y&&t.y<=this.max.y&&t.z>=this.min.z&&t.z<=this.max.z}containsBox(t){return this.min.x<=t.min.x&&t.max.x<=this.max.x&&this.min.y<=t.min.y&&t.max.y<=this.max.y&&this.min.z<=t.min.z&&t.max.z<=this.max.z}getParameter(t,e){return e.set((t.x-this.min.x)/(this.max.x-this.min.x),(t.y-this.min.y)/(this.max.y-this.min.y),(t.z-this.min.z)/(this.max.z-this.min.z))}intersectsBox(t){return t.max.x>=this.min.x&&t.min.x<=this.max.x&&t.max.y>=this.min.y&&t.min.y<=this.max.y&&t.max.z>=this.min.z&&t.min.z<=this.max.z}intersectsSphere(t){return this.clampPoint(t.center,ht),ht.distanceToSquared(t.center)<=t.radius*t.radius}intersectsPlane(t){let e,i;return t.normal.x>0?(e=t.normal.x*this.min.x,i=t.normal.x*this.max.x):(e=t.normal.x*this.max.x,i=t.normal.x*this.min.x),t.normal.y>0?(e+=t.normal.y*this.min.y,i+=t.normal.y*this.max.y):(e+=t.normal.y*this.max.y,i+=t.normal.y*this.min.y),t.normal.z>0?(e+=t.normal.z*this.min.z,i+=t.normal.z*this.max.z):(e+=t.normal.z*this.max.z,i+=t.normal.z*this.min.z),e<=-t.constant&&i>=-t.constant}intersectsTriangle(t){if(this.isEmpty())return!1;this.getCenter(Ne),ei.subVectors(this.max,Ne),oe.subVectors(t.a,Ne),he.subVectors(t.b,Ne),ce.subVectors(t.c,Ne),zt.subVectors(he,oe),vt.subVectors(ce,he),Wt.subVectors(oe,ce);let e=[0,-zt.z,zt.y,0,-vt.z,vt.y,0,-Wt.z,Wt.y,zt.z,0,-zt.x,vt.z,0,-vt.x,Wt.z,0,-Wt.x,-zt.y,zt.x,0,-vt.y,vt.x,0,-Wt.y,Wt.x,0];return!Yi(e,oe,he,ce,ei)||(e=[1,0,0,0,1,0,0,0,1],!Yi(e,oe,he,ce,ei))?!1:(ii.crossVectors(zt,vt),e=[ii.x,ii.y,ii.z],Yi(e,oe,he,ce,ei))}clampPoint(t,e){return e.copy(t).clamp(this.min,this.max)}distanceToPoint(t){return this.clampPoint(t,ht).distanceTo(t)}getBoundingSphere(t){return this.isEmpty()?t.makeEmpty():(this.getCenter(t.center),t.radius=this.getSize(ht).length()*.5),t}intersect(t){return this.min.max(t.min),this.max.min(t.max),this.isEmpty()&&this.makeEmpty(),this}union(t){return this.min.min(t.min),this.max.max(t.max),this}applyMatrix4(t){return this.isEmpty()?this:(Qt[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(t),Qt[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(t),Qt[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(t),Qt[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(t),Qt[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(t),Qt[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(t),Qt[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(t),Qt[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(t),this.setFromPoints(Qt),this)}translate(t){return this.min.add(t),this.max.add(t),this}equals(t){return t.min.equals(this.min)&&t.max.equals(this.max)}toJSON(){return{min:this.min.toArray(),max:this.max.toArray()}}fromJSON(t){return this.min.fromArray(t.min),this.max.fromArray(t.max),this}}const Qt=[new I,new I,new I,new I,new I,new I,new I,new I],ht=new I,ti=new yt,oe=new I,he=new I,ce=new I,zt=new I,vt=new I,Wt=new I,Ne=new I,ei=new I,ii=new I,Xt=new I;function Yi(l,t,e,i,s){for(let n=0,r=l.length-3;n<=r;n+=3){Xt.fromArray(l,n);const a=s.x*Math.abs(Xt.x)+s.y*Math.abs(Xt.y)+s.z*Math.abs(Xt.z),A=t.dot(Xt),o=e.dot(Xt),h=i.dot(Xt);if(Math.max(-Math.max(A,o,h),Math.min(A,o,h))>a)return!1}return!0}const Pa=new yt,Ue=new I,Wi=new I;class pt{constructor(t=new I,e=-1){this.isSphere=!0,this.center=t,this.radius=e}set(t,e){return this.center.copy(t),this.radius=e,this}setFromPoints(t,e){const i=this.center;e!==void 0?i.copy(e):Pa.setFromPoints(t).getCenter(i);let s=0;for(let n=0,r=t.length;n<r;n++)s=Math.max(s,i.distanceToSquared(t[n]));return this.radius=Math.sqrt(s),this}copy(t){return this.center.copy(t.center),this.radius=t.radius,this}isEmpty(){return this.radius<0}makeEmpty(){return this.center.set(0,0,0),this.radius=-1,this}containsPoint(t){return t.distanceToSquared(this.center)<=this.radius*this.radius}distanceToPoint(t){return t.distanceTo(this.center)-this.radius}intersectsSphere(t){const e=this.radius+t.radius;return t.center.distanceToSquared(this.center)<=e*e}intersectsBox(t){return t.intersectsSphere(this)}intersectsPlane(t){return Math.abs(t.distanceToPoint(this.center))<=this.radius}clampPoint(t,e){const i=this.center.distanceToSquared(t);return e.copy(t),i>this.radius*this.radius&&(e.sub(this.center).normalize(),e.multiplyScalar(this.radius).add(this.center)),e}getBoundingBox(t){return this.isEmpty()?(t.makeEmpty(),t):(t.set(this.center,this.center),t.expandByScalar(this.radius),t)}applyMatrix4(t){return this.center.applyMatrix4(t),this.radius=this.radius*t.getMaxScaleOnAxis(),this}translate(t){return this.center.add(t),this}expandByPoint(t){if(this.isEmpty())return this.center.copy(t),this.radius=0,this;Ue.subVectors(t,this.center);const e=Ue.lengthSq();if(e>this.radius*this.radius){const i=Math.sqrt(e),s=(i-this.radius)*.5;this.center.addScaledVector(Ue,s/i),this.radius+=s}return this}union(t){return t.isEmpty()?this:this.isEmpty()?(this.copy(t),this):(this.center.equals(t.center)===!0?this.radius=Math.max(this.radius,t.radius):(Wi.subVectors(t.center,this.center).setLength(t.radius),this.expandByPoint(Ue.copy(t.center).add(Wi)),this.expandByPoint(Ue.copy(t.center).sub(Wi))),this)}equals(t){return t.center.equals(this.center)&&t.radius===this.radius}clone(){return new this.constructor().copy(this)}toJSON(){return{radius:this.radius,center:this.center.toArray()}}fromJSON(t){return this.radius=t.radius,this.center.fromArray(t.center),this}}const xt=new I,Xi=new I,si=new I,Ht=new I,Zi=new I,ni=new I,$i=new I;class ri{constructor(t=new I,e=new I(0,0,-1)){this.origin=t,this.direction=e}set(t,e){return this.origin.copy(t),this.direction.copy(e),this}copy(t){return this.origin.copy(t.origin),this.direction.copy(t.direction),this}at(t,e){return e.copy(this.origin).addScaledVector(this.direction,t)}lookAt(t){return this.direction.copy(t).sub(this.origin).normalize(),this}recast(t){return this.origin.copy(this.at(t,xt)),this}closestPointToPoint(t,e){e.subVectors(t,this.origin);const i=e.dot(this.direction);return i<0?e.copy(this.origin):e.copy(this.origin).addScaledVector(this.direction,i)}distanceToPoint(t){return Math.sqrt(this.distanceSqToPoint(t))}distanceSqToPoint(t){const e=xt.subVectors(t,this.origin).dot(this.direction);return e<0?this.origin.distanceToSquared(t):(xt.copy(this.origin).addScaledVector(this.direction,e),xt.distanceToSquared(t))}distanceSqToSegment(t,e,i,s){Xi.copy(t).add(e).multiplyScalar(.5),si.copy(e).sub(t).normalize(),Ht.copy(this.origin).sub(Xi);const n=t.distanceTo(e)*.5,r=-this.direction.dot(si),a=Ht.dot(this.direction),A=-Ht.dot(si),o=Ht.lengthSq(),h=Math.abs(1-r*r);let c,u,d,g;if(h>0)if(c=r*A-a,u=r*a-A,g=n*h,c>=0)if(u>=-g)if(u<=g){const p=1/h;c*=p,u*=p,d=c*(c+r*u+2*a)+u*(r*c+u+2*A)+o}else u=n,c=Math.max(0,-(r*u+a)),d=-c*c+u*(u+2*A)+o;else u=-n,c=Math.max(0,-(r*u+a)),d=-c*c+u*(u+2*A)+o;else u<=-g?(c=Math.max(0,-(-r*n+a)),u=c>0?-n:Math.min(Math.max(-n,-A),n),d=-c*c+u*(u+2*A)+o):u<=g?(c=0,u=Math.min(Math.max(-n,-A),n),d=u*(u+2*A)+o):(c=Math.max(0,-(r*n+a)),u=c>0?n:Math.min(Math.max(-n,-A),n),d=-c*c+u*(u+2*A)+o);else u=r>0?-n:n,c=Math.max(0,-(r*u+a)),d=-c*c+u*(u+2*A)+o;return i&&i.copy(this.origin).addScaledVector(this.direction,c),s&&s.copy(Xi).addScaledVector(si,u),d}intersectSphere(t,e){xt.subVectors(t.center,this.origin);const i=xt.dot(this.direction),s=xt.dot(xt)-i*i,n=t.radius*t.radius;if(s>n)return null;const r=Math.sqrt(n-s),a=i-r,A=i+r;return A<0?null:a<0?this.at(A,e):this.at(a,e)}intersectsSphere(t){return t.radius<0?!1:this.distanceSqToPoint(t.center)<=t.radius*t.radius}distanceToPlane(t){const e=t.normal.dot(this.direction);if(e===0)return t.distanceToPoint(this.origin)===0?0:null;const i=-(this.origin.dot(t.normal)+t.constant)/e;return i>=0?i:null}intersectPlane(t,e){const i=this.distanceToPlane(t);return i===null?null:this.at(i,e)}intersectsPlane(t){const e=t.distanceToPoint(this.origin);return e===0||t.normal.dot(this.direction)*e<0}intersectBox(t,e){let i,s,n,r,a,A;const o=1/this.direction.x,h=1/this.direction.y,c=1/this.direction.z,u=this.origin;return o>=0?(i=(t.min.x-u.x)*o,s=(t.max.x-u.x)*o):(i=(t.max.x-u.x)*o,s=(t.min.x-u.x)*o),h>=0?(n=(t.min.y-u.y)*h,r=(t.max.y-u.y)*h):(n=(t.max.y-u.y)*h,r=(t.min.y-u.y)*h),i>r||n>s||((n>i||isNaN(i))&&(i=n),(r<s||isNaN(s))&&(s=r),c>=0?(a=(t.min.z-u.z)*c,A=(t.max.z-u.z)*c):(a=(t.max.z-u.z)*c,A=(t.min.z-u.z)*c),i>A||a>s)||((a>i||i!==i)&&(i=a),(A<s||s!==s)&&(s=A),s<0)?null:this.at(i>=0?i:s,e)}intersectsBox(t){return this.intersectBox(t,xt)!==null}intersectTriangle(t,e,i,s,n){Zi.subVectors(e,t),ni.subVectors(i,t),$i.crossVectors(Zi,ni);let r=this.direction.dot($i),a;if(r>0){if(s)return null;a=1}else if(r<0)a=-1,r=-r;else return null;Ht.subVectors(this.origin,t);const A=a*this.direction.dot(ni.crossVectors(Ht,ni));if(A<0)return null;const o=a*this.direction.dot(Zi.cross(Ht));if(o<0||A+o>r)return null;const h=-a*Ht.dot($i);return h<0?null:this.at(h/r,n)}applyMatrix4(t){return this.origin.applyMatrix4(t),this.direction.transformDirection(t),this}equals(t){return t.origin.equals(this.origin)&&t.direction.equals(this.direction)}clone(){return new this.constructor().copy(this)}}class S{constructor(t,e,i,s,n,r,a,A,o,h,c,u,d,g,p,b){S.prototype.isMatrix4=!0,this.elements=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],t!==void 0&&this.set(t,e,i,s,n,r,a,A,o,h,c,u,d,g,p,b)}set(t,e,i,s,n,r,a,A,o,h,c,u,d,g,p,b){const f=this.elements;return f[0]=t,f[4]=e,f[8]=i,f[12]=s,f[1]=n,f[5]=r,f[9]=a,f[13]=A,f[2]=o,f[6]=h,f[10]=c,f[14]=u,f[3]=d,f[7]=g,f[11]=p,f[15]=b,this}identity(){return this.set(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1),this}clone(){return new S().fromArray(this.elements)}copy(t){const e=this.elements,i=t.elements;return e[0]=i[0],e[1]=i[1],e[2]=i[2],e[3]=i[3],e[4]=i[4],e[5]=i[5],e[6]=i[6],e[7]=i[7],e[8]=i[8],e[9]=i[9],e[10]=i[10],e[11]=i[11],e[12]=i[12],e[13]=i[13],e[14]=i[14],e[15]=i[15],this}copyPosition(t){const e=this.elements,i=t.elements;return e[12]=i[12],e[13]=i[13],e[14]=i[14],this}setFromMatrix3(t){const e=t.elements;return this.set(e[0],e[3],e[6],0,e[1],e[4],e[7],0,e[2],e[5],e[8],0,0,0,0,1),this}extractBasis(t,e,i){return t.setFromMatrixColumn(this,0),e.setFromMatrixColumn(this,1),i.setFromMatrixColumn(this,2),this}makeBasis(t,e,i){return this.set(t.x,e.x,i.x,0,t.y,e.y,i.y,0,t.z,e.z,i.z,0,0,0,0,1),this}extractRotation(t){const e=this.elements,i=t.elements,s=1/le.setFromMatrixColumn(t,0).length(),n=1/le.setFromMatrixColumn(t,1).length(),r=1/le.setFromMatrixColumn(t,2).length();return e[0]=i[0]*s,e[1]=i[1]*s,e[2]=i[2]*s,e[3]=0,e[4]=i[4]*n,e[5]=i[5]*n,e[6]=i[6]*n,e[7]=0,e[8]=i[8]*r,e[9]=i[9]*r,e[10]=i[10]*r,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,this}makeRotationFromEuler(t){const e=this.elements,i=t.x,s=t.y,n=t.z,r=Math.cos(i),a=Math.sin(i),A=Math.cos(s),o=Math.sin(s),h=Math.cos(n),c=Math.sin(n);if(t.order==="XYZ"){const u=r*h,d=r*c,g=a*h,p=a*c;e[0]=A*h,e[4]=-A*c,e[8]=o,e[1]=d+g*o,e[5]=u-p*o,e[9]=-a*A,e[2]=p-u*o,e[6]=g+d*o,e[10]=r*A}else if(t.order==="YXZ"){const u=A*h,d=A*c,g=o*h,p=o*c;e[0]=u+p*a,e[4]=g*a-d,e[8]=r*o,e[1]=r*c,e[5]=r*h,e[9]=-a,e[2]=d*a-g,e[6]=p+u*a,e[10]=r*A}else if(t.order==="ZXY"){const u=A*h,d=A*c,g=o*h,p=o*c;e[0]=u-p*a,e[4]=-r*c,e[8]=g+d*a,e[1]=d+g*a,e[5]=r*h,e[9]=p-u*a,e[2]=-r*o,e[6]=a,e[10]=r*A}else if(t.order==="ZYX"){const u=r*h,d=r*c,g=a*h,p=a*c;e[0]=A*h,e[4]=g*o-d,e[8]=u*o+p,e[1]=A*c,e[5]=p*o+u,e[9]=d*o-g,e[2]=-o,e[6]=a*A,e[10]=r*A}else if(t.order==="YZX"){const u=r*A,d=r*o,g=a*A,p=a*o;e[0]=A*h,e[4]=p-u*c,e[8]=g*c+d,e[1]=c,e[5]=r*h,e[9]=-a*h,e[2]=-o*h,e[6]=d*c+g,e[10]=u-p*c}else if(t.order==="XZY"){const u=r*A,d=r*o,g=a*A,p=a*o;e[0]=A*h,e[4]=-c,e[8]=o*h,e[1]=u*c+p,e[5]=r*h,e[9]=d*c-g,e[2]=g*c-d,e[6]=a*h,e[10]=p*c+u}return e[3]=0,e[7]=0,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,this}makeRotationFromQuaternion(t){return this.compose(ja,t,Ja)}lookAt(t,e,i){const s=this.elements;return tt.subVectors(t,e),tt.lengthSq()===0&&(tt.z=1),tt.normalize(),Ot.crossVectors(i,tt),Ot.lengthSq()===0&&(Math.abs(i.z)===1?tt.x+=1e-4:tt.z+=1e-4,tt.normalize(),Ot.crossVectors(i,tt)),Ot.normalize(),ai.crossVectors(tt,Ot),s[0]=Ot.x,s[4]=ai.x,s[8]=tt.x,s[1]=Ot.y,s[5]=ai.y,s[9]=tt.y,s[2]=Ot.z,s[6]=ai.z,s[10]=tt.z,this}multiply(t){return this.multiplyMatrices(this,t)}premultiply(t){return this.multiplyMatrices(t,this)}multiplyMatrices(t,e){const i=t.elements,s=e.elements,n=this.elements,r=i[0],a=i[4],A=i[8],o=i[12],h=i[1],c=i[5],u=i[9],d=i[13],g=i[2],p=i[6],b=i[10],f=i[14],m=i[3],C=i[7],B=i[11],E=i[15],Q=s[0],y=s[4],x=s[8],F=s[12],k=s[1],T=s[5],P=s[9],L=s[13],j=s[2],mt=s[6],st=s[10],Dt=s[14],It=s[3],Bt=s[7],_t=s[11],G=s[15];return n[0]=r*Q+a*k+A*j+o*It,n[4]=r*y+a*T+A*mt+o*Bt,n[8]=r*x+a*P+A*st+o*_t,n[12]=r*F+a*L+A*Dt+o*G,n[1]=h*Q+c*k+u*j+d*It,n[5]=h*y+c*T+u*mt+d*Bt,n[9]=h*x+c*P+u*st+d*_t,n[13]=h*F+c*L+u*Dt+d*G,n[2]=g*Q+p*k+b*j+f*It,n[6]=g*y+p*T+b*mt+f*Bt,n[10]=g*x+p*P+b*st+f*_t,n[14]=g*F+p*L+b*Dt+f*G,n[3]=m*Q+C*k+B*j+E*It,n[7]=m*y+C*T+B*mt+E*Bt,n[11]=m*x+C*P+B*st+E*_t,n[15]=m*F+C*L+B*Dt+E*G,this}multiplyScalar(t){const e=this.elements;return e[0]*=t,e[4]*=t,e[8]*=t,e[12]*=t,e[1]*=t,e[5]*=t,e[9]*=t,e[13]*=t,e[2]*=t,e[6]*=t,e[10]*=t,e[14]*=t,e[3]*=t,e[7]*=t,e[11]*=t,e[15]*=t,this}determinant(){const t=this.elements,e=t[0],i=t[4],s=t[8],n=t[12],r=t[1],a=t[5],A=t[9],o=t[13],h=t[2],c=t[6],u=t[10],d=t[14],g=t[3],p=t[7],b=t[11],f=t[15];return g*(+n*A*c-s*o*c-n*a*u+i*o*u+s*a*d-i*A*d)+p*(+e*A*d-e*o*u+n*r*u-s*r*d+s*o*h-n*A*h)+b*(+e*o*c-e*a*d-n*r*c+i*r*d+n*a*h-i*o*h)+f*(-s*a*h-e*A*c+e*a*u+s*r*c-i*r*u+i*A*h)}transpose(){const t=this.elements;let e;return e=t[1],t[1]=t[4],t[4]=e,e=t[2],t[2]=t[8],t[8]=e,e=t[6],t[6]=t[9],t[9]=e,e=t[3],t[3]=t[12],t[12]=e,e=t[7],t[7]=t[13],t[13]=e,e=t[11],t[11]=t[14],t[14]=e,this}setPosition(t,e,i){const s=this.elements;return t.isVector3?(s[12]=t.x,s[13]=t.y,s[14]=t.z):(s[12]=t,s[13]=e,s[14]=i),this}invert(){const t=this.elements,e=t[0],i=t[1],s=t[2],n=t[3],r=t[4],a=t[5],A=t[6],o=t[7],h=t[8],c=t[9],u=t[10],d=t[11],g=t[12],p=t[13],b=t[14],f=t[15],m=c*b*o-p*u*o+p*A*d-a*b*d-c*A*f+a*u*f,C=g*u*o-h*b*o-g*A*d+r*b*d+h*A*f-r*u*f,B=h*p*o-g*c*o+g*a*d-r*p*d-h*a*f+r*c*f,E=g*c*A-h*p*A-g*a*u+r*p*u+h*a*b-r*c*b,Q=e*m+i*C+s*B+n*E;if(Q===0)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);const y=1/Q;return t[0]=m*y,t[1]=(p*u*n-c*b*n-p*s*d+i*b*d+c*s*f-i*u*f)*y,t[2]=(a*b*n-p*A*n+p*s*o-i*b*o-a*s*f+i*A*f)*y,t[3]=(c*A*n-a*u*n-c*s*o+i*u*o+a*s*d-i*A*d)*y,t[4]=C*y,t[5]=(h*b*n-g*u*n+g*s*d-e*b*d-h*s*f+e*u*f)*y,t[6]=(g*A*n-r*b*n-g*s*o+e*b*o+r*s*f-e*A*f)*y,t[7]=(r*u*n-h*A*n+h*s*o-e*u*o-r*s*d+e*A*d)*y,t[8]=B*y,t[9]=(g*c*n-h*p*n-g*i*d+e*p*d+h*i*f-e*c*f)*y,t[10]=(r*p*n-g*a*n+g*i*o-e*p*o-r*i*f+e*a*f)*y,t[11]=(h*a*n-r*c*n-h*i*o+e*c*o+r*i*d-e*a*d)*y,t[12]=E*y,t[13]=(h*p*s-g*c*s+g*i*u-e*p*u-h*i*b+e*c*b)*y,t[14]=(g*a*s-r*p*s-g*i*A+e*p*A+r*i*b-e*a*b)*y,t[15]=(r*c*s-h*a*s+h*i*A-e*c*A-r*i*u+e*a*u)*y,this}scale(t){const e=this.elements,i=t.x,s=t.y,n=t.z;return e[0]*=i,e[4]*=s,e[8]*=n,e[1]*=i,e[5]*=s,e[9]*=n,e[2]*=i,e[6]*=s,e[10]*=n,e[3]*=i,e[7]*=s,e[11]*=n,this}getMaxScaleOnAxis(){const t=this.elements,e=t[0]*t[0]+t[1]*t[1]+t[2]*t[2],i=t[4]*t[4]+t[5]*t[5]+t[6]*t[6],s=t[8]*t[8]+t[9]*t[9]+t[10]*t[10];return Math.sqrt(Math.max(e,i,s))}makeTranslation(t,e,i){return t.isVector3?this.set(1,0,0,t.x,0,1,0,t.y,0,0,1,t.z,0,0,0,1):this.set(1,0,0,t,0,1,0,e,0,0,1,i,0,0,0,1),this}makeRotationX(t){const e=Math.cos(t),i=Math.sin(t);return this.set(1,0,0,0,0,e,-i,0,0,i,e,0,0,0,0,1),this}makeRotationY(t){const e=Math.cos(t),i=Math.sin(t);return this.set(e,0,i,0,0,1,0,0,-i,0,e,0,0,0,0,1),this}makeRotationZ(t){const e=Math.cos(t),i=Math.sin(t);return this.set(e,-i,0,0,i,e,0,0,0,0,1,0,0,0,0,1),this}makeRotationAxis(t,e){const i=Math.cos(e),s=Math.sin(e),n=1-i,r=t.x,a=t.y,A=t.z,o=n*r,h=n*a;return this.set(o*r+i,o*a-s*A,o*A+s*a,0,o*a+s*A,h*a+i,h*A-s*r,0,o*A-s*a,h*A+s*r,n*A*A+i,0,0,0,0,1),this}makeScale(t,e,i){return this.set(t,0,0,0,0,e,0,0,0,0,i,0,0,0,0,1),this}makeShear(t,e,i,s,n,r){return this.set(1,i,n,0,t,1,r,0,e,s,1,0,0,0,0,1),this}compose(t,e,i){const s=this.elements,n=e._x,r=e._y,a=e._z,A=e._w,o=n+n,h=r+r,c=a+a,u=n*o,d=n*h,g=n*c,p=r*h,b=r*c,f=a*c,m=A*o,C=A*h,B=A*c,E=i.x,Q=i.y,y=i.z;return s[0]=(1-(p+f))*E,s[1]=(d+B)*E,s[2]=(g-C)*E,s[3]=0,s[4]=(d-B)*Q,s[5]=(1-(u+f))*Q,s[6]=(b+m)*Q,s[7]=0,s[8]=(g+C)*y,s[9]=(b-m)*y,s[10]=(1-(u+p))*y,s[11]=0,s[12]=t.x,s[13]=t.y,s[14]=t.z,s[15]=1,this}decompose(t,e,i){const s=this.elements;let n=le.set(s[0],s[1],s[2]).length();const r=le.set(s[4],s[5],s[6]).length(),a=le.set(s[8],s[9],s[10]).length();this.determinant()<0&&(n=-n),t.x=s[12],t.y=s[13],t.z=s[14],ct.copy(this);const o=1/n,h=1/r,c=1/a;return ct.elements[0]*=o,ct.elements[1]*=o,ct.elements[2]*=o,ct.elements[4]*=h,ct.elements[5]*=h,ct.elements[6]*=h,ct.elements[8]*=c,ct.elements[9]*=c,ct.elements[10]*=c,e.setFromRotationMatrix(ct),i.x=n,i.y=r,i.z=a,this}makePerspective(t,e,i,s,n,r,a=Yt,A=!1){const o=this.elements,h=2*n/(e-t),c=2*n/(i-s),u=(e+t)/(e-t),d=(i+s)/(i-s);let g,p;if(A)g=n/(r-n),p=r*n/(r-n);else if(a===Yt)g=-(r+n)/(r-n),p=-2*r*n/(r-n);else if(a===Oi)g=-r/(r-n),p=-r*n/(r-n);else throw new Error("THREE.Matrix4.makePerspective(): Invalid coordinate system: "+a);return o[0]=h,o[4]=0,o[8]=u,o[12]=0,o[1]=0,o[5]=c,o[9]=d,o[13]=0,o[2]=0,o[6]=0,o[10]=g,o[14]=p,o[3]=0,o[7]=0,o[11]=-1,o[15]=0,this}makeOrthographic(t,e,i,s,n,r,a=Yt,A=!1){const o=this.elements,h=2/(e-t),c=2/(i-s),u=-(e+t)/(e-t),d=-(i+s)/(i-s);let g,p;if(A)g=1/(r-n),p=r/(r-n);else if(a===Yt)g=-2/(r-n),p=-(r+n)/(r-n);else if(a===Oi)g=-1/(r-n),p=-n/(r-n);else throw new Error("THREE.Matrix4.makeOrthographic(): Invalid coordinate system: "+a);return o[0]=h,o[4]=0,o[8]=0,o[12]=u,o[1]=0,o[5]=c,o[9]=0,o[13]=d,o[2]=0,o[6]=0,o[10]=g,o[14]=p,o[3]=0,o[7]=0,o[11]=0,o[15]=1,this}equals(t){const e=this.elements,i=t.elements;for(let s=0;s<16;s++)if(e[s]!==i[s])return!1;return!0}fromArray(t,e=0){for(let i=0;i<16;i++)this.elements[i]=t[i+e];return this}toArray(t=[],e=0){const i=this.elements;return t[e]=i[0],t[e+1]=i[1],t[e+2]=i[2],t[e+3]=i[3],t[e+4]=i[4],t[e+5]=i[5],t[e+6]=i[6],t[e+7]=i[7],t[e+8]=i[8],t[e+9]=i[9],t[e+10]=i[10],t[e+11]=i[11],t[e+12]=i[12],t[e+13]=i[13],t[e+14]=i[14],t[e+15]=i[15],t}}const le=new I,ct=new S,ja=new I(0,0,0),Ja=new I(1,1,1),Ot=new I,ai=new I,tt=new I,Cn=new S,En=new Ut;class ue{constructor(t=0,e=0,i=0,s=ue.DEFAULT_ORDER){this.isEuler=!0,this._x=t,this._y=e,this._z=i,this._order=s}get x(){return this._x}set x(t){this._x=t,this._onChangeCallback()}get y(){return this._y}set y(t){this._y=t,this._onChangeCallback()}get z(){return this._z}set z(t){this._z=t,this._onChangeCallback()}get order(){return this._order}set order(t){this._order=t,this._onChangeCallback()}set(t,e,i,s=this._order){return this._x=t,this._y=e,this._z=i,this._order=s,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._order)}copy(t){return this._x=t._x,this._y=t._y,this._z=t._z,this._order=t._order,this._onChangeCallback(),this}setFromRotationMatrix(t,e=this._order,i=!0){const s=t.elements,n=s[0],r=s[4],a=s[8],A=s[1],o=s[5],h=s[9],c=s[2],u=s[6],d=s[10];switch(e){case"XYZ":this._y=Math.asin(w(a,-1,1)),Math.abs(a)<.9999999?(this._x=Math.atan2(-h,d),this._z=Math.atan2(-r,n)):(this._x=Math.atan2(u,o),this._z=0);break;case"YXZ":this._x=Math.asin(-w(h,-1,1)),Math.abs(h)<.9999999?(this._y=Math.atan2(a,d),this._z=Math.atan2(A,o)):(this._y=Math.atan2(-c,n),this._z=0);break;case"ZXY":this._x=Math.asin(w(u,-1,1)),Math.abs(u)<.9999999?(this._y=Math.atan2(-c,d),this._z=Math.atan2(-r,o)):(this._y=0,this._z=Math.atan2(A,n));break;case"ZYX":this._y=Math.asin(-w(c,-1,1)),Math.abs(c)<.9999999?(this._x=Math.atan2(u,d),this._z=Math.atan2(A,n)):(this._x=0,this._z=Math.atan2(-r,o));break;case"YZX":this._z=Math.asin(w(A,-1,1)),Math.abs(A)<.9999999?(this._x=Math.atan2(-h,o),this._y=Math.atan2(-c,n)):(this._x=0,this._y=Math.atan2(a,d));break;case"XZY":this._z=Math.asin(-w(r,-1,1)),Math.abs(r)<.9999999?(this._x=Math.atan2(u,o),this._y=Math.atan2(a,n)):(this._x=Math.atan2(-h,d),this._y=0);break;default:console.warn("THREE.Euler: .setFromRotationMatrix() encountered an unknown order: "+e)}return this._order=e,i===!0&&this._onChangeCallback(),this}setFromQuaternion(t,e,i){return Cn.makeRotationFromQuaternion(t),this.setFromRotationMatrix(Cn,e,i)}setFromVector3(t,e=this._order){return this.set(t.x,t.y,t.z,e)}reorder(t){return En.setFromEuler(this),this.setFromQuaternion(En,t)}equals(t){return t._x===this._x&&t._y===this._y&&t._z===this._z&&t._order===this._order}fromArray(t){return this._x=t[0],this._y=t[1],this._z=t[2],t[3]!==void 0&&(this._order=t[3]),this._onChangeCallback(),this}toArray(t=[],e=0){return t[e]=this._x,t[e+1]=this._y,t[e+2]=this._z,t[e+3]=this._order,t}_onChange(t){return this._onChangeCallback=t,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._order}}ue.DEFAULT_ORDER="XYZ";class Va{constructor(){this.mask=1}set(t){this.mask=(1<<t|0)>>>0}enable(t){this.mask|=1<<t|0}enableAll(){this.mask=-1}toggle(t){this.mask^=1<<t|0}disable(t){this.mask&=~(1<<t|0)}disableAll(){this.mask=0}test(t){return(this.mask&t.mask)!==0}isEnabled(t){return(this.mask&(1<<t|0))!==0}}let Ka=0;const yn=new I,de=new Ut,wt=new S,Ai=new I,ze=new I,Ya=new I,Wa=new Ut,Qn=new I(1,0,0),xn=new I(0,1,0),wn=new I(0,0,1),Mn={type:"added"},Xa={type:"removed"},ge={type:"childadded",child:null},ts={type:"childremoved",child:null};class z extends $e{constructor(){super(),this.isObject3D=!0,Object.defineProperty(this,"id",{value:Ka++}),this.uuid=At(),this.name="",this.type="Object3D",this.parent=null,this.children=[],this.up=z.DEFAULT_UP.clone();const t=new I,e=new ue,i=new Ut,s=new I(1,1,1);function n(){i.setFromEuler(e,!1)}function r(){e.setFromQuaternion(i,void 0,!1)}e._onChange(n),i._onChange(r),Object.defineProperties(this,{position:{configurable:!0,enumerable:!0,value:t},rotation:{configurable:!0,enumerable:!0,value:e},quaternion:{configurable:!0,enumerable:!0,value:i},scale:{configurable:!0,enumerable:!0,value:s},modelViewMatrix:{value:new S},normalMatrix:{value:new Ct}}),this.matrix=new S,this.matrixWorld=new S,this.matrixAutoUpdate=z.DEFAULT_MATRIX_AUTO_UPDATE,this.matrixWorldAutoUpdate=z.DEFAULT_MATRIX_WORLD_AUTO_UPDATE,this.matrixWorldNeedsUpdate=!1,this.layers=new Va,this.visible=!0,this.castShadow=!1,this.receiveShadow=!1,this.frustumCulled=!0,this.renderOrder=0,this.animations=[],this.customDepthMaterial=void 0,this.customDistanceMaterial=void 0,this.userData={}}onBeforeShadow(){}onAfterShadow(){}onBeforeRender(){}onAfterRender(){}applyMatrix4(t){this.matrixAutoUpdate&&this.updateMatrix(),this.matrix.premultiply(t),this.matrix.decompose(this.position,this.quaternion,this.scale)}applyQuaternion(t){return this.quaternion.premultiply(t),this}setRotationFromAxisAngle(t,e){this.quaternion.setFromAxisAngle(t,e)}setRotationFromEuler(t){this.quaternion.setFromEuler(t,!0)}setRotationFromMatrix(t){this.quaternion.setFromRotationMatrix(t)}setRotationFromQuaternion(t){this.quaternion.copy(t)}rotateOnAxis(t,e){return de.setFromAxisAngle(t,e),this.quaternion.multiply(de),this}rotateOnWorldAxis(t,e){return de.setFromAxisAngle(t,e),this.quaternion.premultiply(de),this}rotateX(t){return this.rotateOnAxis(Qn,t)}rotateY(t){return this.rotateOnAxis(xn,t)}rotateZ(t){return this.rotateOnAxis(wn,t)}translateOnAxis(t,e){return yn.copy(t).applyQuaternion(this.quaternion),this.position.add(yn.multiplyScalar(e)),this}translateX(t){return this.translateOnAxis(Qn,t)}translateY(t){return this.translateOnAxis(xn,t)}translateZ(t){return this.translateOnAxis(wn,t)}localToWorld(t){return this.updateWorldMatrix(!0,!1),t.applyMatrix4(this.matrixWorld)}worldToLocal(t){return this.updateWorldMatrix(!0,!1),t.applyMatrix4(wt.copy(this.matrixWorld).invert())}lookAt(t,e,i){t.isVector3?Ai.copy(t):Ai.set(t,e,i);const s=this.parent;this.updateWorldMatrix(!0,!1),ze.setFromMatrixPosition(this.matrixWorld),this.isCamera||this.isLight?wt.lookAt(ze,Ai,this.up):wt.lookAt(Ai,ze,this.up),this.quaternion.setFromRotationMatrix(wt),s&&(wt.extractRotation(s.matrixWorld),de.setFromRotationMatrix(wt),this.quaternion.premultiply(de.invert()))}add(t){if(arguments.length>1){for(let e=0;e<arguments.length;e++)this.add(arguments[e]);return this}return t===this?(console.error("THREE.Object3D.add: object can't be added as a child of itself.",t),this):(t&&t.isObject3D?(t.removeFromParent(),t.parent=this,this.children.push(t),t.dispatchEvent(Mn),ge.child=t,this.dispatchEvent(ge),ge.child=null):console.error("THREE.Object3D.add: object not an instance of THREE.Object3D.",t),this)}remove(t){if(arguments.length>1){for(let i=0;i<arguments.length;i++)this.remove(arguments[i]);return this}const e=this.children.indexOf(t);return e!==-1&&(t.parent=null,this.children.splice(e,1),t.dispatchEvent(Xa),ts.child=t,this.dispatchEvent(ts),ts.child=null),this}removeFromParent(){const t=this.parent;return t!==null&&t.remove(this),this}clear(){return this.remove(...this.children)}attach(t){return this.updateWorldMatrix(!0,!1),wt.copy(this.matrixWorld).invert(),t.parent!==null&&(t.parent.updateWorldMatrix(!0,!1),wt.multiply(t.parent.matrixWorld)),t.applyMatrix4(wt),t.removeFromParent(),t.parent=this,this.children.push(t),t.updateWorldMatrix(!1,!0),t.dispatchEvent(Mn),ge.child=t,this.dispatchEvent(ge),ge.child=null,this}getObjectById(t){return this.getObjectByProperty("id",t)}getObjectByName(t){return this.getObjectByProperty("name",t)}getObjectByProperty(t,e){if(this[t]===e)return this;for(let i=0,s=this.children.length;i<s;i++){const r=this.children[i].getObjectByProperty(t,e);if(r!==void 0)return r}}getObjectsByProperty(t,e,i=[]){this[t]===e&&i.push(this);const s=this.children;for(let n=0,r=s.length;n<r;n++)s[n].getObjectsByProperty(t,e,i);return i}getWorldPosition(t){return this.updateWorldMatrix(!0,!1),t.setFromMatrixPosition(this.matrixWorld)}getWorldQuaternion(t){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(ze,t,Ya),t}getWorldScale(t){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(ze,Wa,t),t}getWorldDirection(t){this.updateWorldMatrix(!0,!1);const e=this.matrixWorld.elements;return t.set(e[8],e[9],e[10]).normalize()}raycast(){}traverse(t){t(this);const e=this.children;for(let i=0,s=e.length;i<s;i++)e[i].traverse(t)}traverseVisible(t){if(this.visible===!1)return;t(this);const e=this.children;for(let i=0,s=e.length;i<s;i++)e[i].traverseVisible(t)}traverseAncestors(t){const e=this.parent;e!==null&&(t(e),e.traverseAncestors(t))}updateMatrix(){this.matrix.compose(this.position,this.quaternion,this.scale),this.matrixWorldNeedsUpdate=!0}updateMatrixWorld(t){this.matrixAutoUpdate&&this.updateMatrix(),(this.matrixWorldNeedsUpdate||t)&&(this.matrixWorldAutoUpdate===!0&&(this.parent===null?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix)),this.matrixWorldNeedsUpdate=!1,t=!0);const e=this.children;for(let i=0,s=e.length;i<s;i++)e[i].updateMatrixWorld(t)}updateWorldMatrix(t,e){const i=this.parent;if(t===!0&&i!==null&&i.updateWorldMatrix(!0,!1),this.matrixAutoUpdate&&this.updateMatrix(),this.matrixWorldAutoUpdate===!0&&(this.parent===null?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix)),e===!0){const s=this.children;for(let n=0,r=s.length;n<r;n++)s[n].updateWorldMatrix(!1,!0)}}toJSON(t){const e=t===void 0||typeof t=="string",i={};e&&(t={geometries:{},materials:{},textures:{},images:{},shapes:{},skeletons:{},animations:{},nodes:{}},i.metadata={version:4.7,type:"Object",generator:"Object3D.toJSON"});const s={};s.uuid=this.uuid,s.type=this.type,this.name!==""&&(s.name=this.name),this.castShadow===!0&&(s.castShadow=!0),this.receiveShadow===!0&&(s.receiveShadow=!0),this.visible===!1&&(s.visible=!1),this.frustumCulled===!1&&(s.frustumCulled=!1),this.renderOrder!==0&&(s.renderOrder=this.renderOrder),Object.keys(this.userData).length>0&&(s.userData=this.userData),s.layers=this.layers.mask,s.matrix=this.matrix.toArray(),s.up=this.up.toArray(),this.matrixAutoUpdate===!1&&(s.matrixAutoUpdate=!1),this.isInstancedMesh&&(s.type="InstancedMesh",s.count=this.count,s.instanceMatrix=this.instanceMatrix.toJSON(),this.instanceColor!==null&&(s.instanceColor=this.instanceColor.toJSON())),this.isBatchedMesh&&(s.type="BatchedMesh",s.perObjectFrustumCulled=this.perObjectFrustumCulled,s.sortObjects=this.sortObjects,s.drawRanges=this._drawRanges,s.reservedRanges=this._reservedRanges,s.geometryInfo=this._geometryInfo.map(a=>({...a,boundingBox:a.boundingBox?a.boundingBox.toJSON():void 0,boundingSphere:a.boundingSphere?a.boundingSphere.toJSON():void 0})),s.instanceInfo=this._instanceInfo.map(a=>({...a})),s.availableInstanceIds=this._availableInstanceIds.slice(),s.availableGeometryIds=this._availableGeometryIds.slice(),s.nextIndexStart=this._nextIndexStart,s.nextVertexStart=this._nextVertexStart,s.geometryCount=this._geometryCount,s.maxInstanceCount=this._maxInstanceCount,s.maxVertexCount=this._maxVertexCount,s.maxIndexCount=this._maxIndexCount,s.geometryInitialized=this._geometryInitialized,s.matricesTexture=this._matricesTexture.toJSON(t),s.indirectTexture=this._indirectTexture.toJSON(t),this._colorsTexture!==null&&(s.colorsTexture=this._colorsTexture.toJSON(t)),this.boundingSphere!==null&&(s.boundingSphere=this.boundingSphere.toJSON()),this.boundingBox!==null&&(s.boundingBox=this.boundingBox.toJSON()));function n(a,A){return a[A.uuid]===void 0&&(a[A.uuid]=A.toJSON(t)),A.uuid}if(this.isScene)this.background&&(this.background.isColor?s.background=this.background.toJSON():this.background.isTexture&&(s.background=this.background.toJSON(t).uuid)),this.environment&&this.environment.isTexture&&this.environment.isRenderTargetTexture!==!0&&(s.environment=this.environment.toJSON(t).uuid);else if(this.isMesh||this.isLine||this.isPoints){s.geometry=n(t.geometries,this.geometry);const a=this.geometry.parameters;if(a!==void 0&&a.shapes!==void 0){const A=a.shapes;if(Array.isArray(A))for(let o=0,h=A.length;o<h;o++){const c=A[o];n(t.shapes,c)}else n(t.shapes,A)}}if(this.isSkinnedMesh&&(s.bindMode=this.bindMode,s.bindMatrix=this.bindMatrix.toArray(),this.skeleton!==void 0&&(n(t.skeletons,this.skeleton),s.skeleton=this.skeleton.uuid)),this.material!==void 0)if(Array.isArray(this.material)){const a=[];for(let A=0,o=this.material.length;A<o;A++)a.push(n(t.materials,this.material[A]));s.material=a}else s.material=n(t.materials,this.material);if(this.children.length>0){s.children=[];for(let a=0;a<this.children.length;a++)s.children.push(this.children[a].toJSON(t).object)}if(this.animations.length>0){s.animations=[];for(let a=0;a<this.animations.length;a++){const A=this.animations[a];s.animations.push(n(t.animations,A))}}if(e){const a=r(t.geometries),A=r(t.materials),o=r(t.textures),h=r(t.images),c=r(t.shapes),u=r(t.skeletons),d=r(t.animations),g=r(t.nodes);a.length>0&&(i.geometries=a),A.length>0&&(i.materials=A),o.length>0&&(i.textures=o),h.length>0&&(i.images=h),c.length>0&&(i.shapes=c),u.length>0&&(i.skeletons=u),d.length>0&&(i.animations=d),g.length>0&&(i.nodes=g)}return i.object=s,i;function r(a){const A=[];for(const o in a){const h=a[o];delete h.metadata,A.push(h)}return A}}clone(t){return new this.constructor().copy(this,t)}copy(t,e=!0){if(this.name=t.name,this.up.copy(t.up),this.position.copy(t.position),this.rotation.order=t.rotation.order,this.quaternion.copy(t.quaternion),this.scale.copy(t.scale),this.matrix.copy(t.matrix),this.matrixWorld.copy(t.matrixWorld),this.matrixAutoUpdate=t.matrixAutoUpdate,this.matrixWorldAutoUpdate=t.matrixWorldAutoUpdate,this.matrixWorldNeedsUpdate=t.matrixWorldNeedsUpdate,this.layers.mask=t.layers.mask,this.visible=t.visible,this.castShadow=t.castShadow,this.receiveShadow=t.receiveShadow,this.frustumCulled=t.frustumCulled,this.renderOrder=t.renderOrder,this.animations=t.animations.slice(),this.userData=JSON.parse(JSON.stringify(t.userData)),e===!0)for(let i=0;i<t.children.length;i++){const s=t.children[i];this.add(s.clone())}return this}}z.DEFAULT_UP=new I(0,1,0),z.DEFAULT_MATRIX_AUTO_UPDATE=!0,z.DEFAULT_MATRIX_WORLD_AUTO_UPDATE=!0;const lt=new I,Mt=new I,es=new I,St=new I,pe=new I,fe=new I,Sn=new I,is=new I,ss=new I,ns=new I,rs=new Y,as=new Y,As=new Y;class ut{constructor(t=new I,e=new I,i=new I){this.a=t,this.b=e,this.c=i}static getNormal(t,e,i,s){s.subVectors(i,e),lt.subVectors(t,e),s.cross(lt);const n=s.lengthSq();return n>0?s.multiplyScalar(1/Math.sqrt(n)):s.set(0,0,0)}static getBarycoord(t,e,i,s,n){lt.subVectors(s,e),Mt.subVectors(i,e),es.subVectors(t,e);const r=lt.dot(lt),a=lt.dot(Mt),A=lt.dot(es),o=Mt.dot(Mt),h=Mt.dot(es),c=r*o-a*a;if(c===0)return n.set(0,0,0),null;const u=1/c,d=(o*A-a*h)*u,g=(r*h-a*A)*u;return n.set(1-d-g,g,d)}static containsPoint(t,e,i,s){return this.getBarycoord(t,e,i,s,St)===null?!1:St.x>=0&&St.y>=0&&St.x+St.y<=1}static getInterpolation(t,e,i,s,n,r,a,A){return this.getBarycoord(t,e,i,s,St)===null?(A.x=0,A.y=0,"z"in A&&(A.z=0),"w"in A&&(A.w=0),null):(A.setScalar(0),A.addScaledVector(n,St.x),A.addScaledVector(r,St.y),A.addScaledVector(a,St.z),A)}static getInterpolatedAttribute(t,e,i,s,n,r){return rs.setScalar(0),as.setScalar(0),As.setScalar(0),rs.fromBufferAttribute(t,e),as.fromBufferAttribute(t,i),As.fromBufferAttribute(t,s),r.setScalar(0),r.addScaledVector(rs,n.x),r.addScaledVector(as,n.y),r.addScaledVector(As,n.z),r}static isFrontFacing(t,e,i,s){return lt.subVectors(i,e),Mt.subVectors(t,e),lt.cross(Mt).dot(s)<0}set(t,e,i){return this.a.copy(t),this.b.copy(e),this.c.copy(i),this}setFromPointsAndIndices(t,e,i,s){return this.a.copy(t[e]),this.b.copy(t[i]),this.c.copy(t[s]),this}setFromAttributeAndIndices(t,e,i,s){return this.a.fromBufferAttribute(t,e),this.b.fromBufferAttribute(t,i),this.c.fromBufferAttribute(t,s),this}clone(){return new this.constructor().copy(this)}copy(t){return this.a.copy(t.a),this.b.copy(t.b),this.c.copy(t.c),this}getArea(){return lt.subVectors(this.c,this.b),Mt.subVectors(this.a,this.b),lt.cross(Mt).length()*.5}getMidpoint(t){return t.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)}getNormal(t){return ut.getNormal(this.a,this.b,this.c,t)}getPlane(t){return t.setFromCoplanarPoints(this.a,this.b,this.c)}getBarycoord(t,e){return ut.getBarycoord(t,this.a,this.b,this.c,e)}getInterpolation(t,e,i,s,n){return ut.getInterpolation(t,this.a,this.b,this.c,e,i,s,n)}containsPoint(t){return ut.containsPoint(t,this.a,this.b,this.c)}isFrontFacing(t){return ut.isFrontFacing(this.a,this.b,this.c,t)}intersectsBox(t){return t.intersectsTriangle(this)}closestPointToPoint(t,e){const i=this.a,s=this.b,n=this.c;let r,a;pe.subVectors(s,i),fe.subVectors(n,i),is.subVectors(t,i);const A=pe.dot(is),o=fe.dot(is);if(A<=0&&o<=0)return e.copy(i);ss.subVectors(t,s);const h=pe.dot(ss),c=fe.dot(ss);if(h>=0&&c<=h)return e.copy(s);const u=A*c-h*o;if(u<=0&&A>=0&&h<=0)return r=A/(A-h),e.copy(i).addScaledVector(pe,r);ns.subVectors(t,n);const d=pe.dot(ns),g=fe.dot(ns);if(g>=0&&d<=g)return e.copy(n);const p=d*o-A*g;if(p<=0&&o>=0&&g<=0)return a=o/(o-g),e.copy(i).addScaledVector(fe,a);const b=h*g-d*c;if(b<=0&&c-h>=0&&d-g>=0)return Sn.subVectors(n,s),a=(c-h)/(c-h+(d-g)),e.copy(s).addScaledVector(Sn,a);const f=1/(b+p+u);return r=p*f,a=u*f,e.copy(i).addScaledVector(pe,r).addScaledVector(fe,a)}equals(t){return t.a.equals(this.a)&&t.b.equals(this.b)&&t.c.equals(this.c)}}const Fn={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074},qt={h:0,s:0,l:0},oi={h:0,s:0,l:0};function os(l,t,e){return e<0&&(e+=1),e>1&&(e-=1),e<1/6?l+(t-l)*6*e:e<1/2?t:e<2/3?l+(t-l)*6*(2/3-e):l}class v{constructor(t,e,i){return this.isColor=!0,this.r=1,this.g=1,this.b=1,this.set(t,e,i)}set(t,e,i){if(e===void 0&&i===void 0){const s=t;s&&s.isColor?this.copy(s):typeof s=="number"?this.setHex(s):typeof s=="string"&&this.setStyle(s)}else this.setRGB(t,e,i);return this}setScalar(t){return this.r=t,this.g=t,this.b=t,this}setHex(t,e=N){return t=Math.floor(t),this.r=(t>>16&255)/255,this.g=(t>>8&255)/255,this.b=(t&255)/255,K.colorSpaceToWorking(this,e),this}setRGB(t,e,i,s=K.workingColorSpace){return this.r=t,this.g=e,this.b=i,K.colorSpaceToWorking(this,s),this}setHSL(t,e,i,s=K.workingColorSpace){if(t=qi(t,1),e=w(e,0,1),i=w(i,0,1),e===0)this.r=this.g=this.b=i;else{const n=i<=.5?i*(1+e):i+e-i*e,r=2*i-n;this.r=os(r,n,t+1/3),this.g=os(r,n,t),this.b=os(r,n,t-1/3)}return K.colorSpaceToWorking(this,s),this}setStyle(t,e=N){function i(n){n!==void 0&&parseFloat(n)<1&&console.warn("THREE.Color: Alpha component of "+t+" will be ignored.")}let s;if(s=/^(\w+)\(([^\)]*)\)/.exec(t)){let n;const r=s[1],a=s[2];switch(r){case"rgb":case"rgba":if(n=/^\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a))return i(n[4]),this.setRGB(Math.min(255,parseInt(n[1],10))/255,Math.min(255,parseInt(n[2],10))/255,Math.min(255,parseInt(n[3],10))/255,e);if(n=/^\s*(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a))return i(n[4]),this.setRGB(Math.min(100,parseInt(n[1],10))/100,Math.min(100,parseInt(n[2],10))/100,Math.min(100,parseInt(n[3],10))/100,e);break;case"hsl":case"hsla":if(n=/^\s*(\d*\.?\d+)\s*,\s*(\d*\.?\d+)\%\s*,\s*(\d*\.?\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a))return i(n[4]),this.setHSL(parseFloat(n[1])/360,parseFloat(n[2])/100,parseFloat(n[3])/100,e);break;default:console.warn("THREE.Color: Unknown color model "+t)}}else if(s=/^\#([A-Fa-f\d]+)$/.exec(t)){const n=s[1],r=n.length;if(r===3)return this.setRGB(parseInt(n.charAt(0),16)/15,parseInt(n.charAt(1),16)/15,parseInt(n.charAt(2),16)/15,e);if(r===6)return this.setHex(parseInt(n,16),e);console.warn("THREE.Color: Invalid hex color "+t)}else if(t&&t.length>0)return this.setColorName(t,e);return this}setColorName(t,e=N){const i=Fn[t.toLowerCase()];return i!==void 0?this.setHex(i,e):console.warn("THREE.Color: Unknown color "+t),this}clone(){return new this.constructor(this.r,this.g,this.b)}copy(t){return this.r=t.r,this.g=t.g,this.b=t.b,this}copySRGBToLinear(t){return this.r=Et(t.r),this.g=Et(t.g),this.b=Et(t.b),this}copyLinearToSRGB(t){return this.r=ae(t.r),this.g=ae(t.g),this.b=ae(t.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}getHex(t=N){return K.workingToColorSpace(V.copy(this),t),Math.round(w(V.r*255,0,255))*65536+Math.round(w(V.g*255,0,255))*256+Math.round(w(V.b*255,0,255))}getHexString(t=N){return("000000"+this.getHex(t).toString(16)).slice(-6)}getHSL(t,e=K.workingColorSpace){K.workingToColorSpace(V.copy(this),e);const i=V.r,s=V.g,n=V.b,r=Math.max(i,s,n),a=Math.min(i,s,n);let A,o;const h=(a+r)/2;if(a===r)A=0,o=0;else{const c=r-a;switch(o=h<=.5?c/(r+a):c/(2-r-a),r){case i:A=(s-n)/c+(s<n?6:0);break;case s:A=(n-i)/c+2;break;case n:A=(i-s)/c+4;break}A/=6}return t.h=A,t.s=o,t.l=h,t}getRGB(t,e=K.workingColorSpace){return K.workingToColorSpace(V.copy(this),e),t.r=V.r,t.g=V.g,t.b=V.b,t}getStyle(t=N){K.workingToColorSpace(V.copy(this),t);const e=V.r,i=V.g,s=V.b;return t!==N?`color(${t} ${e.toFixed(3)} ${i.toFixed(3)} ${s.toFixed(3)})`:`rgb(${Math.round(e*255)},${Math.round(i*255)},${Math.round(s*255)})`}offsetHSL(t,e,i){return this.getHSL(qt),this.setHSL(qt.h+t,qt.s+e,qt.l+i)}add(t){return this.r+=t.r,this.g+=t.g,this.b+=t.b,this}addColors(t,e){return this.r=t.r+e.r,this.g=t.g+e.g,this.b=t.b+e.b,this}addScalar(t){return this.r+=t,this.g+=t,this.b+=t,this}sub(t){return this.r=Math.max(0,this.r-t.r),this.g=Math.max(0,this.g-t.g),this.b=Math.max(0,this.b-t.b),this}multiply(t){return this.r*=t.r,this.g*=t.g,this.b*=t.b,this}multiplyScalar(t){return this.r*=t,this.g*=t,this.b*=t,this}lerp(t,e){return this.r+=(t.r-this.r)*e,this.g+=(t.g-this.g)*e,this.b+=(t.b-this.b)*e,this}lerpColors(t,e,i){return this.r=t.r+(e.r-t.r)*i,this.g=t.g+(e.g-t.g)*i,this.b=t.b+(e.b-t.b)*i,this}lerpHSL(t,e){this.getHSL(qt),t.getHSL(oi);const i=Ge(qt.h,oi.h,e),s=Ge(qt.s,oi.s,e),n=Ge(qt.l,oi.l,e);return this.setHSL(i,s,n),this}setFromVector3(t){return this.r=t.x,this.g=t.y,this.b=t.z,this}applyMatrix3(t){const e=this.r,i=this.g,s=this.b,n=t.elements;return this.r=n[0]*e+n[3]*i+n[6]*s,this.g=n[1]*e+n[4]*i+n[7]*s,this.b=n[2]*e+n[5]*i+n[8]*s,this}equals(t){return t.r===this.r&&t.g===this.g&&t.b===this.b}fromArray(t,e=0){return this.r=t[e],this.g=t[e+1],this.b=t[e+2],this}toArray(t=[],e=0){return t[e]=this.r,t[e+1]=this.g,t[e+2]=this.b,t}fromBufferAttribute(t,e){return this.r=t.getX(e),this.g=t.getY(e),this.b=t.getZ(e),this}toJSON(){return this.getHex()}*[Symbol.iterator](){yield this.r,yield this.g,yield this.b}}const V=new v;v.NAMES=Fn;let Za=0;class Zt extends $e{constructor(){super(),this.isMaterial=!0,Object.defineProperty(this,"id",{value:Za++}),this.uuid=At(),this.name="",this.type="Material",this.blending=Vs,this.side=We,this.vertexColors=!1,this.opacity=1,this.transparent=!1,this.alphaHash=!1,this.blendSrc=Ys,this.blendDst=Ws,this.blendEquation=Ks,this.blendSrcAlpha=null,this.blendDstAlpha=null,this.blendEquationAlpha=null,this.blendColor=new v(0,0,0),this.blendAlpha=0,this.depthFunc=Xs,this.depthTest=!0,this.depthWrite=!0,this.stencilWriteMask=255,this.stencilFunc=gn,this.stencilRef=0,this.stencilFuncMask=255,this.stencilFail=re,this.stencilZFail=re,this.stencilZPass=re,this.stencilWrite=!1,this.clippingPlanes=null,this.clipIntersection=!1,this.clipShadows=!1,this.shadowSide=null,this.colorWrite=!0,this.precision=null,this.polygonOffset=!1,this.polygonOffsetFactor=0,this.polygonOffsetUnits=0,this.dithering=!1,this.alphaToCoverage=!1,this.premultipliedAlpha=!1,this.forceSinglePass=!1,this.allowOverride=!0,this.visible=!0,this.toneMapped=!0,this.userData={},this.version=0,this._alphaTest=0}get alphaTest(){return this._alphaTest}set alphaTest(t){this._alphaTest>0!=t>0&&this.version++,this._alphaTest=t}onBeforeRender(){}onBeforeCompile(){}customProgramCacheKey(){return this.onBeforeCompile.toString()}setValues(t){if(t!==void 0)for(const e in t){const i=t[e];if(i===void 0){console.warn(`THREE.Material: parameter '${e}' has value of undefined.`);continue}const s=this[e];if(s===void 0){console.warn(`THREE.Material: '${e}' is not a property of THREE.${this.type}.`);continue}s&&s.isColor?s.set(i):s&&s.isVector3&&i&&i.isVector3?s.copy(i):this[e]=i}}toJSON(t){const e=t===void 0||typeof t=="string";e&&(t={textures:{},images:{}});const i={metadata:{version:4.7,type:"Material",generator:"Material.toJSON"}};i.uuid=this.uuid,i.type=this.type,this.name!==""&&(i.name=this.name),this.color&&this.color.isColor&&(i.color=this.color.getHex()),this.roughness!==void 0&&(i.roughness=this.roughness),this.metalness!==void 0&&(i.metalness=this.metalness),this.sheen!==void 0&&(i.sheen=this.sheen),this.sheenColor&&this.sheenColor.isColor&&(i.sheenColor=this.sheenColor.getHex()),this.sheenRoughness!==void 0&&(i.sheenRoughness=this.sheenRoughness),this.emissive&&this.emissive.isColor&&(i.emissive=this.emissive.getHex()),this.emissiveIntensity!==void 0&&this.emissiveIntensity!==1&&(i.emissiveIntensity=this.emissiveIntensity),this.specular&&this.specular.isColor&&(i.specular=this.specular.getHex()),this.specularIntensity!==void 0&&(i.specularIntensity=this.specularIntensity),this.specularColor&&this.specularColor.isColor&&(i.specularColor=this.specularColor.getHex()),this.shininess!==void 0&&(i.shininess=this.shininess),this.clearcoat!==void 0&&(i.clearcoat=this.clearcoat),this.clearcoatRoughness!==void 0&&(i.clearcoatRoughness=this.clearcoatRoughness),this.clearcoatMap&&this.clearcoatMap.isTexture&&(i.clearcoatMap=this.clearcoatMap.toJSON(t).uuid),this.clearcoatRoughnessMap&&this.clearcoatRoughnessMap.isTexture&&(i.clearcoatRoughnessMap=this.clearcoatRoughnessMap.toJSON(t).uuid),this.clearcoatNormalMap&&this.clearcoatNormalMap.isTexture&&(i.clearcoatNormalMap=this.clearcoatNormalMap.toJSON(t).uuid,i.clearcoatNormalScale=this.clearcoatNormalScale.toArray()),this.sheenColorMap&&this.sheenColorMap.isTexture&&(i.sheenColorMap=this.sheenColorMap.toJSON(t).uuid),this.sheenRoughnessMap&&this.sheenRoughnessMap.isTexture&&(i.sheenRoughnessMap=this.sheenRoughnessMap.toJSON(t).uuid),this.dispersion!==void 0&&(i.dispersion=this.dispersion),this.iridescence!==void 0&&(i.iridescence=this.iridescence),this.iridescenceIOR!==void 0&&(i.iridescenceIOR=this.iridescenceIOR),this.iridescenceThicknessRange!==void 0&&(i.iridescenceThicknessRange=this.iridescenceThicknessRange),this.iridescenceMap&&this.iridescenceMap.isTexture&&(i.iridescenceMap=this.iridescenceMap.toJSON(t).uuid),this.iridescenceThicknessMap&&this.iridescenceThicknessMap.isTexture&&(i.iridescenceThicknessMap=this.iridescenceThicknessMap.toJSON(t).uuid),this.anisotropy!==void 0&&(i.anisotropy=this.anisotropy),this.anisotropyRotation!==void 0&&(i.anisotropyRotation=this.anisotropyRotation),this.anisotropyMap&&this.anisotropyMap.isTexture&&(i.anisotropyMap=this.anisotropyMap.toJSON(t).uuid),this.map&&this.map.isTexture&&(i.map=this.map.toJSON(t).uuid),this.matcap&&this.matcap.isTexture&&(i.matcap=this.matcap.toJSON(t).uuid),this.alphaMap&&this.alphaMap.isTexture&&(i.alphaMap=this.alphaMap.toJSON(t).uuid),this.lightMap&&this.lightMap.isTexture&&(i.lightMap=this.lightMap.toJSON(t).uuid,i.lightMapIntensity=this.lightMapIntensity),this.aoMap&&this.aoMap.isTexture&&(i.aoMap=this.aoMap.toJSON(t).uuid,i.aoMapIntensity=this.aoMapIntensity),this.bumpMap&&this.bumpMap.isTexture&&(i.bumpMap=this.bumpMap.toJSON(t).uuid,i.bumpScale=this.bumpScale),this.normalMap&&this.normalMap.isTexture&&(i.normalMap=this.normalMap.toJSON(t).uuid,i.normalMapType=this.normalMapType,i.normalScale=this.normalScale.toArray()),this.displacementMap&&this.displacementMap.isTexture&&(i.displacementMap=this.displacementMap.toJSON(t).uuid,i.displacementScale=this.displacementScale,i.displacementBias=this.displacementBias),this.roughnessMap&&this.roughnessMap.isTexture&&(i.roughnessMap=this.roughnessMap.toJSON(t).uuid),this.metalnessMap&&this.metalnessMap.isTexture&&(i.metalnessMap=this.metalnessMap.toJSON(t).uuid),this.emissiveMap&&this.emissiveMap.isTexture&&(i.emissiveMap=this.emissiveMap.toJSON(t).uuid),this.specularMap&&this.specularMap.isTexture&&(i.specularMap=this.specularMap.toJSON(t).uuid),this.specularIntensityMap&&this.specularIntensityMap.isTexture&&(i.specularIntensityMap=this.specularIntensityMap.toJSON(t).uuid),this.specularColorMap&&this.specularColorMap.isTexture&&(i.specularColorMap=this.specularColorMap.toJSON(t).uuid),this.envMap&&this.envMap.isTexture&&(i.envMap=this.envMap.toJSON(t).uuid,this.combine!==void 0&&(i.combine=this.combine)),this.envMapRotation!==void 0&&(i.envMapRotation=this.envMapRotation.toArray()),this.envMapIntensity!==void 0&&(i.envMapIntensity=this.envMapIntensity),this.reflectivity!==void 0&&(i.reflectivity=this.reflectivity),this.refractionRatio!==void 0&&(i.refractionRatio=this.refractionRatio),this.gradientMap&&this.gradientMap.isTexture&&(i.gradientMap=this.gradientMap.toJSON(t).uuid),this.transmission!==void 0&&(i.transmission=this.transmission),this.transmissionMap&&this.transmissionMap.isTexture&&(i.transmissionMap=this.transmissionMap.toJSON(t).uuid),this.thickness!==void 0&&(i.thickness=this.thickness),this.thicknessMap&&this.thicknessMap.isTexture&&(i.thicknessMap=this.thicknessMap.toJSON(t).uuid),this.attenuationDistance!==void 0&&this.attenuationDistance!==1/0&&(i.attenuationDistance=this.attenuationDistance),this.attenuationColor!==void 0&&(i.attenuationColor=this.attenuationColor.getHex()),this.size!==void 0&&(i.size=this.size),this.shadowSide!==null&&(i.shadowSide=this.shadowSide),this.sizeAttenuation!==void 0&&(i.sizeAttenuation=this.sizeAttenuation),this.blending!==Vs&&(i.blending=this.blending),this.side!==We&&(i.side=this.side),this.vertexColors===!0&&(i.vertexColors=!0),this.opacity<1&&(i.opacity=this.opacity),this.transparent===!0&&(i.transparent=!0),this.blendSrc!==Ys&&(i.blendSrc=this.blendSrc),this.blendDst!==Ws&&(i.blendDst=this.blendDst),this.blendEquation!==Ks&&(i.blendEquation=this.blendEquation),this.blendSrcAlpha!==null&&(i.blendSrcAlpha=this.blendSrcAlpha),this.blendDstAlpha!==null&&(i.blendDstAlpha=this.blendDstAlpha),this.blendEquationAlpha!==null&&(i.blendEquationAlpha=this.blendEquationAlpha),this.blendColor&&this.blendColor.isColor&&(i.blendColor=this.blendColor.getHex()),this.blendAlpha!==0&&(i.blendAlpha=this.blendAlpha),this.depthFunc!==Xs&&(i.depthFunc=this.depthFunc),this.depthTest===!1&&(i.depthTest=this.depthTest),this.depthWrite===!1&&(i.depthWrite=this.depthWrite),this.colorWrite===!1&&(i.colorWrite=this.colorWrite),this.stencilWriteMask!==255&&(i.stencilWriteMask=this.stencilWriteMask),this.stencilFunc!==gn&&(i.stencilFunc=this.stencilFunc),this.stencilRef!==0&&(i.stencilRef=this.stencilRef),this.stencilFuncMask!==255&&(i.stencilFuncMask=this.stencilFuncMask),this.stencilFail!==re&&(i.stencilFail=this.stencilFail),this.stencilZFail!==re&&(i.stencilZFail=this.stencilZFail),this.stencilZPass!==re&&(i.stencilZPass=this.stencilZPass),this.stencilWrite===!0&&(i.stencilWrite=this.stencilWrite),this.rotation!==void 0&&this.rotation!==0&&(i.rotation=this.rotation),this.polygonOffset===!0&&(i.polygonOffset=!0),this.polygonOffsetFactor!==0&&(i.polygonOffsetFactor=this.polygonOffsetFactor),this.polygonOffsetUnits!==0&&(i.polygonOffsetUnits=this.polygonOffsetUnits),this.linewidth!==void 0&&this.linewidth!==1&&(i.linewidth=this.linewidth),this.dashSize!==void 0&&(i.dashSize=this.dashSize),this.gapSize!==void 0&&(i.gapSize=this.gapSize),this.scale!==void 0&&(i.scale=this.scale),this.dithering===!0&&(i.dithering=!0),this.alphaTest>0&&(i.alphaTest=this.alphaTest),this.alphaHash===!0&&(i.alphaHash=!0),this.alphaToCoverage===!0&&(i.alphaToCoverage=!0),this.premultipliedAlpha===!0&&(i.premultipliedAlpha=!0),this.forceSinglePass===!0&&(i.forceSinglePass=!0),this.wireframe===!0&&(i.wireframe=!0),this.wireframeLinewidth>1&&(i.wireframeLinewidth=this.wireframeLinewidth),this.wireframeLinecap!=="round"&&(i.wireframeLinecap=this.wireframeLinecap),this.wireframeLinejoin!=="round"&&(i.wireframeLinejoin=this.wireframeLinejoin),this.flatShading===!0&&(i.flatShading=!0),this.visible===!1&&(i.visible=!1),this.toneMapped===!1&&(i.toneMapped=!1),this.fog===!1&&(i.fog=!1),Object.keys(this.userData).length>0&&(i.userData=this.userData);function s(n){const r=[];for(const a in n){const A=n[a];delete A.metadata,r.push(A)}return r}if(e){const n=s(t.textures),r=s(t.images);n.length>0&&(i.textures=n),r.length>0&&(i.images=r)}return i}clone(){return new this.constructor().copy(this)}copy(t){this.name=t.name,this.blending=t.blending,this.side=t.side,this.vertexColors=t.vertexColors,this.opacity=t.opacity,this.transparent=t.transparent,this.blendSrc=t.blendSrc,this.blendDst=t.blendDst,this.blendEquation=t.blendEquation,this.blendSrcAlpha=t.blendSrcAlpha,this.blendDstAlpha=t.blendDstAlpha,this.blendEquationAlpha=t.blendEquationAlpha,this.blendColor.copy(t.blendColor),this.blendAlpha=t.blendAlpha,this.depthFunc=t.depthFunc,this.depthTest=t.depthTest,this.depthWrite=t.depthWrite,this.stencilWriteMask=t.stencilWriteMask,this.stencilFunc=t.stencilFunc,this.stencilRef=t.stencilRef,this.stencilFuncMask=t.stencilFuncMask,this.stencilFail=t.stencilFail,this.stencilZFail=t.stencilZFail,this.stencilZPass=t.stencilZPass,this.stencilWrite=t.stencilWrite;const e=t.clippingPlanes;let i=null;if(e!==null){const s=e.length;i=new Array(s);for(let n=0;n!==s;++n)i[n]=e[n].clone()}return this.clippingPlanes=i,this.clipIntersection=t.clipIntersection,this.clipShadows=t.clipShadows,this.shadowSide=t.shadowSide,this.colorWrite=t.colorWrite,this.precision=t.precision,this.polygonOffset=t.polygonOffset,this.polygonOffsetFactor=t.polygonOffsetFactor,this.polygonOffsetUnits=t.polygonOffsetUnits,this.dithering=t.dithering,this.alphaTest=t.alphaTest,this.alphaHash=t.alphaHash,this.alphaToCoverage=t.alphaToCoverage,this.premultipliedAlpha=t.premultipliedAlpha,this.forceSinglePass=t.forceSinglePass,this.visible=t.visible,this.toneMapped=t.toneMapped,this.userData=JSON.parse(JSON.stringify(t.userData)),this}dispose(){this.dispatchEvent({type:"dispose"})}set needsUpdate(t){t===!0&&this.version++}}class be extends Zt{constructor(t){super(),this.isMeshBasicMaterial=!0,this.type="MeshBasicMaterial",this.color=new v(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.envMapRotation=new ue,this.combine=na,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.fog=!0,this.setValues(t)}copy(t){return super.copy(t),this.color.copy(t.color),this.map=t.map,this.lightMap=t.lightMap,this.lightMapIntensity=t.lightMapIntensity,this.aoMap=t.aoMap,this.aoMapIntensity=t.aoMapIntensity,this.specularMap=t.specularMap,this.alphaMap=t.alphaMap,this.envMap=t.envMap,this.envMapRotation.copy(t.envMapRotation),this.combine=t.combine,this.reflectivity=t.reflectivity,this.refractionRatio=t.refractionRatio,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.wireframeLinecap=t.wireframeLinecap,this.wireframeLinejoin=t.wireframeLinejoin,this.fog=t.fog,this}}const H=new I,hi=new U;let $a=0;class et{constructor(t,e,i=!1){if(Array.isArray(t))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");this.isBufferAttribute=!0,Object.defineProperty(this,"id",{value:$a++}),this.name="",this.array=t,this.itemSize=e,this.count=t!==void 0?t.length/e:0,this.normalized=i,this.usage=Hi,this.updateRanges=[],this.gpuType=Gt,this.version=0}onUploadCallback(){}set needsUpdate(t){t===!0&&this.version++}setUsage(t){return this.usage=t,this}addUpdateRange(t,e){this.updateRanges.push({start:t,count:e})}clearUpdateRanges(){this.updateRanges.length=0}copy(t){return this.name=t.name,this.array=new t.array.constructor(t.array),this.itemSize=t.itemSize,this.count=t.count,this.normalized=t.normalized,this.usage=t.usage,this.gpuType=t.gpuType,this}copyAt(t,e,i){t*=this.itemSize,i*=e.itemSize;for(let s=0,n=this.itemSize;s<n;s++)this.array[t+s]=e.array[i+s];return this}copyArray(t){return this.array.set(t),this}applyMatrix3(t){if(this.itemSize===2)for(let e=0,i=this.count;e<i;e++)hi.fromBufferAttribute(this,e),hi.applyMatrix3(t),this.setXY(e,hi.x,hi.y);else if(this.itemSize===3)for(let e=0,i=this.count;e<i;e++)H.fromBufferAttribute(this,e),H.applyMatrix3(t),this.setXYZ(e,H.x,H.y,H.z);return this}applyMatrix4(t){for(let e=0,i=this.count;e<i;e++)H.fromBufferAttribute(this,e),H.applyMatrix4(t),this.setXYZ(e,H.x,H.y,H.z);return this}applyNormalMatrix(t){for(let e=0,i=this.count;e<i;e++)H.fromBufferAttribute(this,e),H.applyNormalMatrix(t),this.setXYZ(e,H.x,H.y,H.z);return this}transformDirection(t){for(let e=0,i=this.count;e<i;e++)H.fromBufferAttribute(this,e),H.transformDirection(t),this.setXYZ(e,H.x,H.y,H.z);return this}set(t,e=0){return this.array.set(t,e),this}getComponent(t,e){let i=this.array[t*this.itemSize+e];return this.normalized&&(i=ot(i,this.array)),i}setComponent(t,e,i){return this.normalized&&(i=_(i,this.array)),this.array[t*this.itemSize+e]=i,this}getX(t){let e=this.array[t*this.itemSize];return this.normalized&&(e=ot(e,this.array)),e}setX(t,e){return this.normalized&&(e=_(e,this.array)),this.array[t*this.itemSize]=e,this}getY(t){let e=this.array[t*this.itemSize+1];return this.normalized&&(e=ot(e,this.array)),e}setY(t,e){return this.normalized&&(e=_(e,this.array)),this.array[t*this.itemSize+1]=e,this}getZ(t){let e=this.array[t*this.itemSize+2];return this.normalized&&(e=ot(e,this.array)),e}setZ(t,e){return this.normalized&&(e=_(e,this.array)),this.array[t*this.itemSize+2]=e,this}getW(t){let e=this.array[t*this.itemSize+3];return this.normalized&&(e=ot(e,this.array)),e}setW(t,e){return this.normalized&&(e=_(e,this.array)),this.array[t*this.itemSize+3]=e,this}setXY(t,e,i){return t*=this.itemSize,this.normalized&&(e=_(e,this.array),i=_(i,this.array)),this.array[t+0]=e,this.array[t+1]=i,this}setXYZ(t,e,i,s){return t*=this.itemSize,this.normalized&&(e=_(e,this.array),i=_(i,this.array),s=_(s,this.array)),this.array[t+0]=e,this.array[t+1]=i,this.array[t+2]=s,this}setXYZW(t,e,i,s,n){return t*=this.itemSize,this.normalized&&(e=_(e,this.array),i=_(i,this.array),s=_(s,this.array),n=_(n,this.array)),this.array[t+0]=e,this.array[t+1]=i,this.array[t+2]=s,this.array[t+3]=n,this}onUpload(t){return this.onUploadCallback=t,this}clone(){return new this.constructor(this.array,this.itemSize).copy(this)}toJSON(){const t={itemSize:this.itemSize,type:this.array.constructor.name,array:Array.from(this.array),normalized:this.normalized};return this.name!==""&&(t.name=this.name),this.usage!==Hi&&(t.usage=this.usage),t}}class tA extends et{constructor(t,e,i){super(new Uint16Array(t),e,i)}}class eA extends et{constructor(t,e,i){super(new Uint32Array(t),e,i)}}class hs extends et{constructor(t,e,i){super(new Float32Array(t),e,i)}}let iA=0;const nt=new S,cs=new z,me=new I,it=new yt,ve=new yt,q=new I;class $t extends $e{constructor(){super(),this.isBufferGeometry=!0,Object.defineProperty(this,"id",{value:iA++}),this.uuid=At(),this.name="",this.type="BufferGeometry",this.index=null,this.indirect=null,this.attributes={},this.morphAttributes={},this.morphTargetsRelative=!1,this.groups=[],this.boundingBox=null,this.boundingSphere=null,this.drawRange={start:0,count:1/0},this.userData={}}getIndex(){return this.index}setIndex(t){return Array.isArray(t)?this.index=new(Na(t)?eA:tA)(t,1):this.index=t,this}setIndirect(t){return this.indirect=t,this}getIndirect(){return this.indirect}getAttribute(t){return this.attributes[t]}setAttribute(t,e){return this.attributes[t]=e,this}deleteAttribute(t){return delete this.attributes[t],this}hasAttribute(t){return this.attributes[t]!==void 0}addGroup(t,e,i=0){this.groups.push({start:t,count:e,materialIndex:i})}clearGroups(){this.groups=[]}setDrawRange(t,e){this.drawRange.start=t,this.drawRange.count=e}applyMatrix4(t){const e=this.attributes.position;e!==void 0&&(e.applyMatrix4(t),e.needsUpdate=!0);const i=this.attributes.normal;if(i!==void 0){const n=new Ct().getNormalMatrix(t);i.applyNormalMatrix(n),i.needsUpdate=!0}const s=this.attributes.tangent;return s!==void 0&&(s.transformDirection(t),s.needsUpdate=!0),this.boundingBox!==null&&this.computeBoundingBox(),this.boundingSphere!==null&&this.computeBoundingSphere(),this}applyQuaternion(t){return nt.makeRotationFromQuaternion(t),this.applyMatrix4(nt),this}rotateX(t){return nt.makeRotationX(t),this.applyMatrix4(nt),this}rotateY(t){return nt.makeRotationY(t),this.applyMatrix4(nt),this}rotateZ(t){return nt.makeRotationZ(t),this.applyMatrix4(nt),this}translate(t,e,i){return nt.makeTranslation(t,e,i),this.applyMatrix4(nt),this}scale(t,e,i){return nt.makeScale(t,e,i),this.applyMatrix4(nt),this}lookAt(t){return cs.lookAt(t),cs.updateMatrix(),this.applyMatrix4(cs.matrix),this}center(){return this.computeBoundingBox(),this.boundingBox.getCenter(me).negate(),this.translate(me.x,me.y,me.z),this}setFromPoints(t){const e=this.getAttribute("position");if(e===void 0){const i=[];for(let s=0,n=t.length;s<n;s++){const r=t[s];i.push(r.x,r.y,r.z||0)}this.setAttribute("position",new hs(i,3))}else{const i=Math.min(t.length,e.count);for(let s=0;s<i;s++){const n=t[s];e.setXYZ(s,n.x,n.y,n.z||0)}t.length>e.count&&console.warn("THREE.BufferGeometry: Buffer size too small for points data. Use .dispose() and create a new geometry."),e.needsUpdate=!0}return this}computeBoundingBox(){this.boundingBox===null&&(this.boundingBox=new yt);const t=this.attributes.position,e=this.morphAttributes.position;if(t&&t.isGLBufferAttribute){console.error("THREE.BufferGeometry.computeBoundingBox(): GLBufferAttribute requires a manual bounding box.",this),this.boundingBox.set(new I(-1/0,-1/0,-1/0),new I(1/0,1/0,1/0));return}if(t!==void 0){if(this.boundingBox.setFromBufferAttribute(t),e)for(let i=0,s=e.length;i<s;i++){const n=e[i];it.setFromBufferAttribute(n),this.morphTargetsRelative?(q.addVectors(this.boundingBox.min,it.min),this.boundingBox.expandByPoint(q),q.addVectors(this.boundingBox.max,it.max),this.boundingBox.expandByPoint(q)):(this.boundingBox.expandByPoint(it.min),this.boundingBox.expandByPoint(it.max))}}else this.boundingBox.makeEmpty();(isNaN(this.boundingBox.min.x)||isNaN(this.boundingBox.min.y)||isNaN(this.boundingBox.min.z))&&console.error('THREE.BufferGeometry.computeBoundingBox(): Computed min/max have NaN values. The "position" attribute is likely to have NaN values.',this)}computeBoundingSphere(){this.boundingSphere===null&&(this.boundingSphere=new pt);const t=this.attributes.position,e=this.morphAttributes.position;if(t&&t.isGLBufferAttribute){console.error("THREE.BufferGeometry.computeBoundingSphere(): GLBufferAttribute requires a manual bounding sphere.",this),this.boundingSphere.set(new I,1/0);return}if(t){const i=this.boundingSphere.center;if(it.setFromBufferAttribute(t),e)for(let n=0,r=e.length;n<r;n++){const a=e[n];ve.setFromBufferAttribute(a),this.morphTargetsRelative?(q.addVectors(it.min,ve.min),it.expandByPoint(q),q.addVectors(it.max,ve.max),it.expandByPoint(q)):(it.expandByPoint(ve.min),it.expandByPoint(ve.max))}it.getCenter(i);let s=0;for(let n=0,r=t.count;n<r;n++)q.fromBufferAttribute(t,n),s=Math.max(s,i.distanceToSquared(q));if(e)for(let n=0,r=e.length;n<r;n++){const a=e[n],A=this.morphTargetsRelative;for(let o=0,h=a.count;o<h;o++)q.fromBufferAttribute(a,o),A&&(me.fromBufferAttribute(t,o),q.add(me)),s=Math.max(s,i.distanceToSquared(q))}this.boundingSphere.radius=Math.sqrt(s),isNaN(this.boundingSphere.radius)&&console.error('THREE.BufferGeometry.computeBoundingSphere(): Computed radius is NaN. The "position" attribute is likely to have NaN values.',this)}}computeTangents(){const t=this.index,e=this.attributes;if(t===null||e.position===void 0||e.normal===void 0||e.uv===void 0){console.error("THREE.BufferGeometry: .computeTangents() failed. Missing required attributes (index, position, normal or uv)");return}const i=e.position,s=e.normal,n=e.uv;this.hasAttribute("tangent")===!1&&this.setAttribute("tangent",new et(new Float32Array(4*i.count),4));const r=this.getAttribute("tangent"),a=[],A=[];for(let x=0;x<i.count;x++)a[x]=new I,A[x]=new I;const o=new I,h=new I,c=new I,u=new U,d=new U,g=new U,p=new I,b=new I;function f(x,F,k){o.fromBufferAttribute(i,x),h.fromBufferAttribute(i,F),c.fromBufferAttribute(i,k),u.fromBufferAttribute(n,x),d.fromBufferAttribute(n,F),g.fromBufferAttribute(n,k),h.sub(o),c.sub(o),d.sub(u),g.sub(u);const T=1/(d.x*g.y-g.x*d.y);isFinite(T)&&(p.copy(h).multiplyScalar(g.y).addScaledVector(c,-d.y).multiplyScalar(T),b.copy(c).multiplyScalar(d.x).addScaledVector(h,-g.x).multiplyScalar(T),a[x].add(p),a[F].add(p),a[k].add(p),A[x].add(b),A[F].add(b),A[k].add(b))}let m=this.groups;m.length===0&&(m=[{start:0,count:t.count}]);for(let x=0,F=m.length;x<F;++x){const k=m[x],T=k.start,P=k.count;for(let L=T,j=T+P;L<j;L+=3)f(t.getX(L+0),t.getX(L+1),t.getX(L+2))}const C=new I,B=new I,E=new I,Q=new I;function y(x){E.fromBufferAttribute(s,x),Q.copy(E);const F=a[x];C.copy(F),C.sub(E.multiplyScalar(E.dot(F))).normalize(),B.crossVectors(Q,F);const T=B.dot(A[x])<0?-1:1;r.setXYZW(x,C.x,C.y,C.z,T)}for(let x=0,F=m.length;x<F;++x){const k=m[x],T=k.start,P=k.count;for(let L=T,j=T+P;L<j;L+=3)y(t.getX(L+0)),y(t.getX(L+1)),y(t.getX(L+2))}}computeVertexNormals(){const t=this.index,e=this.getAttribute("position");if(e!==void 0){let i=this.getAttribute("normal");if(i===void 0)i=new et(new Float32Array(e.count*3),3),this.setAttribute("normal",i);else for(let u=0,d=i.count;u<d;u++)i.setXYZ(u,0,0,0);const s=new I,n=new I,r=new I,a=new I,A=new I,o=new I,h=new I,c=new I;if(t)for(let u=0,d=t.count;u<d;u+=3){const g=t.getX(u+0),p=t.getX(u+1),b=t.getX(u+2);s.fromBufferAttribute(e,g),n.fromBufferAttribute(e,p),r.fromBufferAttribute(e,b),h.subVectors(r,n),c.subVectors(s,n),h.cross(c),a.fromBufferAttribute(i,g),A.fromBufferAttribute(i,p),o.fromBufferAttribute(i,b),a.add(h),A.add(h),o.add(h),i.setXYZ(g,a.x,a.y,a.z),i.setXYZ(p,A.x,A.y,A.z),i.setXYZ(b,o.x,o.y,o.z)}else for(let u=0,d=e.count;u<d;u+=3)s.fromBufferAttribute(e,u+0),n.fromBufferAttribute(e,u+1),r.fromBufferAttribute(e,u+2),h.subVectors(r,n),c.subVectors(s,n),h.cross(c),i.setXYZ(u+0,h.x,h.y,h.z),i.setXYZ(u+1,h.x,h.y,h.z),i.setXYZ(u+2,h.x,h.y,h.z);this.normalizeNormals(),i.needsUpdate=!0}}normalizeNormals(){const t=this.attributes.normal;for(let e=0,i=t.count;e<i;e++)q.fromBufferAttribute(t,e),q.normalize(),t.setXYZ(e,q.x,q.y,q.z)}toNonIndexed(){function t(a,A){const o=a.array,h=a.itemSize,c=a.normalized,u=new o.constructor(A.length*h);let d=0,g=0;for(let p=0,b=A.length;p<b;p++){a.isInterleavedBufferAttribute?d=A[p]*a.data.stride+a.offset:d=A[p]*h;for(let f=0;f<h;f++)u[g++]=o[d++]}return new et(u,h,c)}if(this.index===null)return console.warn("THREE.BufferGeometry.toNonIndexed(): BufferGeometry is already non-indexed."),this;const e=new $t,i=this.index.array,s=this.attributes;for(const a in s){const A=s[a],o=t(A,i);e.setAttribute(a,o)}const n=this.morphAttributes;for(const a in n){const A=[],o=n[a];for(let h=0,c=o.length;h<c;h++){const u=o[h],d=t(u,i);A.push(d)}e.morphAttributes[a]=A}e.morphTargetsRelative=this.morphTargetsRelative;const r=this.groups;for(let a=0,A=r.length;a<A;a++){const o=r[a];e.addGroup(o.start,o.count,o.materialIndex)}return e}toJSON(){const t={metadata:{version:4.7,type:"BufferGeometry",generator:"BufferGeometry.toJSON"}};if(t.uuid=this.uuid,t.type=this.type,this.name!==""&&(t.name=this.name),Object.keys(this.userData).length>0&&(t.userData=this.userData),this.parameters!==void 0){const A=this.parameters;for(const o in A)A[o]!==void 0&&(t[o]=A[o]);return t}t.data={attributes:{}};const e=this.index;e!==null&&(t.data.index={type:e.array.constructor.name,array:Array.prototype.slice.call(e.array)});const i=this.attributes;for(const A in i){const o=i[A];t.data.attributes[A]=o.toJSON(t.data)}const s={};let n=!1;for(const A in this.morphAttributes){const o=this.morphAttributes[A],h=[];for(let c=0,u=o.length;c<u;c++){const d=o[c];h.push(d.toJSON(t.data))}h.length>0&&(s[A]=h,n=!0)}n&&(t.data.morphAttributes=s,t.data.morphTargetsRelative=this.morphTargetsRelative);const r=this.groups;r.length>0&&(t.data.groups=JSON.parse(JSON.stringify(r)));const a=this.boundingSphere;return a!==null&&(t.data.boundingSphere=a.toJSON()),t}clone(){return new this.constructor().copy(this)}copy(t){this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingBox=null,this.boundingSphere=null;const e={};this.name=t.name;const i=t.index;i!==null&&this.setIndex(i.clone());const s=t.attributes;for(const o in s){const h=s[o];this.setAttribute(o,h.clone(e))}const n=t.morphAttributes;for(const o in n){const h=[],c=n[o];for(let u=0,d=c.length;u<d;u++)h.push(c[u].clone(e));this.morphAttributes[o]=h}this.morphTargetsRelative=t.morphTargetsRelative;const r=t.groups;for(let o=0,h=r.length;o<h;o++){const c=r[o];this.addGroup(c.start,c.count,c.materialIndex)}const a=t.boundingBox;a!==null&&(this.boundingBox=a.clone());const A=t.boundingSphere;return A!==null&&(this.boundingSphere=A.clone()),this.drawRange.start=t.drawRange.start,this.drawRange.count=t.drawRange.count,this.userData=t.userData,this}dispose(){this.dispatchEvent({type:"dispose"})}}const kn=new S,te=new ri,ci=new pt,Tn=new I,li=new I,ui=new I,di=new I,ls=new I,gi=new I,Dn=new I,pi=new I;class fi extends z{constructor(t=new $t,e=new be){super(),this.isMesh=!0,this.type="Mesh",this.geometry=t,this.material=e,this.morphTargetDictionary=void 0,this.morphTargetInfluences=void 0,this.count=1,this.updateMorphTargets()}copy(t,e){return super.copy(t,e),t.morphTargetInfluences!==void 0&&(this.morphTargetInfluences=t.morphTargetInfluences.slice()),t.morphTargetDictionary!==void 0&&(this.morphTargetDictionary=Object.assign({},t.morphTargetDictionary)),this.material=Array.isArray(t.material)?t.material.slice():t.material,this.geometry=t.geometry,this}updateMorphTargets(){const e=this.geometry.morphAttributes,i=Object.keys(e);if(i.length>0){const s=e[i[0]];if(s!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let n=0,r=s.length;n<r;n++){const a=s[n].name||String(n);this.morphTargetInfluences.push(0),this.morphTargetDictionary[a]=n}}}}getVertexPosition(t,e){const i=this.geometry,s=i.attributes.position,n=i.morphAttributes.position,r=i.morphTargetsRelative;e.fromBufferAttribute(s,t);const a=this.morphTargetInfluences;if(n&&a){gi.set(0,0,0);for(let A=0,o=n.length;A<o;A++){const h=a[A],c=n[A];h!==0&&(ls.fromBufferAttribute(c,t),r?gi.addScaledVector(ls,h):gi.addScaledVector(ls.sub(e),h))}e.add(gi)}return e}raycast(t,e){const i=this.geometry,s=this.material,n=this.matrixWorld;s!==void 0&&(i.boundingSphere===null&&i.computeBoundingSphere(),ci.copy(i.boundingSphere),ci.applyMatrix4(n),te.copy(t.ray).recast(t.near),!(ci.containsPoint(te.origin)===!1&&(te.intersectSphere(ci,Tn)===null||te.origin.distanceToSquared(Tn)>(t.far-t.near)**2))&&(kn.copy(n).invert(),te.copy(t.ray).applyMatrix4(kn),!(i.boundingBox!==null&&te.intersectsBox(i.boundingBox)===!1)&&this._computeIntersections(t,e,te)))}_computeIntersections(t,e,i){let s;const n=this.geometry,r=this.material,a=n.index,A=n.attributes.position,o=n.attributes.uv,h=n.attributes.uv1,c=n.attributes.normal,u=n.groups,d=n.drawRange;if(a!==null)if(Array.isArray(r))for(let g=0,p=u.length;g<p;g++){const b=u[g],f=r[b.materialIndex],m=Math.max(b.start,d.start),C=Math.min(a.count,Math.min(b.start+b.count,d.start+d.count));for(let B=m,E=C;B<E;B+=3){const Q=a.getX(B),y=a.getX(B+1),x=a.getX(B+2);s=bi(this,f,t,i,o,h,c,Q,y,x),s&&(s.faceIndex=Math.floor(B/3),s.face.materialIndex=b.materialIndex,e.push(s))}}else{const g=Math.max(0,d.start),p=Math.min(a.count,d.start+d.count);for(let b=g,f=p;b<f;b+=3){const m=a.getX(b),C=a.getX(b+1),B=a.getX(b+2);s=bi(this,r,t,i,o,h,c,m,C,B),s&&(s.faceIndex=Math.floor(b/3),e.push(s))}}else if(A!==void 0)if(Array.isArray(r))for(let g=0,p=u.length;g<p;g++){const b=u[g],f=r[b.materialIndex],m=Math.max(b.start,d.start),C=Math.min(A.count,Math.min(b.start+b.count,d.start+d.count));for(let B=m,E=C;B<E;B+=3){const Q=B,y=B+1,x=B+2;s=bi(this,f,t,i,o,h,c,Q,y,x),s&&(s.faceIndex=Math.floor(B/3),s.face.materialIndex=b.materialIndex,e.push(s))}}else{const g=Math.max(0,d.start),p=Math.min(A.count,d.start+d.count);for(let b=g,f=p;b<f;b+=3){const m=b,C=b+1,B=b+2;s=bi(this,r,t,i,o,h,c,m,C,B),s&&(s.faceIndex=Math.floor(b/3),e.push(s))}}}}function sA(l,t,e,i,s,n,r,a){let A;if(t.side===ia?A=i.intersectTriangle(r,n,s,!0,a):A=i.intersectTriangle(s,n,r,t.side===We,a),A===null)return null;pi.copy(a),pi.applyMatrix4(l.matrixWorld);const o=e.ray.origin.distanceTo(pi);return o<e.near||o>e.far?null:{distance:o,point:pi.clone(),object:l}}function bi(l,t,e,i,s,n,r,a,A,o){l.getVertexPosition(a,li),l.getVertexPosition(A,ui),l.getVertexPosition(o,di);const h=sA(l,t,e,i,li,ui,di,Dn);if(h){const c=new I;ut.getBarycoord(Dn,li,ui,di,c),s&&(h.uv=ut.getInterpolatedAttribute(s,a,A,o,c,new U)),n&&(h.uv1=ut.getInterpolatedAttribute(n,a,A,o,c,new U)),r&&(h.normal=ut.getInterpolatedAttribute(r,a,A,o,c,new I),h.normal.dot(i.direction)>0&&h.normal.multiplyScalar(-1));const u={a,b:A,c:o,normal:new I,materialIndex:0};ut.getNormal(li,ui,di,u.normal),h.face=u,h.barycoord=c}return h}class _n extends z{constructor(){super(),this.isCamera=!0,this.type="Camera",this.matrixWorldInverse=new S,this.projectionMatrix=new S,this.projectionMatrixInverse=new S,this.coordinateSystem=Yt,this._reversedDepth=!1}get reversedDepth(){return this._reversedDepth}copy(t,e){return super.copy(t,e),this.matrixWorldInverse.copy(t.matrixWorldInverse),this.projectionMatrix.copy(t.projectionMatrix),this.projectionMatrixInverse.copy(t.projectionMatrixInverse),this.coordinateSystem=t.coordinateSystem,this}getWorldDirection(t){return super.getWorldDirection(t).negate()}updateMatrixWorld(t){super.updateMatrixWorld(t),this.matrixWorldInverse.copy(this.matrixWorld).invert()}updateWorldMatrix(t,e){super.updateWorldMatrix(t,e),this.matrixWorldInverse.copy(this.matrixWorld).invert()}clone(){return new this.constructor().copy(this)}}const Pt=new I,Rn=new U,Ln=new U;class us extends _n{constructor(t=50,e=1,i=.1,s=2e3){super(),this.isPerspectiveCamera=!0,this.type="PerspectiveCamera",this.fov=t,this.zoom=1,this.near=i,this.far=s,this.focus=10,this.aspect=e,this.view=null,this.filmGauge=35,this.filmOffset=0,this.updateProjectionMatrix()}copy(t,e){return super.copy(t,e),this.fov=t.fov,this.zoom=t.zoom,this.near=t.near,this.far=t.far,this.focus=t.focus,this.aspect=t.aspect,this.view=t.view===null?null:Object.assign({},t.view),this.filmGauge=t.filmGauge,this.filmOffset=t.filmOffset,this}setFocalLength(t){const e=.5*this.getFilmHeight()/t;this.fov=Le*2*Math.atan(e),this.updateProjectionMatrix()}getFocalLength(){const t=Math.tan(Re*.5*this.fov);return .5*this.getFilmHeight()/t}getEffectiveFOV(){return Le*2*Math.atan(Math.tan(Re*.5*this.fov)/this.zoom)}getFilmWidth(){return this.filmGauge*Math.min(this.aspect,1)}getFilmHeight(){return this.filmGauge/Math.max(this.aspect,1)}getViewBounds(t,e,i){Pt.set(-1,-1,.5).applyMatrix4(this.projectionMatrixInverse),e.set(Pt.x,Pt.y).multiplyScalar(-t/Pt.z),Pt.set(1,1,.5).applyMatrix4(this.projectionMatrixInverse),i.set(Pt.x,Pt.y).multiplyScalar(-t/Pt.z)}getViewSize(t,e){return this.getViewBounds(t,Rn,Ln),e.subVectors(Ln,Rn)}setViewOffset(t,e,i,s,n,r){this.aspect=t/e,this.view===null&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=t,this.view.fullHeight=e,this.view.offsetX=i,this.view.offsetY=s,this.view.width=n,this.view.height=r,this.updateProjectionMatrix()}clearViewOffset(){this.view!==null&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){const t=this.near;let e=t*Math.tan(Re*.5*this.fov)/this.zoom,i=2*e,s=this.aspect*i,n=-.5*s;const r=this.view;if(this.view!==null&&this.view.enabled){const A=r.fullWidth,o=r.fullHeight;n+=r.offsetX*s/A,e-=r.offsetY*i/o,s*=r.width/A,i*=r.height/o}const a=this.filmOffset;a!==0&&(n+=t*a/this.getFilmWidth()),this.projectionMatrix.makePerspective(n,n+s,e,e-i,t,this.far,this.coordinateSystem,this.reversedDepth),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(t){const e=super.toJSON(t);return e.object.fov=this.fov,e.object.zoom=this.zoom,e.object.near=this.near,e.object.far=this.far,e.object.focus=this.focus,e.object.aspect=this.aspect,this.view!==null&&(e.object.view=Object.assign({},this.view)),e.object.filmGauge=this.filmGauge,e.object.filmOffset=this.filmOffset,e}}class ds extends z{constructor(){super(),this.isGroup=!0,this.type="Group"}}class nA{constructor(t,e){this.isInterleavedBuffer=!0,this.array=t,this.stride=e,this.count=t!==void 0?t.length/e:0,this.usage=Hi,this.updateRanges=[],this.version=0,this.uuid=At()}onUploadCallback(){}set needsUpdate(t){t===!0&&this.version++}setUsage(t){return this.usage=t,this}addUpdateRange(t,e){this.updateRanges.push({start:t,count:e})}clearUpdateRanges(){this.updateRanges.length=0}copy(t){return this.array=new t.array.constructor(t.array),this.count=t.count,this.stride=t.stride,this.usage=t.usage,this}copyAt(t,e,i){t*=this.stride,i*=e.stride;for(let s=0,n=this.stride;s<n;s++)this.array[t+s]=e.array[i+s];return this}set(t,e=0){return this.array.set(t,e),this}clone(t){t.arrayBuffers===void 0&&(t.arrayBuffers={}),this.array.buffer._uuid===void 0&&(this.array.buffer._uuid=At()),t.arrayBuffers[this.array.buffer._uuid]===void 0&&(t.arrayBuffers[this.array.buffer._uuid]=this.array.slice(0).buffer);const e=new this.array.constructor(t.arrayBuffers[this.array.buffer._uuid]),i=new this.constructor(e,this.stride);return i.setUsage(this.usage),i}onUpload(t){return this.onUploadCallback=t,this}toJSON(t){return t.arrayBuffers===void 0&&(t.arrayBuffers={}),this.array.buffer._uuid===void 0&&(this.array.buffer._uuid=At()),t.arrayBuffers[this.array.buffer._uuid]===void 0&&(t.arrayBuffers[this.array.buffer._uuid]=Array.from(new Uint32Array(this.array.buffer))),{uuid:this.uuid,buffer:this.array.buffer._uuid,type:this.array.constructor.name,stride:this.stride}}}const W=new I;class gs{constructor(t,e,i,s=!1){this.isInterleavedBufferAttribute=!0,this.name="",this.data=t,this.itemSize=e,this.offset=i,this.normalized=s}get count(){return this.data.count}get array(){return this.data.array}set needsUpdate(t){this.data.needsUpdate=t}applyMatrix4(t){for(let e=0,i=this.data.count;e<i;e++)W.fromBufferAttribute(this,e),W.applyMatrix4(t),this.setXYZ(e,W.x,W.y,W.z);return this}applyNormalMatrix(t){for(let e=0,i=this.count;e<i;e++)W.fromBufferAttribute(this,e),W.applyNormalMatrix(t),this.setXYZ(e,W.x,W.y,W.z);return this}transformDirection(t){for(let e=0,i=this.count;e<i;e++)W.fromBufferAttribute(this,e),W.transformDirection(t),this.setXYZ(e,W.x,W.y,W.z);return this}getComponent(t,e){let i=this.array[t*this.data.stride+this.offset+e];return this.normalized&&(i=ot(i,this.array)),i}setComponent(t,e,i){return this.normalized&&(i=_(i,this.array)),this.data.array[t*this.data.stride+this.offset+e]=i,this}setX(t,e){return this.normalized&&(e=_(e,this.array)),this.data.array[t*this.data.stride+this.offset]=e,this}setY(t,e){return this.normalized&&(e=_(e,this.array)),this.data.array[t*this.data.stride+this.offset+1]=e,this}setZ(t,e){return this.normalized&&(e=_(e,this.array)),this.data.array[t*this.data.stride+this.offset+2]=e,this}setW(t,e){return this.normalized&&(e=_(e,this.array)),this.data.array[t*this.data.stride+this.offset+3]=e,this}getX(t){let e=this.data.array[t*this.data.stride+this.offset];return this.normalized&&(e=ot(e,this.array)),e}getY(t){let e=this.data.array[t*this.data.stride+this.offset+1];return this.normalized&&(e=ot(e,this.array)),e}getZ(t){let e=this.data.array[t*this.data.stride+this.offset+2];return this.normalized&&(e=ot(e,this.array)),e}getW(t){let e=this.data.array[t*this.data.stride+this.offset+3];return this.normalized&&(e=ot(e,this.array)),e}setXY(t,e,i){return t=t*this.data.stride+this.offset,this.normalized&&(e=_(e,this.array),i=_(i,this.array)),this.data.array[t+0]=e,this.data.array[t+1]=i,this}setXYZ(t,e,i,s){return t=t*this.data.stride+this.offset,this.normalized&&(e=_(e,this.array),i=_(i,this.array),s=_(s,this.array)),this.data.array[t+0]=e,this.data.array[t+1]=i,this.data.array[t+2]=s,this}setXYZW(t,e,i,s,n){return t=t*this.data.stride+this.offset,this.normalized&&(e=_(e,this.array),i=_(i,this.array),s=_(s,this.array),n=_(n,this.array)),this.data.array[t+0]=e,this.data.array[t+1]=i,this.data.array[t+2]=s,this.data.array[t+3]=n,this}clone(t){if(t===void 0){console.log("THREE.InterleavedBufferAttribute.clone(): Cloning an interleaved buffer attribute will de-interleave buffer data.");const e=[];for(let i=0;i<this.count;i++){const s=i*this.data.stride+this.offset;for(let n=0;n<this.itemSize;n++)e.push(this.data.array[s+n])}return new et(new this.array.constructor(e),this.itemSize,this.normalized)}else return t.interleavedBuffers===void 0&&(t.interleavedBuffers={}),t.interleavedBuffers[this.data.uuid]===void 0&&(t.interleavedBuffers[this.data.uuid]=this.data.clone(t)),new gs(t.interleavedBuffers[this.data.uuid],this.itemSize,this.offset,this.normalized)}toJSON(t){if(t===void 0){console.log("THREE.InterleavedBufferAttribute.toJSON(): Serializing an interleaved buffer attribute will de-interleave buffer data.");const e=[];for(let i=0;i<this.count;i++){const s=i*this.data.stride+this.offset;for(let n=0;n<this.itemSize;n++)e.push(this.data.array[s+n])}return{itemSize:this.itemSize,type:this.array.constructor.name,array:e,normalized:this.normalized}}else return t.interleavedBuffers===void 0&&(t.interleavedBuffers={}),t.interleavedBuffers[this.data.uuid]===void 0&&(t.interleavedBuffers[this.data.uuid]=this.data.toJSON(t)),{isInterleavedBufferAttribute:!0,itemSize:this.itemSize,data:this.data.uuid,offset:this.offset,normalized:this.normalized}}}const Gn=new I,Nn=new Y,Un=new Y,rA=new I,zn=new S,mi=new I,ps=new pt,vn=new S,fs=new ri;class aA extends fi{constructor(t,e){super(t,e),this.isSkinnedMesh=!0,this.type="SkinnedMesh",this.bindMode=Zs,this.bindMatrix=new S,this.bindMatrixInverse=new S,this.boundingBox=null,this.boundingSphere=null}computeBoundingBox(){const t=this.geometry;this.boundingBox===null&&(this.boundingBox=new yt),this.boundingBox.makeEmpty();const e=t.getAttribute("position");for(let i=0;i<e.count;i++)this.getVertexPosition(i,mi),this.boundingBox.expandByPoint(mi)}computeBoundingSphere(){const t=this.geometry;this.boundingSphere===null&&(this.boundingSphere=new pt),this.boundingSphere.makeEmpty();const e=t.getAttribute("position");for(let i=0;i<e.count;i++)this.getVertexPosition(i,mi),this.boundingSphere.expandByPoint(mi)}copy(t,e){return super.copy(t,e),this.bindMode=t.bindMode,this.bindMatrix.copy(t.bindMatrix),this.bindMatrixInverse.copy(t.bindMatrixInverse),this.skeleton=t.skeleton,t.boundingBox!==null&&(this.boundingBox=t.boundingBox.clone()),t.boundingSphere!==null&&(this.boundingSphere=t.boundingSphere.clone()),this}raycast(t,e){const i=this.material,s=this.matrixWorld;i!==void 0&&(this.boundingSphere===null&&this.computeBoundingSphere(),ps.copy(this.boundingSphere),ps.applyMatrix4(s),t.ray.intersectsSphere(ps)!==!1&&(vn.copy(s).invert(),fs.copy(t.ray).applyMatrix4(vn),!(this.boundingBox!==null&&fs.intersectsBox(this.boundingBox)===!1)&&this._computeIntersections(t,e,fs)))}getVertexPosition(t,e){return super.getVertexPosition(t,e),this.applyBoneTransform(t,e),e}bind(t,e){this.skeleton=t,e===void 0&&(this.updateMatrixWorld(!0),this.skeleton.calculateInverses(),e=this.matrixWorld),this.bindMatrix.copy(e),this.bindMatrixInverse.copy(e).invert()}pose(){this.skeleton.pose()}normalizeSkinWeights(){const t=new Y,e=this.geometry.attributes.skinWeight;for(let i=0,s=e.count;i<s;i++){t.fromBufferAttribute(e,i);const n=1/t.manhattanLength();n!==1/0?t.multiplyScalar(n):t.set(1,0,0,0),e.setXYZW(i,t.x,t.y,t.z,t.w)}}updateMatrixWorld(t){super.updateMatrixWorld(t),this.bindMode===Zs?this.bindMatrixInverse.copy(this.matrixWorld).invert():this.bindMode===ra?this.bindMatrixInverse.copy(this.bindMatrix).invert():console.warn("THREE.SkinnedMesh: Unrecognized bindMode: "+this.bindMode)}applyBoneTransform(t,e){const i=this.skeleton,s=this.geometry;Nn.fromBufferAttribute(s.attributes.skinIndex,t),Un.fromBufferAttribute(s.attributes.skinWeight,t),Gn.copy(e).applyMatrix4(this.bindMatrix),e.set(0,0,0);for(let n=0;n<4;n++){const r=Un.getComponent(n);if(r!==0){const a=Nn.getComponent(n);zn.multiplyMatrices(i.bones[a].matrixWorld,i.boneInverses[a]),e.addScaledVector(rA.copy(Gn).applyMatrix4(zn),r)}}return e.applyMatrix4(this.bindMatrixInverse)}}class Hn extends z{constructor(){super(),this.isBone=!0,this.type="Bone"}}class bs extends ${constructor(t=null,e=1,i=1,s,n,r,a,A,o=Rt,h=Rt,c,u){super(null,r,a,A,o,h,s,n,c,u),this.isDataTexture=!0,this.image={data:t,width:e,height:i},this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}}const On=new S,AA=new S;class ms{constructor(t=[],e=[]){this.uuid=At(),this.bones=t.slice(0),this.boneInverses=e,this.boneMatrices=null,this.boneTexture=null,this.init()}init(){const t=this.bones,e=this.boneInverses;if(this.boneMatrices=new Float32Array(t.length*16),e.length===0)this.calculateInverses();else if(t.length!==e.length){console.warn("THREE.Skeleton: Number of inverse bone matrices does not match amount of bones."),this.boneInverses=[];for(let i=0,s=this.bones.length;i<s;i++)this.boneInverses.push(new S)}}calculateInverses(){this.boneInverses.length=0;for(let t=0,e=this.bones.length;t<e;t++){const i=new S;this.bones[t]&&i.copy(this.bones[t].matrixWorld).invert(),this.boneInverses.push(i)}}pose(){for(let t=0,e=this.bones.length;t<e;t++){const i=this.bones[t];i&&i.matrixWorld.copy(this.boneInverses[t]).invert()}for(let t=0,e=this.bones.length;t<e;t++){const i=this.bones[t];i&&(i.parent&&i.parent.isBone?(i.matrix.copy(i.parent.matrixWorld).invert(),i.matrix.multiply(i.matrixWorld)):i.matrix.copy(i.matrixWorld),i.matrix.decompose(i.position,i.quaternion,i.scale))}}update(){const t=this.bones,e=this.boneInverses,i=this.boneMatrices,s=this.boneTexture;for(let n=0,r=t.length;n<r;n++){const a=t[n]?t[n].matrixWorld:AA;On.multiplyMatrices(a,e[n]),On.toArray(i,n*16)}s!==null&&(s.needsUpdate=!0)}clone(){return new ms(this.bones,this.boneInverses)}computeBoneTexture(){let t=Math.sqrt(this.bones.length*4);t=Math.ceil(t/4)*4,t=Math.max(t,4);const e=new Float32Array(t*t*4);e.set(this.boneMatrices);const i=new bs(e,t,t,Nt,Gt);return i.needsUpdate=!0,this.boneMatrices=e,this.boneTexture=i,this}getBoneByName(t){for(let e=0,i=this.bones.length;e<i;e++){const s=this.bones[e];if(s.name===t)return s}}dispose(){this.boneTexture!==null&&(this.boneTexture.dispose(),this.boneTexture=null)}fromJSON(t,e){this.uuid=t.uuid;for(let i=0,s=t.bones.length;i<s;i++){const n=t.bones[i];let r=e[n];r===void 0&&(console.warn("THREE.Skeleton: No bone found with UUID:",n),r=new Hn),this.bones.push(r),this.boneInverses.push(new S().fromArray(t.boneInverses[i]))}return this.init(),this}toJSON(){const t={metadata:{version:4.7,type:"Skeleton",generator:"Skeleton.toJSON"},bones:[],boneInverses:[]};t.uuid=this.uuid;const e=this.bones,i=this.boneInverses;for(let s=0,n=e.length;s<n;s++){const r=e[s];t.bones.push(r.uuid);const a=i[s];t.boneInverses.push(a.toArray())}return t}}class Is extends et{constructor(t,e,i,s=1){super(t,e,i),this.isInstancedBufferAttribute=!0,this.meshPerAttribute=s}copy(t){return super.copy(t),this.meshPerAttribute=t.meshPerAttribute,this}toJSON(){const t=super.toJSON();return t.meshPerAttribute=this.meshPerAttribute,t.isInstancedBufferAttribute=!0,t}}const Ie=new S,qn=new S,Ii=[],Pn=new yt,oA=new S,He=new fi,Oe=new pt;class hA extends fi{constructor(t,e,i){super(t,e),this.isInstancedMesh=!0,this.instanceMatrix=new Is(new Float32Array(i*16),16),this.instanceColor=null,this.morphTexture=null,this.count=i,this.boundingBox=null,this.boundingSphere=null;for(let s=0;s<i;s++)this.setMatrixAt(s,oA)}computeBoundingBox(){const t=this.geometry,e=this.count;this.boundingBox===null&&(this.boundingBox=new yt),t.boundingBox===null&&t.computeBoundingBox(),this.boundingBox.makeEmpty();for(let i=0;i<e;i++)this.getMatrixAt(i,Ie),Pn.copy(t.boundingBox).applyMatrix4(Ie),this.boundingBox.union(Pn)}computeBoundingSphere(){const t=this.geometry,e=this.count;this.boundingSphere===null&&(this.boundingSphere=new pt),t.boundingSphere===null&&t.computeBoundingSphere(),this.boundingSphere.makeEmpty();for(let i=0;i<e;i++)this.getMatrixAt(i,Ie),Oe.copy(t.boundingSphere).applyMatrix4(Ie),this.boundingSphere.union(Oe)}copy(t,e){return super.copy(t,e),this.instanceMatrix.copy(t.instanceMatrix),t.morphTexture!==null&&(this.morphTexture=t.morphTexture.clone()),t.instanceColor!==null&&(this.instanceColor=t.instanceColor.clone()),this.count=t.count,t.boundingBox!==null&&(this.boundingBox=t.boundingBox.clone()),t.boundingSphere!==null&&(this.boundingSphere=t.boundingSphere.clone()),this}getColorAt(t,e){e.fromArray(this.instanceColor.array,t*3)}getMatrixAt(t,e){e.fromArray(this.instanceMatrix.array,t*16)}getMorphAt(t,e){const i=e.morphTargetInfluences,s=this.morphTexture.source.data.data,n=i.length+1,r=t*n+1;for(let a=0;a<i.length;a++)i[a]=s[r+a]}raycast(t,e){const i=this.matrixWorld,s=this.count;if(He.geometry=this.geometry,He.material=this.material,He.material!==void 0&&(this.boundingSphere===null&&this.computeBoundingSphere(),Oe.copy(this.boundingSphere),Oe.applyMatrix4(i),t.ray.intersectsSphere(Oe)!==!1))for(let n=0;n<s;n++){this.getMatrixAt(n,Ie),qn.multiplyMatrices(i,Ie),He.matrixWorld=qn,He.raycast(t,Ii);for(let r=0,a=Ii.length;r<a;r++){const A=Ii[r];A.instanceId=n,A.object=this,e.push(A)}Ii.length=0}}setColorAt(t,e){this.instanceColor===null&&(this.instanceColor=new Is(new Float32Array(this.instanceMatrix.count*3).fill(1),3)),e.toArray(this.instanceColor.array,t*3)}setMatrixAt(t,e){e.toArray(this.instanceMatrix.array,t*16)}setMorphAt(t,e){const i=e.morphTargetInfluences,s=i.length+1;this.morphTexture===null&&(this.morphTexture=new bs(new Float32Array(s*this.count),s,this.count,ne,Gt));const n=this.morphTexture.source.data.data;let r=0;for(let o=0;o<i.length;o++)r+=i[o];const a=this.geometry.morphTargetsRelative?1:1-r,A=s*t;n[A]=a,n.set(i,A+1)}updateMorphTargets(){}dispose(){this.dispatchEvent({type:"dispose"}),this.morphTexture!==null&&(this.morphTexture.dispose(),this.morphTexture=null)}}const Bs=new I,cA=new I,lA=new Ct;class Be{constructor(t=new I(1,0,0),e=0){this.isPlane=!0,this.normal=t,this.constant=e}set(t,e){return this.normal.copy(t),this.constant=e,this}setComponents(t,e,i,s){return this.normal.set(t,e,i),this.constant=s,this}setFromNormalAndCoplanarPoint(t,e){return this.normal.copy(t),this.constant=-e.dot(this.normal),this}setFromCoplanarPoints(t,e,i){const s=Bs.subVectors(i,e).cross(cA.subVectors(t,e)).normalize();return this.setFromNormalAndCoplanarPoint(s,t),this}copy(t){return this.normal.copy(t.normal),this.constant=t.constant,this}normalize(){const t=1/this.normal.length();return this.normal.multiplyScalar(t),this.constant*=t,this}negate(){return this.constant*=-1,this.normal.negate(),this}distanceToPoint(t){return this.normal.dot(t)+this.constant}distanceToSphere(t){return this.distanceToPoint(t.center)-t.radius}projectPoint(t,e){return e.copy(t).addScaledVector(this.normal,-this.distanceToPoint(t))}intersectLine(t,e){const i=t.delta(Bs),s=this.normal.dot(i);if(s===0)return this.distanceToPoint(t.start)===0?e.copy(t.start):null;const n=-(t.start.dot(this.normal)+this.constant)/s;return n<0||n>1?null:e.copy(t.start).addScaledVector(i,n)}intersectsLine(t){const e=this.distanceToPoint(t.start),i=this.distanceToPoint(t.end);return e<0&&i>0||i<0&&e>0}intersectsBox(t){return t.intersectsPlane(this)}intersectsSphere(t){return t.intersectsPlane(this)}coplanarPoint(t){return t.copy(this.normal).multiplyScalar(-this.constant)}applyMatrix4(t,e){const i=e||lA.getNormalMatrix(t),s=this.coplanarPoint(Bs).applyMatrix4(t),n=this.normal.applyMatrix3(i).normalize();return this.constant=-s.dot(n),this}translate(t){return this.constant-=t.dot(this.normal),this}equals(t){return t.normal.equals(this.normal)&&t.constant===this.constant}clone(){return new this.constructor().copy(this)}}const ee=new pt,uA=new U(.5,.5),Bi=new I;class dA{constructor(t=new Be,e=new Be,i=new Be,s=new Be,n=new Be,r=new Be){this.planes=[t,e,i,s,n,r]}set(t,e,i,s,n,r){const a=this.planes;return a[0].copy(t),a[1].copy(e),a[2].copy(i),a[3].copy(s),a[4].copy(n),a[5].copy(r),this}copy(t){const e=this.planes;for(let i=0;i<6;i++)e[i].copy(t.planes[i]);return this}setFromProjectionMatrix(t,e=Yt,i=!1){const s=this.planes,n=t.elements,r=n[0],a=n[1],A=n[2],o=n[3],h=n[4],c=n[5],u=n[6],d=n[7],g=n[8],p=n[9],b=n[10],f=n[11],m=n[12],C=n[13],B=n[14],E=n[15];if(s[0].setComponents(o-r,d-h,f-g,E-m).normalize(),s[1].setComponents(o+r,d+h,f+g,E+m).normalize(),s[2].setComponents(o+a,d+c,f+p,E+C).normalize(),s[3].setComponents(o-a,d-c,f-p,E-C).normalize(),i)s[4].setComponents(A,u,b,B).normalize(),s[5].setComponents(o-A,d-u,f-b,E-B).normalize();else if(s[4].setComponents(o-A,d-u,f-b,E-B).normalize(),e===Yt)s[5].setComponents(o+A,d+u,f+b,E+B).normalize();else if(e===Oi)s[5].setComponents(A,u,b,B).normalize();else throw new Error("THREE.Frustum.setFromProjectionMatrix(): Invalid coordinate system: "+e);return this}intersectsObject(t){if(t.boundingSphere!==void 0)t.boundingSphere===null&&t.computeBoundingSphere(),ee.copy(t.boundingSphere).applyMatrix4(t.matrixWorld);else{const e=t.geometry;e.boundingSphere===null&&e.computeBoundingSphere(),ee.copy(e.boundingSphere).applyMatrix4(t.matrixWorld)}return this.intersectsSphere(ee)}intersectsSprite(t){ee.center.set(0,0,0);const e=uA.distanceTo(t.center);return ee.radius=.7071067811865476+e,ee.applyMatrix4(t.matrixWorld),this.intersectsSphere(ee)}intersectsSphere(t){const e=this.planes,i=t.center,s=-t.radius;for(let n=0;n<6;n++)if(e[n].distanceToPoint(i)<s)return!1;return!0}intersectsBox(t){const e=this.planes;for(let i=0;i<6;i++){const s=e[i];if(Bi.x=s.normal.x>0?t.max.x:t.min.x,Bi.y=s.normal.y>0?t.max.y:t.min.y,Bi.z=s.normal.z>0?t.max.z:t.min.z,s.distanceToPoint(Bi)<0)return!1}return!0}containsPoint(t){const e=this.planes;for(let i=0;i<6;i++)if(e[i].distanceToPoint(t)<0)return!1;return!0}clone(){return new this.constructor().copy(this)}}class jn extends Zt{constructor(t){super(),this.isLineBasicMaterial=!0,this.type="LineBasicMaterial",this.color=new v(16777215),this.map=null,this.linewidth=1,this.linecap="round",this.linejoin="round",this.fog=!0,this.setValues(t)}copy(t){return super.copy(t),this.color.copy(t.color),this.map=t.map,this.linewidth=t.linewidth,this.linecap=t.linecap,this.linejoin=t.linejoin,this.fog=t.fog,this}}const Ci=new I,Ei=new I,Jn=new S,qe=new ri,yi=new pt,Cs=new I,Vn=new I;class Es extends z{constructor(t=new $t,e=new jn){super(),this.isLine=!0,this.type="Line",this.geometry=t,this.material=e,this.morphTargetDictionary=void 0,this.morphTargetInfluences=void 0,this.updateMorphTargets()}copy(t,e){return super.copy(t,e),this.material=Array.isArray(t.material)?t.material.slice():t.material,this.geometry=t.geometry,this}computeLineDistances(){const t=this.geometry;if(t.index===null){const e=t.attributes.position,i=[0];for(let s=1,n=e.count;s<n;s++)Ci.fromBufferAttribute(e,s-1),Ei.fromBufferAttribute(e,s),i[s]=i[s-1],i[s]+=Ci.distanceTo(Ei);t.setAttribute("lineDistance",new hs(i,1))}else console.warn("THREE.Line.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.");return this}raycast(t,e){const i=this.geometry,s=this.matrixWorld,n=t.params.Line.threshold,r=i.drawRange;if(i.boundingSphere===null&&i.computeBoundingSphere(),yi.copy(i.boundingSphere),yi.applyMatrix4(s),yi.radius+=n,t.ray.intersectsSphere(yi)===!1)return;Jn.copy(s).invert(),qe.copy(t.ray).applyMatrix4(Jn);const a=n/((this.scale.x+this.scale.y+this.scale.z)/3),A=a*a,o=this.isLineSegments?2:1,h=i.index,u=i.attributes.position;if(h!==null){const d=Math.max(0,r.start),g=Math.min(h.count,r.start+r.count);for(let p=d,b=g-1;p<b;p+=o){const f=h.getX(p),m=h.getX(p+1),C=Qi(this,t,qe,A,f,m,p);C&&e.push(C)}if(this.isLineLoop){const p=h.getX(g-1),b=h.getX(d),f=Qi(this,t,qe,A,p,b,g-1);f&&e.push(f)}}else{const d=Math.max(0,r.start),g=Math.min(u.count,r.start+r.count);for(let p=d,b=g-1;p<b;p+=o){const f=Qi(this,t,qe,A,p,p+1,p);f&&e.push(f)}if(this.isLineLoop){const p=Qi(this,t,qe,A,g-1,d,g-1);p&&e.push(p)}}}updateMorphTargets(){const e=this.geometry.morphAttributes,i=Object.keys(e);if(i.length>0){const s=e[i[0]];if(s!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let n=0,r=s.length;n<r;n++){const a=s[n].name||String(n);this.morphTargetInfluences.push(0),this.morphTargetDictionary[a]=n}}}}}function Qi(l,t,e,i,s,n,r){const a=l.geometry.attributes.position;if(Ci.fromBufferAttribute(a,s),Ei.fromBufferAttribute(a,n),e.distanceSqToSegment(Ci,Ei,Cs,Vn)>i)return;Cs.applyMatrix4(l.matrixWorld);const o=t.ray.origin.distanceTo(Cs);if(!(o<t.near||o>t.far))return{distance:o,point:Vn.clone().applyMatrix4(l.matrixWorld),index:r,face:null,faceIndex:null,barycoord:null,object:l}}const Kn=new I,Yn=new I;class gA extends Es{constructor(t,e){super(t,e),this.isLineSegments=!0,this.type="LineSegments"}computeLineDistances(){const t=this.geometry;if(t.index===null){const e=t.attributes.position,i=[];for(let s=0,n=e.count;s<n;s+=2)Kn.fromBufferAttribute(e,s),Yn.fromBufferAttribute(e,s+1),i[s]=s===0?0:i[s-1],i[s+1]=i[s]+Kn.distanceTo(Yn);t.setAttribute("lineDistance",new hs(i,1))}else console.warn("THREE.LineSegments.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.");return this}}class pA extends Es{constructor(t,e){super(t,e),this.isLineLoop=!0,this.type="LineLoop"}}class Wn extends Zt{constructor(t){super(),this.isPointsMaterial=!0,this.type="PointsMaterial",this.color=new v(16777215),this.map=null,this.alphaMap=null,this.size=1,this.sizeAttenuation=!0,this.fog=!0,this.setValues(t)}copy(t){return super.copy(t),this.color.copy(t.color),this.map=t.map,this.alphaMap=t.alphaMap,this.size=t.size,this.sizeAttenuation=t.sizeAttenuation,this.fog=t.fog,this}}const Xn=new S,ys=new ri,xi=new pt,wi=new I;class fA extends z{constructor(t=new $t,e=new Wn){super(),this.isPoints=!0,this.type="Points",this.geometry=t,this.material=e,this.morphTargetDictionary=void 0,this.morphTargetInfluences=void 0,this.updateMorphTargets()}copy(t,e){return super.copy(t,e),this.material=Array.isArray(t.material)?t.material.slice():t.material,this.geometry=t.geometry,this}raycast(t,e){const i=this.geometry,s=this.matrixWorld,n=t.params.Points.threshold,r=i.drawRange;if(i.boundingSphere===null&&i.computeBoundingSphere(),xi.copy(i.boundingSphere),xi.applyMatrix4(s),xi.radius+=n,t.ray.intersectsSphere(xi)===!1)return;Xn.copy(s).invert(),ys.copy(t.ray).applyMatrix4(Xn);const a=n/((this.scale.x+this.scale.y+this.scale.z)/3),A=a*a,o=i.index,c=i.attributes.position;if(o!==null){const u=Math.max(0,r.start),d=Math.min(o.count,r.start+r.count);for(let g=u,p=d;g<p;g++){const b=o.getX(g);wi.fromBufferAttribute(c,b),Zn(wi,b,A,s,t,e,this)}}else{const u=Math.max(0,r.start),d=Math.min(c.count,r.start+r.count);for(let g=u,p=d;g<p;g++)wi.fromBufferAttribute(c,g),Zn(wi,g,A,s,t,e,this)}}updateMorphTargets(){const e=this.geometry.morphAttributes,i=Object.keys(e);if(i.length>0){const s=e[i[0]];if(s!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let n=0,r=s.length;n<r;n++){const a=s[n].name||String(n);this.morphTargetInfluences.push(0),this.morphTargetDictionary[a]=n}}}}}function Zn(l,t,e,i,s,n,r){const a=ys.distanceSqToPoint(l);if(a<e){const A=new I;ys.closestPointToPoint(l,A),A.applyMatrix4(i);const o=s.ray.origin.distanceTo(A);if(o<s.near||o>s.far)return;n.push({distance:o,distanceToRay:Math.sqrt(a),point:A,index:t,face:null,faceIndex:null,barycoord:null,object:r})}}class Mi extends ${constructor(t,e,i,s,n,r,a,A,o,h,c,u){super(null,r,a,A,o,h,s,n,c,u),this.isCompressedTexture=!0,this.image={width:e,height:i},this.mipmaps=t,this.flipY=!1,this.generateMipmaps=!1}}class bA extends Mi{constructor(t,e,i,s,n,r){super(t,e,i,n,r),this.isCompressedArrayTexture=!0,this.image.depth=s,this.wrapR=Vt,this.layerUpdates=new Set}addLayerUpdate(t){this.layerUpdates.add(t)}clearLayerUpdates(){this.layerUpdates.clear()}}class mA extends Mi{constructor(t,e,i){super(void 0,t[0].width,t[0].height,e,i,aa),this.isCompressedCubeTexture=!0,this.isCubeTexture=!0,this.image=t}}class Qs extends Zt{constructor(t){super(),this.isMeshStandardMaterial=!0,this.type="MeshStandardMaterial",this.defines={STANDARD:""},this.color=new v(16777215),this.roughness=1,this.metalness=0,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new v(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=Ia,this.normalScale=new U(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.roughnessMap=null,this.metalnessMap=null,this.alphaMap=null,this.envMap=null,this.envMapRotation=new ue,this.envMapIntensity=1,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.flatShading=!1,this.fog=!0,this.setValues(t)}copy(t){return super.copy(t),this.defines={STANDARD:""},this.color.copy(t.color),this.roughness=t.roughness,this.metalness=t.metalness,this.map=t.map,this.lightMap=t.lightMap,this.lightMapIntensity=t.lightMapIntensity,this.aoMap=t.aoMap,this.aoMapIntensity=t.aoMapIntensity,this.emissive.copy(t.emissive),this.emissiveMap=t.emissiveMap,this.emissiveIntensity=t.emissiveIntensity,this.bumpMap=t.bumpMap,this.bumpScale=t.bumpScale,this.normalMap=t.normalMap,this.normalMapType=t.normalMapType,this.normalScale.copy(t.normalScale),this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this.roughnessMap=t.roughnessMap,this.metalnessMap=t.metalnessMap,this.alphaMap=t.alphaMap,this.envMap=t.envMap,this.envMapRotation.copy(t.envMapRotation),this.envMapIntensity=t.envMapIntensity,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.wireframeLinecap=t.wireframeLinecap,this.wireframeLinejoin=t.wireframeLinejoin,this.flatShading=t.flatShading,this.fog=t.fog,this}}class ft extends Qs{constructor(t){super(),this.isMeshPhysicalMaterial=!0,this.defines={STANDARD:"",PHYSICAL:""},this.type="MeshPhysicalMaterial",this.anisotropyRotation=0,this.anisotropyMap=null,this.clearcoatMap=null,this.clearcoatRoughness=0,this.clearcoatRoughnessMap=null,this.clearcoatNormalScale=new U(1,1),this.clearcoatNormalMap=null,this.ior=1.5,Object.defineProperty(this,"reflectivity",{get:function(){return w(2.5*(this.ior-1)/(this.ior+1),0,1)},set:function(e){this.ior=(1+.4*e)/(1-.4*e)}}),this.iridescenceMap=null,this.iridescenceIOR=1.3,this.iridescenceThicknessRange=[100,400],this.iridescenceThicknessMap=null,this.sheenColor=new v(0),this.sheenColorMap=null,this.sheenRoughness=1,this.sheenRoughnessMap=null,this.transmissionMap=null,this.thickness=0,this.thicknessMap=null,this.attenuationDistance=1/0,this.attenuationColor=new v(1,1,1),this.specularIntensity=1,this.specularIntensityMap=null,this.specularColor=new v(1,1,1),this.specularColorMap=null,this._anisotropy=0,this._clearcoat=0,this._dispersion=0,this._iridescence=0,this._sheen=0,this._transmission=0,this.setValues(t)}get anisotropy(){return this._anisotropy}set anisotropy(t){this._anisotropy>0!=t>0&&this.version++,this._anisotropy=t}get clearcoat(){return this._clearcoat}set clearcoat(t){this._clearcoat>0!=t>0&&this.version++,this._clearcoat=t}get iridescence(){return this._iridescence}set iridescence(t){this._iridescence>0!=t>0&&this.version++,this._iridescence=t}get dispersion(){return this._dispersion}set dispersion(t){this._dispersion>0!=t>0&&this.version++,this._dispersion=t}get sheen(){return this._sheen}set sheen(t){this._sheen>0!=t>0&&this.version++,this._sheen=t}get transmission(){return this._transmission}set transmission(t){this._transmission>0!=t>0&&this.version++,this._transmission=t}copy(t){return super.copy(t),this.defines={STANDARD:"",PHYSICAL:""},this.anisotropy=t.anisotropy,this.anisotropyRotation=t.anisotropyRotation,this.anisotropyMap=t.anisotropyMap,this.clearcoat=t.clearcoat,this.clearcoatMap=t.clearcoatMap,this.clearcoatRoughness=t.clearcoatRoughness,this.clearcoatRoughnessMap=t.clearcoatRoughnessMap,this.clearcoatNormalMap=t.clearcoatNormalMap,this.clearcoatNormalScale.copy(t.clearcoatNormalScale),this.dispersion=t.dispersion,this.ior=t.ior,this.iridescence=t.iridescence,this.iridescenceMap=t.iridescenceMap,this.iridescenceIOR=t.iridescenceIOR,this.iridescenceThicknessRange=[...t.iridescenceThicknessRange],this.iridescenceThicknessMap=t.iridescenceThicknessMap,this.sheen=t.sheen,this.sheenColor.copy(t.sheenColor),this.sheenColorMap=t.sheenColorMap,this.sheenRoughness=t.sheenRoughness,this.sheenRoughnessMap=t.sheenRoughnessMap,this.transmission=t.transmission,this.transmissionMap=t.transmissionMap,this.thickness=t.thickness,this.thicknessMap=t.thicknessMap,this.attenuationDistance=t.attenuationDistance,this.attenuationColor.copy(t.attenuationColor),this.specularIntensity=t.specularIntensity,this.specularIntensityMap=t.specularIntensityMap,this.specularColor.copy(t.specularColor),this.specularColorMap=t.specularColorMap,this}}function Si(l,t){return!l||l.constructor===t?l:typeof t.BYTES_PER_ELEMENT=="number"?new t(l):Array.prototype.slice.call(l)}function IA(l){return ArrayBuffer.isView(l)&&!(l instanceof DataView)}function BA(l){function t(s,n){return l[s]-l[n]}const e=l.length,i=new Array(e);for(let s=0;s!==e;++s)i[s]=s;return i.sort(t),i}function $n(l,t,e){const i=l.length,s=new l.constructor(i);for(let n=0,r=0;r!==i;++n){const a=e[n]*t;for(let A=0;A!==t;++A)s[r++]=l[a+A]}return s}function tr(l,t,e,i){let s=1,n=l[0];for(;n!==void 0&&n[i]===void 0;)n=l[s++];if(n===void 0)return;let r=n[i];if(r!==void 0)if(Array.isArray(r))do r=n[i],r!==void 0&&(t.push(n.time),e.push(...r)),n=l[s++];while(n!==void 0);else if(r.toArray!==void 0)do r=n[i],r!==void 0&&(t.push(n.time),r.toArray(e,e.length)),n=l[s++];while(n!==void 0);else do r=n[i],r!==void 0&&(t.push(n.time),e.push(r)),n=l[s++];while(n!==void 0)}class Pe{constructor(t,e,i,s){this.parameterPositions=t,this._cachedIndex=0,this.resultBuffer=s!==void 0?s:new e.constructor(i),this.sampleValues=e,this.valueSize=i,this.settings=null,this.DefaultSettings_={}}evaluate(t){const e=this.parameterPositions;let i=this._cachedIndex,s=e[i],n=e[i-1];i:{t:{let r;e:{s:if(!(t<s)){for(let a=i+2;;){if(s===void 0){if(t<n)break s;return i=e.length,this._cachedIndex=i,this.copySampleValue_(i-1)}if(i===a)break;if(n=s,s=e[++i],t<s)break t}r=e.length;break e}if(!(t>=n)){const a=e[1];t<a&&(i=2,n=a);for(let A=i-2;;){if(n===void 0)return this._cachedIndex=0,this.copySampleValue_(0);if(i===A)break;if(s=n,n=e[--i-1],t>=n)break t}r=i,i=0;break e}break i}for(;i<r;){const a=i+r>>>1;t<e[a]?r=a:i=a+1}if(s=e[i],n=e[i-1],n===void 0)return this._cachedIndex=0,this.copySampleValue_(0);if(s===void 0)return i=e.length,this._cachedIndex=i,this.copySampleValue_(i-1)}this._cachedIndex=i,this.intervalChanged_(i,n,s)}return this.interpolate_(i,n,t,s)}getSettings_(){return this.settings||this.DefaultSettings_}copySampleValue_(t){const e=this.resultBuffer,i=this.sampleValues,s=this.valueSize,n=t*s;for(let r=0;r!==s;++r)e[r]=i[n+r];return e}interpolate_(){throw new Error("call to abstract method")}intervalChanged_(){}}class CA extends Pe{constructor(t,e,i,s){super(t,e,i,s),this._weightPrev=-0,this._offsetPrev=-0,this._weightNext=-0,this._offsetNext=-0,this.DefaultSettings_={endingStart:hn,endingEnd:hn}}intervalChanged_(t,e,i){const s=this.parameterPositions;let n=t-2,r=t+1,a=s[n],A=s[r];if(a===void 0)switch(this.getSettings_().endingStart){case cn:n=t,a=2*e-i;break;case ln:n=s.length-2,a=e+s[n]-s[n+1];break;default:n=t,a=i}if(A===void 0)switch(this.getSettings_().endingEnd){case cn:r=t,A=2*i-e;break;case ln:r=1,A=i+s[1]-s[0];break;default:r=t-1,A=e}const o=(i-e)*.5,h=this.valueSize;this._weightPrev=o/(e-a),this._weightNext=o/(A-i),this._offsetPrev=n*h,this._offsetNext=r*h}interpolate_(t,e,i,s){const n=this.resultBuffer,r=this.sampleValues,a=this.valueSize,A=t*a,o=A-a,h=this._offsetPrev,c=this._offsetNext,u=this._weightPrev,d=this._weightNext,g=(i-e)/(s-e),p=g*g,b=p*g,f=-u*b+2*u*p-u*g,m=(1+u)*b+(-1.5-2*u)*p+(-.5+u)*g+1,C=(-1-d)*b+(1.5+d)*p+.5*g,B=d*b-d*p;for(let E=0;E!==a;++E)n[E]=f*r[h+E]+m*r[o+E]+C*r[A+E]+B*r[c+E];return n}}class EA extends Pe{constructor(t,e,i,s){super(t,e,i,s)}interpolate_(t,e,i,s){const n=this.resultBuffer,r=this.sampleValues,a=this.valueSize,A=t*a,o=A-a,h=(i-e)/(s-e),c=1-h;for(let u=0;u!==a;++u)n[u]=r[o+u]*c+r[A+u]*h;return n}}class yA extends Pe{constructor(t,e,i,s){super(t,e,i,s)}interpolate_(t){return this.copySampleValue_(t-1)}}class dt{constructor(t,e,i,s){if(t===void 0)throw new Error("THREE.KeyframeTrack: track name is undefined");if(e===void 0||e.length===0)throw new Error("THREE.KeyframeTrack: no keyframes in track named "+t);this.name=t,this.times=Si(e,this.TimeBufferType),this.values=Si(i,this.ValueBufferType),this.setInterpolation(s||this.DefaultInterpolation)}static toJSON(t){const e=t.constructor;let i;if(e.toJSON!==this.toJSON)i=e.toJSON(t);else{i={name:t.name,times:Si(t.times,Array),values:Si(t.values,Array)};const s=t.getInterpolation();s!==t.DefaultInterpolation&&(i.interpolation=s)}return i.type=t.ValueTypeName,i}InterpolantFactoryMethodDiscrete(t){return new yA(this.times,this.values,this.getValueSize(),t)}InterpolantFactoryMethodLinear(t){return new EA(this.times,this.values,this.getValueSize(),t)}InterpolantFactoryMethodSmooth(t){return new CA(this.times,this.values,this.getValueSize(),t)}setInterpolation(t){let e;switch(t){case De:e=this.InterpolantFactoryMethodDiscrete;break;case _e:e=this.InterpolantFactoryMethodLinear;break;case Ui:e=this.InterpolantFactoryMethodSmooth;break}if(e===void 0){const i="unsupported interpolation for "+this.ValueTypeName+" keyframe track named "+this.name;if(this.createInterpolant===void 0)if(t!==this.DefaultInterpolation)this.setInterpolation(this.DefaultInterpolation);else throw new Error(i);return console.warn("THREE.KeyframeTrack:",i),this}return this.createInterpolant=e,this}getInterpolation(){switch(this.createInterpolant){case this.InterpolantFactoryMethodDiscrete:return De;case this.InterpolantFactoryMethodLinear:return _e;case this.InterpolantFactoryMethodSmooth:return Ui}}getValueSize(){return this.values.length/this.times.length}shift(t){if(t!==0){const e=this.times;for(let i=0,s=e.length;i!==s;++i)e[i]+=t}return this}scale(t){if(t!==1){const e=this.times;for(let i=0,s=e.length;i!==s;++i)e[i]*=t}return this}trim(t,e){const i=this.times,s=i.length;let n=0,r=s-1;for(;n!==s&&i[n]<t;)++n;for(;r!==-1&&i[r]>e;)--r;if(++r,n!==0||r!==s){n>=r&&(r=Math.max(r,1),n=r-1);const a=this.getValueSize();this.times=i.slice(n,r),this.values=this.values.slice(n*a,r*a)}return this}validate(){let t=!0;const e=this.getValueSize();e-Math.floor(e)!==0&&(console.error("THREE.KeyframeTrack: Invalid value size in track.",this),t=!1);const i=this.times,s=this.values,n=i.length;n===0&&(console.error("THREE.KeyframeTrack: Track is empty.",this),t=!1);let r=null;for(let a=0;a!==n;a++){const A=i[a];if(typeof A=="number"&&isNaN(A)){console.error("THREE.KeyframeTrack: Time is not a valid number.",this,a,A),t=!1;break}if(r!==null&&r>A){console.error("THREE.KeyframeTrack: Out of order keys.",this,a,A,r),t=!1;break}r=A}if(s!==void 0&&IA(s))for(let a=0,A=s.length;a!==A;++a){const o=s[a];if(isNaN(o)){console.error("THREE.KeyframeTrack: Value is not a valid number.",this,a,o),t=!1;break}}return t}optimize(){const t=this.times.slice(),e=this.values.slice(),i=this.getValueSize(),s=this.getInterpolation()===Ui,n=t.length-1;let r=1;for(let a=1;a<n;++a){let A=!1;const o=t[a],h=t[a+1];if(o!==h&&(a!==1||o!==t[0]))if(s)A=!0;else{const c=a*i,u=c-i,d=c+i;for(let g=0;g!==i;++g){const p=e[c+g];if(p!==e[u+g]||p!==e[d+g]){A=!0;break}}}if(A){if(a!==r){t[r]=t[a];const c=a*i,u=r*i;for(let d=0;d!==i;++d)e[u+d]=e[c+d]}++r}}if(n>0){t[r]=t[n];for(let a=n*i,A=r*i,o=0;o!==i;++o)e[A+o]=e[a+o];++r}return r!==t.length?(this.times=t.slice(0,r),this.values=e.slice(0,r*i)):(this.times=t,this.values=e),this}clone(){const t=this.times.slice(),e=this.values.slice(),i=this.constructor,s=new i(this.name,t,e);return s.createInterpolant=this.createInterpolant,s}}dt.prototype.ValueTypeName="",dt.prototype.TimeBufferType=Float32Array,dt.prototype.ValueBufferType=Float32Array,dt.prototype.DefaultInterpolation=_e;class Ce extends dt{constructor(t,e,i){super(t,e,i)}}Ce.prototype.ValueTypeName="bool",Ce.prototype.ValueBufferType=Array,Ce.prototype.DefaultInterpolation=De,Ce.prototype.InterpolantFactoryMethodLinear=void 0,Ce.prototype.InterpolantFactoryMethodSmooth=void 0;class er extends dt{constructor(t,e,i,s){super(t,e,i,s)}}er.prototype.ValueTypeName="color";class Ee extends dt{constructor(t,e,i,s){super(t,e,i,s)}}Ee.prototype.ValueTypeName="number";class QA extends Pe{constructor(t,e,i,s){super(t,e,i,s)}interpolate_(t,e,i,s){const n=this.resultBuffer,r=this.sampleValues,a=this.valueSize,A=(i-e)/(s-e);let o=t*a;for(let h=o+a;o!==h;o+=4)Ut.slerpFlat(n,0,r,o-a,r,o,A);return n}}class ye extends dt{constructor(t,e,i,s){super(t,e,i,s)}InterpolantFactoryMethodLinear(t){return new QA(this.times,this.values,this.getValueSize(),t)}}ye.prototype.ValueTypeName="quaternion",ye.prototype.InterpolantFactoryMethodSmooth=void 0;class Qe extends dt{constructor(t,e,i){super(t,e,i)}}Qe.prototype.ValueTypeName="string",Qe.prototype.ValueBufferType=Array,Qe.prototype.DefaultInterpolation=De,Qe.prototype.InterpolantFactoryMethodLinear=void 0,Qe.prototype.InterpolantFactoryMethodSmooth=void 0;class xe extends dt{constructor(t,e,i,s){super(t,e,i,s)}}xe.prototype.ValueTypeName="vector";class xA{constructor(t="",e=-1,i=[],s=ba){this.name=t,this.tracks=i,this.duration=e,this.blendMode=s,this.uuid=At(),this.userData={},this.duration<0&&this.resetDuration()}static parse(t){const e=[],i=t.tracks,s=1/(t.fps||1);for(let r=0,a=i.length;r!==a;++r)e.push(MA(i[r]).scale(s));const n=new this(t.name,t.duration,e,t.blendMode);return n.uuid=t.uuid,n.userData=JSON.parse(t.userData||"{}"),n}static toJSON(t){const e=[],i=t.tracks,s={name:t.name,duration:t.duration,tracks:e,uuid:t.uuid,blendMode:t.blendMode,userData:JSON.stringify(t.userData)};for(let n=0,r=i.length;n!==r;++n)e.push(dt.toJSON(i[n]));return s}static CreateFromMorphTargetSequence(t,e,i,s){const n=e.length,r=[];for(let a=0;a<n;a++){let A=[],o=[];A.push((a+n-1)%n,a,(a+1)%n),o.push(0,1,0);const h=BA(A);A=$n(A,1,h),o=$n(o,1,h),!s&&A[0]===0&&(A.push(n),o.push(o[0])),r.push(new Ee(".morphTargetInfluences["+e[a].name+"]",A,o).scale(1/i))}return new this(t,-1,r)}static findByName(t,e){let i=t;if(!Array.isArray(t)){const s=t;i=s.geometry&&s.geometry.animations||s.animations}for(let s=0;s<i.length;s++)if(i[s].name===e)return i[s];return null}static CreateClipsFromMorphTargetSequences(t,e,i){const s={},n=/^([\w-]*?)([\d]+)$/;for(let a=0,A=t.length;a<A;a++){const o=t[a],h=o.name.match(n);if(h&&h.length>1){const c=h[1];let u=s[c];u||(s[c]=u=[]),u.push(o)}}const r=[];for(const a in s)r.push(this.CreateFromMorphTargetSequence(a,s[a],e,i));return r}static parseAnimation(t,e){if(console.warn("THREE.AnimationClip: parseAnimation() is deprecated and will be removed with r185"),!t)return console.error("THREE.AnimationClip: No animation in JSONLoader data."),null;const i=function(c,u,d,g,p){if(d.length!==0){const b=[],f=[];tr(d,b,f,g),b.length!==0&&p.push(new c(u,b,f))}},s=[],n=t.name||"default",r=t.fps||30,a=t.blendMode;let A=t.length||-1;const o=t.hierarchy||[];for(let c=0;c<o.length;c++){const u=o[c].keys;if(!(!u||u.length===0))if(u[0].morphTargets){const d={};let g;for(g=0;g<u.length;g++)if(u[g].morphTargets)for(let p=0;p<u[g].morphTargets.length;p++)d[u[g].morphTargets[p]]=-1;for(const p in d){const b=[],f=[];for(let m=0;m!==u[g].morphTargets.length;++m){const C=u[g];b.push(C.time),f.push(C.morphTarget===p?1:0)}s.push(new Ee(".morphTargetInfluence["+p+"]",b,f))}A=d.length*r}else{const d=".bones["+e[c].name+"]";i(xe,d+".position",u,"pos",s),i(ye,d+".quaternion",u,"rot",s),i(xe,d+".scale",u,"scl",s)}}return s.length===0?null:new this(n,A,s,a)}resetDuration(){const t=this.tracks;let e=0;for(let i=0,s=t.length;i!==s;++i){const n=this.tracks[i];e=Math.max(e,n.times[n.times.length-1])}return this.duration=e,this}trim(){for(let t=0;t<this.tracks.length;t++)this.tracks[t].trim(0,this.duration);return this}validate(){let t=!0;for(let e=0;e<this.tracks.length;e++)t=t&&this.tracks[e].validate();return t}optimize(){for(let t=0;t<this.tracks.length;t++)this.tracks[t].optimize();return this}clone(){const t=[];for(let i=0;i<this.tracks.length;i++)t.push(this.tracks[i].clone());const e=new this.constructor(this.name,this.duration,t,this.blendMode);return e.userData=JSON.parse(JSON.stringify(this.userData)),e}toJSON(){return this.constructor.toJSON(this)}}function wA(l){switch(l.toLowerCase()){case"scalar":case"double":case"float":case"number":case"integer":return Ee;case"vector":case"vector2":case"vector3":case"vector4":return xe;case"color":return er;case"quaternion":return ye;case"bool":case"boolean":return Ce;case"string":return Qe}throw new Error("THREE.KeyframeTrack: Unsupported typeName: "+l)}function MA(l){if(l.type===void 0)throw new Error("THREE.KeyframeTrack: track type undefined, can not parse");const t=wA(l.type);if(l.times===void 0){const e=[],i=[];tr(l.keys,e,i,"value"),l.times=e,l.values=i}return t.parse!==void 0?t.parse(l):new t(l.name,l.times,l.values,l.interpolation)}const Ft={enabled:!1,files:{},add:function(l,t){this.enabled!==!1&&(this.files[l]=t)},get:function(l){if(this.enabled!==!1)return this.files[l]},remove:function(l){delete this.files[l]},clear:function(){this.files={}}};class SA{constructor(t,e,i){const s=this;let n=!1,r=0,a=0,A;const o=[];this.onStart=void 0,this.onLoad=t,this.onProgress=e,this.onError=i,this.abortController=new AbortController,this.itemStart=function(h){a++,n===!1&&s.onStart!==void 0&&s.onStart(h,r,a),n=!0},this.itemEnd=function(h){r++,s.onProgress!==void 0&&s.onProgress(h,r,a),r===a&&(n=!1,s.onLoad!==void 0&&s.onLoad())},this.itemError=function(h){s.onError!==void 0&&s.onError(h)},this.resolveURL=function(h){return A?A(h):h},this.setURLModifier=function(h){return A=h,this},this.addHandler=function(h,c){return o.push(h,c),this},this.removeHandler=function(h){const c=o.indexOf(h);return c!==-1&&o.splice(c,2),this},this.getHandler=function(h){for(let c=0,u=o.length;c<u;c+=2){const d=o[c],g=o[c+1];if(d.global&&(d.lastIndex=0),d.test(h))return g}return null},this.abort=function(){return this.abortController.abort(),this.abortController=new AbortController,this}}}const FA=new SA;class jt{constructor(t){this.manager=t!==void 0?t:FA,this.crossOrigin="anonymous",this.withCredentials=!1,this.path="",this.resourcePath="",this.requestHeader={}}load(){}loadAsync(t,e){const i=this;return new Promise(function(s,n){i.load(t,s,e,n)})}parse(){}setCrossOrigin(t){return this.crossOrigin=t,this}setWithCredentials(t){return this.withCredentials=t,this}setPath(t){return this.path=t,this}setResourcePath(t){return this.resourcePath=t,this}setRequestHeader(t){return this.requestHeader=t,this}abort(){return this}}jt.DEFAULT_MATERIAL_NAME="__DEFAULT";const kt={};class kA extends Error{constructor(t,e){super(t),this.response=e}}class ie extends jt{constructor(t){super(t),this.mimeType="",this.responseType="",this._abortController=new AbortController}load(t,e,i,s){t===void 0&&(t=""),this.path!==void 0&&(t=this.path+t),t=this.manager.resolveURL(t);const n=Ft.get(`file:${t}`);if(n!==void 0)return this.manager.itemStart(t),setTimeout(()=>{e&&e(n),this.manager.itemEnd(t)},0),n;if(kt[t]!==void 0){kt[t].push({onLoad:e,onProgress:i,onError:s});return}kt[t]=[],kt[t].push({onLoad:e,onProgress:i,onError:s});const r=new Request(t,{headers:new Headers(this.requestHeader),credentials:this.withCredentials?"include":"same-origin",signal:typeof AbortSignal.any=="function"?AbortSignal.any([this._abortController.signal,this.manager.abortController.signal]):this._abortController.signal}),a=this.mimeType,A=this.responseType;fetch(r).then(o=>{if(o.status===200||o.status===0){if(o.status===0&&console.warn("THREE.FileLoader: HTTP Status 0 received."),typeof ReadableStream>"u"||o.body===void 0||o.body.getReader===void 0)return o;const h=kt[t],c=o.body.getReader(),u=o.headers.get("X-File-Size")||o.headers.get("Content-Length"),d=u?parseInt(u):0,g=d!==0;let p=0;const b=new ReadableStream({start(f){m();function m(){c.read().then(({done:C,value:B})=>{if(C)f.close();else{p+=B.byteLength;const E=new ProgressEvent("progress",{lengthComputable:g,loaded:p,total:d});for(let Q=0,y=h.length;Q<y;Q++){const x=h[Q];x.onProgress&&x.onProgress(E)}f.enqueue(B),m()}},C=>{f.error(C)})}}});return new Response(b)}else throw new kA(`fetch for "${o.url}" responded with ${o.status}: ${o.statusText}`,o)}).then(o=>{switch(A){case"arraybuffer":return o.arrayBuffer();case"blob":return o.blob();case"document":return o.text().then(h=>new DOMParser().parseFromString(h,a));case"json":return o.json();default:if(a==="")return o.text();{const c=/charset="?([^;"\s]*)"?/i.exec(a),u=c&&c[1]?c[1].toLowerCase():void 0,d=new TextDecoder(u);return o.arrayBuffer().then(g=>d.decode(g))}}}).then(o=>{Ft.add(`file:${t}`,o);const h=kt[t];delete kt[t];for(let c=0,u=h.length;c<u;c++){const d=h[c];d.onLoad&&d.onLoad(o)}}).catch(o=>{const h=kt[t];if(h===void 0)throw this.manager.itemError(t),o;delete kt[t];for(let c=0,u=h.length;c<u;c++){const d=h[c];d.onError&&d.onError(o)}this.manager.itemError(t)}).finally(()=>{this.manager.itemEnd(t)}),this.manager.itemStart(t)}setResponseType(t){return this.responseType=t,this}setMimeType(t){return this.mimeType=t,this}abort(){return this._abortController.abort(),this._abortController=new AbortController,this}}const we=new WeakMap;class TA extends jt{constructor(t){super(t)}load(t,e,i,s){this.path!==void 0&&(t=this.path+t),t=this.manager.resolveURL(t);const n=this,r=Ft.get(`image:${t}`);if(r!==void 0){if(r.complete===!0)n.manager.itemStart(t),setTimeout(function(){e&&e(r),n.manager.itemEnd(t)},0);else{let c=we.get(r);c===void 0&&(c=[],we.set(r,c)),c.push({onLoad:e,onError:s})}return r}const a=Ji("img");function A(){h(),e&&e(this);const c=we.get(this)||[];for(let u=0;u<c.length;u++){const d=c[u];d.onLoad&&d.onLoad(this)}we.delete(this),n.manager.itemEnd(t)}function o(c){h(),s&&s(c),Ft.remove(`image:${t}`);const u=we.get(this)||[];for(let d=0;d<u.length;d++){const g=u[d];g.onError&&g.onError(c)}we.delete(this),n.manager.itemError(t),n.manager.itemEnd(t)}function h(){a.removeEventListener("load",A,!1),a.removeEventListener("error",o,!1)}return a.addEventListener("load",A,!1),a.addEventListener("error",o,!1),t.slice(0,5)!=="data:"&&this.crossOrigin!==void 0&&(a.crossOrigin=this.crossOrigin),Ft.add(`image:${t}`,a),n.manager.itemStart(t),a.src=t,a}}class DA extends jt{constructor(t){super(t)}load(t,e,i,s){const n=new $,r=new TA(this.manager);return r.setCrossOrigin(this.crossOrigin),r.setPath(this.path),r.load(t,function(a){n.image=a,n.needsUpdate=!0,e!==void 0&&e(n)},i,s),n}}class xs extends z{constructor(t,e=1){super(),this.isLight=!0,this.type="Light",this.color=new v(t),this.intensity=e}dispose(){}copy(t,e){return super.copy(t,e),this.color.copy(t.color),this.intensity=t.intensity,this}toJSON(t){const e=super.toJSON(t);return e.object.color=this.color.getHex(),e.object.intensity=this.intensity,this.groundColor!==void 0&&(e.object.groundColor=this.groundColor.getHex()),this.distance!==void 0&&(e.object.distance=this.distance),this.angle!==void 0&&(e.object.angle=this.angle),this.decay!==void 0&&(e.object.decay=this.decay),this.penumbra!==void 0&&(e.object.penumbra=this.penumbra),this.shadow!==void 0&&(e.object.shadow=this.shadow.toJSON()),this.target!==void 0&&(e.object.target=this.target.uuid),e}}const ws=new S,ir=new I,sr=new I;class Ms{constructor(t){this.camera=t,this.intensity=1,this.bias=0,this.normalBias=0,this.radius=1,this.blurSamples=8,this.mapSize=new U(512,512),this.mapType=D,this.map=null,this.mapPass=null,this.matrix=new S,this.autoUpdate=!0,this.needsUpdate=!1,this._frustum=new dA,this._frameExtents=new U(1,1),this._viewportCount=1,this._viewports=[new Y(0,0,1,1)]}getViewportCount(){return this._viewportCount}getFrustum(){return this._frustum}updateMatrices(t){const e=this.camera,i=this.matrix;ir.setFromMatrixPosition(t.matrixWorld),e.position.copy(ir),sr.setFromMatrixPosition(t.target.matrixWorld),e.lookAt(sr),e.updateMatrixWorld(),ws.multiplyMatrices(e.projectionMatrix,e.matrixWorldInverse),this._frustum.setFromProjectionMatrix(ws,e.coordinateSystem,e.reversedDepth),e.reversedDepth?i.set(.5,0,0,.5,0,.5,0,.5,0,0,1,0,0,0,0,1):i.set(.5,0,0,.5,0,.5,0,.5,0,0,.5,.5,0,0,0,1),i.multiply(ws)}getViewport(t){return this._viewports[t]}getFrameExtents(){return this._frameExtents}dispose(){this.map&&this.map.dispose(),this.mapPass&&this.mapPass.dispose()}copy(t){return this.camera=t.camera.clone(),this.intensity=t.intensity,this.bias=t.bias,this.radius=t.radius,this.autoUpdate=t.autoUpdate,this.needsUpdate=t.needsUpdate,this.normalBias=t.normalBias,this.blurSamples=t.blurSamples,this.mapSize.copy(t.mapSize),this}clone(){return new this.constructor().copy(this)}toJSON(){const t={};return this.intensity!==1&&(t.intensity=this.intensity),this.bias!==0&&(t.bias=this.bias),this.normalBias!==0&&(t.normalBias=this.normalBias),this.radius!==1&&(t.radius=this.radius),(this.mapSize.x!==512||this.mapSize.y!==512)&&(t.mapSize=this.mapSize.toArray()),t.camera=this.camera.toJSON(!1).object,delete t.camera.matrix,t}}class _A extends Ms{constructor(){super(new us(50,1,.5,500)),this.isSpotLightShadow=!0,this.focus=1,this.aspect=1}updateMatrices(t){const e=this.camera,i=Le*2*t.angle*this.focus,s=this.mapSize.width/this.mapSize.height*this.aspect,n=t.distance||e.far;(i!==e.fov||s!==e.aspect||n!==e.far)&&(e.fov=i,e.aspect=s,e.far=n,e.updateProjectionMatrix()),super.updateMatrices(t)}copy(t){return super.copy(t),this.focus=t.focus,this}}class RA extends xs{constructor(t,e,i=0,s=Math.PI/3,n=0,r=2){super(t,e),this.isSpotLight=!0,this.type="SpotLight",this.position.copy(z.DEFAULT_UP),this.updateMatrix(),this.target=new z,this.distance=i,this.angle=s,this.penumbra=n,this.decay=r,this.map=null,this.shadow=new _A}get power(){return this.intensity*Math.PI}set power(t){this.intensity=t/Math.PI}dispose(){this.shadow.dispose()}copy(t,e){return super.copy(t,e),this.distance=t.distance,this.angle=t.angle,this.penumbra=t.penumbra,this.decay=t.decay,this.target=t.target.clone(),this.shadow=t.shadow.clone(),this}}const nr=new S,je=new I,Ss=new I;class LA extends Ms{constructor(){super(new us(90,1,.5,500)),this.isPointLightShadow=!0,this._frameExtents=new U(4,2),this._viewportCount=6,this._viewports=[new Y(2,1,1,1),new Y(0,1,1,1),new Y(3,1,1,1),new Y(1,1,1,1),new Y(3,0,1,1),new Y(1,0,1,1)],this._cubeDirections=[new I(1,0,0),new I(-1,0,0),new I(0,0,1),new I(0,0,-1),new I(0,1,0),new I(0,-1,0)],this._cubeUps=[new I(0,1,0),new I(0,1,0),new I(0,1,0),new I(0,1,0),new I(0,0,1),new I(0,0,-1)]}updateMatrices(t,e=0){const i=this.camera,s=this.matrix,n=t.distance||i.far;n!==i.far&&(i.far=n,i.updateProjectionMatrix()),je.setFromMatrixPosition(t.matrixWorld),i.position.copy(je),Ss.copy(i.position),Ss.add(this._cubeDirections[e]),i.up.copy(this._cubeUps[e]),i.lookAt(Ss),i.updateMatrixWorld(),s.makeTranslation(-je.x,-je.y,-je.z),nr.multiplyMatrices(i.projectionMatrix,i.matrixWorldInverse),this._frustum.setFromProjectionMatrix(nr,i.coordinateSystem,i.reversedDepth)}}class GA extends xs{constructor(t,e,i=0,s=2){super(t,e),this.isPointLight=!0,this.type="PointLight",this.distance=i,this.decay=s,this.shadow=new LA}get power(){return this.intensity*4*Math.PI}set power(t){this.intensity=t/(4*Math.PI)}dispose(){this.shadow.dispose()}copy(t,e){return super.copy(t,e),this.distance=t.distance,this.decay=t.decay,this.shadow=t.shadow.clone(),this}}class rr extends _n{constructor(t=-1,e=1,i=1,s=-1,n=.1,r=2e3){super(),this.isOrthographicCamera=!0,this.type="OrthographicCamera",this.zoom=1,this.view=null,this.left=t,this.right=e,this.top=i,this.bottom=s,this.near=n,this.far=r,this.updateProjectionMatrix()}copy(t,e){return super.copy(t,e),this.left=t.left,this.right=t.right,this.top=t.top,this.bottom=t.bottom,this.near=t.near,this.far=t.far,this.zoom=t.zoom,this.view=t.view===null?null:Object.assign({},t.view),this}setViewOffset(t,e,i,s,n,r){this.view===null&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=t,this.view.fullHeight=e,this.view.offsetX=i,this.view.offsetY=s,this.view.width=n,this.view.height=r,this.updateProjectionMatrix()}clearViewOffset(){this.view!==null&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){const t=(this.right-this.left)/(2*this.zoom),e=(this.top-this.bottom)/(2*this.zoom),i=(this.right+this.left)/2,s=(this.top+this.bottom)/2;let n=i-t,r=i+t,a=s+e,A=s-e;if(this.view!==null&&this.view.enabled){const o=(this.right-this.left)/this.view.fullWidth/this.zoom,h=(this.top-this.bottom)/this.view.fullHeight/this.zoom;n+=o*this.view.offsetX,r=n+o*this.view.width,a-=h*this.view.offsetY,A=a-h*this.view.height}this.projectionMatrix.makeOrthographic(n,r,a,A,this.near,this.far,this.coordinateSystem,this.reversedDepth),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(t){const e=super.toJSON(t);return e.object.zoom=this.zoom,e.object.left=this.left,e.object.right=this.right,e.object.top=this.top,e.object.bottom=this.bottom,e.object.near=this.near,e.object.far=this.far,this.view!==null&&(e.object.view=Object.assign({},this.view)),e}}class NA extends Ms{constructor(){super(new rr(-5,5,5,-5,.5,500)),this.isDirectionalLightShadow=!0}}class UA extends xs{constructor(t,e){super(t,e),this.isDirectionalLight=!0,this.type="DirectionalLight",this.position.copy(z.DEFAULT_UP),this.updateMatrix(),this.target=new z,this.shadow=new NA}dispose(){this.shadow.dispose()}copy(t){return super.copy(t),this.target=t.target.clone(),this.shadow=t.shadow.clone(),this}}class Je{static extractUrlBase(t){const e=t.lastIndexOf("/");return e===-1?"./":t.slice(0,e+1)}static resolveURL(t,e){return typeof t!="string"||t===""?"":(/^https?:\/\//i.test(e)&&/^\//.test(t)&&(e=e.replace(/(^https?:\/\/[^\/]+).*/i,"$1")),/^(https?:)?\/\//i.test(t)||/^data:.*,.*$/i.test(t)||/^blob:.*$/i.test(t)?t:e+t)}}const Fs=new WeakMap;class zA extends jt{constructor(t){super(t),this.isImageBitmapLoader=!0,typeof createImageBitmap>"u"&&console.warn("THREE.ImageBitmapLoader: createImageBitmap() not supported."),typeof fetch>"u"&&console.warn("THREE.ImageBitmapLoader: fetch() not supported."),this.options={premultiplyAlpha:"none"},this._abortController=new AbortController}setOptions(t){return this.options=t,this}load(t,e,i,s){t===void 0&&(t=""),this.path!==void 0&&(t=this.path+t),t=this.manager.resolveURL(t);const n=this,r=Ft.get(`image-bitmap:${t}`);if(r!==void 0){if(n.manager.itemStart(t),r.then){r.then(o=>{if(Fs.has(r)===!0)s&&s(Fs.get(r)),n.manager.itemError(t),n.manager.itemEnd(t);else return e&&e(o),n.manager.itemEnd(t),o});return}return setTimeout(function(){e&&e(r),n.manager.itemEnd(t)},0),r}const a={};a.credentials=this.crossOrigin==="anonymous"?"same-origin":"include",a.headers=this.requestHeader,a.signal=typeof AbortSignal.any=="function"?AbortSignal.any([this._abortController.signal,this.manager.abortController.signal]):this._abortController.signal;const A=fetch(t,a).then(function(o){return o.blob()}).then(function(o){return createImageBitmap(o,Object.assign(n.options,{colorSpaceConversion:"none"}))}).then(function(o){return Ft.add(`image-bitmap:${t}`,o),e&&e(o),n.manager.itemEnd(t),o}).catch(function(o){s&&s(o),Fs.set(A,o),Ft.remove(`image-bitmap:${t}`),n.manager.itemError(t),n.manager.itemEnd(t)});Ft.add(`image-bitmap:${t}`,A),n.manager.itemStart(t)}abort(){return this._abortController.abort(),this._abortController=new AbortController,this}}const ks="\\[\\]\\.:\\/",vA=new RegExp("["+ks+"]","g"),Ts="[^"+ks+"]",HA="[^"+ks.replace("\\.","")+"]",OA=/((?:WC+[\/:])*)/.source.replace("WC",Ts),qA=/(WCOD+)?/.source.replace("WCOD",HA),PA=/(?:\.(WC+)(?:\[(.+)\])?)?/.source.replace("WC",Ts),jA=/\.(WC+)(?:\[(.+)\])?/.source.replace("WC",Ts),JA=new RegExp("^"+OA+qA+PA+jA+"$"),VA=["material","materials","bones","map"];class KA{constructor(t,e,i){const s=i||R.parseTrackName(e);this._targetGroup=t,this._bindings=t.subscribe_(e,s)}getValue(t,e){this.bind();const i=this._targetGroup.nCachedObjects_,s=this._bindings[i];s!==void 0&&s.getValue(t,e)}setValue(t,e){const i=this._bindings;for(let s=this._targetGroup.nCachedObjects_,n=i.length;s!==n;++s)i[s].setValue(t,e)}bind(){const t=this._bindings;for(let e=this._targetGroup.nCachedObjects_,i=t.length;e!==i;++e)t[e].bind()}unbind(){const t=this._bindings;for(let e=this._targetGroup.nCachedObjects_,i=t.length;e!==i;++e)t[e].unbind()}}class R{constructor(t,e,i){this.path=e,this.parsedPath=i||R.parseTrackName(e),this.node=R.findNode(t,this.parsedPath.nodeName),this.rootNode=t,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}static create(t,e,i){return t&&t.isAnimationObjectGroup?new R.Composite(t,e,i):new R(t,e,i)}static sanitizeNodeName(t){return t.replace(/\s/g,"_").replace(vA,"")}static parseTrackName(t){const e=JA.exec(t);if(e===null)throw new Error("PropertyBinding: Cannot parse trackName: "+t);const i={nodeName:e[2],objectName:e[3],objectIndex:e[4],propertyName:e[5],propertyIndex:e[6]},s=i.nodeName&&i.nodeName.lastIndexOf(".");if(s!==void 0&&s!==-1){const n=i.nodeName.substring(s+1);VA.indexOf(n)!==-1&&(i.nodeName=i.nodeName.substring(0,s),i.objectName=n)}if(i.propertyName===null||i.propertyName.length===0)throw new Error("PropertyBinding: can not parse propertyName from trackName: "+t);return i}static findNode(t,e){if(e===void 0||e===""||e==="."||e===-1||e===t.name||e===t.uuid)return t;if(t.skeleton){const i=t.skeleton.getBoneByName(e);if(i!==void 0)return i}if(t.children){const i=function(n){for(let r=0;r<n.length;r++){const a=n[r];if(a.name===e||a.uuid===e)return a;const A=i(a.children);if(A)return A}return null},s=i(t.children);if(s)return s}return null}_getValue_unavailable(){}_setValue_unavailable(){}_getValue_direct(t,e){t[e]=this.targetObject[this.propertyName]}_getValue_array(t,e){const i=this.resolvedProperty;for(let s=0,n=i.length;s!==n;++s)t[e++]=i[s]}_getValue_arrayElement(t,e){t[e]=this.resolvedProperty[this.propertyIndex]}_getValue_toArray(t,e){this.resolvedProperty.toArray(t,e)}_setValue_direct(t,e){this.targetObject[this.propertyName]=t[e]}_setValue_direct_setNeedsUpdate(t,e){this.targetObject[this.propertyName]=t[e],this.targetObject.needsUpdate=!0}_setValue_direct_setMatrixWorldNeedsUpdate(t,e){this.targetObject[this.propertyName]=t[e],this.targetObject.matrixWorldNeedsUpdate=!0}_setValue_array(t,e){const i=this.resolvedProperty;for(let s=0,n=i.length;s!==n;++s)i[s]=t[e++]}_setValue_array_setNeedsUpdate(t,e){const i=this.resolvedProperty;for(let s=0,n=i.length;s!==n;++s)i[s]=t[e++];this.targetObject.needsUpdate=!0}_setValue_array_setMatrixWorldNeedsUpdate(t,e){const i=this.resolvedProperty;for(let s=0,n=i.length;s!==n;++s)i[s]=t[e++];this.targetObject.matrixWorldNeedsUpdate=!0}_setValue_arrayElement(t,e){this.resolvedProperty[this.propertyIndex]=t[e]}_setValue_arrayElement_setNeedsUpdate(t,e){this.resolvedProperty[this.propertyIndex]=t[e],this.targetObject.needsUpdate=!0}_setValue_arrayElement_setMatrixWorldNeedsUpdate(t,e){this.resolvedProperty[this.propertyIndex]=t[e],this.targetObject.matrixWorldNeedsUpdate=!0}_setValue_fromArray(t,e){this.resolvedProperty.fromArray(t,e)}_setValue_fromArray_setNeedsUpdate(t,e){this.resolvedProperty.fromArray(t,e),this.targetObject.needsUpdate=!0}_setValue_fromArray_setMatrixWorldNeedsUpdate(t,e){this.resolvedProperty.fromArray(t,e),this.targetObject.matrixWorldNeedsUpdate=!0}_getValue_unbound(t,e){this.bind(),this.getValue(t,e)}_setValue_unbound(t,e){this.bind(),this.setValue(t,e)}bind(){let t=this.node;const e=this.parsedPath,i=e.objectName,s=e.propertyName;let n=e.propertyIndex;if(t||(t=R.findNode(this.rootNode,e.nodeName),this.node=t),this.getValue=this._getValue_unavailable,this.setValue=this._setValue_unavailable,!t){console.warn("THREE.PropertyBinding: No target node found for track: "+this.path+".");return}if(i){let o=e.objectIndex;switch(i){case"materials":if(!t.material){console.error("THREE.PropertyBinding: Can not bind to material as node does not have a material.",this);return}if(!t.material.materials){console.error("THREE.PropertyBinding: Can not bind to material.materials as node.material does not have a materials array.",this);return}t=t.material.materials;break;case"bones":if(!t.skeleton){console.error("THREE.PropertyBinding: Can not bind to bones as node does not have a skeleton.",this);return}t=t.skeleton.bones;for(let h=0;h<t.length;h++)if(t[h].name===o){o=h;break}break;case"map":if("map"in t){t=t.map;break}if(!t.material){console.error("THREE.PropertyBinding: Can not bind to material as node does not have a material.",this);return}if(!t.material.map){console.error("THREE.PropertyBinding: Can not bind to material.map as node.material does not have a map.",this);return}t=t.material.map;break;default:if(t[i]===void 0){console.error("THREE.PropertyBinding: Can not bind to objectName of node undefined.",this);return}t=t[i]}if(o!==void 0){if(t[o]===void 0){console.error("THREE.PropertyBinding: Trying to bind to objectIndex of objectName, but is undefined.",this,t);return}t=t[o]}}const r=t[s];if(r===void 0){const o=e.nodeName;console.error("THREE.PropertyBinding: Trying to update property for track: "+o+"."+s+" but it wasn't found.",t);return}let a=this.Versioning.None;this.targetObject=t,t.isMaterial===!0?a=this.Versioning.NeedsUpdate:t.isObject3D===!0&&(a=this.Versioning.MatrixWorldNeedsUpdate);let A=this.BindingType.Direct;if(n!==void 0){if(s==="morphTargetInfluences"){if(!t.geometry){console.error("THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.",this);return}if(!t.geometry.morphAttributes){console.error("THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.morphAttributes.",this);return}t.morphTargetDictionary[n]!==void 0&&(n=t.morphTargetDictionary[n])}A=this.BindingType.ArrayElement,this.resolvedProperty=r,this.propertyIndex=n}else r.fromArray!==void 0&&r.toArray!==void 0?(A=this.BindingType.HasFromToArray,this.resolvedProperty=r):Array.isArray(r)?(A=this.BindingType.EntireArray,this.resolvedProperty=r):this.propertyName=s;this.getValue=this.GetterByBindingType[A],this.setValue=this.SetterByBindingTypeAndVersioning[A][a]}unbind(){this.node=null,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}}R.Composite=KA,R.prototype.BindingType={Direct:0,EntireArray:1,ArrayElement:2,HasFromToArray:3},R.prototype.Versioning={None:0,NeedsUpdate:1,MatrixWorldNeedsUpdate:2},R.prototype.GetterByBindingType=[R.prototype._getValue_direct,R.prototype._getValue_array,R.prototype._getValue_arrayElement,R.prototype._getValue_toArray],R.prototype.SetterByBindingTypeAndVersioning=[[R.prototype._setValue_direct,R.prototype._setValue_direct_setNeedsUpdate,R.prototype._setValue_direct_setMatrixWorldNeedsUpdate],[R.prototype._setValue_array,R.prototype._setValue_array_setNeedsUpdate,R.prototype._setValue_array_setMatrixWorldNeedsUpdate],[R.prototype._setValue_arrayElement,R.prototype._setValue_arrayElement_setNeedsUpdate,R.prototype._setValue_arrayElement_setMatrixWorldNeedsUpdate],[R.prototype._setValue_fromArray,R.prototype._setValue_fromArray_setNeedsUpdate,R.prototype._setValue_fromArray_setMatrixWorldNeedsUpdate]],typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("register",{detail:{revision:Js}})),typeof window<"u"&&(window.__THREE__?console.warn("WARNING: Multiple instances of Three.js being imported."):window.__THREE__=Js);const Ds=new WeakMap;class YA extends jt{constructor(t){super(t),this.decoderPath="",this.decoderConfig={},this.decoderBinary=null,this.decoderPending=null,this.workerLimit=4,this.workerPool=[],this.workerNextTaskID=1,this.workerSourceURL="",this.defaultAttributeIDs={position:"POSITION",normal:"NORMAL",color:"COLOR",uv:"TEX_COORD"},this.defaultAttributeTypes={position:"Float32Array",normal:"Float32Array",color:"Float32Array",uv:"Float32Array"}}setDecoderPath(t){return this.decoderPath=t,this}setDecoderConfig(t){return this.decoderConfig=t,this}setWorkerLimit(t){return this.workerLimit=t,this}load(t,e,i,s){const n=new ie(this.manager);n.setPath(this.path),n.setResponseType("arraybuffer"),n.setRequestHeader(this.requestHeader),n.setWithCredentials(this.withCredentials),n.load(t,r=>{this.parse(r,e,s)},i,s)}parse(t,e,i=()=>{}){this.decodeDracoFile(t,e,null,null,N,i).catch(i)}decodeDracoFile(t,e,i,s,n=Z,r=()=>{}){const a={attributeIDs:i||this.defaultAttributeIDs,attributeTypes:s||this.defaultAttributeTypes,useUniqueIDs:!!i,vertexColorSpace:n};return this.decodeGeometry(t,a).then(e).catch(r)}decodeGeometry(t,e){const i=JSON.stringify(e);if(Ds.has(t)){const A=Ds.get(t);if(A.key===i)return A.promise;if(t.byteLength===0)throw new Error("THREE.DRACOLoader: Unable to re-decode a buffer with different settings. Buffer has already been transferred.")}let s;const n=this.workerNextTaskID++,r=t.byteLength,a=this._getWorker(n,r).then(A=>(s=A,new Promise((o,h)=>{s._callbacks[n]={resolve:o,reject:h},s.postMessage({type:"decode",id:n,taskConfig:e,buffer:t},[t])}))).then(A=>this._createGeometry(A.geometry));return a.catch(()=>!0).then(()=>{s&&n&&this._releaseTask(s,n)}),Ds.set(t,{key:i,promise:a}),a}_createGeometry(t){const e=new $t;t.index&&e.setIndex(new et(t.index.array,1));for(let i=0;i<t.attributes.length;i++){const s=t.attributes[i],n=s.name,r=s.array,a=s.itemSize,A=new et(r,a);n==="color"&&(this._assignVertexColorSpace(A,s.vertexColorSpace),A.normalized=!(r instanceof Float32Array)),e.setAttribute(n,A)}return e}_assignVertexColorSpace(t,e){if(e!==N)return;const i=new v;for(let s=0,n=t.count;s<n;s++)i.fromBufferAttribute(t,s),K.colorSpaceToWorking(i,N),t.setXYZ(s,i.r,i.g,i.b)}_loadLibrary(t,e){const i=new ie(this.manager);return i.setPath(this.decoderPath),i.setResponseType(e),i.setWithCredentials(this.withCredentials),new Promise((s,n)=>{i.load(t,s,void 0,n)})}preload(){return this._initDecoder(),this}_initDecoder(){if(this.decoderPending)return this.decoderPending;const t=typeof WebAssembly!="object"||this.decoderConfig.type==="js",e=[];return t?e.push(this._loadLibrary("draco_decoder.js","text")):(e.push(this._loadLibrary("draco_wasm_wrapper.js","text")),e.push(this._loadLibrary("draco_decoder.wasm","arraybuffer"))),this.decoderPending=Promise.all(e).then(i=>{const s=i[0];t||(this.decoderConfig.wasmBinary=i[1]);const n=WA.toString(),r=["/* draco decoder */",s,"","/* worker */",n.substring(n.indexOf("{")+1,n.lastIndexOf("}"))].join(`
6
+ `);this.workerSourceURL=URL.createObjectURL(new Blob([r]))}),this.decoderPending}_getWorker(t,e){return this._initDecoder().then(()=>{if(this.workerPool.length<this.workerLimit){const s=new Worker(this.workerSourceURL);s._callbacks={},s._taskCosts={},s._taskLoad=0,s.postMessage({type:"init",decoderConfig:this.decoderConfig}),s.onmessage=function(n){const r=n.data;switch(r.type){case"decode":s._callbacks[r.id].resolve(r);break;case"error":s._callbacks[r.id].reject(r);break;default:console.error('THREE.DRACOLoader: Unexpected message, "'+r.type+'"')}},this.workerPool.push(s)}else this.workerPool.sort(function(s,n){return s._taskLoad>n._taskLoad?-1:1});const i=this.workerPool[this.workerPool.length-1];return i._taskCosts[t]=e,i._taskLoad+=e,i})}_releaseTask(t,e){t._taskLoad-=t._taskCosts[e],delete t._callbacks[e],delete t._taskCosts[e]}debug(){console.log("Task load: ",this.workerPool.map(t=>t._taskLoad))}dispose(){for(let t=0;t<this.workerPool.length;++t)this.workerPool[t].terminate();return this.workerPool.length=0,this.workerSourceURL!==""&&URL.revokeObjectURL(this.workerSourceURL),this}}function WA(){let l,t;onmessage=function(r){const a=r.data;switch(a.type){case"init":l=a.decoderConfig,t=new Promise(function(h){l.onModuleLoaded=function(c){h({draco:c})},DracoDecoderModule(l)});break;case"decode":const A=a.buffer,o=a.taskConfig;t.then(h=>{const c=h.draco,u=new c.Decoder;try{const d=e(c,u,new Int8Array(A),o),g=d.attributes.map(p=>p.array.buffer);d.index&&g.push(d.index.array.buffer),self.postMessage({type:"decode",id:a.id,geometry:d},g)}catch(d){console.error(d),self.postMessage({type:"error",id:a.id,error:d.message})}finally{c.destroy(u)}});break}};function e(r,a,A,o){const h=o.attributeIDs,c=o.attributeTypes;let u,d;const g=a.GetEncodedGeometryType(A);if(g===r.TRIANGULAR_MESH)u=new r.Mesh,d=a.DecodeArrayToMesh(A,A.byteLength,u);else if(g===r.POINT_CLOUD)u=new r.PointCloud,d=a.DecodeArrayToPointCloud(A,A.byteLength,u);else throw new Error("THREE.DRACOLoader: Unexpected geometry type.");if(!d.ok()||u.ptr===0)throw new Error("THREE.DRACOLoader: Decoding failed: "+d.error_msg());const p={index:null,attributes:[]};for(const b in h){const f=self[c[b]];let m,C;if(o.useUniqueIDs)C=h[b],m=a.GetAttributeByUniqueId(u,C);else{if(C=a.GetAttributeId(u,r[h[b]]),C===-1)continue;m=a.GetAttribute(u,C)}const B=s(r,a,u,b,f,m);b==="color"&&(B.vertexColorSpace=o.vertexColorSpace),p.attributes.push(B)}return g===r.TRIANGULAR_MESH&&(p.index=i(r,a,u)),r.destroy(u),p}function i(r,a,A){const h=A.num_faces()*3,c=h*4,u=r._malloc(c);a.GetTrianglesUInt32Array(A,c,u);const d=new Uint32Array(r.HEAPF32.buffer,u,h).slice();return r._free(u),{array:d,itemSize:1}}function s(r,a,A,o,h,c){const u=c.num_components(),g=A.num_points()*u,p=g*h.BYTES_PER_ELEMENT,b=n(r,h),f=r._malloc(p);a.GetAttributeDataArrayForAllPoints(A,c,b,p,f);const m=new h(r.HEAPF32.buffer,f,g).slice();return r._free(f),{name:o,array:m,itemSize:u}}function n(r,a){switch(a){case Float32Array:return r.DT_FLOAT32;case Int8Array:return r.DT_INT8;case Int16Array:return r.DT_INT16;case Int32Array:return r.DT_INT32;case Uint8Array:return r.DT_UINT8;case Uint16Array:return r.DT_UINT16;case Uint32Array:return r.DT_UINT32}}}function ar(l,t){if(t===ma)return console.warn("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Geometry already defined as triangles."),l;if(t===zi||t===un){let e=l.getIndex();if(e===null){const r=[],a=l.getAttribute("position");if(a!==void 0){for(let A=0;A<a.count;A++)r.push(A);l.setIndex(r),e=l.getIndex()}else return console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Undefined position attribute. Processing not possible."),l}const i=e.count-2,s=[];if(t===zi)for(let r=1;r<=i;r++)s.push(e.getX(0)),s.push(e.getX(r)),s.push(e.getX(r+1));else for(let r=0;r<i;r++)r%2===0?(s.push(e.getX(r)),s.push(e.getX(r+1)),s.push(e.getX(r+2))):(s.push(e.getX(r+2)),s.push(e.getX(r+1)),s.push(e.getX(r)));s.length/3!==i&&console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Unable to generate correct amount of triangles.");const n=l.clone();return n.setIndex(s),n.clearGroups(),n}else return console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Unknown draw mode:",t),l}class XA extends jt{constructor(t){super(t),this.dracoLoader=null,this.ktx2Loader=null,this.meshoptDecoder=null,this.pluginCallbacks=[],this.register(function(e){return new io(e)}),this.register(function(e){return new so(e)}),this.register(function(e){return new uo(e)}),this.register(function(e){return new go(e)}),this.register(function(e){return new po(e)}),this.register(function(e){return new ro(e)}),this.register(function(e){return new ao(e)}),this.register(function(e){return new Ao(e)}),this.register(function(e){return new oo(e)}),this.register(function(e){return new eo(e)}),this.register(function(e){return new ho(e)}),this.register(function(e){return new no(e)}),this.register(function(e){return new lo(e)}),this.register(function(e){return new co(e)}),this.register(function(e){return new $A(e)}),this.register(function(e){return new fo(e)}),this.register(function(e){return new bo(e)})}load(t,e,i,s){const n=this;let r;if(this.resourcePath!=="")r=this.resourcePath;else if(this.path!==""){const o=Je.extractUrlBase(t);r=Je.resolveURL(o,this.path)}else r=Je.extractUrlBase(t);this.manager.itemStart(t);const a=function(o){s?s(o):console.error(o),n.manager.itemError(t),n.manager.itemEnd(t)},A=new ie(this.manager);A.setPath(this.path),A.setResponseType("arraybuffer"),A.setRequestHeader(this.requestHeader),A.setWithCredentials(this.withCredentials),A.load(t,function(o){try{n.parse(o,r,function(h){e(h),n.manager.itemEnd(t)},a)}catch(h){a(h)}},i,a)}setDRACOLoader(t){return this.dracoLoader=t,this}setKTX2Loader(t){return this.ktx2Loader=t,this}setMeshoptDecoder(t){return this.meshoptDecoder=t,this}register(t){return this.pluginCallbacks.indexOf(t)===-1&&this.pluginCallbacks.push(t),this}unregister(t){return this.pluginCallbacks.indexOf(t)!==-1&&this.pluginCallbacks.splice(this.pluginCallbacks.indexOf(t),1),this}parse(t,e,i,s){let n;const r={},a={},A=new TextDecoder;if(typeof t=="string")n=JSON.parse(t);else if(t instanceof ArrayBuffer)if(A.decode(new Uint8Array(t,0,4))===Ar){try{r[M.KHR_BINARY_GLTF]=new mo(t)}catch(c){s&&s(c);return}n=JSON.parse(r[M.KHR_BINARY_GLTF].content)}else n=JSON.parse(A.decode(t));else n=t;if(n.asset===void 0||n.asset.version[0]<2){s&&s(new Error("THREE.GLTFLoader: Unsupported asset. glTF versions >=2.0 are supported."));return}const o=new To(n,{path:e||this.resourcePath||"",crossOrigin:this.crossOrigin,requestHeader:this.requestHeader,manager:this.manager,ktx2Loader:this.ktx2Loader,meshoptDecoder:this.meshoptDecoder});o.fileLoader.setRequestHeader(this.requestHeader);for(let h=0;h<this.pluginCallbacks.length;h++){const c=this.pluginCallbacks[h](o);c.name||console.error("THREE.GLTFLoader: Invalid plugin found: missing name"),a[c.name]=c,r[c.name]=!0}if(n.extensionsUsed)for(let h=0;h<n.extensionsUsed.length;++h){const c=n.extensionsUsed[h],u=n.extensionsRequired||[];switch(c){case M.KHR_MATERIALS_UNLIT:r[c]=new to;break;case M.KHR_DRACO_MESH_COMPRESSION:r[c]=new Io(n,this.dracoLoader);break;case M.KHR_TEXTURE_TRANSFORM:r[c]=new Bo;break;case M.KHR_MESH_QUANTIZATION:r[c]=new Co;break;default:u.indexOf(c)>=0&&a[c]===void 0&&console.warn('THREE.GLTFLoader: Unknown extension "'+c+'".')}}o.setExtensions(r),o.setPlugins(a),o.parse(i,s)}parseAsync(t,e){const i=this;return new Promise(function(s,n){i.parse(t,e,s,n)})}}function ZA(){let l={};return{get:function(t){return l[t]},add:function(t,e){l[t]=e},remove:function(t){delete l[t]},removeAll:function(){l={}}}}const M={KHR_BINARY_GLTF:"KHR_binary_glTF",KHR_DRACO_MESH_COMPRESSION:"KHR_draco_mesh_compression",KHR_LIGHTS_PUNCTUAL:"KHR_lights_punctual",KHR_MATERIALS_CLEARCOAT:"KHR_materials_clearcoat",KHR_MATERIALS_DISPERSION:"KHR_materials_dispersion",KHR_MATERIALS_IOR:"KHR_materials_ior",KHR_MATERIALS_SHEEN:"KHR_materials_sheen",KHR_MATERIALS_SPECULAR:"KHR_materials_specular",KHR_MATERIALS_TRANSMISSION:"KHR_materials_transmission",KHR_MATERIALS_IRIDESCENCE:"KHR_materials_iridescence",KHR_MATERIALS_ANISOTROPY:"KHR_materials_anisotropy",KHR_MATERIALS_UNLIT:"KHR_materials_unlit",KHR_MATERIALS_VOLUME:"KHR_materials_volume",KHR_TEXTURE_BASISU:"KHR_texture_basisu",KHR_TEXTURE_TRANSFORM:"KHR_texture_transform",KHR_MESH_QUANTIZATION:"KHR_mesh_quantization",KHR_MATERIALS_EMISSIVE_STRENGTH:"KHR_materials_emissive_strength",EXT_MATERIALS_BUMP:"EXT_materials_bump",EXT_TEXTURE_WEBP:"EXT_texture_webp",EXT_TEXTURE_AVIF:"EXT_texture_avif",EXT_MESHOPT_COMPRESSION:"EXT_meshopt_compression",EXT_MESH_GPU_INSTANCING:"EXT_mesh_gpu_instancing"};class $A{constructor(t){this.parser=t,this.name=M.KHR_LIGHTS_PUNCTUAL,this.cache={refs:{},uses:{}}}_markDefs(){const t=this.parser,e=this.parser.json.nodes||[];for(let i=0,s=e.length;i<s;i++){const n=e[i];n.extensions&&n.extensions[this.name]&&n.extensions[this.name].light!==void 0&&t._addNodeRef(this.cache,n.extensions[this.name].light)}}_loadLight(t){const e=this.parser,i="light:"+t;let s=e.cache.get(i);if(s)return s;const n=e.json,A=((n.extensions&&n.extensions[this.name]||{}).lights||[])[t];let o;const h=new v(16777215);A.color!==void 0&&h.setRGB(A.color[0],A.color[1],A.color[2],Z);const c=A.range!==void 0?A.range:0;switch(A.type){case"directional":o=new UA(h),o.target.position.set(0,0,-1),o.add(o.target);break;case"point":o=new GA(h),o.distance=c;break;case"spot":o=new RA(h),o.distance=c,A.spot=A.spot||{},A.spot.innerConeAngle=A.spot.innerConeAngle!==void 0?A.spot.innerConeAngle:0,A.spot.outerConeAngle=A.spot.outerConeAngle!==void 0?A.spot.outerConeAngle:Math.PI/4,o.angle=A.spot.outerConeAngle,o.penumbra=1-A.spot.innerConeAngle/A.spot.outerConeAngle,o.target.position.set(0,0,-1),o.add(o.target);break;default:throw new Error("THREE.GLTFLoader: Unexpected light type: "+A.type)}return o.position.set(0,0,0),bt(o,A),A.intensity!==void 0&&(o.intensity=A.intensity),o.name=e.createUniqueName(A.name||"light_"+t),s=Promise.resolve(o),e.cache.add(i,s),s}getDependency(t,e){if(t==="light")return this._loadLight(e)}createNodeAttachment(t){const e=this,i=this.parser,n=i.json.nodes[t],a=(n.extensions&&n.extensions[this.name]||{}).light;return a===void 0?null:this._loadLight(a).then(function(A){return i._getNodeRef(e.cache,a,A)})}}class to{constructor(){this.name=M.KHR_MATERIALS_UNLIT}getMaterialType(){return be}extendParams(t,e,i){const s=[];t.color=new v(1,1,1),t.opacity=1;const n=e.pbrMetallicRoughness;if(n){if(Array.isArray(n.baseColorFactor)){const r=n.baseColorFactor;t.color.setRGB(r[0],r[1],r[2],Z),t.opacity=r[3]}n.baseColorTexture!==void 0&&s.push(i.assignTexture(t,"map",n.baseColorTexture,N))}return Promise.all(s)}}class eo{constructor(t){this.parser=t,this.name=M.KHR_MATERIALS_EMISSIVE_STRENGTH}extendMaterialParams(t,e){const s=this.parser.json.materials[t];if(!s.extensions||!s.extensions[this.name])return Promise.resolve();const n=s.extensions[this.name].emissiveStrength;return n!==void 0&&(e.emissiveIntensity=n),Promise.resolve()}}class io{constructor(t){this.parser=t,this.name=M.KHR_MATERIALS_CLEARCOAT}getMaterialType(t){const i=this.parser.json.materials[t];return!i.extensions||!i.extensions[this.name]?null:ft}extendMaterialParams(t,e){const i=this.parser,s=i.json.materials[t];if(!s.extensions||!s.extensions[this.name])return Promise.resolve();const n=[],r=s.extensions[this.name];if(r.clearcoatFactor!==void 0&&(e.clearcoat=r.clearcoatFactor),r.clearcoatTexture!==void 0&&n.push(i.assignTexture(e,"clearcoatMap",r.clearcoatTexture)),r.clearcoatRoughnessFactor!==void 0&&(e.clearcoatRoughness=r.clearcoatRoughnessFactor),r.clearcoatRoughnessTexture!==void 0&&n.push(i.assignTexture(e,"clearcoatRoughnessMap",r.clearcoatRoughnessTexture)),r.clearcoatNormalTexture!==void 0&&(n.push(i.assignTexture(e,"clearcoatNormalMap",r.clearcoatNormalTexture)),r.clearcoatNormalTexture.scale!==void 0)){const a=r.clearcoatNormalTexture.scale;e.clearcoatNormalScale=new U(a,a)}return Promise.all(n)}}class so{constructor(t){this.parser=t,this.name=M.KHR_MATERIALS_DISPERSION}getMaterialType(t){const i=this.parser.json.materials[t];return!i.extensions||!i.extensions[this.name]?null:ft}extendMaterialParams(t,e){const s=this.parser.json.materials[t];if(!s.extensions||!s.extensions[this.name])return Promise.resolve();const n=s.extensions[this.name];return e.dispersion=n.dispersion!==void 0?n.dispersion:0,Promise.resolve()}}class no{constructor(t){this.parser=t,this.name=M.KHR_MATERIALS_IRIDESCENCE}getMaterialType(t){const i=this.parser.json.materials[t];return!i.extensions||!i.extensions[this.name]?null:ft}extendMaterialParams(t,e){const i=this.parser,s=i.json.materials[t];if(!s.extensions||!s.extensions[this.name])return Promise.resolve();const n=[],r=s.extensions[this.name];return r.iridescenceFactor!==void 0&&(e.iridescence=r.iridescenceFactor),r.iridescenceTexture!==void 0&&n.push(i.assignTexture(e,"iridescenceMap",r.iridescenceTexture)),r.iridescenceIor!==void 0&&(e.iridescenceIOR=r.iridescenceIor),e.iridescenceThicknessRange===void 0&&(e.iridescenceThicknessRange=[100,400]),r.iridescenceThicknessMinimum!==void 0&&(e.iridescenceThicknessRange[0]=r.iridescenceThicknessMinimum),r.iridescenceThicknessMaximum!==void 0&&(e.iridescenceThicknessRange[1]=r.iridescenceThicknessMaximum),r.iridescenceThicknessTexture!==void 0&&n.push(i.assignTexture(e,"iridescenceThicknessMap",r.iridescenceThicknessTexture)),Promise.all(n)}}class ro{constructor(t){this.parser=t,this.name=M.KHR_MATERIALS_SHEEN}getMaterialType(t){const i=this.parser.json.materials[t];return!i.extensions||!i.extensions[this.name]?null:ft}extendMaterialParams(t,e){const i=this.parser,s=i.json.materials[t];if(!s.extensions||!s.extensions[this.name])return Promise.resolve();const n=[];e.sheenColor=new v(0,0,0),e.sheenRoughness=0,e.sheen=1;const r=s.extensions[this.name];if(r.sheenColorFactor!==void 0){const a=r.sheenColorFactor;e.sheenColor.setRGB(a[0],a[1],a[2],Z)}return r.sheenRoughnessFactor!==void 0&&(e.sheenRoughness=r.sheenRoughnessFactor),r.sheenColorTexture!==void 0&&n.push(i.assignTexture(e,"sheenColorMap",r.sheenColorTexture,N)),r.sheenRoughnessTexture!==void 0&&n.push(i.assignTexture(e,"sheenRoughnessMap",r.sheenRoughnessTexture)),Promise.all(n)}}class ao{constructor(t){this.parser=t,this.name=M.KHR_MATERIALS_TRANSMISSION}getMaterialType(t){const i=this.parser.json.materials[t];return!i.extensions||!i.extensions[this.name]?null:ft}extendMaterialParams(t,e){const i=this.parser,s=i.json.materials[t];if(!s.extensions||!s.extensions[this.name])return Promise.resolve();const n=[],r=s.extensions[this.name];return r.transmissionFactor!==void 0&&(e.transmission=r.transmissionFactor),r.transmissionTexture!==void 0&&n.push(i.assignTexture(e,"transmissionMap",r.transmissionTexture)),Promise.all(n)}}class Ao{constructor(t){this.parser=t,this.name=M.KHR_MATERIALS_VOLUME}getMaterialType(t){const i=this.parser.json.materials[t];return!i.extensions||!i.extensions[this.name]?null:ft}extendMaterialParams(t,e){const i=this.parser,s=i.json.materials[t];if(!s.extensions||!s.extensions[this.name])return Promise.resolve();const n=[],r=s.extensions[this.name];e.thickness=r.thicknessFactor!==void 0?r.thicknessFactor:0,r.thicknessTexture!==void 0&&n.push(i.assignTexture(e,"thicknessMap",r.thicknessTexture)),e.attenuationDistance=r.attenuationDistance||1/0;const a=r.attenuationColor||[1,1,1];return e.attenuationColor=new v().setRGB(a[0],a[1],a[2],Z),Promise.all(n)}}class oo{constructor(t){this.parser=t,this.name=M.KHR_MATERIALS_IOR}getMaterialType(t){const i=this.parser.json.materials[t];return!i.extensions||!i.extensions[this.name]?null:ft}extendMaterialParams(t,e){const s=this.parser.json.materials[t];if(!s.extensions||!s.extensions[this.name])return Promise.resolve();const n=s.extensions[this.name];return e.ior=n.ior!==void 0?n.ior:1.5,Promise.resolve()}}class ho{constructor(t){this.parser=t,this.name=M.KHR_MATERIALS_SPECULAR}getMaterialType(t){const i=this.parser.json.materials[t];return!i.extensions||!i.extensions[this.name]?null:ft}extendMaterialParams(t,e){const i=this.parser,s=i.json.materials[t];if(!s.extensions||!s.extensions[this.name])return Promise.resolve();const n=[],r=s.extensions[this.name];e.specularIntensity=r.specularFactor!==void 0?r.specularFactor:1,r.specularTexture!==void 0&&n.push(i.assignTexture(e,"specularIntensityMap",r.specularTexture));const a=r.specularColorFactor||[1,1,1];return e.specularColor=new v().setRGB(a[0],a[1],a[2],Z),r.specularColorTexture!==void 0&&n.push(i.assignTexture(e,"specularColorMap",r.specularColorTexture,N)),Promise.all(n)}}class co{constructor(t){this.parser=t,this.name=M.EXT_MATERIALS_BUMP}getMaterialType(t){const i=this.parser.json.materials[t];return!i.extensions||!i.extensions[this.name]?null:ft}extendMaterialParams(t,e){const i=this.parser,s=i.json.materials[t];if(!s.extensions||!s.extensions[this.name])return Promise.resolve();const n=[],r=s.extensions[this.name];return e.bumpScale=r.bumpFactor!==void 0?r.bumpFactor:1,r.bumpTexture!==void 0&&n.push(i.assignTexture(e,"bumpMap",r.bumpTexture)),Promise.all(n)}}class lo{constructor(t){this.parser=t,this.name=M.KHR_MATERIALS_ANISOTROPY}getMaterialType(t){const i=this.parser.json.materials[t];return!i.extensions||!i.extensions[this.name]?null:ft}extendMaterialParams(t,e){const i=this.parser,s=i.json.materials[t];if(!s.extensions||!s.extensions[this.name])return Promise.resolve();const n=[],r=s.extensions[this.name];return r.anisotropyStrength!==void 0&&(e.anisotropy=r.anisotropyStrength),r.anisotropyRotation!==void 0&&(e.anisotropyRotation=r.anisotropyRotation),r.anisotropyTexture!==void 0&&n.push(i.assignTexture(e,"anisotropyMap",r.anisotropyTexture)),Promise.all(n)}}class uo{constructor(t){this.parser=t,this.name=M.KHR_TEXTURE_BASISU}loadTexture(t){const e=this.parser,i=e.json,s=i.textures[t];if(!s.extensions||!s.extensions[this.name])return null;const n=s.extensions[this.name],r=e.options.ktx2Loader;if(!r){if(i.extensionsRequired&&i.extensionsRequired.indexOf(this.name)>=0)throw new Error("THREE.GLTFLoader: setKTX2Loader must be called before loading KTX2 textures");return null}return e.loadTextureImage(t,n.source,r)}}class go{constructor(t){this.parser=t,this.name=M.EXT_TEXTURE_WEBP}loadTexture(t){const e=this.name,i=this.parser,s=i.json,n=s.textures[t];if(!n.extensions||!n.extensions[e])return null;const r=n.extensions[e],a=s.images[r.source];let A=i.textureLoader;if(a.uri){const o=i.options.manager.getHandler(a.uri);o!==null&&(A=o)}return i.loadTextureImage(t,r.source,A)}}class po{constructor(t){this.parser=t,this.name=M.EXT_TEXTURE_AVIF}loadTexture(t){const e=this.name,i=this.parser,s=i.json,n=s.textures[t];if(!n.extensions||!n.extensions[e])return null;const r=n.extensions[e],a=s.images[r.source];let A=i.textureLoader;if(a.uri){const o=i.options.manager.getHandler(a.uri);o!==null&&(A=o)}return i.loadTextureImage(t,r.source,A)}}class fo{constructor(t){this.name=M.EXT_MESHOPT_COMPRESSION,this.parser=t}loadBufferView(t){const e=this.parser.json,i=e.bufferViews[t];if(i.extensions&&i.extensions[this.name]){const s=i.extensions[this.name],n=this.parser.getDependency("buffer",s.buffer),r=this.parser.options.meshoptDecoder;if(!r||!r.supported){if(e.extensionsRequired&&e.extensionsRequired.indexOf(this.name)>=0)throw new Error("THREE.GLTFLoader: setMeshoptDecoder must be called before loading compressed files");return null}return n.then(function(a){const A=s.byteOffset||0,o=s.byteLength||0,h=s.count,c=s.byteStride,u=new Uint8Array(a,A,o);return r.decodeGltfBufferAsync?r.decodeGltfBufferAsync(h,c,u,s.mode,s.filter).then(function(d){return d.buffer}):r.ready.then(function(){const d=new ArrayBuffer(h*c);return r.decodeGltfBuffer(new Uint8Array(d),h,c,u,s.mode,s.filter),d})})}else return null}}class bo{constructor(t){this.name=M.EXT_MESH_GPU_INSTANCING,this.parser=t}createNodeMesh(t){const e=this.parser.json,i=e.nodes[t];if(!i.extensions||!i.extensions[this.name]||i.mesh===void 0)return null;const s=e.meshes[i.mesh];for(const o of s.primitives)if(o.mode!==rt.TRIANGLES&&o.mode!==rt.TRIANGLE_STRIP&&o.mode!==rt.TRIANGLE_FAN&&o.mode!==void 0)return null;const r=i.extensions[this.name].attributes,a=[],A={};for(const o in r)a.push(this.parser.getDependency("accessor",r[o]).then(h=>(A[o]=h,A[o])));return a.length<1?null:(a.push(this.parser.createNodeMesh(t)),Promise.all(a).then(o=>{const h=o.pop(),c=h.isGroup?h.children:[h],u=o[0].count,d=[];for(const g of c){const p=new S,b=new I,f=new Ut,m=new I(1,1,1),C=new hA(g.geometry,g.material,u);for(let B=0;B<u;B++)A.TRANSLATION&&b.fromBufferAttribute(A.TRANSLATION,B),A.ROTATION&&f.fromBufferAttribute(A.ROTATION,B),A.SCALE&&m.fromBufferAttribute(A.SCALE,B),C.setMatrixAt(B,p.compose(b,f,m));for(const B in A)if(B==="_COLOR_0"){const E=A[B];C.instanceColor=new Is(E.array,E.itemSize,E.normalized)}else B!=="TRANSLATION"&&B!=="ROTATION"&&B!=="SCALE"&&g.geometry.setAttribute(B,A[B]);z.prototype.copy.call(C,g),this.parser.assignFinalMaterial(C),d.push(C)}return h.isGroup?(h.clear(),h.add(...d),h):d[0]}))}}const Ar="glTF",Ve=12,or={JSON:1313821514,BIN:5130562};class mo{constructor(t){this.name=M.KHR_BINARY_GLTF,this.content=null,this.body=null;const e=new DataView(t,0,Ve),i=new TextDecoder;if(this.header={magic:i.decode(new Uint8Array(t.slice(0,4))),version:e.getUint32(4,!0),length:e.getUint32(8,!0)},this.header.magic!==Ar)throw new Error("THREE.GLTFLoader: Unsupported glTF-Binary header.");if(this.header.version<2)throw new Error("THREE.GLTFLoader: Legacy binary file detected.");const s=this.header.length-Ve,n=new DataView(t,Ve);let r=0;for(;r<s;){const a=n.getUint32(r,!0);r+=4;const A=n.getUint32(r,!0);if(r+=4,A===or.JSON){const o=new Uint8Array(t,Ve+r,a);this.content=i.decode(o)}else if(A===or.BIN){const o=Ve+r;this.body=t.slice(o,o+a)}r+=a}if(this.content===null)throw new Error("THREE.GLTFLoader: JSON content not found.")}}class Io{constructor(t,e){if(!e)throw new Error("THREE.GLTFLoader: No DRACOLoader instance provided.");this.name=M.KHR_DRACO_MESH_COMPRESSION,this.json=t,this.dracoLoader=e,this.dracoLoader.preload()}decodePrimitive(t,e){const i=this.json,s=this.dracoLoader,n=t.extensions[this.name].bufferView,r=t.extensions[this.name].attributes,a={},A={},o={};for(const h in r){const c=Rs[h]||h.toLowerCase();a[c]=r[h]}for(const h in t.attributes){const c=Rs[h]||h.toLowerCase();if(r[h]!==void 0){const u=i.accessors[t.attributes[h]],d=Me[u.componentType];o[c]=d.name,A[c]=u.normalized===!0}}return e.getDependency("bufferView",n).then(function(h){return new Promise(function(c,u){s.decodeDracoFile(h,function(d){for(const g in d.attributes){const p=d.attributes[g],b=A[g];b!==void 0&&(p.normalized=b)}c(d)},a,o,Z,u)})})}}class Bo{constructor(){this.name=M.KHR_TEXTURE_TRANSFORM}extendTexture(t,e){return(e.texCoord===void 0||e.texCoord===t.channel)&&e.offset===void 0&&e.rotation===void 0&&e.scale===void 0||(t=t.clone(),e.texCoord!==void 0&&(t.channel=e.texCoord),e.offset!==void 0&&t.offset.fromArray(e.offset),e.rotation!==void 0&&(t.rotation=e.rotation),e.scale!==void 0&&t.repeat.fromArray(e.scale),t.needsUpdate=!0),t}}class Co{constructor(){this.name=M.KHR_MESH_QUANTIZATION}}class hr extends Pe{constructor(t,e,i,s){super(t,e,i,s)}copySampleValue_(t){const e=this.resultBuffer,i=this.sampleValues,s=this.valueSize,n=t*s*3+s;for(let r=0;r!==s;r++)e[r]=i[n+r];return e}interpolate_(t,e,i,s){const n=this.resultBuffer,r=this.sampleValues,a=this.valueSize,A=a*2,o=a*3,h=s-e,c=(i-e)/h,u=c*c,d=u*c,g=t*o,p=g-o,b=-2*d+3*u,f=d-u,m=1-b,C=f-u+c;for(let B=0;B!==a;B++){const E=r[p+B+a],Q=r[p+B+A]*h,y=r[g+B+a],x=r[g+B]*h;n[B]=m*E+C*Q+b*y+f*x}return n}}const Eo=new Ut;class yo extends hr{interpolate_(t,e,i,s){const n=super.interpolate_(t,e,i,s);return Eo.fromArray(n).normalize().toArray(n),n}}const rt={FLOAT:5126,FLOAT_MAT3:35675,FLOAT_MAT4:35676,FLOAT_VEC2:35664,FLOAT_VEC3:35665,FLOAT_VEC4:35666,LINEAR:9729,REPEAT:10497,SAMPLER_2D:35678,POINTS:0,LINES:1,LINE_LOOP:2,LINE_STRIP:3,TRIANGLES:4,TRIANGLE_STRIP:5,TRIANGLE_FAN:6,UNSIGNED_BYTE:5121,UNSIGNED_SHORT:5123},Me={5120:Int8Array,5121:Uint8Array,5122:Int16Array,5123:Uint16Array,5125:Uint32Array,5126:Float32Array},cr={9728:Rt,9729:Lt,9984:tn,9985:oa,9986:Aa,9987:ke},lr={33071:Vt,33648:Di,10497:Fe},_s={SCALAR:1,VEC2:2,VEC3:3,VEC4:4,MAT2:4,MAT3:9,MAT4:16},Rs={POSITION:"position",NORMAL:"normal",TANGENT:"tangent",TEXCOORD_0:"uv",TEXCOORD_1:"uv1",TEXCOORD_2:"uv2",TEXCOORD_3:"uv3",COLOR_0:"color",WEIGHTS_0:"skinWeight",JOINTS_0:"skinIndex"},Jt={scale:"scale",translation:"position",rotation:"quaternion",weights:"morphTargetInfluences"},Qo={CUBICSPLINE:void 0,LINEAR:_e,STEP:De},Ls={OPAQUE:"OPAQUE",MASK:"MASK",BLEND:"BLEND"};function xo(l){return l.DefaultMaterial===void 0&&(l.DefaultMaterial=new Qs({color:16777215,emissive:0,metalness:1,roughness:1,transparent:!1,depthTest:!0,side:We})),l.DefaultMaterial}function se(l,t,e){for(const i in e.extensions)l[i]===void 0&&(t.userData.gltfExtensions=t.userData.gltfExtensions||{},t.userData.gltfExtensions[i]=e.extensions[i])}function bt(l,t){t.extras!==void 0&&(typeof t.extras=="object"?Object.assign(l.userData,t.extras):console.warn("THREE.GLTFLoader: Ignoring primitive type .extras, "+t.extras))}function wo(l,t,e){let i=!1,s=!1,n=!1;for(let o=0,h=t.length;o<h;o++){const c=t[o];if(c.POSITION!==void 0&&(i=!0),c.NORMAL!==void 0&&(s=!0),c.COLOR_0!==void 0&&(n=!0),i&&s&&n)break}if(!i&&!s&&!n)return Promise.resolve(l);const r=[],a=[],A=[];for(let o=0,h=t.length;o<h;o++){const c=t[o];if(i){const u=c.POSITION!==void 0?e.getDependency("accessor",c.POSITION):l.attributes.position;r.push(u)}if(s){const u=c.NORMAL!==void 0?e.getDependency("accessor",c.NORMAL):l.attributes.normal;a.push(u)}if(n){const u=c.COLOR_0!==void 0?e.getDependency("accessor",c.COLOR_0):l.attributes.color;A.push(u)}}return Promise.all([Promise.all(r),Promise.all(a),Promise.all(A)]).then(function(o){const h=o[0],c=o[1],u=o[2];return i&&(l.morphAttributes.position=h),s&&(l.morphAttributes.normal=c),n&&(l.morphAttributes.color=u),l.morphTargetsRelative=!0,l})}function Mo(l,t){if(l.updateMorphTargets(),t.weights!==void 0)for(let e=0,i=t.weights.length;e<i;e++)l.morphTargetInfluences[e]=t.weights[e];if(t.extras&&Array.isArray(t.extras.targetNames)){const e=t.extras.targetNames;if(l.morphTargetInfluences.length===e.length){l.morphTargetDictionary={};for(let i=0,s=e.length;i<s;i++)l.morphTargetDictionary[e[i]]=i}else console.warn("THREE.GLTFLoader: Invalid extras.targetNames length. Ignoring names.")}}function So(l){let t;const e=l.extensions&&l.extensions[M.KHR_DRACO_MESH_COMPRESSION];if(e?t="draco:"+e.bufferView+":"+e.indices+":"+Gs(e.attributes):t=l.indices+":"+Gs(l.attributes)+":"+l.mode,l.targets!==void 0)for(let i=0,s=l.targets.length;i<s;i++)t+=":"+Gs(l.targets[i]);return t}function Gs(l){let t="";const e=Object.keys(l).sort();for(let i=0,s=e.length;i<s;i++)t+=e[i]+":"+l[e[i]]+";";return t}function Ns(l){switch(l){case Int8Array:return 1/127;case Uint8Array:return 1/255;case Int16Array:return 1/32767;case Uint16Array:return 1/65535;default:throw new Error("THREE.GLTFLoader: Unsupported normalized accessor component type.")}}function Fo(l){return l.search(/\.jpe?g($|\?)/i)>0||l.search(/^data\:image\/jpeg/)===0?"image/jpeg":l.search(/\.webp($|\?)/i)>0||l.search(/^data\:image\/webp/)===0?"image/webp":l.search(/\.ktx2($|\?)/i)>0||l.search(/^data\:image\/ktx2/)===0?"image/ktx2":"image/png"}const ko=new S;class To{constructor(t={},e={}){this.json=t,this.extensions={},this.plugins={},this.options=e,this.cache=new ZA,this.associations=new Map,this.primitiveCache={},this.nodeCache={},this.meshCache={refs:{},uses:{}},this.cameraCache={refs:{},uses:{}},this.lightCache={refs:{},uses:{}},this.sourceCache={},this.textureCache={},this.nodeNamesUsed={};let i=!1,s=-1,n=!1,r=-1;if(typeof navigator<"u"){const a=navigator.userAgent;i=/^((?!chrome|android).)*safari/i.test(a)===!0;const A=a.match(/Version\/(\d+)/);s=i&&A?parseInt(A[1],10):-1,n=a.indexOf("Firefox")>-1,r=n?a.match(/Firefox\/([0-9]+)\./)[1]:-1}typeof createImageBitmap>"u"||i&&s<17||n&&r<98?this.textureLoader=new DA(this.options.manager):this.textureLoader=new zA(this.options.manager),this.textureLoader.setCrossOrigin(this.options.crossOrigin),this.textureLoader.setRequestHeader(this.options.requestHeader),this.fileLoader=new ie(this.options.manager),this.fileLoader.setResponseType("arraybuffer"),this.options.crossOrigin==="use-credentials"&&this.fileLoader.setWithCredentials(!0)}setExtensions(t){this.extensions=t}setPlugins(t){this.plugins=t}parse(t,e){const i=this,s=this.json,n=this.extensions;this.cache.removeAll(),this.nodeCache={},this._invokeAll(function(r){return r._markDefs&&r._markDefs()}),Promise.all(this._invokeAll(function(r){return r.beforeRoot&&r.beforeRoot()})).then(function(){return Promise.all([i.getDependencies("scene"),i.getDependencies("animation"),i.getDependencies("camera")])}).then(function(r){const a={scene:r[0][s.scene||0],scenes:r[0],animations:r[1],cameras:r[2],asset:s.asset,parser:i,userData:{}};return se(n,a,s),bt(a,s),Promise.all(i._invokeAll(function(A){return A.afterRoot&&A.afterRoot(a)})).then(function(){for(const A of a.scenes)A.updateMatrixWorld();t(a)})}).catch(e)}_markDefs(){const t=this.json.nodes||[],e=this.json.skins||[],i=this.json.meshes||[];for(let s=0,n=e.length;s<n;s++){const r=e[s].joints;for(let a=0,A=r.length;a<A;a++)t[r[a]].isBone=!0}for(let s=0,n=t.length;s<n;s++){const r=t[s];r.mesh!==void 0&&(this._addNodeRef(this.meshCache,r.mesh),r.skin!==void 0&&(i[r.mesh].isSkinnedMesh=!0)),r.camera!==void 0&&this._addNodeRef(this.cameraCache,r.camera)}}_addNodeRef(t,e){e!==void 0&&(t.refs[e]===void 0&&(t.refs[e]=t.uses[e]=0),t.refs[e]++)}_getNodeRef(t,e,i){if(t.refs[e]<=1)return i;const s=i.clone(),n=(r,a)=>{const A=this.associations.get(r);A!=null&&this.associations.set(a,A);for(const[o,h]of r.children.entries())n(h,a.children[o])};return n(i,s),s.name+="_instance_"+t.uses[e]++,s}_invokeOne(t){const e=Object.values(this.plugins);e.push(this);for(let i=0;i<e.length;i++){const s=t(e[i]);if(s)return s}return null}_invokeAll(t){const e=Object.values(this.plugins);e.unshift(this);const i=[];for(let s=0;s<e.length;s++){const n=t(e[s]);n&&i.push(n)}return i}getDependency(t,e){const i=t+":"+e;let s=this.cache.get(i);if(!s){switch(t){case"scene":s=this.loadScene(e);break;case"node":s=this._invokeOne(function(n){return n.loadNode&&n.loadNode(e)});break;case"mesh":s=this._invokeOne(function(n){return n.loadMesh&&n.loadMesh(e)});break;case"accessor":s=this.loadAccessor(e);break;case"bufferView":s=this._invokeOne(function(n){return n.loadBufferView&&n.loadBufferView(e)});break;case"buffer":s=this.loadBuffer(e);break;case"material":s=this._invokeOne(function(n){return n.loadMaterial&&n.loadMaterial(e)});break;case"texture":s=this._invokeOne(function(n){return n.loadTexture&&n.loadTexture(e)});break;case"skin":s=this.loadSkin(e);break;case"animation":s=this._invokeOne(function(n){return n.loadAnimation&&n.loadAnimation(e)});break;case"camera":s=this.loadCamera(e);break;default:if(s=this._invokeOne(function(n){return n!=this&&n.getDependency&&n.getDependency(t,e)}),!s)throw new Error("Unknown type: "+t);break}this.cache.add(i,s)}return s}getDependencies(t){let e=this.cache.get(t);if(!e){const i=this,s=this.json[t+(t==="mesh"?"es":"s")]||[];e=Promise.all(s.map(function(n,r){return i.getDependency(t,r)})),this.cache.add(t,e)}return e}loadBuffer(t){const e=this.json.buffers[t],i=this.fileLoader;if(e.type&&e.type!=="arraybuffer")throw new Error("THREE.GLTFLoader: "+e.type+" buffer type is not supported.");if(e.uri===void 0&&t===0)return Promise.resolve(this.extensions[M.KHR_BINARY_GLTF].body);const s=this.options;return new Promise(function(n,r){i.load(Je.resolveURL(e.uri,s.path),n,void 0,function(){r(new Error('THREE.GLTFLoader: Failed to load buffer "'+e.uri+'".'))})})}loadBufferView(t){const e=this.json.bufferViews[t];return this.getDependency("buffer",e.buffer).then(function(i){const s=e.byteLength||0,n=e.byteOffset||0;return i.slice(n,n+s)})}loadAccessor(t){const e=this,i=this.json,s=this.json.accessors[t];if(s.bufferView===void 0&&s.sparse===void 0){const r=_s[s.type],a=Me[s.componentType],A=s.normalized===!0,o=new a(s.count*r);return Promise.resolve(new et(o,r,A))}const n=[];return s.bufferView!==void 0?n.push(this.getDependency("bufferView",s.bufferView)):n.push(null),s.sparse!==void 0&&(n.push(this.getDependency("bufferView",s.sparse.indices.bufferView)),n.push(this.getDependency("bufferView",s.sparse.values.bufferView))),Promise.all(n).then(function(r){const a=r[0],A=_s[s.type],o=Me[s.componentType],h=o.BYTES_PER_ELEMENT,c=h*A,u=s.byteOffset||0,d=s.bufferView!==void 0?i.bufferViews[s.bufferView].byteStride:void 0,g=s.normalized===!0;let p,b;if(d&&d!==c){const f=Math.floor(u/d),m="InterleavedBuffer:"+s.bufferView+":"+s.componentType+":"+f+":"+s.count;let C=e.cache.get(m);C||(p=new o(a,f*d,s.count*d/h),C=new nA(p,d/h),e.cache.add(m,C)),b=new gs(C,A,u%d/h,g)}else a===null?p=new o(s.count*A):p=new o(a,u,s.count*A),b=new et(p,A,g);if(s.sparse!==void 0){const f=_s.SCALAR,m=Me[s.sparse.indices.componentType],C=s.sparse.indices.byteOffset||0,B=s.sparse.values.byteOffset||0,E=new m(r[1],C,s.sparse.count*f),Q=new o(r[2],B,s.sparse.count*A);a!==null&&(b=new et(b.array.slice(),b.itemSize,b.normalized)),b.normalized=!1;for(let y=0,x=E.length;y<x;y++){const F=E[y];if(b.setX(F,Q[y*A]),A>=2&&b.setY(F,Q[y*A+1]),A>=3&&b.setZ(F,Q[y*A+2]),A>=4&&b.setW(F,Q[y*A+3]),A>=5)throw new Error("THREE.GLTFLoader: Unsupported itemSize in sparse BufferAttribute.")}b.normalized=g}return b})}loadTexture(t){const e=this.json,i=this.options,n=e.textures[t].source,r=e.images[n];let a=this.textureLoader;if(r.uri){const A=i.manager.getHandler(r.uri);A!==null&&(a=A)}return this.loadTextureImage(t,n,a)}loadTextureImage(t,e,i){const s=this,n=this.json,r=n.textures[t],a=n.images[e],A=(a.uri||a.bufferView)+":"+r.sampler;if(this.textureCache[A])return this.textureCache[A];const o=this.loadImageSource(e,i).then(function(h){h.flipY=!1,h.name=r.name||a.name||"",h.name===""&&typeof a.uri=="string"&&a.uri.startsWith("data:image/")===!1&&(h.name=a.uri);const u=(n.samplers||{})[r.sampler]||{};return h.magFilter=cr[u.magFilter]||Lt,h.minFilter=cr[u.minFilter]||ke,h.wrapS=lr[u.wrapS]||Fe,h.wrapT=lr[u.wrapT]||Fe,h.generateMipmaps=!h.isCompressedTexture&&h.minFilter!==Rt&&h.minFilter!==Lt,s.associations.set(h,{textures:t}),h}).catch(function(){return null});return this.textureCache[A]=o,o}loadImageSource(t,e){const i=this,s=this.json,n=this.options;if(this.sourceCache[t]!==void 0)return this.sourceCache[t].then(c=>c.clone());const r=s.images[t],a=self.URL||self.webkitURL;let A=r.uri||"",o=!1;if(r.bufferView!==void 0)A=i.getDependency("bufferView",r.bufferView).then(function(c){o=!0;const u=new Blob([c],{type:r.mimeType});return A=a.createObjectURL(u),A});else if(r.uri===void 0)throw new Error("THREE.GLTFLoader: Image "+t+" is missing URI and bufferView");const h=Promise.resolve(A).then(function(c){return new Promise(function(u,d){let g=u;e.isImageBitmapLoader===!0&&(g=function(p){const b=new $(p);b.needsUpdate=!0,u(b)}),e.load(Je.resolveURL(c,n.path),g,void 0,d)})}).then(function(c){return o===!0&&a.revokeObjectURL(A),bt(c,r),c.userData.mimeType=r.mimeType||Fo(r.uri),c}).catch(function(c){throw console.error("THREE.GLTFLoader: Couldn't load texture",A),c});return this.sourceCache[t]=h,h}assignTexture(t,e,i,s){const n=this;return this.getDependency("texture",i.index).then(function(r){if(!r)return null;if(i.texCoord!==void 0&&i.texCoord>0&&(r=r.clone(),r.channel=i.texCoord),n.extensions[M.KHR_TEXTURE_TRANSFORM]){const a=i.extensions!==void 0?i.extensions[M.KHR_TEXTURE_TRANSFORM]:void 0;if(a){const A=n.associations.get(r);r=n.extensions[M.KHR_TEXTURE_TRANSFORM].extendTexture(r,a),n.associations.set(r,A)}}return s!==void 0&&(r.colorSpace=s),t[e]=r,r})}assignFinalMaterial(t){const e=t.geometry;let i=t.material;const s=e.attributes.tangent===void 0,n=e.attributes.color!==void 0,r=e.attributes.normal===void 0;if(t.isPoints){const a="PointsMaterial:"+i.uuid;let A=this.cache.get(a);A||(A=new Wn,Zt.prototype.copy.call(A,i),A.color.copy(i.color),A.map=i.map,A.sizeAttenuation=!1,this.cache.add(a,A)),i=A}else if(t.isLine){const a="LineBasicMaterial:"+i.uuid;let A=this.cache.get(a);A||(A=new jn,Zt.prototype.copy.call(A,i),A.color.copy(i.color),A.map=i.map,this.cache.add(a,A)),i=A}if(s||n||r){let a="ClonedMaterial:"+i.uuid+":";s&&(a+="derivative-tangents:"),n&&(a+="vertex-colors:"),r&&(a+="flat-shading:");let A=this.cache.get(a);A||(A=i.clone(),n&&(A.vertexColors=!0),r&&(A.flatShading=!0),s&&(A.normalScale&&(A.normalScale.y*=-1),A.clearcoatNormalScale&&(A.clearcoatNormalScale.y*=-1)),this.cache.add(a,A),this.associations.set(A,this.associations.get(i))),i=A}t.material=i}getMaterialType(){return Qs}loadMaterial(t){const e=this,i=this.json,s=this.extensions,n=i.materials[t];let r;const a={},A=n.extensions||{},o=[];if(A[M.KHR_MATERIALS_UNLIT]){const c=s[M.KHR_MATERIALS_UNLIT];r=c.getMaterialType(),o.push(c.extendParams(a,n,e))}else{const c=n.pbrMetallicRoughness||{};if(a.color=new v(1,1,1),a.opacity=1,Array.isArray(c.baseColorFactor)){const u=c.baseColorFactor;a.color.setRGB(u[0],u[1],u[2],Z),a.opacity=u[3]}c.baseColorTexture!==void 0&&o.push(e.assignTexture(a,"map",c.baseColorTexture,N)),a.metalness=c.metallicFactor!==void 0?c.metallicFactor:1,a.roughness=c.roughnessFactor!==void 0?c.roughnessFactor:1,c.metallicRoughnessTexture!==void 0&&(o.push(e.assignTexture(a,"metalnessMap",c.metallicRoughnessTexture)),o.push(e.assignTexture(a,"roughnessMap",c.metallicRoughnessTexture))),r=this._invokeOne(function(u){return u.getMaterialType&&u.getMaterialType(t)}),o.push(Promise.all(this._invokeAll(function(u){return u.extendMaterialParams&&u.extendMaterialParams(t,a)})))}n.doubleSided===!0&&(a.side=sa);const h=n.alphaMode||Ls.OPAQUE;if(h===Ls.BLEND?(a.transparent=!0,a.depthWrite=!1):(a.transparent=!1,h===Ls.MASK&&(a.alphaTest=n.alphaCutoff!==void 0?n.alphaCutoff:.5)),n.normalTexture!==void 0&&r!==be&&(o.push(e.assignTexture(a,"normalMap",n.normalTexture)),a.normalScale=new U(1,1),n.normalTexture.scale!==void 0)){const c=n.normalTexture.scale;a.normalScale.set(c,c)}if(n.occlusionTexture!==void 0&&r!==be&&(o.push(e.assignTexture(a,"aoMap",n.occlusionTexture)),n.occlusionTexture.strength!==void 0&&(a.aoMapIntensity=n.occlusionTexture.strength)),n.emissiveFactor!==void 0&&r!==be){const c=n.emissiveFactor;a.emissive=new v().setRGB(c[0],c[1],c[2],Z)}return n.emissiveTexture!==void 0&&r!==be&&o.push(e.assignTexture(a,"emissiveMap",n.emissiveTexture,N)),Promise.all(o).then(function(){const c=new r(a);return n.name&&(c.name=n.name),bt(c,n),e.associations.set(c,{materials:t}),n.extensions&&se(s,c,n),c})}createUniqueName(t){const e=R.sanitizeNodeName(t||"");return e in this.nodeNamesUsed?e+"_"+ ++this.nodeNamesUsed[e]:(this.nodeNamesUsed[e]=0,e)}loadGeometries(t){const e=this,i=this.extensions,s=this.primitiveCache;function n(a){return i[M.KHR_DRACO_MESH_COMPRESSION].decodePrimitive(a,e).then(function(A){return ur(A,a,e)})}const r=[];for(let a=0,A=t.length;a<A;a++){const o=t[a],h=So(o),c=s[h];if(c)r.push(c.promise);else{let u;o.extensions&&o.extensions[M.KHR_DRACO_MESH_COMPRESSION]?u=n(o):u=ur(new $t,o,e),s[h]={primitive:o,promise:u},r.push(u)}}return Promise.all(r)}loadMesh(t){const e=this,i=this.json,s=this.extensions,n=i.meshes[t],r=n.primitives,a=[];for(let A=0,o=r.length;A<o;A++){const h=r[A].material===void 0?xo(this.cache):this.getDependency("material",r[A].material);a.push(h)}return a.push(e.loadGeometries(r)),Promise.all(a).then(function(A){const o=A.slice(0,A.length-1),h=A[A.length-1],c=[];for(let d=0,g=h.length;d<g;d++){const p=h[d],b=r[d];let f;const m=o[d];if(b.mode===rt.TRIANGLES||b.mode===rt.TRIANGLE_STRIP||b.mode===rt.TRIANGLE_FAN||b.mode===void 0)f=n.isSkinnedMesh===!0?new aA(p,m):new fi(p,m),f.isSkinnedMesh===!0&&f.normalizeSkinWeights(),b.mode===rt.TRIANGLE_STRIP?f.geometry=ar(f.geometry,un):b.mode===rt.TRIANGLE_FAN&&(f.geometry=ar(f.geometry,zi));else if(b.mode===rt.LINES)f=new gA(p,m);else if(b.mode===rt.LINE_STRIP)f=new Es(p,m);else if(b.mode===rt.LINE_LOOP)f=new pA(p,m);else if(b.mode===rt.POINTS)f=new fA(p,m);else throw new Error("THREE.GLTFLoader: Primitive mode unsupported: "+b.mode);Object.keys(f.geometry.morphAttributes).length>0&&Mo(f,n),f.name=e.createUniqueName(n.name||"mesh_"+t),bt(f,n),b.extensions&&se(s,f,b),e.assignFinalMaterial(f),c.push(f)}for(let d=0,g=c.length;d<g;d++)e.associations.set(c[d],{meshes:t,primitives:d});if(c.length===1)return n.extensions&&se(s,c[0],n),c[0];const u=new ds;n.extensions&&se(s,u,n),e.associations.set(u,{meshes:t});for(let d=0,g=c.length;d<g;d++)u.add(c[d]);return u})}loadCamera(t){let e;const i=this.json.cameras[t],s=i[i.type];if(!s){console.warn("THREE.GLTFLoader: Missing camera parameters.");return}return i.type==="perspective"?e=new us(Ga.radToDeg(s.yfov),s.aspectRatio||1,s.znear||1,s.zfar||2e6):i.type==="orthographic"&&(e=new rr(-s.xmag,s.xmag,s.ymag,-s.ymag,s.znear,s.zfar)),i.name&&(e.name=this.createUniqueName(i.name)),bt(e,i),Promise.resolve(e)}loadSkin(t){const e=this.json.skins[t],i=[];for(let s=0,n=e.joints.length;s<n;s++)i.push(this._loadNodeShallow(e.joints[s]));return e.inverseBindMatrices!==void 0?i.push(this.getDependency("accessor",e.inverseBindMatrices)):i.push(null),Promise.all(i).then(function(s){const n=s.pop(),r=s,a=[],A=[];for(let o=0,h=r.length;o<h;o++){const c=r[o];if(c){a.push(c);const u=new S;n!==null&&u.fromArray(n.array,o*16),A.push(u)}else console.warn('THREE.GLTFLoader: Joint "%s" could not be found.',e.joints[o])}return new ms(a,A)})}loadAnimation(t){const e=this.json,i=this,s=e.animations[t],n=s.name?s.name:"animation_"+t,r=[],a=[],A=[],o=[],h=[];for(let c=0,u=s.channels.length;c<u;c++){const d=s.channels[c],g=s.samplers[d.sampler],p=d.target,b=p.node,f=s.parameters!==void 0?s.parameters[g.input]:g.input,m=s.parameters!==void 0?s.parameters[g.output]:g.output;p.node!==void 0&&(r.push(this.getDependency("node",b)),a.push(this.getDependency("accessor",f)),A.push(this.getDependency("accessor",m)),o.push(g),h.push(p))}return Promise.all([Promise.all(r),Promise.all(a),Promise.all(A),Promise.all(o),Promise.all(h)]).then(function(c){const u=c[0],d=c[1],g=c[2],p=c[3],b=c[4],f=[];for(let C=0,B=u.length;C<B;C++){const E=u[C],Q=d[C],y=g[C],x=p[C],F=b[C];if(E===void 0)continue;E.updateMatrix&&E.updateMatrix();const k=i._createAnimationTracks(E,Q,y,x,F);if(k)for(let T=0;T<k.length;T++)f.push(k[T])}const m=new xA(n,void 0,f);return bt(m,s),m})}createNodeMesh(t){const e=this.json,i=this,s=e.nodes[t];return s.mesh===void 0?null:i.getDependency("mesh",s.mesh).then(function(n){const r=i._getNodeRef(i.meshCache,s.mesh,n);return s.weights!==void 0&&r.traverse(function(a){if(a.isMesh)for(let A=0,o=s.weights.length;A<o;A++)a.morphTargetInfluences[A]=s.weights[A]}),r})}loadNode(t){const e=this.json,i=this,s=e.nodes[t],n=i._loadNodeShallow(t),r=[],a=s.children||[];for(let o=0,h=a.length;o<h;o++)r.push(i.getDependency("node",a[o]));const A=s.skin===void 0?Promise.resolve(null):i.getDependency("skin",s.skin);return Promise.all([n,Promise.all(r),A]).then(function(o){const h=o[0],c=o[1],u=o[2];u!==null&&h.traverse(function(d){d.isSkinnedMesh&&d.bind(u,ko)});for(let d=0,g=c.length;d<g;d++)h.add(c[d]);return h})}_loadNodeShallow(t){const e=this.json,i=this.extensions,s=this;if(this.nodeCache[t]!==void 0)return this.nodeCache[t];const n=e.nodes[t],r=n.name?s.createUniqueName(n.name):"",a=[],A=s._invokeOne(function(o){return o.createNodeMesh&&o.createNodeMesh(t)});return A&&a.push(A),n.camera!==void 0&&a.push(s.getDependency("camera",n.camera).then(function(o){return s._getNodeRef(s.cameraCache,n.camera,o)})),s._invokeAll(function(o){return o.createNodeAttachment&&o.createNodeAttachment(t)}).forEach(function(o){a.push(o)}),this.nodeCache[t]=Promise.all(a).then(function(o){let h;if(n.isBone===!0?h=new Hn:o.length>1?h=new ds:o.length===1?h=o[0]:h=new z,h!==o[0])for(let c=0,u=o.length;c<u;c++)h.add(o[c]);if(n.name&&(h.userData.name=n.name,h.name=r),bt(h,n),n.extensions&&se(i,h,n),n.matrix!==void 0){const c=new S;c.fromArray(n.matrix),h.applyMatrix4(c)}else n.translation!==void 0&&h.position.fromArray(n.translation),n.rotation!==void 0&&h.quaternion.fromArray(n.rotation),n.scale!==void 0&&h.scale.fromArray(n.scale);if(!s.associations.has(h))s.associations.set(h,{});else if(n.mesh!==void 0&&s.meshCache.refs[n.mesh]>1){const c=s.associations.get(h);s.associations.set(h,{...c})}return s.associations.get(h).nodes=t,h}),this.nodeCache[t]}loadScene(t){const e=this.extensions,i=this.json.scenes[t],s=this,n=new ds;i.name&&(n.name=s.createUniqueName(i.name)),bt(n,i),i.extensions&&se(e,n,i);const r=i.nodes||[],a=[];for(let A=0,o=r.length;A<o;A++)a.push(s.getDependency("node",r[A]));return Promise.all(a).then(function(A){for(let h=0,c=A.length;h<c;h++)n.add(A[h]);const o=h=>{const c=new Map;for(const[u,d]of s.associations)(u instanceof Zt||u instanceof $)&&c.set(u,d);return h.traverse(u=>{const d=s.associations.get(u);d!=null&&c.set(u,d)}),c};return s.associations=o(n),n})}_createAnimationTracks(t,e,i,s,n){const r=[],a=t.name?t.name:t.uuid,A=[];Jt[n.path]===Jt.weights?t.traverse(function(u){u.morphTargetInfluences&&A.push(u.name?u.name:u.uuid)}):A.push(a);let o;switch(Jt[n.path]){case Jt.weights:o=Ee;break;case Jt.rotation:o=ye;break;case Jt.translation:case Jt.scale:o=xe;break;default:switch(i.itemSize){case 1:o=Ee;break;case 2:case 3:default:o=xe;break}break}const h=s.interpolation!==void 0?Qo[s.interpolation]:_e,c=this._getArrayFromAccessor(i);for(let u=0,d=A.length;u<d;u++){const g=new o(A[u]+"."+Jt[n.path],e.array,c,h);s.interpolation==="CUBICSPLINE"&&this._createCubicSplineTrackInterpolant(g),r.push(g)}return r}_getArrayFromAccessor(t){let e=t.array;if(t.normalized){const i=Ns(e.constructor),s=new Float32Array(e.length);for(let n=0,r=e.length;n<r;n++)s[n]=e[n]*i;e=s}return e}_createCubicSplineTrackInterpolant(t){t.createInterpolant=function(i){const s=this instanceof ye?yo:hr;return new s(this.times,this.values,this.getValueSize()/3,i)},t.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline=!0}}function Do(l,t,e){const i=t.attributes,s=new yt;if(i.POSITION!==void 0){const a=e.json.accessors[i.POSITION],A=a.min,o=a.max;if(A!==void 0&&o!==void 0){if(s.set(new I(A[0],A[1],A[2]),new I(o[0],o[1],o[2])),a.normalized){const h=Ns(Me[a.componentType]);s.min.multiplyScalar(h),s.max.multiplyScalar(h)}}else{console.warn("THREE.GLTFLoader: Missing min/max properties for accessor POSITION.");return}}else return;const n=t.targets;if(n!==void 0){const a=new I,A=new I;for(let o=0,h=n.length;o<h;o++){const c=n[o];if(c.POSITION!==void 0){const u=e.json.accessors[c.POSITION],d=u.min,g=u.max;if(d!==void 0&&g!==void 0){if(A.setX(Math.max(Math.abs(d[0]),Math.abs(g[0]))),A.setY(Math.max(Math.abs(d[1]),Math.abs(g[1]))),A.setZ(Math.max(Math.abs(d[2]),Math.abs(g[2]))),u.normalized){const p=Ns(Me[u.componentType]);A.multiplyScalar(p)}a.max(A)}else console.warn("THREE.GLTFLoader: Missing min/max properties for accessor POSITION.")}}s.expandByVector(a)}l.boundingBox=s;const r=new pt;s.getCenter(r.center),r.radius=s.min.distanceTo(s.max)/2,l.boundingSphere=r}function ur(l,t,e){const i=t.attributes,s=[];function n(r,a){return e.getDependency("accessor",r).then(function(A){l.setAttribute(a,A)})}for(const r in i){const a=Rs[r]||r.toLowerCase();a in l.attributes||s.push(n(i[r],a))}if(t.indices!==void 0&&!l.index){const r=e.getDependency("accessor",t.indices).then(function(a){l.setIndex(a)});s.push(r)}return K.workingColorSpace!==Z&&"COLOR_0"in i&&console.warn(`THREE.GLTFLoader: Converting vertex colors from "srgb-linear" to "${K.workingColorSpace}" not supported.`),bt(l,t),Do(l,t,e),Promise.all(s).then(function(){return t.targets!==void 0?wo(l,t.targets,e):l})}class _o{constructor(t=4){this.pool=t,this.queue=[],this.workers=[],this.workersResolve=[],this.workerStatus=0,this.workerCreator=null}_initWorker(t){if(!this.workers[t]){const e=this.workerCreator();e.addEventListener("message",this._onMessage.bind(this,t)),this.workers[t]=e}}_getIdleWorker(){for(let t=0;t<this.pool;t++)if(!(this.workerStatus&1<<t))return t;return-1}_onMessage(t,e){const i=this.workersResolve[t];if(i&&i(e),this.queue.length){const{resolve:s,msg:n,transfer:r}=this.queue.shift();this.workersResolve[t]=s,this.workers[t].postMessage(n,r)}else this.workerStatus^=1<<t}setWorkerCreator(t){this.workerCreator=t}setWorkerLimit(t){this.pool=t}postMessage(t,e){return new Promise(i=>{const s=this._getIdleWorker();s!==-1?(this._initWorker(s),this.workerStatus|=1<<s,this.workersResolve[s]=i,this.workers[s].postMessage(t,e)):this.queue.push({resolve:i,msg:t,transfer:e})})}dispose(){this.workers.forEach(t=>t.terminate()),this.workersResolve.length=0,this.workers.length=0,this.queue.length=0,this.workerStatus=0}}const Ro=0,dr=2,Lo=1,gr=2,Go=0,No=1,Uo=10,zo=0,pr=9,fr=15,br=16,mr=22,Ir=37,Br=43,Cr=76,Er=83,yr=97,Qr=100,xr=103,wr=109,Mr=122,Sr=123,Fr=131,kr=132,Tr=133,Dr=134,_r=137,Rr=138,Lr=139,Gr=140,Nr=141,Ur=142,zr=145,vr=146,Hr=148,Or=152,qr=157,Pr=158,jr=165,Jr=166,Vr=1000054e3,Kr=1000054001,Yr=1000054004,Wr=1000054005,Us=1000066e3,Xr=1000066004;class Ke{constructor(t,e,i,s){this._dataView=void 0,this._littleEndian=void 0,this._offset=void 0,this._dataView=new DataView(t.buffer,t.byteOffset+e,i),this._littleEndian=s,this._offset=0}_nextUint8(){const t=this._dataView.getUint8(this._offset);return this._offset+=1,t}_nextUint16(){const t=this._dataView.getUint16(this._offset,this._littleEndian);return this._offset+=2,t}_nextUint32(){const t=this._dataView.getUint32(this._offset,this._littleEndian);return this._offset+=4,t}_nextUint64(){const t=this._dataView.getUint32(this._offset,this._littleEndian)+4294967296*this._dataView.getUint32(this._offset+4,this._littleEndian);return this._offset+=8,t}_nextInt32(){const t=this._dataView.getInt32(this._offset,this._littleEndian);return this._offset+=4,t}_nextUint8Array(t){const e=new Uint8Array(this._dataView.buffer,this._dataView.byteOffset+this._offset,t);return this._offset+=t,e}_skip(t){return this._offset+=t,this}_scan(t,e=0){const i=this._offset;let s=0;for(;this._dataView.getUint8(this._offset)!==e&&s<t;)s++,this._offset++;return s<t&&this._offset++,new Uint8Array(this._dataView.buffer,this._dataView.byteOffset+i,s)}}const X=[171,75,84,88,32,50,48,187,13,10,26,10];function Zr(l){return new TextDecoder().decode(l)}function vo(l){const t=new Uint8Array(l.buffer,l.byteOffset,X.length);if(t[0]!==X[0]||t[1]!==X[1]||t[2]!==X[2]||t[3]!==X[3]||t[4]!==X[4]||t[5]!==X[5]||t[6]!==X[6]||t[7]!==X[7]||t[8]!==X[8]||t[9]!==X[9]||t[10]!==X[10]||t[11]!==X[11])throw new Error("Missing KTX 2.0 identifier.");const e={vkFormat:0,typeSize:1,pixelWidth:0,pixelHeight:0,pixelDepth:0,layerCount:0,faceCount:1,levelCount:0,supercompressionScheme:0,levels:[],dataFormatDescriptor:[{vendorId:0,descriptorType:0,versionNumber:2,colorModel:0,colorPrimaries:1,transferFunction:2,flags:0,texelBlockDimension:[0,0,0,0],bytesPlane:[0,0,0,0,0,0,0,0],samples:[]}],keyValue:{},globalData:null},i=17*Uint32Array.BYTES_PER_ELEMENT,s=new Ke(l,X.length,i,!0);e.vkFormat=s._nextUint32(),e.typeSize=s._nextUint32(),e.pixelWidth=s._nextUint32(),e.pixelHeight=s._nextUint32(),e.pixelDepth=s._nextUint32(),e.layerCount=s._nextUint32(),e.faceCount=s._nextUint32(),e.levelCount=s._nextUint32(),e.supercompressionScheme=s._nextUint32();const n=s._nextUint32(),r=s._nextUint32(),a=s._nextUint32(),A=s._nextUint32(),o=s._nextUint64(),h=s._nextUint64(),c=3*Math.max(e.levelCount,1)*8,u=new Ke(l,X.length+i,c,!0);for(let G=0,O=Math.max(e.levelCount,1);G<O;G++)e.levels.push({levelData:new Uint8Array(l.buffer,l.byteOffset+u._nextUint64(),u._nextUint64()),uncompressedByteLength:u._nextUint64()});const d=new Ke(l,n,r,!0);d._skip(4);const g=d._nextUint16(),p=d._nextUint16(),b=d._nextUint16(),f=d._nextUint16(),m={vendorId:g,descriptorType:p,versionNumber:b,colorModel:d._nextUint8(),colorPrimaries:d._nextUint8(),transferFunction:d._nextUint8(),flags:d._nextUint8(),texelBlockDimension:[d._nextUint8(),d._nextUint8(),d._nextUint8(),d._nextUint8()],bytesPlane:[d._nextUint8(),d._nextUint8(),d._nextUint8(),d._nextUint8(),d._nextUint8(),d._nextUint8(),d._nextUint8(),d._nextUint8()],samples:[]},C=(f/4-6)/4;for(let G=0;G<C;G++){const O={bitOffset:d._nextUint16(),bitLength:d._nextUint8(),channelType:d._nextUint8(),samplePosition:[d._nextUint8(),d._nextUint8(),d._nextUint8(),d._nextUint8()],sampleLower:Number.NEGATIVE_INFINITY,sampleUpper:Number.POSITIVE_INFINITY};64&O.channelType?(O.sampleLower=d._nextInt32(),O.sampleUpper=d._nextInt32()):(O.sampleLower=d._nextUint32(),O.sampleUpper=d._nextUint32()),m.samples[G]=O}e.dataFormatDescriptor.length=0,e.dataFormatDescriptor.push(m);const B=new Ke(l,a,A,!0);for(;B._offset<A;){const G=B._nextUint32(),O=B._scan(G),gt=Zr(O);if(e.keyValue[gt]=B._nextUint8Array(G-O.byteLength-1),gt.match(/^ktx/i)){const Ti=Zr(e.keyValue[gt]);e.keyValue[gt]=Ti.substring(0,Ti.lastIndexOf("\0"))}B._skip(G%4?4-G%4:0)}if(h<=0)return e;const E=new Ke(l,o,h,!0),Q=E._nextUint16(),y=E._nextUint16(),x=E._nextUint32(),F=E._nextUint32(),k=E._nextUint32(),T=E._nextUint32(),P=[];for(let G=0,O=Math.max(e.levelCount,1);G<O;G++)P.push({imageFlags:E._nextUint32(),rgbSliceByteOffset:E._nextUint32(),rgbSliceByteLength:E._nextUint32(),alphaSliceByteOffset:E._nextUint32(),alphaSliceByteLength:E._nextUint32()});const L=o+E._offset,j=L+x,mt=j+F,st=mt+k,Dt=new Uint8Array(l.buffer,l.byteOffset+L,x),It=new Uint8Array(l.buffer,l.byteOffset+j,F),Bt=new Uint8Array(l.buffer,l.byteOffset+mt,k),_t=new Uint8Array(l.buffer,l.byteOffset+st,T);return e.globalData={endpointCount:Q,selectorCount:y,imageDescs:P,endpointsData:Dt,selectorsData:It,tablesData:Bt,extendedData:_t},e}let zs,Tt,vs;const Hs={env:{emscripten_notify_memory_growth:function(l){vs=new Uint8Array(Tt.exports.memory.buffer)}}};class Ho{init(){return zs||(zs=typeof fetch<"u"?fetch("data:application/wasm;base64,"+$r).then(t=>t.arrayBuffer()).then(t=>WebAssembly.instantiate(t,Hs)).then(this._init):WebAssembly.instantiate(Buffer.from($r,"base64"),Hs).then(this._init),zs)}_init(t){Tt=t.instance,Hs.env.emscripten_notify_memory_growth(0)}decode(t,e=0){if(!Tt)throw new Error("ZSTDDecoder: Await .init() before decoding.");const i=t.byteLength,s=Tt.exports.malloc(i);vs.set(t,s),e=e||Number(Tt.exports.ZSTD_findDecompressedSize(s,i));const n=Tt.exports.malloc(e),r=Tt.exports.ZSTD_decompress(n,e,s,i),a=vs.slice(n,n+r);return Tt.exports.free(s),Tt.exports.free(n),a}}const $r="AGFzbQEAAAABpQEVYAF/AX9gAn9/AGADf39/AX9gBX9/f39/AX9gAX8AYAJ/fwF/YAR/f39/AX9gA39/fwBgBn9/f39/fwF/YAd/f39/f39/AX9gAn9/AX5gAn5+AX5gAABgBX9/f39/AGAGf39/f39/AGAIf39/f39/f38AYAl/f39/f39/f38AYAABf2AIf39/f39/f38Bf2ANf39/f39/f39/f39/fwF/YAF/AX4CJwEDZW52H2Vtc2NyaXB0ZW5fbm90aWZ5X21lbW9yeV9ncm93dGgABANpaAEFAAAFAgEFCwACAQABAgIFBQcAA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LQAAOgAAIAINAAsMAgsgAkEDTQ0AIAIhBANAIAMgASgCADYCACABQQRqIQEgA0EEaiEDIARBfGoiBEEDSw0ACyACQQNxIQILIAJFDQADQCADIAEtAAA6AAAgA0EBaiEDIAFBAWohASACQX9qIgINAAsLIAAL8wICAn8BfgJAIAJFDQAgACACaiIDQX9qIAE6AAAgACABOgAAIAJBA0kNACADQX5qIAE6AAAgACABOgABIANBfWogAToAACAAIAE6AAIgAkEHSQ0AIANBfGogAToAACAAIAE6AAMgAkEJSQ0AIABBACAAa0EDcSIEaiIDIAFB/wFxQYGChAhsIgE2AgAgAyACIARrQXxxIgRqIgJBfGogATYCACAEQQlJDQAgAyABNgIIIAMgATYCBCACQXhqIAE2AgAgAkF0aiABNgIAIARBGUkNACADIAE2AhggAyABNgIUIAMgATYCECADIAE2AgwgAkFwaiABNgIAIAJBbGogATYCACACQWhqIAE2AgAgAkFkaiABNgIAIAQgA0EEcUEYciIEayICQSBJDQAgAa0iBUIghiAFhCEFIAMgBGohAQNAIAEgBTcDGCABIAU3AxAgASAFNwMIIAEgBTcDACABQSBqIQEgAkFgaiICQR9LDQALCyAACy8BAn8gACgCBCAAKAIAQQJ0aiICLQACIQMgACACLwEAIAEgAi0AAxAIajYCACADCy8BAn8gACgCBCAAKAIAQQJ0aiICLQACIQMgACACLwEAIAEgAi0AAxAFajYCACADCx8AIAAgASACKAIEEAg2AgAgARAEGiAAIAJBCGo2AgQLCAAgAGdBH3MLugUBDX8jAEEQayIKJAACfyAEQQNNBEAgCkEANgIMIApBDGogAyAEEAsaIAAgASACIApBDGpBBBAVIgBBbCAAEAMbIAAgACAESxsMAQsgAEEAIAEoAgBBAXRBAmoQECENQVQgAygAACIGQQ9xIgBBCksNABogAiAAQQVqNgIAIAMgBGoiAkF8aiEMIAJBeWohDiACQXtqIRAgAEEGaiELQQQhBSAGQQR2IQRBICAAdCIAQQFyIQkgASgCACEPQQAhAiADIQYCQANAIAlBAkggAiAPS3JFBEAgAiEHAkAgCARA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IaiECIABBCGoiACABSQ0ACwwFCyAAIAFLBEAgACEBDAQLIARBAUcgACACa0EPSnINASAAIQMgAiEEA0AgAyAEEAwgBEEIaiEEIANBCGoiAyABSQ0ACwwCCwNAIAAgAhAHIAJBEGohAiAAQRBqIgAgAUkNAAsMAwsgACEDIAIhBANAIAMgBBAHIARBEGohBCADQRBqIgMgAUkNAAsLIAIgASAAa2ohAgsDQCABIAVPDQEgASACLQAAOgAAIAFBAWohASACQQFqIQIMAAALAAsLQQECfyAAIAAoArjgASIDNgLE4AEgACgCvOABIQQgACABNgK84AEgACABIAJqNgK44AEgACABIAQgA2tqNgLA4AELpgEBAX8gACAAKALs4QEQFjYCyOABIABCADcD+OABIABCADcDuOABIABBwOABakIANwMAIABBqNAAaiIBQYyAgOAANgIAIABBADYCmOIBIABCADcDiOEBIABCAzcDgOEBIABBrNABakHgEikCADcCACAAQbTQAWpB6BIoAgA2AgAgACABNgIMIAAgAEGYIGo2AgggACAAQaAwajYCBCAAIABBEGo2AgALYQEBf0G4fyEDAkAgAUEDSQ0AIAIgABAhIgFBA3YiADYCCCACIAFBAXE2AgQgAiABQQF2QQNxIgM2AgACQCADQX9qIgFBAksNAAJAIAFBAWsOAgEAAgtBbA8LIAAhAwsgAwsMACAAIAEgAkEAEC4LiAQCA38CfiADEBYhBCAAQQBBKBAQIQAgBCACSwRAIAQPCyABRQRAQX8PCwJAAkAgA0EBRg0AIAEoAAAiBkGo6r5pRg0AQXYhAyAGQXBxQdDUtMIBRw0BQQghAyACQQhJDQEgAEEAQSgQECEAIAEoAAQhASAAQQE2AhQgACABrTcDAEEADwsgASACIAMQLyIDIAJLDQAgACADNgIYQXIhAyABIARqIgVBf2otAAAiAkEIcQ0AIAJBIHEiBkUEQEFwIQMgBS0AACIFQacBSw0BIAVBB3GtQgEgBUEDdkEKaq2GIgdCA4h+IAd8IQggBEEBaiEECyACQQZ2IQMgAkECdiEFAkAgAkEDcUF/aiICQQJLBEBBACECDAELAkACQAJAIAJBAWsO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Q0ACyAEKAI4BEAgAkEDTQRAIABBuH8QGgwCCyADQQRqIQMLIAQoAighAiAEKQMYIQcgAEEANgIEIAAgAyABazYCACAAIAIgBmytIAcgB0J/URs3AwgLIARBQGskAAslAQF/IwBBEGsiAiQAIAIgACABEFEgAigCACEAIAJBEGokACAAC30BBH8jAEGQBGsiBCQAIARB/wE2AggCQCAEQRBqIARBCGogBEEMaiABIAIQFSIGEAMEQCAGIQUMAQtBVCEFIAQoAgwiB0EGSw0AIAMgBEEQaiAEKAIIIAcQQSIFEAMNACAAIAEgBmogAiAGayADEDwhBQsgBEGQBGokACAFC4cBAgJ/An5BABAWIQMCQANAIAEgA08EQAJAIAAoAABBcHFB0NS0wgFGBEAgACABECIiAhADRQ0BQn4PCyAAIAEQVSIEQn1WDQMgBCAFfCIFIARUIQJCfiEEIAINAyAAIAEQUiICEAMNAwsgASACayEBIAAgAmohAAwBCwtCfiAFIAEbIQQLIAQLPwIBfwF+IwBBMGsiAiQAAn5CfiACQQhqIAAgARAtDQAaQgAgAigCHEEBRg0AGiACKQMICyEDIAJBMGokACADC40BAQJ/IwBBMGsiASQAAkAgAEUNACAAKAKI4gENACABIABB/OEBaigCADYCKCABIAApAvThATcDICAAEDAgACgCqOIBIQIgASABKAIoNgIYIAEgASkDIDcDECACIAFBEGoQGyAAQQA2AqjiASABIAEoAig2AgggASABKQMgNwMAIAAgARAbCyABQTBqJAALKgECfyMAQRBrIgAkACAAQQA2AgggAEIANwMAIAAQWCEBIABBEGokACABC4cBAQN/IwBBEGsiAiQAAkAgACgCAEUgACgCBEVzDQAgAiAAKAIINgIIIAIgACkCADcDAAJ/IAIoAgAiAQRAIAIoAghBqOMJIAERBQAMAQtBqOMJECgLIgFFDQAgASAAKQIANwL04QEgAUH84QFqIAAoAgg2AgAgARBZIAEhAwsgAkEQaiQAIAMLywEBAn8jAEEgayIBJAAgAEGBgIDAADYCtOIBIABBADYCiOIBIABBADYC7OEBIABCADcDkOIBIABBADYCpOMJIABBADYC3OIBIABCADcCzOIBIABBADYCvOIBIABBADYCxOABIABCADcCnOIBIABBpOIBakIANwIAIABBrOIBakEANgIAIAFCADcCECABQgA3AhggASABKQMYNwMIIAEgASkDEDcDACABKAIIQQh2QQFxIQIgAEEANgLg4gEgACACNgKM4gEgAUEgaiQAC3YBA38jAEEwayIBJAAgAARAIAEgAEHE0AFqIgIoAgA2AiggASAAKQK80AE3AyAgACgCACEDIAEgAigCADYCGCABIAApArzQATcDECADIAFBEGoQGyABIAEoAig2AgggASABKQMgNwMAIAAgARAbCyABQTBqJAALzAEBAX8gACABKAK00AE2ApjiASAAIAEoAgQiAjYCwOABIAAgAjYCvOABIAAgAiABKAIIaiICNgK44AEgACACNgLE4AEgASgCuNABBEAgAEKBgICAEDcDiOEBIAAgAUGk0ABqNgIMIAAgAUGUIGo2AgggACABQZwwajYCBCAAIAFBDGo2AgAgAEGs0AFqIAFBqNABaigCADYCACAAQbDQAWogAUGs0AFqKAIANgIAIABBtNABaiABQbDQAWooAgA2AgAPCyAAQgA3A4jhAQs7ACACRQRAQbp/DwsgBEUEQEFsDwsgAiAEEGAEQCAAIAEgAiADIAQgBRBhDwsgACABIAIgAyAEIAUQZQtGAQF/IwBBEGsiBSQAIAVBCGogBBAOAn8gBS0ACQRAIAAgASACIAMgBBAyDAELIAAgASACIAMgBBA0CyEAIAVBEGokACAACzQAIAAgAyAEIAUQNiIFEAMEQCAFDwsgBSAESQR/IAEgAiADIAVqIAQgBWsgABA1BUG4fwsLRgEBfyMAQRBrIgUkACAFQQhqIAQQDgJ/IAUtAAkEQCAAIAEgAiADIAQQYgwBCyAAIAEgAiADIAQQNQshACAFQRBqJAAgAAtZAQF/QQ8hAiABIABJBEAgAUEEdCAAbiECCyAAQQh2IgEgAkEYbCIAQYwIaigCAGwgAEGICGooAgBqIgJBA3YgAmogAEGACGooAgAgAEGECGooAgAgAWxqSQs3ACAAIAMgBCAFQYAQEDMiBRADBEAgBQ8LIAUgBEkEfyABIAIgAyAFaiAEIAVr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h8AAAAAAAAGIgAAAAAAAQYlAAAAAAABBikAAAAAAAIGLwAAAAAAAwY7AAAAAAAEBlMAAAAAAAcGgwAAAAAACQYDAgAAEAAABAQAAAAAAAAEBQAAACAAAAUGAAAAAAAABQcAAAAgAAAFCQAAAAAAAAUKAAAAAAAABgwAAAAAAAAGDwAAAAAAAAYSAAAAAAAABhUAAAAAAAAGGAAAAAAAAAYbAAAAAAAABh4AAAAAAAAGIQAAAAAAAQYjAAAAAAABBicAAAAAAAIGKwAAAAAAAwYzAAAAAAAEBkMAAAAAAAUGYwAAAAAACAYDAQAAIAAABAQAAAAwAAAEBAAAABAAAAQFAAAAIAAABQcAAAAgAAAFCAAAACAAAAUKAAAAIAAABQsAAAAAAAAGDgAAAAAAAAYRAAAAAAAABhQAAAAAAAAGFwAAAAAAAAYaAAAAAAAABh0AAAAAAAAGIAAAAAAAEAYDAAEAAAAPBgOAAAAAAA4GA0AAAAAADQYDIAAAAAAMBgMQAAAAAAsGAwgAAAAACgYDBABBpB0L2QEBAAAAAwAAAAcAAAAPAAAAHwAAAD8AAAB/AAAA/wAAAP8BAAD/AwAA/wcAAP8PAAD/HwAA/z8AAP9/AAD//wAA//8BAP//AwD//wcA//8PAP//HwD//z8A//9/AP///wD///8B////A////wf///8P////H////z////9/AAAAAAEAAAACAAAABAAAAAAAAAACAAAABAAAAAgAAAAAAAAAAQAAAAIAAAABAAAABAAAAAQAAAAEAAAABAAAAAgAAAAIAAAACAAAAAcAAAAIAAAACQAAAAoAAAALAEGgIAsDwBBQ",Oo="display-p3",qo="display-p3-linear";({...K.spaces[N]});const Os=new WeakMap;let qs=0,Ps;class at extends jt{constructor(t){super(t),this.transcoderPath="",this.transcoderBinary=null,this.transcoderPending=null,this.workerPool=new _o,this.workerSourceURL="",this.workerConfig=null,typeof MSC_TRANSCODER<"u"&&console.warn('THREE.KTX2Loader: Please update to latest "basis_transcoder". "msc_basis_transcoder" is no longer supported in three.js r125+.')}setTranscoderPath(t){return this.transcoderPath=t,this}setWorkerLimit(t){return this.workerPool.setWorkerLimit(t),this}async detectSupportAsync(t){return this.workerConfig={astcSupported:await t.hasFeatureAsync("texture-compression-astc"),astcHDRSupported:!1,etc1Supported:await t.hasFeatureAsync("texture-compression-etc2"),etc2Supported:await t.hasFeatureAsync("texture-compression-etc2"),dxtSupported:await t.hasFeatureAsync("texture-compression-bc"),bptcSupported:await t.hasFeatureAsync("texture-compression-bc"),pvrtcSupported:await t.hasFeatureAsync("texture-compression-pvrtc")},this}detectSupport(t){return t.isWebGPURenderer===!0?this.workerConfig={astcSupported:t.hasFeature("texture-compression-astc"),astcHDRSupported:!1,etc1Supported:t.hasFeature("texture-compression-etc2"),etc2Supported:t.hasFeature("texture-compression-etc2"),dxtSupported:t.hasFeature("texture-compression-bc"),bptcSupported:t.hasFeature("texture-compression-bc"),pvrtcSupported:t.hasFeature("texture-compression-pvrtc")}:this.workerConfig={astcSupported:t.extensions.has("WEBGL_compressed_texture_astc"),astcHDRSupported:t.extensions.has("WEBGL_compressed_texture_astc")&&t.extensions.get("WEBGL_compressed_texture_astc").getSupportedProfiles().includes("hdr"),etc1Supported:t.extensions.has("WEBGL_compressed_texture_etc1"),etc2Supported:t.extensions.has("WEBGL_compressed_texture_etc"),dxtSupported:t.extensions.has("WEBGL_compressed_texture_s3tc"),bptcSupported:t.extensions.has("EXT_texture_compression_bptc"),pvrtcSupported:t.extensions.has("WEBGL_compressed_texture_pvrtc")||t.extensions.has("WEBKIT_WEBGL_compressed_texture_pvrtc")},this}init(){if(!this.transcoderPending){const t=new ie(this.manager);t.setPath(this.transcoderPath),t.setWithCredentials(this.withCredentials);const e=t.loadAsync("basis_transcoder.js"),i=new ie(this.manager);i.setPath(this.transcoderPath),i.setResponseType("arraybuffer"),i.setWithCredentials(this.withCredentials);const s=i.loadAsync("basis_transcoder.wasm");this.transcoderPending=Promise.all([e,s]).then(([n,r])=>{const a=at.BasisWorker.toString(),A=["/* constants */","let _EngineFormat = "+JSON.stringify(at.EngineFormat),"let _EngineType = "+JSON.stringify(at.EngineType),"let _TranscoderFormat = "+JSON.stringify(at.TranscoderFormat),"let _BasisFormat = "+JSON.stringify(at.BasisFormat),"/* basis_transcoder.js */",n,"/* worker */",a.substring(a.indexOf("{")+1,a.lastIndexOf("}"))].join(`
7
+ `);this.workerSourceURL=URL.createObjectURL(new Blob([A])),this.transcoderBinary=r,this.workerPool.setWorkerCreator(()=>{const o=new Worker(this.workerSourceURL),h=this.transcoderBinary.slice(0);return o.postMessage({type:"init",config:this.workerConfig,transcoderBinary:h},[h]),o})}),qs>0&&console.warn("THREE.KTX2Loader: Multiple active KTX2 loaders may cause performance issues. Use a single KTX2Loader instance, or call .dispose() on old instances."),qs++}return this.transcoderPending}load(t,e,i,s){if(this.workerConfig===null)throw new Error("THREE.KTX2Loader: Missing initialization with `.detectSupport( renderer )`.");const n=new ie(this.manager);n.setPath(this.path),n.setCrossOrigin(this.crossOrigin),n.setWithCredentials(this.withCredentials),n.setResponseType("arraybuffer"),n.load(t,r=>{this.parse(r,e,s)},i,s)}parse(t,e,i){if(this.workerConfig===null)throw new Error("THREE.KTX2Loader: Missing initialization with `.detectSupport( renderer )`.");if(Os.has(t))return Os.get(t).promise.then(e).catch(i);this._createTexture(t).then(s=>e?e(s):null).catch(i)}_createTextureFrom(t,e){const{type:i,error:s,data:{faces:n,width:r,height:a,format:A,type:o,dfdFlags:h}}=t;if(i==="error")return Promise.reject(s);let c;if(e.faceCount===6)c=new mA(n,A,o);else{const u=n[0].mipmaps;c=e.layerCount>1?new bA(u,r,a,e.layerCount,A,o):new Mi(u,r,a,A,o)}return c.minFilter=n[0].mipmaps.length===1?Lt:ke,c.magFilter=Lt,c.generateMipmaps=!1,c.needsUpdate=!0,c.colorSpace=ta(e),c.premultiplyAlpha=!!(h&Lo),c}async _createTexture(t,e={}){const i=vo(new Uint8Array(t)),s=i.vkFormat===Us&&i.dataFormatDescriptor[0].colorModel===167;if(!(i.vkFormat===zo||s&&!this.workerConfig.astcHDRSupported))return jo(i);const r=e,a=this.init().then(()=>this.workerPool.postMessage({type:"transcode",buffer:t,taskConfig:r},[t])).then(A=>this._createTextureFrom(A.data,i));return Os.set(t,{promise:a}),a}dispose(){this.workerPool.dispose(),this.workerSourceURL&&URL.revokeObjectURL(this.workerSourceURL),qs--}}at.BasisFormat={ETC1S:0,UASTC:1,UASTC_HDR:2},at.TranscoderFormat={ETC1:0,ETC2:1,BC1:2,BC3:3,BC4:4,BC5:5,BC7_M6_OPAQUE_ONLY:6,BC7_M5:7,PVRTC1_4_RGB:8,PVRTC1_4_RGBA:9,ASTC_4x4:10,ATC_RGB:11,ATC_RGBA_INTERPOLATED_ALPHA:12,RGBA32:13,RGB565:14,BGR565:15,RGBA4444:16,BC6H:22,RGB_HALF:24,RGBA_HALF:25},at.EngineFormat={RGBAFormat:Nt,RGBA_ASTC_4x4_Format:Xe,RGB_BPTC_UNSIGNED_Format:ua,RGBA_BPTC_Format:Ni,RGBA_ETC2_EAC_Format:on,RGBA_PVRTC_4BPPV1_Format:Li,RGBA_S3TC_DXT5_Format:ha,RGB_ETC1_Format:la,RGB_ETC2_Format:An,RGB_PVRTC_4BPPV1_Format:ca,RGBA_S3TC_DXT1_Format:Ri},at.EngineType={UnsignedByteType:D,HalfFloatType:Kt,FloatType:Gt},at.BasisWorker=function(){let l,t,e;const i=_EngineFormat,s=_EngineType,n=_TranscoderFormat,r=_BasisFormat;self.addEventListener("message",function(g){const p=g.data;switch(p.type){case"init":l=p.config,a(p.transcoderBinary);break;case"transcode":t.then(()=>{try{const{faces:b,buffers:f,width:m,height:C,hasAlpha:B,format:E,type:Q,dfdFlags:y}=A(p.buffer);self.postMessage({type:"transcode",id:p.id,data:{faces:b,width:m,height:C,hasAlpha:B,format:E,type:Q,dfdFlags:y}},f)}catch(b){console.error(b),self.postMessage({type:"error",id:p.id,error:b.message})}});break}});function a(g){t=new Promise(p=>{e={wasmBinary:g,onRuntimeInitialized:p},BASIS(e)}).then(()=>{e.initializeBasis(),e.KTX2File===void 0&&console.warn("THREE.KTX2Loader: Please update Basis Universal transcoder.")})}function A(g){const p=new e.KTX2File(new Uint8Array(g));function b(){p.close(),p.delete()}if(!p.isValid())throw b(),new Error("THREE.KTX2Loader: Invalid or unsupported .ktx2 file");let f;if(p.isUASTC())f=r.UASTC;else if(p.isETC1S())f=r.ETC1S;else if(p.isHDR())f=r.UASTC_HDR;else throw new Error("THREE.KTX2Loader: Unknown Basis encoding");const m=p.getWidth(),C=p.getHeight(),B=p.getLayers()||1,E=p.getLevels(),Q=p.getFaces(),y=p.getHasAlpha(),x=p.getDFDFlags(),{transcoderFormat:F,engineFormat:k,engineType:T}=c(f,m,C,y);if(!m||!C||!E)throw b(),new Error("THREE.KTX2Loader: Invalid texture");if(!p.startTranscoding())throw b(),new Error("THREE.KTX2Loader: .startTranscoding failed");const P=[],L=[];for(let j=0;j<Q;j++){const mt=[];for(let st=0;st<E;st++){const Dt=[];let It,Bt;for(let G=0;G<B;G++){const O=p.getImageLevelInfo(st,G,j);j===0&&st===0&&G===0&&(O.origWidth%4!==0||O.origHeight%4!==0)&&console.warn("THREE.KTX2Loader: ETC1S and UASTC textures should use multiple-of-four dimensions."),E>1?(It=O.origWidth,Bt=O.origHeight):(It=O.width,Bt=O.height);let gt=new Uint8Array(p.getImageTranscodedSizeInBytes(st,G,0,F));const Ti=p.transcodeImage(gt,st,G,j,F,0,-1,-1);if(T===s.HalfFloatType&&(gt=new Uint16Array(gt.buffer,gt.byteOffset,gt.byteLength/Uint16Array.BYTES_PER_ELEMENT)),!Ti)throw b(),new Error("THREE.KTX2Loader: .transcodeImage failed.");Dt.push(gt)}const _t=d(Dt);mt.push({data:_t,width:It,height:Bt}),L.push(_t.buffer)}P.push({mipmaps:mt,width:m,height:C,format:k,type:T})}return b(),{faces:P,buffers:L,width:m,height:C,hasAlpha:y,dfdFlags:x,format:k,type:T}}const o=[{if:"astcSupported",basisFormat:[r.UASTC],transcoderFormat:[n.ASTC_4x4,n.ASTC_4x4],engineFormat:[i.RGBA_ASTC_4x4_Format,i.RGBA_ASTC_4x4_Format],engineType:[s.UnsignedByteType],priorityETC1S:1/0,priorityUASTC:1,needsPowerOfTwo:!1},{if:"bptcSupported",basisFormat:[r.ETC1S,r.UASTC],transcoderFormat:[n.BC7_M5,n.BC7_M5],engineFormat:[i.RGBA_BPTC_Format,i.RGBA_BPTC_Format],engineType:[s.UnsignedByteType],priorityETC1S:3,priorityUASTC:2,needsPowerOfTwo:!1},{if:"dxtSupported",basisFormat:[r.ETC1S,r.UASTC],transcoderFormat:[n.BC1,n.BC3],engineFormat:[i.RGBA_S3TC_DXT1_Format,i.RGBA_S3TC_DXT5_Format],engineType:[s.UnsignedByteType],priorityETC1S:4,priorityUASTC:5,needsPowerOfTwo:!1},{if:"etc2Supported",basisFormat:[r.ETC1S,r.UASTC],transcoderFormat:[n.ETC1,n.ETC2],engineFormat:[i.RGB_ETC2_Format,i.RGBA_ETC2_EAC_Format],engineType:[s.UnsignedByteType],priorityETC1S:1,priorityUASTC:3,needsPowerOfTwo:!1},{if:"etc1Supported",basisFormat:[r.ETC1S,r.UASTC],transcoderFormat:[n.ETC1],engineFormat:[i.RGB_ETC1_Format],engineType:[s.UnsignedByteType],priorityETC1S:2,priorityUASTC:4,needsPowerOfTwo:!1},{if:"pvrtcSupported",basisFormat:[r.ETC1S,r.UASTC],transcoderFormat:[n.PVRTC1_4_RGB,n.PVRTC1_4_RGBA],engineFormat:[i.RGB_PVRTC_4BPPV1_Format,i.RGBA_PVRTC_4BPPV1_Format],engineType:[s.UnsignedByteType],priorityETC1S:5,priorityUASTC:6,needsPowerOfTwo:!0},{if:"bptcSupported",basisFormat:[r.UASTC_HDR],transcoderFormat:[n.BC6H],engineFormat:[i.RGB_BPTC_UNSIGNED_Format],engineType:[s.HalfFloatType],priorityHDR:1,needsPowerOfTwo:!1},{basisFormat:[r.ETC1S,r.UASTC],transcoderFormat:[n.RGBA32,n.RGBA32],engineFormat:[i.RGBAFormat,i.RGBAFormat],engineType:[s.UnsignedByteType,s.UnsignedByteType],priorityETC1S:100,priorityUASTC:100,needsPowerOfTwo:!1},{basisFormat:[r.UASTC_HDR],transcoderFormat:[n.RGBA_HALF],engineFormat:[i.RGBAFormat],engineType:[s.HalfFloatType],priorityHDR:100,needsPowerOfTwo:!1}],h={[r.ETC1S]:o.filter(g=>g.basisFormat.includes(r.ETC1S)).sort((g,p)=>g.priorityUASTC-p.priorityUASTC),[r.UASTC]:o.filter(g=>g.basisFormat.includes(r.UASTC)).sort((g,p)=>g.priorityUASTC-p.priorityUASTC),[r.UASTC_HDR]:o.filter(g=>g.basisFormat.includes(r.UASTC_HDR)).sort((g,p)=>g.priorityHDR-p.priorityHDR)};function c(g,p,b,f){const m=h[g];for(let C=0;C<m.length;C++){const B=m[C];if(B.if&&!l[B.if]||!B.basisFormat.includes(g)||f&&B.transcoderFormat.length<2||B.needsPowerOfTwo&&!(u(p)&&u(b)))continue;const E=B.transcoderFormat[f?1:0],Q=B.engineFormat[f?1:0],y=B.engineType[0];return{transcoderFormat:E,engineFormat:Q,engineType:y}}throw new Error("THREE.KTX2Loader: Failed to identify transcoding target.")}function u(g){return g<=2?!0:(g&g-1)===0&&g!==0}function d(g){if(g.length===1)return g[0];let p=0;for(let m=0;m<g.length;m++){const C=g[m];p+=C.byteLength}const b=new Uint8Array(p);let f=0;for(let m=0;m<g.length;m++){const C=g[m];b.set(C,f),f+=C.byteLength}return b}};const Po=new Set([Nt,_i,Te,ne]),js={[wr]:Nt,[xr]:Te,[Qr]:ne,[yr]:Nt,[Er]:Te,[Cr]:ne,[Br]:Nt,[Ir]:Nt,[mr]:Te,[br]:Te,[fr]:ne,[pr]:ne,[Sr]:_i,[Mr]:_i,[Or]:on,[Hr]:An,[Us]:Xe,[Pr]:Xe,[qr]:Xe,[Xr]:Gi,[Jr]:Gi,[jr]:Gi,[Dr]:Ri,[Tr]:Ri,[kr]:nn,[Fr]:nn,[Rr]:rn,[_r]:rn,[Gr]:ga,[Lr]:da,[Ur]:fa,[Nr]:pa,[vr]:Ni,[zr]:Ni,[Wr]:Li,[Kr]:Li,[Yr]:an,[Vr]:an},Se={[wr]:Gt,[xr]:Gt,[Qr]:Gt,[yr]:Kt,[Er]:Kt,[Cr]:Kt,[Br]:D,[Ir]:D,[mr]:D,[br]:D,[fr]:D,[pr]:D,[Sr]:en,[Mr]:sn,[Or]:D,[Hr]:D,[Us]:Kt,[Pr]:D,[qr]:D,[Xr]:Kt,[Jr]:D,[jr]:D,[Dr]:D,[Tr]:D,[kr]:D,[Fr]:D,[Rr]:D,[_r]:D,[Gr]:D,[Lr]:D,[Ur]:D,[Nr]:D,[vr]:D,[zr]:D,[Wr]:D,[Kr]:D,[Yr]:D,[Vr]:D};async function jo(l){const{vkFormat:t}=l;if(js[t]===void 0)throw new Error("THREE.KTX2Loader: Unsupported vkFormat: "+t);Se[t]===void 0&&console.warn('THREE.KTX2Loader: Missing ".type" for vkFormat: '+t);let e;l.supercompressionScheme===dr&&(Ps||(Ps=new Promise(async r=>{const a=new Ho;await a.init(),r(a)})),e=await Ps);const i=[];for(let r=0;r<l.levels.length;r++){const a=Math.max(1,l.pixelWidth>>r),A=Math.max(1,l.pixelHeight>>r),o=l.pixelDepth?Math.max(1,l.pixelDepth>>r):0,h=l.levels[r];let c;if(l.supercompressionScheme===Ro)c=h.levelData;else if(l.supercompressionScheme===dr)c=e.decode(h.levelData,h.uncompressedByteLength);else throw new Error("THREE.KTX2Loader: Unsupported supercompressionScheme.");let u;Se[t]===Gt?u=new Float32Array(c.buffer,c.byteOffset,c.byteLength/Float32Array.BYTES_PER_ELEMENT):Se[t]===Kt?u=new Uint16Array(c.buffer,c.byteOffset,c.byteLength/Uint16Array.BYTES_PER_ELEMENT):Se[t]===en||Se[t]===sn?u=new Uint32Array(c.buffer,c.byteOffset,c.byteLength/Uint32Array.BYTES_PER_ELEMENT):u=c,i.push({data:u,width:a,height:A,depth:o})}const s=l.levelCount===0||i.length>1;let n;if(Po.has(js[t]))n=l.pixelDepth===0?new bs(i[0].data,l.pixelWidth,l.pixelHeight):new qa(i[0].data,l.pixelWidth,l.pixelHeight,l.pixelDepth),n.minFilter=s?tn:Rt,n.magFilter=Rt,n.generateMipmaps=l.levelCount===0;else{if(l.pixelDepth>0)throw new Error("THREE.KTX2Loader: Unsupported pixelDepth.");n=new Mi(i,l.pixelWidth,l.pixelHeight),n.minFilter=s?ke:Lt,n.magFilter=Lt}return n.mipmaps=i,n.type=Se[t],n.format=js[t],n.colorSpace=ta(l),n.needsUpdate=!0,Promise.resolve(n)}function ta(l){const t=l.dataFormatDescriptor[0];return t.colorPrimaries===No?t.transferFunction===gr?N:Z:t.colorPrimaries===Uo?t.transferFunction===gr?Oo:qo:(t.colorPrimaries===Go||console.warn(`THREE.KTX2Loader: Unsupported color primaries, "${t.colorPrimaries}"`),Ze)}self.onmessage=l=>{const t=l.data;switch(t.type){case"init":break;case"load":Vo(t);break;default:console.error("[Worker] Unknown message type:",t.type);break}},self.onerror=l=>{console.error("[Worker] Error:",l)};function Jo(l){self.postMessage(l)}let Ye=null,Fi=null,ki=null;async function Vo(l){Ye??(Ye=new XA),Ye.setMeshoptDecoder(ea),Fi??(Fi=new YA),Fi.setDecoderConfig({type:"js"}),Fi.setDecoderPath(l.dracoDecoderPath),Ye.setDRACOLoader(Fi),ki??(ki=new at),ki.workerConfig=l.ktx2LoaderConfig,ki.setTranscoderPath(l.ktx2TranscoderPath),Ye.setKTX2Loader(ki),Ye.load(l.url,t=>{const e={type:"loaded-gltf",result:{url:l.url,geometries:[],textures:[]}};Ko(t,e),Jo(e)})}function Ko(l,t){const{result:e}=t;for(const i of l.parser.associations.keys()){const s=l.parser.associations.get(i);if(s)if("isTexture"in i&&i.isTexture){const n=i,r=l.parser.json.textures[s.textures??-1];e.textures.push({texture:n,textureIndex:s.textures??-1,extensions:(r==null?void 0:r.extensions)??{}})}else if("isMesh"in i&&i.isMesh){const n=i,r=s.meshes??-1,a=s.primitives??-1,A=l.parser.json.meshes[r];e.geometries.push({geometry:n.geometry,meshIndex:r,primitiveIndex:a,extensions:(A==null?void 0:A.extensions)??{}})}else"isMaterial"in i&&i.isMaterial}}})();