@shopware-ag/dive 1.19.1-beta.8 → 2.0.1-beta.0

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 (272) hide show
  1. package/build/chunks/FileTypes-BjZ0rrIV.cjs +1 -0
  2. package/build/chunks/FileTypes-qgYnI0Jg.mjs +30 -0
  3. package/build/chunks/ModuleRegistry-NyNtjHb2.cjs +1 -0
  4. package/build/chunks/ModuleRegistry-RSub8W0G.mjs +13 -0
  5. package/build/chunks/PerspectiveCamera-BByyG5R4.cjs +1 -0
  6. package/build/chunks/PerspectiveCamera-sm4_81KJ.mjs +34 -0
  7. package/build/chunks/SelectTool-BRKko7uz.cjs +1 -0
  8. package/build/chunks/SelectTool-mTRiZYaC.mjs +712 -0
  9. package/build/chunks/SystemInfo-DPAQG-S5.mjs +139 -0
  10. package/build/chunks/SystemInfo-oX-NNneO.cjs +1 -0
  11. package/build/chunks/VisibilityLayerMask-BI7jPKdx.cjs +1 -0
  12. package/build/chunks/VisibilityLayerMask-CXgt1fJc.mjs +8 -0
  13. package/build/chunks/findInterface-BEdL2iUQ.cjs +1 -0
  14. package/build/chunks/findInterface-OrXgmwxj.mjs +18 -0
  15. package/build/chunks/index-C_uFFwT2.mjs +5 -0
  16. package/build/chunks/index-DAwIH9xh.cjs +1 -0
  17. package/build/chunks/package-BFpY3sIj.cjs +1 -0
  18. package/build/chunks/package-BvoZkrge.mjs +39 -0
  19. package/build/chunks/parse-error-2f5qpXP5.cjs +6 -0
  20. package/build/chunks/parse-error-DRBVHL9E.mjs +614 -0
  21. package/build/dive.cjs +30 -0
  22. package/build/dive.d.ts +2 -0
  23. package/build/dive.mjs +1757 -0
  24. package/build/src/{primitive → components}/floor/Floor.d.ts +1 -1
  25. package/build/src/{gizmo → components/gizmo}/Gizmo.d.ts +4 -4
  26. package/build/src/{gizmo → components/gizmo}/handles/AxisHandle.d.ts +4 -4
  27. package/build/src/{gizmo → components/gizmo}/handles/RadialHandle.d.ts +4 -4
  28. package/build/src/{gizmo → components/gizmo}/handles/ScaleHandle.d.ts +4 -4
  29. package/build/src/{gizmo → components/gizmo}/plane/GizmoPlane.d.ts +1 -1
  30. package/build/src/{gizmo → components/gizmo}/rotate/RotateGizmo.d.ts +4 -4
  31. package/build/src/{gizmo → components/gizmo}/scale/ScaleGizmo.d.ts +5 -5
  32. package/build/src/{gizmo → components/gizmo}/translate/TranslateGizmo.d.ts +4 -4
  33. package/build/src/{group → components/group}/Group.d.ts +8 -3
  34. package/build/src/components/index.d.ts +9 -0
  35. package/build/src/{light → components/light}/AmbientLight.d.ts +1 -1
  36. package/build/src/{light → components/light}/PointLight.d.ts +4 -4
  37. package/build/src/{light → components/light}/SceneLight.d.ts +1 -1
  38. package/build/src/components/light/index.d.ts +3 -0
  39. package/build/src/{model → components/model}/Model.d.ts +2 -2
  40. package/build/src/{node → components/node}/Node.d.ts +4 -4
  41. package/build/src/{primitive → components/primitive}/Primitive.d.ts +2 -2
  42. package/build/src/{engine/scene → components}/root/Root.d.ts +6 -2
  43. package/build/src/constants/index.d.ts +3 -0
  44. package/build/src/core/Dive.d.ts +57 -0
  45. package/build/src/core/index.d.ts +1 -0
  46. package/build/src/engine/Engine.d.ts +19 -19
  47. package/build/src/engine/camera/PerspectiveCamera.d.ts +6 -3
  48. package/build/src/engine/clock/Clock.d.ts +19 -0
  49. package/build/src/engine/renderer/Renderer.d.ts +29 -57
  50. package/build/src/engine/resize/ResizeManager.d.ts +11 -0
  51. package/build/src/engine/scene/Scene.d.ts +6 -15
  52. package/build/src/engine/scene/xrroot/XRRoot.d.ts +5 -5
  53. package/build/src/engine/scene/xrroot/xrlightroot/XRLightRoot.d.ts +3 -3
  54. package/build/src/{helper → helpers}/findSceneRecursive/findSceneRecursive.d.ts +1 -1
  55. package/build/src/helpers/index.d.ts +8 -0
  56. package/build/src/{helper → helpers}/isFileTypeSupported/isFileTypeSupported.d.ts +1 -1
  57. package/build/src/index.d.ts +8 -2
  58. package/build/src/{interface → interfaces}/Draggable.d.ts +1 -1
  59. package/build/src/interfaces/index.d.ts +6 -0
  60. package/build/src/modules/ModuleRegistry.d.ts +19 -0
  61. package/build/src/modules/animation/AnimationSystem.cjs +1 -0
  62. package/build/src/modules/animation/AnimationSystem.d.ts +36 -0
  63. package/build/src/modules/animation/AnimationSystem.mjs +95 -0
  64. package/build/src/modules/animation/animator/Animator.d.ts +26 -0
  65. package/build/src/modules/animation/types/AnimatorParameters.d.ts +7 -0
  66. package/build/src/modules/ar/ARSystem.cjs +1 -2
  67. package/build/src/modules/ar/ARSystem.d.ts +1 -2
  68. package/build/src/modules/ar/ARSystem.mjs +2 -3
  69. package/build/src/modules/ar/arquicklook/ARQuickLook.d.ts +1 -1
  70. package/build/src/modules/ar/sceneviewer/SceneViewer.d.ts +1 -1
  71. package/build/src/modules/ar/webxr/WebXR.d.ts +3 -4
  72. package/build/src/modules/ar/webxr/controller/WebXRController.d.ts +3 -3
  73. package/build/src/modules/ar/webxr/origin/WebXROrigin.d.ts +2 -2
  74. package/build/src/modules/ar/webxr/raycaster/WebXRRaycaster.d.ts +4 -4
  75. package/build/src/modules/ar/webxr/raycaster/ar/WebXRRaycasterAR.d.ts +3 -3
  76. package/build/src/modules/ar/webxr/raycaster/three/WebXRRaycasterTHREE.d.ts +4 -4
  77. package/build/src/modules/ar/webxr/touchscreencontrols/WebXRTouchscreenControls.d.ts +1 -1
  78. package/build/src/modules/asset/converter/AssetConverter.cjs +0 -1
  79. package/build/src/modules/asset/converter/AssetConverter.d.ts +4 -5
  80. package/build/src/modules/asset/converter/AssetConverter.mjs +0 -1
  81. package/build/src/modules/asset/exporter/AssetExporter.cjs +24 -25
  82. package/build/src/modules/asset/exporter/AssetExporter.d.ts +15 -3
  83. package/build/src/modules/asset/exporter/AssetExporter.mjs +3 -5
  84. package/build/src/modules/asset/loader/AssetLoader.cjs +2 -3
  85. package/build/src/modules/asset/loader/AssetLoader.d.ts +1 -3
  86. package/build/src/modules/asset/loader/AssetLoader.mjs +96 -101
  87. package/build/src/modules/axiscamera/AxisCamera.d.ts +21 -0
  88. package/build/src/modules/controller/orbit/OrbitController.d.ts +30 -0
  89. package/build/src/modules/mediacreator/MediaCreator.cjs +1 -2
  90. package/build/src/modules/mediacreator/MediaCreator.d.ts +5 -6
  91. package/build/src/modules/mediacreator/MediaCreator.mjs +13 -11
  92. package/build/src/modules/state/ActionRegistry.d.ts +26 -0
  93. package/build/src/modules/state/State.cjs +27 -0
  94. package/build/src/modules/state/State.d.ts +58 -0
  95. package/build/src/modules/state/State.mjs +4271 -0
  96. package/build/src/modules/state/actions/action.d.ts +36 -0
  97. package/build/src/modules/state/actions/ar/index.d.ts +1 -0
  98. package/build/src/modules/state/actions/ar/launchar.d.ts +15 -0
  99. package/build/src/modules/state/actions/camera/computeencompassingview.d.ts +12 -0
  100. package/build/src/modules/state/actions/camera/getcameratransform.d.ts +12 -0
  101. package/build/src/modules/state/actions/camera/index.d.ts +6 -0
  102. package/build/src/modules/state/actions/camera/lockcamera.d.ts +8 -0
  103. package/build/src/modules/state/actions/camera/movecamera.d.ts +29 -0
  104. package/build/src/modules/state/actions/camera/setcameralayer.d.ts +12 -0
  105. package/build/src/modules/state/actions/camera/setcameratransform.d.ts +15 -0
  106. package/build/src/modules/state/actions/camera/zoomcamera.d.ts +14 -0
  107. package/build/src/modules/state/actions/index.d.ts +7 -0
  108. package/build/src/modules/state/actions/media/generatemedia.d.ts +25 -0
  109. package/build/src/modules/state/actions/media/index.d.ts +1 -0
  110. package/build/src/modules/state/actions/object/addobject.d.ts +8 -0
  111. package/build/src/modules/state/actions/object/deleteobject.d.ts +12 -0
  112. package/build/src/modules/state/actions/object/deselectobject.d.ts +12 -0
  113. package/build/src/modules/state/actions/object/dropit.d.ts +12 -0
  114. package/build/src/modules/state/actions/object/getallobjects.d.ts +8 -0
  115. package/build/src/modules/state/actions/object/getobjects.d.ts +12 -0
  116. package/build/src/modules/state/actions/object/index.d.ts +11 -0
  117. package/build/src/modules/state/actions/object/modelloaded.d.ts +12 -0
  118. package/build/src/modules/state/actions/object/placeonfloor.d.ts +12 -0
  119. package/build/src/modules/state/actions/object/selectobject.d.ts +12 -0
  120. package/build/src/modules/state/actions/object/setparent.d.ts +22 -0
  121. package/build/src/modules/state/actions/object/updateobject.d.ts +12 -0
  122. package/build/src/modules/state/actions/renderer/index.d.ts +1 -0
  123. package/build/src/modules/state/actions/renderer/startrender.d.ts +8 -0
  124. package/build/src/modules/state/actions/scene/exportscene.d.ts +13 -0
  125. package/build/src/modules/state/actions/scene/getallscenedata.d.ts +9 -0
  126. package/build/src/modules/state/actions/scene/index.d.ts +4 -0
  127. package/build/src/modules/state/actions/scene/setbackground.d.ts +12 -0
  128. package/build/src/modules/state/actions/scene/updatescene.d.ts +20 -0
  129. package/build/src/modules/state/actions/toolbox/index.d.ts +4 -0
  130. package/build/src/modules/state/actions/toolbox/setgizmomode.d.ts +12 -0
  131. package/build/src/modules/state/actions/toolbox/setgizmoscalelinked.d.ts +8 -0
  132. package/build/src/modules/state/actions/toolbox/setgizmovisible.d.ts +8 -0
  133. package/build/src/modules/state/actions/toolbox/usetool.d.ts +13 -0
  134. package/build/src/modules/state/types/ActionTypes.d.ts +18 -0
  135. package/build/src/{com → modules/state}/types/COMBaseEntity.d.ts +1 -1
  136. package/build/src/modules/state/types/COMEntity.d.ts +6 -0
  137. package/build/src/{com → modules/state}/types/COMGeometry.d.ts +1 -1
  138. package/build/src/{com → modules/state}/types/COMGroup.d.ts +3 -1
  139. package/build/src/{com → modules/state}/types/COMLight.d.ts +3 -1
  140. package/build/src/{com → modules/state}/types/COMModel.d.ts +4 -2
  141. package/build/src/modules/state/types/COMPov.d.ts +9 -0
  142. package/build/src/modules/state/types/COMPrimitive.d.ts +13 -0
  143. package/build/src/modules/state/types/index.d.ts +11 -0
  144. package/build/src/modules/systeminfo/SystemInfo.cjs +1 -2
  145. package/build/src/modules/systeminfo/SystemInfo.d.ts +6 -9
  146. package/build/src/modules/systeminfo/SystemInfo.mjs +3 -113
  147. package/build/src/{toolbox → modules/toolbox}/BaseTool.d.ts +6 -6
  148. package/build/src/modules/toolbox/Toolbox.cjs +1 -0
  149. package/build/src/{toolbox → modules/toolbox}/Toolbox.d.ts +10 -6
  150. package/build/src/modules/toolbox/Toolbox.mjs +99 -0
  151. package/build/src/{toolbox → modules/toolbox}/select/SelectTool.d.ts +5 -5
  152. package/build/src/{toolbox → modules/toolbox}/transform/TransformTool.d.ts +6 -6
  153. package/build/src/types/SceneData.d.ts +1 -1
  154. package/build/src/types/SceneObjects.d.ts +6 -6
  155. package/build/src/types/SceneType.d.ts +1 -1
  156. package/build/src/types/UUID.d.ts +1 -0
  157. package/build/src/types/file/index.d.ts +1 -1
  158. package/build/src/types/index.d.ts +6 -6
  159. package/package.json +67 -26
  160. package/build/chunks/PerspectiveCamera-ACx6umAu.mjs +0 -38
  161. package/build/chunks/PerspectiveCamera-ACx6umAu.mjs.map +0 -1
  162. package/build/chunks/PerspectiveCamera-BXPNOM71.cjs +0 -2
  163. package/build/chunks/PerspectiveCamera-BXPNOM71.cjs.map +0 -1
  164. package/build/chunks/fflate.module-DHdJvhNh.cjs +0 -7
  165. package/build/chunks/fflate.module-DHdJvhNh.cjs.map +0 -1
  166. package/build/chunks/fflate.module-DkZg07PZ.mjs +0 -603
  167. package/build/chunks/fflate.module-DkZg07PZ.mjs.map +0 -1
  168. package/build/chunks/file-type-error-D6aWGgyc.mjs +0 -15
  169. package/build/chunks/file-type-error-D6aWGgyc.mjs.map +0 -1
  170. package/build/chunks/file-type-error-DtvBgs64.cjs +0 -2
  171. package/build/chunks/file-type-error-DtvBgs64.cjs.map +0 -1
  172. package/build/chunks/index-C7Wx_9uY.mjs +0 -34
  173. package/build/chunks/index-C7Wx_9uY.mjs.map +0 -1
  174. package/build/chunks/index-MNP0K5dt.cjs +0 -2
  175. package/build/chunks/index-MNP0K5dt.cjs.map +0 -1
  176. package/build/chunks/network-error-C2ZDC8qS.cjs +0 -2
  177. package/build/chunks/network-error-C2ZDC8qS.cjs.map +0 -1
  178. package/build/chunks/network-error-DgecatEk.mjs +0 -27
  179. package/build/chunks/network-error-DgecatEk.mjs.map +0 -1
  180. package/build/index.cjs +0 -57
  181. package/build/index.cjs.map +0 -1
  182. package/build/index.d.ts +0 -6
  183. package/build/index.mjs +0 -6809
  184. package/build/index.mjs.map +0 -1
  185. package/build/src/animation/AnimationSystem.d.ts +0 -16
  186. package/build/src/axiscamera/AxisCamera.d.ts +0 -18
  187. package/build/src/com/Communication.d.ts +0 -74
  188. package/build/src/com/actions/camera/computeencompassingview.d.ts +0 -9
  189. package/build/src/com/actions/camera/getcameratransform.d.ts +0 -9
  190. package/build/src/com/actions/camera/movecamera.d.ts +0 -15
  191. package/build/src/com/actions/camera/resetcamera.d.ts +0 -7
  192. package/build/src/com/actions/camera/setcameralayer.d.ts +0 -7
  193. package/build/src/com/actions/camera/setcameratransform.d.ts +0 -9
  194. package/build/src/com/actions/camera/zoomcamera.d.ts +0 -8
  195. package/build/src/com/actions/index.d.ts +0 -60
  196. package/build/src/com/actions/media/generatemedia.d.ts +0 -14
  197. package/build/src/com/actions/object/addobject.d.ts +0 -6
  198. package/build/src/com/actions/object/deleteobject.d.ts +0 -8
  199. package/build/src/com/actions/object/deselectobject.d.ts +0 -8
  200. package/build/src/com/actions/object/getallobjects.d.ts +0 -6
  201. package/build/src/com/actions/object/getobjects.d.ts +0 -8
  202. package/build/src/com/actions/object/model/dropit.d.ts +0 -7
  203. package/build/src/com/actions/object/model/modelloaded.d.ts +0 -7
  204. package/build/src/com/actions/object/model/placeonfloor.d.ts +0 -7
  205. package/build/src/com/actions/object/selectobject.d.ts +0 -8
  206. package/build/src/com/actions/object/setparent.d.ts +0 -13
  207. package/build/src/com/actions/object/updateobject.d.ts +0 -8
  208. package/build/src/com/actions/renderer/startrender.d.ts +0 -5
  209. package/build/src/com/actions/scene/exportscene.d.ts +0 -8
  210. package/build/src/com/actions/scene/getallscenedata.d.ts +0 -6
  211. package/build/src/com/actions/scene/launchar.d.ts +0 -9
  212. package/build/src/com/actions/scene/setbackground.d.ts +0 -7
  213. package/build/src/com/actions/scene/updatescene.d.ts +0 -11
  214. package/build/src/com/actions/toolbox/select/setgizmomode.d.ts +0 -7
  215. package/build/src/com/actions/toolbox/transform/setgizmoscalelinked.d.ts +0 -5
  216. package/build/src/com/actions/toolbox/transform/setgizmovisible.d.ts +0 -5
  217. package/build/src/com/actions/toolbox/usetool.d.ts +0 -8
  218. package/build/src/com/types/COMEntity.d.ts +0 -6
  219. package/build/src/com/types/COMPov.d.ts +0 -7
  220. package/build/src/com/types/COMPrimitive.d.ts +0 -11
  221. package/build/src/com/types/index.d.ts +0 -11
  222. package/build/src/controls/OrbitControls.d.ts +0 -38
  223. package/build/src/dive.d.ts +0 -49
  224. package/build/src/error/index.d.ts +0 -4
  225. package/build/src/helper/index.d.ts +0 -7
  226. package/build/src/modules/_system/ModuleImporter.d.ts +0 -21
  227. package/build/src/modules/_system/ModuleRegistry.d.ts +0 -72
  228. package/build/src/modules/ar/ARSystem.cjs.map +0 -1
  229. package/build/src/modules/ar/ARSystem.mjs.map +0 -1
  230. package/build/src/modules/asset/converter/AssetConverter.cjs.map +0 -1
  231. package/build/src/modules/asset/converter/AssetConverter.mjs.map +0 -1
  232. package/build/src/modules/asset/exporter/AssetExporter.cjs.map +0 -1
  233. package/build/src/modules/asset/exporter/AssetExporter.mjs.map +0 -1
  234. package/build/src/modules/asset/loader/AssetLoader.cjs.map +0 -1
  235. package/build/src/modules/asset/loader/AssetLoader.mjs.map +0 -1
  236. package/build/src/modules/index.cjs +0 -2
  237. package/build/src/modules/index.cjs.map +0 -1
  238. package/build/src/modules/index.d.ts +0 -10
  239. package/build/src/modules/index.mjs +0 -109
  240. package/build/src/modules/index.mjs.map +0 -1
  241. package/build/src/modules/mediacreator/MediaCreator.cjs.map +0 -1
  242. package/build/src/modules/mediacreator/MediaCreator.mjs.map +0 -1
  243. package/build/src/modules/systeminfo/SystemInfo.cjs.map +0 -1
  244. package/build/src/modules/systeminfo/SystemInfo.mjs.map +0 -1
  245. /package/build/src/{grid → components/grid}/Grid.d.ts +0 -0
  246. /package/build/src/{constant → constants}/AxisHelperColors.d.ts +0 -0
  247. /package/build/src/{constant → constants}/GridColors.d.ts +0 -0
  248. /package/build/src/{constant → constants}/VisibilityLayerMask.d.ts +0 -0
  249. /package/build/src/{helper → helpers}/applyMixins/applyMixins.d.ts +0 -0
  250. /package/build/src/{helper → helpers}/findInterface/findInterface.d.ts +0 -0
  251. /package/build/src/{helper → helpers}/getFileTypeFromUri/getFileTypeFromUri.d.ts +0 -0
  252. /package/build/src/{helper → helpers}/getObjectDelta/getObjectDelta.d.ts +0 -0
  253. /package/build/src/{helper/isInterface → helpers/implementsInterface}/implementsInterface.d.ts +0 -0
  254. /package/build/src/{math → helpers/math}/ceil/ceilExp.d.ts +0 -0
  255. /package/build/src/{math → helpers/math}/degToRad/degToRad.d.ts +0 -0
  256. /package/build/src/{math → helpers/math}/floor/floorExp.d.ts +0 -0
  257. /package/build/src/{math → helpers/math}/helper/shift.d.ts +0 -0
  258. /package/build/src/{math → helpers/math}/index.d.ts +0 -0
  259. /package/build/src/{math → helpers/math}/radToDeg/radToDeg.d.ts +0 -0
  260. /package/build/src/{math → helpers/math}/round/roundExp.d.ts +0 -0
  261. /package/build/src/{math → helpers/math}/signedAngleTo/signedAngleTo.d.ts +0 -0
  262. /package/build/src/{math → helpers/math}/toFixed/toFixedExp.d.ts +0 -0
  263. /package/build/src/{math → helpers/math}/truncate/truncateExp.d.ts +0 -0
  264. /package/build/src/{interface → interfaces}/Hoverable.d.ts +0 -0
  265. /package/build/src/{interface → interfaces}/Movable.d.ts +0 -0
  266. /package/build/src/{interface → interfaces}/Rotatable.d.ts +0 -0
  267. /package/build/src/{interface → interfaces}/Scalable.d.ts +0 -0
  268. /package/build/src/{interface → interfaces}/Selectable.d.ts +0 -0
  269. /package/build/src/{events → modules/events}/EventExecutor.d.ts +0 -0
  270. /package/build/src/{com → modules/state}/types/COMEntityType.d.ts +0 -0
  271. /package/build/src/{com → modules/state}/types/COMGeometryType.d.ts +0 -0
  272. /package/build/src/{com → modules/state}/types/COMMaterial.d.ts +0 -0
package/build/index.cjs DELETED
@@ -1,57 +0,0 @@
1
- "use strict";var d0=Object.defineProperty;var p0=(M,a,i)=>a in M?d0(M,a,{enumerable:!0,configurable:!0,writable:!0,value:i}):M[a]=i;var y=(M,a,i)=>p0(M,typeof a!="symbol"?a+"":a,i);Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const u=require("three"),Nn=require("@tweenjs/tween.js"),pe=require("./chunks/PerspectiveCamera-BXPNOM71.cjs"),wr=require("./src/modules/index.cjs"),ks=require("three-spritetext"),Xs=require("./chunks/network-error-C2ZDC8qS.cjs"),Ul=require("./chunks/file-type-error-DtvBgs64.cjs"),js=require("./chunks/index-MNP0K5dt.cjs"),Ml={type:"change"},zs={type:"start"},Al={type:"end"},gr=new u.Ray,Rl=new u.Plane,g0=Math.cos(70*u.MathUtils.DEG2RAD);class _0 extends u.EventDispatcher{constructor(a,i){super(),this.object=a,this.domElement=i,this.domElement.style.touchAction="none",this.enabled=!0,this.target=new u.Vector3,this.cursor=new u.Vector3,this.minDistance=0,this.maxDistance=1/0,this.minZoom=0,this.maxZoom=1/0,this.minTargetRadius=0,this.maxTargetRadius=1/0,this.minPolarAngle=0,this.maxPolarAngle=Math.PI,this.minAzimuthAngle=-1/0,this.maxAzimuthAngle=1/0,this.enableDamping=!1,this.dampingFactor=.05,this.enableZoom=!0,this.zoomSpeed=1,this.enableRotate=!0,this.rotateSpeed=1,this.enablePan=!0,this.panSpeed=1,this.screenSpacePanning=!0,this.keyPanSpeed=7,this.zoomToCursor=!1,this.autoRotate=!1,this.autoRotateSpeed=2,this.keys={LEFT:"ArrowLeft",UP:"ArrowUp",RIGHT:"ArrowRight",BOTTOM:"ArrowDown"},this.mouseButtons={LEFT:u.MOUSE.ROTATE,MIDDLE:u.MOUSE.DOLLY,RIGHT:u.MOUSE.PAN},this.touches={ONE:u.TOUCH.ROTATE,TWO:u.TOUCH.DOLLY_PAN},this.target0=this.target.clone(),this.position0=this.object.position.clone(),this.zoom0=this.object.zoom,this._domElementKeyEvents=null,this.getPolarAngle=function(){return R.phi},this.getAzimuthalAngle=function(){return R.theta},this.getDistance=function(){return this.object.position.distanceTo(this.target)},this.listenToKeyEvents=function(p){p.addEventListener("keydown",bt),this._domElementKeyEvents=p},this.stopListenToKeyEvents=function(){this._domElementKeyEvents.removeEventListener("keydown",bt),this._domElementKeyEvents=null},this.saveState=function(){r.target0.copy(r.target),r.position0.copy(r.object.position),r.zoom0=r.object.zoom},this.reset=function(){r.target.copy(r.target0),r.object.position.copy(r.position0),r.object.zoom=r.zoom0,r.object.updateProjectionMatrix(),r.dispatchEvent(Ml),r.update(),v=f.NONE},this.update=function(){const p=new u.Vector3,P=new u.Quaternion().setFromUnitVectors(a.up,new u.Vector3(0,1,0)),F=P.clone().invert(),Q=new u.Vector3,ye=new u.Quaternion,wt=new u.Vector3,Fe=2*Math.PI;return function(Rr=null){const qn=r.object.position;p.copy(qn).sub(r.target),p.applyQuaternion(P),R.setFromVector3(p),r.autoRotate&&v===f.NONE&&Rt(Yn(Rr)),r.enableDamping?(R.theta+=D.theta*r.dampingFactor,R.phi+=D.phi*r.dampingFactor):(R.theta+=D.theta,R.phi+=D.phi);let ft=r.minAzimuthAngle,dt=r.maxAzimuthAngle;isFinite(ft)&&isFinite(dt)&&(ft<-Math.PI?ft+=Fe:ft>Math.PI&&(ft-=Fe),dt<-Math.PI?dt+=Fe:dt>Math.PI&&(dt-=Fe),ft<=dt?R.theta=Math.max(ft,Math.min(dt,R.theta)):R.theta=R.theta>(ft+dt)/2?Math.max(ft,R.theta):Math.min(dt,R.theta)),R.phi=Math.max(r.minPolarAngle,Math.min(r.maxPolarAngle,R.phi)),R.makeSafe(),r.enableDamping===!0?r.target.addScaledVector(le,r.dampingFactor):r.target.add(le),r.target.sub(r.cursor),r.target.clampLength(r.minTargetRadius,r.maxTargetRadius),r.target.add(r.cursor);let an=!1;if(r.zoomToCursor&&nt||r.object.isOrthographicCamera)R.radius=Ze(R.radius);else{const Qe=R.radius;R.radius=Ze(R.radius*H),an=Qe!=R.radius}if(p.setFromSpherical(R),p.applyQuaternion(F),qn.copy(r.target).add(p),r.object.lookAt(r.target),r.enableDamping===!0?(D.theta*=1-r.dampingFactor,D.phi*=1-r.dampingFactor,le.multiplyScalar(1-r.dampingFactor)):(D.set(0,0,0),le.set(0,0,0)),r.zoomToCursor&&nt){let Qe=null;if(r.object.isPerspectiveCamera){const ln=p.length();Qe=Ze(ln*H);const Yt=ln-Qe;r.object.position.addScaledVector(Ie,Yt),r.object.updateMatrixWorld(),an=!!Yt}else if(r.object.isOrthographicCamera){const ln=new u.Vector3(ee.x,ee.y,0);ln.unproject(r.object);const Yt=r.object.zoom;r.object.zoom=Math.max(r.minZoom,Math.min(r.maxZoom,r.object.zoom/H)),r.object.updateProjectionMatrix(),an=Yt!==r.object.zoom;const Ai=new u.Vector3(ee.x,ee.y,0);Ai.unproject(r.object),r.object.position.sub(Ai).add(ln),r.object.updateMatrixWorld(),Qe=p.length()}else console.warn("WARNING: OrbitControls.js encountered an unknown camera type - zoom to cursor disabled."),r.zoomToCursor=!1;Qe!==null&&(this.screenSpacePanning?r.target.set(0,0,-1).transformDirection(r.object.matrix).multiplyScalar(Qe).add(r.object.position):(gr.origin.copy(r.object.position),gr.direction.set(0,0,-1).transformDirection(r.object.matrix),Math.abs(r.object.up.dot(gr.direction))<g0?a.lookAt(r.target):(Rl.setFromNormalAndCoplanarPoint(r.object.up,r.target),gr.intersectPlane(Rl,r.target))))}else if(r.object.isOrthographicCamera){const Qe=r.object.zoom;r.object.zoom=Math.max(r.minZoom,Math.min(r.maxZoom,r.object.zoom/H)),Qe!==r.object.zoom&&(r.object.updateProjectionMatrix(),an=!0)}return H=1,nt=!1,an||Q.distanceToSquared(r.object.position)>g||8*(1-ye.dot(r.object.quaternion))>g||wt.distanceToSquared(r.target)>g?(r.dispatchEvent(Ml),Q.copy(r.object.position),ye.copy(r.object.quaternion),wt.copy(r.target),!0):!1}}(),this.dispose=function(){r.domElement.removeEventListener("contextmenu",Rn),r.domElement.removeEventListener("pointerdown",Ei),r.domElement.removeEventListener("pointercancel",Se),r.domElement.removeEventListener("wheel",xi),r.domElement.removeEventListener("pointermove",Pt),r.domElement.removeEventListener("pointerup",Se),r.domElement.getRootNode().removeEventListener("keydown",Si,{capture:!0}),r._domElementKeyEvents!==null&&(r._domElementKeyEvents.removeEventListener("keydown",bt),r._domElementKeyEvents=null)};const r=this,f={NONE:-1,ROTATE:0,DOLLY:1,PAN:2,TOUCH_ROTATE:3,TOUCH_PAN:4,TOUCH_DOLLY_PAN:5,TOUCH_DOLLY_ROTATE:6};let v=f.NONE;const g=1e-6,R=new u.Spherical,D=new u.Spherical;let H=1;const le=new u.Vector3,ce=new u.Vector2,Re=new u.Vector2,Pe=new u.Vector2,me=new u.Vector2,ue=new u.Vector2,K=new u.Vector2,re=new u.Vector2,ne=new u.Vector2,j=new u.Vector2,Ie=new u.Vector3,ee=new u.Vector2;let nt=!1;const Z=[],Xe={};let At=!1;function Yn(p){return p!==null?2*Math.PI/60*r.autoRotateSpeed*p:2*Math.PI/60/60*r.autoRotateSpeed}function kt(p){const P=Math.abs(p*.01);return Math.pow(.95,r.zoomSpeed*P)}function Rt(p){D.theta-=p}function zt(p){D.phi-=p}const Ge=function(){const p=new u.Vector3;return function(F,Q){p.setFromMatrixColumn(Q,0),p.multiplyScalar(-F),le.add(p)}}(),xe=function(){const p=new u.Vector3;return function(F,Q){r.screenSpacePanning===!0?p.setFromMatrixColumn(Q,1):(p.setFromMatrixColumn(Q,0),p.crossVectors(r.object.up,p)),p.multiplyScalar(F),le.add(p)}}(),je=function(){const p=new u.Vector3;return function(F,Q){const ye=r.domElement;if(r.object.isPerspectiveCamera){const wt=r.object.position;p.copy(wt).sub(r.target);let Fe=p.length();Fe*=Math.tan(r.object.fov/2*Math.PI/180),Ge(2*F*Fe/ye.clientHeight,r.object.matrix),xe(2*Q*Fe/ye.clientHeight,r.object.matrix)}else r.object.isOrthographicCamera?(Ge(F*(r.object.right-r.object.left)/r.object.zoom/ye.clientWidth,r.object.matrix),xe(Q*(r.object.top-r.object.bottom)/r.object.zoom/ye.clientHeight,r.object.matrix)):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - pan disabled."),r.enablePan=!1)}}();function ge(p){r.object.isPerspectiveCamera||r.object.isOrthographicCamera?H/=p:(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),r.enableZoom=!1)}function Te(p){r.object.isPerspectiveCamera||r.object.isOrthographicCamera?H*=p:(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),r.enableZoom=!1)}function _e(p,P){if(!r.zoomToCursor)return;nt=!0;const F=r.domElement.getBoundingClientRect(),Q=p-F.left,ye=P-F.top,wt=F.width,Fe=F.height;ee.x=Q/wt*2-1,ee.y=-(ye/Fe)*2+1,Ie.set(ee.x,ee.y,1).unproject(r.object).sub(r.object.position).normalize()}function Ze(p){return Math.max(r.minDistance,Math.min(r.maxDistance,p))}function we(p){ce.set(p.clientX,p.clientY)}function Ft(p){_e(p.clientX,p.clientX),re.set(p.clientX,p.clientY)}function yn(p){me.set(p.clientX,p.clientY)}function En(p){Re.set(p.clientX,p.clientY),Pe.subVectors(Re,ce).multiplyScalar(r.rotateSpeed);const P=r.domElement;Rt(2*Math.PI*Pe.x/P.clientHeight),zt(2*Math.PI*Pe.y/P.clientHeight),ce.copy(Re),r.update()}function Wt(p){ne.set(p.clientX,p.clientY),j.subVectors(ne,re),j.y>0?ge(kt(j.y)):j.y<0&&Te(kt(j.y)),re.copy(ne),r.update()}function xn(p){ue.set(p.clientX,p.clientY),K.subVectors(ue,me).multiplyScalar(r.panSpeed),je(K.x,K.y),me.copy(ue),r.update()}function Ar(p){_e(p.clientX,p.clientY),p.deltaY<0?Te(kt(p.deltaY)):p.deltaY>0&&ge(kt(p.deltaY)),r.update()}function nn(p){let P=!1;switch(p.code){case r.keys.UP:p.ctrlKey||p.metaKey||p.shiftKey?zt(2*Math.PI*r.rotateSpeed/r.domElement.clientHeight):je(0,r.keyPanSpeed),P=!0;break;case r.keys.BOTTOM:p.ctrlKey||p.metaKey||p.shiftKey?zt(-2*Math.PI*r.rotateSpeed/r.domElement.clientHeight):je(0,-r.keyPanSpeed),P=!0;break;case r.keys.LEFT:p.ctrlKey||p.metaKey||p.shiftKey?Rt(2*Math.PI*r.rotateSpeed/r.domElement.clientHeight):je(r.keyPanSpeed,0),P=!0;break;case r.keys.RIGHT:p.ctrlKey||p.metaKey||p.shiftKey?Rt(-2*Math.PI*r.rotateSpeed/r.domElement.clientHeight):je(-r.keyPanSpeed,0),P=!0;break}P&&(p.preventDefault(),r.update())}function Vt(p){if(Z.length===1)ce.set(p.pageX,p.pageY);else{const P=vt(p),F=.5*(p.pageX+P.x),Q=.5*(p.pageY+P.y);ce.set(F,Q)}}function bi(p){if(Z.length===1)me.set(p.pageX,p.pageY);else{const P=vt(p),F=.5*(p.pageX+P.x),Q=.5*(p.pageY+P.y);me.set(F,Q)}}function rn(p){const P=vt(p),F=p.pageX-P.x,Q=p.pageY-P.y,ye=Math.sqrt(F*F+Q*Q);re.set(0,ye)}function Sn(p){r.enableZoom&&rn(p),r.enablePan&&bi(p)}function vi(p){r.enableZoom&&rn(p),r.enableRotate&&Vt(p)}function ze(p){if(Z.length==1)Re.set(p.pageX,p.pageY);else{const F=vt(p),Q=.5*(p.pageX+F.x),ye=.5*(p.pageY+F.y);Re.set(Q,ye)}Pe.subVectors(Re,ce).multiplyScalar(r.rotateSpeed);const P=r.domElement;Rt(2*Math.PI*Pe.x/P.clientHeight),zt(2*Math.PI*Pe.y/P.clientHeight),ce.copy(Re)}function Nt(p){if(Z.length===1)ue.set(p.pageX,p.pageY);else{const P=vt(p),F=.5*(p.pageX+P.x),Q=.5*(p.pageY+P.y);ue.set(F,Q)}K.subVectors(ue,me).multiplyScalar(r.panSpeed),je(K.x,K.y),me.copy(ue)}function wi(p){const P=vt(p),F=p.pageX-P.x,Q=p.pageY-P.y,ye=Math.sqrt(F*F+Q*Q);ne.set(0,ye),j.set(0,Math.pow(ne.y/re.y,r.zoomSpeed)),ge(j.y),re.copy(ne);const wt=(p.pageX+P.x)*.5,Fe=(p.pageY+P.y)*.5;_e(wt,Fe)}function ht(p){r.enableZoom&&wi(p),r.enablePan&&Nt(p)}function yi(p){r.enableZoom&&wi(p),r.enableRotate&&ze(p)}function Ei(p){r.enabled!==!1&&(Z.length===0&&(r.domElement.setPointerCapture(p.pointerId),r.domElement.addEventListener("pointermove",Pt),r.domElement.addEventListener("pointerup",Se)),!Qn(p)&&(jn(p),p.pointerType==="touch"?An(p):sn(p)))}function Pt(p){r.enabled!==!1&&(p.pointerType==="touch"?Xn(p):Mn(p))}function Se(p){switch(Zn(p),Z.length){case 0:r.domElement.releasePointerCapture(p.pointerId),r.domElement.removeEventListener("pointermove",Pt),r.domElement.removeEventListener("pointerup",Se),r.dispatchEvent(Al),v=f.NONE;break;case 1:const P=Z[0],F=Xe[P];An({pointerId:P,pageX:F.x,pageY:F.y});break}}function sn(p){let P;switch(p.button){case 0:P=r.mouseButtons.LEFT;break;case 1:P=r.mouseButtons.MIDDLE;break;case 2:P=r.mouseButtons.RIGHT;break;default:P=-1}switch(P){case u.MOUSE.DOLLY:if(r.enableZoom===!1)return;Ft(p),v=f.DOLLY;break;case u.MOUSE.ROTATE:if(p.ctrlKey||p.metaKey||p.shiftKey){if(r.enablePan===!1)return;yn(p),v=f.PAN}else{if(r.enableRotate===!1)return;we(p),v=f.ROTATE}break;case u.MOUSE.PAN:if(p.ctrlKey||p.metaKey||p.shiftKey){if(r.enableRotate===!1)return;we(p),v=f.ROTATE}else{if(r.enablePan===!1)return;yn(p),v=f.PAN}break;default:v=f.NONE}v!==f.NONE&&r.dispatchEvent(zs)}function Mn(p){switch(v){case f.ROTATE:if(r.enableRotate===!1)return;En(p);break;case f.DOLLY:if(r.enableZoom===!1)return;Wt(p);break;case f.PAN:if(r.enablePan===!1)return;xn(p);break}}function xi(p){r.enabled===!1||r.enableZoom===!1||v!==f.NONE||(p.preventDefault(),r.dispatchEvent(zs),Ar(on(p)),r.dispatchEvent(Al))}function on(p){const P=p.deltaMode,F={clientX:p.clientX,clientY:p.clientY,deltaY:p.deltaY};switch(P){case 1:F.deltaY*=16;break;case 2:F.deltaY*=100;break}return p.ctrlKey&&!At&&(F.deltaY*=10),F}function Si(p){p.key==="Control"&&(At=!0,r.domElement.getRootNode().addEventListener("keyup",Ht,{passive:!0,capture:!0}))}function Ht(p){p.key==="Control"&&(At=!1,r.domElement.getRootNode().removeEventListener("keyup",Ht,{passive:!0,capture:!0}))}function bt(p){r.enabled===!1||r.enablePan===!1||nn(p)}function An(p){switch(Pn(p),Z.length){case 1:switch(r.touches.ONE){case u.TOUCH.ROTATE:if(r.enableRotate===!1)return;Vt(p),v=f.TOUCH_ROTATE;break;case u.TOUCH.PAN:if(r.enablePan===!1)return;bi(p),v=f.TOUCH_PAN;break;default:v=f.NONE}break;case 2:switch(r.touches.TWO){case u.TOUCH.DOLLY_PAN:if(r.enableZoom===!1&&r.enablePan===!1)return;Sn(p),v=f.TOUCH_DOLLY_PAN;break;case u.TOUCH.DOLLY_ROTATE:if(r.enableZoom===!1&&r.enableRotate===!1)return;vi(p),v=f.TOUCH_DOLLY_ROTATE;break;default:v=f.NONE}break;default:v=f.NONE}v!==f.NONE&&r.dispatchEvent(zs)}function Xn(p){switch(Pn(p),v){case f.TOUCH_ROTATE:if(r.enableRotate===!1)return;ze(p),r.update();break;case f.TOUCH_PAN:if(r.enablePan===!1)return;Nt(p),r.update();break;case f.TOUCH_DOLLY_PAN:if(r.enableZoom===!1&&r.enablePan===!1)return;ht(p),r.update();break;case f.TOUCH_DOLLY_ROTATE:if(r.enableZoom===!1&&r.enableRotate===!1)return;yi(p),r.update();break;default:v=f.NONE}}function Rn(p){r.enabled!==!1&&p.preventDefault()}function jn(p){Z.push(p.pointerId)}function Zn(p){delete Xe[p.pointerId];for(let P=0;P<Z.length;P++)if(Z[P]==p.pointerId){Z.splice(P,1);return}}function Qn(p){for(let P=0;P<Z.length;P++)if(Z[P]==p.pointerId)return!0;return!1}function Pn(p){let P=Xe[p.pointerId];P===void 0&&(P=new u.Vector2,Xe[p.pointerId]=P),P.set(p.pageX,p.pageY)}function vt(p){const P=p.pointerId===Z[0]?Z[1]:Z[0];return Xe[P]}r.domElement.addEventListener("contextmenu",Rn),r.domElement.addEventListener("pointerdown",Ei),r.domElement.addEventListener("pointercancel",Se),r.domElement.addEventListener("wheel",xi,{passive:!1}),r.domElement.getRootNode().addEventListener("keydown",Si,{passive:!0,capture:!0}),this.update()}}const yr={enableDamping:!0,dampingFactor:.04},mi=class mi extends _0{constructor(i,r,f,v=yr){super(i,r.domElement);y(this,"_animationSystem");y(this,"last",null);y(this,"animating",!1);y(this,"locked",!1);y(this,"stopMoveTo",()=>{});y(this,"stopRevertLast",()=>{});y(this,"object");y(this,"domElement");y(this,"_removePreRenderCallback",()=>{});y(this,"preRenderCallback",()=>{this.locked||this.update()});this._animationSystem=f,this.domElement=r.domElement,this.object=i;const g=r.AddPreRenderCallback(()=>{this.preRenderCallback()});this._removePreRenderCallback=()=>{r.RemovePreRenderCallback(g)},this.enableDamping=v.enableDamping||yr.enableDamping,this.dampingFactor=v.dampingFactor||yr.dampingFactor,this.object.position.set(0,2,2),this.target.copy({x:0,y:.5,z:0}),this.update()}Dispose(){this._removePreRenderCallback(),this.dispose()}ComputeEncompassingView(i){const r=i.getCenter(new u.Vector3),f=i.getSize(new u.Vector3),v=Math.max(f.x,f.y,f.z)*1.25;return{position:this.object.position.clone().normalize().multiplyScalar(v),target:r}}ZoomIn(i){const r=i||mi.DEFAULT_ZOOM_FACTOR,{minDistance:f,maxDistance:v}=this;this.minDistance=this.maxDistance=u.MathUtils.clamp(this.getDistance()-r,f+r,v-r),this.update(),this.minDistance=f,this.maxDistance=v}ZoomOut(i){const r=i||mi.DEFAULT_ZOOM_FACTOR,{minDistance:f,maxDistance:v}=this;this.minDistance=this.maxDistance=u.MathUtils.clamp(this.getDistance()+r,f+r,v-r),this.update(),this.minDistance=f,this.maxDistance=v}MoveTo(i,r,f,v){if(this.animating)return;const g=i||this.object.position.clone(),R=r||this.target.clone();this.stopRevertLast(),this.locked||(this.last={pos:this.object.position.clone(),target:this.target.clone()}),this.animating=f>0,this.locked=v,this.enabled=!1;const D=this._animationSystem.Animate(this.object.position).to(g,f).easing(Nn.Easing.Quadratic.Out).start(),H=this._animationSystem.Animate(this.target).to(R,f).easing(Nn.Easing.Quadratic.Out).onUpdate(()=>{this.object.lookAt(this.target)}).onComplete(()=>{this.animating=!1,this.enabled=!v}).start();this.stopMoveTo=()=>{D.stop(),H.stop()}}RevertLast(i){if(this.animating||!this.locked)return;this.stopMoveTo(),this.animating=i>0,this.enabled=!1;const{pos:r,target:f}=this.last,v=this._animationSystem.Animate(this.object.position).to(r,i).easing(Nn.Easing.Quadratic.Out).start(),g=this._animationSystem.Animate(this.target).to(f,i).easing(Nn.Easing.Quadratic.Out).onUpdate(()=>{this.object.lookAt(this.target)}).onComplete(()=>{this.animating=!1,this.locked=!1,this.enabled=!0}).start();this.stopRevertLast=()=>{v.stop(),g.stop()}}};y(mi,"DEFAULT_ZOOM_FACTOR",1);let Vs=mi;function Er(M,a){return M?a in M:!1}function Sr(M,a){if(M)return Er(M,a)?M:Sr(M.parent,a)}class m0{constructor(a,i){y(this,"POINTER_DRAG_THRESHOLD",.001);y(this,"name");y(this,"_canvas");y(this,"_scene");y(this,"_controller");y(this,"_pointer");y(this,"_pointerPrimaryDown");y(this,"_pointerMiddleDown");y(this,"_pointerSecondaryDown");y(this,"_lastPointerDown");y(this,"_lastPointerUp");y(this,"_raycaster");y(this,"_intersects");y(this,"_hovered");y(this,"_dragging");y(this,"_dragStart");y(this,"_dragCurrent");y(this,"_dragEnd");y(this,"_dragDelta");y(this,"_draggable");y(this,"_dragRaycastOnObjects");this.name="BaseTool",this._canvas=i.domElement,this._scene=a,this._controller=i,this._pointer=new u.Vector2,this._pointerPrimaryDown=!1,this._pointerMiddleDown=!1,this._pointerSecondaryDown=!1,this._lastPointerDown=new u.Vector2,this._lastPointerUp=new u.Vector2,this._raycaster=new u.Raycaster,this._raycaster.layers.mask=pe.PRODUCT_LAYER_MASK|pe.UI_LAYER_MASK,this._intersects=[],this._hovered=null,this._dragging=!1,this._dragStart=new u.Vector3,this._dragCurrent=new u.Vector3,this._dragEnd=new u.Vector3,this._dragDelta=new u.Vector3,this._draggable=null,this._dragRaycastOnObjects=null}get _pointerAnyDown(){return this._pointerPrimaryDown||this._pointerMiddleDown||this._pointerSecondaryDown}Activate(){}Deactivate(){}onPointerDown(a){var i;switch(a.button){case 0:{this._pointerPrimaryDown=!0;break}case 1:{this._pointerMiddleDown=!0;break}case 2:{this._pointerSecondaryDown=!0;break}default:console.warn("DIVEBaseTool.onPointerDown: Unknown button: "+a.button)}this._lastPointerDown.copy(this._pointer),this._draggable=Sr((i=this._intersects[0])==null?void 0:i.object,"isDraggable")||null}onDragStart(a){this._draggable&&(this._dragRaycastOnObjects!==null&&(this._intersects=this._raycaster.intersectObjects(this._dragRaycastOnObjects,!0)),this._intersects.length!==0&&(this._dragStart.copy(this._intersects[0].point.clone()),this._dragCurrent.copy(this._intersects[0].point.clone()),this._dragEnd.copy(this._dragStart.clone()),this._dragDelta.set(0,0,0),this._draggable&&this._draggable.onDragStart&&(this._draggable.onDragStart({dragStart:this._dragStart,dragCurrent:this._dragCurrent,dragEnd:this._dragEnd,dragDelta:this._dragDelta}),this._dragging=!0,this._controller.enabled=!1)))}onPointerMove(a){var r;this._pointer.x=a.offsetX/this._canvas.clientWidth*2-1,this._pointer.y=-(a.offsetY/this._canvas.clientHeight)*2+1,this._raycaster.setFromCamera(this._pointer,this._controller.object),this._intersects=this.raycast(this._scene.children);const i=Sr((r=this._intersects[0])==null?void 0:r.object,"isHoverable");if(this._intersects[0]&&i){if(!this._hovered){i.onPointerEnter&&i.onPointerEnter(this._intersects[0]),this._hovered=i;return}if(this._hovered.uuid!==i.uuid){this._hovered.onPointerLeave&&this._hovered.onPointerLeave(),i.onPointerEnter&&i.onPointerEnter(this._intersects[0]),this._hovered=i;return}i.onPointerOver&&i.onPointerOver(this._intersects[0]),this._hovered=i}else this._hovered&&this._hovered.onPointerLeave&&this._hovered.onPointerLeave(),this._hovered=null;this._pointerAnyDown&&(this._dragging||this.onDragStart(a),this.onDrag(a))}onDrag(a){this._dragRaycastOnObjects!==null&&(this._intersects=this._raycaster.intersectObjects(this._dragRaycastOnObjects,!0));const i=this._intersects[0];i&&(this._dragCurrent.copy(i.point.clone()),this._dragEnd.copy(i.point.clone()),this._dragDelta.subVectors(this._dragCurrent.clone(),this._dragStart.clone()),this._draggable&&this._draggable.onDrag&&this._draggable.onDrag({dragStart:this._dragStart,dragCurrent:this._dragCurrent,dragEnd:this._dragEnd,dragDelta:this._dragDelta}))}onPointerUp(a){switch(this.pointerWasDragged()||this._dragging?this._draggable&&this.onDragEnd(a):this.onClick(a),a.button){case 0:this._pointerPrimaryDown=!1;break;case 1:this._pointerMiddleDown=!1;break;case 2:this._pointerSecondaryDown=!1;break}this._lastPointerUp.copy(this._pointer)}onClick(a){}onDragEnd(a){const i=this._intersects[0];i&&(this._dragEnd.copy(i.point.clone()),this._dragCurrent.copy(i.point.clone()),this._dragDelta.subVectors(this._dragCurrent.clone(),this._dragStart.clone())),this._draggable&&this._draggable.onDragEnd&&this._draggable.onDragEnd({dragStart:this._dragStart,dragCurrent:this._dragCurrent,dragEnd:this._dragEnd,dragDelta:this._dragDelta}),this._draggable=null,this._dragging=!1,this._dragStart.set(0,0,0),this._dragCurrent.set(0,0,0),this._dragEnd.set(0,0,0),this._dragDelta.set(0,0,0),this._controller.enabled=!0}onWheel(a){}raycast(a){return a!==void 0?this._raycaster.intersectObjects(a,!0).filter(i=>i.object.visible):this._raycaster.intersectObjects(this._scene.children,!0).filter(i=>i.object.visible)}pointerWasDragged(){return this._lastPointerDown.distanceTo(this._pointer)>this.POINTER_DRAG_THRESHOLD}}const bn=new u.Raycaster,Ce=new u.Vector3,tn=new u.Vector3,oe=new u.Quaternion,Pl={X:new u.Vector3(1,0,0),Y:new u.Vector3(0,1,0),Z:new u.Vector3(0,0,1)},Fs={type:"change"},Tl={type:"mouseDown"},Ll={type:"mouseUp",mode:null},Ol={type:"objectChange"};class b0 extends u.Object3D{constructor(a,i){super(),i===void 0&&(console.warn('THREE.TransformControls: The second parameter "domElement" is now mandatory.'),i=document),this.isTransformControls=!0,this.visible=!1,this.domElement=i,this.domElement.style.touchAction="none";const r=new S0;this._gizmo=r,this.add(r);const f=new M0;this._plane=f,this.add(f);const v=this;function g(ne,j){let Ie=j;Object.defineProperty(v,ne,{get:function(){return Ie!==void 0?Ie:j},set:function(ee){Ie!==ee&&(Ie=ee,f[ne]=ee,r[ne]=ee,v.dispatchEvent({type:ne+"-changed",value:ee}),v.dispatchEvent(Fs))}}),v[ne]=j,f[ne]=j,r[ne]=j}g("camera",a),g("object",void 0),g("enabled",!0),g("axis",null),g("mode","translate"),g("translationSnap",null),g("rotationSnap",null),g("scaleSnap",null),g("space","world"),g("size",1),g("dragging",!1),g("showX",!0),g("showY",!0),g("showZ",!0);const R=new u.Vector3,D=new u.Vector3,H=new u.Quaternion,le=new u.Quaternion,ce=new u.Vector3,Re=new u.Quaternion,Pe=new u.Vector3,me=new u.Vector3,ue=new u.Vector3,K=0,re=new u.Vector3;g("worldPosition",R),g("worldPositionStart",D),g("worldQuaternion",H),g("worldQuaternionStart",le),g("cameraPosition",ce),g("cameraQuaternion",Re),g("pointStart",Pe),g("pointEnd",me),g("rotationAxis",ue),g("rotationAngle",K),g("eye",re),this._offset=new u.Vector3,this._startNorm=new u.Vector3,this._endNorm=new u.Vector3,this._cameraScale=new u.Vector3,this._parentPosition=new u.Vector3,this._parentQuaternion=new u.Quaternion,this._parentQuaternionInv=new u.Quaternion,this._parentScale=new u.Vector3,this._worldScaleStart=new u.Vector3,this._worldQuaternionInv=new u.Quaternion,this._worldScale=new u.Vector3,this._positionStart=new u.Vector3,this._quaternionStart=new u.Quaternion,this._scaleStart=new u.Vector3,this._getPointer=v0.bind(this),this._onPointerDown=y0.bind(this),this._onPointerHover=w0.bind(this),this._onPointerMove=E0.bind(this),this._onPointerUp=x0.bind(this),this.domElement.addEventListener("pointerdown",this._onPointerDown),this.domElement.addEventListener("pointermove",this._onPointerHover),this.domElement.addEventListener("pointerup",this._onPointerUp)}updateMatrixWorld(a){this.object!==void 0&&(this.object.updateMatrixWorld(),this.object.parent===null?console.error("TransformControls: The attached 3D object must be a part of the scene graph."):this.object.parent.matrixWorld.decompose(this._parentPosition,this._parentQuaternion,this._parentScale),this.object.matrixWorld.decompose(this.worldPosition,this.worldQuaternion,this._worldScale),this._parentQuaternionInv.copy(this._parentQuaternion).invert(),this._worldQuaternionInv.copy(this.worldQuaternion).invert()),this.camera.updateMatrixWorld(),this.camera.matrixWorld.decompose(this.cameraPosition,this.cameraQuaternion,this._cameraScale),this.camera.isOrthographicCamera?this.camera.getWorldDirection(this.eye).negate():this.eye.copy(this.cameraPosition).sub(this.worldPosition).normalize(),super.updateMatrixWorld(a)}pointerHover(a){if(this.object===void 0||this.dragging===!0)return;a!==null&&bn.setFromCamera(a,this.camera);const i=Ws(this._gizmo.picker[this.mode],bn);i?this.axis=i.object.name:this.axis=null}pointerDown(a){if(!(this.object===void 0||this.dragging===!0||a!=null&&a.button!==0)&&this.axis!==null){a!==null&&bn.setFromCamera(a,this.camera);const i=Ws(this._plane,bn,!0);i&&(this.object.updateMatrixWorld(),this.object.parent.updateMatrixWorld(),this._positionStart.copy(this.object.position),this._quaternionStart.copy(this.object.quaternion),this._scaleStart.copy(this.object.scale),this.object.matrixWorld.decompose(this.worldPositionStart,this.worldQuaternionStart,this._worldScaleStart),this.pointStart.copy(i.point).sub(this.worldPositionStart)),this.dragging=!0,Tl.mode=this.mode,this.dispatchEvent(Tl)}}pointerMove(a){const i=this.axis,r=this.mode,f=this.object;let v=this.space;if(r==="scale"?v="local":(i==="E"||i==="XYZE"||i==="XYZ")&&(v="world"),f===void 0||i===null||this.dragging===!1||a!==null&&a.button!==-1)return;a!==null&&bn.setFromCamera(a,this.camera);const g=Ws(this._plane,bn,!0);if(g){if(this.pointEnd.copy(g.point).sub(this.worldPositionStart),r==="translate")this._offset.copy(this.pointEnd).sub(this.pointStart),v==="local"&&i!=="XYZ"&&this._offset.applyQuaternion(this._worldQuaternionInv),i.indexOf("X")===-1&&(this._offset.x=0),i.indexOf("Y")===-1&&(this._offset.y=0),i.indexOf("Z")===-1&&(this._offset.z=0),v==="local"&&i!=="XYZ"?this._offset.applyQuaternion(this._quaternionStart).divide(this._parentScale):this._offset.applyQuaternion(this._parentQuaternionInv).divide(this._parentScale),f.position.copy(this._offset).add(this._positionStart),this.translationSnap&&(v==="local"&&(f.position.applyQuaternion(oe.copy(this._quaternionStart).invert()),i.search("X")!==-1&&(f.position.x=Math.round(f.position.x/this.translationSnap)*this.translationSnap),i.search("Y")!==-1&&(f.position.y=Math.round(f.position.y/this.translationSnap)*this.translationSnap),i.search("Z")!==-1&&(f.position.z=Math.round(f.position.z/this.translationSnap)*this.translationSnap),f.position.applyQuaternion(this._quaternionStart)),v==="world"&&(f.parent&&f.position.add(Ce.setFromMatrixPosition(f.parent.matrixWorld)),i.search("X")!==-1&&(f.position.x=Math.round(f.position.x/this.translationSnap)*this.translationSnap),i.search("Y")!==-1&&(f.position.y=Math.round(f.position.y/this.translationSnap)*this.translationSnap),i.search("Z")!==-1&&(f.position.z=Math.round(f.position.z/this.translationSnap)*this.translationSnap),f.parent&&f.position.sub(Ce.setFromMatrixPosition(f.parent.matrixWorld))));else if(r==="scale"){if(i.search("XYZ")!==-1){let R=this.pointEnd.length()/this.pointStart.length();this.pointEnd.dot(this.pointStart)<0&&(R*=-1),tn.set(R,R,R)}else Ce.copy(this.pointStart),tn.copy(this.pointEnd),Ce.applyQuaternion(this._worldQuaternionInv),tn.applyQuaternion(this._worldQuaternionInv),tn.divide(Ce),i.search("X")===-1&&(tn.x=1),i.search("Y")===-1&&(tn.y=1),i.search("Z")===-1&&(tn.z=1);f.scale.copy(this._scaleStart).multiply(tn),this.scaleSnap&&(i.search("X")!==-1&&(f.scale.x=Math.round(f.scale.x/this.scaleSnap)*this.scaleSnap||this.scaleSnap),i.search("Y")!==-1&&(f.scale.y=Math.round(f.scale.y/this.scaleSnap)*this.scaleSnap||this.scaleSnap),i.search("Z")!==-1&&(f.scale.z=Math.round(f.scale.z/this.scaleSnap)*this.scaleSnap||this.scaleSnap))}else if(r==="rotate"){this._offset.copy(this.pointEnd).sub(this.pointStart);const R=20/this.worldPosition.distanceTo(Ce.setFromMatrixPosition(this.camera.matrixWorld));let D=!1;i==="XYZE"?(this.rotationAxis.copy(this._offset).cross(this.eye).normalize(),this.rotationAngle=this._offset.dot(Ce.copy(this.rotationAxis).cross(this.eye))*R):(i==="X"||i==="Y"||i==="Z")&&(this.rotationAxis.copy(Pl[i]),Ce.copy(Pl[i]),v==="local"&&Ce.applyQuaternion(this.worldQuaternion),Ce.cross(this.eye),Ce.length()===0?D=!0:this.rotationAngle=this._offset.dot(Ce.normalize())*R),(i==="E"||D)&&(this.rotationAxis.copy(this.eye),this.rotationAngle=this.pointEnd.angleTo(this.pointStart),this._startNorm.copy(this.pointStart).normalize(),this._endNorm.copy(this.pointEnd).normalize(),this.rotationAngle*=this._endNorm.cross(this._startNorm).dot(this.eye)<0?1:-1),this.rotationSnap&&(this.rotationAngle=Math.round(this.rotationAngle/this.rotationSnap)*this.rotationSnap),v==="local"&&i!=="E"&&i!=="XYZE"?(f.quaternion.copy(this._quaternionStart),f.quaternion.multiply(oe.setFromAxisAngle(this.rotationAxis,this.rotationAngle)).normalize()):(this.rotationAxis.applyQuaternion(this._parentQuaternionInv),f.quaternion.copy(oe.setFromAxisAngle(this.rotationAxis,this.rotationAngle)),f.quaternion.multiply(this._quaternionStart).normalize())}this.dispatchEvent(Fs),this.dispatchEvent(Ol)}}pointerUp(a){a!==null&&a.button!==0||(this.dragging&&this.axis!==null&&(Ll.mode=this.mode,this.dispatchEvent(Ll)),this.dragging=!1,this.axis=null)}dispose(){this.domElement.removeEventListener("pointerdown",this._onPointerDown),this.domElement.removeEventListener("pointermove",this._onPointerHover),this.domElement.removeEventListener("pointermove",this._onPointerMove),this.domElement.removeEventListener("pointerup",this._onPointerUp),this.traverse(function(a){a.geometry&&a.geometry.dispose(),a.material&&a.material.dispose()})}attach(a){return this.object=a,this.visible=!0,this}detach(){return this.object=void 0,this.visible=!1,this.axis=null,this}reset(){this.enabled&&this.dragging&&(this.object.position.copy(this._positionStart),this.object.quaternion.copy(this._quaternionStart),this.object.scale.copy(this._scaleStart),this.dispatchEvent(Fs),this.dispatchEvent(Ol),this.pointStart.copy(this.pointEnd))}getRaycaster(){return bn}getMode(){return this.mode}setMode(a){this.mode=a}setTranslationSnap(a){this.translationSnap=a}setRotationSnap(a){this.rotationSnap=a}setScaleSnap(a){this.scaleSnap=a}setSize(a){this.size=a}setSpace(a){this.space=a}}function v0(M){if(this.domElement.ownerDocument.pointerLockElement)return{x:0,y:0,button:M.button};{const a=this.domElement.getBoundingClientRect();return{x:(M.clientX-a.left)/a.width*2-1,y:-(M.clientY-a.top)/a.height*2+1,button:M.button}}}function w0(M){if(this.enabled)switch(M.pointerType){case"mouse":case"pen":this.pointerHover(this._getPointer(M));break}}function y0(M){this.enabled&&(document.pointerLockElement||this.domElement.setPointerCapture(M.pointerId),this.domElement.addEventListener("pointermove",this._onPointerMove),this.pointerHover(this._getPointer(M)),this.pointerDown(this._getPointer(M)))}function E0(M){this.enabled&&this.pointerMove(this._getPointer(M))}function x0(M){this.enabled&&(this.domElement.releasePointerCapture(M.pointerId),this.domElement.removeEventListener("pointermove",this._onPointerMove),this.pointerUp(this._getPointer(M)))}function Ws(M,a,i){const r=a.intersectObject(M,!0);for(let f=0;f<r.length;f++)if(r[f].object.visible||i)return r[f];return!1}const _r=new u.Euler,J=new u.Vector3(0,1,0),Dl=new u.Vector3(0,0,0),Cl=new u.Matrix4,mr=new u.Quaternion,xr=new u.Quaternion,St=new u.Vector3,Il=new u.Matrix4,pi=new u.Vector3(1,0,0),vn=new u.Vector3(0,1,0),gi=new u.Vector3(0,0,1),br=new u.Vector3,fi=new u.Vector3,di=new u.Vector3;class S0 extends u.Object3D{constructor(){super(),this.isTransformControlsGizmo=!0,this.type="TransformControlsGizmo";const a=new u.MeshBasicMaterial({depthTest:!1,depthWrite:!1,fog:!1,toneMapped:!1,transparent:!0}),i=new u.LineBasicMaterial({depthTest:!1,depthWrite:!1,fog:!1,toneMapped:!1,transparent:!0}),r=a.clone();r.opacity=.15;const f=i.clone();f.opacity=.5;const v=a.clone();v.color.setHex(16711680);const g=a.clone();g.color.setHex(65280);const R=a.clone();R.color.setHex(255);const D=a.clone();D.color.setHex(16711680),D.opacity=.5;const H=a.clone();H.color.setHex(65280),H.opacity=.5;const le=a.clone();le.color.setHex(255),le.opacity=.5;const ce=a.clone();ce.opacity=.25;const Re=a.clone();Re.color.setHex(16776960),Re.opacity=.25,a.clone().color.setHex(16776960);const me=a.clone();me.color.setHex(7895160);const ue=new u.CylinderGeometry(0,.04,.1,12);ue.translate(0,.05,0);const K=new u.BoxGeometry(.08,.08,.08);K.translate(0,.04,0);const re=new u.BufferGeometry;re.setAttribute("position",new u.Float32BufferAttribute([0,0,0,1,0,0],3));const ne=new u.CylinderGeometry(.0075,.0075,.5,3);ne.translate(0,.25,0);function j(xe,je){const ge=new u.TorusGeometry(xe,.0075,3,64,je*Math.PI*2);return ge.rotateY(Math.PI/2),ge.rotateX(Math.PI/2),ge}function Ie(){const xe=new u.BufferGeometry;return xe.setAttribute("position",new u.Float32BufferAttribute([0,0,0,1,1,1],3)),xe}const ee={X:[[new u.Mesh(ue,v),[.5,0,0],[0,0,-Math.PI/2]],[new u.Mesh(ue,v),[-.5,0,0],[0,0,Math.PI/2]],[new u.Mesh(ne,v),[0,0,0],[0,0,-Math.PI/2]]],Y:[[new u.Mesh(ue,g),[0,.5,0]],[new u.Mesh(ue,g),[0,-.5,0],[Math.PI,0,0]],[new u.Mesh(ne,g)]],Z:[[new u.Mesh(ue,R),[0,0,.5],[Math.PI/2,0,0]],[new u.Mesh(ue,R),[0,0,-.5],[-Math.PI/2,0,0]],[new u.Mesh(ne,R),null,[Math.PI/2,0,0]]],XYZ:[[new u.Mesh(new u.OctahedronGeometry(.1,0),ce.clone()),[0,0,0]]],XY:[[new u.Mesh(new u.BoxGeometry(.15,.15,.01),le.clone()),[.15,.15,0]]],YZ:[[new u.Mesh(new u.BoxGeometry(.15,.15,.01),D.clone()),[0,.15,.15],[0,Math.PI/2,0]]],XZ:[[new u.Mesh(new u.BoxGeometry(.15,.15,.01),H.clone()),[.15,0,.15],[-Math.PI/2,0,0]]]},nt={X:[[new u.Mesh(new u.CylinderGeometry(.2,0,.6,4),r),[.3,0,0],[0,0,-Math.PI/2]],[new u.Mesh(new u.CylinderGeometry(.2,0,.6,4),r),[-.3,0,0],[0,0,Math.PI/2]]],Y:[[new u.Mesh(new u.CylinderGeometry(.2,0,.6,4),r),[0,.3,0]],[new u.Mesh(new u.CylinderGeometry(.2,0,.6,4),r),[0,-.3,0],[0,0,Math.PI]]],Z:[[new u.Mesh(new u.CylinderGeometry(.2,0,.6,4),r),[0,0,.3],[Math.PI/2,0,0]],[new u.Mesh(new u.CylinderGeometry(.2,0,.6,4),r),[0,0,-.3],[-Math.PI/2,0,0]]],XYZ:[[new u.Mesh(new u.OctahedronGeometry(.2,0),r)]],XY:[[new u.Mesh(new u.BoxGeometry(.2,.2,.01),r),[.15,.15,0]]],YZ:[[new u.Mesh(new u.BoxGeometry(.2,.2,.01),r),[0,.15,.15],[0,Math.PI/2,0]]],XZ:[[new u.Mesh(new u.BoxGeometry(.2,.2,.01),r),[.15,0,.15],[-Math.PI/2,0,0]]]},Z={START:[[new u.Mesh(new u.OctahedronGeometry(.01,2),f),null,null,null,"helper"]],END:[[new u.Mesh(new u.OctahedronGeometry(.01,2),f),null,null,null,"helper"]],DELTA:[[new u.Line(Ie(),f),null,null,null,"helper"]],X:[[new u.Line(re,f.clone()),[-1e3,0,0],null,[1e6,1,1],"helper"]],Y:[[new u.Line(re,f.clone()),[0,-1e3,0],[0,0,Math.PI/2],[1e6,1,1],"helper"]],Z:[[new u.Line(re,f.clone()),[0,0,-1e3],[0,-Math.PI/2,0],[1e6,1,1],"helper"]]},Xe={XYZE:[[new u.Mesh(j(.5,1),me),null,[0,Math.PI/2,0]]],X:[[new u.Mesh(j(.5,.5),v)]],Y:[[new u.Mesh(j(.5,.5),g),null,[0,0,-Math.PI/2]]],Z:[[new u.Mesh(j(.5,.5),R),null,[0,Math.PI/2,0]]],E:[[new u.Mesh(j(.75,1),Re),null,[0,Math.PI/2,0]]]},At={AXIS:[[new u.Line(re,f.clone()),[-1e3,0,0],null,[1e6,1,1],"helper"]]},Yn={XYZE:[[new u.Mesh(new u.SphereGeometry(.25,10,8),r)]],X:[[new u.Mesh(new u.TorusGeometry(.5,.1,4,24),r),[0,0,0],[0,-Math.PI/2,-Math.PI/2]]],Y:[[new u.Mesh(new u.TorusGeometry(.5,.1,4,24),r),[0,0,0],[Math.PI/2,0,0]]],Z:[[new u.Mesh(new u.TorusGeometry(.5,.1,4,24),r),[0,0,0],[0,0,-Math.PI/2]]],E:[[new u.Mesh(new u.TorusGeometry(.75,.1,2,24),r)]]},kt={X:[[new u.Mesh(K,v),[.5,0,0],[0,0,-Math.PI/2]],[new u.Mesh(ne,v),[0,0,0],[0,0,-Math.PI/2]],[new u.Mesh(K,v),[-.5,0,0],[0,0,Math.PI/2]]],Y:[[new u.Mesh(K,g),[0,.5,0]],[new u.Mesh(ne,g)],[new u.Mesh(K,g),[0,-.5,0],[0,0,Math.PI]]],Z:[[new u.Mesh(K,R),[0,0,.5],[Math.PI/2,0,0]],[new u.Mesh(ne,R),[0,0,0],[Math.PI/2,0,0]],[new u.Mesh(K,R),[0,0,-.5],[-Math.PI/2,0,0]]],XY:[[new u.Mesh(new u.BoxGeometry(.15,.15,.01),le),[.15,.15,0]]],YZ:[[new u.Mesh(new u.BoxGeometry(.15,.15,.01),D),[0,.15,.15],[0,Math.PI/2,0]]],XZ:[[new u.Mesh(new u.BoxGeometry(.15,.15,.01),H),[.15,0,.15],[-Math.PI/2,0,0]]],XYZ:[[new u.Mesh(new u.BoxGeometry(.1,.1,.1),ce.clone())]]},Rt={X:[[new u.Mesh(new u.CylinderGeometry(.2,0,.6,4),r),[.3,0,0],[0,0,-Math.PI/2]],[new u.Mesh(new u.CylinderGeometry(.2,0,.6,4),r),[-.3,0,0],[0,0,Math.PI/2]]],Y:[[new u.Mesh(new u.CylinderGeometry(.2,0,.6,4),r),[0,.3,0]],[new u.Mesh(new u.CylinderGeometry(.2,0,.6,4),r),[0,-.3,0],[0,0,Math.PI]]],Z:[[new u.Mesh(new u.CylinderGeometry(.2,0,.6,4),r),[0,0,.3],[Math.PI/2,0,0]],[new u.Mesh(new u.CylinderGeometry(.2,0,.6,4),r),[0,0,-.3],[-Math.PI/2,0,0]]],XY:[[new u.Mesh(new u.BoxGeometry(.2,.2,.01),r),[.15,.15,0]]],YZ:[[new u.Mesh(new u.BoxGeometry(.2,.2,.01),r),[0,.15,.15],[0,Math.PI/2,0]]],XZ:[[new u.Mesh(new u.BoxGeometry(.2,.2,.01),r),[.15,0,.15],[-Math.PI/2,0,0]]],XYZ:[[new u.Mesh(new u.BoxGeometry(.2,.2,.2),r),[0,0,0]]]},zt={X:[[new u.Line(re,f.clone()),[-1e3,0,0],null,[1e6,1,1],"helper"]],Y:[[new u.Line(re,f.clone()),[0,-1e3,0],[0,0,Math.PI/2],[1e6,1,1],"helper"]],Z:[[new u.Line(re,f.clone()),[0,0,-1e3],[0,-Math.PI/2,0],[1e6,1,1],"helper"]]};function Ge(xe){const je=new u.Object3D;for(const ge in xe)for(let Te=xe[ge].length;Te--;){const _e=xe[ge][Te][0].clone(),Ze=xe[ge][Te][1],we=xe[ge][Te][2],Ft=xe[ge][Te][3],yn=xe[ge][Te][4];_e.name=ge,_e.tag=yn,Ze&&_e.position.set(Ze[0],Ze[1],Ze[2]),we&&_e.rotation.set(we[0],we[1],we[2]),Ft&&_e.scale.set(Ft[0],Ft[1],Ft[2]),_e.updateMatrix();const En=_e.geometry.clone();En.applyMatrix4(_e.matrix),_e.geometry=En,_e.renderOrder=1/0,_e.position.set(0,0,0),_e.rotation.set(0,0,0),_e.scale.set(1,1,1),je.add(_e)}return je}this.gizmo={},this.picker={},this.helper={},this.add(this.gizmo.translate=Ge(ee)),this.add(this.gizmo.rotate=Ge(Xe)),this.add(this.gizmo.scale=Ge(kt)),this.add(this.picker.translate=Ge(nt)),this.add(this.picker.rotate=Ge(Yn)),this.add(this.picker.scale=Ge(Rt)),this.add(this.helper.translate=Ge(Z)),this.add(this.helper.rotate=Ge(At)),this.add(this.helper.scale=Ge(zt)),this.picker.translate.visible=!1,this.picker.rotate.visible=!1,this.picker.scale.visible=!1}updateMatrixWorld(a){const r=(this.mode==="scale"?"local":this.space)==="local"?this.worldQuaternion:xr;this.gizmo.translate.visible=this.mode==="translate",this.gizmo.rotate.visible=this.mode==="rotate",this.gizmo.scale.visible=this.mode==="scale",this.helper.translate.visible=this.mode==="translate",this.helper.rotate.visible=this.mode==="rotate",this.helper.scale.visible=this.mode==="scale";let f=[];f=f.concat(this.picker[this.mode].children),f=f.concat(this.gizmo[this.mode].children),f=f.concat(this.helper[this.mode].children);for(let v=0;v<f.length;v++){const g=f[v];g.visible=!0,g.rotation.set(0,0,0),g.position.copy(this.worldPosition);let R;if(this.camera.isOrthographicCamera?R=(this.camera.top-this.camera.bottom)/this.camera.zoom:R=this.worldPosition.distanceTo(this.cameraPosition)*Math.min(1.9*Math.tan(Math.PI*this.camera.fov/360)/this.camera.zoom,7),g.scale.set(1,1,1).multiplyScalar(R*this.size/4),g.tag==="helper"){g.visible=!1,g.name==="AXIS"?(g.visible=!!this.axis,this.axis==="X"&&(oe.setFromEuler(_r.set(0,0,0)),g.quaternion.copy(r).multiply(oe),Math.abs(J.copy(pi).applyQuaternion(r).dot(this.eye))>.9&&(g.visible=!1)),this.axis==="Y"&&(oe.setFromEuler(_r.set(0,0,Math.PI/2)),g.quaternion.copy(r).multiply(oe),Math.abs(J.copy(vn).applyQuaternion(r).dot(this.eye))>.9&&(g.visible=!1)),this.axis==="Z"&&(oe.setFromEuler(_r.set(0,Math.PI/2,0)),g.quaternion.copy(r).multiply(oe),Math.abs(J.copy(gi).applyQuaternion(r).dot(this.eye))>.9&&(g.visible=!1)),this.axis==="XYZE"&&(oe.setFromEuler(_r.set(0,Math.PI/2,0)),J.copy(this.rotationAxis),g.quaternion.setFromRotationMatrix(Cl.lookAt(Dl,J,vn)),g.quaternion.multiply(oe),g.visible=this.dragging),this.axis==="E"&&(g.visible=!1)):g.name==="START"?(g.position.copy(this.worldPositionStart),g.visible=this.dragging):g.name==="END"?(g.position.copy(this.worldPosition),g.visible=this.dragging):g.name==="DELTA"?(g.position.copy(this.worldPositionStart),g.quaternion.copy(this.worldQuaternionStart),Ce.set(1e-10,1e-10,1e-10).add(this.worldPositionStart).sub(this.worldPosition).multiplyScalar(-1),Ce.applyQuaternion(this.worldQuaternionStart.clone().invert()),g.scale.copy(Ce),g.visible=this.dragging):(g.quaternion.copy(r),this.dragging?g.position.copy(this.worldPositionStart):g.position.copy(this.worldPosition),this.axis&&(g.visible=this.axis.search(g.name)!==-1));continue}g.quaternion.copy(r),this.mode==="translate"||this.mode==="scale"?(g.name==="X"&&Math.abs(J.copy(pi).applyQuaternion(r).dot(this.eye))>.99&&(g.scale.set(1e-10,1e-10,1e-10),g.visible=!1),g.name==="Y"&&Math.abs(J.copy(vn).applyQuaternion(r).dot(this.eye))>.99&&(g.scale.set(1e-10,1e-10,1e-10),g.visible=!1),g.name==="Z"&&Math.abs(J.copy(gi).applyQuaternion(r).dot(this.eye))>.99&&(g.scale.set(1e-10,1e-10,1e-10),g.visible=!1),g.name==="XY"&&Math.abs(J.copy(gi).applyQuaternion(r).dot(this.eye))<.2&&(g.scale.set(1e-10,1e-10,1e-10),g.visible=!1),g.name==="YZ"&&Math.abs(J.copy(pi).applyQuaternion(r).dot(this.eye))<.2&&(g.scale.set(1e-10,1e-10,1e-10),g.visible=!1),g.name==="XZ"&&Math.abs(J.copy(vn).applyQuaternion(r).dot(this.eye))<.2&&(g.scale.set(1e-10,1e-10,1e-10),g.visible=!1)):this.mode==="rotate"&&(mr.copy(r),J.copy(this.eye).applyQuaternion(oe.copy(r).invert()),g.name.search("E")!==-1&&g.quaternion.setFromRotationMatrix(Cl.lookAt(this.eye,Dl,vn)),g.name==="X"&&(oe.setFromAxisAngle(pi,Math.atan2(-J.y,J.z)),oe.multiplyQuaternions(mr,oe),g.quaternion.copy(oe)),g.name==="Y"&&(oe.setFromAxisAngle(vn,Math.atan2(J.x,J.z)),oe.multiplyQuaternions(mr,oe),g.quaternion.copy(oe)),g.name==="Z"&&(oe.setFromAxisAngle(gi,Math.atan2(J.y,J.x)),oe.multiplyQuaternions(mr,oe),g.quaternion.copy(oe))),g.visible=g.visible&&(g.name.indexOf("X")===-1||this.showX),g.visible=g.visible&&(g.name.indexOf("Y")===-1||this.showY),g.visible=g.visible&&(g.name.indexOf("Z")===-1||this.showZ),g.visible=g.visible&&(g.name.indexOf("E")===-1||this.showX&&this.showY&&this.showZ),g.material._color=g.material._color||g.material.color.clone(),g.material._opacity=g.material._opacity||g.material.opacity,g.material.color.copy(g.material._color),g.material.opacity=g.material._opacity,this.enabled&&this.axis&&(g.name===this.axis||this.axis.split("").some(function(D){return g.name===D}))&&(g.material.color.setHex(16776960),g.material.opacity=1)}super.updateMatrixWorld(a)}}class M0 extends u.Mesh{constructor(){super(new u.PlaneGeometry(1e5,1e5,2,2),new u.MeshBasicMaterial({visible:!1,wireframe:!0,side:u.DoubleSide,transparent:!0,opacity:.1,toneMapped:!1})),this.isTransformControlsPlane=!0,this.type="TransformControlsPlane"}updateMatrixWorld(a){let i=this.space;switch(this.position.copy(this.worldPosition),this.mode==="scale"&&(i="local"),br.copy(pi).applyQuaternion(i==="local"?this.worldQuaternion:xr),fi.copy(vn).applyQuaternion(i==="local"?this.worldQuaternion:xr),di.copy(gi).applyQuaternion(i==="local"?this.worldQuaternion:xr),J.copy(fi),this.mode){case"translate":case"scale":switch(this.axis){case"X":J.copy(this.eye).cross(br),St.copy(br).cross(J);break;case"Y":J.copy(this.eye).cross(fi),St.copy(fi).cross(J);break;case"Z":J.copy(this.eye).cross(di),St.copy(di).cross(J);break;case"XY":St.copy(di);break;case"YZ":St.copy(br);break;case"XZ":J.copy(di),St.copy(fi);break;case"XYZ":case"E":St.set(0,0,0);break}break;case"rotate":default:St.set(0,0,0)}St.length()===0?this.quaternion.copy(this.cameraQuaternion):(Il.lookAt(Ce.set(0,0,0),St,J),this.quaternion.setFromRotationMatrix(Il)),super.updateMatrixWorld(a)}}const kl="#c20017",zl="#00ab26",Fl="#0081d4",Ns=kl,Hs=zl,Ys=Fl;class A0 extends m0{constructor(i,r){super(i,r);y(this,"isTransformTool",!0);y(this,"_scaleLinked");y(this,"_gizmo");this.name="DIVETransformTool",this._scaleLinked=!1,this._gizmo=this.initGizmo(),this._scene.add(this._gizmo)}Activate(){}SetGizmoMode(i){this._gizmo.mode=i}SetGizmoVisibility(i){const r=this._scene.children.includes(this._gizmo);i&&!r?(this._scene.add(this._gizmo),"isTransformControls"in this._gizmo&&this._gizmo.getRaycaster().layers.enableAll()):!i&&r&&(this._scene.remove(this._gizmo),"isTransformControls"in this._gizmo&&this._gizmo.getRaycaster().layers.disableAll())}SetGizmoScaleLinked(i){this._scaleLinked=i}initGizmo(){const i=new b0(this._controller.object,this._controller.domElement);return i.mode="translate",i.traverse(r=>{if(!("isMesh"in r))return;const f=r.material;r.name==="X"&&f.color.set(Ns),r.name==="Y"&&f.color.set(Hs),r.name==="Z"&&f.color.set(Ys),r.name==="XY"&&f.color.set(Ys),r.name==="YZ"&&f.color.set(Ns),r.name==="XZ"&&f.color.set(Hs)}),i.addEventListener("mouseDown",()=>{this._controller.enabled=!1,Er(i.object,"isMovable")&&i.object.onMoveStart&&i.object.onMoveStart()}),i.addEventListener("objectChange",()=>{if(Er(i.object,"isMovable")&&i.object.onMove&&(i.object.onMove(),this._scaleLinked)){const r=i.object.scale,f=(r.x+r.y+r.z)/3;i.object.scale.set(f,f,f)}}),i.addEventListener("mouseUp",()=>{this._controller.enabled=!0,Er(i.object,"isMovable")&&i.object.onMoveEnd&&i.object.onMoveEnd()}),i}}const Gl=M=>M.isSelectTool!==void 0;class R0 extends A0{constructor(i,r){super(i,r);y(this,"isSelectTool",!0);this.name="SelectTool"}Activate(){}Select(i){this.AttachGizmo(i),i.onSelect&&i.onSelect()}Deselect(i){this.DetachGizmo(),i.onDeselect&&i.onDeselect()}AttachGizmo(i){if("isMovable"in i){const r=i;this._gizmo.attach(r),this.SetGizmoVisibility(r.visible)}}DetachGizmo(){this._gizmo.detach()}onClick(i){super.onClick(i);const r=this._raycaster.intersectObjects(this._scene.Root.children,!0).filter(v=>v.object.visible)[0],f=Sr(r==null?void 0:r.object,"isSelectable");if(!r||!f){this._gizmo.object&&this.Deselect(this._gizmo.object);return}if(this._gizmo.object){if(this._gizmo.object.uuid===f.uuid)return;this.Deselect(this._gizmo.object)}this.Select(f)}}class Wl{constructor(a,i){y(this,"_scene");y(this,"_controller");y(this,"_activeTool");y(this,"_selectTool");this._scene=a,this._controller=i,this._selectTool=null,this._activeTool=null}get selectTool(){return this._selectTool||(this._selectTool=new R0(this._scene,this._controller)),this._selectTool}Dispose(){this.removeEventListeners()}GetActiveTool(){return this._activeTool}UseTool(a){var i;switch((i=this._activeTool)==null||i.Deactivate(),a){case"select":{this.addEventListeners(),this.selectTool.Activate(),this._activeTool=this.selectTool;break}case"none":{this.removeEventListeners(),this._activeTool=null;break}default:console.warn(`DIVEToolBox.UseTool: Unknown tool: ${a}`)}}SetGizmoMode(a){this.selectTool.SetGizmoMode(a)}SetGizmoVisibility(a){this.selectTool.SetGizmoVisibility(a)}SetGizmoScaleLinked(a){this.selectTool.SetGizmoScaleLinked(a)}onPointerMove(a){var i;(i=this._activeTool)==null||i.onPointerMove(a)}onPointerDown(a){var i;(i=this._activeTool)==null||i.onPointerDown(a)}onPointerUp(a){var i;(i=this._activeTool)==null||i.onPointerUp(a)}onWheel(a){var i;(i=this._activeTool)==null||i.onWheel(a)}addEventListeners(){this._controller.domElement.addEventListener("pointermove",a=>this.onPointerMove(a)),this._controller.domElement.addEventListener("pointerdown",a=>this.onPointerDown(a)),this._controller.domElement.addEventListener("pointerup",a=>this.onPointerUp(a)),this._controller.domElement.addEventListener("wheel",a=>this.onWheel(a))}removeEventListeners(){this._controller.domElement.removeEventListener("pointermove",a=>this.onPointerMove(a)),this._controller.domElement.removeEventListener("pointerdown",a=>this.onPointerDown(a)),this._controller.domElement.removeEventListener("pointerup",a=>this.onPointerUp(a)),this._controller.domElement.removeEventListener("wheel",a=>this.onWheel(a))}}y(Wl,"DefaultTool","select");const De=["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"];function P0(){const M=Math.random()*4294967295|0,a=Math.random()*4294967295|0,i=Math.random()*4294967295|0,r=Math.random()*4294967295|0;return(De[M&255]+De[M>>8&255]+De[M>>16&255]+De[M>>24&255]+"-"+De[a&255]+De[a>>8&255]+"-"+De[a>>16&15|64]+De[a>>24&255]+"-"+De[i&63|128]+De[i>>8&255]+"-"+De[i>>16&255]+De[i>>24&255]+De[r&255]+De[r>>8&255]+De[r>>16&255]+De[r>>24&255]).toLowerCase()}var vr=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},_i={exports:{}};/**
2
- * @license
3
- * Lodash <https://lodash.com/>
4
- * Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
5
- * Released under MIT license <https://lodash.com/license>
6
- * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
7
- * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
8
- */var T0=_i.exports,Bl;function L0(){return Bl||(Bl=1,function(M,a){(function(){var i,r="4.17.21",f=200,v="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",g="Expected a function",R="Invalid `variable` option passed into `_.template`",D="__lodash_hash_undefined__",H=500,le="__lodash_placeholder__",ce=1,Re=2,Pe=4,me=1,ue=2,K=1,re=2,ne=4,j=8,Ie=16,ee=32,nt=64,Z=128,Xe=256,At=512,Yn=30,kt="...",Rt=800,zt=16,Ge=1,xe=2,je=3,ge=1/0,Te=9007199254740991,_e=17976931348623157e292,Ze=NaN,we=4294967295,Ft=we-1,yn=we>>>1,En=[["ary",Z],["bind",K],["bindKey",re],["curry",j],["curryRight",Ie],["flip",At],["partial",ee],["partialRight",nt],["rearg",Xe]],Wt="[object Arguments]",xn="[object Array]",Ar="[object AsyncFunction]",nn="[object Boolean]",Vt="[object Date]",bi="[object DOMException]",rn="[object Error]",Sn="[object Function]",vi="[object GeneratorFunction]",ze="[object Map]",Nt="[object Number]",wi="[object Null]",ht="[object Object]",yi="[object Promise]",Ei="[object Proxy]",Pt="[object RegExp]",Se="[object Set]",sn="[object String]",Mn="[object Symbol]",xi="[object Undefined]",on="[object WeakMap]",Si="[object WeakSet]",Ht="[object ArrayBuffer]",bt="[object DataView]",An="[object Float32Array]",Xn="[object Float64Array]",Rn="[object Int8Array]",jn="[object Int16Array]",Zn="[object Int32Array]",Qn="[object Uint8Array]",Pn="[object Uint8ClampedArray]",vt="[object Uint16Array]",Mi="[object Uint32Array]",p=/\b__p \+= '';/g,P=/\b(__p \+=) '' \+/g,F=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Q=/&(?:amp|lt|gt|quot|#39);/g,ye=/[&<>"']/g,wt=RegExp(Q.source),Fe=RegExp(ye.source),Ks=/<%-([\s\S]+?)%>/g,Rr=/<%([\s\S]+?)%>/g,qn=/<%=([\s\S]+?)%>/g,ft=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,dt=/^\w*$/,an=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Qe=/[\\^$.*+?()[\]{}|]/g,ln=RegExp(Qe.source),Yt=/^\s+/,Ai=/\s/,Yl=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Xl=/\{\n\/\* \[wrapped with (.+)\] \*/,jl=/,? & /,Zl=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Ql=/[()=,{}\[\]\/\s]/,ql=/\\(\\)?/g,Kl=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,$s=/\w*$/,$l=/^[-+]0x[0-9a-f]+$/i,Jl=/^0b[01]+$/i,ec=/^\[object .+?Constructor\]$/,tc=/^0o[0-7]+$/i,nc=/^(?:0|[1-9]\d*)$/,ic=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Ri=/($^)/,rc=/['\n\r\u2028\u2029\\]/g,Pi="\\ud800-\\udfff",sc="\\u0300-\\u036f",oc="\\ufe20-\\ufe2f",ac="\\u20d0-\\u20ff",Js=sc+oc+ac,eo="\\u2700-\\u27bf",to="a-z\\xdf-\\xf6\\xf8-\\xff",lc="\\xac\\xb1\\xd7\\xf7",cc="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",uc="\\u2000-\\u206f",hc=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",no="A-Z\\xc0-\\xd6\\xd8-\\xde",io="\\ufe0e\\ufe0f",ro=lc+cc+uc+hc,Pr="['’]",fc="["+Pi+"]",so="["+ro+"]",Ti="["+Js+"]",oo="\\d+",dc="["+eo+"]",ao="["+to+"]",lo="[^"+Pi+ro+oo+eo+to+no+"]",Tr="\\ud83c[\\udffb-\\udfff]",pc="(?:"+Ti+"|"+Tr+")",co="[^"+Pi+"]",Lr="(?:\\ud83c[\\udde6-\\uddff]){2}",Or="[\\ud800-\\udbff][\\udc00-\\udfff]",Tn="["+no+"]",uo="\\u200d",ho="(?:"+ao+"|"+lo+")",gc="(?:"+Tn+"|"+lo+")",fo="(?:"+Pr+"(?:d|ll|m|re|s|t|ve))?",po="(?:"+Pr+"(?:D|LL|M|RE|S|T|VE))?",go=pc+"?",_o="["+io+"]?",_c="(?:"+uo+"(?:"+[co,Lr,Or].join("|")+")"+_o+go+")*",mc="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",bc="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",mo=_o+go+_c,vc="(?:"+[dc,Lr,Or].join("|")+")"+mo,wc="(?:"+[co+Ti+"?",Ti,Lr,Or,fc].join("|")+")",yc=RegExp(Pr,"g"),Ec=RegExp(Ti,"g"),Dr=RegExp(Tr+"(?="+Tr+")|"+wc+mo,"g"),xc=RegExp([Tn+"?"+ao+"+"+fo+"(?="+[so,Tn,"$"].join("|")+")",gc+"+"+po+"(?="+[so,Tn+ho,"$"].join("|")+")",Tn+"?"+ho+"+"+fo,Tn+"+"+po,bc,mc,oo,vc].join("|"),"g"),Sc=RegExp("["+uo+Pi+Js+io+"]"),Mc=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Ac=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Rc=-1,ie={};ie[An]=ie[Xn]=ie[Rn]=ie[jn]=ie[Zn]=ie[Qn]=ie[Pn]=ie[vt]=ie[Mi]=!0,ie[Wt]=ie[xn]=ie[Ht]=ie[nn]=ie[bt]=ie[Vt]=ie[rn]=ie[Sn]=ie[ze]=ie[Nt]=ie[ht]=ie[Pt]=ie[Se]=ie[sn]=ie[on]=!1;var te={};te[Wt]=te[xn]=te[Ht]=te[bt]=te[nn]=te[Vt]=te[An]=te[Xn]=te[Rn]=te[jn]=te[Zn]=te[ze]=te[Nt]=te[ht]=te[Pt]=te[Se]=te[sn]=te[Mn]=te[Qn]=te[Pn]=te[vt]=te[Mi]=!0,te[rn]=te[Sn]=te[on]=!1;var Pc={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},Tc={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},Lc={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"},Oc={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Dc=parseFloat,Cc=parseInt,bo=typeof vr=="object"&&vr&&vr.Object===Object&&vr,Ic=typeof self=="object"&&self&&self.Object===Object&&self,Me=bo||Ic||Function("return this")(),Cr=a&&!a.nodeType&&a,cn=Cr&&!0&&M&&!M.nodeType&&M,vo=cn&&cn.exports===Cr,Ir=vo&&bo.process,it=function(){try{var _=cn&&cn.require&&cn.require("util").types;return _||Ir&&Ir.binding&&Ir.binding("util")}catch{}}(),wo=it&&it.isArrayBuffer,yo=it&&it.isDate,Eo=it&&it.isMap,xo=it&&it.isRegExp,So=it&&it.isSet,Mo=it&&it.isTypedArray;function qe(_,w,b){switch(b.length){case 0:return _.call(w);case 1:return _.call(w,b[0]);case 2:return _.call(w,b[0],b[1]);case 3:return _.call(w,b[0],b[1],b[2])}return _.apply(w,b)}function Gc(_,w,b,T){for(var G=-1,Y=_==null?0:_.length;++G<Y;){var be=_[G];w(T,be,b(be),_)}return T}function rt(_,w){for(var b=-1,T=_==null?0:_.length;++b<T&&w(_[b],b,_)!==!1;);return _}function Bc(_,w){for(var b=_==null?0:_.length;b--&&w(_[b],b,_)!==!1;);return _}function Ao(_,w){for(var b=-1,T=_==null?0:_.length;++b<T;)if(!w(_[b],b,_))return!1;return!0}function Xt(_,w){for(var b=-1,T=_==null?0:_.length,G=0,Y=[];++b<T;){var be=_[b];w(be,b,_)&&(Y[G++]=be)}return Y}function Li(_,w){var b=_==null?0:_.length;return!!b&&Ln(_,w,0)>-1}function Gr(_,w,b){for(var T=-1,G=_==null?0:_.length;++T<G;)if(b(w,_[T]))return!0;return!1}function se(_,w){for(var b=-1,T=_==null?0:_.length,G=Array(T);++b<T;)G[b]=w(_[b],b,_);return G}function jt(_,w){for(var b=-1,T=w.length,G=_.length;++b<T;)_[G+b]=w[b];return _}function Br(_,w,b,T){var G=-1,Y=_==null?0:_.length;for(T&&Y&&(b=_[++G]);++G<Y;)b=w(b,_[G],G,_);return b}function Uc(_,w,b,T){var G=_==null?0:_.length;for(T&&G&&(b=_[--G]);G--;)b=w(b,_[G],G,_);return b}function Ur(_,w){for(var b=-1,T=_==null?0:_.length;++b<T;)if(w(_[b],b,_))return!0;return!1}var kc=kr("length");function zc(_){return _.split("")}function Fc(_){return _.match(Zl)||[]}function Ro(_,w,b){var T;return b(_,function(G,Y,be){if(w(G,Y,be))return T=Y,!1}),T}function Oi(_,w,b,T){for(var G=_.length,Y=b+(T?1:-1);T?Y--:++Y<G;)if(w(_[Y],Y,_))return Y;return-1}function Ln(_,w,b){return w===w?$c(_,w,b):Oi(_,Po,b)}function Wc(_,w,b,T){for(var G=b-1,Y=_.length;++G<Y;)if(T(_[G],w))return G;return-1}function Po(_){return _!==_}function To(_,w){var b=_==null?0:_.length;return b?Fr(_,w)/b:Ze}function kr(_){return function(w){return w==null?i:w[_]}}function zr(_){return function(w){return _==null?i:_[w]}}function Lo(_,w,b,T,G){return G(_,function(Y,be,$){b=T?(T=!1,Y):w(b,Y,be,$)}),b}function Vc(_,w){var b=_.length;for(_.sort(w);b--;)_[b]=_[b].value;return _}function Fr(_,w){for(var b,T=-1,G=_.length;++T<G;){var Y=w(_[T]);Y!==i&&(b=b===i?Y:b+Y)}return b}function Wr(_,w){for(var b=-1,T=Array(_);++b<_;)T[b]=w(b);return T}function Nc(_,w){return se(w,function(b){return[b,_[b]]})}function Oo(_){return _&&_.slice(0,Go(_)+1).replace(Yt,"")}function Ke(_){return function(w){return _(w)}}function Vr(_,w){return se(w,function(b){return _[b]})}function Kn(_,w){return _.has(w)}function Do(_,w){for(var b=-1,T=_.length;++b<T&&Ln(w,_[b],0)>-1;);return b}function Co(_,w){for(var b=_.length;b--&&Ln(w,_[b],0)>-1;);return b}function Hc(_,w){for(var b=_.length,T=0;b--;)_[b]===w&&++T;return T}var Yc=zr(Pc),Xc=zr(Tc);function jc(_){return"\\"+Oc[_]}function Zc(_,w){return _==null?i:_[w]}function On(_){return Sc.test(_)}function Qc(_){return Mc.test(_)}function qc(_){for(var w,b=[];!(w=_.next()).done;)b.push(w.value);return b}function Nr(_){var w=-1,b=Array(_.size);return _.forEach(function(T,G){b[++w]=[G,T]}),b}function Io(_,w){return function(b){return _(w(b))}}function Zt(_,w){for(var b=-1,T=_.length,G=0,Y=[];++b<T;){var be=_[b];(be===w||be===le)&&(_[b]=le,Y[G++]=b)}return Y}function Di(_){var w=-1,b=Array(_.size);return _.forEach(function(T){b[++w]=T}),b}function Kc(_){var w=-1,b=Array(_.size);return _.forEach(function(T){b[++w]=[T,T]}),b}function $c(_,w,b){for(var T=b-1,G=_.length;++T<G;)if(_[T]===w)return T;return-1}function Jc(_,w,b){for(var T=b+1;T--;)if(_[T]===w)return T;return T}function Dn(_){return On(_)?tu(_):kc(_)}function pt(_){return On(_)?nu(_):zc(_)}function Go(_){for(var w=_.length;w--&&Ai.test(_.charAt(w)););return w}var eu=zr(Lc);function tu(_){for(var w=Dr.lastIndex=0;Dr.test(_);)++w;return w}function nu(_){return _.match(Dr)||[]}function iu(_){return _.match(xc)||[]}var ru=function _(w){w=w==null?Me:Cn.defaults(Me.Object(),w,Cn.pick(Me,Ac));var b=w.Array,T=w.Date,G=w.Error,Y=w.Function,be=w.Math,$=w.Object,Hr=w.RegExp,su=w.String,st=w.TypeError,Ci=b.prototype,ou=Y.prototype,In=$.prototype,Ii=w["__core-js_shared__"],Gi=ou.toString,q=In.hasOwnProperty,au=0,Bo=function(){var e=/[^.]+$/.exec(Ii&&Ii.keys&&Ii.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),Bi=In.toString,lu=Gi.call($),cu=Me._,uu=Hr("^"+Gi.call(q).replace(Qe,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Ui=vo?w.Buffer:i,Qt=w.Symbol,ki=w.Uint8Array,Uo=Ui?Ui.allocUnsafe:i,zi=Io($.getPrototypeOf,$),ko=$.create,zo=In.propertyIsEnumerable,Fi=Ci.splice,Fo=Qt?Qt.isConcatSpreadable:i,$n=Qt?Qt.iterator:i,un=Qt?Qt.toStringTag:i,Wi=function(){try{var e=gn($,"defineProperty");return e({},"",{}),e}catch{}}(),hu=w.clearTimeout!==Me.clearTimeout&&w.clearTimeout,fu=T&&T.now!==Me.Date.now&&T.now,du=w.setTimeout!==Me.setTimeout&&w.setTimeout,Vi=be.ceil,Ni=be.floor,Yr=$.getOwnPropertySymbols,pu=Ui?Ui.isBuffer:i,Wo=w.isFinite,gu=Ci.join,_u=Io($.keys,$),ve=be.max,Le=be.min,mu=T.now,bu=w.parseInt,Vo=be.random,vu=Ci.reverse,Xr=gn(w,"DataView"),Jn=gn(w,"Map"),jr=gn(w,"Promise"),Gn=gn(w,"Set"),ei=gn(w,"WeakMap"),ti=gn($,"create"),Hi=ei&&new ei,Bn={},wu=_n(Xr),yu=_n(Jn),Eu=_n(jr),xu=_n(Gn),Su=_n(ei),Yi=Qt?Qt.prototype:i,ni=Yi?Yi.valueOf:i,No=Yi?Yi.toString:i;function l(e){if(he(e)&&!B(e)&&!(e instanceof V)){if(e instanceof ot)return e;if(q.call(e,"__wrapped__"))return Ha(e)}return new ot(e)}var Un=function(){function e(){}return function(t){if(!ae(t))return{};if(ko)return ko(t);e.prototype=t;var n=new e;return e.prototype=i,n}}();function Xi(){}function ot(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=i}l.templateSettings={escape:Ks,evaluate:Rr,interpolate:qn,variable:"",imports:{_:l}},l.prototype=Xi.prototype,l.prototype.constructor=l,ot.prototype=Un(Xi.prototype),ot.prototype.constructor=ot;function V(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=we,this.__views__=[]}function Mu(){var e=new V(this.__wrapped__);return e.__actions__=We(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=We(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=We(this.__views__),e}function Au(){if(this.__filtered__){var e=new V(this);e.__dir__=-1,e.__filtered__=!0}else e=this.clone(),e.__dir__*=-1;return e}function Ru(){var e=this.__wrapped__.value(),t=this.__dir__,n=B(e),s=t<0,o=n?e.length:0,c=zh(0,o,this.__views__),h=c.start,d=c.end,m=d-h,E=s?d:h-1,x=this.__iteratees__,S=x.length,A=0,L=Le(m,this.__takeCount__);if(!n||!s&&o==m&&L==m)return da(e,this.__actions__);var C=[];e:for(;m--&&A<L;){E+=t;for(var k=-1,I=e[E];++k<S;){var W=x[k],N=W.iteratee,et=W.type,ke=N(I);if(et==xe)I=ke;else if(!ke){if(et==Ge)continue e;break e}}C[A++]=I}return C}V.prototype=Un(Xi.prototype),V.prototype.constructor=V;function hn(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var s=e[t];this.set(s[0],s[1])}}function Pu(){this.__data__=ti?ti(null):{},this.size=0}function Tu(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}function Lu(e){var t=this.__data__;if(ti){var n=t[e];return n===D?i:n}return q.call(t,e)?t[e]:i}function Ou(e){var t=this.__data__;return ti?t[e]!==i:q.call(t,e)}function Du(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=ti&&t===i?D:t,this}hn.prototype.clear=Pu,hn.prototype.delete=Tu,hn.prototype.get=Lu,hn.prototype.has=Ou,hn.prototype.set=Du;function Tt(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var s=e[t];this.set(s[0],s[1])}}function Cu(){this.__data__=[],this.size=0}function Iu(e){var t=this.__data__,n=ji(t,e);if(n<0)return!1;var s=t.length-1;return n==s?t.pop():Fi.call(t,n,1),--this.size,!0}function Gu(e){var t=this.__data__,n=ji(t,e);return n<0?i:t[n][1]}function Bu(e){return ji(this.__data__,e)>-1}function Uu(e,t){var n=this.__data__,s=ji(n,e);return s<0?(++this.size,n.push([e,t])):n[s][1]=t,this}Tt.prototype.clear=Cu,Tt.prototype.delete=Iu,Tt.prototype.get=Gu,Tt.prototype.has=Bu,Tt.prototype.set=Uu;function Lt(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var s=e[t];this.set(s[0],s[1])}}function ku(){this.size=0,this.__data__={hash:new hn,map:new(Jn||Tt),string:new hn}}function zu(e){var t=sr(this,e).delete(e);return this.size-=t?1:0,t}function Fu(e){return sr(this,e).get(e)}function Wu(e){return sr(this,e).has(e)}function Vu(e,t){var n=sr(this,e),s=n.size;return n.set(e,t),this.size+=n.size==s?0:1,this}Lt.prototype.clear=ku,Lt.prototype.delete=zu,Lt.prototype.get=Fu,Lt.prototype.has=Wu,Lt.prototype.set=Vu;function fn(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new Lt;++t<n;)this.add(e[t])}function Nu(e){return this.__data__.set(e,D),this}function Hu(e){return this.__data__.has(e)}fn.prototype.add=fn.prototype.push=Nu,fn.prototype.has=Hu;function gt(e){var t=this.__data__=new Tt(e);this.size=t.size}function Yu(){this.__data__=new Tt,this.size=0}function Xu(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}function ju(e){return this.__data__.get(e)}function Zu(e){return this.__data__.has(e)}function Qu(e,t){var n=this.__data__;if(n instanceof Tt){var s=n.__data__;if(!Jn||s.length<f-1)return s.push([e,t]),this.size=++n.size,this;n=this.__data__=new Lt(s)}return n.set(e,t),this.size=n.size,this}gt.prototype.clear=Yu,gt.prototype.delete=Xu,gt.prototype.get=ju,gt.prototype.has=Zu,gt.prototype.set=Qu;function Ho(e,t){var n=B(e),s=!n&&mn(e),o=!n&&!s&&en(e),c=!n&&!s&&!o&&Wn(e),h=n||s||o||c,d=h?Wr(e.length,su):[],m=d.length;for(var E in e)(t||q.call(e,E))&&!(h&&(E=="length"||o&&(E=="offset"||E=="parent")||c&&(E=="buffer"||E=="byteLength"||E=="byteOffset")||It(E,m)))&&d.push(E);return d}function Yo(e){var t=e.length;return t?e[rs(0,t-1)]:i}function qu(e,t){return or(We(e),dn(t,0,e.length))}function Ku(e){return or(We(e))}function Zr(e,t,n){(n!==i&&!_t(e[t],n)||n===i&&!(t in e))&&Ot(e,t,n)}function ii(e,t,n){var s=e[t];(!(q.call(e,t)&&_t(s,n))||n===i&&!(t in e))&&Ot(e,t,n)}function ji(e,t){for(var n=e.length;n--;)if(_t(e[n][0],t))return n;return-1}function $u(e,t,n,s){return qt(e,function(o,c,h){t(s,o,n(o),h)}),s}function Xo(e,t){return e&&Et(t,Ee(t),e)}function Ju(e,t){return e&&Et(t,Ne(t),e)}function Ot(e,t,n){t=="__proto__"&&Wi?Wi(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function Qr(e,t){for(var n=-1,s=t.length,o=b(s),c=e==null;++n<s;)o[n]=c?i:Ts(e,t[n]);return o}function dn(e,t,n){return e===e&&(n!==i&&(e=e<=n?e:n),t!==i&&(e=e>=t?e:t)),e}function at(e,t,n,s,o,c){var h,d=t&ce,m=t&Re,E=t&Pe;if(n&&(h=o?n(e,s,o,c):n(e)),h!==i)return h;if(!ae(e))return e;var x=B(e);if(x){if(h=Wh(e),!d)return We(e,h)}else{var S=Oe(e),A=S==Sn||S==vi;if(en(e))return _a(e,d);if(S==ht||S==Wt||A&&!o){if(h=m||A?{}:Ga(e),!d)return m?Lh(e,Ju(h,e)):Th(e,Xo(h,e))}else{if(!te[S])return o?e:{};h=Vh(e,S,d)}}c||(c=new gt);var L=c.get(e);if(L)return L;c.set(e,h),ul(e)?e.forEach(function(I){h.add(at(I,t,n,I,e,c))}):ll(e)&&e.forEach(function(I,W){h.set(W,at(I,t,n,W,e,c))});var C=E?m?gs:ps:m?Ne:Ee,k=x?i:C(e);return rt(k||e,function(I,W){k&&(W=I,I=e[W]),ii(h,W,at(I,t,n,W,e,c))}),h}function eh(e){var t=Ee(e);return function(n){return jo(n,e,t)}}function jo(e,t,n){var s=n.length;if(e==null)return!s;for(e=$(e);s--;){var o=n[s],c=t[o],h=e[o];if(h===i&&!(o in e)||!c(h))return!1}return!0}function Zo(e,t,n){if(typeof e!="function")throw new st(g);return ui(function(){e.apply(i,n)},t)}function ri(e,t,n,s){var o=-1,c=Li,h=!0,d=e.length,m=[],E=t.length;if(!d)return m;n&&(t=se(t,Ke(n))),s?(c=Gr,h=!1):t.length>=f&&(c=Kn,h=!1,t=new fn(t));e:for(;++o<d;){var x=e[o],S=n==null?x:n(x);if(x=s||x!==0?x:0,h&&S===S){for(var A=E;A--;)if(t[A]===S)continue e;m.push(x)}else c(t,S,s)||m.push(x)}return m}var qt=ya(yt),Qo=ya(Kr,!0);function th(e,t){var n=!0;return qt(e,function(s,o,c){return n=!!t(s,o,c),n}),n}function Zi(e,t,n){for(var s=-1,o=e.length;++s<o;){var c=e[s],h=t(c);if(h!=null&&(d===i?h===h&&!Je(h):n(h,d)))var d=h,m=c}return m}function nh(e,t,n,s){var o=e.length;for(n=U(n),n<0&&(n=-n>o?0:o+n),s=s===i||s>o?o:U(s),s<0&&(s+=o),s=n>s?0:fl(s);n<s;)e[n++]=t;return e}function qo(e,t){var n=[];return qt(e,function(s,o,c){t(s,o,c)&&n.push(s)}),n}function Ae(e,t,n,s,o){var c=-1,h=e.length;for(n||(n=Hh),o||(o=[]);++c<h;){var d=e[c];t>0&&n(d)?t>1?Ae(d,t-1,n,s,o):jt(o,d):s||(o[o.length]=d)}return o}var qr=Ea(),Ko=Ea(!0);function yt(e,t){return e&&qr(e,t,Ee)}function Kr(e,t){return e&&Ko(e,t,Ee)}function Qi(e,t){return Xt(t,function(n){return Gt(e[n])})}function pn(e,t){t=$t(t,e);for(var n=0,s=t.length;e!=null&&n<s;)e=e[xt(t[n++])];return n&&n==s?e:i}function $o(e,t,n){var s=t(e);return B(e)?s:jt(s,n(e))}function Be(e){return e==null?e===i?xi:wi:un&&un in $(e)?kh(e):Kh(e)}function $r(e,t){return e>t}function ih(e,t){return e!=null&&q.call(e,t)}function rh(e,t){return e!=null&&t in $(e)}function sh(e,t,n){return e>=Le(t,n)&&e<ve(t,n)}function Jr(e,t,n){for(var s=n?Gr:Li,o=e[0].length,c=e.length,h=c,d=b(c),m=1/0,E=[];h--;){var x=e[h];h&&t&&(x=se(x,Ke(t))),m=Le(x.length,m),d[h]=!n&&(t||o>=120&&x.length>=120)?new fn(h&&x):i}x=e[0];var S=-1,A=d[0];e:for(;++S<o&&E.length<m;){var L=x[S],C=t?t(L):L;if(L=n||L!==0?L:0,!(A?Kn(A,C):s(E,C,n))){for(h=c;--h;){var k=d[h];if(!(k?Kn(k,C):s(e[h],C,n)))continue e}A&&A.push(C),E.push(L)}}return E}function oh(e,t,n,s){return yt(e,function(o,c,h){t(s,n(o),c,h)}),s}function si(e,t,n){t=$t(t,e),e=za(e,t);var s=e==null?e:e[xt(ct(t))];return s==null?i:qe(s,e,n)}function Jo(e){return he(e)&&Be(e)==Wt}function ah(e){return he(e)&&Be(e)==Ht}function lh(e){return he(e)&&Be(e)==Vt}function oi(e,t,n,s,o){return e===t?!0:e==null||t==null||!he(e)&&!he(t)?e!==e&&t!==t:ch(e,t,n,s,oi,o)}function ch(e,t,n,s,o,c){var h=B(e),d=B(t),m=h?xn:Oe(e),E=d?xn:Oe(t);m=m==Wt?ht:m,E=E==Wt?ht:E;var x=m==ht,S=E==ht,A=m==E;if(A&&en(e)){if(!en(t))return!1;h=!0,x=!1}if(A&&!x)return c||(c=new gt),h||Wn(e)?Da(e,t,n,s,o,c):Bh(e,t,m,n,s,o,c);if(!(n&me)){var L=x&&q.call(e,"__wrapped__"),C=S&&q.call(t,"__wrapped__");if(L||C){var k=L?e.value():e,I=C?t.value():t;return c||(c=new gt),o(k,I,n,s,c)}}return A?(c||(c=new gt),Uh(e,t,n,s,o,c)):!1}function uh(e){return he(e)&&Oe(e)==ze}function es(e,t,n,s){var o=n.length,c=o,h=!s;if(e==null)return!c;for(e=$(e);o--;){var d=n[o];if(h&&d[2]?d[1]!==e[d[0]]:!(d[0]in e))return!1}for(;++o<c;){d=n[o];var m=d[0],E=e[m],x=d[1];if(h&&d[2]){if(E===i&&!(m in e))return!1}else{var S=new gt;if(s)var A=s(E,x,m,e,t,S);if(!(A===i?oi(x,E,me|ue,s,S):A))return!1}}return!0}function ea(e){if(!ae(e)||Xh(e))return!1;var t=Gt(e)?uu:ec;return t.test(_n(e))}function hh(e){return he(e)&&Be(e)==Pt}function fh(e){return he(e)&&Oe(e)==Se}function dh(e){return he(e)&&fr(e.length)&&!!ie[Be(e)]}function ta(e){return typeof e=="function"?e:e==null?He:typeof e=="object"?B(e)?ra(e[0],e[1]):ia(e):xl(e)}function ts(e){if(!ci(e))return _u(e);var t=[];for(var n in $(e))q.call(e,n)&&n!="constructor"&&t.push(n);return t}function ph(e){if(!ae(e))return qh(e);var t=ci(e),n=[];for(var s in e)s=="constructor"&&(t||!q.call(e,s))||n.push(s);return n}function ns(e,t){return e<t}function na(e,t){var n=-1,s=Ve(e)?b(e.length):[];return qt(e,function(o,c,h){s[++n]=t(o,c,h)}),s}function ia(e){var t=ms(e);return t.length==1&&t[0][2]?Ua(t[0][0],t[0][1]):function(n){return n===e||es(n,e,t)}}function ra(e,t){return vs(e)&&Ba(t)?Ua(xt(e),t):function(n){var s=Ts(n,e);return s===i&&s===t?Ls(n,e):oi(t,s,me|ue)}}function qi(e,t,n,s,o){e!==t&&qr(t,function(c,h){if(o||(o=new gt),ae(c))gh(e,t,h,n,qi,s,o);else{var d=s?s(ys(e,h),c,h+"",e,t,o):i;d===i&&(d=c),Zr(e,h,d)}},Ne)}function gh(e,t,n,s,o,c,h){var d=ys(e,n),m=ys(t,n),E=h.get(m);if(E){Zr(e,n,E);return}var x=c?c(d,m,n+"",e,t,h):i,S=x===i;if(S){var A=B(m),L=!A&&en(m),C=!A&&!L&&Wn(m);x=m,A||L||C?B(d)?x=d:fe(d)?x=We(d):L?(S=!1,x=_a(m,!0)):C?(S=!1,x=ma(m,!0)):x=[]:hi(m)||mn(m)?(x=d,mn(d)?x=dl(d):(!ae(d)||Gt(d))&&(x=Ga(m))):S=!1}S&&(h.set(m,x),o(x,m,s,c,h),h.delete(m)),Zr(e,n,x)}function sa(e,t){var n=e.length;if(n)return t+=t<0?n:0,It(t,n)?e[t]:i}function oa(e,t,n){t.length?t=se(t,function(c){return B(c)?function(h){return pn(h,c.length===1?c[0]:c)}:c}):t=[He];var s=-1;t=se(t,Ke(O()));var o=na(e,function(c,h,d){var m=se(t,function(E){return E(c)});return{criteria:m,index:++s,value:c}});return Vc(o,function(c,h){return Ph(c,h,n)})}function _h(e,t){return aa(e,t,function(n,s){return Ls(e,s)})}function aa(e,t,n){for(var s=-1,o=t.length,c={};++s<o;){var h=t[s],d=pn(e,h);n(d,h)&&ai(c,$t(h,e),d)}return c}function mh(e){return function(t){return pn(t,e)}}function is(e,t,n,s){var o=s?Wc:Ln,c=-1,h=t.length,d=e;for(e===t&&(t=We(t)),n&&(d=se(e,Ke(n)));++c<h;)for(var m=0,E=t[c],x=n?n(E):E;(m=o(d,x,m,s))>-1;)d!==e&&Fi.call(d,m,1),Fi.call(e,m,1);return e}function la(e,t){for(var n=e?t.length:0,s=n-1;n--;){var o=t[n];if(n==s||o!==c){var c=o;It(o)?Fi.call(e,o,1):as(e,o)}}return e}function rs(e,t){return e+Ni(Vo()*(t-e+1))}function bh(e,t,n,s){for(var o=-1,c=ve(Vi((t-e)/(n||1)),0),h=b(c);c--;)h[s?c:++o]=e,e+=n;return h}function ss(e,t){var n="";if(!e||t<1||t>Te)return n;do t%2&&(n+=e),t=Ni(t/2),t&&(e+=e);while(t);return n}function z(e,t){return Es(ka(e,t,He),e+"")}function vh(e){return Yo(Vn(e))}function wh(e,t){var n=Vn(e);return or(n,dn(t,0,n.length))}function ai(e,t,n,s){if(!ae(e))return e;t=$t(t,e);for(var o=-1,c=t.length,h=c-1,d=e;d!=null&&++o<c;){var m=xt(t[o]),E=n;if(m==="__proto__"||m==="constructor"||m==="prototype")return e;if(o!=h){var x=d[m];E=s?s(x,m,d):i,E===i&&(E=ae(x)?x:It(t[o+1])?[]:{})}ii(d,m,E),d=d[m]}return e}var ca=Hi?function(e,t){return Hi.set(e,t),e}:He,yh=Wi?function(e,t){return Wi(e,"toString",{configurable:!0,enumerable:!1,value:Ds(t),writable:!0})}:He;function Eh(e){return or(Vn(e))}function lt(e,t,n){var s=-1,o=e.length;t<0&&(t=-t>o?0:o+t),n=n>o?o:n,n<0&&(n+=o),o=t>n?0:n-t>>>0,t>>>=0;for(var c=b(o);++s<o;)c[s]=e[s+t];return c}function xh(e,t){var n;return qt(e,function(s,o,c){return n=t(s,o,c),!n}),!!n}function Ki(e,t,n){var s=0,o=e==null?s:e.length;if(typeof t=="number"&&t===t&&o<=yn){for(;s<o;){var c=s+o>>>1,h=e[c];h!==null&&!Je(h)&&(n?h<=t:h<t)?s=c+1:o=c}return o}return os(e,t,He,n)}function os(e,t,n,s){var o=0,c=e==null?0:e.length;if(c===0)return 0;t=n(t);for(var h=t!==t,d=t===null,m=Je(t),E=t===i;o<c;){var x=Ni((o+c)/2),S=n(e[x]),A=S!==i,L=S===null,C=S===S,k=Je(S);if(h)var I=s||C;else E?I=C&&(s||A):d?I=C&&A&&(s||!L):m?I=C&&A&&!L&&(s||!k):L||k?I=!1:I=s?S<=t:S<t;I?o=x+1:c=x}return Le(c,Ft)}function ua(e,t){for(var n=-1,s=e.length,o=0,c=[];++n<s;){var h=e[n],d=t?t(h):h;if(!n||!_t(d,m)){var m=d;c[o++]=h===0?0:h}}return c}function ha(e){return typeof e=="number"?e:Je(e)?Ze:+e}function $e(e){if(typeof e=="string")return e;if(B(e))return se(e,$e)+"";if(Je(e))return No?No.call(e):"";var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}function Kt(e,t,n){var s=-1,o=Li,c=e.length,h=!0,d=[],m=d;if(n)h=!1,o=Gr;else if(c>=f){var E=t?null:Ih(e);if(E)return Di(E);h=!1,o=Kn,m=new fn}else m=t?[]:d;e:for(;++s<c;){var x=e[s],S=t?t(x):x;if(x=n||x!==0?x:0,h&&S===S){for(var A=m.length;A--;)if(m[A]===S)continue e;t&&m.push(S),d.push(x)}else o(m,S,n)||(m!==d&&m.push(S),d.push(x))}return d}function as(e,t){return t=$t(t,e),e=za(e,t),e==null||delete e[xt(ct(t))]}function fa(e,t,n,s){return ai(e,t,n(pn(e,t)),s)}function $i(e,t,n,s){for(var o=e.length,c=s?o:-1;(s?c--:++c<o)&&t(e[c],c,e););return n?lt(e,s?0:c,s?c+1:o):lt(e,s?c+1:0,s?o:c)}function da(e,t){var n=e;return n instanceof V&&(n=n.value()),Br(t,function(s,o){return o.func.apply(o.thisArg,jt([s],o.args))},n)}function ls(e,t,n){var s=e.length;if(s<2)return s?Kt(e[0]):[];for(var o=-1,c=b(s);++o<s;)for(var h=e[o],d=-1;++d<s;)d!=o&&(c[o]=ri(c[o]||h,e[d],t,n));return Kt(Ae(c,1),t,n)}function pa(e,t,n){for(var s=-1,o=e.length,c=t.length,h={};++s<o;){var d=s<c?t[s]:i;n(h,e[s],d)}return h}function cs(e){return fe(e)?e:[]}function us(e){return typeof e=="function"?e:He}function $t(e,t){return B(e)?e:vs(e,t)?[e]:Na(X(e))}var Sh=z;function Jt(e,t,n){var s=e.length;return n=n===i?s:n,!t&&n>=s?e:lt(e,t,n)}var ga=hu||function(e){return Me.clearTimeout(e)};function _a(e,t){if(t)return e.slice();var n=e.length,s=Uo?Uo(n):new e.constructor(n);return e.copy(s),s}function hs(e){var t=new e.constructor(e.byteLength);return new ki(t).set(new ki(e)),t}function Mh(e,t){var n=t?hs(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}function Ah(e){var t=new e.constructor(e.source,$s.exec(e));return t.lastIndex=e.lastIndex,t}function Rh(e){return ni?$(ni.call(e)):{}}function ma(e,t){var n=t?hs(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}function ba(e,t){if(e!==t){var n=e!==i,s=e===null,o=e===e,c=Je(e),h=t!==i,d=t===null,m=t===t,E=Je(t);if(!d&&!E&&!c&&e>t||c&&h&&m&&!d&&!E||s&&h&&m||!n&&m||!o)return 1;if(!s&&!c&&!E&&e<t||E&&n&&o&&!s&&!c||d&&n&&o||!h&&o||!m)return-1}return 0}function Ph(e,t,n){for(var s=-1,o=e.criteria,c=t.criteria,h=o.length,d=n.length;++s<h;){var m=ba(o[s],c[s]);if(m){if(s>=d)return m;var E=n[s];return m*(E=="desc"?-1:1)}}return e.index-t.index}function va(e,t,n,s){for(var o=-1,c=e.length,h=n.length,d=-1,m=t.length,E=ve(c-h,0),x=b(m+E),S=!s;++d<m;)x[d]=t[d];for(;++o<h;)(S||o<c)&&(x[n[o]]=e[o]);for(;E--;)x[d++]=e[o++];return x}function wa(e,t,n,s){for(var o=-1,c=e.length,h=-1,d=n.length,m=-1,E=t.length,x=ve(c-d,0),S=b(x+E),A=!s;++o<x;)S[o]=e[o];for(var L=o;++m<E;)S[L+m]=t[m];for(;++h<d;)(A||o<c)&&(S[L+n[h]]=e[o++]);return S}function We(e,t){var n=-1,s=e.length;for(t||(t=b(s));++n<s;)t[n]=e[n];return t}function Et(e,t,n,s){var o=!n;n||(n={});for(var c=-1,h=t.length;++c<h;){var d=t[c],m=s?s(n[d],e[d],d,n,e):i;m===i&&(m=e[d]),o?Ot(n,d,m):ii(n,d,m)}return n}function Th(e,t){return Et(e,bs(e),t)}function Lh(e,t){return Et(e,Ca(e),t)}function Ji(e,t){return function(n,s){var o=B(n)?Gc:$u,c=t?t():{};return o(n,e,O(s,2),c)}}function kn(e){return z(function(t,n){var s=-1,o=n.length,c=o>1?n[o-1]:i,h=o>2?n[2]:i;for(c=e.length>3&&typeof c=="function"?(o--,c):i,h&&Ue(n[0],n[1],h)&&(c=o<3?i:c,o=1),t=$(t);++s<o;){var d=n[s];d&&e(t,d,s,c)}return t})}function ya(e,t){return function(n,s){if(n==null)return n;if(!Ve(n))return e(n,s);for(var o=n.length,c=t?o:-1,h=$(n);(t?c--:++c<o)&&s(h[c],c,h)!==!1;);return n}}function Ea(e){return function(t,n,s){for(var o=-1,c=$(t),h=s(t),d=h.length;d--;){var m=h[e?d:++o];if(n(c[m],m,c)===!1)break}return t}}function Oh(e,t,n){var s=t&K,o=li(e);function c(){var h=this&&this!==Me&&this instanceof c?o:e;return h.apply(s?n:this,arguments)}return c}function xa(e){return function(t){t=X(t);var n=On(t)?pt(t):i,s=n?n[0]:t.charAt(0),o=n?Jt(n,1).join(""):t.slice(1);return s[e]()+o}}function zn(e){return function(t){return Br(yl(wl(t).replace(yc,"")),e,"")}}function li(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var n=Un(e.prototype),s=e.apply(n,t);return ae(s)?s:n}}function Dh(e,t,n){var s=li(e);function o(){for(var c=arguments.length,h=b(c),d=c,m=Fn(o);d--;)h[d]=arguments[d];var E=c<3&&h[0]!==m&&h[c-1]!==m?[]:Zt(h,m);if(c-=E.length,c<n)return Pa(e,t,er,o.placeholder,i,h,E,i,i,n-c);var x=this&&this!==Me&&this instanceof o?s:e;return qe(x,this,h)}return o}function Sa(e){return function(t,n,s){var o=$(t);if(!Ve(t)){var c=O(n,3);t=Ee(t),n=function(d){return c(o[d],d,o)}}var h=e(t,n,s);return h>-1?o[c?t[h]:h]:i}}function Ma(e){return Ct(function(t){var n=t.length,s=n,o=ot.prototype.thru;for(e&&t.reverse();s--;){var c=t[s];if(typeof c!="function")throw new st(g);if(o&&!h&&rr(c)=="wrapper")var h=new ot([],!0)}for(s=h?s:n;++s<n;){c=t[s];var d=rr(c),m=d=="wrapper"?_s(c):i;m&&ws(m[0])&&m[1]==(Z|j|ee|Xe)&&!m[4].length&&m[9]==1?h=h[rr(m[0])].apply(h,m[3]):h=c.length==1&&ws(c)?h[d]():h.thru(c)}return function(){var E=arguments,x=E[0];if(h&&E.length==1&&B(x))return h.plant(x).value();for(var S=0,A=n?t[S].apply(this,E):x;++S<n;)A=t[S].call(this,A);return A}})}function er(e,t,n,s,o,c,h,d,m,E){var x=t&Z,S=t&K,A=t&re,L=t&(j|Ie),C=t&At,k=A?i:li(e);function I(){for(var W=arguments.length,N=b(W),et=W;et--;)N[et]=arguments[et];if(L)var ke=Fn(I),tt=Hc(N,ke);if(s&&(N=va(N,s,o,L)),c&&(N=wa(N,c,h,L)),W-=tt,L&&W<E){var de=Zt(N,ke);return Pa(e,t,er,I.placeholder,n,N,de,d,m,E-W)}var mt=S?n:this,Ut=A?mt[e]:e;return W=N.length,d?N=$h(N,d):C&&W>1&&N.reverse(),x&&m<W&&(N.length=m),this&&this!==Me&&this instanceof I&&(Ut=k||li(Ut)),Ut.apply(mt,N)}return I}function Aa(e,t){return function(n,s){return oh(n,e,t(s),{})}}function tr(e,t){return function(n,s){var o;if(n===i&&s===i)return t;if(n!==i&&(o=n),s!==i){if(o===i)return s;typeof n=="string"||typeof s=="string"?(n=$e(n),s=$e(s)):(n=ha(n),s=ha(s)),o=e(n,s)}return o}}function fs(e){return Ct(function(t){return t=se(t,Ke(O())),z(function(n){var s=this;return e(t,function(o){return qe(o,s,n)})})})}function nr(e,t){t=t===i?" ":$e(t);var n=t.length;if(n<2)return n?ss(t,e):t;var s=ss(t,Vi(e/Dn(t)));return On(t)?Jt(pt(s),0,e).join(""):s.slice(0,e)}function Ch(e,t,n,s){var o=t&K,c=li(e);function h(){for(var d=-1,m=arguments.length,E=-1,x=s.length,S=b(x+m),A=this&&this!==Me&&this instanceof h?c:e;++E<x;)S[E]=s[E];for(;m--;)S[E++]=arguments[++d];return qe(A,o?n:this,S)}return h}function Ra(e){return function(t,n,s){return s&&typeof s!="number"&&Ue(t,n,s)&&(n=s=i),t=Bt(t),n===i?(n=t,t=0):n=Bt(n),s=s===i?t<n?1:-1:Bt(s),bh(t,n,s,e)}}function ir(e){return function(t,n){return typeof t=="string"&&typeof n=="string"||(t=ut(t),n=ut(n)),e(t,n)}}function Pa(e,t,n,s,o,c,h,d,m,E){var x=t&j,S=x?h:i,A=x?i:h,L=x?c:i,C=x?i:c;t|=x?ee:nt,t&=~(x?nt:ee),t&ne||(t&=-4);var k=[e,t,o,L,S,C,A,d,m,E],I=n.apply(i,k);return ws(e)&&Fa(I,k),I.placeholder=s,Wa(I,e,t)}function ds(e){var t=be[e];return function(n,s){if(n=ut(n),s=s==null?0:Le(U(s),292),s&&Wo(n)){var o=(X(n)+"e").split("e"),c=t(o[0]+"e"+(+o[1]+s));return o=(X(c)+"e").split("e"),+(o[0]+"e"+(+o[1]-s))}return t(n)}}var Ih=Gn&&1/Di(new Gn([,-0]))[1]==ge?function(e){return new Gn(e)}:Gs;function Ta(e){return function(t){var n=Oe(t);return n==ze?Nr(t):n==Se?Kc(t):Nc(t,e(t))}}function Dt(e,t,n,s,o,c,h,d){var m=t&re;if(!m&&typeof e!="function")throw new st(g);var E=s?s.length:0;if(E||(t&=-97,s=o=i),h=h===i?h:ve(U(h),0),d=d===i?d:U(d),E-=o?o.length:0,t&nt){var x=s,S=o;s=o=i}var A=m?i:_s(e),L=[e,t,n,s,o,x,S,c,h,d];if(A&&Qh(L,A),e=L[0],t=L[1],n=L[2],s=L[3],o=L[4],d=L[9]=L[9]===i?m?0:e.length:ve(L[9]-E,0),!d&&t&(j|Ie)&&(t&=-25),!t||t==K)var C=Oh(e,t,n);else t==j||t==Ie?C=Dh(e,t,d):(t==ee||t==(K|ee))&&!o.length?C=Ch(e,t,n,s):C=er.apply(i,L);var k=A?ca:Fa;return Wa(k(C,L),e,t)}function La(e,t,n,s){return e===i||_t(e,In[n])&&!q.call(s,n)?t:e}function Oa(e,t,n,s,o,c){return ae(e)&&ae(t)&&(c.set(t,e),qi(e,t,i,Oa,c),c.delete(t)),e}function Gh(e){return hi(e)?i:e}function Da(e,t,n,s,o,c){var h=n&me,d=e.length,m=t.length;if(d!=m&&!(h&&m>d))return!1;var E=c.get(e),x=c.get(t);if(E&&x)return E==t&&x==e;var S=-1,A=!0,L=n&ue?new fn:i;for(c.set(e,t),c.set(t,e);++S<d;){var C=e[S],k=t[S];if(s)var I=h?s(k,C,S,t,e,c):s(C,k,S,e,t,c);if(I!==i){if(I)continue;A=!1;break}if(L){if(!Ur(t,function(W,N){if(!Kn(L,N)&&(C===W||o(C,W,n,s,c)))return L.push(N)})){A=!1;break}}else if(!(C===k||o(C,k,n,s,c))){A=!1;break}}return c.delete(e),c.delete(t),A}function Bh(e,t,n,s,o,c,h){switch(n){case bt:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case Ht:return!(e.byteLength!=t.byteLength||!c(new ki(e),new ki(t)));case nn:case Vt:case Nt:return _t(+e,+t);case rn:return e.name==t.name&&e.message==t.message;case Pt:case sn:return e==t+"";case ze:var d=Nr;case Se:var m=s&me;if(d||(d=Di),e.size!=t.size&&!m)return!1;var E=h.get(e);if(E)return E==t;s|=ue,h.set(e,t);var x=Da(d(e),d(t),s,o,c,h);return h.delete(e),x;case Mn:if(ni)return ni.call(e)==ni.call(t)}return!1}function Uh(e,t,n,s,o,c){var h=n&me,d=ps(e),m=d.length,E=ps(t),x=E.length;if(m!=x&&!h)return!1;for(var S=m;S--;){var A=d[S];if(!(h?A in t:q.call(t,A)))return!1}var L=c.get(e),C=c.get(t);if(L&&C)return L==t&&C==e;var k=!0;c.set(e,t),c.set(t,e);for(var I=h;++S<m;){A=d[S];var W=e[A],N=t[A];if(s)var et=h?s(N,W,A,t,e,c):s(W,N,A,e,t,c);if(!(et===i?W===N||o(W,N,n,s,c):et)){k=!1;break}I||(I=A=="constructor")}if(k&&!I){var ke=e.constructor,tt=t.constructor;ke!=tt&&"constructor"in e&&"constructor"in t&&!(typeof ke=="function"&&ke instanceof ke&&typeof tt=="function"&&tt instanceof tt)&&(k=!1)}return c.delete(e),c.delete(t),k}function Ct(e){return Es(ka(e,i,ja),e+"")}function ps(e){return $o(e,Ee,bs)}function gs(e){return $o(e,Ne,Ca)}var _s=Hi?function(e){return Hi.get(e)}:Gs;function rr(e){for(var t=e.name+"",n=Bn[t],s=q.call(Bn,t)?n.length:0;s--;){var o=n[s],c=o.func;if(c==null||c==e)return o.name}return t}function Fn(e){var t=q.call(l,"placeholder")?l:e;return t.placeholder}function O(){var e=l.iteratee||Cs;return e=e===Cs?ta:e,arguments.length?e(arguments[0],arguments[1]):e}function sr(e,t){var n=e.__data__;return Yh(t)?n[typeof t=="string"?"string":"hash"]:n.map}function ms(e){for(var t=Ee(e),n=t.length;n--;){var s=t[n],o=e[s];t[n]=[s,o,Ba(o)]}return t}function gn(e,t){var n=Zc(e,t);return ea(n)?n:i}function kh(e){var t=q.call(e,un),n=e[un];try{e[un]=i;var s=!0}catch{}var o=Bi.call(e);return s&&(t?e[un]=n:delete e[un]),o}var bs=Yr?function(e){return e==null?[]:(e=$(e),Xt(Yr(e),function(t){return zo.call(e,t)}))}:Bs,Ca=Yr?function(e){for(var t=[];e;)jt(t,bs(e)),e=zi(e);return t}:Bs,Oe=Be;(Xr&&Oe(new Xr(new ArrayBuffer(1)))!=bt||Jn&&Oe(new Jn)!=ze||jr&&Oe(jr.resolve())!=yi||Gn&&Oe(new Gn)!=Se||ei&&Oe(new ei)!=on)&&(Oe=function(e){var t=Be(e),n=t==ht?e.constructor:i,s=n?_n(n):"";if(s)switch(s){case wu:return bt;case yu:return ze;case Eu:return yi;case xu:return Se;case Su:return on}return t});function zh(e,t,n){for(var s=-1,o=n.length;++s<o;){var c=n[s],h=c.size;switch(c.type){case"drop":e+=h;break;case"dropRight":t-=h;break;case"take":t=Le(t,e+h);break;case"takeRight":e=ve(e,t-h);break}}return{start:e,end:t}}function Fh(e){var t=e.match(Xl);return t?t[1].split(jl):[]}function Ia(e,t,n){t=$t(t,e);for(var s=-1,o=t.length,c=!1;++s<o;){var h=xt(t[s]);if(!(c=e!=null&&n(e,h)))break;e=e[h]}return c||++s!=o?c:(o=e==null?0:e.length,!!o&&fr(o)&&It(h,o)&&(B(e)||mn(e)))}function Wh(e){var t=e.length,n=new e.constructor(t);return t&&typeof e[0]=="string"&&q.call(e,"index")&&(n.index=e.index,n.input=e.input),n}function Ga(e){return typeof e.constructor=="function"&&!ci(e)?Un(zi(e)):{}}function Vh(e,t,n){var s=e.constructor;switch(t){case Ht:return hs(e);case nn:case Vt:return new s(+e);case bt:return Mh(e,n);case An:case Xn:case Rn:case jn:case Zn:case Qn:case Pn:case vt:case Mi:return ma(e,n);case ze:return new s;case Nt:case sn:return new s(e);case Pt:return Ah(e);case Se:return new s;case Mn:return Rh(e)}}function Nh(e,t){var n=t.length;if(!n)return e;var s=n-1;return t[s]=(n>1?"& ":"")+t[s],t=t.join(n>2?", ":" "),e.replace(Yl,`{
9
- /* [wrapped with `+t+`] */
10
- `)}function Hh(e){return B(e)||mn(e)||!!(Fo&&e&&e[Fo])}function It(e,t){var n=typeof e;return t=t??Te,!!t&&(n=="number"||n!="symbol"&&nc.test(e))&&e>-1&&e%1==0&&e<t}function Ue(e,t,n){if(!ae(n))return!1;var s=typeof t;return(s=="number"?Ve(n)&&It(t,n.length):s=="string"&&t in n)?_t(n[t],e):!1}function vs(e,t){if(B(e))return!1;var n=typeof e;return n=="number"||n=="symbol"||n=="boolean"||e==null||Je(e)?!0:dt.test(e)||!ft.test(e)||t!=null&&e in $(t)}function Yh(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function ws(e){var t=rr(e),n=l[t];if(typeof n!="function"||!(t in V.prototype))return!1;if(e===n)return!0;var s=_s(n);return!!s&&e===s[0]}function Xh(e){return!!Bo&&Bo in e}var jh=Ii?Gt:Us;function ci(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||In;return e===n}function Ba(e){return e===e&&!ae(e)}function Ua(e,t){return function(n){return n==null?!1:n[e]===t&&(t!==i||e in $(n))}}function Zh(e){var t=ur(e,function(s){return n.size===H&&n.clear(),s}),n=t.cache;return t}function Qh(e,t){var n=e[1],s=t[1],o=n|s,c=o<(K|re|Z),h=s==Z&&n==j||s==Z&&n==Xe&&e[7].length<=t[8]||s==(Z|Xe)&&t[7].length<=t[8]&&n==j;if(!(c||h))return e;s&K&&(e[2]=t[2],o|=n&K?0:ne);var d=t[3];if(d){var m=e[3];e[3]=m?va(m,d,t[4]):d,e[4]=m?Zt(e[3],le):t[4]}return d=t[5],d&&(m=e[5],e[5]=m?wa(m,d,t[6]):d,e[6]=m?Zt(e[5],le):t[6]),d=t[7],d&&(e[7]=d),s&Z&&(e[8]=e[8]==null?t[8]:Le(e[8],t[8])),e[9]==null&&(e[9]=t[9]),e[0]=t[0],e[1]=o,e}function qh(e){var t=[];if(e!=null)for(var n in $(e))t.push(n);return t}function Kh(e){return Bi.call(e)}function ka(e,t,n){return t=ve(t===i?e.length-1:t,0),function(){for(var s=arguments,o=-1,c=ve(s.length-t,0),h=b(c);++o<c;)h[o]=s[t+o];o=-1;for(var d=b(t+1);++o<t;)d[o]=s[o];return d[t]=n(h),qe(e,this,d)}}function za(e,t){return t.length<2?e:pn(e,lt(t,0,-1))}function $h(e,t){for(var n=e.length,s=Le(t.length,n),o=We(e);s--;){var c=t[s];e[s]=It(c,n)?o[c]:i}return e}function ys(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}var Fa=Va(ca),ui=du||function(e,t){return Me.setTimeout(e,t)},Es=Va(yh);function Wa(e,t,n){var s=t+"";return Es(e,Nh(s,Jh(Fh(s),n)))}function Va(e){var t=0,n=0;return function(){var s=mu(),o=zt-(s-n);if(n=s,o>0){if(++t>=Rt)return arguments[0]}else t=0;return e.apply(i,arguments)}}function or(e,t){var n=-1,s=e.length,o=s-1;for(t=t===i?s:t;++n<t;){var c=rs(n,o),h=e[c];e[c]=e[n],e[n]=h}return e.length=t,e}var Na=Zh(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(an,function(n,s,o,c){t.push(o?c.replace(ql,"$1"):s||n)}),t});function xt(e){if(typeof e=="string"||Je(e))return e;var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}function _n(e){if(e!=null){try{return Gi.call(e)}catch{}try{return e+""}catch{}}return""}function Jh(e,t){return rt(En,function(n){var s="_."+n[0];t&n[1]&&!Li(e,s)&&e.push(s)}),e.sort()}function Ha(e){if(e instanceof V)return e.clone();var t=new ot(e.__wrapped__,e.__chain__);return t.__actions__=We(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}function ef(e,t,n){(n?Ue(e,t,n):t===i)?t=1:t=ve(U(t),0);var s=e==null?0:e.length;if(!s||t<1)return[];for(var o=0,c=0,h=b(Vi(s/t));o<s;)h[c++]=lt(e,o,o+=t);return h}function tf(e){for(var t=-1,n=e==null?0:e.length,s=0,o=[];++t<n;){var c=e[t];c&&(o[s++]=c)}return o}function nf(){var e=arguments.length;if(!e)return[];for(var t=b(e-1),n=arguments[0],s=e;s--;)t[s-1]=arguments[s];return jt(B(n)?We(n):[n],Ae(t,1))}var rf=z(function(e,t){return fe(e)?ri(e,Ae(t,1,fe,!0)):[]}),sf=z(function(e,t){var n=ct(t);return fe(n)&&(n=i),fe(e)?ri(e,Ae(t,1,fe,!0),O(n,2)):[]}),of=z(function(e,t){var n=ct(t);return fe(n)&&(n=i),fe(e)?ri(e,Ae(t,1,fe,!0),i,n):[]});function af(e,t,n){var s=e==null?0:e.length;return s?(t=n||t===i?1:U(t),lt(e,t<0?0:t,s)):[]}function lf(e,t,n){var s=e==null?0:e.length;return s?(t=n||t===i?1:U(t),t=s-t,lt(e,0,t<0?0:t)):[]}function cf(e,t){return e&&e.length?$i(e,O(t,3),!0,!0):[]}function uf(e,t){return e&&e.length?$i(e,O(t,3),!0):[]}function hf(e,t,n,s){var o=e==null?0:e.length;return o?(n&&typeof n!="number"&&Ue(e,t,n)&&(n=0,s=o),nh(e,t,n,s)):[]}function Ya(e,t,n){var s=e==null?0:e.length;if(!s)return-1;var o=n==null?0:U(n);return o<0&&(o=ve(s+o,0)),Oi(e,O(t,3),o)}function Xa(e,t,n){var s=e==null?0:e.length;if(!s)return-1;var o=s-1;return n!==i&&(o=U(n),o=n<0?ve(s+o,0):Le(o,s-1)),Oi(e,O(t,3),o,!0)}function ja(e){var t=e==null?0:e.length;return t?Ae(e,1):[]}function ff(e){var t=e==null?0:e.length;return t?Ae(e,ge):[]}function df(e,t){var n=e==null?0:e.length;return n?(t=t===i?1:U(t),Ae(e,t)):[]}function pf(e){for(var t=-1,n=e==null?0:e.length,s={};++t<n;){var o=e[t];s[o[0]]=o[1]}return s}function Za(e){return e&&e.length?e[0]:i}function gf(e,t,n){var s=e==null?0:e.length;if(!s)return-1;var o=n==null?0:U(n);return o<0&&(o=ve(s+o,0)),Ln(e,t,o)}function _f(e){var t=e==null?0:e.length;return t?lt(e,0,-1):[]}var mf=z(function(e){var t=se(e,cs);return t.length&&t[0]===e[0]?Jr(t):[]}),bf=z(function(e){var t=ct(e),n=se(e,cs);return t===ct(n)?t=i:n.pop(),n.length&&n[0]===e[0]?Jr(n,O(t,2)):[]}),vf=z(function(e){var t=ct(e),n=se(e,cs);return t=typeof t=="function"?t:i,t&&n.pop(),n.length&&n[0]===e[0]?Jr(n,i,t):[]});function wf(e,t){return e==null?"":gu.call(e,t)}function ct(e){var t=e==null?0:e.length;return t?e[t-1]:i}function yf(e,t,n){var s=e==null?0:e.length;if(!s)return-1;var o=s;return n!==i&&(o=U(n),o=o<0?ve(s+o,0):Le(o,s-1)),t===t?Jc(e,t,o):Oi(e,Po,o,!0)}function Ef(e,t){return e&&e.length?sa(e,U(t)):i}var xf=z(Qa);function Qa(e,t){return e&&e.length&&t&&t.length?is(e,t):e}function Sf(e,t,n){return e&&e.length&&t&&t.length?is(e,t,O(n,2)):e}function Mf(e,t,n){return e&&e.length&&t&&t.length?is(e,t,i,n):e}var Af=Ct(function(e,t){var n=e==null?0:e.length,s=Qr(e,t);return la(e,se(t,function(o){return It(o,n)?+o:o}).sort(ba)),s});function Rf(e,t){var n=[];if(!(e&&e.length))return n;var s=-1,o=[],c=e.length;for(t=O(t,3);++s<c;){var h=e[s];t(h,s,e)&&(n.push(h),o.push(s))}return la(e,o),n}function xs(e){return e==null?e:vu.call(e)}function Pf(e,t,n){var s=e==null?0:e.length;return s?(n&&typeof n!="number"&&Ue(e,t,n)?(t=0,n=s):(t=t==null?0:U(t),n=n===i?s:U(n)),lt(e,t,n)):[]}function Tf(e,t){return Ki(e,t)}function Lf(e,t,n){return os(e,t,O(n,2))}function Of(e,t){var n=e==null?0:e.length;if(n){var s=Ki(e,t);if(s<n&&_t(e[s],t))return s}return-1}function Df(e,t){return Ki(e,t,!0)}function Cf(e,t,n){return os(e,t,O(n,2),!0)}function If(e,t){var n=e==null?0:e.length;if(n){var s=Ki(e,t,!0)-1;if(_t(e[s],t))return s}return-1}function Gf(e){return e&&e.length?ua(e):[]}function Bf(e,t){return e&&e.length?ua(e,O(t,2)):[]}function Uf(e){var t=e==null?0:e.length;return t?lt(e,1,t):[]}function kf(e,t,n){return e&&e.length?(t=n||t===i?1:U(t),lt(e,0,t<0?0:t)):[]}function zf(e,t,n){var s=e==null?0:e.length;return s?(t=n||t===i?1:U(t),t=s-t,lt(e,t<0?0:t,s)):[]}function Ff(e,t){return e&&e.length?$i(e,O(t,3),!1,!0):[]}function Wf(e,t){return e&&e.length?$i(e,O(t,3)):[]}var Vf=z(function(e){return Kt(Ae(e,1,fe,!0))}),Nf=z(function(e){var t=ct(e);return fe(t)&&(t=i),Kt(Ae(e,1,fe,!0),O(t,2))}),Hf=z(function(e){var t=ct(e);return t=typeof t=="function"?t:i,Kt(Ae(e,1,fe,!0),i,t)});function Yf(e){return e&&e.length?Kt(e):[]}function Xf(e,t){return e&&e.length?Kt(e,O(t,2)):[]}function jf(e,t){return t=typeof t=="function"?t:i,e&&e.length?Kt(e,i,t):[]}function Ss(e){if(!(e&&e.length))return[];var t=0;return e=Xt(e,function(n){if(fe(n))return t=ve(n.length,t),!0}),Wr(t,function(n){return se(e,kr(n))})}function qa(e,t){if(!(e&&e.length))return[];var n=Ss(e);return t==null?n:se(n,function(s){return qe(t,i,s)})}var Zf=z(function(e,t){return fe(e)?ri(e,t):[]}),Qf=z(function(e){return ls(Xt(e,fe))}),qf=z(function(e){var t=ct(e);return fe(t)&&(t=i),ls(Xt(e,fe),O(t,2))}),Kf=z(function(e){var t=ct(e);return t=typeof t=="function"?t:i,ls(Xt(e,fe),i,t)}),$f=z(Ss);function Jf(e,t){return pa(e||[],t||[],ii)}function ed(e,t){return pa(e||[],t||[],ai)}var td=z(function(e){var t=e.length,n=t>1?e[t-1]:i;return n=typeof n=="function"?(e.pop(),n):i,qa(e,n)});function Ka(e){var t=l(e);return t.__chain__=!0,t}function nd(e,t){return t(e),e}function ar(e,t){return t(e)}var id=Ct(function(e){var t=e.length,n=t?e[0]:0,s=this.__wrapped__,o=function(c){return Qr(c,e)};return t>1||this.__actions__.length||!(s instanceof V)||!It(n)?this.thru(o):(s=s.slice(n,+n+(t?1:0)),s.__actions__.push({func:ar,args:[o],thisArg:i}),new ot(s,this.__chain__).thru(function(c){return t&&!c.length&&c.push(i),c}))});function rd(){return Ka(this)}function sd(){return new ot(this.value(),this.__chain__)}function od(){this.__values__===i&&(this.__values__=hl(this.value()));var e=this.__index__>=this.__values__.length,t=e?i:this.__values__[this.__index__++];return{done:e,value:t}}function ad(){return this}function ld(e){for(var t,n=this;n instanceof Xi;){var s=Ha(n);s.__index__=0,s.__values__=i,t?o.__wrapped__=s:t=s;var o=s;n=n.__wrapped__}return o.__wrapped__=e,t}function cd(){var e=this.__wrapped__;if(e instanceof V){var t=e;return this.__actions__.length&&(t=new V(this)),t=t.reverse(),t.__actions__.push({func:ar,args:[xs],thisArg:i}),new ot(t,this.__chain__)}return this.thru(xs)}function ud(){return da(this.__wrapped__,this.__actions__)}var hd=Ji(function(e,t,n){q.call(e,n)?++e[n]:Ot(e,n,1)});function fd(e,t,n){var s=B(e)?Ao:th;return n&&Ue(e,t,n)&&(t=i),s(e,O(t,3))}function dd(e,t){var n=B(e)?Xt:qo;return n(e,O(t,3))}var pd=Sa(Ya),gd=Sa(Xa);function _d(e,t){return Ae(lr(e,t),1)}function md(e,t){return Ae(lr(e,t),ge)}function bd(e,t,n){return n=n===i?1:U(n),Ae(lr(e,t),n)}function $a(e,t){var n=B(e)?rt:qt;return n(e,O(t,3))}function Ja(e,t){var n=B(e)?Bc:Qo;return n(e,O(t,3))}var vd=Ji(function(e,t,n){q.call(e,n)?e[n].push(t):Ot(e,n,[t])});function wd(e,t,n,s){e=Ve(e)?e:Vn(e),n=n&&!s?U(n):0;var o=e.length;return n<0&&(n=ve(o+n,0)),dr(e)?n<=o&&e.indexOf(t,n)>-1:!!o&&Ln(e,t,n)>-1}var yd=z(function(e,t,n){var s=-1,o=typeof t=="function",c=Ve(e)?b(e.length):[];return qt(e,function(h){c[++s]=o?qe(t,h,n):si(h,t,n)}),c}),Ed=Ji(function(e,t,n){Ot(e,n,t)});function lr(e,t){var n=B(e)?se:na;return n(e,O(t,3))}function xd(e,t,n,s){return e==null?[]:(B(t)||(t=t==null?[]:[t]),n=s?i:n,B(n)||(n=n==null?[]:[n]),oa(e,t,n))}var Sd=Ji(function(e,t,n){e[n?0:1].push(t)},function(){return[[],[]]});function Md(e,t,n){var s=B(e)?Br:Lo,o=arguments.length<3;return s(e,O(t,4),n,o,qt)}function Ad(e,t,n){var s=B(e)?Uc:Lo,o=arguments.length<3;return s(e,O(t,4),n,o,Qo)}function Rd(e,t){var n=B(e)?Xt:qo;return n(e,hr(O(t,3)))}function Pd(e){var t=B(e)?Yo:vh;return t(e)}function Td(e,t,n){(n?Ue(e,t,n):t===i)?t=1:t=U(t);var s=B(e)?qu:wh;return s(e,t)}function Ld(e){var t=B(e)?Ku:Eh;return t(e)}function Od(e){if(e==null)return 0;if(Ve(e))return dr(e)?Dn(e):e.length;var t=Oe(e);return t==ze||t==Se?e.size:ts(e).length}function Dd(e,t,n){var s=B(e)?Ur:xh;return n&&Ue(e,t,n)&&(t=i),s(e,O(t,3))}var Cd=z(function(e,t){if(e==null)return[];var n=t.length;return n>1&&Ue(e,t[0],t[1])?t=[]:n>2&&Ue(t[0],t[1],t[2])&&(t=[t[0]]),oa(e,Ae(t,1),[])}),cr=fu||function(){return Me.Date.now()};function Id(e,t){if(typeof t!="function")throw new st(g);return e=U(e),function(){if(--e<1)return t.apply(this,arguments)}}function el(e,t,n){return t=n?i:t,t=e&&t==null?e.length:t,Dt(e,Z,i,i,i,i,t)}function tl(e,t){var n;if(typeof t!="function")throw new st(g);return e=U(e),function(){return--e>0&&(n=t.apply(this,arguments)),e<=1&&(t=i),n}}var Ms=z(function(e,t,n){var s=K;if(n.length){var o=Zt(n,Fn(Ms));s|=ee}return Dt(e,s,t,n,o)}),nl=z(function(e,t,n){var s=K|re;if(n.length){var o=Zt(n,Fn(nl));s|=ee}return Dt(t,s,e,n,o)});function il(e,t,n){t=n?i:t;var s=Dt(e,j,i,i,i,i,i,t);return s.placeholder=il.placeholder,s}function rl(e,t,n){t=n?i:t;var s=Dt(e,Ie,i,i,i,i,i,t);return s.placeholder=rl.placeholder,s}function sl(e,t,n){var s,o,c,h,d,m,E=0,x=!1,S=!1,A=!0;if(typeof e!="function")throw new st(g);t=ut(t)||0,ae(n)&&(x=!!n.leading,S="maxWait"in n,c=S?ve(ut(n.maxWait)||0,t):c,A="trailing"in n?!!n.trailing:A);function L(de){var mt=s,Ut=o;return s=o=i,E=de,h=e.apply(Ut,mt),h}function C(de){return E=de,d=ui(W,t),x?L(de):h}function k(de){var mt=de-m,Ut=de-E,Sl=t-mt;return S?Le(Sl,c-Ut):Sl}function I(de){var mt=de-m,Ut=de-E;return m===i||mt>=t||mt<0||S&&Ut>=c}function W(){var de=cr();if(I(de))return N(de);d=ui(W,k(de))}function N(de){return d=i,A&&s?L(de):(s=o=i,h)}function et(){d!==i&&ga(d),E=0,s=m=o=d=i}function ke(){return d===i?h:N(cr())}function tt(){var de=cr(),mt=I(de);if(s=arguments,o=this,m=de,mt){if(d===i)return C(m);if(S)return ga(d),d=ui(W,t),L(m)}return d===i&&(d=ui(W,t)),h}return tt.cancel=et,tt.flush=ke,tt}var Gd=z(function(e,t){return Zo(e,1,t)}),Bd=z(function(e,t,n){return Zo(e,ut(t)||0,n)});function Ud(e){return Dt(e,At)}function ur(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new st(g);var n=function(){var s=arguments,o=t?t.apply(this,s):s[0],c=n.cache;if(c.has(o))return c.get(o);var h=e.apply(this,s);return n.cache=c.set(o,h)||c,h};return n.cache=new(ur.Cache||Lt),n}ur.Cache=Lt;function hr(e){if(typeof e!="function")throw new st(g);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}function kd(e){return tl(2,e)}var zd=Sh(function(e,t){t=t.length==1&&B(t[0])?se(t[0],Ke(O())):se(Ae(t,1),Ke(O()));var n=t.length;return z(function(s){for(var o=-1,c=Le(s.length,n);++o<c;)s[o]=t[o].call(this,s[o]);return qe(e,this,s)})}),As=z(function(e,t){var n=Zt(t,Fn(As));return Dt(e,ee,i,t,n)}),ol=z(function(e,t){var n=Zt(t,Fn(ol));return Dt(e,nt,i,t,n)}),Fd=Ct(function(e,t){return Dt(e,Xe,i,i,i,t)});function Wd(e,t){if(typeof e!="function")throw new st(g);return t=t===i?t:U(t),z(e,t)}function Vd(e,t){if(typeof e!="function")throw new st(g);return t=t==null?0:ve(U(t),0),z(function(n){var s=n[t],o=Jt(n,0,t);return s&&jt(o,s),qe(e,this,o)})}function Nd(e,t,n){var s=!0,o=!0;if(typeof e!="function")throw new st(g);return ae(n)&&(s="leading"in n?!!n.leading:s,o="trailing"in n?!!n.trailing:o),sl(e,t,{leading:s,maxWait:t,trailing:o})}function Hd(e){return el(e,1)}function Yd(e,t){return As(us(t),e)}function Xd(){if(!arguments.length)return[];var e=arguments[0];return B(e)?e:[e]}function jd(e){return at(e,Pe)}function Zd(e,t){return t=typeof t=="function"?t:i,at(e,Pe,t)}function Qd(e){return at(e,ce|Pe)}function qd(e,t){return t=typeof t=="function"?t:i,at(e,ce|Pe,t)}function Kd(e,t){return t==null||jo(e,t,Ee(t))}function _t(e,t){return e===t||e!==e&&t!==t}var $d=ir($r),Jd=ir(function(e,t){return e>=t}),mn=Jo(function(){return arguments}())?Jo:function(e){return he(e)&&q.call(e,"callee")&&!zo.call(e,"callee")},B=b.isArray,ep=wo?Ke(wo):ah;function Ve(e){return e!=null&&fr(e.length)&&!Gt(e)}function fe(e){return he(e)&&Ve(e)}function tp(e){return e===!0||e===!1||he(e)&&Be(e)==nn}var en=pu||Us,np=yo?Ke(yo):lh;function ip(e){return he(e)&&e.nodeType===1&&!hi(e)}function rp(e){if(e==null)return!0;if(Ve(e)&&(B(e)||typeof e=="string"||typeof e.splice=="function"||en(e)||Wn(e)||mn(e)))return!e.length;var t=Oe(e);if(t==ze||t==Se)return!e.size;if(ci(e))return!ts(e).length;for(var n in e)if(q.call(e,n))return!1;return!0}function sp(e,t){return oi(e,t)}function op(e,t,n){n=typeof n=="function"?n:i;var s=n?n(e,t):i;return s===i?oi(e,t,i,n):!!s}function Rs(e){if(!he(e))return!1;var t=Be(e);return t==rn||t==bi||typeof e.message=="string"&&typeof e.name=="string"&&!hi(e)}function ap(e){return typeof e=="number"&&Wo(e)}function Gt(e){if(!ae(e))return!1;var t=Be(e);return t==Sn||t==vi||t==Ar||t==Ei}function al(e){return typeof e=="number"&&e==U(e)}function fr(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=Te}function ae(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}function he(e){return e!=null&&typeof e=="object"}var ll=Eo?Ke(Eo):uh;function lp(e,t){return e===t||es(e,t,ms(t))}function cp(e,t,n){return n=typeof n=="function"?n:i,es(e,t,ms(t),n)}function up(e){return cl(e)&&e!=+e}function hp(e){if(jh(e))throw new G(v);return ea(e)}function fp(e){return e===null}function dp(e){return e==null}function cl(e){return typeof e=="number"||he(e)&&Be(e)==Nt}function hi(e){if(!he(e)||Be(e)!=ht)return!1;var t=zi(e);if(t===null)return!0;var n=q.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&Gi.call(n)==lu}var Ps=xo?Ke(xo):hh;function pp(e){return al(e)&&e>=-9007199254740991&&e<=Te}var ul=So?Ke(So):fh;function dr(e){return typeof e=="string"||!B(e)&&he(e)&&Be(e)==sn}function Je(e){return typeof e=="symbol"||he(e)&&Be(e)==Mn}var Wn=Mo?Ke(Mo):dh;function gp(e){return e===i}function _p(e){return he(e)&&Oe(e)==on}function mp(e){return he(e)&&Be(e)==Si}var bp=ir(ns),vp=ir(function(e,t){return e<=t});function hl(e){if(!e)return[];if(Ve(e))return dr(e)?pt(e):We(e);if($n&&e[$n])return qc(e[$n]());var t=Oe(e),n=t==ze?Nr:t==Se?Di:Vn;return n(e)}function Bt(e){if(!e)return e===0?e:0;if(e=ut(e),e===ge||e===-1/0){var t=e<0?-1:1;return t*_e}return e===e?e:0}function U(e){var t=Bt(e),n=t%1;return t===t?n?t-n:t:0}function fl(e){return e?dn(U(e),0,we):0}function ut(e){if(typeof e=="number")return e;if(Je(e))return Ze;if(ae(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=ae(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=Oo(e);var n=Jl.test(e);return n||tc.test(e)?Cc(e.slice(2),n?2:8):$l.test(e)?Ze:+e}function dl(e){return Et(e,Ne(e))}function wp(e){return e?dn(U(e),-9007199254740991,Te):e===0?e:0}function X(e){return e==null?"":$e(e)}var yp=kn(function(e,t){if(ci(t)||Ve(t)){Et(t,Ee(t),e);return}for(var n in t)q.call(t,n)&&ii(e,n,t[n])}),pl=kn(function(e,t){Et(t,Ne(t),e)}),pr=kn(function(e,t,n,s){Et(t,Ne(t),e,s)}),Ep=kn(function(e,t,n,s){Et(t,Ee(t),e,s)}),xp=Ct(Qr);function Sp(e,t){var n=Un(e);return t==null?n:Xo(n,t)}var Mp=z(function(e,t){e=$(e);var n=-1,s=t.length,o=s>2?t[2]:i;for(o&&Ue(t[0],t[1],o)&&(s=1);++n<s;)for(var c=t[n],h=Ne(c),d=-1,m=h.length;++d<m;){var E=h[d],x=e[E];(x===i||_t(x,In[E])&&!q.call(e,E))&&(e[E]=c[E])}return e}),Ap=z(function(e){return e.push(i,Oa),qe(gl,i,e)});function Rp(e,t){return Ro(e,O(t,3),yt)}function Pp(e,t){return Ro(e,O(t,3),Kr)}function Tp(e,t){return e==null?e:qr(e,O(t,3),Ne)}function Lp(e,t){return e==null?e:Ko(e,O(t,3),Ne)}function Op(e,t){return e&&yt(e,O(t,3))}function Dp(e,t){return e&&Kr(e,O(t,3))}function Cp(e){return e==null?[]:Qi(e,Ee(e))}function Ip(e){return e==null?[]:Qi(e,Ne(e))}function Ts(e,t,n){var s=e==null?i:pn(e,t);return s===i?n:s}function Gp(e,t){return e!=null&&Ia(e,t,ih)}function Ls(e,t){return e!=null&&Ia(e,t,rh)}var Bp=Aa(function(e,t,n){t!=null&&typeof t.toString!="function"&&(t=Bi.call(t)),e[t]=n},Ds(He)),Up=Aa(function(e,t,n){t!=null&&typeof t.toString!="function"&&(t=Bi.call(t)),q.call(e,t)?e[t].push(n):e[t]=[n]},O),kp=z(si);function Ee(e){return Ve(e)?Ho(e):ts(e)}function Ne(e){return Ve(e)?Ho(e,!0):ph(e)}function zp(e,t){var n={};return t=O(t,3),yt(e,function(s,o,c){Ot(n,t(s,o,c),s)}),n}function Fp(e,t){var n={};return t=O(t,3),yt(e,function(s,o,c){Ot(n,o,t(s,o,c))}),n}var Wp=kn(function(e,t,n){qi(e,t,n)}),gl=kn(function(e,t,n,s){qi(e,t,n,s)}),Vp=Ct(function(e,t){var n={};if(e==null)return n;var s=!1;t=se(t,function(c){return c=$t(c,e),s||(s=c.length>1),c}),Et(e,gs(e),n),s&&(n=at(n,ce|Re|Pe,Gh));for(var o=t.length;o--;)as(n,t[o]);return n});function Np(e,t){return _l(e,hr(O(t)))}var Hp=Ct(function(e,t){return e==null?{}:_h(e,t)});function _l(e,t){if(e==null)return{};var n=se(gs(e),function(s){return[s]});return t=O(t),aa(e,n,function(s,o){return t(s,o[0])})}function Yp(e,t,n){t=$t(t,e);var s=-1,o=t.length;for(o||(o=1,e=i);++s<o;){var c=e==null?i:e[xt(t[s])];c===i&&(s=o,c=n),e=Gt(c)?c.call(e):c}return e}function Xp(e,t,n){return e==null?e:ai(e,t,n)}function jp(e,t,n,s){return s=typeof s=="function"?s:i,e==null?e:ai(e,t,n,s)}var ml=Ta(Ee),bl=Ta(Ne);function Zp(e,t,n){var s=B(e),o=s||en(e)||Wn(e);if(t=O(t,4),n==null){var c=e&&e.constructor;o?n=s?new c:[]:ae(e)?n=Gt(c)?Un(zi(e)):{}:n={}}return(o?rt:yt)(e,function(h,d,m){return t(n,h,d,m)}),n}function Qp(e,t){return e==null?!0:as(e,t)}function qp(e,t,n){return e==null?e:fa(e,t,us(n))}function Kp(e,t,n,s){return s=typeof s=="function"?s:i,e==null?e:fa(e,t,us(n),s)}function Vn(e){return e==null?[]:Vr(e,Ee(e))}function $p(e){return e==null?[]:Vr(e,Ne(e))}function Jp(e,t,n){return n===i&&(n=t,t=i),n!==i&&(n=ut(n),n=n===n?n:0),t!==i&&(t=ut(t),t=t===t?t:0),dn(ut(e),t,n)}function eg(e,t,n){return t=Bt(t),n===i?(n=t,t=0):n=Bt(n),e=ut(e),sh(e,t,n)}function tg(e,t,n){if(n&&typeof n!="boolean"&&Ue(e,t,n)&&(t=n=i),n===i&&(typeof t=="boolean"?(n=t,t=i):typeof e=="boolean"&&(n=e,e=i)),e===i&&t===i?(e=0,t=1):(e=Bt(e),t===i?(t=e,e=0):t=Bt(t)),e>t){var s=e;e=t,t=s}if(n||e%1||t%1){var o=Vo();return Le(e+o*(t-e+Dc("1e-"+((o+"").length-1))),t)}return rs(e,t)}var ng=zn(function(e,t,n){return t=t.toLowerCase(),e+(n?vl(t):t)});function vl(e){return Os(X(e).toLowerCase())}function wl(e){return e=X(e),e&&e.replace(ic,Yc).replace(Ec,"")}function ig(e,t,n){e=X(e),t=$e(t);var s=e.length;n=n===i?s:dn(U(n),0,s);var o=n;return n-=t.length,n>=0&&e.slice(n,o)==t}function rg(e){return e=X(e),e&&Fe.test(e)?e.replace(ye,Xc):e}function sg(e){return e=X(e),e&&ln.test(e)?e.replace(Qe,"\\$&"):e}var og=zn(function(e,t,n){return e+(n?"-":"")+t.toLowerCase()}),ag=zn(function(e,t,n){return e+(n?" ":"")+t.toLowerCase()}),lg=xa("toLowerCase");function cg(e,t,n){e=X(e),t=U(t);var s=t?Dn(e):0;if(!t||s>=t)return e;var o=(t-s)/2;return nr(Ni(o),n)+e+nr(Vi(o),n)}function ug(e,t,n){e=X(e),t=U(t);var s=t?Dn(e):0;return t&&s<t?e+nr(t-s,n):e}function hg(e,t,n){e=X(e),t=U(t);var s=t?Dn(e):0;return t&&s<t?nr(t-s,n)+e:e}function fg(e,t,n){return n||t==null?t=0:t&&(t=+t),bu(X(e).replace(Yt,""),t||0)}function dg(e,t,n){return(n?Ue(e,t,n):t===i)?t=1:t=U(t),ss(X(e),t)}function pg(){var e=arguments,t=X(e[0]);return e.length<3?t:t.replace(e[1],e[2])}var gg=zn(function(e,t,n){return e+(n?"_":"")+t.toLowerCase()});function _g(e,t,n){return n&&typeof n!="number"&&Ue(e,t,n)&&(t=n=i),n=n===i?we:n>>>0,n?(e=X(e),e&&(typeof t=="string"||t!=null&&!Ps(t))&&(t=$e(t),!t&&On(e))?Jt(pt(e),0,n):e.split(t,n)):[]}var mg=zn(function(e,t,n){return e+(n?" ":"")+Os(t)});function bg(e,t,n){return e=X(e),n=n==null?0:dn(U(n),0,e.length),t=$e(t),e.slice(n,n+t.length)==t}function vg(e,t,n){var s=l.templateSettings;n&&Ue(e,t,n)&&(t=i),e=X(e),t=pr({},t,s,La);var o=pr({},t.imports,s.imports,La),c=Ee(o),h=Vr(o,c),d,m,E=0,x=t.interpolate||Ri,S="__p += '",A=Hr((t.escape||Ri).source+"|"+x.source+"|"+(x===qn?Kl:Ri).source+"|"+(t.evaluate||Ri).source+"|$","g"),L="//# sourceURL="+(q.call(t,"sourceURL")?(t.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Rc+"]")+`
11
- `;e.replace(A,function(I,W,N,et,ke,tt){return N||(N=et),S+=e.slice(E,tt).replace(rc,jc),W&&(d=!0,S+=`' +
12
- __e(`+W+`) +
13
- '`),ke&&(m=!0,S+=`';
14
- `+ke+`;
15
- __p += '`),N&&(S+=`' +
16
- ((__t = (`+N+`)) == null ? '' : __t) +
17
- '`),E=tt+I.length,I}),S+=`';
18
- `;var C=q.call(t,"variable")&&t.variable;if(!C)S=`with (obj) {
19
- `+S+`
20
- }
21
- `;else if(Ql.test(C))throw new G(R);S=(m?S.replace(p,""):S).replace(P,"$1").replace(F,"$1;"),S="function("+(C||"obj")+`) {
22
- `+(C?"":`obj || (obj = {});
23
- `)+"var __t, __p = ''"+(d?", __e = _.escape":"")+(m?`, __j = Array.prototype.join;
24
- function print() { __p += __j.call(arguments, '') }
25
- `:`;
26
- `)+S+`return __p
27
- }`;var k=El(function(){return Y(c,L+"return "+S).apply(i,h)});if(k.source=S,Rs(k))throw k;return k}function wg(e){return X(e).toLowerCase()}function yg(e){return X(e).toUpperCase()}function Eg(e,t,n){if(e=X(e),e&&(n||t===i))return Oo(e);if(!e||!(t=$e(t)))return e;var s=pt(e),o=pt(t),c=Do(s,o),h=Co(s,o)+1;return Jt(s,c,h).join("")}function xg(e,t,n){if(e=X(e),e&&(n||t===i))return e.slice(0,Go(e)+1);if(!e||!(t=$e(t)))return e;var s=pt(e),o=Co(s,pt(t))+1;return Jt(s,0,o).join("")}function Sg(e,t,n){if(e=X(e),e&&(n||t===i))return e.replace(Yt,"");if(!e||!(t=$e(t)))return e;var s=pt(e),o=Do(s,pt(t));return Jt(s,o).join("")}function Mg(e,t){var n=Yn,s=kt;if(ae(t)){var o="separator"in t?t.separator:o;n="length"in t?U(t.length):n,s="omission"in t?$e(t.omission):s}e=X(e);var c=e.length;if(On(e)){var h=pt(e);c=h.length}if(n>=c)return e;var d=n-Dn(s);if(d<1)return s;var m=h?Jt(h,0,d).join(""):e.slice(0,d);if(o===i)return m+s;if(h&&(d+=m.length-d),Ps(o)){if(e.slice(d).search(o)){var E,x=m;for(o.global||(o=Hr(o.source,X($s.exec(o))+"g")),o.lastIndex=0;E=o.exec(x);)var S=E.index;m=m.slice(0,S===i?d:S)}}else if(e.indexOf($e(o),d)!=d){var A=m.lastIndexOf(o);A>-1&&(m=m.slice(0,A))}return m+s}function Ag(e){return e=X(e),e&&wt.test(e)?e.replace(Q,eu):e}var Rg=zn(function(e,t,n){return e+(n?" ":"")+t.toUpperCase()}),Os=xa("toUpperCase");function yl(e,t,n){return e=X(e),t=n?i:t,t===i?Qc(e)?iu(e):Fc(e):e.match(t)||[]}var El=z(function(e,t){try{return qe(e,i,t)}catch(n){return Rs(n)?n:new G(n)}}),Pg=Ct(function(e,t){return rt(t,function(n){n=xt(n),Ot(e,n,Ms(e[n],e))}),e});function Tg(e){var t=e==null?0:e.length,n=O();return e=t?se(e,function(s){if(typeof s[1]!="function")throw new st(g);return[n(s[0]),s[1]]}):[],z(function(s){for(var o=-1;++o<t;){var c=e[o];if(qe(c[0],this,s))return qe(c[1],this,s)}})}function Lg(e){return eh(at(e,ce))}function Ds(e){return function(){return e}}function Og(e,t){return e==null||e!==e?t:e}var Dg=Ma(),Cg=Ma(!0);function He(e){return e}function Cs(e){return ta(typeof e=="function"?e:at(e,ce))}function Ig(e){return ia(at(e,ce))}function Gg(e,t){return ra(e,at(t,ce))}var Bg=z(function(e,t){return function(n){return si(n,e,t)}}),Ug=z(function(e,t){return function(n){return si(e,n,t)}});function Is(e,t,n){var s=Ee(t),o=Qi(t,s);n==null&&!(ae(t)&&(o.length||!s.length))&&(n=t,t=e,e=this,o=Qi(t,Ee(t)));var c=!(ae(n)&&"chain"in n)||!!n.chain,h=Gt(e);return rt(o,function(d){var m=t[d];e[d]=m,h&&(e.prototype[d]=function(){var E=this.__chain__;if(c||E){var x=e(this.__wrapped__),S=x.__actions__=We(this.__actions__);return S.push({func:m,args:arguments,thisArg:e}),x.__chain__=E,x}return m.apply(e,jt([this.value()],arguments))})}),e}function kg(){return Me._===this&&(Me._=cu),this}function Gs(){}function zg(e){return e=U(e),z(function(t){return sa(t,e)})}var Fg=fs(se),Wg=fs(Ao),Vg=fs(Ur);function xl(e){return vs(e)?kr(xt(e)):mh(e)}function Ng(e){return function(t){return e==null?i:pn(e,t)}}var Hg=Ra(),Yg=Ra(!0);function Bs(){return[]}function Us(){return!1}function Xg(){return{}}function jg(){return""}function Zg(){return!0}function Qg(e,t){if(e=U(e),e<1||e>Te)return[];var n=we,s=Le(e,we);t=O(t),e-=we;for(var o=Wr(s,t);++n<e;)t(n);return o}function qg(e){return B(e)?se(e,xt):Je(e)?[e]:We(Na(X(e)))}function Kg(e){var t=++au;return X(e)+t}var $g=tr(function(e,t){return e+t},0),Jg=ds("ceil"),e0=tr(function(e,t){return e/t},1),t0=ds("floor");function n0(e){return e&&e.length?Zi(e,He,$r):i}function i0(e,t){return e&&e.length?Zi(e,O(t,2),$r):i}function r0(e){return To(e,He)}function s0(e,t){return To(e,O(t,2))}function o0(e){return e&&e.length?Zi(e,He,ns):i}function a0(e,t){return e&&e.length?Zi(e,O(t,2),ns):i}var l0=tr(function(e,t){return e*t},1),c0=ds("round"),u0=tr(function(e,t){return e-t},0);function h0(e){return e&&e.length?Fr(e,He):0}function f0(e,t){return e&&e.length?Fr(e,O(t,2)):0}return l.after=Id,l.ary=el,l.assign=yp,l.assignIn=pl,l.assignInWith=pr,l.assignWith=Ep,l.at=xp,l.before=tl,l.bind=Ms,l.bindAll=Pg,l.bindKey=nl,l.castArray=Xd,l.chain=Ka,l.chunk=ef,l.compact=tf,l.concat=nf,l.cond=Tg,l.conforms=Lg,l.constant=Ds,l.countBy=hd,l.create=Sp,l.curry=il,l.curryRight=rl,l.debounce=sl,l.defaults=Mp,l.defaultsDeep=Ap,l.defer=Gd,l.delay=Bd,l.difference=rf,l.differenceBy=sf,l.differenceWith=of,l.drop=af,l.dropRight=lf,l.dropRightWhile=cf,l.dropWhile=uf,l.fill=hf,l.filter=dd,l.flatMap=_d,l.flatMapDeep=md,l.flatMapDepth=bd,l.flatten=ja,l.flattenDeep=ff,l.flattenDepth=df,l.flip=Ud,l.flow=Dg,l.flowRight=Cg,l.fromPairs=pf,l.functions=Cp,l.functionsIn=Ip,l.groupBy=vd,l.initial=_f,l.intersection=mf,l.intersectionBy=bf,l.intersectionWith=vf,l.invert=Bp,l.invertBy=Up,l.invokeMap=yd,l.iteratee=Cs,l.keyBy=Ed,l.keys=Ee,l.keysIn=Ne,l.map=lr,l.mapKeys=zp,l.mapValues=Fp,l.matches=Ig,l.matchesProperty=Gg,l.memoize=ur,l.merge=Wp,l.mergeWith=gl,l.method=Bg,l.methodOf=Ug,l.mixin=Is,l.negate=hr,l.nthArg=zg,l.omit=Vp,l.omitBy=Np,l.once=kd,l.orderBy=xd,l.over=Fg,l.overArgs=zd,l.overEvery=Wg,l.overSome=Vg,l.partial=As,l.partialRight=ol,l.partition=Sd,l.pick=Hp,l.pickBy=_l,l.property=xl,l.propertyOf=Ng,l.pull=xf,l.pullAll=Qa,l.pullAllBy=Sf,l.pullAllWith=Mf,l.pullAt=Af,l.range=Hg,l.rangeRight=Yg,l.rearg=Fd,l.reject=Rd,l.remove=Rf,l.rest=Wd,l.reverse=xs,l.sampleSize=Td,l.set=Xp,l.setWith=jp,l.shuffle=Ld,l.slice=Pf,l.sortBy=Cd,l.sortedUniq=Gf,l.sortedUniqBy=Bf,l.split=_g,l.spread=Vd,l.tail=Uf,l.take=kf,l.takeRight=zf,l.takeRightWhile=Ff,l.takeWhile=Wf,l.tap=nd,l.throttle=Nd,l.thru=ar,l.toArray=hl,l.toPairs=ml,l.toPairsIn=bl,l.toPath=qg,l.toPlainObject=dl,l.transform=Zp,l.unary=Hd,l.union=Vf,l.unionBy=Nf,l.unionWith=Hf,l.uniq=Yf,l.uniqBy=Xf,l.uniqWith=jf,l.unset=Qp,l.unzip=Ss,l.unzipWith=qa,l.update=qp,l.updateWith=Kp,l.values=Vn,l.valuesIn=$p,l.without=Zf,l.words=yl,l.wrap=Yd,l.xor=Qf,l.xorBy=qf,l.xorWith=Kf,l.zip=$f,l.zipObject=Jf,l.zipObjectDeep=ed,l.zipWith=td,l.entries=ml,l.entriesIn=bl,l.extend=pl,l.extendWith=pr,Is(l,l),l.add=$g,l.attempt=El,l.camelCase=ng,l.capitalize=vl,l.ceil=Jg,l.clamp=Jp,l.clone=jd,l.cloneDeep=Qd,l.cloneDeepWith=qd,l.cloneWith=Zd,l.conformsTo=Kd,l.deburr=wl,l.defaultTo=Og,l.divide=e0,l.endsWith=ig,l.eq=_t,l.escape=rg,l.escapeRegExp=sg,l.every=fd,l.find=pd,l.findIndex=Ya,l.findKey=Rp,l.findLast=gd,l.findLastIndex=Xa,l.findLastKey=Pp,l.floor=t0,l.forEach=$a,l.forEachRight=Ja,l.forIn=Tp,l.forInRight=Lp,l.forOwn=Op,l.forOwnRight=Dp,l.get=Ts,l.gt=$d,l.gte=Jd,l.has=Gp,l.hasIn=Ls,l.head=Za,l.identity=He,l.includes=wd,l.indexOf=gf,l.inRange=eg,l.invoke=kp,l.isArguments=mn,l.isArray=B,l.isArrayBuffer=ep,l.isArrayLike=Ve,l.isArrayLikeObject=fe,l.isBoolean=tp,l.isBuffer=en,l.isDate=np,l.isElement=ip,l.isEmpty=rp,l.isEqual=sp,l.isEqualWith=op,l.isError=Rs,l.isFinite=ap,l.isFunction=Gt,l.isInteger=al,l.isLength=fr,l.isMap=ll,l.isMatch=lp,l.isMatchWith=cp,l.isNaN=up,l.isNative=hp,l.isNil=dp,l.isNull=fp,l.isNumber=cl,l.isObject=ae,l.isObjectLike=he,l.isPlainObject=hi,l.isRegExp=Ps,l.isSafeInteger=pp,l.isSet=ul,l.isString=dr,l.isSymbol=Je,l.isTypedArray=Wn,l.isUndefined=gp,l.isWeakMap=_p,l.isWeakSet=mp,l.join=wf,l.kebabCase=og,l.last=ct,l.lastIndexOf=yf,l.lowerCase=ag,l.lowerFirst=lg,l.lt=bp,l.lte=vp,l.max=n0,l.maxBy=i0,l.mean=r0,l.meanBy=s0,l.min=o0,l.minBy=a0,l.stubArray=Bs,l.stubFalse=Us,l.stubObject=Xg,l.stubString=jg,l.stubTrue=Zg,l.multiply=l0,l.nth=Ef,l.noConflict=kg,l.noop=Gs,l.now=cr,l.pad=cg,l.padEnd=ug,l.padStart=hg,l.parseInt=fg,l.random=tg,l.reduce=Md,l.reduceRight=Ad,l.repeat=dg,l.replace=pg,l.result=Yp,l.round=c0,l.runInContext=_,l.sample=Pd,l.size=Od,l.snakeCase=gg,l.some=Dd,l.sortedIndex=Tf,l.sortedIndexBy=Lf,l.sortedIndexOf=Of,l.sortedLastIndex=Df,l.sortedLastIndexBy=Cf,l.sortedLastIndexOf=If,l.startCase=mg,l.startsWith=bg,l.subtract=u0,l.sum=h0,l.sumBy=f0,l.template=vg,l.times=Qg,l.toFinite=Bt,l.toInteger=U,l.toLength=fl,l.toLower=wg,l.toNumber=ut,l.toSafeInteger=wp,l.toString=X,l.toUpper=yg,l.trim=Eg,l.trimEnd=xg,l.trimStart=Sg,l.truncate=Mg,l.unescape=Ag,l.uniqueId=Kg,l.upperCase=Rg,l.upperFirst=Os,l.each=$a,l.eachRight=Ja,l.first=Za,Is(l,function(){var e={};return yt(l,function(t,n){q.call(l.prototype,n)||(e[n]=t)}),e}(),{chain:!1}),l.VERSION=r,rt(["bind","bindKey","curry","curryRight","partial","partialRight"],function(e){l[e].placeholder=l}),rt(["drop","take"],function(e,t){V.prototype[e]=function(n){n=n===i?1:ve(U(n),0);var s=this.__filtered__&&!t?new V(this):this.clone();return s.__filtered__?s.__takeCount__=Le(n,s.__takeCount__):s.__views__.push({size:Le(n,we),type:e+(s.__dir__<0?"Right":"")}),s},V.prototype[e+"Right"]=function(n){return this.reverse()[e](n).reverse()}}),rt(["filter","map","takeWhile"],function(e,t){var n=t+1,s=n==Ge||n==je;V.prototype[e]=function(o){var c=this.clone();return c.__iteratees__.push({iteratee:O(o,3),type:n}),c.__filtered__=c.__filtered__||s,c}}),rt(["head","last"],function(e,t){var n="take"+(t?"Right":"");V.prototype[e]=function(){return this[n](1).value()[0]}}),rt(["initial","tail"],function(e,t){var n="drop"+(t?"":"Right");V.prototype[e]=function(){return this.__filtered__?new V(this):this[n](1)}}),V.prototype.compact=function(){return this.filter(He)},V.prototype.find=function(e){return this.filter(e).head()},V.prototype.findLast=function(e){return this.reverse().find(e)},V.prototype.invokeMap=z(function(e,t){return typeof e=="function"?new V(this):this.map(function(n){return si(n,e,t)})}),V.prototype.reject=function(e){return this.filter(hr(O(e)))},V.prototype.slice=function(e,t){e=U(e);var n=this;return n.__filtered__&&(e>0||t<0)?new V(n):(e<0?n=n.takeRight(-e):e&&(n=n.drop(e)),t!==i&&(t=U(t),n=t<0?n.dropRight(-t):n.take(t-e)),n)},V.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},V.prototype.toArray=function(){return this.take(we)},yt(V.prototype,function(e,t){var n=/^(?:filter|find|map|reject)|While$/.test(t),s=/^(?:head|last)$/.test(t),o=l[s?"take"+(t=="last"?"Right":""):t],c=s||/^find/.test(t);o&&(l.prototype[t]=function(){var h=this.__wrapped__,d=s?[1]:arguments,m=h instanceof V,E=d[0],x=m||B(h),S=function(W){var N=o.apply(l,jt([W],d));return s&&A?N[0]:N};x&&n&&typeof E=="function"&&E.length!=1&&(m=x=!1);var A=this.__chain__,L=!!this.__actions__.length,C=c&&!A,k=m&&!L;if(!c&&x){h=k?h:new V(this);var I=e.apply(h,d);return I.__actions__.push({func:ar,args:[S],thisArg:i}),new ot(I,A)}return C&&k?e.apply(this,d):(I=this.thru(S),C?s?I.value()[0]:I.value():I)})}),rt(["pop","push","shift","sort","splice","unshift"],function(e){var t=Ci[e],n=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",s=/^(?:pop|shift)$/.test(e);l.prototype[e]=function(){var o=arguments;if(s&&!this.__chain__){var c=this.value();return t.apply(B(c)?c:[],o)}return this[n](function(h){return t.apply(B(h)?h:[],o)})}}),yt(V.prototype,function(e,t){var n=l[t];if(n){var s=n.name+"";q.call(Bn,s)||(Bn[s]=[]),Bn[s].push({name:t,func:n})}}),Bn[er(i,re).name]=[{name:"wrapper",func:i}],V.prototype.clone=Mu,V.prototype.reverse=Au,V.prototype.value=Ru,l.prototype.at=id,l.prototype.chain=rd,l.prototype.commit=sd,l.prototype.next=od,l.prototype.plant=ld,l.prototype.reverse=cd,l.prototype.toJSON=l.prototype.valueOf=l.prototype.value=ud,l.prototype.first=l.prototype.head,$n&&(l.prototype[$n]=ad),l},Cn=ru();cn?((cn.exports=Cn)._=Cn,Cr._=Cn):Me._=Cn}).call(T0)}(_i,_i.exports)),_i.exports}var O0=L0();const Hn=class Hn{constructor(a,i,r,f){y(this,"_id");y(this,"renderer");y(this,"scene");y(this,"controller");y(this,"toolbox");y(this,"_mediaCreator");y(this,"_arSystem");y(this,"_assetExporter");y(this,"registered",new Map);y(this,"listeners",new Map);this._id=P0(),this.renderer=a,this.scene=i,this.controller=r,this.toolbox=f,this._mediaCreator=wr.ModuleRegistry.get("MediaCreator").then(v=>new v(this.renderer,this.scene,this.controller)),this._arSystem=wr.ModuleRegistry.get("ARSystem").then(v=>new v),this._assetExporter=wr.ModuleRegistry.get("AssetExporter").then(v=>new v),Hn.__instances.push(this)}static get(a){const i=this.__instances.find(r=>r.id===a);return i||this.__instances.find(r=>Array.from(r.registered.values()).find(f=>f.id===a))}get id(){return this._id}DestroyInstance(){const a=Hn.__instances.findIndex(i=>i.id===this.id);return a===-1?!1:(Hn.__instances.splice(a,1),!0)}PerformAction(a,i){let r=!1;switch(a){case"START_RENDER":{this.renderer.StartRenderer(this.scene,this.controller.object),r=!0;break}case"GET_ALL_SCENE_DATA":{r=this.getAllSceneData(i);break}case"GET_ALL_OBJECTS":{r=this.getAllObjects(i);break}case"GET_OBJECTS":{r=this.getObjects(i);break}case"ADD_OBJECT":{r=this.addObject(i);break}case"UPDATE_OBJECT":{r=this.updateObject(i);break}case"DELETE_OBJECT":{r=this.deleteObject(i);break}case"SELECT_OBJECT":{r=this.selectObject(i);break}case"DESELECT_OBJECT":{r=this.deselectObject(i);break}case"SET_BACKGROUND":{r=this.setBackground(i);break}case"DROP_IT":{r=this.dropIt(i);break}case"PLACE_ON_FLOOR":{r=this.placeOnFloor(i);break}case"SET_CAMERA_TRANSFORM":{r=this.setCameraTransform(i);break}case"GET_CAMERA_TRANSFORM":{r=this.getCameraTransform(i);break}case"MOVE_CAMERA":{r=this.moveCamera(i);break}case"RESET_CAMERA":{r=this.resetCamera(i);break}case"COMPUTE_ENCOMPASSING_VIEW":{r=this.computeEncompassingView(i);break}case"SET_CAMERA_LAYER":{r=this.setCameraLayer(i);break}case"ZOOM_CAMERA":{r=this.zoomCamera(i);break}case"SET_GIZMO_MODE":{r=this.setGizmoMode(i);break}case"SET_GIZMO_VISIBILITY":{r=this.setGizmoVisibility(i);break}case"SET_GIZMO_SCALE_LINKED":{r=this.setGizmoScaleLinked(i);break}case"USE_TOOL":{r=this.useTool(i);break}case"MODEL_LOADED":{r=this.modelLoaded(i);break}case"UPDATE_SCENE":{r=this.updateScene(i);break}case"GENERATE_MEDIA":{r=this.generateMedia(i);break}case"SET_PARENT":{r=this.setParent(i);break}case"EXPORT_SCENE":{r=this.exportScene(i);break}case"LAUNCH_AR":{const{uri:f,options:v}=i;r=new Promise((g,R)=>{this._arSystem.then(D=>{g(D.launch(f,v))}).catch(R)});break}default:console.warn(`DIVECommunication.PerformAction: has been executed with unknown Action type ${a}`)}return this.dispatch(a,i),r}Subscribe(a,i){return this.listeners.get(a)||this.listeners.set(a,[]),this.listeners.get(a).push(i),()=>{const r=this.listeners.get(a);if(!r)return!1;const f=r.findIndex(v=>v===i);return f===-1?!1:(r.splice(f,1),!0)}}dispatch(a,i){const r=this.listeners.get(a);r&&r.forEach(f=>f(i))}getAllSceneData(a){const i={name:this.scene.name,mediaItem:null,backgroundColor:"#"+this.scene.background.getHexString(),floorEnabled:this.scene.Floor.visible,floorColor:"#"+this.scene.Floor.material.color.getHexString(),userCamera:{position:this.controller.object.position.clone(),target:this.controller.target.clone()},spotmarks:[],lights:Array.from(this.registered.values()).filter(r=>r.entityType==="light"),objects:Array.from(this.registered.values()).filter(r=>r.entityType==="model"),cameras:Array.from(this.registered.values()).filter(r=>r.entityType==="pov"),primitives:Array.from(this.registered.values()).filter(r=>r.entityType==="primitive"),groups:Array.from(this.registered.values()).filter(r=>r.entityType==="group")};return Object.assign(a,i),i}getAllObjects(a){return Object.assign(a,this.registered),this.registered}getObjects(a){if(a.ids.length===0)return[];const i=[];return this.registered.forEach(r=>{a.ids.includes(r.id)&&i.push(r)}),i}addObject(a){return this.registered.get(a.id)?!1:(a.parentId===void 0&&(a.parentId=null),this.registered.set(a.id,a),this.scene.AddSceneObject(a),!0)}updateObject(a){const i=this.registered.get(a.id);if(!i)return!1;this.registered.set(a.id,O0.merge(i,a));const r=this.registered.get(a.id);return this.scene.UpdateSceneObject({...a,id:r.id,entityType:r.entityType}),Object.assign(a,r),!0}deleteObject(a){const i=this.registered.get(a.id);return i?(i.parentId&&this.setParent({object:{id:i.id},parent:null}),i.entityType==="group"&&this.registered.forEach(r=>{r.parentId===i.id&&this.updateObject({id:r.id,parentId:null})}),Object.assign(a,i),this.registered.delete(a.id),Array.from(this.registered.values()).forEach(r=>{r.parentId&&r.parentId===a.id&&(r.parentId=null)}),this.scene.DeleteSceneObject(i),!0):!1}selectObject(a){const i=this.registered.get(a.id);if(!i)return!1;const r=this.scene.GetSceneObject(i);if(!r||!("isSelectable"in r))return!1;const f=this.toolbox.GetActiveTool();return f&&Gl(f)&&f.AttachGizmo(r),Object.assign(a,i),!0}deselectObject(a){const i=this.registered.get(a.id);if(!i)return!1;const r=this.scene.GetSceneObject(i);if(!r||!("isSelectable"in r))return!1;const f=this.toolbox.GetActiveTool();return f&&Gl(f)&&f.DetachGizmo(),Object.assign(a,i),!0}setBackground(a){return this.scene.SetBackground(a.color),!0}dropIt(a){const i=this.registered.get(a.id);return i?(this.scene.GetSceneObject(i).DropIt(),!0):!1}placeOnFloor(a){const i=this.registered.get(a.id);return i?(this.scene.PlaceOnFloor(i),!0):!1}setCameraTransform(a){return this.controller.object.position.copy(a.position),this.controller.target.copy(a.target),this.controller.update(),!0}getCameraTransform(a){const i={position:this.controller.object.position.clone(),target:this.controller.target.clone()};return Object.assign(a,i),i}moveCamera(a){let i={x:0,y:0,z:0},r={x:0,y:0,z:0};return"id"in a?(i=this.registered.get(a.id).position,r=this.registered.get(a.id).target):(i=a.position,r=a.target),this.controller.MoveTo(i,r,a.duration,a.locked),!0}setCameraLayer(a){return this.controller.object.SetCameraLayer(a.layer),!0}resetCamera(a){return this.controller.RevertLast(a.duration),!0}computeEncompassingView(a){const i=this.scene.ComputeSceneBB(),r=this.controller.ComputeEncompassingView(i);return Object.assign(a,r),r}zoomCamera(a){return a.direction==="IN"&&this.controller.ZoomIn(a.by),a.direction==="OUT"&&this.controller.ZoomOut(a.by),!0}setGizmoMode(a){return this.toolbox.SetGizmoMode(a.mode),!0}setGizmoVisibility(a){return this.toolbox.SetGizmoVisibility(a),a}setGizmoScaleLinked(a){return this.toolbox.SetGizmoScaleLinked(a),a}useTool(a){return this.toolbox.UseTool(a.tool),!0}modelLoaded(a){return this.registered.get(a.id).loaded=!0,!0}updateScene(a){return a.name!==void 0&&(this.scene.name=a.name),a.backgroundColor!==void 0&&this.scene.SetBackground(a.backgroundColor),a.gridEnabled!==void 0&&this.scene.Grid.SetVisibility(a.gridEnabled),a.floorEnabled!==void 0&&this.scene.Floor.SetVisibility(a.floorEnabled),a.floorColor!==void 0&&this.scene.Floor.SetColor(a.floorColor),a.name=this.scene.name,a.backgroundColor="#"+this.scene.background.getHexString(),a.gridEnabled=this.scene.Grid.visible,a.floorEnabled=this.scene.Floor.visible,a.floorColor="#"+this.scene.Floor.material.color.getHexString(),!0}generateMedia(a){let i={x:0,y:0,z:0},r={x:0,y:0,z:0};return"id"in a?(i=this.registered.get(a.id).position,r=this.registered.get(a.id).target):(i=a.position,r=a.target),this._mediaCreator.then(f=>f.GenerateMedia(i,r,a.width,a.height))}setParent(a){const i=this.registered.get(a.object.id);if(!i)return!1;const r=this.scene.GetSceneObject(i);if(!r)return!1;if(a.parent===null)return this.scene.Root.attach(r),this.updateObject({id:i.id,parentId:null}),!0;if(a.object.id===a.parent.id)return!1;const f=this.registered.get(a.parent.id);if(!f)return this.scene.Root.attach(r),this.updateObject({id:i.id,parentId:null}),!0;const v=this.scene.GetSceneObject(f);return v?(v.attach(r),this.updateObject({id:i.id,parentId:f.id}),!0):(this.scene.Root.attach(r),this.updateObject({id:i.id,parentId:null}),!0)}exportScene(a){return this._assetExporter.then(i=>i.export(this.scene.Root,a.type,{}))}};y(Hn,"__instances",[]);let Ye=Hn;class D0{constructor(a){y(this,"_renderer");y(this,"_rendererCallbackId");this._renderer=a,this._rendererCallbackId=this._renderer.AddPreRenderCallback(()=>{this.Update()})}Dispose(){this._renderer.RemovePreRenderCallback(this._rendererCallbackId)}Update(){Nn.update()}Animate(a){return new Nn.Tween(a)}}class C0 extends u.OrthographicCamera{constructor(i,r,f){super(-1,1,1,-1,.1,100);y(this,"axesHelper");y(this,"_renderer");y(this,"_scene");y(this,"_renderCallbackId");this.layers.mask=pe.COORDINATE_LAYER_MASK,this.axesHelper=new u.AxesHelper(.5),this.axesHelper.layers.mask=pe.COORDINATE_LAYER_MASK,this.axesHelper.material.depthTest=!1,this.axesHelper.position.set(0,0,-1),this.axesHelper.setColors(new u.Color(Ns),new u.Color(Hs),new u.Color(Ys));const v=new ks("X",.2,kl),g=new ks("Y",.2,zl),R=new ks("Z",.2,Fl);v.layers.mask=pe.COORDINATE_LAYER_MASK,g.layers.mask=pe.COORDINATE_LAYER_MASK,R.layers.mask=pe.COORDINATE_LAYER_MASK,v.position.set(.7,0,0),g.position.set(0,.7,0),R.position.set(0,0,.7),this.axesHelper.add(v),this.axesHelper.add(g),this.axesHelper.add(R),this.add(this.axesHelper),this._renderer=i,this._scene=r,this._scene.add(this);const D=new u.Vector4;this._renderCallbackId=i.AddPostRenderCallback(()=>{const H=r.background;r.background=null,i.getViewport(D),i.setViewport(0,0,150,150),i.autoClear=!1,this.SetFromCameraMatrix(f.object.matrix),i.render(r,this),i.setViewport(D),i.autoClear=!0,r.background=H})}Dispose(){this._renderer.RemovePostRenderCallback(this._renderCallbackId),this._scene.remove(this)}SetFromCameraMatrix(i){this.axesHelper.rotation.setFromRotationMatrix(new u.Matrix4().extractRotation(i).invert())}}const I0="1.19.1-beta.8",G0={version:I0},wn={antialias:!0,alpha:!0,stencil:!1,shadowMapEnabled:!0,shadowMapType:u.PCFSoftShadowMap,toneMapping:u.NoToneMapping,canvas:void 0};class B0 extends u.WebGLRenderer{constructor(i=wn){super({antialias:i.antialias||wn.antialias,alpha:i.alpha||wn.alpha,preserveDrawingBuffer:!0,canvas:i.canvas});y(this,"paused",!1);y(this,"running",!1);y(this,"force",!1);y(this,"preRenderCallbacks",new Map);y(this,"postRenderCallbacks",new Map);this.setPixelRatio(window.devicePixelRatio),this.shadowMap.enabled=i.shadowMapEnabled||wn.shadowMapEnabled,this.shadowMap.type=i.shadowMapType||wn.shadowMapType,this.toneMapping=i.toneMapping||wn.toneMapping,this.debug.checkShaderErrors=!1}Dispose(){this.StopRenderer(),this.dispose()}StartRenderer(i,r){this.setAnimationLoop((f,v)=>{this.internal_render(i,r,f,v)}),this.running=!0}PauseRenderer(){this.paused=!0}ResumeRenderer(){this.paused=!1}StopRenderer(){this.setAnimationLoop(null),this.running=!1}OnResize(i,r){this.setSize(i,r)}AddPreRenderCallback(i){const r=u.MathUtils.generateUUID();return this.preRenderCallbacks.set(r,i),r}RemovePreRenderCallback(i){return this.preRenderCallbacks.has(i)?(this.preRenderCallbacks.delete(i),!0):!1}AddPostRenderCallback(i){const r=u.MathUtils.generateUUID();return this.postRenderCallbacks.set(r,i),r}RemovePostRenderCallback(i){return this.postRenderCallbacks.has(i)?(this.postRenderCallbacks.delete(i),!0):!1}ForceRendering(){this.force=!0}internal_render(i,r,f,v){(this.paused||!this.running)&&!this.force||(this.preRenderCallbacks.forEach(g=>{g(f,v)}),this.render(i,r),this.postRenderCallbacks.forEach(g=>{g(f,v)}),this.force=!1)}}class U0 extends u.Object3D{constructor(){super();y(this,"isDIVELight",!0);y(this,"isDIVEAmbientLight",!0);y(this,"_light");this.name="DIVEAmbientLight",this._light=new u.AmbientLight(16777215,1),this._light.layers.mask=pe.PRODUCT_LAYER_MASK,this.add(this._light)}SetColor(i){this._light.color=i}SetIntensity(i){this._light.intensity=i}SetEnabled(i){this._light.visible=i}}class k0 extends u.Object3D{constructor(){super();y(this,"isDIVELight",!0);y(this,"isDIVEPointLight",!0);y(this,"isMovable",!0);y(this,"isSelectable",!0);y(this,"gizmo",null);y(this,"light");y(this,"mesh");this.name="DIVEPointLight",this.light=new u.PointLight(16777215,1),this.light.layers.mask=pe.PRODUCT_LAYER_MASK,this.light.castShadow=!0,this.light.shadow.mapSize.width=512,this.light.shadow.mapSize.height=512,this.add(this.light);const i=.1,r=new u.SphereGeometry(i,i*320,i*320),f=new u.MeshBasicMaterial({color:this.light.color,transparent:!0,opacity:.8,side:u.FrontSide});this.mesh=new u.Mesh(r,f),this.mesh.layers.mask=pe.UI_LAYER_MASK,this.add(this.mesh)}SetColor(i){this.light.color=i,this.mesh.material.color=i}SetIntensity(i){this.light.intensity=i,this.mesh.material.opacity=i>.8?.8:i*.8}SetEnabled(i){this.light.visible=i}onMove(){var i;(i=Ye.get(this.userData.id))==null||i.PerformAction("UPDATE_OBJECT",{id:this.userData.id,position:this.position})}onSelect(){var i;(i=Ye.get(this.userData.id))==null||i.PerformAction("SELECT_OBJECT",{id:this.userData.id})}onDeselect(){var i;(i=Ye.get(this.userData.id))==null||i.PerformAction("DESELECT_OBJECT",{id:this.userData.id})}}class z0 extends u.Object3D{constructor(){super();y(this,"isDIVELight",!0);y(this,"isDIVESceneLight",!0);y(this,"_hemiLight");y(this,"_dirLight");this.name="DIVESceneLight",this._hemiLight=new u.HemisphereLight(16777215,16777215,2),this._hemiLight.layers.mask=pe.PRODUCT_LAYER_MASK,this._hemiLight.position.set(0,50,0),this.add(this._hemiLight),this._dirLight=new u.DirectionalLight(16777215,3),this._dirLight.layers.mask=pe.PRODUCT_LAYER_MASK,this._dirLight.position.set(1,1.75,1),this._dirLight.position.multiplyScalar(30),this._dirLight.castShadow=!0,this._dirLight.shadow.mapSize.width=2048,this._dirLight.shadow.mapSize.height=2048;const i=5;this._dirLight.shadow.camera.left=-5,this._dirLight.shadow.camera.right=i,this._dirLight.shadow.camera.top=i,this._dirLight.shadow.camera.bottom=-5,this._dirLight.shadow.camera.far=3500,this.add(this._dirLight)}SetColor(i){this._hemiLight.color=i,this._dirLight.color=i}SetIntensity(i){this._hemiLight.intensity=i*2,this._dirLight.intensity=i*3}SetEnabled(i){this._hemiLight.visible=i,this._dirLight.visible=i}}const Zs=M=>M.parent?Zs(M.parent):M;class F0{constructor(){y(this,"isMovable",!0)}}class W0{constructor(){y(this,"isSelectable",!0)}}function V0(M,a){return a.forEach(i=>{Object.getOwnPropertyNames(i.prototype).forEach(r=>{Object.defineProperty(M.prototype,r,Object.getOwnPropertyDescriptor(i.prototype,r))})}),M}class Qs extends V0(u.Object3D,[W0,F0]){constructor(){super();y(this,"isDIVENode",!0);y(this,"gizmo",null);y(this,"_positionWorldBuffer");y(this,"_boundingBox");this.layers.mask=pe.PRODUCT_LAYER_MASK,this._positionWorldBuffer=new u.Vector3,this._boundingBox=new u.Box3}SetPosition(i){if(!this.parent){this.position.set(i.x,i.y,i.z);return}const r=new u.Vector3(i.x,i.y,i.z);this.position.copy(this.parent.worldToLocal(r)),"isDIVEGroup"in this.parent&&this.parent.UpdateLineTo(this)}SetRotation(i){this.rotation.set(i.x,i.y,i.z)}SetScale(i){this.scale.set(i.x,i.y,i.z)}SetVisibility(i){this.visible=i}SetToWorldOrigin(){var i;this.position.set(0,0,0),(i=Ye.get(this.userData.id))==null||i.PerformAction("UPDATE_OBJECT",{id:this.userData.id,position:this.getWorldPosition(this._positionWorldBuffer),rotation:this.rotation,scale:this.scale})}onMove(){var i;(i=Ye.get(this.userData.id))==null||i.PerformAction("UPDATE_OBJECT",{id:this.userData.id,position:this.getWorldPosition(this._positionWorldBuffer),rotation:this.rotation,scale:this.scale})}onSelect(){var i;(i=Ye.get(this.userData.id))==null||i.PerformAction("SELECT_OBJECT",{id:this.userData.id})}onDeselect(){var i;(i=Ye.get(this.userData.id))==null||i.PerformAction("DESELECT_OBJECT",{id:this.userData.id})}}class N0 extends Qs{constructor(){super(...arguments);y(this,"isDIVEModel",!0);y(this,"_mesh",null);y(this,"_material",null)}SetModel(i){this.clear(),this._boundingBox.makeEmpty(),i.traverse(r=>{r.castShadow=!0,r.receiveShadow=!0,r.layers.mask=this.layers.mask,this._boundingBox.expandByObject(r),!this._mesh&&"isMesh"in r&&(this._mesh=r,this._material?this._mesh.material=this._material:this._material=r.material)}),this.add(i)}SetMaterial(i){this._material||(this._material=new u.MeshStandardMaterial),i.vertexColors!==void 0&&(this._material.vertexColors=i.vertexColors),i.color!==void 0&&this._material.color.set(i.color),i.map!==void 0&&(this._material.map=i.map),i.normalMap!==void 0&&(this._material.normalMap=i.normalMap),i.roughness!==void 0&&(this._material.roughness=i.roughness),i.roughnessMap!==void 0&&(this._material.roughnessMap=i.roughnessMap,this._material.roughnessMap&&(this._material.roughness=1)),i.metalness!==void 0&&(this._material.metalness=i.metalness),i.metalnessMap!==void 0&&(this._material.metalnessMap=i.metalnessMap,this._material.metalnessMap&&(this._material.metalness=1)),this._mesh&&(this._mesh.material=this._material)}PlaceOnFloor(){var v,g,R,D,H;const i=this.getWorldPosition(this._positionWorldBuffer),r=i.clone();(g=(v=this._mesh)==null?void 0:v.geometry)==null||g.computeBoundingBox();const f=(D=(R=this._mesh)==null?void 0:R.geometry)==null?void 0:D.boundingBox;!f||!this._mesh||(i.y=i.y-this._mesh.localToWorld(f.min.clone()).y,i.y!==r.y&&((H=Ye.get(this.userData.id))==null||H.PerformAction("UPDATE_OBJECT",{id:this.userData.id,position:i,rotation:this.rotation,scale:this.scale})))}DropIt(){if(!this.parent){console.warn("DIVEModel: DropIt() called on a model that is not in the scene.",this);return}const i=this._boundingBox.min.y*this.scale.y,r=this.localToWorld(this._boundingBox.getCenter(new u.Vector3).multiply(this.scale));r.y=i+this.position.y;const f=new u.Raycaster(r,new u.Vector3(0,-1,0));f.layers.mask=pe.PRODUCT_LAYER_MASK;const v=f.intersectObjects(Zs(this).Root.children,!0);if(v.length>0){const g=v[0].object;g.geometry.computeBoundingBox();const R=g.geometry.boundingBox,D=g.localToWorld(R.max.clone()),H=this.position.clone(),le=this.position.clone().setY(D.y).sub(new u.Vector3(0,i,0));if(this.position.copy(le),this.position.y===H.y)return;this.onMove()}}}class H0 extends Qs{constructor(){super();y(this,"isDIVEPrimitive",!0);y(this,"_mesh");this._mesh=new u.Mesh,this._mesh.layers.mask=pe.PRODUCT_LAYER_MASK,this._mesh.castShadow=!0,this._mesh.receiveShadow=!0,this._mesh.material=new u.MeshStandardMaterial,this.add(this._mesh)}SetGeometry(i){const r=this.assembleGeometry(i);r&&(this._mesh.geometry=r,this._boundingBox.setFromObject(this._mesh))}SetMaterial(i){const r=this._mesh.material;i.vertexColors!==void 0&&(r.vertexColors=i.vertexColors),i.color!==void 0&&(r.color=new u.Color(i.color)),i.map!==void 0&&(r.map=i.map),i.normalMap!==void 0&&(r.normalMap=i.normalMap),i.roughness!==void 0&&(r.roughness=i.roughness),i.roughnessMap!==void 0&&(r.roughnessMap=i.roughnessMap,r.roughnessMap&&(r.roughness=1)),i.metalness!==void 0&&(r.metalness=i.metalness),i.metalnessMap!==void 0&&(r.metalnessMap=i.metalnessMap,r.metalnessMap&&(r.metalness=0)),this._mesh&&(this._mesh.material=r)}PlaceOnFloor(){var v,g,R,D,H;const i=this.getWorldPosition(this._positionWorldBuffer),r=i.clone();(g=(v=this._mesh)==null?void 0:v.geometry)==null||g.computeBoundingBox();const f=(D=(R=this._mesh)==null?void 0:R.geometry)==null?void 0:D.boundingBox;!f||!this._mesh||(i.y=i.y-this._mesh.localToWorld(f.min.clone()).y,i.y!==r.y&&((H=Ye.get(this.userData.id))==null||H.PerformAction("UPDATE_OBJECT",{id:this.userData.id,position:i,rotation:this.rotation,scale:this.scale})))}DropIt(){if(!this.parent){console.warn("DIVEPrimitive: DropIt() called on a model that is not in the scene.",this);return}const i=this._boundingBox.min.y*this.scale.y,r=this.localToWorld(this._boundingBox.getCenter(new u.Vector3).multiply(this.scale));r.y=i+this.position.y;const f=new u.Raycaster(r,new u.Vector3(0,-1,0));f.layers.mask=pe.PRODUCT_LAYER_MASK;const v=f.intersectObjects(Zs(this).Root.children,!0);if(v.length>0){const g=v[0].object;g.geometry.computeBoundingBox();const R=g.geometry.boundingBox,D=g.localToWorld(R.max.clone()),H=this.position.clone(),le=this.position.clone().setY(D.y).sub(new u.Vector3(0,i,0));if(this.position.copy(le),this.position.y===H.y)return;this.onMove()}}assembleGeometry(i){switch(this._mesh.material.flatShading=!1,i.name.toLowerCase()){case"cylinder":return this.createCylinderGeometry(i);case"sphere":return this.createSphereGeometry(i);case"pyramid":return this._mesh.material.flatShading=!0,this.createPyramidGeometry(i);case"cube":case"box":return this.createBoxGeometry(i);case"cone":return this.createConeGeometry(i);case"wall":return this.createWallGeometry(i);case"plane":return this.createPlaneGeometry(i);default:return console.warn("DIVEPrimitive.assembleGeometry: Invalid geometry type:",i.name.toLowerCase()),null}}createCylinderGeometry(i){const r=new u.CylinderGeometry(i.width/2,i.width/2,i.height,64);return r.translate(0,i.height/2,0),r}createSphereGeometry(i){return new u.SphereGeometry(i.width/2,256,256)}createPyramidGeometry(i){const r=new Float32Array([-i.width/2,0,-i.depth/2,i.width/2,0,-i.depth/2,i.width/2,0,i.depth/2,-i.width/2,0,i.depth/2,0,i.height,0]),f=new Uint16Array([0,1,2,0,2,3,0,4,1,1,4,2,2,4,3,3,4,0]),v=new u.BufferGeometry;return v.setAttribute("position",new u.BufferAttribute(r,3)),v.setIndex(new u.BufferAttribute(f,1)),v.computeVertexNormals(),v.computeBoundingBox(),v.computeBoundingSphere(),v}createBoxGeometry(i){const r=new u.BoxGeometry(i.width,i.height,i.depth);return r.translate(0,i.height/2,0),r}createConeGeometry(i){const r=new u.ConeGeometry(i.width/2,i.height,256);return r.translate(0,i.height/2,0),r}createWallGeometry(i){const r=new u.BoxGeometry(i.width,i.height,i.depth||.05,16);return r.translate(0,i.height/2,0),r}createPlaneGeometry(i){const r=new u.BoxGeometry(i.width,i.height,i.depth);return r.translate(0,i.height/2,0),r}}class Y0 extends Qs{constructor(){super();y(this,"isDIVEGroup",!0);y(this,"_members");y(this,"_lines");this.name="DIVEGroup",this._members=[],this._lines=[]}get members(){return this._members}SetPosition(i){super.SetPosition(i),this._members.forEach(r=>{"isDIVENode"in r&&r.onMove()})}SetLinesVisibility(i,r){if(!r){this._lines.forEach(v=>{v.visible=i});return}const f=this._members.indexOf(r);f!==-1&&(this._lines[f].visible=i)}attach(i){if(this._members.includes(i))return this;const r=this.createLine();return this.add(r),this._lines.push(r),super.attach(i),this._members.push(i),this.updateLineTo(r,i),this.SetLinesVisibility(!0,i),this}remove(i){const r=this._members.indexOf(i);if(r===-1)return this;const f=this._lines[r];return super.remove(f),this._lines.splice(r,1),super.remove(i),this._members.splice(r,1),this}UpdateLineTo(i){const r=this._members.indexOf(i);r!==-1&&this.updateLineTo(this._lines[r],i)}createLine(){const i=new u.BufferGeometry,r=new u.LineDashedMaterial({color:6710886,dashSize:.05,gapSize:.025}),f=new u.Line(i,r);return f.visible=!1,f}updateLineTo(i,r){i.geometry.setFromPoints([new u.Vector3(0,0,0),r.position.clone()]),i.computeLineDistances()}}class qs extends u.Object3D{constructor(){super();y(this,"isDIVERoot",!0);y(this,"_assetLoader");this.name="Root",this._assetLoader=wr.ModuleRegistry.get("AssetLoader").then(i=>new i)}ComputeSceneBB(){const i=new u.Box3;return this.traverse(r=>{"isObject3D"in r&&i.expandByObject(r)}),i}GetSceneObject(i){let r;return this.traverse(f=>{r||f.userData.id===i.id&&(r=f)}),r}AddSceneObject(i){switch(i.entityType){case"pov":break;case"light":{this.updateLight(i);break}case"model":{this.updateModel(i);break}case"primitive":{this.updatePrimitive(i);break}case"group":{this.updateGroup(i);break}default:console.warn(`DIVERoot.AddSceneObject: Unknown entity type: ${i.entityType}`)}}UpdateSceneObject(i){switch(i.entityType){case"pov":break;case"light":{this.updateLight(i);break}case"model":{this.updateModel(i);break}case"primitive":{this.updatePrimitive(i);break}case"group":{this.updateGroup(i);break}default:console.warn(`DIVERoot.UpdateSceneObject: Unknown entity type: ${i.entityType}`)}}DeleteSceneObject(i){switch(i.entityType){case"pov":break;case"light":{this.deleteLight(i);break}case"model":{this.deleteModel(i);break}case"primitive":{this.deletePrimitive(i);break}case"group":{this.deleteGroup(i);break}default:console.warn(`DIVERoot.DeleteSceneObject: Unknown entity type: ${i.entityType}`)}}PlaceOnFloor(i){switch(i.entityType){case"pov":case"light":break;case"model":case"primitive":{this.placeOnFloor(i);break}default:console.warn(`DIVERoot.PlaceOnFloor: Unknown entity type: ${i.entityType}`)}}updateLight(i){let r=this.GetSceneObject(i);if(!r){switch(i.type){case"scene":{r=new z0;break}case"ambient":{r=new U0;break}case"point":{r=new k0;break}default:{console.warn(`DIVERoot.updateLight: Unknown light type: ${i.type}`);return}}r.userData.id=i.id,this.add(r)}i.name!==void 0&&i.name!==null&&(r.name=i.name),i.position!==void 0&&i.position!==null&&r.position.set(i.position.x,i.position.y,i.position.z),i.intensity!==void 0&&i.intensity!==null&&r.SetIntensity(i.intensity),i.enabled!==void 0&&i.enabled!==null&&r.SetEnabled(i.enabled),i.color!==void 0&&i.color!==null&&r.SetColor(new u.Color(i.color)),i.visible!==void 0&&i.visible!==null&&(r.visible=i.visible),i.parentId!==void 0&&this.setParent({...i,parentId:i.parentId})}updateModel(i){let r=this.GetSceneObject(i);r||(r=new N0,r.userData.id=i.id,r.userData.uri=i.uri,this.add(r)),i.uri!==void 0&&this._assetLoader.then(f=>f.load(i.uri)).then(f=>{var v;r.SetModel(f),(v=Ye.get(i.id))==null||v.PerformAction("MODEL_LOADED",{id:i.id})}),i.name!==void 0&&(r.name=i.name),i.position!==void 0&&r.SetPosition(i.position),i.rotation!==void 0&&r.SetRotation(i.rotation),i.scale!==void 0&&r.SetScale(i.scale),i.visible!==void 0&&r.SetVisibility(i.visible),i.material!==void 0&&r.SetMaterial(i.material),i.parentId!==void 0&&this.setParent({...i,parentId:i.parentId})}updatePrimitive(i){let r=this.GetSceneObject(i);r||(r=new H0,r.userData.id=i.id,this.add(r)),i.name!==void 0&&(r.name=i.name),i.geometry!==void 0&&r.SetGeometry(i.geometry),i.position!==void 0&&r.SetPosition(i.position),i.rotation!==void 0&&r.SetRotation(i.rotation),i.scale!==void 0&&r.SetScale(i.scale),i.visible!==void 0&&r.SetVisibility(i.visible),i.material!==void 0&&r.SetMaterial(i.material),i.parentId!==void 0&&this.setParent({...i,parentId:i.parentId})}updateGroup(i){let r=this.GetSceneObject(i);r||(r=new Y0,r.userData.id=i.id,this.add(r)),i.name!==void 0&&(r.name=i.name),i.position!==void 0&&r.SetPosition(i.position),i.rotation!==void 0&&r.SetRotation(i.rotation),i.scale!==void 0&&r.SetScale(i.scale),i.visible!==void 0&&r.SetVisibility(i.visible),i.bbVisible!==void 0&&r.SetLinesVisibility(i.bbVisible),i.parentId!==void 0&&this.setParent({...i,parentId:i.parentId})}deleteLight(i){const r=this.GetSceneObject(i);if(!r){console.warn(`DIVERoot.deleteLight: Light with id ${i.id} not found`);return}this.detachTransformControls(r),r.parent.remove(r)}deleteModel(i){const r=this.GetSceneObject(i);if(!r){console.warn(`DIVERoot.deleteModel: Model with id ${i.id} not found`);return}this.detachTransformControls(r),r.parent.remove(r)}deletePrimitive(i){const r=this.GetSceneObject(i);if(!r){console.warn(`DIVERoot.deletePrimitive: Primitive with id ${i.id} not found`);return}this.detachTransformControls(r),r.parent.remove(r)}deleteGroup(i){const r=this.GetSceneObject(i);if(!r){console.warn(`DIVERoot.deleteGroup: Group with id ${i.id} not found`);return}this.detachTransformControls(r);for(let f=r.members.length-1;f>=0;f--)this.attach(r.members[f]);r.parent.remove(r)}placeOnFloor(i){const r=this.GetSceneObject(i);r&&r.PlaceOnFloor()}setParent(i){const r=this.GetSceneObject(i);if(r)if(i.parentId!==null){const f=this.GetSceneObject({id:i.parentId});if(!f)return;f.attach(r)}else this.attach(r)}detachTransformControls(i){this.findScene(i).children.find(r=>{"isTransformControls"in r&&r.detach()})}findScene(i){return i.parent!==null?this.findScene(i.parent):i}}const X0="#888888",j0="#dddddd";class Z0 extends u.Object3D{constructor(){super(),this.name="Grid";const a=new u.GridHelper(100,100,X0,j0);a.material.depthTest=!1,a.layers.mask=pe.HELPER_LAYER_MASK,this.add(a)}SetVisibility(a){this.visible=a}}class Q0 extends u.Mesh{constructor(){super(new u.PlaneGeometry(1e4,1e4),new u.MeshStandardMaterial({color:new u.Color(150/255,150/255,150/255)}));y(this,"isFloor",!0);this.name="Floor",this.layers.mask=pe.PRODUCT_LAYER_MASK,this.receiveShadow=!0,this.rotateX(-Math.PI/2)}SetVisibility(i){this.visible=i}SetColor(i){this.material.color=new u.Color(i)}}class q0{constructor(a,i,r,f,v){this.xrLight=a,this.renderer=i,this.lightProbe=r,this.xrWebGLBinding=null,this.estimationStartCallback=v,this.frameCallback=this.onXRFrame.bind(this);const g=i.xr.getSession();if(f&&"XRWebGLBinding"in window){const R=new u.WebGLCubeRenderTarget(16);a.environment=R.texture;const D=i.getContext();switch(g.preferredReflectionFormat){case"srgba8":D.getExtension("EXT_sRGB");break;case"rgba16f":D.getExtension("OES_texture_half_float");break}this.xrWebGLBinding=new XRWebGLBinding(g,D),this.lightProbe.addEventListener("reflectionchange",()=>{this.updateReflection()})}g.requestAnimationFrame(this.frameCallback)}updateReflection(){const a=this.renderer.properties.get(this.xrLight.environment);if(a){const i=this.xrWebGLBinding.getReflectionCubeMap(this.lightProbe);i&&(a.__webglTexture=i,this.xrLight.environment.needsPMREMUpdate=!0)}}onXRFrame(a,i){if(!this.xrLight)return;i.session.requestAnimationFrame(this.frameCallback);const f=i.getLightEstimate(this.lightProbe);if(f){this.xrLight.lightProbe.sh.fromArray(f.sphericalHarmonicsCoefficients),this.xrLight.lightProbe.intensity=1;const v=Math.max(1,Math.max(f.primaryLightIntensity.x,Math.max(f.primaryLightIntensity.y,f.primaryLightIntensity.z)));this.xrLight.directionalLight.color.setRGB(f.primaryLightIntensity.x/v,f.primaryLightIntensity.y/v,f.primaryLightIntensity.z/v),this.xrLight.directionalLight.intensity=v,this.xrLight.directionalLight.position.copy(f.primaryLightDirection),this.estimationStartCallback&&(this.estimationStartCallback(),this.estimationStartCallback=null)}}dispose(){this.xrLight=null,this.renderer=null,this.lightProbe=null,this.xrWebGLBinding=null}}class K0 extends u.Group{constructor(a,i=!0){super(),this.lightProbe=new u.LightProbe,this.lightProbe.intensity=0,this.add(this.lightProbe),this.directionalLight=new u.DirectionalLight,this.directionalLight.intensity=0,this.add(this.directionalLight),this.environment=null;let r=null,f=!1;a.xr.addEventListener("sessionstart",()=>{const v=a.xr.getSession();"requestLightProbe"in v&&v.requestLightProbe({reflectionFormat:v.preferredReflectionFormat}).then(g=>{r=new q0(this,a,g,i,()=>{f=!0,this.dispatchEvent({type:"estimationstart"})})})}),a.xr.addEventListener("sessionend",()=>{r&&(r.dispose(),r=null),f&&this.dispatchEvent({type:"estimationend"})}),this.dispose=()=>{r&&(r.dispose(),r=null),this.remove(this.lightProbe),this.lightProbe=null,this.remove(this.directionalLight),this.directionalLight=null,this.environment=null}}}class $0 extends u.Object3D{constructor(i){super();y(this,"_scene");y(this,"_xrLight");y(this,"_lightRoot");this.name="XRLightRoot",this._scene=i,this._xrLight=null,this._lightRoot=new qs,this._lightRoot.UpdateSceneObject({id:"XRSceneLight",entityType:"light",name:"XRSceneLight",type:"scene",color:16777215,intensity:1,enabled:!0,visible:!0}),this.add(this._lightRoot)}InitLightEstimation(i){this._xrLight||(this._xrLight=new K0(i,!0),this._xrLight.layers.mask=pe.PRODUCT_LAYER_MASK,this.add(this._xrLight)),this._xrLight.addEventListener("estimationstart",()=>{this.onEstimationStart()}),this._xrLight.addEventListener("estimationend",()=>{this.onEstimationEnd()})}DisposeLightEstimation(){this._xrLight&&(this._xrLight.removeEventListener("estimationstart",()=>{this.onEstimationStart()}),this._xrLight.removeEventListener("estimationend",()=>{this.onEstimationEnd()}))}onEstimationStart(){this._lightRoot.visible=!1,this._xrLight&&this._xrLight.environment&&(this._scene.environment=this._xrLight.environment)}onEstimationEnd(){this._lightRoot.visible=!0,this._scene.environment=null,this._xrLight}}class J0 extends u.Object3D{constructor(i){super();y(this,"_xrLightRoot");y(this,"_xrModelRoot");y(this,"_xrHandNode");y(this,"_xrShadowPlane");this.name="XRRoot",this._xrModelRoot=new qs,this._xrModelRoot.name="XRModelRoot",this.add(this._xrModelRoot),this._xrShadowPlane=new u.Mesh(new u.PlaneGeometry(100,100),new u.ShadowMaterial({opacity:1,transparent:!0})),this._xrModelRoot.add(this._xrShadowPlane),this._xrLightRoot=new $0(i),this._xrLightRoot.name="XRLightRoot",this.add(this._xrLightRoot),this._xrHandNode=new u.Object3D,this._xrHandNode.name="XRHandNode",this.add(this._xrHandNode)}get XRModelRoot(){return this._xrModelRoot}get XRLightRoot(){return this._xrLightRoot}get XRHandNode(){return this._xrHandNode}InitLightEstimation(i){this._xrLightRoot.InitLightEstimation(i)}DisposeLightEstimation(){this._xrLightRoot.DisposeLightEstimation()}}class e_ extends u.Scene{constructor(){super();y(this,"_root");y(this,"_floor");y(this,"_grid");y(this,"_xrRoot");this.background=new u.Color(16777215),this._root=new qs,this.add(this._root),this._floor=new Q0,this.add(this._floor),this._grid=new Z0,this.add(this._grid),this._xrRoot=new J0(this),this._xrRoot.visible=!1,this.add(this._xrRoot)}get Root(){return this._root}get XRRoot(){return this._xrRoot}get Floor(){return this._floor}get Grid(){return this._grid}InitXR(i){this._root.visible=!1,this._xrRoot.visible=!0,this._xrRoot.InitLightEstimation(i)}DisposeXR(){this._root.visible=!0,this._xrRoot.visible=!1,this._xrRoot.DisposeLightEstimation()}SetBackground(i){this.background=new u.Color(i)}ComputeSceneBB(){return this.Root.ComputeSceneBB()}GetSceneObject(i){return this.Root.GetSceneObject(i)}AddSceneObject(i){this.Root.AddSceneObject(i)}UpdateSceneObject(i){this.Root.UpdateSceneObject(i)}DeleteSceneObject(i){this.Root.DeleteSceneObject(i)}PlaceOnFloor(i){this.Root.PlaceOnFloor(i)}}const Vl={autoResize:!0,autoStart:!0,displayAxes:!1,renderer:wn,perspectiveCamera:pe.DIVEPerspectiveCameraDefaultSettings};class t_{constructor(a){y(this,"_renderer");y(this,"_scene");y(this,"_perspectiveCamera");y(this,"_settings");y(this,"_resizeObserverId","");y(this,"_width",0);y(this,"_height",0);this._settings={...Vl,...a??{}},this._renderer=new B0(this._settings.renderer),this._scene=new e_,this._perspectiveCamera=new pe.DIVEPerspectiveCamera(this._settings.perspectiveCamera),this._settings.autoResize&&this._addResizeObserver(),this._settings.autoStart&&this.renderer.StartRenderer(this.scene,this.perspectiveCamera)}get renderer(){return this._renderer}get scene(){return this._scene}get perspectiveCamera(){return this._perspectiveCamera}dispose(){this._removeResizeObserver(),this._renderer.dispose()}onResize(a,i){this.renderer.OnResize(a,i),this.perspectiveCamera.OnResize(a,i)}_addResizeObserver(){this._resizeObserverId=this.renderer.AddPreRenderCallback(()=>{const a=this.renderer.domElement.parentElement;if(!a)return;const{clientWidth:i,clientHeight:r}=a;i===this._width&&r===this._height||(this.onResize(i,r),this._width=i,this._height=r)})}_removeResizeObserver(){this.renderer.RemovePreRenderCallback(this._resizeObserverId)}}function Mt(M,a){const i=(M+"e").split("e");return+(i[0]+"e"+(+i[1]+(a||0)))}function n_(M,a=0){const i=Mt(M,+a);return Mt(Math.ceil(i),-a)}function i_(M,a=0){const i=Mt(M,+a);return Mt(Math.floor(i),-a)}function Nl(M,a=0){if(M<0)return-Nl(-M,a);const i=Mt(M,+a);return Mt(Math.round(i),-a)}function r_(M,a,i){return Math.atan2(M.clone().cross(a).dot(i),a.clone().dot(M))}function s_(M,a=0){const i=Mt(M,+a);return Mt(Math.round(i),-a).toFixed(a)}function o_(M,a=0){const i=Mt(M,+a);return Mt(Math.trunc(i),-a)}function a_(M){return(u.MathUtils.radToDeg(M)+360)%360}function l_(M){return u.MathUtils.degToRad(M)}const c_={ceilExp:n_,floorExp:i_,roundExp:Nl,toFixedExp:s_,truncateExp:o_,signedAngleTo:r_,radToDeg:a_,degToRad:l_},Hl={...Vl,orbitControls:yr};class Mr{constructor(a){y(this,"_settings");y(this,"_engine");y(this,"orbitControls");y(this,"toolbox");y(this,"_communication");y(this,"animationSystem");y(this,"axisCamera");this._settings={...Hl,...a??{}},this._engine=new t_(a),this.animationSystem=new D0(this._engine.renderer),this.orbitControls=new Vs(this._engine.perspectiveCamera,this._engine.renderer,this.animationSystem,this._settings.orbitControls),this.toolbox=new Wl(this._engine.scene,this.orbitControls),this._communication=new Ye(this._engine.renderer,this._engine.scene,this.orbitControls,this.toolbox),this._settings.displayAxes?this.axisCamera=new C0(this._engine.renderer,this._engine.scene,this.orbitControls):this.axisCamera=null,window.DIVE={PrintScene:()=>this._engine.scene},console.log(`DIVE ${G0.version} initialized successfully!`),console.log(`
28
- @@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@
29
- @@@@+-:::::::---------------------==------------------------------=#@@@@
30
- @@%=::::.......::---------------------------------------------------------+@@
31
- @@+:::...........::-----------------------------------------------------------#@@
32
- @@=:::.........::::::-------------------------------------------------------------%@
33
- @%:::.......:::::::-----------------------------------------------------------------#@
34
- @*:::.....:::::-----------------------------------------------------------------------*@
35
- @%::::::.::::---------------------------------------------------------------------------@@
36
- @@-:::::::::-----------------------------------------------------------------------------=@
37
- @%::::::::--------------------------------------------------------------------------------%@
38
- @+::::::::--------------------------------=@@@@@%-----------------------------------------%@
39
- @=:::::::--------------------------------*@@ @@+---------------------------------------#@
40
- @+:::::::-------------------------------*@ @*--------------------------------------%@
41
- @#::::::::-----------------------------=@@ @@=-------------------------------------%@
42
- @@-::::::::----------------------------@@ @@------------------------------------=@
43
- @%:::::::::--------------------------*@ @*-----------------------------------@@
44
- @*:::::::::-------------------------@@ @@----------------------------------%@
45
- @#::::::::::----------------------%@ @%--------------------------------%@
46
- @#:::::::::::-------------------=@@ @@=------------------------------%@
47
- @@-::::::::::::----------------%@ @%----------------------------=@@
48
- @@#::::::::::::::------------*@ @*--------------------------#@@
49
- @@+::::::::::::::::--------@@ @@------------------------+@@
50
- @@*:::::::::::::::::----@@ @@---------------------+@@
51
- @@@-:::::::::::::::--#@ @#-----------------=%@@
52
- @@%-::::::::::::-%@ @%-------------=%@@
53
- @@@@+:::::::#@@ @@*-------*@@@@
54
- @@@@@@@ @@@@@@
55
-
56
- `)}static async QuickView(a,i){return new Promise(r=>{const f=new Mr(i);f._communication.PerformAction("UPDATE_SCENE",{backgroundColor:16777215,gridEnabled:!1,floorColor:16777215}),f._communication.PerformAction("SET_CAMERA_TRANSFORM",{position:{x:0,y:2,z:2},target:{x:0,y:.5,z:0}});const v=u.MathUtils.generateUUID();f._communication.PerformAction("ADD_OBJECT",{entityType:"light",type:"scene",name:"light",id:v,enabled:!0,visible:!0,intensity:1,color:16777215});const g=u.MathUtils.generateUUID();f._communication.Subscribe("MODEL_LOADED",R=>{if(R.id!==g)return;const D=f._communication.PerformAction("COMPUTE_ENCOMPASSING_VIEW",{});f._communication.PerformAction("SET_CAMERA_TRANSFORM",{position:D.position,target:D.target}),window.DIVE.instances||(window.DIVE.instances=[]),window.DIVE.instances.push(f),r(f)}),f._communication.PerformAction("ADD_OBJECT",{entityType:"model",name:"object",id:g,position:{x:0,y:0,z:0},rotation:{x:0,y:0,z:0},scale:{x:1,y:1,z:1},uri:a,visible:!0,loaded:!1})})}get engine(){return this._engine}get communication(){return this._communication}get canvas(){return this._engine.renderer.domElement}Dispose(){var a;this.orbitControls.Dispose(),(a=this.axisCamera)==null||a.Dispose(),this.animationSystem.Dispose(),this.toolbox.Dispose(),this._communication.DestroyInstance()}}exports.FILE_TYPES=Xs.FILE_TYPES;exports.NetworkError=Xs.NetworkError;exports.SUPPORTED_FILE_TYPES=Xs.SUPPORTED_FILE_TYPES;exports.FileTypeError=Ul.FileTypeError;exports.ParseError=Ul.ParseError;exports.ARCompatibilityError=js.ARCompatibilityError;exports.ESystem=js.ESystem;exports.EWebXRUnsupportedReason=js.EWebXRUnsupportedReason;exports.DIVE=Mr;exports.DIVECommunication=Ye;exports.DIVEDefaultSettings=Hl;exports.DIVEMath=c_;exports.default=Mr;
57
- //# sourceMappingURL=index.cjs.map