@plurid/plurid-react 0.0.0-14 → 0.0.0-17

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 (171) hide show
  1. package/README.md +25 -9
  2. package/distribution/data/interfaces/index.d.ts +2 -0
  3. package/distribution/distribution/components/links/Link/components/Preview/index.d.ts +16 -0
  4. package/distribution/distribution/components/links/Link/components/Preview/styled.d.ts +7 -0
  5. package/distribution/distribution/components/links/Link/index.d.ts +19 -0
  6. package/distribution/distribution/components/links/Link/styled.d.ts +7 -0
  7. package/distribution/distribution/components/links/RouterLink/index.d.ts +16 -0
  8. package/distribution/distribution/components/links/RouterLink/styled.d.ts +2 -0
  9. package/distribution/distribution/components/planes/ExternalPlane/index.d.ts +14 -0
  10. package/distribution/distribution/components/planes/ExternalPlane/styled.d.ts +5 -0
  11. package/distribution/distribution/components/planes/IframePlane/index.d.ts +14 -0
  12. package/distribution/distribution/components/planes/IframePlane/styled.d.ts +5 -0
  13. package/distribution/distribution/components/structural/Plane/components/PlaneBridge/index.d.ts +16 -0
  14. package/distribution/distribution/components/structural/Plane/components/PlaneBridge/styled.d.ts +7 -0
  15. package/distribution/distribution/components/structural/Plane/components/PlaneContent/index.d.ts +6 -0
  16. package/distribution/distribution/components/structural/Plane/components/PlaneContent/styled.d.ts +1 -0
  17. package/distribution/distribution/components/structural/Plane/components/PlaneControls/components/SearchItem/index.d.ts +19 -0
  18. package/distribution/distribution/components/structural/Plane/components/PlaneControls/components/SearchItem/styled.d.ts +1 -0
  19. package/distribution/distribution/components/structural/Plane/components/PlaneControls/components/SearchList/index.d.ts +18 -0
  20. package/distribution/distribution/components/structural/Plane/components/PlaneControls/components/SearchList/styled.d.ts +2 -0
  21. package/distribution/distribution/components/structural/Plane/components/PlaneControls/index.d.ts +19 -0
  22. package/distribution/distribution/components/structural/Plane/components/PlaneControls/styled.d.ts +10 -0
  23. package/distribution/distribution/components/structural/Plane/components/PlaneDebugger/index.d.ts +13 -0
  24. package/distribution/distribution/components/structural/Plane/components/PlaneDebugger/styled.d.ts +1 -0
  25. package/distribution/distribution/components/structural/Plane/index.d.ts +23 -0
  26. package/distribution/distribution/components/structural/Plane/styled.d.ts +10 -0
  27. package/distribution/distribution/components/structural/Root/index.d.ts +14 -0
  28. package/distribution/distribution/components/structural/Root/styled.d.ts +1 -0
  29. package/distribution/distribution/components/structural/Roots/index.d.ts +25 -0
  30. package/distribution/distribution/components/structural/Roots/styled.d.ts +10 -0
  31. package/distribution/distribution/components/structural/Space/components/SpaceDebugger/index.d.ts +13 -0
  32. package/distribution/distribution/components/structural/Space/components/SpaceDebugger/styled.d.ts +1 -0
  33. package/distribution/distribution/components/structural/Space/index.d.ts +14 -0
  34. package/distribution/distribution/components/structural/Space/styled.d.ts +8 -0
  35. package/distribution/distribution/components/utilities/ApplicationConfigurator/index.d.ts +17 -0
  36. package/distribution/distribution/components/utilities/ApplicationConfigurator/styled.d.ts +1 -0
  37. package/distribution/distribution/components/utilities/ErrorBoundary/index.d.ts +17 -0
  38. package/distribution/distribution/components/utilities/NotFound/index.d.ts +13 -0
  39. package/distribution/distribution/components/utilities/NotFound/styled.d.ts +1 -0
  40. package/distribution/distribution/components/utilities/PlaneConfigurator/index.d.ts +13 -0
  41. package/distribution/distribution/components/utilities/PlaneConfigurator/styled.d.ts +1 -0
  42. package/distribution/distribution/components/utilities/Portal/index.d.ts +13 -0
  43. package/distribution/distribution/components/utilities/Toolbar/Button/index.d.ts +15 -0
  44. package/distribution/distribution/components/utilities/Toolbar/Button/styled.d.ts +13 -0
  45. package/distribution/distribution/components/utilities/Toolbar/General/components/Drawer/index.d.ts +18 -0
  46. package/distribution/distribution/components/utilities/Toolbar/General/components/Drawer/styled.d.ts +3 -0
  47. package/distribution/distribution/components/utilities/Toolbar/General/components/MenuMore/components/Global/index.d.ts +21 -0
  48. package/distribution/distribution/components/utilities/Toolbar/General/components/MenuMore/components/Shortcuts/index.d.ts +14 -0
  49. package/distribution/distribution/components/utilities/Toolbar/General/components/MenuMore/components/Space/index.d.ts +20 -0
  50. package/distribution/distribution/components/utilities/Toolbar/General/components/MenuMore/components/Technical/index.d.ts +17 -0
  51. package/distribution/distribution/components/utilities/Toolbar/General/components/MenuMore/components/Toolbar/index.d.ts +22 -0
  52. package/distribution/distribution/components/utilities/Toolbar/General/components/MenuMore/components/Transform/index.d.ts +19 -0
  53. package/distribution/distribution/components/utilities/Toolbar/General/components/MenuMore/components/Viewcube/index.d.ts +20 -0
  54. package/distribution/distribution/components/utilities/Toolbar/General/components/MenuMore/data.d.ts +8 -0
  55. package/distribution/distribution/components/utilities/Toolbar/General/components/MenuMore/index.d.ts +21 -0
  56. package/distribution/distribution/components/utilities/Toolbar/General/components/MenuMore/styled.d.ts +3 -0
  57. package/distribution/distribution/components/utilities/Toolbar/General/components/MenuUniverses/index.d.ts +15 -0
  58. package/distribution/distribution/components/utilities/Toolbar/General/components/MenuUniverses/styled.d.ts +4 -0
  59. package/distribution/distribution/components/utilities/Toolbar/General/components/ToolbarRotate/index.d.ts +23 -0
  60. package/distribution/distribution/components/utilities/Toolbar/General/components/ToolbarRotate/styled.d.ts +1 -0
  61. package/distribution/distribution/components/utilities/Toolbar/General/components/ToolbarScale/index.d.ts +21 -0
  62. package/distribution/distribution/components/utilities/Toolbar/General/components/ToolbarScale/styled.d.ts +1 -0
  63. package/distribution/distribution/components/utilities/Toolbar/General/components/ToolbarTranslate/index.d.ts +23 -0
  64. package/distribution/distribution/components/utilities/Toolbar/General/components/ToolbarTranslate/styled.d.ts +1 -0
  65. package/distribution/distribution/components/utilities/Toolbar/General/components/TransformArrow/index.d.ts +14 -0
  66. package/distribution/distribution/components/utilities/Toolbar/General/components/TransformArrow/styled.d.ts +1 -0
  67. package/distribution/distribution/components/utilities/Toolbar/General/data.d.ts +6 -0
  68. package/distribution/distribution/components/utilities/Toolbar/General/index.d.ts +21 -0
  69. package/distribution/distribution/components/utilities/Toolbar/General/styled.d.ts +29 -0
  70. package/distribution/distribution/components/utilities/UniverseExplorer/index.d.ts +16 -0
  71. package/distribution/distribution/components/utilities/UniverseExplorer/styled.d.ts +2 -0
  72. package/distribution/distribution/components/utilities/Viewcube/components/ViewcubeFace/index.d.ts +26 -0
  73. package/distribution/distribution/components/utilities/Viewcube/components/ViewcubeFace/styled.d.ts +16 -0
  74. package/distribution/distribution/components/utilities/Viewcube/components/ViewcubeModel/index.d.ts +17 -0
  75. package/distribution/distribution/components/utilities/Viewcube/components/ViewcubeModel/styled.d.ts +3 -0
  76. package/distribution/distribution/components/utilities/Viewcube/index.d.ts +22 -0
  77. package/distribution/distribution/components/utilities/Viewcube/styled.d.ts +19 -0
  78. package/distribution/distribution/components/virtuals/List/components/ListItem/index.d.ts +9 -0
  79. package/distribution/distribution/components/virtuals/List/index.d.ts +15 -0
  80. package/distribution/distribution/components/virtuals/List/styled.d.ts +1 -0
  81. package/distribution/distribution/containers/Application/View/ErrorView/index.d.ts +6 -0
  82. package/distribution/distribution/containers/Application/View/ErrorView/styled.d.ts +1 -0
  83. package/distribution/distribution/containers/Application/View/PlanesView/index.d.ts +12 -0
  84. package/distribution/distribution/containers/Application/View/index-old.d.ts +1 -0
  85. package/distribution/distribution/containers/Application/View/index.d.ts +43 -0
  86. package/distribution/distribution/containers/Application/View/logic.d.ts +3 -0
  87. package/distribution/distribution/containers/Application/View/styled.d.ts +3 -0
  88. package/distribution/distribution/containers/Application/index.d.ts +18 -0
  89. package/distribution/distribution/containers/Provider/context.d.ts +4 -0
  90. package/distribution/distribution/containers/Provider/index.d.ts +12 -0
  91. package/distribution/distribution/containers/RouterBrowser/index.d.ts +4 -0
  92. package/distribution/distribution/containers/RouterStatic/index.d.ts +17 -0
  93. package/distribution/distribution/data/constants/index.d.ts +3 -0
  94. package/distribution/distribution/data/interfaces/index.d.ts +20 -0
  95. package/distribution/distribution/index.d.ts +80 -0
  96. package/distribution/distribution/services/context/index.d.ts +5 -0
  97. package/distribution/distribution/services/hooks/event/index.d.ts +4 -0
  98. package/distribution/distribution/services/hooks/index.d.ts +2 -0
  99. package/distribution/distribution/services/hooks/router/index.d.ts +1 -0
  100. package/distribution/distribution/services/logic/computing/index.d.ts +10 -0
  101. package/distribution/distribution/services/logic/router/index.d.ts +51 -0
  102. package/distribution/distribution/services/logic/router/styled.d.ts +5 -0
  103. package/distribution/distribution/services/logic/server/index.d.ts +3 -0
  104. package/distribution/distribution/services/logic/shortcuts/index.d.ts +10 -0
  105. package/distribution/distribution/services/state/actions/index.d.ts +9 -0
  106. package/distribution/distribution/services/state/context/index.d.ts +3 -0
  107. package/distribution/distribution/services/state/global/index.d.ts +6 -0
  108. package/distribution/distribution/services/state/modules/configuration/actions/index.d.ts +28 -0
  109. package/distribution/distribution/services/state/modules/configuration/index.d.ts +7 -0
  110. package/distribution/distribution/services/state/modules/configuration/initial/index.d.ts +3 -0
  111. package/distribution/distribution/services/state/modules/configuration/reducer/index.d.ts +3 -0
  112. package/distribution/distribution/services/state/modules/configuration/resolvers/index.d.ts +27 -0
  113. package/distribution/distribution/services/state/modules/configuration/selectors/index.d.ts +11 -0
  114. package/distribution/distribution/services/state/modules/configuration/types/index.d.ts +136 -0
  115. package/distribution/distribution/services/state/modules/general/actions/index.d.ts +2 -0
  116. package/distribution/distribution/services/state/modules/general/index.d.ts +7 -0
  117. package/distribution/distribution/services/state/modules/general/initial/index.d.ts +3 -0
  118. package/distribution/distribution/services/state/modules/general/reducer/index.d.ts +3 -0
  119. package/distribution/distribution/services/state/modules/general/resolvers/index.d.ts +1 -0
  120. package/distribution/distribution/services/state/modules/general/selectors/index.d.ts +2 -0
  121. package/distribution/distribution/services/state/modules/general/types/index.d.ts +3 -0
  122. package/distribution/distribution/services/state/modules/index.d.ts +15 -0
  123. package/distribution/distribution/services/state/modules/shortcuts/actions/index.d.ts +3 -0
  124. package/distribution/distribution/services/state/modules/shortcuts/index.d.ts +7 -0
  125. package/distribution/distribution/services/state/modules/shortcuts/initial/index.d.ts +3 -0
  126. package/distribution/distribution/services/state/modules/shortcuts/reducer/index.d.ts +3 -0
  127. package/distribution/distribution/services/state/modules/shortcuts/resolvers/index.d.ts +3 -0
  128. package/distribution/distribution/services/state/modules/shortcuts/selectors/index.d.ts +11 -0
  129. package/distribution/distribution/services/state/modules/shortcuts/types/index.d.ts +13 -0
  130. package/distribution/distribution/services/state/modules/space/actions/index.d.ts +46 -0
  131. package/distribution/distribution/services/state/modules/space/index.d.ts +7 -0
  132. package/distribution/distribution/services/state/modules/space/initial/index.d.ts +3 -0
  133. package/distribution/distribution/services/state/modules/space/reducer/index.d.ts +3 -0
  134. package/distribution/distribution/services/state/modules/space/resolvers/index.d.ts +45 -0
  135. package/distribution/distribution/services/state/modules/space/selectors/index.d.ts +139 -0
  136. package/distribution/distribution/services/state/modules/space/types/index.d.ts +242 -0
  137. package/distribution/distribution/services/state/modules/themes/actions/index.d.ts +4 -0
  138. package/distribution/distribution/services/state/modules/themes/index.d.ts +7 -0
  139. package/distribution/distribution/services/state/modules/themes/initial/index.d.ts +3 -0
  140. package/distribution/distribution/services/state/modules/themes/reducer/index.d.ts +3 -0
  141. package/distribution/distribution/services/state/modules/themes/resolvers/index.d.ts +3 -0
  142. package/distribution/distribution/services/state/modules/themes/selectors/index.d.ts +19 -0
  143. package/distribution/distribution/services/state/modules/themes/types/index.d.ts +17 -0
  144. package/distribution/distribution/services/state/modules/ui/actions/index.d.ts +2 -0
  145. package/distribution/distribution/services/state/modules/ui/index.d.ts +7 -0
  146. package/distribution/distribution/services/state/modules/ui/initial/index.d.ts +3 -0
  147. package/distribution/distribution/services/state/modules/ui/reducer/index.d.ts +3 -0
  148. package/distribution/distribution/services/state/modules/ui/resolvers/index.d.ts +2 -0
  149. package/distribution/distribution/services/state/modules/ui/selectors/index.d.ts +11 -0
  150. package/distribution/distribution/services/state/modules/ui/types/index.d.ts +10 -0
  151. package/distribution/distribution/services/state/selectors/index.d.ts +189 -0
  152. package/distribution/distribution/services/state/store/development/index.d.ts +5 -0
  153. package/distribution/distribution/services/state/store/index.d.ts +19 -0
  154. package/distribution/distribution/services/state/store/production/index.d.ts +5 -0
  155. package/distribution/distribution/services/state/store/reducers/index.d.ts +9 -0
  156. package/distribution/distribution/services/state/types/space.d.ts +3 -0
  157. package/distribution/distribution/services/styled/index.d.ts +2 -0
  158. package/distribution/distribution/services/utilities/environment/index.d.ts +7 -0
  159. package/distribution/distribution/services/utilities/imports/index.d.ts +49 -0
  160. package/distribution/distribution/services/utilities/react/index.d.ts +3 -0
  161. package/distribution/index.d.ts +2 -2
  162. package/distribution/index.es.js +6849 -0
  163. package/distribution/index.es.js.map +1 -0
  164. package/distribution/index.js +14 -10
  165. package/distribution/index.js.map +1 -1
  166. package/distribution/index.min.js +63 -62
  167. package/distribution/index.min.js.map +1 -0
  168. package/distribution/services/logic/router/index.d.ts +5 -5
  169. package/distribution/services/logic/server/index.d.ts +1 -2
  170. package/distribution/services/logic/shortcuts/index.d.ts +1 -1
  171. package/package.json +34 -35
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@plurid/plurid-data"),t=require("@plurid/plurid-engine"),a=require("@plurid/plurid-pubsub"),n=require("react"),r=require("react-redux"),o=require("redux"),i=require("redux-thunk"),l=require("@plurid/plurid-functions"),s=require("@plurid/plurid-themes"),c=require("styled-components"),u=require("@plurid/plurid-ui-components-react"),d=require("@plurid/plurid-icons-react"),T=require("@plurid/plurid-functions-react"),p=require("react-dom"),f=require("cross-fetch"),E=require("@plurid/elementql-client-react");function m(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var g=m(a),_=m(n),O=m(i),h=m(s),S=m(c),R=m(f);const A=_.default.createContext(void 0);var I=Object.freeze({__proto__:null,SET_CONFIGURATION:"SET_CONFIGURATION",SET_CONFIGURATION_MICRO:"SET_CONFIGURATION_MICRO",SET_CONFIGURATION_PLANE_CONTROLS:"SET_CONFIGURATION_PLANE_CONTROLS",SET_CONFIGURATION_PLANE_OPACITY:"SET_CONFIGURATION_PLANE_OPACITY",SET_CONFIGURATION_THEME_GENERAL:"SET_CONFIGURATION_THEME_GENERAL",SET_CONFIGURATION_THEME_INTERACTION:"SET_CONFIGURATION_THEME_INTERACTION",SET_CONFIGURATION_LANGUAGE:"SET_CONFIGURATION_LANGUAGE",TOGGLE_CONFIGURATION_VIEWCUBE_HIDE:"TOGGLE_CONFIGURATION_VIEWCUBE_HIDE",TOGGLE_CONFIGURATION_VIEWCUBE_BUTTONS:"TOGGLE_CONFIGURATION_VIEWCUBE_BUTTONS",TOGGLE_CONFIGURATION_VIEWCUBE_OPAQUE:"TOGGLE_CONFIGURATION_VIEWCUBE_OPAQUE",TOGGLE_CONFIGURATION_VIEWCUBE_CONCEAL:"TOGGLE_CONFIGURATION_VIEWCUBE_CONCEAL",TOGGLE_CONFIGURATION_TOOLBAR_CONCEAL:"TOGGLE_CONFIGURATION_TOOLBAR_CONCEAL",TOGGLE_CONFIGURATION_TOOLBAR_TRANSFORM_ICONS:"TOGGLE_CONFIGURATION_TOOLBAR_TRANSFORM_ICONS",TOGGLE_CONFIGURATION_TOOLBAR_TRANSFORM_BUTTONS:"TOGGLE_CONFIGURATION_TOOLBAR_TRANSFORM_BUTTONS",TOGGLE_CONFIGURATION_TOOLBAR_OPAQUE:"TOGGLE_CONFIGURATION_TOOLBAR_OPAQUE",TOGGLE_CONFIGURATION_TOOLBAR_TOGGLE_DRAWER:"TOGGLE_CONFIGURATION_TOOLBAR_TOGGLE_DRAWER",TOGGLE_CONFIGURATION_SPACE_TRANSPARENT_UI:"TOGGLE_CONFIGURATION_SPACE_TRANSPARENT_UI",TOGGLE_CONFIGURATION_SPACE_SHOW_TRANSFORM_ORIGIN:"TOGGLE_CONFIGURATION_SPACE_SHOW_TRANSFORM_ORIGIN",SET_CONFIGURATION_SPACE_TRANSFORM_ORIGIN_SIZE:"SET_CONFIGURATION_SPACE_TRANSFORM_ORIGIN_SIZE",SET_CONFIGURATION_SPACE_TRANSFORM_MODE:"SET_CONFIGURATION_SPACE_TRANSFORM_MODE",TOGGLE_CONFIGURATION_SPACE_TRANSFORM_MULTIMODE:"TOGGLE_CONFIGURATION_SPACE_TRANSFORM_MULTIMODE",SET_CONFIGURATION_SPACE_TRANSFORM_TOUCH:"SET_CONFIGURATION_SPACE_TRANSFORM_TOUCH",TOGGLE_CONFIGURATION_SPACE_FIRST_PERSON:"TOGGLE_CONFIGURATION_SPACE_FIRST_PERSON",SET_CONFIGURATION_SPACE_TRANSFORM_LOCKS:"SET_CONFIGURATION_SPACE_TRANSFORM_LOCKS",SET_CONFIGURATION_SPACE_LAYOUT_TYPE:"SET_CONFIGURATION_SPACE_LAYOUT_TYPE",SET_CONFIGURATION_SPACE_CULLING_DISTANCE:"SET_CONFIGURATION_SPACE_CULLING_DISTANCE"});var C=Object.freeze({__proto__:null,setConfiguration:e=>({type:"SET_CONFIGURATION",payload:e}),setConfigurationMicro:()=>({type:"SET_CONFIGURATION_MICRO"}),setConfigurationPlaneControls:e=>({type:"SET_CONFIGURATION_PLANE_CONTROLS",payload:e}),setConfigurationPlaneOpacity:e=>({type:"SET_CONFIGURATION_PLANE_OPACITY",payload:e}),setConfigurationThemeGeneralAction:e=>({type:"SET_CONFIGURATION_THEME_GENERAL",payload:e}),setConfigurationThemeInteractionAction:e=>({type:"SET_CONFIGURATION_THEME_INTERACTION",payload:e}),setConfigurationLanguageAction:e=>({type:"SET_CONFIGURATION_LANGUAGE",payload:e}),toggleConfigurationViewcubeHide:e=>({type:"TOGGLE_CONFIGURATION_VIEWCUBE_HIDE",payload:e}),toggleConfigurationViewcubeButtons:e=>({type:"TOGGLE_CONFIGURATION_VIEWCUBE_BUTTONS",payload:e}),toggleConfigurationViewcubeOpaque:e=>({type:"TOGGLE_CONFIGURATION_VIEWCUBE_OPAQUE",payload:e}),toggleConfigurationViewcubeConceal:()=>({type:"TOGGLE_CONFIGURATION_VIEWCUBE_CONCEAL"}),toggleConfigurationToolbarConceal:()=>({type:"TOGGLE_CONFIGURATION_TOOLBAR_CONCEAL"}),toggleConfigurationToolbarTransformIcons:()=>({type:"TOGGLE_CONFIGURATION_TOOLBAR_TRANSFORM_ICONS"}),toggleConfigurationToolbarTransformButtons:()=>({type:"TOGGLE_CONFIGURATION_TOOLBAR_TRANSFORM_BUTTONS"}),toggleConfigurationSpaceTransparentUI:()=>({type:"TOGGLE_CONFIGURATION_SPACE_TRANSPARENT_UI"}),toggleConfigurationSpaceShowTransformOrigin:()=>({type:"TOGGLE_CONFIGURATION_SPACE_SHOW_TRANSFORM_ORIGIN"}),toggleConfigurationToolbarOpaque:()=>({type:"TOGGLE_CONFIGURATION_TOOLBAR_OPAQUE"}),toggleConfigurationToolbarToggleDrawer:e=>({type:"TOGGLE_CONFIGURATION_TOOLBAR_TOGGLE_DRAWER",payload:e}),setConfigurationSpaceTransformOriginSize:e=>({type:"SET_CONFIGURATION_SPACE_TRANSFORM_ORIGIN_SIZE",payload:e}),setConfigurationSpaceTransformMode:e=>({type:"SET_CONFIGURATION_SPACE_TRANSFORM_MODE",payload:e}),toggleConfigurationSpaceTransformMultimode:e=>({type:"TOGGLE_CONFIGURATION_SPACE_TRANSFORM_MULTIMODE",payload:e}),setConfigurationSpaceTransformTouch:e=>({type:"SET_CONFIGURATION_SPACE_TRANSFORM_TOUCH",payload:e}),toggleConfigurationSpaceFirstPerson:()=>({type:"TOGGLE_CONFIGURATION_SPACE_FIRST_PERSON"}),setConfigurationSpaceTransformLocks:e=>({type:"SET_CONFIGURATION_SPACE_TRANSFORM_LOCKS",payload:e}),setConfigurationSpaceLayoutType:e=>({type:"SET_CONFIGURATION_SPACE_LAYOUT_TYPE",payload:e}),setConfigurationSpaceCullingDistance:e=>({type:"SET_CONFIGURATION_SPACE_CULLING_DISTANCE",payload:e})});const b=Object.assign({},e.defaultConfiguration),L=(e,t)=>Object.assign(Object.assign({},e),t.payload),U=e=>{const t=Object.assign({},e);return t.elements.toolbar.show=!1,t.elements.plane.controls.show=!1,t.elements.viewcube.show=!1,Object.assign({},t)},N=(e,t)=>{const a=Object.assign({},e);return a.elements.plane.controls.show=t.payload,Object.assign({},a)},P=(e,t)=>{const a=Object.assign({},e);return a.elements.plane.opacity=t.payload,Object.assign({},a)},v=(e,t)=>{const a=Object.assign({},e),n={general:t.payload,interaction:"object"==typeof a.global.theme?a.global.theme.interaction:"plurid"};return Object.assign(Object.assign({},a),{global:Object.assign(Object.assign({},a.global),{theme:n})})},y=(e,t)=>{const a=Object.assign({},e),n={general:"object"==typeof a.global.theme?a.global.theme.general:"plurid",interaction:t.payload};return Object.assign(Object.assign({},a),{global:Object.assign(Object.assign({},a.global),{theme:n})})},w=(e,t)=>Object.assign(Object.assign({},e),{global:Object.assign(Object.assign({},e.global),{language:t.payload})}),D=(e,t)=>{const a=Object.assign({},e);return a.elements.viewcube.show=t.payload,Object.assign({},a)},M=(e,t)=>{const a=Object.assign({},e);return a.elements.viewcube.buttons=t.payload,Object.assign({},a)},x=(e,t)=>{const a=Object.assign({},e);return a.elements.viewcube.opaque=t.payload,Object.assign({},a)},F=e=>{const{conceal:t}=e.elements.viewcube,a=Object.assign({},e);return a.elements.viewcube.conceal=!t,Object.assign({},a)},G=e=>{const{conceal:t}=e.elements.toolbar,a=Object.assign({},e);return a.elements.toolbar.conceal=!t,Object.assign({},a)},j=e=>{const{transformIcons:t}=e.elements.toolbar,a=Object.assign({},e);return a.elements.toolbar.transformIcons=!t,Object.assign({},a)},V=e=>{const{transformButtons:t}=e.elements.toolbar,a=Object.assign({},e);return a.elements.toolbar.transformButtons=!t,Object.assign({},a)},B=e=>{const{show:t}=e.space.transformOrigin,a=Object.assign({},e);return a.space.transformOrigin.show=!t,Object.assign({},a)},k=e=>{const{opaque:t}=e.elements.toolbar,a=Object.assign({},e);return a.elements.toolbar.opaque=!t,Object.assign({},a)},W=e=>{const t=Object.assign({},e);return t.global.transparentUI=!e.global.transparentUI,Object.assign({},t)},Y=(e,t)=>{const a=Object.assign({},e);return a.space.transformOrigin.size=t.payload,Object.assign({},a)},$=(t,a)=>{const n=Object.assign({},t);return n.space.transformMode!==a.payload?n.space.transformMode=a.payload:n.space.transformMode=e.TRANSFORM_MODES.ALL,Object.assign({},n)},H=(e,t)=>{const a=Object.assign({},e);return a.space.transformMultimode=t.payload,Object.assign({},a)},X=(e,t)=>{const a=Object.assign({},e);return a.space.transformTouch=t.payload,Object.assign({},a)},z=e=>{const{firstPerson:t}=e.space,a=Object.assign({},e);return a.space.firstPerson=!t,Object.assign({},a)},Z=(e,t)=>{const{toggledDrawers:a}=e.elements.toolbar,n=Object.assign({},e);if(a.includes(t.payload)){const e=a.filter((e=>e!==t.payload));n.elements.toolbar.toggledDrawers=[...e]}else n.elements.toolbar.toggledDrawers=[...a,t.payload];return Object.assign({},n)},K=(e,t)=>{const{transformLocks:a}=e.space,n=Object.assign({},e),r=Object.assign({},a);return r[t.payload]=!a[t.payload],n.space.transformLocks=Object.assign({},r),Object.assign({},n)},q=(t,a)=>{const n=Object.assign({},t),r={type:e.LAYOUT_TYPES[a.payload]};return n.space.layout=Object.assign({},r),Object.assign({},n)},Q=(e,t)=>{const a=Object.assign({},e);return a.space.cullingDistance=t.payload,Object.assign({},a)};var J=Object.freeze({__proto__:null,setConfiguration:L,setConfigurationMicro:U,setConfigurationPlaneControls:N,setConfigurationPlaneOpacity:P,setConfigurationThemeGeneral:v,setConfigurationThemeInteraction:y,setConfigurationLanguage:w,toggleConfigurationViewcubeHide:D,toggleConfigurationViewcubeButtons:M,toggleConfigurationViewcubeOpaque:x,toggleConfigurationViewcubeConceal:F,toggleConfigurationToolbarConceal:G,toggleConfigurationToolbarTransformIcons:j,toggleConfigurationToolbarTransformButtons:V,toggleConfigurationShowTransformOrigin:B,toggleConfigurationToolbarOpaque:k,toggleConfigurationSpaceTransparentUI:W,setConfigurationSpaceTransformOriginSize:Y,setConfigurationSpaceTransformMode:$,toggleConfigurationSpaceTransformMultimode:H,setConfigurationSpaceTransformTouch:X,toggleConfigurationSpaceFirstPerson:z,toggleConfigurationToolbarToggleDrawer:Z,setConfigurationSpaceTransformLocks:K,setConfigurationSpaceLayout:q,setConfigurationSpaceCullingDistance:Q});var ee={getConfiguration:e=>e.configuration},te=Object.freeze({__proto__:null,actions:C,initialState:b,reducer:(e=b,t)=>{switch(t.type){case"SET_STATE":return Object.assign(Object.assign({},e),t.payload.configuration);case"SET_CONFIGURATION":return L(e,t);case"SET_CONFIGURATION_MICRO":return U(e);case"SET_CONFIGURATION_PLANE_CONTROLS":return N(e,t);case"SET_CONFIGURATION_PLANE_OPACITY":return P(e,t);case"SET_CONFIGURATION_THEME_GENERAL":return v(e,t);case"SET_CONFIGURATION_THEME_INTERACTION":return y(e,t);case"SET_CONFIGURATION_LANGUAGE":return w(e,t);case"TOGGLE_CONFIGURATION_VIEWCUBE_HIDE":return D(e,t);case"TOGGLE_CONFIGURATION_VIEWCUBE_BUTTONS":return M(e,t);case"TOGGLE_CONFIGURATION_VIEWCUBE_OPAQUE":return x(e,t);case"TOGGLE_CONFIGURATION_VIEWCUBE_CONCEAL":return F(e);case"TOGGLE_CONFIGURATION_TOOLBAR_CONCEAL":return G(e);case"TOGGLE_CONFIGURATION_TOOLBAR_TRANSFORM_ICONS":return j(e);case"TOGGLE_CONFIGURATION_TOOLBAR_TRANSFORM_BUTTONS":return V(e);case"TOGGLE_CONFIGURATION_TOOLBAR_TOGGLE_DRAWER":return Z(e,t);case"TOGGLE_CONFIGURATION_TOOLBAR_OPAQUE":return k(e);case"TOGGLE_CONFIGURATION_SPACE_TRANSPARENT_UI":return W(e);case"TOGGLE_CONFIGURATION_SPACE_SHOW_TRANSFORM_ORIGIN":return B(e);case"SET_CONFIGURATION_SPACE_TRANSFORM_ORIGIN_SIZE":return Y(e,t);case"SET_CONFIGURATION_SPACE_TRANSFORM_MODE":return $(e,t);case"TOGGLE_CONFIGURATION_SPACE_TRANSFORM_MULTIMODE":return H(e,t);case"SET_CONFIGURATION_SPACE_TRANSFORM_TOUCH":return X(e,t);case"TOGGLE_CONFIGURATION_SPACE_FIRST_PERSON":return z(e);case"SET_CONFIGURATION_SPACE_TRANSFORM_LOCKS":return K(e,t);case"SET_CONFIGURATION_SPACE_LAYOUT_TYPE":return q(e,t);case"SET_CONFIGURATION_SPACE_CULLING_DISTANCE":return Q(e,t);default:return Object.assign({},e)}},resolvers:J,selectors:ee,Types:I}),ae=Object.freeze({__proto__:null,default:{}});const ne={};var re=Object.freeze({__proto__:null}),oe=Object.freeze({__proto__:null}),ie=Object.freeze({__proto__:null,actions:ae,initialState:ne,reducer:(e=ne,t)=>Object.assign({},e),resolvers:re,selectors:{},Types:oe});var le=Object.freeze({__proto__:null,SHORTCUTS_SET_GLOBAL_SHORTCUTS:"SHORTCUTS_SET_GLOBAL_SHORTCUTS",SHORTCUTS_UNSET_GLOBAL_SHORTCUTS:"SHORTCUTS_UNSET_GLOBAL_SHORTCUTS"});var se=Object.freeze({__proto__:null,setGlobalShortcuts:()=>({type:"SHORTCUTS_SET_GLOBAL_SHORTCUTS"}),unsetGlobalShortcuts:()=>({type:"SHORTCUTS_UNSET_GLOBAL_SHORTCUTS"})});const ce={global:!0},ue=e=>Object.assign(Object.assign({},e),{global:!0}),de=e=>Object.assign(Object.assign({},e),{global:!1});var Te=Object.freeze({__proto__:null,setGlobalShortcuts:ue,unsetGlobalShortcuts:de});var pe={getGlobal:e=>e.shortcuts.global},fe=Object.freeze({__proto__:null,actions:se,initialState:ce,reducer:(e=ce,t)=>{switch(t.type){case"SET_STATE":return Object.assign(Object.assign({},e),t.payload.shortcuts);case"SHORTCUTS_SET_GLOBAL_SHORTCUTS":return ue(e);case"SHORTCUTS_UNSET_GLOBAL_SHORTCUTS":return de(e);default:return Object.assign({},e)}},resolvers:Te,selectors:pe,Types:le});var Ee=Object.freeze({__proto__:null,SET_SPACE_LOADING:"SET_SPACE_LOADING",SET_ANIMATED_TRANSFORM:"SET_ANIMATED_TRANSFORM",SET_TRANSFORM_TIME:"SET_TRANSFORM_TIME",SET_SPACE_LOCATION:"SET_SPACE_LOCATION",VIEW_CAMERA_MOVE_FORWARD:"VIEW_CAMERA_MOVE_FORWARD",VIEW_CAMERA_MOVE_BACKWARD:"VIEW_CAMERA_MOVE_BACKWARD",VIEW_CAMERA_MOVE_LEFT:"VIEW_CAMERA_MOVE_LEFT",VIEW_CAMERA_MOVE_RIGHT:"VIEW_CAMERA_MOVE_RIGHT",VIEW_CAMERA_MOVE_UP:"VIEW_CAMERA_MOVE_UP",VIEW_CAMERA_MOVE_DOWN:"VIEW_CAMERA_MOVE_DOWN",VIEW_CAMERA_TURN_UP:"VIEW_CAMERA_TURN_UP",VIEW_CAMERA_TURN_DOWN:"VIEW_CAMERA_TURN_DOWN",VIEW_CAMERA_TURN_LEFT:"VIEW_CAMERA_TURN_LEFT",VIEW_CAMERA_TURN_RIGHT:"VIEW_CAMERA_TURN_RIGHT",ROTATE_UP:"ROTATE_UP",ROTATE_DOWN:"ROTATE_DOWN",ROTATE_LEFT:"ROTATE_LEFT",ROTATE_X:"ROTATE_X",ROTATE_X_WITH:"ROTATE_X_WITH",ROTATE_RIGHT:"ROTATE_RIGHT",ROTATE_Y:"ROTATE_Y",ROTATE_Y_WITH:"ROTATE_Y_WITH",TRANSLATE_UP:"TRANSLATE_UP",TRANSLATE_DOWN:"TRANSLATE_DOWN",TRANSLATE_LEFT:"TRANSLATE_LEFT",TRANSLATE_RIGHT:"TRANSLATE_RIGHT",TRANSLATE_IN:"TRANSLATE_IN",TRANSLATE_OUT:"TRANSLATE_OUT",TRANSLATE_X_WITH:"TRANSLATE_X_WITH",TRANSLATE_Y_WITH:"TRANSLATE_Y_WITH",SCALE_UP:"SCALE_UP",SCALE_DOWN:"SCALE_DOWN",SCALE_UP_WITH:"SCALE_UP_WITH",SCALE_DOWN_WITH:"SCALE_DOWN_WITH",SET_INITIAL_TREE:"SET_INITIAL_TREE",SET_TREE:"SET_TREE",SET_ACTIVE_UNIVERSE:"SET_ACTIVE_UNIVERSE",SPACE_RESET_TRANSFORM:"SPACE_RESET_TRANSFORM",SET_VIEW_SIZE:"SET_VIEW_SIZE",SET_SPACE_SIZE:"SET_SPACE_SIZE",UPDATE_SPACE_TREE_PLANE:"UPDATE_SPACE_TREE_PLANE",UPDATE_SPACE_LINK_COORDINATES:"UPDATE_SPACE_LINK_COORDINATES",SPACE_SET_VIEW:"SPACE_SET_VIEW",SPACE_SET_CULLED_VIEW:"SPACE_SET_CULLED_VIEW"});var me=Object.freeze({__proto__:null,setSpaceLoading:e=>({type:"SET_SPACE_LOADING",payload:e}),setAnimatedTransform:e=>({type:"SET_ANIMATED_TRANSFORM",payload:e}),setTransformTime:e=>({type:"SET_TRANSFORM_TIME",payload:e}),setSpaceLocation:e=>({type:"SET_SPACE_LOCATION",payload:e}),viewCameraMoveForward:()=>({type:"VIEW_CAMERA_MOVE_FORWARD"}),viewCameraMoveBackward:()=>({type:"VIEW_CAMERA_MOVE_BACKWARD"}),viewCameraMoveLeft:()=>({type:"VIEW_CAMERA_MOVE_LEFT"}),viewCameraMoveRight:()=>({type:"VIEW_CAMERA_MOVE_RIGHT"}),viewCameraMoveUp:()=>({type:"VIEW_CAMERA_MOVE_UP"}),viewCameraMoveDown:()=>({type:"VIEW_CAMERA_MOVE_DOWN"}),viewCameraTurnUp:()=>({type:"VIEW_CAMERA_TURN_UP"}),viewCameraTurnDown:()=>({type:"VIEW_CAMERA_TURN_DOWN"}),viewCameraTurnLeft:()=>({type:"VIEW_CAMERA_TURN_LEFT"}),viewCameraTurnRight:()=>({type:"VIEW_CAMERA_TURN_RIGHT"}),rotateUp:()=>({type:"ROTATE_UP"}),rotateDown:()=>({type:"ROTATE_DOWN"}),rotateX:e=>({type:"ROTATE_X",payload:e}),rotateXWith:e=>({type:"ROTATE_X_WITH",payload:e}),rotateLeft:()=>({type:"ROTATE_LEFT"}),rotateRight:()=>({type:"ROTATE_RIGHT"}),rotateY:e=>({type:"ROTATE_Y",payload:e}),rotateYWith:e=>({type:"ROTATE_Y_WITH",payload:e}),translateUp:()=>({type:"TRANSLATE_UP"}),translateDown:()=>({type:"TRANSLATE_DOWN"}),translateLeft:()=>({type:"TRANSLATE_LEFT"}),translateRight:()=>({type:"TRANSLATE_RIGHT"}),translateIn:()=>({type:"TRANSLATE_IN"}),translateOut:()=>({type:"TRANSLATE_OUT"}),translateXWith:e=>({type:"TRANSLATE_X_WITH",payload:e}),translateYWith:e=>({type:"TRANSLATE_Y_WITH",payload:e}),scaleUp:()=>({type:"SCALE_UP"}),scaleDown:()=>({type:"SCALE_DOWN"}),scaleUpWith:e=>({type:"SCALE_UP_WITH",payload:e}),scaleDownWith:e=>({type:"SCALE_DOWN_WITH",payload:e}),setInitialTree:e=>({type:"SET_INITIAL_TREE",payload:e}),setTree:e=>({type:"SET_TREE",payload:e}),setActiveUniverse:e=>({type:"SET_ACTIVE_UNIVERSE",payload:e}),spaceResetTransform:()=>({type:"SPACE_RESET_TRANSFORM"}),setViewSize:e=>({type:"SET_VIEW_SIZE",payload:e}),setSpaceSize:e=>({type:"SET_SPACE_SIZE",payload:e}),updateSpaceTreePlane:e=>({type:"UPDATE_SPACE_TREE_PLANE",payload:e}),updateSpaceLinkCoordinates:e=>({type:"UPDATE_SPACE_LINK_COORDINATES",payload:e}),spaceSetView:e=>({type:"SPACE_SET_VIEW",payload:e}),spaceSetCulledView:e=>({type:"SPACE_SET_CULLED_VIEW",payload:e})});const ge={loading:!0,animatedTransform:!1,transformTime:450,scale:1,rotationX:0,rotationY:0,translationX:0,translationY:0,translationZ:0,initialTree:[],tree:[],activeUniverseID:"",camera:{x:0,y:0,z:0},viewSize:{width:"undefined"==typeof window?1440:window.innerWidth,height:"undefined"==typeof window?821:window.innerHeight},spaceSize:{width:"undefined"==typeof window?1440:window.innerWidth,height:"undefined"==typeof window?821:window.innerHeight,depth:0,topCorner:{x:0,y:0,z:0}},view:[],culledView:[]},{toRadians:_e}=l.mathematics.geometry,Oe=(e,t)=>Object.assign(Object.assign({},e),{loading:t.payload}),he=(e,t)=>Object.assign(Object.assign({},e),{animatedTransform:t.payload}),Se=(e,t)=>Object.assign(Object.assign({},e),{transformTime:t.payload}),Re=(e,t)=>Object.assign(Object.assign({},e),t.payload),Ae=t=>{const a=t.translationZ+6*e.TRANSLATION_STEP*Math.cos(_e(-t.rotationY)),n=t.translationX+6*e.TRANSLATION_STEP*Math.sin(_e(-t.rotationY));return Object.assign(Object.assign({},t),{translationX:n,translationZ:a})},Ie=t=>{const a=t.translationZ-6*e.TRANSLATION_STEP*Math.cos(_e(-t.rotationY)),n=t.translationX-6*e.TRANSLATION_STEP*Math.sin(_e(-t.rotationY));return Object.assign(Object.assign({},t),{translationX:n,translationZ:a})},Ce=t=>{const a=t.translationX+3*e.TRANSLATION_STEP*Math.cos(_e(t.rotationY)),n=t.translationZ+3*e.TRANSLATION_STEP*Math.sin(_e(t.rotationY));return Object.assign(Object.assign({},t),{translationX:a,translationZ:n})},be=t=>{const a=t.translationX-3*e.TRANSLATION_STEP*Math.cos(_e(t.rotationY)),n=t.translationZ-3*e.TRANSLATION_STEP*Math.sin(_e(t.rotationY));return Object.assign(Object.assign({},t),{translationX:a,translationZ:n})},Le=t=>{const a=t.translationY+3*e.TRANSLATION_STEP;return Object.assign(Object.assign({},t),{translationY:a})},Ue=t=>{const a=t.translationY-3*e.TRANSLATION_STEP;return Object.assign(Object.assign({},t),{translationY:a})},Ne=t=>{const a=(t.rotationX+e.ROTATION_STEP)%360;return Object.assign(Object.assign({},t),{rotationX:a})},Pe=t=>{const a=(t.rotationX-e.ROTATION_STEP)%360;return Object.assign(Object.assign({},t),{rotationX:a})},ve=t=>{const a=(t.rotationY-e.ROTATION_STEP)%360;return Object.assign(Object.assign({},t),{rotationY:a})},ye=t=>{const a=(t.rotationY+e.ROTATION_STEP)%360;return Object.assign(Object.assign({},t),{rotationY:a})},we=t=>{const a=(t.rotationX+e.ROTATION_STEP)%360;return Object.assign(Object.assign({},t),{rotationX:a})},De=t=>{const a=(t.rotationX-e.ROTATION_STEP)%360;return Object.assign(Object.assign({},t),{rotationX:a})},Me=(e,t)=>Object.assign(Object.assign({},e),{rotationX:t.payload}),xe=(e,t)=>{const a=e.rotationX+t.payload;return Object.assign(Object.assign({},e),{rotationX:a})},Fe=t=>{const a=(t.rotationY+e.ROTATION_STEP)%360;return Object.assign(Object.assign({},t),{rotationY:a})},Ge=t=>{const a=(t.rotationY-e.ROTATION_STEP)%360;return Object.assign(Object.assign({},t),{rotationY:a})},je=(e,t)=>Object.assign(Object.assign({},e),{rotationY:t.payload}),Ve=(e,t)=>{const a=e.rotationY+t.payload;return Object.assign(Object.assign({},e),{rotationY:a})},Be=t=>{const a=t.translationY-e.TRANSLATION_STEP;return Object.assign(Object.assign({},t),{translationY:a})},ke=t=>{const a=t.translationY+e.TRANSLATION_STEP;return Object.assign(Object.assign({},t),{translationY:a})},We=t=>{const a=t.translationX-e.TRANSLATION_STEP*Math.cos(_e(t.rotationY)),n=t.translationZ-e.TRANSLATION_STEP*Math.sin(_e(t.rotationY));return Object.assign(Object.assign({},t),{translationX:a,translationZ:n})},Ye=t=>{const a=t.translationX+e.TRANSLATION_STEP*Math.cos(_e(t.rotationY)),n=t.translationZ+e.TRANSLATION_STEP*Math.sin(_e(t.rotationY));return Object.assign(Object.assign({},t),{translationX:a,translationZ:n})},$e=t=>{const a=t.translationZ-3*e.TRANSLATION_STEP*Math.cos(_e(-t.rotationY)),n=t.translationX-3*e.TRANSLATION_STEP*Math.sin(_e(-t.rotationY));return Object.assign(Object.assign({},t),{translationX:n,translationZ:a})},He=t=>{const a=t.translationZ+3*e.TRANSLATION_STEP*Math.cos(_e(-t.rotationY)),n=t.translationX+3*e.TRANSLATION_STEP*Math.sin(_e(-t.rotationY));return Object.assign(Object.assign({},t),{translationX:n,translationZ:a})},Xe=(e,t)=>{const a=e.translationX+t.payload*Math.cos(_e(e.rotationY)),n=e.translationZ+t.payload*Math.sin(_e(e.rotationY));return Object.assign(Object.assign({},e),{translationX:a,translationZ:n})},ze=(e,t)=>{const a=e.translationY+t.payload;return Object.assign(Object.assign({},e),{translationY:a})},Ze=t=>{const a=t.scale+e.SCALE_STEP,n=a<e.SCALE_UPPER_LIMIT?a:e.SCALE_UPPER_LIMIT;return Object.assign(Object.assign({},t),{scale:n})},Ke=t=>{const a=t.scale-e.SCALE_STEP,n=a>e.SCALE_LOWER_LIMIT?a:e.SCALE_LOWER_LIMIT;return Object.assign(Object.assign({},t),{scale:n})},qe=(t,a)=>{const n=t.scale+Math.abs(a.payload),r=n<e.SCALE_UPPER_LIMIT?n:e.SCALE_UPPER_LIMIT;return Object.assign(Object.assign({},t),{scale:r})},Qe=(t,a)=>{const n=t.scale-Math.abs(a.payload),r=n>e.SCALE_LOWER_LIMIT?n:e.SCALE_LOWER_LIMIT;return Object.assign(Object.assign({},t),{scale:r})},Je=(e,t)=>Object.assign(Object.assign({},e),{initialTree:[...t.payload]}),et=(e,t)=>Object.assign(Object.assign({},e),{tree:[...t.payload]}),tt=(e,t)=>Object.assign(Object.assign({},e),{activeUniverseID:t.payload}),at=e=>Object.assign(Object.assign({},e),{scale:1,rotationX:0,rotationY:0,translationX:0,translationY:0,translationZ:0}),nt=(e,t)=>Object.assign(Object.assign({},e),{viewSize:Object.assign({},t.payload)}),rt=(e,t)=>Object.assign(Object.assign({},e),{spaceSize:Object.assign({},t.payload)}),ot=(e,a)=>{const n=t.general.tree.updateTreePlane(e.tree,a.payload);return Object.assign(Object.assign({},e),{tree:n})},it=(e,a)=>{const{planeID:n,linkCoordinates:r}=a.payload,o=t.general.tree.updateTreeByPlaneIDWithLinkCoordinates(e.tree,n,r);return Object.assign(Object.assign({},e),{tree:o})},lt=(e,t)=>Object.assign(Object.assign({},e),{view:t.payload}),st=(e,t)=>Object.assign(Object.assign({},e),{culledView:t.payload});var ct=Object.freeze({__proto__:null,setSpaceLoading:Oe,setAnimatedTransform:he,setTransformTime:Se,setSpaceLocation:Re,viewCameraMoveForward:Ae,viewCameraMoveBackward:Ie,viewCameraMoveLeft:Ce,viewCameraMoveRight:be,viewCameraMoveUp:Le,viewCameraMoveDown:Ue,viewCameraTurnUp:Ne,viewCameraTurnDown:Pe,viewCameraTurnLeft:ve,viewCameraTurnRight:ye,rotateUp:we,rotateDown:De,rotateX:Me,rotateXWith:xe,rotateLeft:Fe,rotateRight:Ge,rotateY:je,rotateYWith:Ve,translateUp:Be,translateDown:ke,translateLeft:We,translateRight:Ye,translateIn:$e,translateOut:He,translateXWith:Xe,translateYWith:ze,scaleUp:Ze,scaleDown:Ke,scaleUpWith:qe,scaleDownWith:Qe,setInitialTree:Je,setTree:et,setActiveUniverse:tt,spaceResetTransform:at,setViewSize:nt,setSpaceSize:rt,updateSpaceTreePlane:ot,updateSpaceLinkCoordinates:it,spaceSetView:lt,spaceSetCulledView:st});var ut={getLoading:e=>e.space.loading,getAnimatedTransform:e=>e.space.animatedTransform,getTransformTime:e=>e.space.transformTime,getRotationX:e=>e.space.rotationX,getRotationY:e=>e.space.rotationY,getTranslationX:e=>e.space.translationX,getTranslationY:e=>e.space.translationY,getTranslationZ:e=>e.space.translationZ,getScale:e=>e.space.scale,getTransform:e=>({rotationX:e.space.rotationX,rotationY:e.space.rotationY,translationX:e.space.translationX,translationY:e.space.translationY,translationZ:e.space.translationZ,scale:e.space.scale}),getInitialTree:e=>e.space.initialTree,getTree:e=>e.space.tree,getActiveUniverseID:e=>e.space.activeUniverseID,getView:e=>e.space.view,getViewSize:e=>e.space.viewSize,getCulledView:e=>e.space.culledView},dt=Object.freeze({__proto__:null,actions:me,initialState:ge,reducer:(e=ge,t)=>{switch(t.type){case"SET_STATE":return Object.assign(Object.assign({},e),t.payload.space);case"SET_SPACE_LOADING":return Oe(e,t);case"SET_ANIMATED_TRANSFORM":return he(e,t);case"SET_TRANSFORM_TIME":return Se(e,t);case"SET_SPACE_LOCATION":return Re(e,t);case"VIEW_CAMERA_MOVE_FORWARD":return Ae(e);case"VIEW_CAMERA_MOVE_BACKWARD":return Ie(e);case"VIEW_CAMERA_MOVE_LEFT":return Ce(e);case"VIEW_CAMERA_MOVE_RIGHT":return be(e);case"VIEW_CAMERA_MOVE_UP":return Le(e);case"VIEW_CAMERA_MOVE_DOWN":return Ue(e);case"VIEW_CAMERA_TURN_UP":return Ne(e);case"VIEW_CAMERA_TURN_DOWN":return Pe(e);case"VIEW_CAMERA_TURN_LEFT":return ve(e);case"VIEW_CAMERA_TURN_RIGHT":return ye(e);case"ROTATE_UP":return we(e);case"ROTATE_DOWN":return De(e);case"ROTATE_X":return Me(e,t);case"ROTATE_X_WITH":return xe(e,t);case"ROTATE_LEFT":return Fe(e);case"ROTATE_RIGHT":return Ge(e);case"ROTATE_Y":return je(e,t);case"ROTATE_Y_WITH":return Ve(e,t);case"TRANSLATE_UP":return Be(e);case"TRANSLATE_DOWN":return ke(e);case"TRANSLATE_LEFT":return We(e);case"TRANSLATE_RIGHT":return Ye(e);case"TRANSLATE_IN":return $e(e);case"TRANSLATE_OUT":return He(e);case"TRANSLATE_X_WITH":return Xe(e,t);case"TRANSLATE_Y_WITH":return ze(e,t);case"SCALE_UP":return Ze(e);case"SCALE_DOWN":return Ke(e);case"SCALE_UP_WITH":return qe(e,t);case"SCALE_DOWN_WITH":return Qe(e,t);case"SET_INITIAL_TREE":return Je(e,t);case"SET_TREE":return et(e,t);case"SET_ACTIVE_UNIVERSE":return tt(e,t);case"SPACE_RESET_TRANSFORM":return at(e);case"SET_VIEW_SIZE":return nt(e,t);case"SET_SPACE_SIZE":return rt(e,t);case"UPDATE_SPACE_TREE_PLANE":return ot(e,t);case"UPDATE_SPACE_LINK_COORDINATES":return it(e,t);case"SPACE_SET_VIEW":return lt(e,t);case"SPACE_SET_CULLED_VIEW":return st(e,t);default:return Object.assign({},e)}},resolvers:ct,selectors:ut,Types:Ee});var Tt=Object.freeze({__proto__:null,THEMES_SET_GENERAL_THEME:"THEMES_SET_GENERAL_THEME",THEMES_SET_INTERACTION_THEME:"THEMES_SET_INTERACTION_THEME"});var pt=Object.freeze({__proto__:null,setGeneralTheme:e=>({type:"THEMES_SET_GENERAL_THEME",payload:e}),setInteractionTheme:e=>({type:"THEMES_SET_INTERACTION_THEME",payload:e})});const ft={general:s.plurid,interaction:s.plurid},Et=(e,t)=>Object.assign(Object.assign({},e),{general:Object.assign({},t.payload)}),mt=(e,t)=>Object.assign(Object.assign({},e),{interaction:Object.assign({},t.payload)});var gt=Object.freeze({__proto__:null,setGeneralTheme:Et,setInteractionTheme:mt});var _t={getGeneralTheme:e=>e.themes.general,getInteractionTheme:e=>e.themes.interaction},Ot=Object.freeze({__proto__:null,actions:pt,initialState:ft,reducer:(e=ft,t)=>{switch(t.type){case"SET_STATE":return Object.assign(Object.assign({},e),t.payload.themes);case"THEMES_SET_GENERAL_THEME":return Et(e,t);case"THEMES_SET_INTERACTION_THEME":return mt(e,t);default:return Object.assign({},e)}},resolvers:gt,selectors:_t,Types:Tt});var ht=Object.freeze({__proto__:null,SET_UI_TOOLBAR_SCROLL_POSITION:"SET_UI_TOOLBAR_SCROLL_POSITION"});var St=Object.freeze({__proto__:null,setUIToolbarScrollPosition:e=>({type:"SET_UI_TOOLBAR_SCROLL_POSITION",payload:e})});const Rt={toolbarScrollPosition:0},At=(e,t)=>Object.assign(Object.assign({},e),{toolbarScrollPosition:t.payload});var It=Object.freeze({__proto__:null,setUIToolbarScrollPosition:At});var Ct={getToolbarScrollPosition:e=>e.ui.toolbarScrollPosition},bt={configuration:te,general:ie,shortcuts:fe,space:dt,themes:Ot,ui:Object.freeze({__proto__:null,actions:St,initialState:Rt,reducer:(e=Rt,t)=>{switch(t.type){case"SET_STATE":return Object.assign(Object.assign({},e),t.payload.ui);case"SET_UI_TOOLBAR_SCROLL_POSITION":return At(e,t);default:return Object.assign({},e)}},resolvers:It,selectors:Ct,Types:ht})};const Lt=o.combineReducers({configuration:bt.configuration.reducer,general:bt.general.reducer,shortcuts:bt.shortcuts.reducer,space:bt.space.reducer,themes:bt.themes.reducer,ui:bt.ui.reducer}),Ut=e=>o.createStore(Lt,e,o.applyMiddleware(O.default)),Nt=_.default.createContext({});function Pt(e,t,a,n){return new(a||(a=Promise))((function(r,o){function i(e){try{s(n.next(e))}catch(e){o(e)}}function l(e){try{s(n.throw(e))}catch(e){o(e)}}function s(e){var t;e.done?r(e.value):(t=e.value,t instanceof a?t:new a((function(e){e(t)}))).then(i,l)}s((n=n.apply(e,t||[])).next())}))}const vt=_.default.createContext(null);var yt={configuration:bt.configuration.actions,general:bt.general.actions,shortcuts:bt.shortcuts.actions,space:bt.space.actions,themes:bt.themes.actions,ui:bt.ui.actions};const{direction:wt}=t.interaction,Dt=()=>Pt(void 0,void 0,void 0,(function*(){return yield Promise.resolve().then((function(){return function(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(a){if("default"!==a){var n=Object.getOwnPropertyDescriptor(e,a);Object.defineProperty(t,a,n.get?n:{enumerable:!0,get:function(){return e[a]}})}})),t.default=e,Object.freeze(t)}(require("hammerjs"))}))}));var Mt={configuration:bt.configuration.selectors,general:bt.general.selectors,shortcuts:bt.shortcuts.selectors,space:bt.space.selectors,themes:bt.themes.selectors,ui:bt.ui.selectors};!function(e,t){void 0===t&&(t={});var a=t.insertAt;if(e&&"undefined"!=typeof document){var n=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css","top"===a&&n.firstChild?n.insertBefore(r,n.firstChild):n.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}}("@import url('https://fonts.googleapis.com/css?family=Ubuntu&display=swap');\n");const xt=c.createGlobalStyle`
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@plurid/plurid-data"),t=require("@plurid/plurid-engine"),a=require("@plurid/plurid-pubsub"),n=require("react"),r=require("react-redux"),o=require("redux"),i=require("redux-thunk"),l=require("@plurid/plurid-functions"),s=require("@plurid/plurid-themes"),c=require("styled-components"),u=require("@plurid/plurid-ui-components-react"),d=require("@plurid/plurid-icons-react"),p=require("@plurid/plurid-functions-react"),f=require("react-dom"),m=require("cross-fetch"),g=require("@plurid/elementql-client-react"),T=require("hammerjs");function h(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var E=h(e),O=h(t),_=h(a),S=h(n),R=h(r),b=h(o),A=h(i),C=h(l),I=h(s),v=h(c),P=h(u),L=h(d),U=h(p),y=h(f),w=h(m),N=h(g),D=h(T);var M={};!function(e){Object.defineProperty(e,"__esModule",{value:!0});var t=E.default,a=O.default,n=_.default,r=S.default,o=R.default,i=b.default,l=A.default,s=C.default,c=I.default,u=v.default,d=P.default,p=L.default,f=U.default,m=y.default,g=w.default,T=N.default;function h(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var M=h(n),x=h(r),F=h(l),j=h(c),k=h(u),G=h(g);const B=x.default.createContext(void 0),Y="SET_CONFIGURATION",V="SET_CONFIGURATION_MICRO",$="SET_CONFIGURATION_PLANE_CONTROLS",X="SET_CONFIGURATION_PLANE_OPACITY",W="SET_CONFIGURATION_THEME_GENERAL",z="SET_CONFIGURATION_THEME_INTERACTION",H="SET_CONFIGURATION_LANGUAGE",Z="TOGGLE_CONFIGURATION_VIEWCUBE_HIDE",K="TOGGLE_CONFIGURATION_VIEWCUBE_BUTTONS",q="TOGGLE_CONFIGURATION_VIEWCUBE_OPAQUE",Q="TOGGLE_CONFIGURATION_VIEWCUBE_CONCEAL",J="TOGGLE_CONFIGURATION_TOOLBAR_CONCEAL",ee="TOGGLE_CONFIGURATION_TOOLBAR_TRANSFORM_ICONS",te="TOGGLE_CONFIGURATION_TOOLBAR_TRANSFORM_BUTTONS",ae="TOGGLE_CONFIGURATION_TOOLBAR_OPAQUE",ne="TOGGLE_CONFIGURATION_TOOLBAR_TOGGLE_DRAWER",re="TOGGLE_CONFIGURATION_SPACE_TRANSPARENT_UI",oe="TOGGLE_CONFIGURATION_SPACE_SHOW_TRANSFORM_ORIGIN",ie="SET_CONFIGURATION_SPACE_TRANSFORM_ORIGIN_SIZE",le="SET_CONFIGURATION_SPACE_TRANSFORM_MODE",se="TOGGLE_CONFIGURATION_SPACE_TRANSFORM_MULTIMODE",ce="SET_CONFIGURATION_SPACE_TRANSFORM_TOUCH",ue="TOGGLE_CONFIGURATION_SPACE_FIRST_PERSON",de="SET_CONFIGURATION_SPACE_TRANSFORM_LOCKS",pe="SET_CONFIGURATION_SPACE_LAYOUT_TYPE",fe="SET_CONFIGURATION_SPACE_CULLING_DISTANCE";var me=Object.freeze({__proto__:null,SET_CONFIGURATION:Y,SET_CONFIGURATION_MICRO:V,SET_CONFIGURATION_PLANE_CONTROLS:$,SET_CONFIGURATION_PLANE_OPACITY:X,SET_CONFIGURATION_THEME_GENERAL:W,SET_CONFIGURATION_THEME_INTERACTION:z,SET_CONFIGURATION_LANGUAGE:H,TOGGLE_CONFIGURATION_VIEWCUBE_HIDE:Z,TOGGLE_CONFIGURATION_VIEWCUBE_BUTTONS:K,TOGGLE_CONFIGURATION_VIEWCUBE_OPAQUE:q,TOGGLE_CONFIGURATION_VIEWCUBE_CONCEAL:Q,TOGGLE_CONFIGURATION_TOOLBAR_CONCEAL:J,TOGGLE_CONFIGURATION_TOOLBAR_TRANSFORM_ICONS:ee,TOGGLE_CONFIGURATION_TOOLBAR_TRANSFORM_BUTTONS:te,TOGGLE_CONFIGURATION_TOOLBAR_OPAQUE:ae,TOGGLE_CONFIGURATION_TOOLBAR_TOGGLE_DRAWER:ne,TOGGLE_CONFIGURATION_SPACE_TRANSPARENT_UI:re,TOGGLE_CONFIGURATION_SPACE_SHOW_TRANSFORM_ORIGIN:oe,SET_CONFIGURATION_SPACE_TRANSFORM_ORIGIN_SIZE:ie,SET_CONFIGURATION_SPACE_TRANSFORM_MODE:le,TOGGLE_CONFIGURATION_SPACE_TRANSFORM_MULTIMODE:se,SET_CONFIGURATION_SPACE_TRANSFORM_TOUCH:ce,TOGGLE_CONFIGURATION_SPACE_FIRST_PERSON:ue,SET_CONFIGURATION_SPACE_TRANSFORM_LOCKS:de,SET_CONFIGURATION_SPACE_LAYOUT_TYPE:pe,SET_CONFIGURATION_SPACE_CULLING_DISTANCE:fe});var ge=Object.freeze({__proto__:null,setConfiguration:e=>({type:Y,payload:e}),setConfigurationMicro:()=>({type:V}),setConfigurationPlaneControls:e=>({type:$,payload:e}),setConfigurationPlaneOpacity:e=>({type:X,payload:e}),setConfigurationThemeGeneralAction:e=>({type:W,payload:e}),setConfigurationThemeInteractionAction:e=>({type:z,payload:e}),setConfigurationLanguageAction:e=>({type:H,payload:e}),toggleConfigurationViewcubeHide:e=>({type:Z,payload:e}),toggleConfigurationViewcubeButtons:e=>({type:K,payload:e}),toggleConfigurationViewcubeOpaque:e=>({type:q,payload:e}),toggleConfigurationViewcubeConceal:()=>({type:Q}),toggleConfigurationToolbarConceal:()=>({type:J}),toggleConfigurationToolbarTransformIcons:()=>({type:ee}),toggleConfigurationToolbarTransformButtons:()=>({type:te}),toggleConfigurationSpaceTransparentUI:()=>({type:re}),toggleConfigurationSpaceShowTransformOrigin:()=>({type:oe}),toggleConfigurationToolbarOpaque:()=>({type:ae}),toggleConfigurationToolbarToggleDrawer:e=>({type:ne,payload:e}),setConfigurationSpaceTransformOriginSize:e=>({type:ie,payload:e}),setConfigurationSpaceTransformMode:e=>({type:le,payload:e}),toggleConfigurationSpaceTransformMultimode:e=>({type:se,payload:e}),setConfigurationSpaceTransformTouch:e=>({type:ce,payload:e}),toggleConfigurationSpaceFirstPerson:()=>({type:ue}),setConfigurationSpaceTransformLocks:e=>({type:de,payload:e}),setConfigurationSpaceLayoutType:e=>({type:pe,payload:e}),setConfigurationSpaceCullingDistance:e=>({type:fe,payload:e})});const Te=Object.assign({},t.defaultConfiguration),he=(e,t)=>Object.assign(Object.assign({},e),t.payload),Ee=e=>{const t=Object.assign({},e);return t.elements.toolbar.show=!1,t.elements.plane.controls.show=!1,t.elements.viewcube.show=!1,Object.assign({},t)},Oe=(e,t)=>{const a=Object.assign({},e);return a.elements.plane.controls.show=t.payload,Object.assign({},a)},_e=(e,t)=>{const a=Object.assign({},e);return a.elements.plane.opacity=t.payload,Object.assign({},a)},Se=(e,t)=>{const a=Object.assign({},e),n={general:t.payload,interaction:"object"==typeof a.global.theme?a.global.theme.interaction:"plurid"};return Object.assign(Object.assign({},a),{global:Object.assign(Object.assign({},a.global),{theme:n})})},Re=(e,t)=>{const a=Object.assign({},e),n={general:"object"==typeof a.global.theme?a.global.theme.general:"plurid",interaction:t.payload};return Object.assign(Object.assign({},a),{global:Object.assign(Object.assign({},a.global),{theme:n})})},be=(e,t)=>Object.assign(Object.assign({},e),{global:Object.assign(Object.assign({},e.global),{language:t.payload})}),Ae=(e,t)=>{const a=Object.assign({},e);return a.elements.viewcube.show=t.payload,Object.assign({},a)},Ce=(e,t)=>{const a=Object.assign({},e);return a.elements.viewcube.buttons=t.payload,Object.assign({},a)},Ie=(e,t)=>{const a=Object.assign({},e);return a.elements.viewcube.opaque=t.payload,Object.assign({},a)},ve=e=>{const{conceal:t}=e.elements.viewcube,a=Object.assign({},e);return a.elements.viewcube.conceal=!t,Object.assign({},a)},Pe=e=>{const{conceal:t}=e.elements.toolbar,a=Object.assign({},e);return a.elements.toolbar.conceal=!t,Object.assign({},a)},Le=e=>{const{transformIcons:t}=e.elements.toolbar,a=Object.assign({},e);return a.elements.toolbar.transformIcons=!t,Object.assign({},a)},Ue=e=>{const{transformButtons:t}=e.elements.toolbar,a=Object.assign({},e);return a.elements.toolbar.transformButtons=!t,Object.assign({},a)},ye=e=>{const{show:t}=e.space.transformOrigin,a=Object.assign({},e);return a.space.transformOrigin.show=!t,Object.assign({},a)},we=e=>{const{opaque:t}=e.elements.toolbar,a=Object.assign({},e);return a.elements.toolbar.opaque=!t,Object.assign({},a)},Ne=e=>{const t=Object.assign({},e);return t.global.transparentUI=!e.global.transparentUI,Object.assign({},t)},De=(e,t)=>{const a=Object.assign({},e);return a.space.transformOrigin.size=t.payload,Object.assign({},a)},Me=(e,a)=>{const n=Object.assign({},e);return n.space.transformMode!==a.payload?n.space.transformMode=a.payload:n.space.transformMode=t.TRANSFORM_MODES.ALL,Object.assign({},n)},xe=(e,t)=>{const a=Object.assign({},e);return a.space.transformMultimode=t.payload,Object.assign({},a)},Fe=(e,t)=>{const a=Object.assign({},e);return a.space.transformTouch=t.payload,Object.assign({},a)},je=e=>{const{firstPerson:t}=e.space,a=Object.assign({},e);return a.space.firstPerson=!t,Object.assign({},a)},ke=(e,t)=>{const{toggledDrawers:a}=e.elements.toolbar,n=Object.assign({},e);if(a.includes(t.payload)){const e=a.filter((e=>e!==t.payload));n.elements.toolbar.toggledDrawers=[...e]}else n.elements.toolbar.toggledDrawers=[...a,t.payload];return Object.assign({},n)},Ge=(e,t)=>{const{transformLocks:a}=e.space,n=Object.assign({},e),r=Object.assign({},a);return r[t.payload]=!a[t.payload],n.space.transformLocks=Object.assign({},r),Object.assign({},n)},Be=(e,a)=>{const n=Object.assign({},e),r={type:t.LAYOUT_TYPES[a.payload]};return n.space.layout=Object.assign({},r),Object.assign({},n)},Ye=(e,t)=>{const a=Object.assign({},e);return a.space.cullingDistance=t.payload,Object.assign({},a)};var Ve=Object.freeze({__proto__:null,setConfiguration:he,setConfigurationMicro:Ee,setConfigurationPlaneControls:Oe,setConfigurationPlaneOpacity:_e,setConfigurationThemeGeneral:Se,setConfigurationThemeInteraction:Re,setConfigurationLanguage:be,toggleConfigurationViewcubeHide:Ae,toggleConfigurationViewcubeButtons:Ce,toggleConfigurationViewcubeOpaque:Ie,toggleConfigurationViewcubeConceal:ve,toggleConfigurationToolbarConceal:Pe,toggleConfigurationToolbarTransformIcons:Le,toggleConfigurationToolbarTransformButtons:Ue,toggleConfigurationShowTransformOrigin:ye,toggleConfigurationToolbarOpaque:we,toggleConfigurationSpaceTransparentUI:Ne,setConfigurationSpaceTransformOriginSize:De,setConfigurationSpaceTransformMode:Me,toggleConfigurationSpaceTransformMultimode:xe,setConfigurationSpaceTransformTouch:Fe,toggleConfigurationSpaceFirstPerson:je,toggleConfigurationToolbarToggleDrawer:ke,setConfigurationSpaceTransformLocks:Ge,setConfigurationSpaceLayout:Be,setConfigurationSpaceCullingDistance:Ye});const $e="SET_STATE";var Xe={getConfiguration:e=>e.configuration},We=Object.freeze({__proto__:null,actions:ge,initialState:Te,reducer:(e=Te,t)=>{switch(t.type){case $e:return Object.assign(Object.assign({},e),t.payload.configuration);case Y:return he(e,t);case V:return Ee(e);case $:return Oe(e,t);case X:return _e(e,t);case W:return Se(e,t);case z:return Re(e,t);case H:return be(e,t);case Z:return Ae(e,t);case K:return Ce(e,t);case q:return Ie(e,t);case Q:return ve(e);case J:return Pe(e);case ee:return Le(e);case te:return Ue(e);case ne:return ke(e,t);case ae:return we(e);case re:return Ne(e);case oe:return ye(e);case ie:return De(e,t);case le:return Me(e,t);case se:return xe(e,t);case ce:return Fe(e,t);case ue:return je(e);case de:return Ge(e,t);case pe:return Be(e,t);case fe:return Ye(e,t);default:return Object.assign({},e)}},resolvers:Ve,selectors:Xe,Types:me}),ze=Object.freeze({__proto__:null,default:{}});const He={};var Ze=Object.freeze({__proto__:null}),Ke=Object.freeze({__proto__:null}),qe=Object.freeze({__proto__:null,actions:ze,initialState:He,reducer:(e=He,t)=>Object.assign({},e),resolvers:Ze,selectors:{},Types:Ke});const Qe="SHORTCUTS_SET_GLOBAL_SHORTCUTS",Je="SHORTCUTS_UNSET_GLOBAL_SHORTCUTS";var et=Object.freeze({__proto__:null,SHORTCUTS_SET_GLOBAL_SHORTCUTS:Qe,SHORTCUTS_UNSET_GLOBAL_SHORTCUTS:Je});var tt=Object.freeze({__proto__:null,setGlobalShortcuts:()=>({type:Qe}),unsetGlobalShortcuts:()=>({type:Je})});const at={global:!0},nt=e=>Object.assign(Object.assign({},e),{global:!0}),rt=e=>Object.assign(Object.assign({},e),{global:!1});var ot=Object.freeze({__proto__:null,setGlobalShortcuts:nt,unsetGlobalShortcuts:rt});var it={getGlobal:e=>e.shortcuts.global},lt=Object.freeze({__proto__:null,actions:tt,initialState:at,reducer:(e=at,t)=>{switch(t.type){case $e:return Object.assign(Object.assign({},e),t.payload.shortcuts);case Qe:return nt(e);case Je:return rt(e);default:return Object.assign({},e)}},resolvers:ot,selectors:it,Types:et});const st="SET_SPACE_LOADING",ct="SET_ANIMATED_TRANSFORM",ut="SET_TRANSFORM_TIME",dt="SET_SPACE_LOCATION",pt="VIEW_CAMERA_MOVE_FORWARD",ft="VIEW_CAMERA_MOVE_BACKWARD",mt="VIEW_CAMERA_MOVE_LEFT",gt="VIEW_CAMERA_MOVE_RIGHT",Tt="VIEW_CAMERA_MOVE_UP",ht="VIEW_CAMERA_MOVE_DOWN",Et="VIEW_CAMERA_TURN_UP",Ot="VIEW_CAMERA_TURN_DOWN",_t="VIEW_CAMERA_TURN_LEFT",St="VIEW_CAMERA_TURN_RIGHT",Rt="ROTATE_UP",bt="ROTATE_DOWN",At="ROTATE_LEFT",Ct="ROTATE_X",It="ROTATE_X_WITH",vt="ROTATE_RIGHT",Pt="ROTATE_Y",Lt="ROTATE_Y_WITH",Ut="TRANSLATE_UP",yt="TRANSLATE_DOWN",wt="TRANSLATE_LEFT",Nt="TRANSLATE_RIGHT",Dt="TRANSLATE_IN",Mt="TRANSLATE_OUT",xt="TRANSLATE_X_WITH",Ft="TRANSLATE_Y_WITH",jt="SCALE_UP",kt="SCALE_DOWN",Gt="SCALE_UP_WITH",Bt="SCALE_DOWN_WITH",Yt="SET_INITIAL_TREE",Vt="SET_TREE",$t="SET_ACTIVE_UNIVERSE",Xt="SPACE_RESET_TRANSFORM",Wt="SET_VIEW_SIZE",zt="SET_SPACE_SIZE",Ht="UPDATE_SPACE_TREE_PLANE",Zt="UPDATE_SPACE_LINK_COORDINATES",Kt="SPACE_SET_VIEW",qt="SPACE_SET_CULLED_VIEW";var Qt=Object.freeze({__proto__:null,SET_SPACE_LOADING:st,SET_ANIMATED_TRANSFORM:ct,SET_TRANSFORM_TIME:ut,SET_SPACE_LOCATION:dt,VIEW_CAMERA_MOVE_FORWARD:pt,VIEW_CAMERA_MOVE_BACKWARD:ft,VIEW_CAMERA_MOVE_LEFT:mt,VIEW_CAMERA_MOVE_RIGHT:gt,VIEW_CAMERA_MOVE_UP:Tt,VIEW_CAMERA_MOVE_DOWN:ht,VIEW_CAMERA_TURN_UP:Et,VIEW_CAMERA_TURN_DOWN:Ot,VIEW_CAMERA_TURN_LEFT:_t,VIEW_CAMERA_TURN_RIGHT:St,ROTATE_UP:Rt,ROTATE_DOWN:bt,ROTATE_LEFT:At,ROTATE_X:Ct,ROTATE_X_WITH:It,ROTATE_RIGHT:vt,ROTATE_Y:Pt,ROTATE_Y_WITH:Lt,TRANSLATE_UP:Ut,TRANSLATE_DOWN:yt,TRANSLATE_LEFT:wt,TRANSLATE_RIGHT:Nt,TRANSLATE_IN:Dt,TRANSLATE_OUT:Mt,TRANSLATE_X_WITH:xt,TRANSLATE_Y_WITH:Ft,SCALE_UP:jt,SCALE_DOWN:kt,SCALE_UP_WITH:Gt,SCALE_DOWN_WITH:Bt,SET_INITIAL_TREE:Yt,SET_TREE:Vt,SET_ACTIVE_UNIVERSE:$t,SPACE_RESET_TRANSFORM:Xt,SET_VIEW_SIZE:Wt,SET_SPACE_SIZE:zt,UPDATE_SPACE_TREE_PLANE:Ht,UPDATE_SPACE_LINK_COORDINATES:Zt,SPACE_SET_VIEW:Kt,SPACE_SET_CULLED_VIEW:qt});var Jt=Object.freeze({__proto__:null,setSpaceLoading:e=>({type:st,payload:e}),setAnimatedTransform:e=>({type:ct,payload:e}),setTransformTime:e=>({type:ut,payload:e}),setSpaceLocation:e=>({type:dt,payload:e}),viewCameraMoveForward:()=>({type:pt}),viewCameraMoveBackward:()=>({type:ft}),viewCameraMoveLeft:()=>({type:mt}),viewCameraMoveRight:()=>({type:gt}),viewCameraMoveUp:()=>({type:Tt}),viewCameraMoveDown:()=>({type:ht}),viewCameraTurnUp:()=>({type:Et}),viewCameraTurnDown:()=>({type:Ot}),viewCameraTurnLeft:()=>({type:_t}),viewCameraTurnRight:()=>({type:St}),rotateUp:()=>({type:Rt}),rotateDown:()=>({type:bt}),rotateX:e=>({type:Ct,payload:e}),rotateXWith:e=>({type:It,payload:e}),rotateLeft:()=>({type:At}),rotateRight:()=>({type:vt}),rotateY:e=>({type:Pt,payload:e}),rotateYWith:e=>({type:Lt,payload:e}),translateUp:()=>({type:Ut}),translateDown:()=>({type:yt}),translateLeft:()=>({type:wt}),translateRight:()=>({type:Nt}),translateIn:()=>({type:Dt}),translateOut:()=>({type:Mt}),translateXWith:e=>({type:xt,payload:e}),translateYWith:e=>({type:Ft,payload:e}),scaleUp:()=>({type:jt}),scaleDown:()=>({type:kt}),scaleUpWith:e=>({type:Gt,payload:e}),scaleDownWith:e=>({type:Bt,payload:e}),setInitialTree:e=>({type:Yt,payload:e}),setTree:e=>({type:Vt,payload:e}),setActiveUniverse:e=>({type:$t,payload:e}),spaceResetTransform:()=>({type:Xt}),setViewSize:e=>({type:Wt,payload:e}),setSpaceSize:e=>({type:zt,payload:e}),updateSpaceTreePlane:e=>({type:Ht,payload:e}),updateSpaceLinkCoordinates:e=>({type:Zt,payload:e}),spaceSetView:e=>({type:Kt,payload:e}),spaceSetCulledView:e=>({type:qt,payload:e})});const ea={loading:!0,animatedTransform:!1,transformTime:450,scale:1,rotationX:0,rotationY:0,translationX:0,translationY:0,translationZ:0,initialTree:[],tree:[],activeUniverseID:"",camera:{x:0,y:0,z:0},viewSize:{width:"undefined"==typeof window?1440:window.innerWidth,height:"undefined"==typeof window?821:window.innerHeight},spaceSize:{width:"undefined"==typeof window?1440:window.innerWidth,height:"undefined"==typeof window?821:window.innerHeight,depth:0,topCorner:{x:0,y:0,z:0}},view:[],culledView:[]},{toRadians:ta}=s.mathematics.geometry,aa=(e,t)=>Object.assign(Object.assign({},e),{loading:t.payload}),na=(e,t)=>Object.assign(Object.assign({},e),{animatedTransform:t.payload}),ra=(e,t)=>Object.assign(Object.assign({},e),{transformTime:t.payload}),oa=(e,t)=>Object.assign(Object.assign({},e),t.payload),ia=e=>{const a=e.translationZ+6*t.TRANSLATION_STEP*Math.cos(ta(-e.rotationY)),n=e.translationX+6*t.TRANSLATION_STEP*Math.sin(ta(-e.rotationY));return Object.assign(Object.assign({},e),{translationX:n,translationZ:a})},la=e=>{const a=e.translationZ-6*t.TRANSLATION_STEP*Math.cos(ta(-e.rotationY)),n=e.translationX-6*t.TRANSLATION_STEP*Math.sin(ta(-e.rotationY));return Object.assign(Object.assign({},e),{translationX:n,translationZ:a})},sa=e=>{const a=e.translationX+3*t.TRANSLATION_STEP*Math.cos(ta(e.rotationY)),n=e.translationZ+3*t.TRANSLATION_STEP*Math.sin(ta(e.rotationY));return Object.assign(Object.assign({},e),{translationX:a,translationZ:n})},ca=e=>{const a=e.translationX-3*t.TRANSLATION_STEP*Math.cos(ta(e.rotationY)),n=e.translationZ-3*t.TRANSLATION_STEP*Math.sin(ta(e.rotationY));return Object.assign(Object.assign({},e),{translationX:a,translationZ:n})},ua=e=>{const a=e.translationY+3*t.TRANSLATION_STEP;return Object.assign(Object.assign({},e),{translationY:a})},da=e=>{const a=e.translationY-3*t.TRANSLATION_STEP;return Object.assign(Object.assign({},e),{translationY:a})},pa=e=>{const a=(e.rotationX+t.ROTATION_STEP)%360;return Object.assign(Object.assign({},e),{rotationX:a})},fa=e=>{const a=(e.rotationX-t.ROTATION_STEP)%360;return Object.assign(Object.assign({},e),{rotationX:a})},ma=e=>{const a=(e.rotationY-t.ROTATION_STEP)%360;return Object.assign(Object.assign({},e),{rotationY:a})},ga=e=>{const a=(e.rotationY+t.ROTATION_STEP)%360;return Object.assign(Object.assign({},e),{rotationY:a})},Ta=e=>{const a=(e.rotationX+t.ROTATION_STEP)%360;return Object.assign(Object.assign({},e),{rotationX:a})},ha=e=>{const a=(e.rotationX-t.ROTATION_STEP)%360;return Object.assign(Object.assign({},e),{rotationX:a})},Ea=(e,t)=>Object.assign(Object.assign({},e),{rotationX:t.payload}),Oa=(e,t)=>{const a=e.rotationX+t.payload;return Object.assign(Object.assign({},e),{rotationX:a})},_a=e=>{const a=(e.rotationY+t.ROTATION_STEP)%360;return Object.assign(Object.assign({},e),{rotationY:a})},Sa=e=>{const a=(e.rotationY-t.ROTATION_STEP)%360;return Object.assign(Object.assign({},e),{rotationY:a})},Ra=(e,t)=>Object.assign(Object.assign({},e),{rotationY:t.payload}),ba=(e,t)=>{const a=e.rotationY+t.payload;return Object.assign(Object.assign({},e),{rotationY:a})},Aa=e=>{const a=e.translationY-t.TRANSLATION_STEP;return Object.assign(Object.assign({},e),{translationY:a})},Ca=e=>{const a=e.translationY+t.TRANSLATION_STEP;return Object.assign(Object.assign({},e),{translationY:a})},Ia=e=>{const a=e.translationX-t.TRANSLATION_STEP*Math.cos(ta(e.rotationY)),n=e.translationZ-t.TRANSLATION_STEP*Math.sin(ta(e.rotationY));return Object.assign(Object.assign({},e),{translationX:a,translationZ:n})},va=e=>{const a=e.translationX+t.TRANSLATION_STEP*Math.cos(ta(e.rotationY)),n=e.translationZ+t.TRANSLATION_STEP*Math.sin(ta(e.rotationY));return Object.assign(Object.assign({},e),{translationX:a,translationZ:n})},Pa=e=>{const a=e.translationZ-3*t.TRANSLATION_STEP*Math.cos(ta(-e.rotationY)),n=e.translationX-3*t.TRANSLATION_STEP*Math.sin(ta(-e.rotationY));return Object.assign(Object.assign({},e),{translationX:n,translationZ:a})},La=e=>{const a=e.translationZ+3*t.TRANSLATION_STEP*Math.cos(ta(-e.rotationY)),n=e.translationX+3*t.TRANSLATION_STEP*Math.sin(ta(-e.rotationY));return Object.assign(Object.assign({},e),{translationX:n,translationZ:a})},Ua=(e,t)=>{const a=e.translationX+t.payload*Math.cos(ta(e.rotationY)),n=e.translationZ+t.payload*Math.sin(ta(e.rotationY));return Object.assign(Object.assign({},e),{translationX:a,translationZ:n})},ya=(e,t)=>{const a=e.translationY+t.payload;return Object.assign(Object.assign({},e),{translationY:a})},wa=e=>{const a=e.scale+t.SCALE_STEP,n=a<t.SCALE_UPPER_LIMIT?a:t.SCALE_UPPER_LIMIT;return Object.assign(Object.assign({},e),{scale:n})},Na=e=>{const a=e.scale-t.SCALE_STEP,n=a>t.SCALE_LOWER_LIMIT?a:t.SCALE_LOWER_LIMIT;return Object.assign(Object.assign({},e),{scale:n})},Da=(e,a)=>{const n=e.scale+Math.abs(a.payload),r=n<t.SCALE_UPPER_LIMIT?n:t.SCALE_UPPER_LIMIT;return Object.assign(Object.assign({},e),{scale:r})},Ma=(e,a)=>{const n=e.scale-Math.abs(a.payload),r=n>t.SCALE_LOWER_LIMIT?n:t.SCALE_LOWER_LIMIT;return Object.assign(Object.assign({},e),{scale:r})},xa=(e,t)=>Object.assign(Object.assign({},e),{initialTree:[...t.payload]}),Fa=(e,t)=>Object.assign(Object.assign({},e),{tree:[...t.payload]}),ja=(e,t)=>Object.assign(Object.assign({},e),{activeUniverseID:t.payload}),ka=e=>Object.assign(Object.assign({},e),{scale:1,rotationX:0,rotationY:0,translationX:0,translationY:0,translationZ:0}),Ga=(e,t)=>Object.assign(Object.assign({},e),{viewSize:Object.assign({},t.payload)}),Ba=(e,t)=>Object.assign(Object.assign({},e),{spaceSize:Object.assign({},t.payload)}),Ya=(e,t)=>{const n=a.general.tree.updateTreePlane(e.tree,t.payload);return Object.assign(Object.assign({},e),{tree:n})},Va=(e,t)=>{const{planeID:n,linkCoordinates:r}=t.payload,o=a.general.tree.updateTreeByPlaneIDWithLinkCoordinates(e.tree,n,r);return Object.assign(Object.assign({},e),{tree:o})},$a=(e,t)=>Object.assign(Object.assign({},e),{view:t.payload}),Xa=(e,t)=>Object.assign(Object.assign({},e),{culledView:t.payload});var Wa=Object.freeze({__proto__:null,setSpaceLoading:aa,setAnimatedTransform:na,setTransformTime:ra,setSpaceLocation:oa,viewCameraMoveForward:ia,viewCameraMoveBackward:la,viewCameraMoveLeft:sa,viewCameraMoveRight:ca,viewCameraMoveUp:ua,viewCameraMoveDown:da,viewCameraTurnUp:pa,viewCameraTurnDown:fa,viewCameraTurnLeft:ma,viewCameraTurnRight:ga,rotateUp:Ta,rotateDown:ha,rotateX:Ea,rotateXWith:Oa,rotateLeft:_a,rotateRight:Sa,rotateY:Ra,rotateYWith:ba,translateUp:Aa,translateDown:Ca,translateLeft:Ia,translateRight:va,translateIn:Pa,translateOut:La,translateXWith:Ua,translateYWith:ya,scaleUp:wa,scaleDown:Na,scaleUpWith:Da,scaleDownWith:Ma,setInitialTree:xa,setTree:Fa,setActiveUniverse:ja,spaceResetTransform:ka,setViewSize:Ga,setSpaceSize:Ba,updateSpaceTreePlane:Ya,updateSpaceLinkCoordinates:Va,spaceSetView:$a,spaceSetCulledView:Xa});var za={getLoading:e=>e.space.loading,getAnimatedTransform:e=>e.space.animatedTransform,getTransformTime:e=>e.space.transformTime,getRotationX:e=>e.space.rotationX,getRotationY:e=>e.space.rotationY,getTranslationX:e=>e.space.translationX,getTranslationY:e=>e.space.translationY,getTranslationZ:e=>e.space.translationZ,getScale:e=>e.space.scale,getTransform:e=>({rotationX:e.space.rotationX,rotationY:e.space.rotationY,translationX:e.space.translationX,translationY:e.space.translationY,translationZ:e.space.translationZ,scale:e.space.scale}),getInitialTree:e=>e.space.initialTree,getTree:e=>e.space.tree,getActiveUniverseID:e=>e.space.activeUniverseID,getView:e=>e.space.view,getViewSize:e=>e.space.viewSize,getCulledView:e=>e.space.culledView},Ha=Object.freeze({__proto__:null,actions:Jt,initialState:ea,reducer:(e=ea,t)=>{switch(t.type){case $e:return Object.assign(Object.assign({},e),t.payload.space);case st:return aa(e,t);case ct:return na(e,t);case ut:return ra(e,t);case dt:return oa(e,t);case pt:return ia(e);case ft:return la(e);case mt:return sa(e);case gt:return ca(e);case Tt:return ua(e);case ht:return da(e);case Et:return pa(e);case Ot:return fa(e);case _t:return ma(e);case St:return ga(e);case Rt:return Ta(e);case bt:return ha(e);case Ct:return Ea(e,t);case It:return Oa(e,t);case At:return _a(e);case vt:return Sa(e);case Pt:return Ra(e,t);case Lt:return ba(e,t);case Ut:return Aa(e);case yt:return Ca(e);case wt:return Ia(e);case Nt:return va(e);case Dt:return Pa(e);case Mt:return La(e);case xt:return Ua(e,t);case Ft:return ya(e,t);case jt:return wa(e);case kt:return Na(e);case Gt:return Da(e,t);case Bt:return Ma(e,t);case Yt:return xa(e,t);case Vt:return Fa(e,t);case $t:return ja(e,t);case Xt:return ka(e);case Wt:return Ga(e,t);case zt:return Ba(e,t);case Ht:return Ya(e,t);case Zt:return Va(e,t);case Kt:return $a(e,t);case qt:return Xa(e,t);default:return Object.assign({},e)}},resolvers:Wa,selectors:za,Types:Qt});const Za="THEMES_SET_GENERAL_THEME",Ka="THEMES_SET_INTERACTION_THEME";var qa=Object.freeze({__proto__:null,THEMES_SET_GENERAL_THEME:Za,THEMES_SET_INTERACTION_THEME:Ka});var Qa=Object.freeze({__proto__:null,setGeneralTheme:e=>({type:Za,payload:e}),setInteractionTheme:e=>({type:Ka,payload:e})});const Ja={general:c.plurid,interaction:c.plurid},en=(e,t)=>Object.assign(Object.assign({},e),{general:Object.assign({},t.payload)}),tn=(e,t)=>Object.assign(Object.assign({},e),{interaction:Object.assign({},t.payload)});var an=Object.freeze({__proto__:null,setGeneralTheme:en,setInteractionTheme:tn});var nn={getGeneralTheme:e=>e.themes.general,getInteractionTheme:e=>e.themes.interaction},rn=Object.freeze({__proto__:null,actions:Qa,initialState:Ja,reducer:(e=Ja,t)=>{switch(t.type){case $e:return Object.assign(Object.assign({},e),t.payload.themes);case Za:return en(e,t);case Ka:return tn(e,t);default:return Object.assign({},e)}},resolvers:an,selectors:nn,Types:qa});const on="SET_UI_TOOLBAR_SCROLL_POSITION";var ln=Object.freeze({__proto__:null,SET_UI_TOOLBAR_SCROLL_POSITION:on});var sn=Object.freeze({__proto__:null,setUIToolbarScrollPosition:e=>({type:on,payload:e})});const cn={toolbarScrollPosition:0},un=(e,t)=>Object.assign(Object.assign({},e),{toolbarScrollPosition:t.payload});var dn=Object.freeze({__proto__:null,setUIToolbarScrollPosition:un});var pn={getToolbarScrollPosition:e=>e.ui.toolbarScrollPosition},fn={configuration:We,general:qe,shortcuts:lt,space:Ha,themes:rn,ui:Object.freeze({__proto__:null,actions:sn,initialState:cn,reducer:(e=cn,t)=>{switch(t.type){case $e:return Object.assign(Object.assign({},e),t.payload.ui);case on:return un(e,t);default:return Object.assign({},e)}},resolvers:dn,selectors:pn,Types:ln})};const mn=i.combineReducers({configuration:fn.configuration.reducer,general:fn.general.reducer,shortcuts:fn.shortcuts.reducer,space:fn.space.reducer,themes:fn.themes.reducer,ui:fn.ui.reducer}),gn=e=>i.createStore(mn,e,i.applyMiddleware(F.default)),Tn=x.default.createContext({});function hn(e,t,a,n){return new(a||(a=Promise))((function(r,o){function i(e){try{s(n.next(e))}catch(e){o(e)}}function l(e){try{s(n.throw(e))}catch(e){o(e)}}function s(e){var t;e.done?r(e.value):(t=e.value,t instanceof a?t:new a((function(e){e(t)}))).then(i,l)}s((n=n.apply(e,t||[])).next())}))}const En=x.default.createContext(null);var On={configuration:fn.configuration.actions,general:fn.general.actions,shortcuts:fn.shortcuts.actions,space:fn.space.actions,themes:fn.themes.actions,ui:fn.ui.actions};const{direction:_n}=a.interaction,Sn=()=>hn(void 0,void 0,void 0,(function*(){return yield Promise.resolve().then((function(){return function(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(a){if("default"!==a){var n=Object.getOwnPropertyDescriptor(e,a);Object.defineProperty(t,a,n.get?n:{enumerable:!0,get:function(){return e[a]}})}})),t.default=e,Object.freeze(t)}(D.default)}))}));var Rn={configuration:fn.configuration.selectors,general:fn.general.selectors,shortcuts:fn.shortcuts.selectors,space:fn.space.selectors,themes:fn.themes.selectors,ui:fn.ui.selectors};!function(e,t){void 0===t&&(t={});var a=t.insertAt;if(e&&"undefined"!=typeof document){var n=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css","top"===a&&n.firstChild?n.insertBefore(r,n.firstChild):n.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}}("@import url('https://fonts.googleapis.com/css?family=Ubuntu&display=swap');\n");const bn=u.createGlobalStyle`
2
2
  *,
3
3
  *:after,
4
4
  *:before {
@@ -29,7 +29,7 @@
29
29
  */
30
30
  overscroll-behavior-x: contain;
31
31
  }
32
- `,Ft=S.default.div`
32
+ `,An=k.default.div`
33
33
  height: 100%;
34
34
  min-height: ${e=>e.fullHeight?"100vh":"100%"};
35
35
  min-height: ${e=>e.fullHeight?"-webkit-fill-available":"100%"};
@@ -40,16 +40,16 @@
40
40
  outline: none;
41
41
  overflow: hidden;
42
42
 
43
- cursor: ${t=>t.transformMode===e.TRANSFORM_MODES.TRANSLATION||t.transformMode===e.TRANSFORM_MODES.ROTATION?"all-scroll":t.transformMode===e.TRANSFORM_MODES.SCALE?"ns-resize":"initial"};
43
+ cursor: ${e=>e.transformMode===t.TRANSFORM_MODES.TRANSLATION||e.transformMode===t.TRANSFORM_MODES.ROTATION?"all-scroll":e.transformMode===t.TRANSFORM_MODES.SCALE?"ns-resize":"initial"};
44
44
  user-select: ${e=>"ALL"!==e.transformMode?"none":"initial !important"};
45
45
  touch-action: ${e=>"ALL"!==e.transformMode?"none !important":"initial !important"};
46
46
  -webkit-user-drag: ${e=>"ALL"!==e.transformMode?"none":"initial !important"};
47
47
  -webkit-tap-highlight-color: ${e=>"ALL"!==e.transformMode?"rgba(0, 0, 0, 0)":"initial !important"};
48
- `;S.default.div`
48
+ `;k.default.div`
49
49
  outline: none;
50
50
  background: ${e=>{if(e.opaque){return`radial-gradient(\n ellipse at center,\n ${"dark"===e.theme.type?e.theme.backgroundColorTertiary:e.theme.backgroundColorPrimary} 0%,\n ${"dark"===e.theme.type?e.theme.backgroundColorPrimary:e.theme.backgroundColorTertiary} 100%)\n `}return"transparent"}};
51
- `;class Gt extends _.default.Component{constructor(e){super(e),this.state={hasError:!1}}static getDerivedStateFromError(e){return{hasError:!0}}componentDidCatch(e,t){}render(){return this.state.hasError?this.props.renderError?this.props.renderError:_.default.createElement("h1",null,"Something went wrong."):this.props.children}}const jt=S.default.div`
52
- background-color: ${({transparentUI:e,mouseOver:t,theme:a,planeOpacity:n})=>{if(e&&!t)return a.backgroundColorPrimaryAlpha;if(1!==n){const e=s.decomposeColor(a.backgroundColorPrimary);if(e){return`hsla(${e.hue}, ${e.saturation}%, ${e.lightness}%, ${n})`}return"transparent"}return a.backgroundColorPrimary}};
51
+ `;class Cn extends x.default.Component{constructor(e){super(e),this.state={hasError:!1}}static getDerivedStateFromError(e){return{hasError:!0}}componentDidCatch(e,t){}render(){return this.state.hasError?this.props.renderError?this.props.renderError:x.default.createElement("h1",null,"Something went wrong."):this.props.children}}const In=k.default.div`
52
+ background-color: ${({transparentUI:e,mouseOver:t,theme:a,planeOpacity:n})=>{if(e&&!t)return a.backgroundColorPrimaryAlpha;if(1!==n){const e=c.decomposeColor(a.backgroundColorPrimary);if(e){return`hsla(${e.hue}, ${e.saturation}%, ${e.lightness}%, ${n})`}return"transparent"}return a.backgroundColorPrimary}};
53
53
  box-shadow: ${({planeOpacity:e,theme:t})=>0===e?"none":t.boxShadowUmbra};
54
54
  color: ${({theme:e})=>e.colorPrimary};
55
55
  opacity: ${({show:e})=>e?"1":"0"};
@@ -68,7 +68,7 @@
68
68
  grid-template-rows: ${({planeControls:e})=>e?"56px auto":"auto"};
69
69
 
70
70
  transform-origin: 0 0 0;
71
- `,Vt=S.default.div`
71
+ `,vn=k.default.div`
72
72
  background-color: ${({planeOpacity:e,planeControls:t,theme:a})=>0===e?"transparent":t?a.backgroundColorDark:a.backgroundColorPrimary};
73
73
 
74
74
  position: absolute;
@@ -77,7 +77,7 @@
77
77
  height: 30px;
78
78
  width: 100px;
79
79
  opacity: 0.5;
80
- `,Bt=r.connect((e=>({stateGeneralTheme:Mt.themes.getGeneralTheme(e),stateConfiguration:Mt.configuration.getConfiguration(e)})),(e=>({})),null,{context:Nt})((t=>{const{stateGeneralTheme:a,stateConfiguration:n}=t,{controls:r,opacity:o}=n.elements.plane;return _.default.createElement(Vt,{theme:a,planeControls:r.show,planeOpacity:o,"data-plurid-entity":e.PLURID_ENTITY_PLANE_BRIDGE})})),kt=S.default.div`
80
+ `,Pn=o.connect((e=>({stateGeneralTheme:Rn.themes.getGeneralTheme(e),stateConfiguration:Rn.configuration.getConfiguration(e)})),(e=>({})),null,{context:Tn})((e=>{const{stateGeneralTheme:a,stateConfiguration:n}=e,{controls:r,opacity:o}=n.elements.plane;return x.default.createElement(vn,{theme:a,planeControls:r.show,planeOpacity:o,"data-plurid-entity":t.PLURID_ENTITY_PLANE_BRIDGE})})),Ln=k.default.div`
81
81
  background-color: ${({transparentUI:e,mouseOver:t,theme:a})=>e&&!t?"transparent":a.backgroundColorDark};
82
82
  box-shadow: ${({theme:e})=>e.boxShadowUmbraInset};
83
83
 
@@ -92,27 +92,27 @@
92
92
  @media (max-width: 800px) {
93
93
  grid-template-columns: 1fr 3fr 1fr;
94
94
  }
95
- `,Wt=S.default.div`
96
- `,Yt=S.default.div`
95
+ `,Un=k.default.div`
96
+ `,yn=k.default.div`
97
97
  width: 100%;
98
98
  height: 38px;
99
99
  position: relative;
100
- `,$t=S.default.div`
100
+ `,wn=k.default.div`
101
101
  display: grid;
102
102
  grid-template-columns: repeat(4, 30px);
103
103
  padding: 0 1rem;
104
- `,{inputs:{Textline:Ht}}=u.universal,Xt=r.connect((e=>({configuration:Mt.configuration.getConfiguration(e),generalTheme:Mt.themes.getGeneralTheme(e),interactionTheme:Mt.themes.getInteractionTheme(e)})),(e=>({})),null,{context:Nt})((t=>{const{plane:a,treePlane:r,mouseOver:o,configuration:i,generalTheme:l,interactionTheme:s}=t,{global:c,elements:u}=i,{transparentUI:d}=c,{pathbar:T}=u.plane.controls,{route:p,routeDivisions:f}=r,{protocol:E,host:m}=f,g=`${E}://${m.value}/gateway?plurid=`+encodeURIComponent(p),[O,h]=n.useState(f.plane.value),[S,R]=n.useState(!1),[A,I]=n.useState(!1);return _.default.createElement(kt,{theme:l,mouseOver:o,transparentUI:d,"data-plurid-entity":e.PLURID_ENTITY_PLANE_CONTROLS},_.default.createElement(Wt,null),_.default.createElement(Yt,null,_.default.createElement(Ht,{theme:s,text:S?g:O,atChange:e=>{if(h(e.target.value),T.onChange){const t=a.route.absolute;T.onChange(e,t)}},atKeyDown:e=>{if(A||I(!0),"Escape"===e.key&&I(!1),T.onKeyDown){const t=a.route.absolute;T.onKeyDown(e,t)}},ariaLabel:"Plurid Pathbar"})),_.default.createElement($t,null))})),zt=S.default.div`
104
+ `,{inputs:{Textline:Nn}}=d.universal,Dn=o.connect((e=>({configuration:Rn.configuration.getConfiguration(e),generalTheme:Rn.themes.getGeneralTheme(e),interactionTheme:Rn.themes.getInteractionTheme(e)})),(e=>({})),null,{context:Tn})((e=>{const{plane:a,treePlane:n,mouseOver:o,configuration:i,generalTheme:l,interactionTheme:s}=e,{global:c,elements:u}=i,{transparentUI:d}=c,{pathbar:p}=u.plane.controls,{route:f,routeDivisions:m}=n,{protocol:g,host:T}=m,h=`${g}://${T.value}/gateway?plurid=`+encodeURIComponent(f),[E,O]=r.useState(m.plane.value),[_,S]=r.useState(!1),[R,b]=r.useState(!1);return x.default.createElement(Ln,{theme:l,mouseOver:o,transparentUI:d,"data-plurid-entity":t.PLURID_ENTITY_PLANE_CONTROLS},x.default.createElement(Un,null),x.default.createElement(yn,null,x.default.createElement(Nn,{theme:s,text:_?h:E,atChange:e=>{if(O(e.target.value),p.onChange){const t=a.route.absolute;p.onChange(e,t)}},atKeyDown:e=>{if(R||b(!0),"Escape"===e.key&&b(!1),p.onKeyDown){const t=a.route.absolute;p.onKeyDown(e,t)}},ariaLabel:"Plurid Pathbar"})),x.default.createElement(wn,null))})),Mn=k.default.div`
105
105
  position: relative;
106
106
  font-family: initial !important;
107
107
  font-size: initial !important;
108
- `,Zt=t=>{const{children:a}=t,r=n.useRef(null);return _.default.createElement(zt,{ref:r,"data-plurid-entity":e.PLURID_ENTITY_PLANE_CONTENT},a)},Kt=r.connect((e=>({stateViewSize:Mt.space.getViewSize(e),stateGeneralTheme:Mt.themes.getGeneralTheme(e),stateConfiguration:Mt.configuration.getConfiguration(e)})),(e=>({dispatchUpdateSpaceTreePlane:t=>e(yt.space.updateSpaceTreePlane(t))})),null,{context:Nt})((a=>{const{planeID:r,plane:o,treePlane:i,children:s,stateViewSize:c,stateGeneralTheme:u,stateConfiguration:d,dispatchUpdateSpaceTreePlane:T}=a,{global:p,elements:f}=d,{transparentUI:E}=p,{controls:m,width:g,opacity:O}=f.plane,h=m.show;l.mathematics.numbers.checkIntegerNonUnit(g)||c.width;const S=n.useContext(vt);if(!S)return _.default.createElement(_.default.Fragment,null);const{planeRenderError:R}=S,[A,I]=n.useState(!1),C={};return _.default.createElement(jt,{suppressHydrationWarning:!0,theme:u,planeControls:h,planeOpacity:O,show:i.show,id:r,style:{width:"100%",transform:t.cleanTemplate(`\n translateX(${i.location.translateX}px)\n translateY(${i.location.translateY}px)\n translateZ(${i.location.translateZ}px)\n rotateX(${i.location.rotateX}deg)\n rotateY(${i.location.rotateY}deg)\n `)},onMouseEnter:()=>I(!0),onMouseLeave:()=>I(!1),transparentUI:E,mouseOver:A,"data-plurid-plane":r,"data-plurid-entity":e.PLURID_ENTITY_PLANE},i.show&&_.default.createElement(_.default.Fragment,null,i.parentPlaneID&&_.default.createElement(Bt,null),h&&_.default.createElement(Xt,{plane:o,treePlane:i,mouseOver:A}),R?_.default.createElement(Gt,{renderError:"boolean"!=typeof R?R:void 0},_.default.createElement(Zt,Object.assign({},C),s)):_.default.createElement(Zt,Object.assign({},C),s)))})),qt=e=>!!e&&("string"!=typeof e&&!e.url),Qt=S.default.div`
108
+ `,xn=e=>{const{children:a}=e,n=r.useRef(null);return x.default.createElement(Mn,{ref:n,"data-plurid-entity":t.PLURID_ENTITY_PLANE_CONTENT},a)},Fn=o.connect((e=>({stateViewSize:Rn.space.getViewSize(e),stateGeneralTheme:Rn.themes.getGeneralTheme(e),stateConfiguration:Rn.configuration.getConfiguration(e)})),(e=>({dispatchUpdateSpaceTreePlane:t=>e(On.space.updateSpaceTreePlane(t))})),null,{context:Tn})((e=>{const{planeID:n,plane:o,treePlane:i,children:l,stateViewSize:c,stateGeneralTheme:u,stateConfiguration:d,dispatchUpdateSpaceTreePlane:p}=e,{global:f,elements:m}=d,{transparentUI:g}=f,{controls:T,width:h,opacity:E}=m.plane,O=T.show;s.mathematics.numbers.checkIntegerNonUnit(h)||c.width;const _=r.useContext(En);if(!_)return x.default.createElement(x.default.Fragment,null);const{planeRenderError:S}=_,[R,b]=r.useState(!1),A={};return x.default.createElement(In,{suppressHydrationWarning:!0,theme:u,planeControls:O,planeOpacity:E,show:i.show,id:n,style:{width:"100%",transform:a.cleanTemplate(`\n translateX(${i.location.translateX}px)\n translateY(${i.location.translateY}px)\n translateZ(${i.location.translateZ}px)\n rotateX(${i.location.rotateX}deg)\n rotateY(${i.location.rotateY}deg)\n `)},onMouseEnter:()=>b(!0),onMouseLeave:()=>b(!1),transparentUI:g,mouseOver:R,"data-plurid-plane":n,"data-plurid-entity":t.PLURID_ENTITY_PLANE},i.show&&x.default.createElement(x.default.Fragment,null,i.parentPlaneID&&x.default.createElement(Pn,null),O&&x.default.createElement(Dn,{plane:o,treePlane:i,mouseOver:R}),S?x.default.createElement(Cn,{renderError:"boolean"!=typeof S?S:void 0},x.default.createElement(xn,Object.assign({},A),l)):x.default.createElement(xn,Object.assign({},A),l)))})),jn=e=>!!e&&("string"!=typeof e&&!e.url),kn=k.default.div`
109
109
  transform-style: preserve-3d;
110
- `,{getPlanesRegistrar:Jt,getRegisteredPlane:ea}=t.planes,ta=r.connect((e=>({})),(e=>({})),null,{context:Nt})((t=>{const{plane:a}=t,{location:r}=a,o=n.useContext(vt);if(!o)return _.default.createElement(_.default.Fragment,null);const{planesRegistrar:i,planeContext:l,planeContextValue:s,customPlane:c}=o,u=c,[d,T]=n.useState([]),p=e=>{if(!e.children)return;const t=Jt(i);e.children.map((e=>{if(!t)return;const a=e.sourceID,n=t.get(a);let r=_.default.createElement(_.default.Fragment,null);if(n){const t=n.component,a={plane:{value:n.route.absolute,planeID:e.planeID,parentPlaneID:e.parentPlaneID,fragments:n.route.fragments,parameters:n.route.parameters,query:n.route.query},route:{value:"",parameters:{},query:{}}},o={plurid:Object.assign({},a)},i=qt(t),c=qt(u);r=u?c?_.default.createElement(u,{key:e.planeID,plane:n,treePlane:e,planeID:e.planeID,location:e.location}):_.default.createElement(_.default.Fragment,null):i?_.default.createElement(Kt,{key:e.planeID,plane:n,treePlane:e,planeID:e.planeID,location:e.location},l?_.default.createElement(l.Provider,{value:s},_.default.createElement(t,Object.assign({},o))):_.default.createElement(t,Object.assign({},o))):_.default.createElement(_.default.Fragment,null),T((e=>[...e,r]))}e.children&&p(e)}))};n.useEffect((()=>{T([]),p(a)}),[JSON.stringify(a)]);const f=a.sourceID;if(!f)return _.default.createElement(_.default.Fragment,null);const E=ea(f,i);if(!E)return _.default.createElement(_.default.Fragment,null);const m=E.component,g={plane:{value:E.route.absolute,planeID:a.planeID,parentPlaneID:a.parentPlaneID,fragments:E.route.fragments,parameters:E.route.parameters,query:E.route.query},route:{value:"",parameters:{},query:{}}},O={plurid:Object.assign({},g)};return u?"function"!=typeof u?_.default.createElement(_.default.Fragment,null):_.default.createElement(Qt,{"data-plurid-entity":e.PLURID_ENTITY_ROOT},_.default.createElement(u,{plane:E,treePlane:a,planeID:a.planeID,location:r}),d):_.default.createElement(Qt,{"data-plurid-entity":e.PLURID_ENTITY_ROOT},_.default.createElement(Kt,{plane:E,treePlane:a,planeID:a.planeID,location:r},l?_.default.createElement(l.Provider,{value:s},_.default.createElement(m,Object.assign({},O))):_.default.createElement(m,Object.assign({},O))),d)})),aa=S.default.div`
110
+ `,{getPlanesRegistrar:Gn,getRegisteredPlane:Bn}=a.planes,Yn=o.connect((e=>({})),(e=>({})),null,{context:Tn})((e=>{const{plane:a}=e,{location:n}=a,o=r.useContext(En);if(!o)return x.default.createElement(x.default.Fragment,null);const{planesRegistrar:i,planeContext:l,planeContextValue:s,customPlane:c,matchedRoute:u}=o,d=c,[p,f]=r.useState([]),m=e=>{if(!e.children)return;const t=Gn(i);e.children.map((e=>{if(!t)return;const a=e.sourceID,n=t.get(a);let r=x.default.createElement(x.default.Fragment,null);if(n){const t=n.component,a={plane:{value:n.route.absolute,planeID:e.planeID,parentPlaneID:e.parentPlaneID,fragments:n.route.fragments,parameters:n.route.parameters,query:n.route.query},route:{value:(null==u?void 0:u.match.value)||"",parameters:(null==u?void 0:u.match.parameters)||{},query:(null==u?void 0:u.match.query)||{}}},o={plurid:Object.assign({},a)},i=jn(t),c=jn(d);r=d?c?x.default.createElement(d,{key:e.planeID,plane:n,treePlane:e,planeID:e.planeID,location:e.location}):x.default.createElement(x.default.Fragment,null):i?x.default.createElement(Fn,{key:e.planeID,plane:n,treePlane:e,planeID:e.planeID,location:e.location},l?x.default.createElement(l.Provider,{value:s},x.default.createElement(t,Object.assign({},o))):x.default.createElement(t,Object.assign({},o))):x.default.createElement(x.default.Fragment,null),f((e=>[...e,r]))}e.children&&m(e)}))};r.useEffect((()=>{f([]),m(a)}),[JSON.stringify(a)]);const g=a.sourceID;if(!g)return x.default.createElement(x.default.Fragment,null);const T=Bn(g,i);if(!T)return x.default.createElement(x.default.Fragment,null);const h=T.component,E={plane:{value:T.route.absolute,planeID:a.planeID,parentPlaneID:a.parentPlaneID,fragments:T.route.fragments,parameters:T.route.parameters,query:T.route.query},route:{value:(null==u?void 0:u.match.value)||"",parameters:(null==u?void 0:u.match.parameters)||{},query:(null==u?void 0:u.match.query)||{}}},O={plurid:Object.assign({},E)};return d?"function"!=typeof d?x.default.createElement(x.default.Fragment,null):x.default.createElement(kn,{"data-plurid-entity":t.PLURID_ENTITY_ROOT},x.default.createElement(d,{plane:T,treePlane:a,planeID:a.planeID,location:n}),p):x.default.createElement(kn,{"data-plurid-entity":t.PLURID_ENTITY_ROOT},x.default.createElement(Fn,{plane:T,treePlane:a,planeID:a.planeID,location:n},l?x.default.createElement(l.Provider,{value:s},x.default.createElement(h,Object.assign({},O))):x.default.createElement(h,Object.assign({},O))),p)})),Vn=k.default.div`
111
111
  transform-style: preserve-3d;
112
- `,na=S.default.div`
112
+ `,$n=k.default.div`
113
113
  background-color: ${({theme:e})=>e.backgroundColorTertiaryAlpha};
114
- height: ${({transformOriginSize:t})=>{switch(t){case e.SIZES.SMALL:return"5px";case e.SIZES.NORMAL:return"10px";case e.SIZES.LARGE:return"15px";default:return"10px"}}};
115
- width: ${({transformOriginSize:t})=>{switch(t){case e.SIZES.SMALL:return"5px";case e.SIZES.NORMAL:return"10px";case e.SIZES.LARGE:return"15px";default:return"10px"}}};
114
+ height: ${({transformOriginSize:e})=>{switch(e){case t.SIZES.SMALL:return"5px";case t.SIZES.NORMAL:return"10px";case t.SIZES.LARGE:return"15px";default:return"10px"}}};
115
+ width: ${({transformOriginSize:e})=>{switch(e){case t.SIZES.SMALL:return"5px";case t.SIZES.NORMAL:return"10px";case t.SIZES.LARGE:return"15px";default:return"10px"}}};
116
116
 
117
117
  position: absolute;
118
118
  z-index: 999;
@@ -120,7 +120,7 @@
120
120
  user-select: none;
121
121
  pointer-events: none;
122
122
  touch-action: none;
123
- `,ra=r.connect((e=>({stateConfiguration:Mt.configuration.getConfiguration(e),interactionTheme:Mt.themes.getInteractionTheme(e),animatedTransform:Mt.space.getAnimatedTransform(e),transformTime:Mt.space.getTransformTime(e),spaceScale:Mt.space.getScale(e),spaceRotationX:Mt.space.getRotationX(e),spaceRotationY:Mt.space.getRotationY(e),spaceTranslationX:Mt.space.getTranslationX(e),spaceTranslationY:Mt.space.getTranslationY(e),spaceTranslationZ:Mt.space.getTranslationZ(e),stateTree:Mt.space.getTree(e)})),(e=>({})),null,{context:Nt})((a=>{const{stateConfiguration:n,interactionTheme:r,animatedTransform:o,transformTime:i,spaceScale:l,spaceRotationX:s,spaceRotationY:c,spaceTranslationX:u,spaceTranslationY:d,spaceTranslationZ:T,stateTree:p}=a,{space:f}=n,{transformOrigin:E}=f,{show:m,size:g}=E,O=-1*u+("undefined"==typeof window?720:window.innerWidth/2),h=-1*d+("undefined"==typeof window?400:window.innerHeight/2),S=-1*T,R=g===e.SIZES.SMALL?2.5:g===e.SIZES.NORMAL?5:7.5;return _.default.createElement(aa,{suppressHydrationWarning:!0,style:{width:"100%",height:"undefined"!=typeof window?window.innerHeight+"px":"821px",transform:t.cleanTemplate(`\n translateX(${u}px)\n translateY(${d}px)\n translateZ(${T}px)\n scale(${l})\n rotateX(${s}deg)\n rotateY(${c}deg)\n `),transition:o?`transform ${i}ms ease-in-out`:"initial",transformOrigin:t.cleanTemplate(`\n ${O}px\n ${h}px\n ${S}px\n `)},"data-plurid-entity":e.PLURID_ENTITY_ROOTS},m&&_.default.createElement(na,{suppressHydrationWarning:!0,theme:r,transformOriginSize:g,style:{transform:t.cleanTemplate(`\n rotateY(${-c}deg)\n translateX(${O-R}px)\n translateY(${h-R}px)\n translateZ(${S+5}px)\n `),transformOrigin:t.cleanTemplate(`\n ${O-R}px\n ${h-R}px\n ${S}px\n `)},"data-plurid-entity":e.PLURID_ENTITY_TRANSFORM_ORIGIN}),p.map((e=>_.default.createElement(ta,{key:e.planeID,plane:e}))))})),oa=c.keyframes`
123
+ `,Xn=o.connect((e=>({stateConfiguration:Rn.configuration.getConfiguration(e),interactionTheme:Rn.themes.getInteractionTheme(e),animatedTransform:Rn.space.getAnimatedTransform(e),transformTime:Rn.space.getTransformTime(e),spaceScale:Rn.space.getScale(e),spaceRotationX:Rn.space.getRotationX(e),spaceRotationY:Rn.space.getRotationY(e),spaceTranslationX:Rn.space.getTranslationX(e),spaceTranslationY:Rn.space.getTranslationY(e),spaceTranslationZ:Rn.space.getTranslationZ(e),stateTree:Rn.space.getTree(e)})),(e=>({})),null,{context:Tn})((e=>{const{stateConfiguration:n,interactionTheme:r,animatedTransform:o,transformTime:i,spaceScale:l,spaceRotationX:s,spaceRotationY:c,spaceTranslationX:u,spaceTranslationY:d,spaceTranslationZ:p,stateTree:f}=e,{space:m}=n,{transformOrigin:g}=m,{show:T,size:h}=g,E=-1*u+("undefined"==typeof window?720:window.innerWidth/2),O=-1*d+("undefined"==typeof window?400:window.innerHeight/2),_=-1*p,S=h===t.SIZES.SMALL?2.5:h===t.SIZES.NORMAL?5:7.5;return x.default.createElement(Vn,{suppressHydrationWarning:!0,style:{width:"100%",height:"undefined"!=typeof window?window.innerHeight+"px":"821px",transform:a.cleanTemplate(`\n translateX(${u}px)\n translateY(${d}px)\n translateZ(${p}px)\n scale(${l})\n rotateX(${s}deg)\n rotateY(${c}deg)\n `),transition:o?`transform ${i}ms ease-in-out`:"initial",transformOrigin:a.cleanTemplate(`\n ${E}px\n ${O}px\n ${_}px\n `)},"data-plurid-entity":t.PLURID_ENTITY_ROOTS},T&&x.default.createElement($n,{suppressHydrationWarning:!0,theme:r,transformOriginSize:h,style:{transform:a.cleanTemplate(`\n rotateY(${-c}deg)\n translateX(${E-S}px)\n translateY(${O-S}px)\n translateZ(${_+5}px)\n `),transformOrigin:a.cleanTemplate(`\n ${E-S}px\n ${O-S}px\n ${_}px\n `)},"data-plurid-entity":t.PLURID_ENTITY_TRANSFORM_ORIGIN}),f.map((e=>x.default.createElement(Yn,{key:e.planeID,plane:e}))))})),Wn=u.keyframes`
124
124
  from {
125
125
  opacity: 0%;
126
126
  }
@@ -128,7 +128,7 @@
128
128
  to {
129
129
  opacity: 100%;
130
130
  }
131
- `,ia=e=>c.css`${oa} ${e}ms linear 100ms forwards`,la=S.default.div`
131
+ `,zn=e=>u.css`${Wn} ${e}ms linear 100ms forwards`,Hn=k.default.div`
132
132
  position: relative;
133
133
  height: 100%;
134
134
  overflow: hidden;
@@ -139,12 +139,12 @@
139
139
 
140
140
  /* TOFIX */
141
141
  /* opacity: ${({fadeInTime:e})=>e?"0":"1"};
142
- animation: ${({isMounted:e,fadeInTime:t})=>e&&t?ia(t):""}; */
143
- `,sa=r.connect((e=>({stateConfiguration:Mt.configuration.getConfiguration(e),stateGeneralTheme:Mt.themes.getGeneralTheme(e)})),(e=>({})),null,{context:Nt})((t=>{const{stateConfiguration:a,stateGeneralTheme:r}=t,{space:o}=a,{opaque:i,fadeInTime:l}=o,[s,c]=n.useState(!1);return n.useEffect((()=>{c(!0)}),[]),_.default.createElement(la,{theme:r,opaque:i,isMounted:s,fadeInTime:l,"data-plurid-entity":e.PLURID_ENTITY_SPACE},_.default.createElement(ra,null))}));var ca;!function(e){e.NONE="NONE",e.UNIVERSES="UNIVERSES",e.MORE="MORE"}(ca||(ca={}));const ua=S.default.div`
142
+ animation: ${({isMounted:e,fadeInTime:t})=>e&&t?zn(t):""}; */
143
+ `,Zn=o.connect((e=>({stateConfiguration:Rn.configuration.getConfiguration(e),stateGeneralTheme:Rn.themes.getGeneralTheme(e)})),(e=>({})),null,{context:Tn})((e=>{const{stateConfiguration:a,stateGeneralTheme:n}=e,{space:o}=a,{opaque:i,fadeInTime:l}=o,[s,c]=r.useState(!1);return r.useEffect((()=>{c(!0)}),[]),x.default.createElement(Hn,{theme:n,opaque:i,isMounted:s,fadeInTime:l,"data-plurid-entity":t.PLURID_ENTITY_SPACE},x.default.createElement(Xn,null))}));var Kn;!function(e){e.NONE="NONE",e.UNIVERSES="UNIVERSES",e.MORE="MORE"}(Kn||(Kn={}));const qn=k.default.div`
144
144
  bottom: ${({conceal:e,mouseIn:t})=>e?t?"-5px":"-55px":"-5px"};
145
- pointer-events: ${({showMenu:e})=>e!==ca.NONE?"all":"none"};
145
+ pointer-events: ${({showMenu:e})=>e!==Kn.NONE?"all":"none"};
146
146
  opacity: ${({fadeInTime:e})=>e?"0":"1"};
147
- animation: ${({fadeInTime:e,isMounted:t})=>t&&e?ia(e):""};
147
+ animation: ${({fadeInTime:e,isMounted:t})=>t&&e?zn(e):""};
148
148
 
149
149
  display: grid;
150
150
  position: absolute;
@@ -153,7 +153,7 @@
153
153
  height: 75px;
154
154
  z-index: 9999;
155
155
  transition: bottom 300ms ease-in-out;
156
- `,da=S.default.div`
156
+ `,Qn=k.default.div`
157
157
  color: ${({theme:e})=>e.colorPrimary};
158
158
  background-color: ${({theme:e,transparentUI:t})=>t?e.backgroundColorPrimaryAlpha:e.backgroundColorSecondary};
159
159
  box-shadow: ${({theme:e})=>e.boxShadowUmbra};
@@ -186,7 +186,7 @@
186
186
  right: 0;
187
187
  height: 20px;
188
188
  }
189
- `,Ta=S.default.div`
189
+ `,Jn=k.default.div`
190
190
  padding: ${({button:e,showIcons:t,showTransformButtons:a})=>e||t&&!a?"0":"0 7px"};
191
191
  background-color: ${({active:e,theme:t})=>e?t.backgroundColorTertiary:"transparent"};
192
192
  min-width: ${({button:e})=>e?"40px":"70px"};
@@ -201,7 +201,7 @@
201
201
  :hover {
202
202
  background: ${({theme:e})=>e.backgroundColorTertiary};
203
203
  }
204
- `,pa=S.default.div`
204
+ `,er=k.default.div`
205
205
  width: 40px;
206
206
  display: grid;
207
207
  place-content: center;
@@ -211,7 +211,7 @@
211
211
  width: 15px;
212
212
  fill: white;
213
213
  } */
214
- `,fa=S.default.div`
214
+ `,tr=k.default.div`
215
215
  position: absolute;
216
216
  bottom: 75px;
217
217
  max-height: 250px;
@@ -230,7 +230,7 @@
230
230
  padding: 0;
231
231
  list-style: none;
232
232
  }
233
- `;S.default.div`
233
+ `;k.default.div`
234
234
  display: flex;
235
235
  justify-content: space-between;
236
236
  align-items: center;
@@ -239,7 +239,7 @@
239
239
  margin-bottom: ${e=>e.afterline?"30px":"10px"};
240
240
 
241
241
  ${e=>e.afterline?"\n ::after {\n position: absolute;\n content: '';\n left: 0;\n right: 0;\n bottom: -15px;\n height: 1px;\n background-color: white;\n }\n ":""};
242
- `;const Ea=S.default.div`
242
+ `;const ar=k.default.div`
243
243
  max-height: 210px;
244
244
  overflow: scroll;
245
245
  padding: 0 5px;
@@ -254,7 +254,7 @@
254
254
  h5::first-child {
255
255
  margin-top: 0;
256
256
  }
257
- `;S.default.li`
257
+ `;k.default.li`
258
258
  margin: 10px 0;
259
259
  padding: 10px 20px;
260
260
  border-radius: 100px;
@@ -267,7 +267,7 @@
267
267
  background-color: ${e=>e.theme.backgroundColorTertiary};
268
268
  box-shadow: ${e=>e.active?"inset 0px -1px 6px 0px "+e.theme.boxShadowUmbraColor:e.theme.boxShadowUmbra};
269
269
  }
270
- `;const ma=r.connect((e=>({interactionTheme:Mt.themes.getInteractionTheme(e),activeUniverseID:Mt.space.getActiveUniverseID(e)})),(e=>({dispatchSetActiveUniverse:t=>e(yt.space.setActiveUniverse(t))})),null,{context:Nt})((e=>{const{interactionTheme:t,activeUniverseID:a,dispatchSetActiveUniverse:n}=e;return _.default.createElement(fa,{theme:t},_.default.createElement(Ea,null))})),ga=S.default.div`
270
+ `;const nr=o.connect((e=>({interactionTheme:Rn.themes.getInteractionTheme(e),activeUniverseID:Rn.space.getActiveUniverseID(e)})),(e=>({dispatchSetActiveUniverse:t=>e(On.space.setActiveUniverse(t))})),null,{context:Tn})((e=>{const{interactionTheme:t,activeUniverseID:a,dispatchSetActiveUniverse:n}=e;return x.default.createElement(tr,{theme:t},x.default.createElement(ar,null))})),rr=k.default.div`
271
271
  h5 {
272
272
  font-size: 1rem;
273
273
  margin: 0;
@@ -281,7 +281,7 @@
281
281
  background-color: ${e=>e.transparentUI&&e.mouseOver?e.theme.backgroundColorSecondary:"transparent"};
282
282
  box-shadow: ${e=>e.transparentUI&&e.mouseOver?e.theme.boxShadowUmbra:"none"};
283
283
  color: ${e=>e.theme.colorPrimary};
284
- `,_a=S.default.div`
284
+ `,or=k.default.div`
285
285
  user-select: none;
286
286
  cursor: pointer;
287
287
  padding: 0.5rem;
@@ -292,8 +292,8 @@
292
292
  :hover {
293
293
  border-bottom: 1px solid ${e=>e.theme.colorPrimary};
294
294
  }
295
- `,Oa=S.default.div`
296
- `,{typography:{Heading:ha}}=u.universal,Sa=r.connect((e=>({interactionTheme:Mt.themes.getInteractionTheme(e),configuration:Mt.configuration.getConfiguration(e)})),(e=>({})),null,{context:Nt})((e=>{const{heading:t,items:a,toggled:r,toggle:o,interactionTheme:i,configuration:l}=e,{global:s}=l,{transparentUI:c}=s,[u,d]=n.useState(!1);return _.default.createElement(ga,{theme:i,onMouseEnter:()=>d(!0),onMouseLeave:()=>d(!1),transparentUI:c,mouseOver:u,toggled:r},_.default.createElement(_a,{theme:i,onClick:()=>o()},_.default.createElement(ha,{theme:i,type:"h5"},t)),r&&_.default.createElement(Oa,null,a))})),Ra=S.default.div`
295
+ `,ir=k.default.div`
296
+ `,{typography:{Heading:lr}}=d.universal,sr=o.connect((e=>({interactionTheme:Rn.themes.getInteractionTheme(e),configuration:Rn.configuration.getConfiguration(e)})),(e=>({})),null,{context:Tn})((e=>{const{heading:t,items:a,toggled:n,toggle:o,interactionTheme:i,configuration:l}=e,{global:s}=l,{transparentUI:c}=s,[u,d]=r.useState(!1);return x.default.createElement(rr,{theme:i,onMouseEnter:()=>d(!0),onMouseLeave:()=>d(!1),transparentUI:c,mouseOver:u,toggled:n},x.default.createElement(or,{theme:i,onClick:()=>o()},x.default.createElement(lr,{theme:i,type:"h5"},t)),n&&x.default.createElement(ir,null,a))})),cr=k.default.div`
297
297
  position: absolute;
298
298
  bottom: 75px;
299
299
  height: 280px;
@@ -307,7 +307,7 @@
307
307
 
308
308
  background-color: ${e=>e.transparentUI?e.theme.backgroundColorPrimaryAlpha:e.theme.backgroundColorSecondary};
309
309
  box-shadow: ${e=>e.theme.boxShadowUmbra};
310
- `,Aa=S.default.div`
310
+ `,ur=k.default.div`
311
311
  display: flex;
312
312
  justify-content: space-between;
313
313
  align-items: center;
@@ -318,7 +318,7 @@
318
318
  margin-bottom: ${e=>e.last?"0":e.afterline?"30px":"10px"};
319
319
 
320
320
  ${e=>e.afterline?`\n ::after {\n position: absolute;\n content: '';\n left: 0;\n right: 0;\n bottom: -15px;\n height: 1px;\n background-color: ${e.theme?e.theme.colorPrimary:"white"};\n }\n `:""};
321
- `,Ia=S.default.div`
321
+ `,dr=k.default.div`
322
322
  height: 240px;
323
323
  overflow: scroll;
324
324
  padding: 0 5px;
@@ -333,12 +333,12 @@
333
333
  h5::first-child {
334
334
  margin-top: 0;
335
335
  }
336
- `,{inputs:{Dropdown:Ca}}=u.universal,ba=r.connect((e=>({stateLanguage:Mt.configuration.getConfiguration(e).global.language,interactionTheme:Mt.themes.getInteractionTheme(e),configuration:Mt.configuration.getConfiguration(e)})),(e=>({dispatchSetConfigurationThemeGeneralAction:t=>e(yt.configuration.setConfigurationThemeGeneralAction(t)),dispatchSetConfigurationThemeInteractionAction:t=>e(yt.configuration.setConfigurationThemeInteractionAction(t)),dispatchSetConfigurationLanguage:t=>e(yt.configuration.setConfigurationLanguageAction(t)),dispatchSetGeneralTheme:t=>e(yt.themes.setGeneralTheme(t)),dispatchSetInteractionTheme:t=>e(yt.themes.setInteractionTheme(t))})),null,{context:Nt})((a=>{const{stateLanguage:r,interactionTheme:o,configuration:i,dispatchSetGeneralTheme:l,dispatchSetInteractionTheme:s,dispatchSetConfigurationThemeGeneralAction:c,dispatchSetConfigurationThemeInteractionAction:u,dispatchSetConfigurationLanguage:d}=a,T=i.global.theme,[p,f]=n.useState("object"==typeof T?T.general:T),[E,m]=n.useState("object"==typeof T?T.interaction:T);return n.useEffect((()=>{"object"==typeof T?(f(T.general),m(T.interaction)):(f(T),m(T))}),[T]),_.default.createElement(_.default.Fragment,null,_.default.createElement(Aa,null,t.internatiolate(r,e.internationalization.fields.toolbarDrawerGlobalGeneralTheme),_.default.createElement(Ca,{selectables:Object.keys(h.default),selected:"string"==typeof p?p:"",atSelect:e=>(e=>{l(h.default[e]),c(e)})(e),theme:o,filterable:!0,heightItems:3,width:90,style:{fontSize:"0.8rem"}})),_.default.createElement(Aa,null,t.internatiolate(r,e.internationalization.fields.toolbarDrawerGlobalInteractionTheme),_.default.createElement(Ca,{selectables:Object.keys(h.default),selected:"string"==typeof E?E:"",atSelect:e=>(e=>{s(h.default[e]),u(e)})(e),theme:o,heightItems:3,filterable:!0,width:90,style:{fontSize:"0.8rem"}})),_.default.createElement(Aa,{last:!0},t.internatiolate(r,e.internationalization.fields.toolbarDrawerGlobalLanguage),_.default.createElement(Ca,{selectables:e.internationalization.languages,selected:r,atSelect:e=>{d(e)},theme:o,heightItems:3,width:90,style:{fontSize:"0.8rem"}})))})),{inputs:{Switch:La}}=u.universal,Ua=r.connect((e=>({stateLanguage:Mt.configuration.getConfiguration(e).global.language,interactionTheme:Mt.themes.getInteractionTheme(e),configuration:Mt.configuration.getConfiguration(e)})),(e=>({dispatchToggleConfigurationSpaceTransformMultimode:t=>e(yt.configuration.toggleConfigurationSpaceTransformMultimode(t)),dispatchSetConfigurationSpaceTransformTouch:t=>e(yt.configuration.setConfigurationSpaceTransformTouch(t)),dispatchSetConfigurationSpaceTransformLocks:t=>e(yt.configuration.setConfigurationSpaceTransformLocks(t))})),null,{context:Nt})((a=>{const{stateLanguage:n,interactionTheme:r,configuration:o,dispatchToggleConfigurationSpaceTransformMultimode:i,dispatchSetConfigurationSpaceTransformTouch:l,dispatchSetConfigurationSpaceTransformLocks:s}=a,{transformMultimode:c,transformLocks:u,transformTouch:d}=o.space;return _.default.createElement(_.default.Fragment,null,_.default.createElement(Aa,null,_.default.createElement("div",null,t.internatiolate(n,e.internationalization.fields.toolbarDrawerTransformMultiModeTransform)),_.default.createElement(La,{theme:r,checked:c,atChange:()=>i(!c),exclusive:!0,level:2})),_.default.createElement(Aa,null,_.default.createElement("div",null,t.internatiolate(n,e.internationalization.fields.toolbarDrawerTransformAllowRotationX)),_.default.createElement(La,{theme:r,checked:u.rotationX,atChange:()=>s("rotationX"),exclusive:!0,level:2})),_.default.createElement(Aa,null,_.default.createElement("div",null,t.internatiolate(n,e.internationalization.fields.toolbarDrawerTransformAllowRotationY)),_.default.createElement(La,{theme:r,checked:u.rotationY,atChange:()=>s("rotationY"),exclusive:!0,level:2})),_.default.createElement(Aa,null,_.default.createElement("div",null,t.internatiolate(n,e.internationalization.fields.toolbarDrawerTransformAllowTranslationX)),_.default.createElement(La,{theme:r,checked:u.translationX,atChange:()=>s("translationX"),exclusive:!0,level:2})),_.default.createElement(Aa,null,_.default.createElement("div",null,t.internatiolate(n,e.internationalization.fields.toolbarDrawerTransformAllowTranslationY)),_.default.createElement(La,{theme:r,checked:u.translationY,atChange:()=>s("translationY"),exclusive:!0,level:2})),_.default.createElement(Aa,null,_.default.createElement("div",null,t.internatiolate(n,e.internationalization.fields.toolbarDrawerTransformAllowTranslationZ)),_.default.createElement(La,{theme:r,checked:u.translationZ,atChange:()=>s("translationZ"),exclusive:!0,level:2})),_.default.createElement(Aa,null,_.default.createElement("div",null,t.internatiolate(n,e.internationalization.fields.toolbarDrawerTransformAllowScale)),_.default.createElement(La,{theme:r,checked:u.scale,atChange:()=>s("scale"),exclusive:!0,level:2})),_.default.createElement(Aa,{last:!0},_.default.createElement("div",null,t.internatiolate(n,e.internationalization.fields.toolbarDrawerTransformTouchTransform),": ",d===e.TRANSFORM_TOUCHES.PAN?"pan":"swipe"),_.default.createElement(La,{theme:r,checked:d===e.TRANSFORM_TOUCHES.PAN,atChange:()=>d===e.TRANSFORM_TOUCHES.PAN?l(e.TRANSFORM_TOUCHES.SWIPE):l(e.TRANSFORM_TOUCHES.PAN),level:2})))})),{inputs:{Dropdown:Na,Switch:Pa,Slider:va}}=u.universal,ya=r.connect((e=>({interactionTheme:Mt.themes.getInteractionTheme(e),configuration:Mt.configuration.getConfiguration(e)})),(e=>({dispatchSetConfigurationPlaneOpacity:t=>e(yt.configuration.setConfigurationPlaneOpacity(t)),dispatchToggleConfigurationSpaceTransparentUI:()=>e(yt.configuration.toggleConfigurationSpaceTransparentUI()),dispatchToggleConfigurationSpaceShowTransformOrigin:()=>e(yt.configuration.toggleConfigurationSpaceShowTransformOrigin()),dispatchSetConfigurationSpaceTransformOriginSize:t=>e(yt.configuration.setConfigurationSpaceTransformOriginSize(t)),dispatchSetConfigurationSpaceLayoutType:t=>e(yt.configuration.setConfigurationSpaceLayoutType(t))})),null,{context:Nt})((a=>{const{interactionTheme:n,configuration:r,dispatchSetConfigurationPlaneOpacity:o,dispatchToggleConfigurationSpaceTransparentUI:i,dispatchToggleConfigurationSpaceShowTransformOrigin:l,dispatchSetConfigurationSpaceTransformOriginSize:s,dispatchSetConfigurationSpaceLayoutType:c}=a,{global:u,space:d,elements:T}=r,{transparentUI:p,language:f}=u,{layout:E,transformOrigin:m}=d,g=e.layoutNames[E.type],{show:O,size:h}=m,S=T.plane.opacity;return _.default.createElement(_.default.Fragment,null,_.default.createElement(Aa,null,t.internatiolate(f,e.internationalization.fields.toolbarDrawerSpaceTransparentUserInterface),_.default.createElement(Pa,{checked:p,atChange:()=>i(),exclusive:!0,level:2,theme:n})),_.default.createElement(Aa,null,t.internatiolate(f,e.internationalization.fields.toolbarDrawerSpaceShowTransformOrigin),_.default.createElement(Pa,{checked:O,atChange:()=>l(),exclusive:!0,level:2,theme:n})),_.default.createElement(Aa,null,t.internatiolate(f,e.internationalization.fields.toolbarDrawerSpaceTransformOriginSize),_.default.createElement(Na,{selectables:["small","normal","large"],selected:h.toLowerCase(),atSelect:t=>{const a=t.toUpperCase();a!==e.SIZES.SMALL&&a!==e.SIZES.NORMAL&&a!==e.SIZES.LARGE||s(a)},heightItems:3,theme:n})),_.default.createElement(Aa,null,t.internatiolate(f,e.internationalization.fields.toolbarDrawerSpacePlaneOpacity),_.default.createElement(va,{value:S,max:1,min:0,step:.1,defaultValue:100,atChange:e=>o(e),thumbSize:"large",level:2,theme:n})),_.default.createElement(Aa,{last:!0},t.internatiolate(f,e.internationalization.fields.toolbarDrawerSpaceLayoutType),_.default.createElement(Na,{selectables:[...Object.values(e.layoutNames)],selected:g,atSelect:e=>{const t=e.toUpperCase().replace(/\s/g,"_");c(t)},heightItems:3,theme:n,width:100})))})),{inputs:{Switch:wa}}=u.universal,Da=r.connect((e=>({stateLanguage:Mt.configuration.getConfiguration(e).global.language,interactionTheme:Mt.themes.getInteractionTheme(e),configuration:Mt.configuration.getConfiguration(e),viewSize:Mt.space.getViewSize(e)})),(e=>({dispatchToggleConfigurationToolbarConceal:()=>e(yt.configuration.toggleConfigurationToolbarConceal()),dispatchToggleConfigurationToolbarTransformIcons:()=>e(yt.configuration.toggleConfigurationToolbarTransformIcons()),dispatchToggleConfigurationToolbarTransformButtons:()=>e(yt.configuration.toggleConfigurationToolbarTransformButtons()),dispatchToggleConfigurationToolbarOpaque:()=>e(yt.configuration.toggleConfigurationToolbarOpaque())})),null,{context:Nt})((a=>{const{stateLanguage:r,interactionTheme:o,configuration:i,viewSize:l,dispatchToggleConfigurationToolbarConceal:s,dispatchToggleConfigurationToolbarTransformIcons:c,dispatchToggleConfigurationToolbarTransformButtons:u,dispatchToggleConfigurationToolbarOpaque:d}=a,{toolbar:T}=i.elements,{conceal:p,opaque:f,transformIcons:E,transformButtons:m}=T,[g,O]=n.useState(!1);return n.useEffect((()=>{l.width<800?O(!0):O(!1)}),[l.width]),_.default.createElement(_.default.Fragment,null,_.default.createElement(Aa,null,_.default.createElement("div",null,t.internatiolate(r,e.internationalization.fields.toolbarDrawerToolbarAlwaysOpaque)),_.default.createElement(wa,{theme:o,checked:f,atChange:()=>d(),exclusive:!0,level:2})),_.default.createElement(Aa,null,_.default.createElement("div",null,t.internatiolate(r,e.internationalization.fields.toolbarDrawerToolbarShowTransformIcons)),_.default.createElement(wa,{theme:o,checked:E,atChange:()=>c(),exclusive:!0,level:2})),!g&&_.default.createElement(Aa,null,_.default.createElement("div",null,t.internatiolate(r,e.internationalization.fields.toolbarDrawerToolbarShowTransformArrows)),_.default.createElement(wa,{theme:o,checked:m,atChange:()=>u(),exclusive:!0,level:2})),_.default.createElement(Aa,{last:!0},_.default.createElement("div",null,t.internatiolate(r,e.internationalization.fields.toolbarDrawerToolbarConcealToolbar)),_.default.createElement(wa,{theme:o,checked:p,atChange:()=>s(),exclusive:!0,level:2})))})),{inputs:{Switch:Ma}}=u.universal,xa=r.connect((e=>({stateLanguage:Mt.configuration.getConfiguration(e).global.language,interactionTheme:Mt.themes.getInteractionTheme(e),configuration:Mt.configuration.getConfiguration(e)})),(e=>({dispatchToggleConfigurationViewcubeHide:t=>e(yt.configuration.toggleConfigurationViewcubeHide(t)),dispatchToggleConfigurationViewcubeButtons:t=>e(yt.configuration.toggleConfigurationViewcubeButtons(t)),dispatchToggleConfigurationViewcubeOpaque:t=>e(yt.configuration.toggleConfigurationViewcubeOpaque(t)),dispatchToggleConfigurationViewcubeConceal:()=>e(yt.configuration.toggleConfigurationViewcubeConceal())})),null,{context:Nt})((a=>{const{stateLanguage:n,interactionTheme:r,configuration:o,dispatchToggleConfigurationViewcubeHide:i,dispatchToggleConfigurationViewcubeButtons:l,dispatchToggleConfigurationViewcubeOpaque:s,dispatchToggleConfigurationViewcubeConceal:c}=a,{viewcube:u}=o.elements,{show:d,buttons:T,opaque:p,conceal:f}=u;return _.default.createElement(_.default.Fragment,null,_.default.createElement(Aa,{last:!d},_.default.createElement("div",null,t.internatiolate(n,e.internationalization.fields.toolbarDrawerViewcubeShowViewcube)),_.default.createElement(Ma,{theme:r,checked:d,atChange:()=>i(!d),exclusive:!0,level:2})),d&&_.default.createElement(_.default.Fragment,null,_.default.createElement(Aa,null,_.default.createElement("div",null,t.internatiolate(n,e.internationalization.fields.toolbarDrawerViewcubeShowTransformButtons)),_.default.createElement(Ma,{theme:r,checked:T,atChange:()=>l(!T),exclusive:!0,level:2})),_.default.createElement(Aa,null,_.default.createElement("div",null,t.internatiolate(n,e.internationalization.fields.toolbarDrawerViewcubeAlwaysOpaque)),_.default.createElement(Ma,{theme:r,checked:p,atChange:()=>s(!p),exclusive:!0,level:2})),_.default.createElement(Aa,{last:!0},_.default.createElement("div",null,t.internatiolate(n,e.internationalization.fields.toolbarDrawerViewcubeConcealViewcube)),_.default.createElement(Ma,{theme:r,checked:f,atChange:()=>c(),exclusive:!0,level:2}))))})),{inputs:{Slider:Fa}}=u.universal,Ga=r.connect((e=>({stateLanguage:Mt.configuration.getConfiguration(e).global.language,stateConfiguration:Mt.configuration.getConfiguration(e),stateInteractionTheme:Mt.themes.getInteractionTheme(e)})),(e=>({dispatchSetConfigurationSpaceCullingDistance:t=>e(yt.configuration.setConfigurationSpaceCullingDistance(t))})),null,{context:Nt})((a=>{const{stateLanguage:r,stateConfiguration:o,stateInteractionTheme:i,dispatchSetConfigurationSpaceCullingDistance:l}=a,{cullingDistance:s}=o.space,[c,u]=n.useState(s),d=T.useDebouncedCallback((e=>{l(e)}),300);return _.default.createElement(_.default.Fragment,null,_.default.createElement(Aa,null,_.default.createElement("div",null,t.internatiolate(r,e.internationalization.fields.toolbarDrawerTechnicalCullingDistance)),_.default.createElement(Fa,{theme:i,value:c,atChange:e=>{u(e),d(e)},min:1e3,max:5e3,defaultValue:1500})))})),ja=r.connect((e=>({interactionTheme:Mt.themes.getInteractionTheme(e),configuration:Mt.configuration.getConfiguration(e)})),(e=>({})),null,{context:Nt})((a=>{const{interactionTheme:n,configuration:r}=a,{global:o}=r,{language:i}=o;return _.default.createElement(_.default.Fragment,null,e.defaultShortcuts.map(((a,r)=>{const{type:o}=a,l=e.shortcutsNames[o],{name:s,internationalizedKey:c,key:u,modifier:d}=l,T=Array.isArray(d)?d.reduce(((e,t)=>e+" + "+t))+" +":"string"==typeof d?d+" +":"",p=t.internatiolate(i,s),f=u,E=c?t.internatiolate(i,f):u;return _.default.createElement(Aa,{key:s,theme:n,afterline:"TURN_DOWN"===o||"TOGGLE_ROTATE"===o||"TOGGLE_TRANSLATE"===o,last:r===e.defaultShortcuts.length-1},_.default.createElement("div",null,p),_.default.createElement("div",null,T," ",E))})))})),Va={GLOBAL:{name:e.internationalization.fields.toolbarDrawerGlobalTitle,drawer:e.TOOLBAR_DRAWERS.GLOBAL,component:_.default.createElement(ba,null)},TRANSFORM:{name:e.internationalization.fields.toolbarDrawerTransformTitle,drawer:e.TOOLBAR_DRAWERS.TRANSFORM,component:_.default.createElement(Ua,null)},SPACE:{name:e.internationalization.fields.toolbarDrawerSpaceTitle,drawer:e.TOOLBAR_DRAWERS.SPACE,component:_.default.createElement(ya,null)},TOOLBAR:{name:e.internationalization.fields.toolbarDrawerToolbarTitle,drawer:e.TOOLBAR_DRAWERS.TOOLBAR,component:_.default.createElement(Da,null)},VIEWCUBE:{name:e.internationalization.fields.toolbarDrawerViewcubeTitle,drawer:e.TOOLBAR_DRAWERS.VIEWCUBE,component:_.default.createElement(xa,null)},TECHNICAL:{name:e.internationalization.fields.toolbarDrawerTechnicalTitle,drawer:e.TOOLBAR_DRAWERS.TECHNICAL,component:_.default.createElement(Ga,null)},SHORTCUTS:{name:e.internationalization.fields.toolbarDrawerShortcutsTitle,drawer:e.TOOLBAR_DRAWERS.SHORTCUTS,component:_.default.createElement(ja,null)}},Ba=Object.values(Va),ka=r.connect((e=>({stateLanguage:Mt.configuration.getConfiguration(e).global.language,stateInteractionTheme:Mt.themes.getInteractionTheme(e),stateConfiguration:Mt.configuration.getConfiguration(e),stateToolbarMenuScrollPosition:Mt.ui.getToolbarScrollPosition(e)})),(e=>({dispatchToggleConfigurationToolbarToggleDrawer:t=>e(yt.configuration.toggleConfigurationToolbarToggleDrawer(t)),dispatchSetUIToolbarScrollPosition:t=>e(yt.ui.setUIToolbarScrollPosition(t))})),null,{context:Nt})((e=>{const{stateLanguage:a,stateInteractionTheme:r,stateConfiguration:o,stateToolbarMenuScrollPosition:i,dispatchToggleConfigurationToolbarToggleDrawer:l,dispatchSetUIToolbarScrollPosition:s}=e,{global:c,elements:u}=o,{transparentUI:d}=c,{toolbar:p}=u,{drawers:f,toggledDrawers:E}=p,m=(e=>{if(0===e.length||e.includes("ALL"))return Ba;const t=[];for(const a of e){const e=Va[a];t.push(e)}return t})(f),g=n.useRef(null),O=T.useDebouncedCallback((e=>{if(g.current){const e=g.current.scrollTop;s(e)}}),100);return n.useEffect((()=>(g.current&&g.current.addEventListener("wheel",O),()=>{g.current&&g.current.removeEventListener("wheel",O)})),[g.current]),n.useEffect((()=>{g.current&&(g.current.scrollTop=i)}),[i,g.current]),_.default.createElement(Ra,{theme:r,transparentUI:d},_.default.createElement(Ia,{ref:g},m.map((e=>{const{name:n,drawer:r,component:o}=e,i=t.internatiolate(a,n);return _.default.createElement(Sa,{key:n,heading:i,items:_.default.createElement(_.default.Fragment,null,o),toggled:E.includes("ALL")||E.includes(r),toggle:()=>l(r)})}))))})),Wa=S.default.div`
336
+ `,{inputs:{Dropdown:pr}}=d.universal,fr=o.connect((e=>({stateLanguage:Rn.configuration.getConfiguration(e).global.language,interactionTheme:Rn.themes.getInteractionTheme(e),configuration:Rn.configuration.getConfiguration(e)})),(e=>({dispatchSetConfigurationThemeGeneralAction:t=>e(On.configuration.setConfigurationThemeGeneralAction(t)),dispatchSetConfigurationThemeInteractionAction:t=>e(On.configuration.setConfigurationThemeInteractionAction(t)),dispatchSetConfigurationLanguage:t=>e(On.configuration.setConfigurationLanguageAction(t)),dispatchSetGeneralTheme:t=>e(On.themes.setGeneralTheme(t)),dispatchSetInteractionTheme:t=>e(On.themes.setInteractionTheme(t))})),null,{context:Tn})((e=>{const{stateLanguage:n,interactionTheme:o,configuration:i,dispatchSetGeneralTheme:l,dispatchSetInteractionTheme:s,dispatchSetConfigurationThemeGeneralAction:c,dispatchSetConfigurationThemeInteractionAction:u,dispatchSetConfigurationLanguage:d}=e,p=i.global.theme,[f,m]=r.useState("object"==typeof p?p.general:p),[g,T]=r.useState("object"==typeof p?p.interaction:p);return r.useEffect((()=>{"object"==typeof p?(m(p.general),T(p.interaction)):(m(p),T(p))}),[p]),x.default.createElement(x.default.Fragment,null,x.default.createElement(ur,null,a.internatiolate(n,t.internationalization.fields.toolbarDrawerGlobalGeneralTheme),x.default.createElement(pr,{selectables:Object.keys(j.default),selected:"string"==typeof f?f:"",atSelect:e=>(e=>{l(j.default[e]),c(e)})(e),theme:o,filterable:!0,heightItems:3,width:90,style:{fontSize:"0.8rem"}})),x.default.createElement(ur,null,a.internatiolate(n,t.internationalization.fields.toolbarDrawerGlobalInteractionTheme),x.default.createElement(pr,{selectables:Object.keys(j.default),selected:"string"==typeof g?g:"",atSelect:e=>(e=>{s(j.default[e]),u(e)})(e),theme:o,heightItems:3,filterable:!0,width:90,style:{fontSize:"0.8rem"}})),x.default.createElement(ur,{last:!0},a.internatiolate(n,t.internationalization.fields.toolbarDrawerGlobalLanguage),x.default.createElement(pr,{selectables:t.internationalization.languages,selected:n,atSelect:e=>{d(e)},theme:o,heightItems:3,width:90,style:{fontSize:"0.8rem"}})))})),{inputs:{Switch:mr}}=d.universal,gr=o.connect((e=>({stateLanguage:Rn.configuration.getConfiguration(e).global.language,interactionTheme:Rn.themes.getInteractionTheme(e),configuration:Rn.configuration.getConfiguration(e)})),(e=>({dispatchToggleConfigurationSpaceTransformMultimode:t=>e(On.configuration.toggleConfigurationSpaceTransformMultimode(t)),dispatchSetConfigurationSpaceTransformTouch:t=>e(On.configuration.setConfigurationSpaceTransformTouch(t)),dispatchSetConfigurationSpaceTransformLocks:t=>e(On.configuration.setConfigurationSpaceTransformLocks(t))})),null,{context:Tn})((e=>{const{stateLanguage:n,interactionTheme:r,configuration:o,dispatchToggleConfigurationSpaceTransformMultimode:i,dispatchSetConfigurationSpaceTransformTouch:l,dispatchSetConfigurationSpaceTransformLocks:s}=e,{transformMultimode:c,transformLocks:u,transformTouch:d}=o.space;return x.default.createElement(x.default.Fragment,null,x.default.createElement(ur,null,x.default.createElement("div",null,a.internatiolate(n,t.internationalization.fields.toolbarDrawerTransformMultiModeTransform)),x.default.createElement(mr,{theme:r,checked:c,atChange:()=>i(!c),exclusive:!0,level:2})),x.default.createElement(ur,null,x.default.createElement("div",null,a.internatiolate(n,t.internationalization.fields.toolbarDrawerTransformAllowRotationX)),x.default.createElement(mr,{theme:r,checked:u.rotationX,atChange:()=>s("rotationX"),exclusive:!0,level:2})),x.default.createElement(ur,null,x.default.createElement("div",null,a.internatiolate(n,t.internationalization.fields.toolbarDrawerTransformAllowRotationY)),x.default.createElement(mr,{theme:r,checked:u.rotationY,atChange:()=>s("rotationY"),exclusive:!0,level:2})),x.default.createElement(ur,null,x.default.createElement("div",null,a.internatiolate(n,t.internationalization.fields.toolbarDrawerTransformAllowTranslationX)),x.default.createElement(mr,{theme:r,checked:u.translationX,atChange:()=>s("translationX"),exclusive:!0,level:2})),x.default.createElement(ur,null,x.default.createElement("div",null,a.internatiolate(n,t.internationalization.fields.toolbarDrawerTransformAllowTranslationY)),x.default.createElement(mr,{theme:r,checked:u.translationY,atChange:()=>s("translationY"),exclusive:!0,level:2})),x.default.createElement(ur,null,x.default.createElement("div",null,a.internatiolate(n,t.internationalization.fields.toolbarDrawerTransformAllowTranslationZ)),x.default.createElement(mr,{theme:r,checked:u.translationZ,atChange:()=>s("translationZ"),exclusive:!0,level:2})),x.default.createElement(ur,null,x.default.createElement("div",null,a.internatiolate(n,t.internationalization.fields.toolbarDrawerTransformAllowScale)),x.default.createElement(mr,{theme:r,checked:u.scale,atChange:()=>s("scale"),exclusive:!0,level:2})),x.default.createElement(ur,{last:!0},x.default.createElement("div",null,a.internatiolate(n,t.internationalization.fields.toolbarDrawerTransformTouchTransform),": ",d===t.TRANSFORM_TOUCHES.PAN?"pan":"swipe"),x.default.createElement(mr,{theme:r,checked:d===t.TRANSFORM_TOUCHES.PAN,atChange:()=>d===t.TRANSFORM_TOUCHES.PAN?l(t.TRANSFORM_TOUCHES.SWIPE):l(t.TRANSFORM_TOUCHES.PAN),level:2})))})),{inputs:{Dropdown:Tr,Switch:hr,Slider:Er}}=d.universal,Or=o.connect((e=>({interactionTheme:Rn.themes.getInteractionTheme(e),configuration:Rn.configuration.getConfiguration(e)})),(e=>({dispatchSetConfigurationPlaneOpacity:t=>e(On.configuration.setConfigurationPlaneOpacity(t)),dispatchToggleConfigurationSpaceTransparentUI:()=>e(On.configuration.toggleConfigurationSpaceTransparentUI()),dispatchToggleConfigurationSpaceShowTransformOrigin:()=>e(On.configuration.toggleConfigurationSpaceShowTransformOrigin()),dispatchSetConfigurationSpaceTransformOriginSize:t=>e(On.configuration.setConfigurationSpaceTransformOriginSize(t)),dispatchSetConfigurationSpaceLayoutType:t=>e(On.configuration.setConfigurationSpaceLayoutType(t))})),null,{context:Tn})((e=>{const{interactionTheme:n,configuration:r,dispatchSetConfigurationPlaneOpacity:o,dispatchToggleConfigurationSpaceTransparentUI:i,dispatchToggleConfigurationSpaceShowTransformOrigin:l,dispatchSetConfigurationSpaceTransformOriginSize:s,dispatchSetConfigurationSpaceLayoutType:c}=e,{global:u,space:d,elements:p}=r,{transparentUI:f,language:m}=u,{layout:g,transformOrigin:T}=d,h=t.layoutNames[g.type],{show:E,size:O}=T,_=p.plane.opacity;return x.default.createElement(x.default.Fragment,null,x.default.createElement(ur,null,a.internatiolate(m,t.internationalization.fields.toolbarDrawerSpaceTransparentUserInterface),x.default.createElement(hr,{checked:f,atChange:()=>i(),exclusive:!0,level:2,theme:n})),x.default.createElement(ur,null,a.internatiolate(m,t.internationalization.fields.toolbarDrawerSpaceShowTransformOrigin),x.default.createElement(hr,{checked:E,atChange:()=>l(),exclusive:!0,level:2,theme:n})),x.default.createElement(ur,null,a.internatiolate(m,t.internationalization.fields.toolbarDrawerSpaceTransformOriginSize),x.default.createElement(Tr,{selectables:["small","normal","large"],selected:O.toLowerCase(),atSelect:e=>{const a=e.toUpperCase();a!==t.SIZES.SMALL&&a!==t.SIZES.NORMAL&&a!==t.SIZES.LARGE||s(a)},heightItems:3,theme:n})),x.default.createElement(ur,null,a.internatiolate(m,t.internationalization.fields.toolbarDrawerSpacePlaneOpacity),x.default.createElement(Er,{value:_,max:1,min:0,step:.1,defaultValue:100,atChange:e=>o(e),thumbSize:"large",level:2,theme:n})),x.default.createElement(ur,{last:!0},a.internatiolate(m,t.internationalization.fields.toolbarDrawerSpaceLayoutType),x.default.createElement(Tr,{selectables:[...Object.values(t.layoutNames)],selected:h,atSelect:e=>{const t=e.toUpperCase().replace(/\s/g,"_");c(t)},heightItems:3,theme:n,width:100})))})),{inputs:{Switch:_r}}=d.universal,Sr=o.connect((e=>({stateLanguage:Rn.configuration.getConfiguration(e).global.language,interactionTheme:Rn.themes.getInteractionTheme(e),configuration:Rn.configuration.getConfiguration(e),viewSize:Rn.space.getViewSize(e)})),(e=>({dispatchToggleConfigurationToolbarConceal:()=>e(On.configuration.toggleConfigurationToolbarConceal()),dispatchToggleConfigurationToolbarTransformIcons:()=>e(On.configuration.toggleConfigurationToolbarTransformIcons()),dispatchToggleConfigurationToolbarTransformButtons:()=>e(On.configuration.toggleConfigurationToolbarTransformButtons()),dispatchToggleConfigurationToolbarOpaque:()=>e(On.configuration.toggleConfigurationToolbarOpaque())})),null,{context:Tn})((e=>{const{stateLanguage:n,interactionTheme:o,configuration:i,viewSize:l,dispatchToggleConfigurationToolbarConceal:s,dispatchToggleConfigurationToolbarTransformIcons:c,dispatchToggleConfigurationToolbarTransformButtons:u,dispatchToggleConfigurationToolbarOpaque:d}=e,{toolbar:p}=i.elements,{conceal:f,opaque:m,transformIcons:g,transformButtons:T}=p,[h,E]=r.useState(!1);return r.useEffect((()=>{l.width<800?E(!0):E(!1)}),[l.width]),x.default.createElement(x.default.Fragment,null,x.default.createElement(ur,null,x.default.createElement("div",null,a.internatiolate(n,t.internationalization.fields.toolbarDrawerToolbarAlwaysOpaque)),x.default.createElement(_r,{theme:o,checked:m,atChange:()=>d(),exclusive:!0,level:2})),x.default.createElement(ur,null,x.default.createElement("div",null,a.internatiolate(n,t.internationalization.fields.toolbarDrawerToolbarShowTransformIcons)),x.default.createElement(_r,{theme:o,checked:g,atChange:()=>c(),exclusive:!0,level:2})),!h&&x.default.createElement(ur,null,x.default.createElement("div",null,a.internatiolate(n,t.internationalization.fields.toolbarDrawerToolbarShowTransformArrows)),x.default.createElement(_r,{theme:o,checked:T,atChange:()=>u(),exclusive:!0,level:2})),x.default.createElement(ur,{last:!0},x.default.createElement("div",null,a.internatiolate(n,t.internationalization.fields.toolbarDrawerToolbarConcealToolbar)),x.default.createElement(_r,{theme:o,checked:f,atChange:()=>s(),exclusive:!0,level:2})))})),{inputs:{Switch:Rr}}=d.universal,br=o.connect((e=>({stateLanguage:Rn.configuration.getConfiguration(e).global.language,interactionTheme:Rn.themes.getInteractionTheme(e),configuration:Rn.configuration.getConfiguration(e)})),(e=>({dispatchToggleConfigurationViewcubeHide:t=>e(On.configuration.toggleConfigurationViewcubeHide(t)),dispatchToggleConfigurationViewcubeButtons:t=>e(On.configuration.toggleConfigurationViewcubeButtons(t)),dispatchToggleConfigurationViewcubeOpaque:t=>e(On.configuration.toggleConfigurationViewcubeOpaque(t)),dispatchToggleConfigurationViewcubeConceal:()=>e(On.configuration.toggleConfigurationViewcubeConceal())})),null,{context:Tn})((e=>{const{stateLanguage:n,interactionTheme:r,configuration:o,dispatchToggleConfigurationViewcubeHide:i,dispatchToggleConfigurationViewcubeButtons:l,dispatchToggleConfigurationViewcubeOpaque:s,dispatchToggleConfigurationViewcubeConceal:c}=e,{viewcube:u}=o.elements,{show:d,buttons:p,opaque:f,conceal:m}=u;return x.default.createElement(x.default.Fragment,null,x.default.createElement(ur,{last:!d},x.default.createElement("div",null,a.internatiolate(n,t.internationalization.fields.toolbarDrawerViewcubeShowViewcube)),x.default.createElement(Rr,{theme:r,checked:d,atChange:()=>i(!d),exclusive:!0,level:2})),d&&x.default.createElement(x.default.Fragment,null,x.default.createElement(ur,null,x.default.createElement("div",null,a.internatiolate(n,t.internationalization.fields.toolbarDrawerViewcubeShowTransformButtons)),x.default.createElement(Rr,{theme:r,checked:p,atChange:()=>l(!p),exclusive:!0,level:2})),x.default.createElement(ur,null,x.default.createElement("div",null,a.internatiolate(n,t.internationalization.fields.toolbarDrawerViewcubeAlwaysOpaque)),x.default.createElement(Rr,{theme:r,checked:f,atChange:()=>s(!f),exclusive:!0,level:2})),x.default.createElement(ur,{last:!0},x.default.createElement("div",null,a.internatiolate(n,t.internationalization.fields.toolbarDrawerViewcubeConcealViewcube)),x.default.createElement(Rr,{theme:r,checked:m,atChange:()=>c(),exclusive:!0,level:2}))))})),{inputs:{Slider:Ar}}=d.universal,Cr=o.connect((e=>({stateLanguage:Rn.configuration.getConfiguration(e).global.language,stateConfiguration:Rn.configuration.getConfiguration(e),stateInteractionTheme:Rn.themes.getInteractionTheme(e)})),(e=>({dispatchSetConfigurationSpaceCullingDistance:t=>e(On.configuration.setConfigurationSpaceCullingDistance(t))})),null,{context:Tn})((e=>{const{stateLanguage:n,stateConfiguration:o,stateInteractionTheme:i,dispatchSetConfigurationSpaceCullingDistance:l}=e,{cullingDistance:s}=o.space,[c,u]=r.useState(s),d=f.useDebouncedCallback((e=>{l(e)}),300);return x.default.createElement(x.default.Fragment,null,x.default.createElement(ur,null,x.default.createElement("div",null,a.internatiolate(n,t.internationalization.fields.toolbarDrawerTechnicalCullingDistance)),x.default.createElement(Ar,{theme:i,value:c,atChange:e=>{u(e),d(e)},min:1e3,max:5e3,defaultValue:1500})))})),Ir=o.connect((e=>({interactionTheme:Rn.themes.getInteractionTheme(e),configuration:Rn.configuration.getConfiguration(e)})),(e=>({})),null,{context:Tn})((e=>{const{interactionTheme:n,configuration:r}=e,{global:o}=r,{language:i}=o;return x.default.createElement(x.default.Fragment,null,t.defaultShortcuts.map(((e,r)=>{const{type:o}=e,l=t.shortcutsNames[o],{name:s,internationalizedKey:c,key:u,modifier:d}=l,p=Array.isArray(d)?d.reduce(((e,t)=>e+" + "+t))+" +":"string"==typeof d?d+" +":"",f=a.internatiolate(i,s),m=u,g=c?a.internatiolate(i,m):u;return x.default.createElement(ur,{key:s,theme:n,afterline:"TURN_DOWN"===o||"TOGGLE_ROTATE"===o||"TOGGLE_TRANSLATE"===o,last:r===t.defaultShortcuts.length-1},x.default.createElement("div",null,f),x.default.createElement("div",null,p," ",g))})))})),vr={GLOBAL:{name:t.internationalization.fields.toolbarDrawerGlobalTitle,drawer:t.TOOLBAR_DRAWERS.GLOBAL,component:x.default.createElement(fr,null)},TRANSFORM:{name:t.internationalization.fields.toolbarDrawerTransformTitle,drawer:t.TOOLBAR_DRAWERS.TRANSFORM,component:x.default.createElement(gr,null)},SPACE:{name:t.internationalization.fields.toolbarDrawerSpaceTitle,drawer:t.TOOLBAR_DRAWERS.SPACE,component:x.default.createElement(Or,null)},TOOLBAR:{name:t.internationalization.fields.toolbarDrawerToolbarTitle,drawer:t.TOOLBAR_DRAWERS.TOOLBAR,component:x.default.createElement(Sr,null)},VIEWCUBE:{name:t.internationalization.fields.toolbarDrawerViewcubeTitle,drawer:t.TOOLBAR_DRAWERS.VIEWCUBE,component:x.default.createElement(br,null)},TECHNICAL:{name:t.internationalization.fields.toolbarDrawerTechnicalTitle,drawer:t.TOOLBAR_DRAWERS.TECHNICAL,component:x.default.createElement(Cr,null)},SHORTCUTS:{name:t.internationalization.fields.toolbarDrawerShortcutsTitle,drawer:t.TOOLBAR_DRAWERS.SHORTCUTS,component:x.default.createElement(Ir,null)}},Pr=Object.values(vr),Lr=o.connect((e=>({stateLanguage:Rn.configuration.getConfiguration(e).global.language,stateInteractionTheme:Rn.themes.getInteractionTheme(e),stateConfiguration:Rn.configuration.getConfiguration(e),stateToolbarMenuScrollPosition:Rn.ui.getToolbarScrollPosition(e)})),(e=>({dispatchToggleConfigurationToolbarToggleDrawer:t=>e(On.configuration.toggleConfigurationToolbarToggleDrawer(t)),dispatchSetUIToolbarScrollPosition:t=>e(On.ui.setUIToolbarScrollPosition(t))})),null,{context:Tn})((e=>{const{stateLanguage:t,stateInteractionTheme:n,stateConfiguration:o,stateToolbarMenuScrollPosition:i,dispatchToggleConfigurationToolbarToggleDrawer:l,dispatchSetUIToolbarScrollPosition:s}=e,{global:c,elements:u}=o,{transparentUI:d}=c,{toolbar:p}=u,{drawers:m,toggledDrawers:g}=p,T=(e=>{if(0===e.length||e.includes("ALL"))return Pr;const t=[];for(const a of e){const e=vr[a];t.push(e)}return t})(m),h=r.useRef(null),E=f.useDebouncedCallback((e=>{if(h.current){const e=h.current.scrollTop;s(e)}}),100);return r.useEffect((()=>(h.current&&h.current.addEventListener("wheel",E),()=>{h.current&&h.current.removeEventListener("wheel",E)})),[h.current]),r.useEffect((()=>{h.current&&(h.current.scrollTop=i)}),[i,h.current]),x.default.createElement(cr,{theme:n,transparentUI:d},x.default.createElement(dr,{ref:h},T.map((e=>{const{name:n,drawer:r,component:o}=e,i=a.internatiolate(t,n);return x.default.createElement(sr,{key:n,heading:i,items:x.default.createElement(x.default.Fragment,null,o),toggled:g.includes("ALL")||g.includes(r),toggle:()=>l(r)})}))))})),Ur=k.default.div`
337
337
  display: grid;
338
338
  align-items: center;
339
339
  justify-items: center;
340
340
  grid-template-columns: ${e=>e.showTransformButtons?"30px 30px 60px 30px 30px":"1fr"};
341
- `,Ya=S.default.div`
341
+ `,yr=k.default.div`
342
342
  user-select: none;
343
343
  cursor: pointer;
344
344
  border-radius: 50px;
@@ -352,17 +352,17 @@
352
352
  :hover {
353
353
  background-color: ${e=>e.theme.backgroundColorTertiary};
354
354
  }
355
- `,$a=r.connect((e=>({interactionTheme:Mt.themes.getInteractionTheme(e)})),(e=>({})),null,{context:Nt})((e=>{const{direction:t,transform:a,interactionTheme:r}=e;n.useRef(null);const o=n.useRef(null),[i,l]=n.useState(""),[s,c]=n.useState(!1);return n.useEffect((()=>{switch(t){case"left":l("◀");break;case"right":l("▶");break;case"up":l("▲");break;case"down":l("▼")}}),[t]),n.useEffect((()=>{if("undefined"==typeof window)return;let e;const t=()=>Pt(void 0,void 0,void 0,(function*(){const a=(yield Dt()).default;e=new a(o.current),e.on("tap press pressup",t)}));return t(),()=>{e&&e.off("tap press pressup",t)}}),[o.current]),_.default.createElement(Ya,{ref:o,theme:r,pressed:s},i)})),Ha=r.connect((e=>({stateLanguage:Mt.configuration.getConfiguration(e).global.language,interactionTheme:Mt.themes.getInteractionTheme(e)})),(e=>({rotateUp:()=>e(yt.space.rotateUp()),rotateDown:()=>e(yt.space.rotateDown()),rotateLeft:()=>e(yt.space.rotateLeft()),rotateRight:()=>e(yt.space.rotateRight())})),null,{context:Nt})((a=>{const{showTransformButtons:n,showIcons:r,transformMode:o,toggleTransform:i,stateLanguage:l,interactionTheme:s,rotateUp:c,rotateDown:u,rotateLeft:T,rotateRight:p}=a;return _.default.createElement(Wa,{showTransformButtons:n},n&&_.default.createElement(_.default.Fragment,null,_.default.createElement($a,{direction:"left",transform:()=>p()}),_.default.createElement($a,{direction:"up",transform:()=>c()})),_.default.createElement(Ta,{theme:s,onClick:()=>i(e.TRANSFORM_MODES.ROTATION),active:o===e.TRANSFORM_MODES.ROTATION,showIcons:r,showTransformButtons:n,button:r},r?_.default.createElement(pa,null,_.default.createElement(d.PluridIconRotate,null)):_.default.createElement(_.default.Fragment,null,t.internatiolate(l,e.internationalization.fields.toolbarTransformRotate))),n&&_.default.createElement(_.default.Fragment,null,_.default.createElement($a,{direction:"down",transform:()=>u()}),_.default.createElement($a,{direction:"right",transform:()=>T()})))})),Xa=S.default.div`
355
+ `,wr=o.connect((e=>({interactionTheme:Rn.themes.getInteractionTheme(e)})),(e=>({})),null,{context:Tn})((e=>{const{direction:t,transform:a,interactionTheme:n}=e;r.useRef(null);const o=r.useRef(null),[i,l]=r.useState(""),[s,c]=r.useState(!1);return r.useEffect((()=>{switch(t){case"left":l("◀");break;case"right":l("▶");break;case"up":l("▲");break;case"down":l("▼")}}),[t]),r.useEffect((()=>{if("undefined"==typeof window)return;let e;const t=()=>hn(void 0,void 0,void 0,(function*(){const a=(yield Sn()).default;e=new a(o.current),e.on("tap press pressup",t)}));return t(),()=>{e&&e.off("tap press pressup",t)}}),[o.current]),x.default.createElement(yr,{ref:o,theme:n,pressed:s},i)})),Nr=o.connect((e=>({stateLanguage:Rn.configuration.getConfiguration(e).global.language,interactionTheme:Rn.themes.getInteractionTheme(e)})),(e=>({rotateUp:()=>e(On.space.rotateUp()),rotateDown:()=>e(On.space.rotateDown()),rotateLeft:()=>e(On.space.rotateLeft()),rotateRight:()=>e(On.space.rotateRight())})),null,{context:Tn})((e=>{const{showTransformButtons:n,showIcons:r,transformMode:o,toggleTransform:i,stateLanguage:l,interactionTheme:s,rotateUp:c,rotateDown:u,rotateLeft:d,rotateRight:f}=e;return x.default.createElement(Ur,{showTransformButtons:n},n&&x.default.createElement(x.default.Fragment,null,x.default.createElement(wr,{direction:"left",transform:()=>f()}),x.default.createElement(wr,{direction:"up",transform:()=>c()})),x.default.createElement(Jn,{theme:s,onClick:()=>i(t.TRANSFORM_MODES.ROTATION),active:o===t.TRANSFORM_MODES.ROTATION,showIcons:r,showTransformButtons:n,button:r},r?x.default.createElement(er,null,x.default.createElement(p.PluridIconRotate,null)):x.default.createElement(x.default.Fragment,null,a.internatiolate(l,t.internationalization.fields.toolbarTransformRotate))),n&&x.default.createElement(x.default.Fragment,null,x.default.createElement(wr,{direction:"down",transform:()=>u()}),x.default.createElement(wr,{direction:"right",transform:()=>d()})))})),Dr=k.default.div`
356
356
  display: grid;
357
357
  align-items: center;
358
358
  justify-items: center;
359
359
  grid-template-columns: ${e=>e.showTransformButtons?"30px 60px 30px":"1fr"};
360
- `,za=r.connect((e=>({stateLanguage:Mt.configuration.getConfiguration(e).global.language,interactionTheme:Mt.themes.getInteractionTheme(e)})),(e=>({scaleUp:()=>e(yt.space.scaleUp()),scaleDown:()=>e(yt.space.scaleDown())})),null,{context:Nt})((a=>{const{showTransformButtons:n,showIcons:r,transformMode:o,toggleTransform:i,stateLanguage:l,interactionTheme:s,scaleUp:c,scaleDown:u}=a;return _.default.createElement(Xa,{showTransformButtons:n},n&&_.default.createElement($a,{direction:"up",transform:()=>c()}),_.default.createElement(Ta,{theme:s,onClick:()=>i(e.TRANSFORM_MODES.SCALE),active:o===e.TRANSFORM_MODES.SCALE,showIcons:r,showTransformButtons:n,button:r},r?_.default.createElement(pa,null,_.default.createElement(d.PluridIconScale,null)):_.default.createElement(_.default.Fragment,null,t.internatiolate(l,e.internationalization.fields.toolbarTransformScale))),n&&_.default.createElement($a,{direction:"down",transform:()=>u()}))})),Za=S.default.div`
360
+ `,Mr=o.connect((e=>({stateLanguage:Rn.configuration.getConfiguration(e).global.language,interactionTheme:Rn.themes.getInteractionTheme(e)})),(e=>({scaleUp:()=>e(On.space.scaleUp()),scaleDown:()=>e(On.space.scaleDown())})),null,{context:Tn})((e=>{const{showTransformButtons:n,showIcons:r,transformMode:o,toggleTransform:i,stateLanguage:l,interactionTheme:s,scaleUp:c,scaleDown:u}=e;return x.default.createElement(Dr,{showTransformButtons:n},n&&x.default.createElement(wr,{direction:"up",transform:()=>c()}),x.default.createElement(Jn,{theme:s,onClick:()=>i(t.TRANSFORM_MODES.SCALE),active:o===t.TRANSFORM_MODES.SCALE,showIcons:r,showTransformButtons:n,button:r},r?x.default.createElement(er,null,x.default.createElement(p.PluridIconScale,null)):x.default.createElement(x.default.Fragment,null,a.internatiolate(l,t.internationalization.fields.toolbarTransformScale))),n&&x.default.createElement(wr,{direction:"down",transform:()=>u()}))})),xr=k.default.div`
361
361
  display: grid;
362
362
  align-items: center;
363
363
  justify-items: center;
364
364
  grid-template-columns: ${e=>e.showTransformButtons?"30px 30px 60px 30px 30px":"1fr"};
365
- `,Ka=r.connect((e=>({stateLanguage:Mt.configuration.getConfiguration(e).global.language,interactionTheme:Mt.themes.getInteractionTheme(e)})),(e=>({translateUp:()=>e(yt.space.translateUp()),translateDown:()=>e(yt.space.translateDown()),translateLeft:()=>e(yt.space.translateLeft()),translateRight:()=>e(yt.space.translateRight())})),null,{context:Nt})((a=>{const{showTransformButtons:n,showIcons:r,transformMode:o,toggleTransform:i,stateLanguage:l,interactionTheme:s,translateUp:c,translateDown:u,translateLeft:T,translateRight:p}=a;return _.default.createElement(Za,{showTransformButtons:n},n&&_.default.createElement(_.default.Fragment,null,_.default.createElement($a,{direction:"left",transform:()=>T()}),_.default.createElement($a,{direction:"up",transform:()=>c()})),_.default.createElement(Ta,{theme:s,onClick:()=>i(e.TRANSFORM_MODES.TRANSLATION),active:o===e.TRANSFORM_MODES.TRANSLATION,showIcons:r,showTransformButtons:n,button:r},r?_.default.createElement(pa,null,_.default.createElement(d.PluridIconTranslate,null)):_.default.createElement(_.default.Fragment,null,t.internatiolate(l,e.internationalization.fields.toolbarTransformTranslate))),n&&_.default.createElement(_.default.Fragment,null,_.default.createElement($a,{direction:"down",transform:()=>u()}),_.default.createElement($a,{direction:"right",transform:()=>p()})))})),qa=r.connect((e=>({configuration:Mt.configuration.getConfiguration(e),theme:Mt.themes.getInteractionTheme(e),viewSize:Mt.space.getViewSize(e)})),(e=>({dispatchToggleConfigurationSpaceFirstPerson:()=>e(yt.configuration.toggleConfigurationSpaceFirstPerson()),dispatchSetConfigurationSpaceTransformMode:t=>e(yt.configuration.setConfigurationSpaceTransformMode(t))})),null,{context:Nt})((t=>{const{theme:a,configuration:r,viewSize:o,dispatchToggleConfigurationSpaceFirstPerson:i,dispatchSetConfigurationSpaceTransformMode:l}=t,{global:s,elements:c,space:u}=r,{transparentUI:T}=s,{firstPerson:p,transformMode:f,fadeInTime:E}=u,{toolbar:m}=c,{conceal:g,opaque:O,transformIcons:h,transformButtons:S}=m,R=n.useRef(null),[A,I]=n.useState(!1),[C,b]=n.useState(ca.NONE),[L,U]=n.useState(h),[N,P]=n.useState(S),[v,y]=n.useState(!1),w=e=>{C!==ca.NONE&&b(ca.NONE),l(e)};return n.useEffect((()=>{y(!0)}),[]),n.useEffect((()=>{o.width<800&&S&&P(!1),o.width>800&&P(S)}),[o.width]),n.useEffect((()=>{U(h),P(S)}),[h,S]),n.useEffect((()=>(A&&R.current&&clearTimeout(R.current),A||(R.current=setTimeout((()=>{b(ca.NONE)}),400)),()=>{R.current&&clearTimeout(R.current)})),[A]),_.default.createElement(ua,{onMouseEnter:()=>I(!0),onMouseLeave:()=>I(!1),mouseIn:A,conceal:g,showMenu:C,isMounted:v,fadeInTime:E,"data-plurid-entity":e.PLURID_ENTITY_TOOLBAR},_.default.createElement(da,{theme:a,showIcons:L,showTransformButtons:N,documentsBased:!1,mouseIn:A,opaque:O,transparentUI:T},_.default.createElement(Ta,{theme:a,onClick:()=>i(),active:p,button:!0,showIcons:L,showTransformButtons:N},_.default.createElement(pa,null,_.default.createElement(d.PluridIconFirstPerson,null))),_.default.createElement(Ha,{showTransformButtons:N,showIcons:L,transformMode:f,toggleTransform:w}),_.default.createElement(za,{showTransformButtons:N,showIcons:L,transformMode:f,toggleTransform:w}),_.default.createElement(Ka,{showTransformButtons:N,showIcons:L,transformMode:f,toggleTransform:w}),_.default.createElement(Ta,{theme:a,onClick:()=>{return t=ca.MORE,void(C===t?b(ca.NONE):(l(e.TRANSFORM_MODES.ALL),b(t)));var t},active:C===ca.MORE,button:!0,showIcons:L,showTransformButtons:N},_.default.createElement(pa,null,_.default.createElement(d.PluridIconMore,null)))),C===ca.UNIVERSES&&_.default.createElement(ma,null),C===ca.MORE&&_.default.createElement(ka,null))})),Qa=S.default.div`
365
+ `,Fr=o.connect((e=>({stateLanguage:Rn.configuration.getConfiguration(e).global.language,interactionTheme:Rn.themes.getInteractionTheme(e)})),(e=>({translateUp:()=>e(On.space.translateUp()),translateDown:()=>e(On.space.translateDown()),translateLeft:()=>e(On.space.translateLeft()),translateRight:()=>e(On.space.translateRight())})),null,{context:Tn})((e=>{const{showTransformButtons:n,showIcons:r,transformMode:o,toggleTransform:i,stateLanguage:l,interactionTheme:s,translateUp:c,translateDown:u,translateLeft:d,translateRight:f}=e;return x.default.createElement(xr,{showTransformButtons:n},n&&x.default.createElement(x.default.Fragment,null,x.default.createElement(wr,{direction:"left",transform:()=>d()}),x.default.createElement(wr,{direction:"up",transform:()=>c()})),x.default.createElement(Jn,{theme:s,onClick:()=>i(t.TRANSFORM_MODES.TRANSLATION),active:o===t.TRANSFORM_MODES.TRANSLATION,showIcons:r,showTransformButtons:n,button:r},r?x.default.createElement(er,null,x.default.createElement(p.PluridIconTranslate,null)):x.default.createElement(x.default.Fragment,null,a.internatiolate(l,t.internationalization.fields.toolbarTransformTranslate))),n&&x.default.createElement(x.default.Fragment,null,x.default.createElement(wr,{direction:"down",transform:()=>u()}),x.default.createElement(wr,{direction:"right",transform:()=>f()})))})),jr=o.connect((e=>({configuration:Rn.configuration.getConfiguration(e),theme:Rn.themes.getInteractionTheme(e),viewSize:Rn.space.getViewSize(e)})),(e=>({dispatchToggleConfigurationSpaceFirstPerson:()=>e(On.configuration.toggleConfigurationSpaceFirstPerson()),dispatchSetConfigurationSpaceTransformMode:t=>e(On.configuration.setConfigurationSpaceTransformMode(t))})),null,{context:Tn})((e=>{const{theme:a,configuration:n,viewSize:o,dispatchToggleConfigurationSpaceFirstPerson:i,dispatchSetConfigurationSpaceTransformMode:l}=e,{global:s,elements:c,space:u}=n,{transparentUI:d}=s,{firstPerson:f,transformMode:m,fadeInTime:g}=u,{toolbar:T}=c,{conceal:h,opaque:E,transformIcons:O,transformButtons:_}=T,S=r.useRef(null),[R,b]=r.useState(!1),[A,C]=r.useState(Kn.NONE),[I,v]=r.useState(O),[P,L]=r.useState(_),[U,y]=r.useState(!1),w=e=>{A!==Kn.NONE&&C(Kn.NONE),l(e)};return r.useEffect((()=>{y(!0)}),[]),r.useEffect((()=>{o.width<800&&_&&L(!1),o.width>800&&L(_)}),[o.width]),r.useEffect((()=>{v(O),L(_)}),[O,_]),r.useEffect((()=>(R&&S.current&&clearTimeout(S.current),R||(S.current=setTimeout((()=>{C(Kn.NONE)}),400)),()=>{S.current&&clearTimeout(S.current)})),[R]),x.default.createElement(qn,{onMouseEnter:()=>b(!0),onMouseLeave:()=>b(!1),mouseIn:R,conceal:h,showMenu:A,isMounted:U,fadeInTime:g,"data-plurid-entity":t.PLURID_ENTITY_TOOLBAR},x.default.createElement(Qn,{theme:a,showIcons:I,showTransformButtons:P,documentsBased:!1,mouseIn:R,opaque:E,transparentUI:d},x.default.createElement(Jn,{theme:a,onClick:()=>i(),active:f,button:!0,showIcons:I,showTransformButtons:P},x.default.createElement(er,null,x.default.createElement(p.PluridIconFirstPerson,null))),x.default.createElement(Nr,{showTransformButtons:P,showIcons:I,transformMode:m,toggleTransform:w}),x.default.createElement(Mr,{showTransformButtons:P,showIcons:I,transformMode:m,toggleTransform:w}),x.default.createElement(Fr,{showTransformButtons:P,showIcons:I,transformMode:m,toggleTransform:w}),x.default.createElement(Jn,{theme:a,onClick:()=>{return e=Kn.MORE,void(A===e?C(Kn.NONE):(l(t.TRANSFORM_MODES.ALL),C(e)));var e},active:A===Kn.MORE,button:!0,showIcons:I,showTransformButtons:P},x.default.createElement(er,null,x.default.createElement(p.PluridIconMore,null)))),A===Kn.UNIVERSES&&x.default.createElement(nr,null),A===Kn.MORE&&x.default.createElement(Lr,null))})),kr=k.default.div`
366
366
  position: absolute;
367
367
  @media (max-width: 800px) {
368
368
  top: ${({conceal:e,mouseOver:t})=>e&&!t?"-90px":"0"};
@@ -384,12 +384,12 @@
384
384
  grid-template-columns: 15px 115px 15px 20px;
385
385
 
386
386
  opacity: ${({fadeInTime:e})=>e?"0":"1"};
387
- animation: ${({fadeInTime:e,isMounted:t})=>t&&e?ia(e):""};
387
+ animation: ${({fadeInTime:e,isMounted:t})=>t&&e?zn(e):""};
388
388
 
389
389
  :hover {
390
390
  opacity: 1;
391
391
  }
392
- `,Ja=S.default.div`
392
+ `,Gr=k.default.div`
393
393
  display: grid;
394
394
  place-content: center;
395
395
 
@@ -397,7 +397,7 @@
397
397
  * Themed color
398
398
  */
399
399
  color: white;
400
- `,en=S.default.div`
400
+ `,Br=k.default.div`
401
401
  user-select: none;
402
402
  font-size: 0.6rem;
403
403
  width: 1.2rem;
@@ -410,7 +410,7 @@
410
410
  :hover {
411
411
  background-color: ${({theme:e})=>e.backgroundColorTertiary};
412
412
  }
413
- `,tn=S.default.div`
413
+ `,Yr=k.default.div`
414
414
  grid-area: PVFitview;
415
415
  display: grid;
416
416
  place-content: center;
@@ -422,7 +422,7 @@
422
422
  width: 0.8rem;
423
423
  fill: white;
424
424
  }
425
- `,an=S.default.div`
425
+ `,Vr=k.default.div`
426
426
  font-size: 0.6rem;
427
427
  position: absolute;
428
428
  height: 50px;
@@ -442,7 +442,7 @@
442
442
  box-shadow: ${({face:e,theme:t})=>"base"===e?"0px 0px 12px 2px "+t.boxShadowPenumbraColor:""};
443
443
  opacity: ${({opaque:e,mouseOver:t})=>{if(!e){if(t)return"0.8";if(!t)return"0.4"}return"1"}};
444
444
  transform: ${({face:e})=>{switch(e){case"front":return"translateZ(25px) rotateY(0deg)";case"back":return"translateZ(-25px) rotateY(-180deg)";case"left":return"translateX(-25px) rotateY(-90deg)";case"right":return"translateX(25px) rotateY(90deg)";case"top":return"translateY(-25px) rotateX(90deg)";case"base":return"translateY(25px) rotateX(-90deg)"}return""}};
445
- `,nn=S.default.div`
445
+ `,$r=k.default.div`
446
446
  display: grid;
447
447
  place-content: center;
448
448
  cursor: pointer;
@@ -456,16 +456,16 @@
456
456
  :hover {
457
457
  background-color: ${({theme:e})=>e.backgroundColorTertiary};
458
458
  }
459
- `,rn="TopLeft",on="TopCenter",ln="TopRight",sn="MiddleLeft",cn="MiddleCenter",un="MiddleRight",dn="BottomLeft",Tn="BottomCenter",pn="BottomRight",fn={frontTopLeft:"A1",frontTopCenter:"A2",frontTopRight:"A3",frontMiddleLeft:"B1",frontMiddleCenter:"B2",frontMiddleRight:"B3",frontBottomLeft:"C1",frontBottomCenter:"C2",frontBottomRight:"C3",rightTopLeft:"A3",rightTopCenter:"A4",rightTopRight:"A5",rightMiddleLeft:"B3",rightMiddleCenter:"B4",rightMiddleRight:"B5",rightBottomLeft:"C3",rightBottomCenter:"C4",rightBottomRight:"C5",backTopLeft:"A5",backTopCenter:"A6",backTopRight:"A7",backMiddleLeft:"B5",backMiddleCenter:"B6",backMiddleRight:"B7",backBottomLeft:"C5",backBottomCenter:"C6",backBottomRight:"C7",leftTopLeft:"A7",leftTopCenter:"A8",leftTopRight:"A1",leftMiddleLeft:"B7",leftMiddleCenter:"B8",leftMiddleRight:"B1",leftBottomLeft:"C7",leftBottomCenter:"C8",leftBottomRight:"C1",topTopLeft:"A7",topTopCenter:"A6",topTopRight:"A5",topMiddleLeft:"A8",topMiddleCenter:"D1",topMiddleRight:"A4",topBottomLeft:"A1",topBottomCenter:"A2",topBottomRight:"A3",baseTopLeft:"C1",baseTopCenter:"C2",baseTopRight:"C3",baseMiddleLeft:"C8",baseMiddleCenter:"E1",baseMiddleRight:"C4",baseBottomLeft:"C7",baseBottomCenter:"C6",baseBottomRight:"C5"},En={A1:{rotateX:-45,rotateY:45},A2:{rotateX:-45,rotateY:0},A3:{rotateX:-45,rotateY:-45},B1:{rotateX:0,rotateY:45},B2:{rotateX:0,rotateY:0},B3:{rotateX:0,rotateY:-45},C1:{rotateX:45,rotateY:45},C2:{rotateX:45,rotateY:0},C3:{rotateX:45,rotateY:-45},A4:{rotateX:-45,rotateY:270.1},A5:{rotateX:-45,rotateY:225},B4:{rotateX:0,rotateY:270.1},B5:{rotateX:0,rotateY:225},C4:{rotateX:45,rotateY:270.1},C5:{rotateX:45,rotateY:225},A6:{rotateX:-45,rotateY:180},A7:{rotateX:-45,rotateY:135},B6:{rotateX:0,rotateY:180.1},B7:{rotateX:0,rotateY:135},C6:{rotateX:45,rotateY:180.1},C7:{rotateX:45,rotateY:135},A8:{rotateX:-45,rotateY:90.1},B8:{rotateX:0,rotateY:90.1},C8:{rotateX:45,rotateY:90.1},D1:{rotateX:-90.1,rotateY:0},E1:{rotateX:90.1,rotateY:0}},mn=r.connect((e=>({generalTheme:Mt.themes.getGeneralTheme(e),interactionTheme:Mt.themes.getInteractionTheme(e),configuration:Mt.configuration.getConfiguration(e)})),(e=>({dispatchRotateX:t=>e(yt.space.rotateX(t)),dispatchRotateY:t=>e(yt.space.rotateY(t)),dispatchSetAnimatedTransform:t=>e(yt.space.setAnimatedTransform(t))})),null,{context:Nt})((e=>{const{face:t,faceText:a,mouseOver:n,hoveredZone:r,setHoveredZone:o,activeZone:i,setActiveZone:l,generalTheme:s,interactionTheme:c,configuration:u,dispatchRotateX:d,dispatchRotateY:T,dispatchSetAnimatedTransform:p}=e,{global:f,elements:E}=u,{transparentUI:m}=f,g=E.viewcube.opaque,O=e=>{const a=fn[`${t}${e}`],n=En[a];l(a),p(!0),d(n.rotateX),T(n.rotateY),setTimeout((()=>{p(!1)}),450)};return _.default.createElement(an,{theme:s,face:t,opaque:g,mouseOver:n},_.default.createElement(nn,{theme:c,type:rn,active:i===fn[`${t}${rn}`],hovered:r===fn[`${t}${rn}`],onClick:()=>O(rn),onMouseEnter:()=>o(fn[`${t}${rn}`]),transparentUI:m}),_.default.createElement(nn,{theme:c,type:on,active:i===fn[`${t}${on}`],hovered:r===fn[`${t}${on}`],onClick:()=>O(on),onMouseEnter:()=>o(fn[`${t}${on}`]),transparentUI:m}),_.default.createElement(nn,{theme:c,type:ln,active:i===fn[`${t}${ln}`],hovered:r===fn[`${t}${ln}`],onClick:()=>O(ln),onMouseEnter:()=>o(fn[`${t}${ln}`]),transparentUI:m}),_.default.createElement(nn,{theme:c,type:sn,active:i===fn[`${t}${sn}`],hovered:r===fn[`${t}${sn}`],onClick:()=>O(sn),onMouseEnter:()=>o(fn[`${t}${sn}`]),transparentUI:m}),_.default.createElement(nn,{theme:c,type:cn,active:i===fn[`${t}${cn}`],hovered:r===fn[`${t}${cn}`],onClick:()=>O(cn),onMouseEnter:()=>o(fn[`${t}${cn}`]),transparentUI:m},a),_.default.createElement(nn,{theme:c,type:un,active:i===fn[`${t}${un}`],hovered:r===fn[`${t}${un}`],onClick:()=>O(un),onMouseEnter:()=>o(fn[`${t}${un}`]),transparentUI:m}),_.default.createElement(nn,{theme:c,type:dn,active:i===fn[`${t}${dn}`],hovered:r===fn[`${t}${dn}`],onClick:()=>O(dn),onMouseEnter:()=>o(fn[`${t}${dn}`]),transparentUI:m}),_.default.createElement(nn,{theme:c,type:Tn,active:i===fn[`${t}${Tn}`],hovered:r===fn[`${t}${Tn}`],onClick:()=>O(Tn),onMouseEnter:()=>o(fn[`${t}${Tn}`]),transparentUI:m}),_.default.createElement(nn,{theme:c,type:pn,active:i===fn[`${t}${pn}`],hovered:r===fn[`${t}${pn}`],onClick:()=>O(pn),onMouseEnter:()=>o(fn[`${t}${pn}`]),transparentUI:m}))})),gn=S.default.div`
459
+ `,Xr="TopLeft",Wr="TopCenter",zr="TopRight",Hr="MiddleLeft",Zr="MiddleCenter",Kr="MiddleRight",qr="BottomLeft",Qr="BottomCenter",Jr="BottomRight",eo={frontTopLeft:"A1",frontTopCenter:"A2",frontTopRight:"A3",frontMiddleLeft:"B1",frontMiddleCenter:"B2",frontMiddleRight:"B3",frontBottomLeft:"C1",frontBottomCenter:"C2",frontBottomRight:"C3",rightTopLeft:"A3",rightTopCenter:"A4",rightTopRight:"A5",rightMiddleLeft:"B3",rightMiddleCenter:"B4",rightMiddleRight:"B5",rightBottomLeft:"C3",rightBottomCenter:"C4",rightBottomRight:"C5",backTopLeft:"A5",backTopCenter:"A6",backTopRight:"A7",backMiddleLeft:"B5",backMiddleCenter:"B6",backMiddleRight:"B7",backBottomLeft:"C5",backBottomCenter:"C6",backBottomRight:"C7",leftTopLeft:"A7",leftTopCenter:"A8",leftTopRight:"A1",leftMiddleLeft:"B7",leftMiddleCenter:"B8",leftMiddleRight:"B1",leftBottomLeft:"C7",leftBottomCenter:"C8",leftBottomRight:"C1",topTopLeft:"A7",topTopCenter:"A6",topTopRight:"A5",topMiddleLeft:"A8",topMiddleCenter:"D1",topMiddleRight:"A4",topBottomLeft:"A1",topBottomCenter:"A2",topBottomRight:"A3",baseTopLeft:"C1",baseTopCenter:"C2",baseTopRight:"C3",baseMiddleLeft:"C8",baseMiddleCenter:"E1",baseMiddleRight:"C4",baseBottomLeft:"C7",baseBottomCenter:"C6",baseBottomRight:"C5"},to={A1:{rotateX:-45,rotateY:45},A2:{rotateX:-45,rotateY:0},A3:{rotateX:-45,rotateY:-45},B1:{rotateX:0,rotateY:45},B2:{rotateX:0,rotateY:0},B3:{rotateX:0,rotateY:-45},C1:{rotateX:45,rotateY:45},C2:{rotateX:45,rotateY:0},C3:{rotateX:45,rotateY:-45},A4:{rotateX:-45,rotateY:270.1},A5:{rotateX:-45,rotateY:225},B4:{rotateX:0,rotateY:270.1},B5:{rotateX:0,rotateY:225},C4:{rotateX:45,rotateY:270.1},C5:{rotateX:45,rotateY:225},A6:{rotateX:-45,rotateY:180},A7:{rotateX:-45,rotateY:135},B6:{rotateX:0,rotateY:180.1},B7:{rotateX:0,rotateY:135},C6:{rotateX:45,rotateY:180.1},C7:{rotateX:45,rotateY:135},A8:{rotateX:-45,rotateY:90.1},B8:{rotateX:0,rotateY:90.1},C8:{rotateX:45,rotateY:90.1},D1:{rotateX:-90.1,rotateY:0},E1:{rotateX:90.1,rotateY:0}},ao=o.connect((e=>({generalTheme:Rn.themes.getGeneralTheme(e),interactionTheme:Rn.themes.getInteractionTheme(e),configuration:Rn.configuration.getConfiguration(e)})),(e=>({dispatchRotateX:t=>e(On.space.rotateX(t)),dispatchRotateY:t=>e(On.space.rotateY(t)),dispatchSetAnimatedTransform:t=>e(On.space.setAnimatedTransform(t))})),null,{context:Tn})((e=>{const{face:t,faceText:a,mouseOver:n,hoveredZone:r,setHoveredZone:o,activeZone:i,setActiveZone:l,generalTheme:s,interactionTheme:c,configuration:u,dispatchRotateX:d,dispatchRotateY:p,dispatchSetAnimatedTransform:f}=e,{global:m,elements:g}=u,{transparentUI:T}=m,h=g.viewcube.opaque,E=e=>{const a=eo[`${t}${e}`],n=to[a];l(a),f(!0),d(n.rotateX),p(n.rotateY),setTimeout((()=>{f(!1)}),450)};return x.default.createElement(Vr,{theme:s,face:t,opaque:h,mouseOver:n},x.default.createElement($r,{theme:c,type:Xr,active:i===eo[`${t}${Xr}`],hovered:r===eo[`${t}${Xr}`],onClick:()=>E(Xr),onMouseEnter:()=>o(eo[`${t}${Xr}`]),transparentUI:T}),x.default.createElement($r,{theme:c,type:Wr,active:i===eo[`${t}${Wr}`],hovered:r===eo[`${t}${Wr}`],onClick:()=>E(Wr),onMouseEnter:()=>o(eo[`${t}${Wr}`]),transparentUI:T}),x.default.createElement($r,{theme:c,type:zr,active:i===eo[`${t}${zr}`],hovered:r===eo[`${t}${zr}`],onClick:()=>E(zr),onMouseEnter:()=>o(eo[`${t}${zr}`]),transparentUI:T}),x.default.createElement($r,{theme:c,type:Hr,active:i===eo[`${t}${Hr}`],hovered:r===eo[`${t}${Hr}`],onClick:()=>E(Hr),onMouseEnter:()=>o(eo[`${t}${Hr}`]),transparentUI:T}),x.default.createElement($r,{theme:c,type:Zr,active:i===eo[`${t}${Zr}`],hovered:r===eo[`${t}${Zr}`],onClick:()=>E(Zr),onMouseEnter:()=>o(eo[`${t}${Zr}`]),transparentUI:T},a),x.default.createElement($r,{theme:c,type:Kr,active:i===eo[`${t}${Kr}`],hovered:r===eo[`${t}${Kr}`],onClick:()=>E(Kr),onMouseEnter:()=>o(eo[`${t}${Kr}`]),transparentUI:T}),x.default.createElement($r,{theme:c,type:qr,active:i===eo[`${t}${qr}`],hovered:r===eo[`${t}${qr}`],onClick:()=>E(qr),onMouseEnter:()=>o(eo[`${t}${qr}`]),transparentUI:T}),x.default.createElement($r,{theme:c,type:Qr,active:i===eo[`${t}${Qr}`],hovered:r===eo[`${t}${Qr}`],onClick:()=>E(Qr),onMouseEnter:()=>o(eo[`${t}${Qr}`]),transparentUI:T}),x.default.createElement($r,{theme:c,type:Jr,active:i===eo[`${t}${Jr}`],hovered:r===eo[`${t}${Jr}`],onClick:()=>E(Jr),onMouseEnter:()=>o(eo[`${t}${Jr}`]),transparentUI:T}))})),no=k.default.div`
460
460
  grid-area: PVModel;
461
- `,_n=S.default.div`
461
+ `,ro=k.default.div`
462
462
  perspective: 2000px;
463
463
  perspective-origin: 50% 50%;
464
- `,On=S.default.div`
464
+ `,oo=k.default.div`
465
465
  transform-style: preserve-3d;
466
466
  width: 50px;
467
467
  height: 50px;
468
- `,hn=r.connect((e=>({stateLanguage:Mt.configuration.getConfiguration(e).global.language,spaceRotationX:Mt.space.getRotationX(e),spaceRotationY:Mt.space.getRotationY(e),stateAnimatedTransform:Mt.space.getAnimatedTransform(e),stateTransformTime:Mt.space.getTransformTime(e)})),(e=>({})),null,{context:Nt})((a=>{const{mouseOver:r,stateLanguage:o,spaceRotationX:i,spaceRotationY:l,stateAnimatedTransform:s,stateTransformTime:c}=a,[u,d]=n.useState(""),[T,p]=n.useState("");return n.useEffect((()=>{u||p("")}),[i,l]),_.default.createElement(gn,null,_.default.createElement(_n,null,_.default.createElement(On,{suppressHydrationWarning:!0,style:{transform:`\n translateX(32px)\n translateY(23px)\n rotateX(${i}deg)\n rotateY(${l}deg)\n `,transition:r||s?`transform ${c}ms ease-in-out`:""},onMouseLeave:()=>{d("")}},_.default.createElement(mn,{face:"front",faceText:t.internatiolate(o,e.internationalization.fields.viewcubeFront),mouseOver:r,hoveredZone:u,setHoveredZone:d,activeZone:T,setActiveZone:p}),_.default.createElement(mn,{face:"back",faceText:t.internatiolate(o,e.internationalization.fields.viewcubeBack),mouseOver:r,hoveredZone:u,setHoveredZone:d,activeZone:T,setActiveZone:p}),_.default.createElement(mn,{face:"left",faceText:t.internatiolate(o,e.internationalization.fields.viewcubeLeft),mouseOver:r,hoveredZone:u,setHoveredZone:d,activeZone:T,setActiveZone:p}),_.default.createElement(mn,{face:"right",faceText:t.internatiolate(o,e.internationalization.fields.viewcubeRight),mouseOver:r,hoveredZone:u,setHoveredZone:d,activeZone:T,setActiveZone:p}),_.default.createElement(mn,{face:"top",faceText:t.internatiolate(o,e.internationalization.fields.viewcubeTop),mouseOver:r,hoveredZone:u,setHoveredZone:d,activeZone:T,setActiveZone:p}),_.default.createElement(mn,{face:"base",faceText:t.internatiolate(o,e.internationalization.fields.viewcubeBase),mouseOver:r,hoveredZone:u,setHoveredZone:d,activeZone:T,setActiveZone:p}))))})),Sn=r.connect((e=>({stateConfiguration:Mt.configuration.getConfiguration(e),stateInteractionTheme:Mt.themes.getInteractionTheme(e),stateTransformTime:Mt.space.getTransformTime(e)})),(e=>({dispatchRotateXWith:t=>e(yt.space.rotateXWith(t)),dispatchRotateYWith:t=>e(yt.space.rotateYWith(t)),dispatchSetAnimatedTransform:t=>e(yt.space.setAnimatedTransform(t)),dispatchSpaceResetTransform:()=>e(yt.space.spaceResetTransform())})),null,{context:Nt})((t=>{const{stateConfiguration:a,stateInteractionTheme:r,stateTransformTime:o,dispatchRotateXWith:i,dispatchRotateYWith:l,dispatchSetAnimatedTransform:s,dispatchSpaceResetTransform:c}=t,{elements:u,space:T}=a,{viewcube:p}=u,{buttons:f,conceal:E}=p,{fadeInTime:m}=T,[g,O]=n.useState(!1),[h,S]=n.useState(!1),R=(e,t)=>{switch(s(!0),e){case"rotateX":i(t);break;case"rotateY":l(t)}setTimeout((()=>{s(!1)}),o)};return n.useEffect((()=>{S(!0)}),[]),_.default.createElement(Qa,{onMouseEnter:()=>O(!0),onMouseLeave:()=>O(!1),onMouseMove:()=>g?null:O(!0),conceal:E,mouseOver:g,isMounted:h,fadeInTime:m,"data-plurid-entity":e.PLURID_ENTITY_VIEWCUBE},_.default.createElement(hn,{mouseOver:g}),g&&f&&_.default.createElement(_.default.Fragment,null,_.default.createElement(Ja,{style:{gridArea:"PVRotateUp"}},_.default.createElement(en,{theme:r,onClick:()=>R("rotateX",-90.1)},"▲")),_.default.createElement(Ja,{theme:r,style:{gridArea:"PVRotateDown"}},_.default.createElement(en,{theme:r,onClick:()=>R("rotateX",90.1)},"▼")),_.default.createElement(Ja,{theme:r,style:{gridArea:"PVRotateLeft"}},_.default.createElement(en,{theme:r,onClick:()=>R("rotateY",90.1)},"◀")),_.default.createElement(Ja,{theme:r,style:{gridArea:"PVRotateRight"}},_.default.createElement(en,{theme:r,onClick:()=>R("rotateY",-90.1)},"▶")),_.default.createElement(tn,{onClick:e=>{e.ctrlKey||e.metaKey||(s(!0),c(),setTimeout((()=>{s(!1)}),o))}},_.default.createElement(d.PluridIconGlobal,null))))})),Rn=r.connect((e=>({stateConfiguration:Mt.configuration.getConfiguration(e)})),(e=>({})),null,{context:Nt})((e=>{const{stateConfiguration:t}=e,{elements:a}=t,{toolbar:n,viewcube:r}=a,o=n.show,i=r.show;return _.default.createElement(_.default.Fragment,null,_.default.createElement(sa,null),o&&_.default.createElement(qa,null),i&&_.default.createElement(Sn,null))})),{getRegisteredPlanes:An}=t.planes,In=r.connect((e=>({stateConfiguration:Mt.configuration.getConfiguration(e),stateTransform:Mt.space.getTransform(e),stateSpaceLoading:Mt.space.getLoading(e),stateSpaceView:Mt.space.getView(e)})),(e=>({dispatch:e,dispatchSetConfiguration:t=>e(yt.configuration.setConfiguration(t)),dispatchSetConfigurationMicro:()=>e(yt.configuration.setConfigurationMicro()),dispatchSpaceSetViewSize:t=>e(yt.space.setViewSize(t)),dispatchSetSpaceLoading:t=>e(yt.space.setSpaceLoading(t)),dispatchSetAnimatedTransform:t=>e(yt.space.setAnimatedTransform(t)),dispatchSetTransformTime:t=>e(yt.space.setTransformTime(t)),dispatchSetSpaceLocation:t=>e(yt.space.setSpaceLocation(t)),dispatchSetInitialTree:t=>e(yt.space.setInitialTree(t)),dispatchSetTree:t=>e(yt.space.setTree(t)),dispatchSetGeneralTheme:t=>e(yt.themes.setGeneralTheme(t)),dispatchSetInteractionTheme:t=>e(yt.themes.setInteractionTheme(t)),dispatchRotateX:t=>e(yt.space.rotateX(t)),dispatchRotateXWith:t=>e(yt.space.rotateXWith(t)),dispatchRotateY:t=>e(yt.space.rotateY(t)),dispatchRotateYWith:t=>e(yt.space.rotateYWith(t)),dispatchTranslateXWith:t=>e(yt.space.translateXWith(t)),dispatchTranslateYWith:t=>e(yt.space.translateYWith(t)),dispatchScaleUpWith:t=>e(yt.space.scaleUpWith(t)),dispatchScaleDownWith:t=>e(yt.space.scaleDownWith(t)),dispatchSpaceSetView:t=>e(yt.space.spaceSetView(t))})),null,{context:Nt})((a=>{const{planesRegistrar:r,customPlane:o,planeContext:i,planeContextValue:s,pubsub:c,planeNotFound:u,planeRenderError:d,stateConfiguration:T,stateTransform:p,stateSpaceView:f,dispatch:E,dispatchSetConfiguration:m,dispatchSetGeneralTheme:g,dispatchSetInteractionTheme:O,dispatchSetSpaceLocation:S,dispatchSetAnimatedTransform:R,dispatchSetTransformTime:A,dispatchSetTree:I,dispatchRotateXWith:C,dispatchRotateX:b,dispatchRotateYWith:L,dispatchRotateY:U,dispatchTranslateXWith:N,dispatchTranslateYWith:P,dispatchScaleUpWith:v,dispatchScaleDownWith:y,dispatchSpaceSetViewSize:w,dispatchSpaceSetView:D}=a,M=n.useRef(null),[x,F]=n.useState(c?[c]:[]),G=n.useCallback((t=>{const{transformLocks:a}=T.space;((t,a,n,r)=>{if(a.defaultPrevented)return;if(l.dom.verifyPathInputElement(a.path))return;const o=!(a.shiftKey||a.altKey||a.ctrlKey||a.metaKey);if("KeyF"===a.code&&o)return t(yt.configuration.toggleConfigurationSpaceFirstPerson());if(n){if("KeyW"===a.code&&o&&r.translationZ)return t(yt.space.viewCameraMoveForward());if("KeyS"===a.code&&o&&r.translationZ)return t(yt.space.viewCameraMoveBackward());if("KeyA"===a.code&&o&&r.translationX)return t(yt.space.viewCameraMoveLeft());if("KeyA"===a.code&&a.shiftKey&&r.rotationY)return t(yt.space.viewCameraTurnLeft());if("KeyD"===a.code&&o&&r.translationX)return t(yt.space.viewCameraMoveRight());if("KeyD"===a.code&&a.shiftKey&&r.rotationY)return t(yt.space.viewCameraTurnRight());if("KeyQ"===a.code&&o&&r.rotationX)return t(yt.space.viewCameraTurnUp());if("KeyZ"===a.code&&o&&r.rotationX)return t(yt.space.viewCameraTurnDown());if("KeyE"===a.code&&o&&r.translationY)return t(yt.space.viewCameraMoveUp());if("KeyC"===a.code&&o&&r.translationY)return t(yt.space.viewCameraMoveDown())}if("KeyR"===a.code&&o)return t(yt.configuration.setConfigurationSpaceTransformMode(e.TRANSFORM_MODES.ROTATION));if("KeyT"===a.code&&o)return t(yt.configuration.setConfigurationSpaceTransformMode(e.TRANSFORM_MODES.TRANSLATION));if("KeyS"===a.code&&o&&!n)return t(yt.configuration.setConfigurationSpaceTransformMode(e.TRANSFORM_MODES.SCALE));if("ArrowRight"===a.key){if(a.shiftKey&&r.rotationY)return t(yt.space.rotateLeft());if(a.altKey&&r.translationX)return t(yt.space.translateRight())}if("ArrowLeft"===a.key){if(a.shiftKey&&r.rotationY)return t(yt.space.rotateRight());if(a.altKey&&r.translationX)return t(yt.space.translateLeft())}if("ArrowUp"===a.key){if(a.shiftKey&&a.altKey&&r.translationZ)return t(yt.space.translateIn());if(a.shiftKey&&!a.altKey&&r.rotationX)return t(yt.space.rotateUp());if(a.altKey&&!a.shiftKey&&r.translationY)return t(yt.space.translateUp());if(a.metaKey||a.ctrlKey&&r.scale)return t(yt.space.scaleUp())}if("ArrowDown"===a.key){if(a.shiftKey&&a.altKey&&r.translationZ)return t(yt.space.translateOut());if(a.shiftKey&&!a.altKey&&r.rotationX)return t(yt.space.rotateDown());if(a.altKey&&!a.shiftKey&&r.translationY)return t(yt.space.translateDown());if(a.metaKey||a.ctrlKey&&r.scale)t(yt.space.scaleDown())}})(E,t,T.space.firstPerson,a)}),[T.space.firstPerson,T.space.transformLocks,E]),j=n.useCallback((t=>{const{transformMode:a,transformLocks:n}=T.space,r={rotation:a===e.TRANSFORM_MODES.ROTATION,translation:a===e.TRANSFORM_MODES.TRANSLATION,scale:a===e.TRANSFORM_MODES.SCALE};((e,t,a,n)=>{(t.shiftKey||t.metaKey||t.altKey||t.ctrlKey||a.rotation||a.translation||a.scale)&&t.preventDefault();const r={deltaX:t.deltaX,deltaY:t.deltaY},o=wt.getWheelDirection(r);a.rotation&&("left"===o&&n.rotationY&&e(yt.space.rotateLeft()),"right"===o&&n.rotationY&&e(yt.space.rotateRight()),"up"===o&&n.rotationX&&e(yt.space.rotateUp()),"down"===o&&n.rotationX&&e(yt.space.rotateDown())),t.shiftKey&&!t.altKey&&("up"===o&&n.rotationX&&e(yt.space.rotateUp()),"down"===o&&n.rotationX&&e(yt.space.rotateDown()),"left"===o&&n.rotationY&&e(yt.space.rotateLeft()),"right"===o&&n.rotationY&&e(yt.space.rotateRight())),a.translation&&("up"===o&&n.translationY&&e(yt.space.translateDown()),"down"===o&&n.translationY&&e(yt.space.translateUp()),"left"===o&&n.translationX&&e(yt.space.translateRight()),"right"===o&&n.translationX&&e(yt.space.translateLeft())),t.altKey&&t.shiftKey&&("up"===o&&n.translationZ&&e(yt.space.translateIn()),"down"===o&&n.translationZ&&e(yt.space.translateOut())),t.altKey&&!t.shiftKey&&("up"===o&&n.translationY&&e(yt.space.translateDown()),"down"===o&&n.translationY&&e(yt.space.translateUp()),"left"===o&&n.translationX&&e(yt.space.translateRight()),"right"===o&&n.translationX&&e(yt.space.translateLeft())),a.scale&&("down"===o&&n.scale&&e(yt.space.scaleUp()),"up"===o&&n.scale&&e(yt.space.scaleDown())),(t.metaKey||t.ctrlKey)&&("down"===o&&n.scale&&e(yt.space.scaleUp()),"up"===o&&n.scale&&e(yt.space.scaleDown()))})(E,t,r,n)}),[E,T.space.transformMode,T.space.transformLocks]),V=n.useCallback((()=>{const e=An(r),a=new t.space.tree.Tree({planes:e,configuration:T,view:f}).compute();I(a)}),[f,T]),B=a=>{const n=a.subscribe({topic:e.PLURID_PUBSUB_TOPIC.CONFIGURATION,callback:e=>{if(e.internal)return;const a=t.general.configuration.merge(e,T);"object"==typeof a.global.theme?("string"==typeof a.global.theme.general?g(h.default[a.global.theme.general]):g(a.global.theme.general),"string"==typeof a.global.theme.interaction?O(h.default[a.global.theme.interaction]):O(a.global.theme.interaction)):"string"==typeof a.global.theme&&(g(h.default[a.global.theme]),O(h.default[a.global.theme])),m(a)}}),r=a.subscribe({topic:e.PLURID_PUBSUB_TOPIC.SPACE_TRANSFORM,callback:e=>{const{value:t,internal:a}=e;a||S(t)}}),o=a.subscribe({topic:e.PLURID_PUBSUB_TOPIC.SPACE_ANIMATED_TRANSFORM,callback:e=>{const{value:t}=e;R(t.active),t.time?A(t.time):A(450)}}),i=a.subscribe({topic:e.PLURID_PUBSUB_TOPIC.SPACE_ROTATE_X_WITH,callback:e=>{const{value:t}=e;C(t)}}),l=a.subscribe({topic:e.PLURID_PUBSUB_TOPIC.SPACE_ROTATE_X_TO,callback:e=>{const{value:t}=e;b(t)}}),s=a.subscribe({topic:e.PLURID_PUBSUB_TOPIC.SPACE_ROTATE_Y_WITH,callback:e=>{const{value:t}=e;L(t)}}),c=a.subscribe({topic:e.PLURID_PUBSUB_TOPIC.SPACE_ROTATE_Y_TO,callback:e=>{const{value:t}=e;U(t)}}),u=a.subscribe({topic:e.PLURID_PUBSUB_TOPIC.SPACE_TRANSLATE_X_WITH,callback:e=>{const{value:t}=e;N(t)}}),d=a.subscribe({topic:e.PLURID_PUBSUB_TOPIC.SPACE_TRANSLATE_Y_WITH,callback:e=>{const{value:t}=e;P(t)}}),p=a.subscribe({topic:e.PLURID_PUBSUB_TOPIC.VIEW_ADD_PLANE,callback:e=>{const{plane:t}=e,a=[...f,t];D(a)}}),E=a.subscribe({topic:e.PLURID_PUBSUB_TOPIC.VIEW_SET_PLANES,callback:e=>{const{view:t}=e;D([...t])}}),_=a.subscribe({topic:e.PLURID_PUBSUB_TOPIC.VIEW_REMOVE_PLANE,callback:e=>{const{plane:t}=e,a=f.filter((e=>"string"!=typeof e||e===t));D(a)}});return()=>{a.unsubscribe(n,e.PLURID_PUBSUB_TOPIC.CONFIGURATION),a.unsubscribe(r,e.PLURID_PUBSUB_TOPIC.SPACE_TRANSFORM),a.unsubscribe(o,e.PLURID_PUBSUB_TOPIC.SPACE_ANIMATED_TRANSFORM),a.unsubscribe(i,e.PLURID_PUBSUB_TOPIC.SPACE_ROTATE_X_WITH),a.unsubscribe(l,e.PLURID_PUBSUB_TOPIC.SPACE_ROTATE_X_TO),a.unsubscribe(s,e.PLURID_PUBSUB_TOPIC.SPACE_ROTATE_Y_WITH),a.unsubscribe(c,e.PLURID_PUBSUB_TOPIC.SPACE_ROTATE_Y_TO),a.unsubscribe(u,e.PLURID_PUBSUB_TOPIC.SPACE_TRANSLATE_X_WITH),a.unsubscribe(d,e.PLURID_PUBSUB_TOPIC.SPACE_TRANSLATE_Y_WITH),a.unsubscribe(p,e.PLURID_PUBSUB_TOPIC.VIEW_ADD_PLANE),a.unsubscribe(E,e.PLURID_PUBSUB_TOPIC.VIEW_SET_PLANES),a.unsubscribe(_,e.PLURID_PUBSUB_TOPIC.VIEW_REMOVE_PLANE)}},k=t=>{const a={value:Object.assign({},p),internal:!0};t.publish({topic:e.PLURID_PUBSUB_TOPIC.SPACE_TRANSFORM,data:a}),t.publish({topic:e.PLURID_PUBSUB_TOPIC.CONFIGURATION,data:Object.assign(Object.assign({},T),{internal:!0})})},W=t=>{const{transformMode:a}=T.space,{velocity:n,distance:r,direction:o}=t;if(a===e.TRANSFORM_MODES.ALL)return;const i=a===e.TRANSFORM_MODES.ROTATION,l=a===e.TRANSFORM_MODES.TRANSLATION,s=a===e.TRANSFORM_MODES.SCALE;switch(R(!0),o){case 2:i&&L(60*n),l&&N(-1*r);break;case 4:i&&L(60*n),l&&N(r);break;case 8:i&&C(60*n),l&&P(-1*r),s&&v(n);break;case 16:i&&C(60*n),l&&P(r),s&&y(n)}setTimeout((()=>{R(!1)}),450)},Y=t=>{const{transformMode:a}=T.space,{velocity:n,distance:r,direction:o}=t;if(a===e.TRANSFORM_MODES.ALL)return;const i=a===e.TRANSFORM_MODES.ROTATION,l=a===e.TRANSFORM_MODES.TRANSLATION,s=a===e.TRANSFORM_MODES.SCALE,c=20*n,u=r/5,d=n/4;switch(o){case 2:i&&L(c),l&&N(-1*u);break;case 4:i&&L(c),l&&N(u);break;case 8:i&&C(c),l&&P(-1*u),s&&v(d);break;case 16:i&&C(c),l&&P(u),s&&y(d)}};n.useEffect((()=>(M.current&&(M.current.addEventListener("keydown",G,{passive:!1}),M.current.addEventListener("wheel",j,{passive:!1})),()=>{M.current&&(M.current.removeEventListener("keydown",G),M.current.removeEventListener("wheel",j))})),[M.current,T.space.transformMode,T.space.firstPerson]),n.useEffect((()=>{const e=l.meta.debounce((()=>{if(M&&M.current){const e=M.current.offsetWidth,t=M.current.offsetHeight;w({width:e,height:t})}}),150);return e(),window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e)}}),[]),n.useEffect((()=>(window.addEventListener("resize",V),()=>{window.removeEventListener("resize",V)})),[f,T]),n.useEffect((()=>{if("undefined"==typeof window)return;let t;return Pt(void 0,void 0,void 0,(function*(){const a=(yield Dt()).default,{transformTouch:n}=T.space;delete a.defaults.cssProps.userSelect,delete a.defaults.cssProps.userDrag,delete a.defaults.cssProps.tapHighlightColor,delete a.defaults.cssProps.touchSelect,M.current&&(t=new a(M.current),t.get("pan").set({direction:a.DIRECTION_ALL}),t.get("swipe").set({direction:a.DIRECTION_ALL}),n===e.TRANSFORM_TOUCHES.PAN?t.on("pan",Y):t.on("swipe",W))})),()=>{const{transformTouch:a}=T.space;a===e.TRANSFORM_TOUCHES.PAN?t&&t.off("pan",Y):t&&t.off("swipe",W)}}),[M.current,T.space.transformTouch]),n.useEffect((()=>{const e=e=>{navigator.getGamepads()[e.gamepad.index]},t=e=>{navigator.getGamepads()[e.gamepad.index]};return window.addEventListener("gamepadconnected",e),window.addEventListener("gamepaddisconnected",t),()=>{window.removeEventListener("gamepadconnected",e),window.removeEventListener("gamepaddisconnected",t)}}),[]),n.useEffect((()=>{const e=[];for(const t of x){const a=B(t);e.push(a)}return()=>{for(const t of e)t()}}),[x.length]),n.useEffect((()=>{for(const e of x)k(e)}),[x.length,T,p]),n.useEffect((()=>{V()}),[f]);const $={planesRegistrar:r,planeContext:i,planeContextValue:s,customPlane:o,planeNotFound:u,planeRenderError:d,registerPubSub:e=>{const t=[...x,e];F(t)}},H=0===f.length?_.default.createElement(_.default.Fragment,null):_.default.createElement(Rn,null);return _.default.createElement(Ft,{ref:M,tabIndex:0,transformMode:T.space.transformMode,"data-plurid-entity":e.PLURID_ENTITY_VIEW},_.default.createElement(xt,null),_.default.createElement(vt.Provider,{value:$},H))})),{registerPlanes:Cn}=t.planes;class bn extends n.Component{constructor(e,t){super(e),this.storeID=e.id||"default",this.context=t;const a=this.computeStore();this.store=Ut(a),this.subscribeStore()}componentDidUpdate(){const e=this.computeStore();this.store.dispatch({type:"SET_STATE",payload:e})}componentWillUnmount(){this.storeUnubscriber&&this.storeUnubscriber()}render(){return _.default.createElement(r.Provider,{store:this.store,context:Nt},_.default.createElement(In,Object.assign({},this.props)))}computeStore(){const{view:e,planes:a,configuration:n,precomputedState:r,planesRegistrar:o,id:i,useLocalStorage:l}=this.props;Cn(a,o);const s=this.store?this.store.getState():void 0,c=t.state.local.load(this.storeID,l),u=i&&this.context&&this.context.states[i]?this.context.states[i]:void 0;return t.state.compute(e,n,o,s,c,r,u)}subscribeStore(){this.store&&"undefined"!=typeof localStorage&&this.props.useLocalStorage&&(this.storeUnubscriber=this.store.subscribe((()=>{const e=this.store.getState(),t=JSON.stringify(e);localStorage.setItem("pluridState-"+this.storeID,t)})))}}bn.contextType=A;const Ln=S.default.div`
468
+ `,io=o.connect((e=>({stateLanguage:Rn.configuration.getConfiguration(e).global.language,spaceRotationX:Rn.space.getRotationX(e),spaceRotationY:Rn.space.getRotationY(e),stateAnimatedTransform:Rn.space.getAnimatedTransform(e),stateTransformTime:Rn.space.getTransformTime(e)})),(e=>({})),null,{context:Tn})((e=>{const{mouseOver:n,stateLanguage:o,spaceRotationX:i,spaceRotationY:l,stateAnimatedTransform:s,stateTransformTime:c}=e,[u,d]=r.useState(""),[p,f]=r.useState("");return r.useEffect((()=>{u||f("")}),[i,l]),x.default.createElement(no,null,x.default.createElement(ro,null,x.default.createElement(oo,{suppressHydrationWarning:!0,style:{transform:`\n translateX(32px)\n translateY(23px)\n rotateX(${i}deg)\n rotateY(${l}deg)\n `,transition:n||s?`transform ${c}ms ease-in-out`:""},onMouseLeave:()=>{d("")}},x.default.createElement(ao,{face:"front",faceText:a.internatiolate(o,t.internationalization.fields.viewcubeFront),mouseOver:n,hoveredZone:u,setHoveredZone:d,activeZone:p,setActiveZone:f}),x.default.createElement(ao,{face:"back",faceText:a.internatiolate(o,t.internationalization.fields.viewcubeBack),mouseOver:n,hoveredZone:u,setHoveredZone:d,activeZone:p,setActiveZone:f}),x.default.createElement(ao,{face:"left",faceText:a.internatiolate(o,t.internationalization.fields.viewcubeLeft),mouseOver:n,hoveredZone:u,setHoveredZone:d,activeZone:p,setActiveZone:f}),x.default.createElement(ao,{face:"right",faceText:a.internatiolate(o,t.internationalization.fields.viewcubeRight),mouseOver:n,hoveredZone:u,setHoveredZone:d,activeZone:p,setActiveZone:f}),x.default.createElement(ao,{face:"top",faceText:a.internatiolate(o,t.internationalization.fields.viewcubeTop),mouseOver:n,hoveredZone:u,setHoveredZone:d,activeZone:p,setActiveZone:f}),x.default.createElement(ao,{face:"base",faceText:a.internatiolate(o,t.internationalization.fields.viewcubeBase),mouseOver:n,hoveredZone:u,setHoveredZone:d,activeZone:p,setActiveZone:f}))))})),lo=o.connect((e=>({stateConfiguration:Rn.configuration.getConfiguration(e),stateInteractionTheme:Rn.themes.getInteractionTheme(e),stateTransformTime:Rn.space.getTransformTime(e)})),(e=>({dispatchRotateXWith:t=>e(On.space.rotateXWith(t)),dispatchRotateYWith:t=>e(On.space.rotateYWith(t)),dispatchSetAnimatedTransform:t=>e(On.space.setAnimatedTransform(t)),dispatchSpaceResetTransform:()=>e(On.space.spaceResetTransform())})),null,{context:Tn})((e=>{const{stateConfiguration:a,stateInteractionTheme:n,stateTransformTime:o,dispatchRotateXWith:i,dispatchRotateYWith:l,dispatchSetAnimatedTransform:s,dispatchSpaceResetTransform:c}=e,{elements:u,space:d}=a,{viewcube:f}=u,{buttons:m,conceal:g}=f,{fadeInTime:T}=d,[h,E]=r.useState(!1),[O,_]=r.useState(!1),S=(e,t)=>{switch(s(!0),e){case"rotateX":i(t);break;case"rotateY":l(t)}setTimeout((()=>{s(!1)}),o)};return r.useEffect((()=>{_(!0)}),[]),x.default.createElement(kr,{onMouseEnter:()=>E(!0),onMouseLeave:()=>E(!1),onMouseMove:()=>h?null:E(!0),conceal:g,mouseOver:h,isMounted:O,fadeInTime:T,"data-plurid-entity":t.PLURID_ENTITY_VIEWCUBE},x.default.createElement(io,{mouseOver:h}),h&&m&&x.default.createElement(x.default.Fragment,null,x.default.createElement(Gr,{style:{gridArea:"PVRotateUp"}},x.default.createElement(Br,{theme:n,onClick:()=>S("rotateX",-90.1)},"▲")),x.default.createElement(Gr,{theme:n,style:{gridArea:"PVRotateDown"}},x.default.createElement(Br,{theme:n,onClick:()=>S("rotateX",90.1)},"▼")),x.default.createElement(Gr,{theme:n,style:{gridArea:"PVRotateLeft"}},x.default.createElement(Br,{theme:n,onClick:()=>S("rotateY",90.1)},"◀")),x.default.createElement(Gr,{theme:n,style:{gridArea:"PVRotateRight"}},x.default.createElement(Br,{theme:n,onClick:()=>S("rotateY",-90.1)},"▶")),x.default.createElement(Yr,{onClick:e=>{e.ctrlKey||e.metaKey||(s(!0),c(),setTimeout((()=>{s(!1)}),o))}},x.default.createElement(p.PluridIconGlobal,null))))})),so=o.connect((e=>({stateConfiguration:Rn.configuration.getConfiguration(e)})),(e=>({})),null,{context:Tn})((e=>{const{stateConfiguration:t}=e,{elements:a}=t,{toolbar:n,viewcube:r}=a,o=n.show,i=r.show;return x.default.createElement(x.default.Fragment,null,x.default.createElement(Zn,null),o&&x.default.createElement(jr,null),i&&x.default.createElement(lo,null))})),{getRegisteredPlanes:co}=a.planes,uo=o.connect((e=>({stateConfiguration:Rn.configuration.getConfiguration(e),stateTransform:Rn.space.getTransform(e),stateSpaceLoading:Rn.space.getLoading(e),stateSpaceView:Rn.space.getView(e)})),(e=>({dispatch:e,dispatchSetConfiguration:t=>e(On.configuration.setConfiguration(t)),dispatchSetConfigurationMicro:()=>e(On.configuration.setConfigurationMicro()),dispatchSpaceSetViewSize:t=>e(On.space.setViewSize(t)),dispatchSetSpaceLoading:t=>e(On.space.setSpaceLoading(t)),dispatchSetAnimatedTransform:t=>e(On.space.setAnimatedTransform(t)),dispatchSetTransformTime:t=>e(On.space.setTransformTime(t)),dispatchSetSpaceLocation:t=>e(On.space.setSpaceLocation(t)),dispatchSetInitialTree:t=>e(On.space.setInitialTree(t)),dispatchSetTree:t=>e(On.space.setTree(t)),dispatchSetGeneralTheme:t=>e(On.themes.setGeneralTheme(t)),dispatchSetInteractionTheme:t=>e(On.themes.setInteractionTheme(t)),dispatchRotateX:t=>e(On.space.rotateX(t)),dispatchRotateXWith:t=>e(On.space.rotateXWith(t)),dispatchRotateY:t=>e(On.space.rotateY(t)),dispatchRotateYWith:t=>e(On.space.rotateYWith(t)),dispatchTranslateXWith:t=>e(On.space.translateXWith(t)),dispatchTranslateYWith:t=>e(On.space.translateYWith(t)),dispatchScaleUpWith:t=>e(On.space.scaleUpWith(t)),dispatchScaleDownWith:t=>e(On.space.scaleDownWith(t)),dispatchSpaceSetView:t=>e(On.space.spaceSetView(t))})),null,{context:Tn})((e=>{const{planesRegistrar:n,customPlane:o,planeContext:i,planeContextValue:l,pubsub:c,planeNotFound:u,planeRenderError:d,matchedRoute:p,stateConfiguration:f,stateTransform:m,stateSpaceView:g,dispatch:T,dispatchSetConfiguration:h,dispatchSetGeneralTheme:E,dispatchSetInteractionTheme:O,dispatchSetSpaceLocation:_,dispatchSetAnimatedTransform:S,dispatchSetTransformTime:R,dispatchSetTree:b,dispatchRotateXWith:A,dispatchRotateX:C,dispatchRotateYWith:I,dispatchRotateY:v,dispatchTranslateXWith:P,dispatchTranslateYWith:L,dispatchScaleUpWith:U,dispatchScaleDownWith:y,dispatchSpaceSetViewSize:w,dispatchSpaceSetView:N}=e,D=r.useRef(null),[M,F]=r.useState(c?[c]:[]),k=r.useCallback((e=>{const{transformLocks:a}=f.space;((e,a,n,r)=>{if(a.defaultPrevented)return;if(s.dom.verifyPathInputElement(a.path))return;const o=!(a.shiftKey||a.altKey||a.ctrlKey||a.metaKey);if("KeyF"===a.code&&o)return e(On.configuration.toggleConfigurationSpaceFirstPerson());if(n){if("KeyW"===a.code&&o&&r.translationZ)return e(On.space.viewCameraMoveForward());if("KeyS"===a.code&&o&&r.translationZ)return e(On.space.viewCameraMoveBackward());if("KeyA"===a.code&&o&&r.translationX)return e(On.space.viewCameraMoveLeft());if("KeyA"===a.code&&a.shiftKey&&r.rotationY)return e(On.space.viewCameraTurnLeft());if("KeyD"===a.code&&o&&r.translationX)return e(On.space.viewCameraMoveRight());if("KeyD"===a.code&&a.shiftKey&&r.rotationY)return e(On.space.viewCameraTurnRight());if("KeyQ"===a.code&&o&&r.rotationX)return e(On.space.viewCameraTurnUp());if("KeyZ"===a.code&&o&&r.rotationX)return e(On.space.viewCameraTurnDown());if("KeyE"===a.code&&o&&r.translationY)return e(On.space.viewCameraMoveUp());if("KeyC"===a.code&&o&&r.translationY)return e(On.space.viewCameraMoveDown())}if("KeyR"===a.code&&o)return e(On.configuration.setConfigurationSpaceTransformMode(t.TRANSFORM_MODES.ROTATION));if("KeyT"===a.code&&o)return e(On.configuration.setConfigurationSpaceTransformMode(t.TRANSFORM_MODES.TRANSLATION));if("KeyS"===a.code&&o&&!n)return e(On.configuration.setConfigurationSpaceTransformMode(t.TRANSFORM_MODES.SCALE));if("ArrowRight"===a.key){if(a.shiftKey&&r.rotationY)return e(On.space.rotateLeft());if(a.altKey&&r.translationX)return e(On.space.translateRight())}if("ArrowLeft"===a.key){if(a.shiftKey&&r.rotationY)return e(On.space.rotateRight());if(a.altKey&&r.translationX)return e(On.space.translateLeft())}if("ArrowUp"===a.key){if(a.shiftKey&&a.altKey&&r.translationZ)return e(On.space.translateIn());if(a.shiftKey&&!a.altKey&&r.rotationX)return e(On.space.rotateUp());if(a.altKey&&!a.shiftKey&&r.translationY)return e(On.space.translateUp());if(a.metaKey||a.ctrlKey&&r.scale)return e(On.space.scaleUp())}if("ArrowDown"===a.key){if(a.shiftKey&&a.altKey&&r.translationZ)return e(On.space.translateOut());if(a.shiftKey&&!a.altKey&&r.rotationX)return e(On.space.rotateDown());if(a.altKey&&!a.shiftKey&&r.translationY)return e(On.space.translateDown());if(a.metaKey||a.ctrlKey&&r.scale)e(On.space.scaleDown())}})(T,e,f.space.firstPerson,a)}),[f.space.firstPerson,f.space.transformLocks,T]),G=r.useCallback((e=>{const{transformMode:a,transformLocks:n}=f.space,r={rotation:a===t.TRANSFORM_MODES.ROTATION,translation:a===t.TRANSFORM_MODES.TRANSLATION,scale:a===t.TRANSFORM_MODES.SCALE};((e,t,a,n)=>{(t.shiftKey||t.metaKey||t.altKey||t.ctrlKey||a.rotation||a.translation||a.scale)&&t.preventDefault();const r={deltaX:t.deltaX,deltaY:t.deltaY},o=_n.getWheelDirection(r);a.rotation&&("left"===o&&n.rotationY&&e(On.space.rotateLeft()),"right"===o&&n.rotationY&&e(On.space.rotateRight()),"up"===o&&n.rotationX&&e(On.space.rotateUp()),"down"===o&&n.rotationX&&e(On.space.rotateDown())),t.shiftKey&&!t.altKey&&("up"===o&&n.rotationX&&e(On.space.rotateUp()),"down"===o&&n.rotationX&&e(On.space.rotateDown()),"left"===o&&n.rotationY&&e(On.space.rotateLeft()),"right"===o&&n.rotationY&&e(On.space.rotateRight())),a.translation&&("up"===o&&n.translationY&&e(On.space.translateDown()),"down"===o&&n.translationY&&e(On.space.translateUp()),"left"===o&&n.translationX&&e(On.space.translateRight()),"right"===o&&n.translationX&&e(On.space.translateLeft())),t.altKey&&t.shiftKey&&("up"===o&&n.translationZ&&e(On.space.translateIn()),"down"===o&&n.translationZ&&e(On.space.translateOut())),t.altKey&&!t.shiftKey&&("up"===o&&n.translationY&&e(On.space.translateDown()),"down"===o&&n.translationY&&e(On.space.translateUp()),"left"===o&&n.translationX&&e(On.space.translateRight()),"right"===o&&n.translationX&&e(On.space.translateLeft())),a.scale&&("down"===o&&n.scale&&e(On.space.scaleUp()),"up"===o&&n.scale&&e(On.space.scaleDown())),(t.metaKey||t.ctrlKey)&&("down"===o&&n.scale&&e(On.space.scaleUp()),"up"===o&&n.scale&&e(On.space.scaleDown()))})(T,e,r,n)}),[T,f.space.transformMode,f.space.transformLocks]),B=r.useCallback((()=>{const e=co(n),t=new a.space.tree.Tree({planes:e,configuration:f,view:g}).compute();b(t)}),[g,f]),Y=e=>{const n=e.subscribe({topic:t.PLURID_PUBSUB_TOPIC.CONFIGURATION,callback:e=>{if(e.internal)return;const t=a.general.configuration.merge(e,f);"object"==typeof t.global.theme?("string"==typeof t.global.theme.general?E(j.default[t.global.theme.general]):E(t.global.theme.general),"string"==typeof t.global.theme.interaction?O(j.default[t.global.theme.interaction]):O(t.global.theme.interaction)):"string"==typeof t.global.theme&&(E(j.default[t.global.theme]),O(j.default[t.global.theme])),h(t)}}),r=e.subscribe({topic:t.PLURID_PUBSUB_TOPIC.SPACE_TRANSFORM,callback:e=>{const{value:t,internal:a}=e;a||_(t)}}),o=e.subscribe({topic:t.PLURID_PUBSUB_TOPIC.SPACE_ANIMATED_TRANSFORM,callback:e=>{const{value:t}=e;S(t.active),t.time?R(t.time):R(450)}}),i=e.subscribe({topic:t.PLURID_PUBSUB_TOPIC.SPACE_ROTATE_X_WITH,callback:e=>{const{value:t}=e;A(t)}}),l=e.subscribe({topic:t.PLURID_PUBSUB_TOPIC.SPACE_ROTATE_X_TO,callback:e=>{const{value:t}=e;C(t)}}),s=e.subscribe({topic:t.PLURID_PUBSUB_TOPIC.SPACE_ROTATE_Y_WITH,callback:e=>{const{value:t}=e;I(t)}}),c=e.subscribe({topic:t.PLURID_PUBSUB_TOPIC.SPACE_ROTATE_Y_TO,callback:e=>{const{value:t}=e;v(t)}}),u=e.subscribe({topic:t.PLURID_PUBSUB_TOPIC.SPACE_TRANSLATE_X_WITH,callback:e=>{const{value:t}=e;P(t)}}),d=e.subscribe({topic:t.PLURID_PUBSUB_TOPIC.SPACE_TRANSLATE_Y_WITH,callback:e=>{const{value:t}=e;L(t)}}),p=e.subscribe({topic:t.PLURID_PUBSUB_TOPIC.VIEW_ADD_PLANE,callback:e=>{const{plane:t}=e,a=[...g,t];N(a)}}),m=e.subscribe({topic:t.PLURID_PUBSUB_TOPIC.VIEW_SET_PLANES,callback:e=>{const{view:t}=e;N([...t])}}),T=e.subscribe({topic:t.PLURID_PUBSUB_TOPIC.VIEW_REMOVE_PLANE,callback:e=>{const{plane:t}=e,a=g.filter((e=>"string"!=typeof e||e===t));N(a)}});return()=>{e.unsubscribe(n,t.PLURID_PUBSUB_TOPIC.CONFIGURATION),e.unsubscribe(r,t.PLURID_PUBSUB_TOPIC.SPACE_TRANSFORM),e.unsubscribe(o,t.PLURID_PUBSUB_TOPIC.SPACE_ANIMATED_TRANSFORM),e.unsubscribe(i,t.PLURID_PUBSUB_TOPIC.SPACE_ROTATE_X_WITH),e.unsubscribe(l,t.PLURID_PUBSUB_TOPIC.SPACE_ROTATE_X_TO),e.unsubscribe(s,t.PLURID_PUBSUB_TOPIC.SPACE_ROTATE_Y_WITH),e.unsubscribe(c,t.PLURID_PUBSUB_TOPIC.SPACE_ROTATE_Y_TO),e.unsubscribe(u,t.PLURID_PUBSUB_TOPIC.SPACE_TRANSLATE_X_WITH),e.unsubscribe(d,t.PLURID_PUBSUB_TOPIC.SPACE_TRANSLATE_Y_WITH),e.unsubscribe(p,t.PLURID_PUBSUB_TOPIC.VIEW_ADD_PLANE),e.unsubscribe(m,t.PLURID_PUBSUB_TOPIC.VIEW_SET_PLANES),e.unsubscribe(T,t.PLURID_PUBSUB_TOPIC.VIEW_REMOVE_PLANE)}},V=e=>{const a={value:Object.assign({},m),internal:!0};e.publish({topic:t.PLURID_PUBSUB_TOPIC.SPACE_TRANSFORM,data:a}),e.publish({topic:t.PLURID_PUBSUB_TOPIC.CONFIGURATION,data:Object.assign(Object.assign({},f),{internal:!0})})},$=e=>{const{transformMode:a}=f.space,{velocity:n,distance:r,direction:o}=e;if(a===t.TRANSFORM_MODES.ALL)return;const i=a===t.TRANSFORM_MODES.ROTATION,l=a===t.TRANSFORM_MODES.TRANSLATION,s=a===t.TRANSFORM_MODES.SCALE;switch(S(!0),o){case 2:i&&I(60*n),l&&P(-1*r);break;case 4:i&&I(60*n),l&&P(r);break;case 8:i&&A(60*n),l&&L(-1*r),s&&U(n);break;case 16:i&&A(60*n),l&&L(r),s&&y(n)}setTimeout((()=>{S(!1)}),450)},X=e=>{const{transformMode:a}=f.space,{velocity:n,distance:r,direction:o}=e;if(a===t.TRANSFORM_MODES.ALL)return;const i=a===t.TRANSFORM_MODES.ROTATION,l=a===t.TRANSFORM_MODES.TRANSLATION,s=a===t.TRANSFORM_MODES.SCALE,c=20*n,u=r/5,d=n/4;switch(o){case 2:i&&I(c),l&&P(-1*u);break;case 4:i&&I(c),l&&P(u);break;case 8:i&&A(c),l&&L(-1*u),s&&U(d);break;case 16:i&&A(c),l&&L(u),s&&y(d)}};r.useEffect((()=>(D.current&&(D.current.addEventListener("keydown",k,{passive:!1}),D.current.addEventListener("wheel",G,{passive:!1})),()=>{D.current&&(D.current.removeEventListener("keydown",k),D.current.removeEventListener("wheel",G))})),[D.current,f.space.transformMode,f.space.firstPerson]),r.useEffect((()=>{const e=s.meta.debounce((()=>{if(D&&D.current){const e=D.current.offsetWidth,t=D.current.offsetHeight;w({width:e,height:t})}}),150);return e(),window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e)}}),[]),r.useEffect((()=>(window.addEventListener("resize",B),()=>{window.removeEventListener("resize",B)})),[g,f]),r.useEffect((()=>{if("undefined"==typeof window)return;let e;return hn(void 0,void 0,void 0,(function*(){const a=(yield Sn()).default,{transformTouch:n}=f.space;delete a.defaults.cssProps.userSelect,delete a.defaults.cssProps.userDrag,delete a.defaults.cssProps.tapHighlightColor,delete a.defaults.cssProps.touchSelect,D.current&&(e=new a(D.current),e.get("pan").set({direction:a.DIRECTION_ALL}),e.get("swipe").set({direction:a.DIRECTION_ALL}),n===t.TRANSFORM_TOUCHES.PAN?e.on("pan",X):e.on("swipe",$))})),()=>{const{transformTouch:a}=f.space;a===t.TRANSFORM_TOUCHES.PAN?e&&e.off("pan",X):e&&e.off("swipe",$)}}),[D.current,f.space.transformTouch]),r.useEffect((()=>{const e=e=>{navigator.getGamepads()[e.gamepad.index]},t=e=>{navigator.getGamepads()[e.gamepad.index]};return window.addEventListener("gamepadconnected",e),window.addEventListener("gamepaddisconnected",t),()=>{window.removeEventListener("gamepadconnected",e),window.removeEventListener("gamepaddisconnected",t)}}),[]),r.useEffect((()=>{const e=[];for(const t of M){const a=Y(t);e.push(a)}return()=>{for(const t of e)t()}}),[M.length]),r.useEffect((()=>{for(const e of M)V(e)}),[M.length,f,m]),r.useEffect((()=>{B()}),[g]);const W={planesRegistrar:n,planeContext:i,planeContextValue:l,customPlane:o,planeNotFound:u,planeRenderError:d,matchedRoute:p,registerPubSub:e=>{const t=[...M,e];F(t)}},z=0===g.length?x.default.createElement(x.default.Fragment,null):x.default.createElement(so,null);return x.default.createElement(An,{ref:D,tabIndex:0,transformMode:f.space.transformMode,"data-plurid-entity":t.PLURID_ENTITY_VIEW},x.default.createElement(bn,null),x.default.createElement(En.Provider,{value:W},z))})),{registerPlanes:po}=a.planes;class fo extends r.Component{constructor(e,t){super(e),this.storeID=e.id||"default",this.context=t;const a=this.computeStore();this.store=gn(a),this.subscribeStore()}componentDidUpdate(){const e=this.computeStore();this.store.dispatch({type:"SET_STATE",payload:e})}componentWillUnmount(){this.storeUnubscriber&&this.storeUnubscriber()}render(){return x.default.createElement(o.Provider,{store:this.store,context:Tn},x.default.createElement(uo,Object.assign({},this.props)))}computeStore(){const{view:e,planes:t,configuration:n,precomputedState:r,planesRegistrar:o,id:i,useLocalStorage:l}=this.props;po(t,o);const s=this.store?this.store.getState():void 0,c=a.state.local.load(this.storeID,l),u=i&&this.context&&this.context.states[i]?this.context.states[i]:void 0;return a.state.compute(e,n,o,s,c,r,u)}subscribeStore(){this.store&&"undefined"!=typeof localStorage&&this.props.useLocalStorage&&(this.storeUnubscriber=this.store.subscribe((()=>{const e=this.store.getState(),t=JSON.stringify(e);localStorage.setItem("pluridState-"+this.storeID,t)})))}}fo.contextType=B;const mo=k.default.div`
469
469
  scroll-snap-type: ${e=>{const{alignment:t,snapType:a}=e;return"none"===a?"none":t+" "+a}};
470
470
 
471
471
  flex-direction: ${e=>{const{alignment:t}=e;return"x"===t?"row":"column"}};
@@ -476,7 +476,7 @@
476
476
  height: 100vh;
477
477
  height: -webkit-fill-available;
478
478
  width: 100vw;
479
- `,{resolvePluridRoutePlaneData:Un,Registrar:Nn}=t.planes,Pn=(a,n,r,o)=>{if(o||"RoutePlane"===(null==a?void 0:a.kind)){const e=o||a;if(!e)return()=>()=>_.default.createElement(_.default.Fragment,null);return vn(e,n)}if(!a){const e=r.match("/not-found","route");if(e&&"Route"===e.kind){return Pn(e,n,r)}return()=>()=>_.default.createElement(_.default.Fragment,null)}const{exterior:i,view:s,planes:c,spaces:u,defaultConfiguration:d,slotted:T}=a.data,p={value:a.match.value,parameters:a.match.parameters,query:a.match.query};let f;return qt(i)&&(f=i,f&&(f.displayName="PluridRouteExterior")),!i||!f||s||c||u?s?()=>{const e=new g.default,t=_.default.createElement(bn,{view:s,planesRegistrar:n,configuration:d,pubsub:e});return()=>_.default.createElement(_.default.Fragment,null,f&&_.default.createElement(f,{plurid:p,pubsub:e,spaces:T?[t]:void 0}),!T&&_.default.createElement(_.default.Fragment,null,t))}:(a=>{var n,r,o,i,s,c;if("Route"!==a.kind)return()=>()=>_.default.createElement(_.default.Fragment,null);const u="http",d="localhost:63000",{match:T,data:p}=a,{parameters:f,query:E}=T,m={value:T.value,parameters:f,query:E},{exterior:g,planes:O,spaces:h,slotted:S}=a.data,R=(null===(n=p.multispace)||void 0===n?void 0:n.alignment)||"y",A=(null===(r=p.multispace)||void 0===r?void 0:r.snapType)||"mandatory";let I=()=>_.default.createElement(_.default.Fragment,null);qt(g)&&(I=g);let C=()=>_.default.createElement(_.default.Fragment,null);const b=[];if(h)for(const a of h){const n=[],r=[];if(a.planes)for(const o of a.planes){const i=Un(o),{component:l}=i,s=[u,d,p.value===e.PLURID_ROUTE_DEFAULT_PATH_VALUE?e.PLURID_ROUTE_DEFAULT_PATH:t.utilities.cleanPathElement(p.value),a.value===e.PLURID_ROUTE_DEFAULT_SPACE_VALUE?e.PLURID_ROUTE_DEFAULT_SPACE:t.utilities.cleanPathElement(a.value),e.PLURID_ROUTE_DEFAULT_UNIVERSE,e.PLURID_ROUTE_DEFAULT_CLUSTER,t.utilities.cleanPathElement(i.value)].join(e.PLURID_ROUTE_SEPARATOR),c={component:l,route:s};n.push(c),r.push(s)}if(a.universes)for(const o of a.universes){if(o.clusters)for(const i of o.clusters)for(const l of i.planes){const s=Un(l),{component:c}=s,T=[u,d,p.value===e.PLURID_ROUTE_DEFAULT_PATH_VALUE?e.PLURID_ROUTE_DEFAULT_PATH:t.utilities.cleanPathElement(p.value),a.value===e.PLURID_ROUTE_DEFAULT_SPACE_VALUE?e.PLURID_ROUTE_DEFAULT_SPACE:t.utilities.cleanPathElement(a.value),o.value===e.PLURID_ROUTE_DEFAULT_UNIVERSE_VALUE?e.PLURID_ROUTE_DEFAULT_UNIVERSE:t.utilities.cleanPathElement(o.value),i.value===e.PLURID_ROUTE_DEFAULT_CLUSTER_VALUE?e.PLURID_ROUTE_DEFAULT_CLUSTER:t.utilities.cleanPathElement(i.value),t.utilities.cleanPathElement(s.value)].join(e.PLURID_ROUTE_SEPARATOR),f={component:c,route:T};n.push(f),p.view?p.view.includes(s.value)&&r.push(T):r.push(T)}if(o.planes)for(const i of o.planes){const l=Un(i),{component:s}=l,c=[u,d,p.value===e.PLURID_ROUTE_DEFAULT_PATH_VALUE?e.PLURID_ROUTE_DEFAULT_PATH:t.utilities.cleanPathElement(p.value),a.value===e.PLURID_ROUTE_DEFAULT_SPACE_VALUE?e.PLURID_ROUTE_DEFAULT_SPACE:t.utilities.cleanPathElement(a.value),o.value===e.PLURID_ROUTE_DEFAULT_UNIVERSE_VALUE?e.PLURID_ROUTE_DEFAULT_UNIVERSE:t.utilities.cleanPathElement(o.value),e.PLURID_ROUTE_DEFAULT_CLUSTER,t.utilities.cleanPathElement(l.value)].join(e.PLURID_ROUTE_SEPARATOR),T={component:s,route:c};n.push(T),r.push(c)}}const o=new Nn,i=_.default.createElement(bn,{key:l.uuid.generate(),id:p.value,planes:n,view:r,configuration:a.configuration,planesRegistrar:o});b.push(i)}if(O){const a=[],n=[];for(const r of O){const o=Un(r),{component:i}=o,l=[u,d,p.value===e.PLURID_ROUTE_DEFAULT_PATH_VALUE?e.PLURID_ROUTE_DEFAULT_PATH:t.utilities.cleanPathElement(p.value),e.PLURID_ROUTE_DEFAULT_SPACE,e.PLURID_ROUTE_DEFAULT_UNIVERSE,e.PLURID_ROUTE_DEFAULT_CLUSTER,t.utilities.cleanPathElement(o.value)].join(e.PLURID_ROUTE_SEPARATOR),s={component:i,route:l};a.push(s),p.view?p.view.includes(o.value)&&n.push(l):n.push(l)}const r=_.default.createElement(bn,{key:l.uuid.generate(),id:p.value,planes:a,view:n,configuration:p.defaultConfiguration});b.push(r)}let L,U;return qt(null===(o=p.multispace)||void 0===o?void 0:o.header)&&(L=null===(i=p.multispace)||void 0===i?void 0:i.header),qt(null===(s=p.multispace)||void 0===s?void 0:s.footer)&&(U=null===(c=p.multispace)||void 0===c?void 0:c.footer),C=()=>_.default.createElement(Ln,{alignment:R,snapType:A,"data-plurid-entity":e.PLURID_ENTITY_MULTISPACE},L&&_.default.createElement(L,{plurid:m}),b,U&&_.default.createElement(U,{plurid:m})),()=>()=>_.default.createElement(_.default.Fragment,null,g&&_.default.createElement(I,{spaces:S?b:void 0,plurid:m}),(h||O)&&!S&&_.default.createElement(C,null))})(a):()=>()=>_.default.createElement(_.default.Fragment,null,f&&_.default.createElement(f,{plurid:p}))},vn=(e,t)=>{if(e.match.query.flat){const a=e.match.query.flat.toLowerCase();if("true"===a||"1"===a){const a=t.get(e.match.value);if(a){const e=a.component;if("function"!=typeof e)return()=>()=>_.default.createElement(_.default.Fragment,null);return()=>()=>_.default.createElement(_.default.Fragment,null,_.default.createElement(e,null))}}}return()=>()=>_.default.createElement(_.default.Fragment,null,_.default.createElement(bn,{view:[e.match.value],planesRegistrar:t}))},{Registrar:yn}=t.planes,{IsoMatcher:wn}=t.routing,Dn=t=>{const{routes:a,planes:r,exterior:o,shell:i,static:s,view:c,cleanNavigation:u,notFoundPath:d}=t,p=d||"/not-found",f=((e,t)=>{const a=[];for(const t of e){if(t.planes)for(const e of t.planes){const n=Un(e),r={route:n.link?n.link:n.value.startsWith("/")?n.value:t.value+"/"+n.value,component:n.component};a.push(r)}t.spaces}if(t)for(const e of t){const t=Un(e),n={route:t.value,component:t.component};a.push(n)}return a})(a,r),E=n.useRef(new yn(f)),m=n.useRef(new wn({routes:a,routePlanes:r})),g=T.useMounted(),[O,h]=n.useState((e=>e?e.path:"undefined"!=typeof window?window.location.pathname+window.location.search:"/")(s)),[S,R]=n.useState(m.current.match(O,"route")),[A,I]=n.useState(Pn(S,E.current,m.current,s&&s.directPlane?m.current.match(s.directPlane,"route"):void 0)),C=e=>{let t;e&&e.detail&&e.detail.path&&!t&&(t=e.detail.path),u&&c&&!t&&(t=c);const a=window.location.pathname;t||(t=a+window.location.search),h(t)};let b;n.useEffect((()=>(window.addEventListener("popstate",C),window.addEventListener(e.PLURID_ROUTER_LOCATION_CHANGED,C),()=>{window.removeEventListener("popstate",C),window.removeEventListener(e.PLURID_ROUTER_LOCATION_CHANGED,C)})),[]),n.useEffect((()=>{if(!g)return;u||location.pathname!==O&&history.pushState(null,"",O);let e=m.current.match(O,"route");if(e&&"RoutePlane"===e.kind){const t=vn(e,E.current);return R(e),void I(t)}e||(e=m.current.match(p,"route")),R(e),I(Pn(e,E.current,m.current))}),[g,O]),n.useEffect((()=>{if(!S)return;if("Route"!==S.kind)return;const t=S.match.value;l.storage.saveState(t,e.PLURID_ROUTER_STORAGE);const a=new CustomEvent(e.PLURID_ROUTER_LOCATION_STORED,{detail:{path:t}});window.dispatchEvent(a)}),[u,S]),qt(o)&&(b=o,b&&(b.displayName="PluridRouterExterior"));let L=({children:e})=>_.default.createElement(_.default.Fragment,null,e);return qt(i)&&(L=i,L&&(L.displayName="PluridRouterShell")),_.default.createElement(_.default.Fragment,null,b&&_.default.createElement(b,{matchedRoute:S}),_.default.createElement(L,{matchedRoute:S},_.default.createElement(A,null)))},Mn=e=>{const{path:t,directPlane:a,routes:n,planes:r,exterior:o,shell:i,protocol:l,host:s,gateway:c,gatewayQuery:u,gatewayEndpoint:d}=e,T=l||"http",p=s||"localhost:63000";return _.default.createElement(Dn,{routes:n,planes:r,exterior:o,shell:i,static:{path:t,directPlane:a},protocol:T,host:p})};class xn extends n.Component{constructor(e){super(e),this.properties=e}render(){const{metastate:e,children:t}=this.properties;return _.default.createElement(A.Provider,{value:e},t)}}xn.displayName="PluridProvider";const Fn={x:0,y:0},Gn=e=>{const{elementID:t,rootID:a,children:n}=e,r=T.usePortal(t,a);return p.createPortal(n,r)},jn=S.default.div`
479
+ `,{resolvePluridRoutePlaneData:go,Registrar:To}=a.planes,ho=(e,n,r,o)=>{if(o||"RoutePlane"===(null==e?void 0:e.kind)){const t=o||e;if(!t)return()=>()=>x.default.createElement(x.default.Fragment,null);return Eo(t,n)}if(!e){const e=r.match("/not-found","route");if(e&&"Route"===e.kind){return ho(e,n,r)}return()=>()=>x.default.createElement(x.default.Fragment,null)}const{exterior:i,view:l,planes:c,spaces:u,defaultConfiguration:d,slotted:p}=e.data,f={value:e.match.value,parameters:e.match.parameters,query:e.match.query};let m;return jn(i)&&(m=i,m&&(m.displayName="PluridRouteExterior")),!i||!m||l||c||u?l?()=>{const t=new M.default,a=x.default.createElement(fo,{view:l,planesRegistrar:n,configuration:d,pubsub:t,matchedRoute:e});return()=>x.default.createElement(x.default.Fragment,null,m&&x.default.createElement(m,{plurid:f,pubsub:t,spaces:p?[a]:void 0}),!p&&x.default.createElement(x.default.Fragment,null,a))}:(e=>{var n,r,o,i,l,c;if("Route"!==e.kind)return()=>()=>x.default.createElement(x.default.Fragment,null);const u="http",d="localhost:63000",{match:p,data:f}=e,{parameters:m,query:g}=p,T={value:p.value,parameters:m,query:g},{exterior:h,planes:E,spaces:O,slotted:_}=e.data,S=(null===(n=f.multispace)||void 0===n?void 0:n.alignment)||"y",R=(null===(r=f.multispace)||void 0===r?void 0:r.snapType)||"mandatory";let b=()=>x.default.createElement(x.default.Fragment,null);jn(h)&&(b=h);let A=()=>x.default.createElement(x.default.Fragment,null);const C=[];if(O)for(const e of O){const n=[],r=[];if(e.planes)for(const o of e.planes){const i=go(o),{component:l}=i,s=[u,d,f.value===t.PLURID_ROUTE_DEFAULT_PATH_VALUE?t.PLURID_ROUTE_DEFAULT_PATH:a.utilities.cleanPathElement(f.value),e.value===t.PLURID_ROUTE_DEFAULT_SPACE_VALUE?t.PLURID_ROUTE_DEFAULT_SPACE:a.utilities.cleanPathElement(e.value),t.PLURID_ROUTE_DEFAULT_UNIVERSE,t.PLURID_ROUTE_DEFAULT_CLUSTER,a.utilities.cleanPathElement(i.value)].join(t.PLURID_ROUTE_SEPARATOR),c={component:l,route:s};n.push(c),r.push(s)}if(e.universes)for(const o of e.universes){if(o.clusters)for(const i of o.clusters)for(const l of i.planes){const s=go(l),{component:c}=s,p=[u,d,f.value===t.PLURID_ROUTE_DEFAULT_PATH_VALUE?t.PLURID_ROUTE_DEFAULT_PATH:a.utilities.cleanPathElement(f.value),e.value===t.PLURID_ROUTE_DEFAULT_SPACE_VALUE?t.PLURID_ROUTE_DEFAULT_SPACE:a.utilities.cleanPathElement(e.value),o.value===t.PLURID_ROUTE_DEFAULT_UNIVERSE_VALUE?t.PLURID_ROUTE_DEFAULT_UNIVERSE:a.utilities.cleanPathElement(o.value),i.value===t.PLURID_ROUTE_DEFAULT_CLUSTER_VALUE?t.PLURID_ROUTE_DEFAULT_CLUSTER:a.utilities.cleanPathElement(i.value),a.utilities.cleanPathElement(s.value)].join(t.PLURID_ROUTE_SEPARATOR),m={component:c,route:p};n.push(m),f.view?f.view.includes(s.value)&&r.push(p):r.push(p)}if(o.planes)for(const i of o.planes){const l=go(i),{component:s}=l,c=[u,d,f.value===t.PLURID_ROUTE_DEFAULT_PATH_VALUE?t.PLURID_ROUTE_DEFAULT_PATH:a.utilities.cleanPathElement(f.value),e.value===t.PLURID_ROUTE_DEFAULT_SPACE_VALUE?t.PLURID_ROUTE_DEFAULT_SPACE:a.utilities.cleanPathElement(e.value),o.value===t.PLURID_ROUTE_DEFAULT_UNIVERSE_VALUE?t.PLURID_ROUTE_DEFAULT_UNIVERSE:a.utilities.cleanPathElement(o.value),t.PLURID_ROUTE_DEFAULT_CLUSTER,a.utilities.cleanPathElement(l.value)].join(t.PLURID_ROUTE_SEPARATOR),p={component:s,route:c};n.push(p),r.push(c)}}const o=new To,i=x.default.createElement(fo,{key:s.uuid.generate(),id:f.value,planes:n,view:r,configuration:e.configuration,planesRegistrar:o});C.push(i)}if(E){const e=[],n=[];for(const r of E){const o=go(r),{component:i}=o,l=[u,d,f.value===t.PLURID_ROUTE_DEFAULT_PATH_VALUE?t.PLURID_ROUTE_DEFAULT_PATH:a.utilities.cleanPathElement(f.value),t.PLURID_ROUTE_DEFAULT_SPACE,t.PLURID_ROUTE_DEFAULT_UNIVERSE,t.PLURID_ROUTE_DEFAULT_CLUSTER,a.utilities.cleanPathElement(o.value)].join(t.PLURID_ROUTE_SEPARATOR),s={component:i,route:l};e.push(s),f.view?f.view.includes(o.value)&&n.push(l):n.push(l)}const r=x.default.createElement(fo,{key:s.uuid.generate(),id:f.value,planes:e,view:n,configuration:f.defaultConfiguration});C.push(r)}let I,v;return jn(null===(o=f.multispace)||void 0===o?void 0:o.header)&&(I=null===(i=f.multispace)||void 0===i?void 0:i.header),jn(null===(l=f.multispace)||void 0===l?void 0:l.footer)&&(v=null===(c=f.multispace)||void 0===c?void 0:c.footer),A=()=>x.default.createElement(mo,{alignment:S,snapType:R,"data-plurid-entity":t.PLURID_ENTITY_MULTISPACE},I&&x.default.createElement(I,{plurid:T}),C,v&&x.default.createElement(v,{plurid:T})),()=>()=>x.default.createElement(x.default.Fragment,null,h&&x.default.createElement(b,{spaces:_?C:void 0,plurid:T}),(O||E)&&!_&&x.default.createElement(A,null))})(e):()=>()=>x.default.createElement(x.default.Fragment,null,m&&x.default.createElement(m,{plurid:f}))},Eo=(e,t)=>{if(e.match.query.flat){const a=e.match.query.flat.toLowerCase();if("true"===a||"1"===a){const a=t.get(e.match.value);if(a){const e=a.component;if("function"!=typeof e)return()=>()=>x.default.createElement(x.default.Fragment,null);return()=>()=>x.default.createElement(x.default.Fragment,null,x.default.createElement(e,null))}}}const{defaultConfiguration:a}=null==e?void 0:e.data;return()=>()=>x.default.createElement(x.default.Fragment,null,x.default.createElement(fo,{view:[e.match.value],planesRegistrar:t,configuration:a}))},{Registrar:Oo}=a.planes,{IsoMatcher:_o}=a.routing,So=e=>{const{routes:a,planes:n,exterior:o,shell:i,static:l,view:c,cleanNavigation:u,notFoundPath:d}=e,p=d||"/not-found",m=((e,t)=>{const a=[];for(const t of e){if(t.planes)for(const e of t.planes){const n=go(e),r={route:n.link?n.link:n.value.startsWith("/")?n.value:t.value+"/"+n.value,component:n.component};a.push(r)}t.spaces}if(t)for(const e of t){const t=go(e),n={route:t.value,component:t.component};a.push(n)}return a})(a,n),g=r.useRef(new Oo(m)),T=r.useRef(new _o({routes:a,routePlanes:n})),h=f.useMounted(),[E,O]=r.useState((e=>e?e.path:"undefined"!=typeof window?window.location.pathname+window.location.search:"/")(l)),[_,S]=r.useState(T.current.match(E,"route")),[R,b]=r.useState(ho(_,g.current,T.current,l&&l.directPlane?T.current.match(l.directPlane,"route"):void 0)),A=e=>{let t;e&&e.detail&&e.detail.path&&!t&&(t=e.detail.path),u&&c&&!t&&(t=c);const a=window.location.pathname;t||(t=a+window.location.search),O(t)};let C;r.useEffect((()=>(window.addEventListener("popstate",A),window.addEventListener(t.PLURID_ROUTER_LOCATION_CHANGED,A),()=>{window.removeEventListener("popstate",A),window.removeEventListener(t.PLURID_ROUTER_LOCATION_CHANGED,A)})),[]),r.useEffect((()=>{if(!h)return;u||location.pathname!==E&&history.pushState(null,"",E);let e=T.current.match(E,"route");if(e&&"RoutePlane"===e.kind){const t=Eo(e,g.current);return S(e),void b(t)}e||(e=T.current.match(p,"route")),S(e),b(ho(e,g.current,T.current))}),[h,E]),r.useEffect((()=>{if(!_)return;if("Route"!==_.kind)return;const e=_.match.value;s.storage.saveState(e,t.PLURID_ROUTER_STORAGE);const a=new CustomEvent(t.PLURID_ROUTER_LOCATION_STORED,{detail:{path:e}});window.dispatchEvent(a)}),[u,_]),jn(o)&&(C=o,C&&(C.displayName="PluridRouterExterior"));let I=({children:e})=>x.default.createElement(x.default.Fragment,null,e);return jn(i)&&(I=i,I&&(I.displayName="PluridRouterShell")),x.default.createElement(x.default.Fragment,null,C&&x.default.createElement(C,{matchedRoute:_}),x.default.createElement(I,{matchedRoute:_},x.default.createElement(R,null)))},Ro=e=>{const{path:t,directPlane:a,routes:n,planes:r,exterior:o,shell:i,protocol:l,host:s,gateway:c,gatewayQuery:u,gatewayEndpoint:d}=e,p=l||"http",f=s||"localhost:63000";return x.default.createElement(So,{routes:n,planes:r,exterior:o,shell:i,static:{path:t,directPlane:a},protocol:p,host:f})};class bo extends r.Component{constructor(e){super(e),this.properties=e}render(){const{metastate:e,children:t}=this.properties;return x.default.createElement(B.Provider,{value:e},t)}}bo.displayName="PluridProvider";const Ao={x:0,y:0},Co=e=>{const{elementID:t,rootID:a,children:n}=e,r=f.usePortal(t,a);return m.createPortal(n,r)},Io=k.default.div`
480
480
  position: absolute;
481
481
  min-width: 600px;
482
482
  min-height: 300px;
@@ -486,7 +486,7 @@
486
486
  left: ${({linkCoordinates:e})=>e.x+5+"px"};
487
487
  background-color: ${({theme:e})=>e.backgroundColorSecondary};
488
488
  box-shadow: ${({theme:e})=>e.boxShadowUmbra};
489
- `,{getPlanesRegistrar:Vn}=t.planes,Bn=r.connect((e=>({stateGeneralTheme:Mt.themes.getGeneralTheme(e),stateInteractionTheme:Mt.themes.getInteractionTheme(e)})),(e=>({})),null,{context:Nt})((e=>{const{planeID:t,linkCoordinates:a,stateGeneralTheme:r}=e,o=n.useContext(vt);if(!o)return _.default.createElement(_.default.Fragment,null);const{planesRegistrar:i}=o,l=Vn(i);if(!l)return _.default.createElement(_.default.Fragment,null);const s=l.get(t);if(!s)return _.default.createElement(_.default.Fragment,null);const c=s.component;return"function"!=typeof c?_.default.createElement(_.default.Fragment,null):_.default.createElement(jn,{theme:r,linkCoordinates:a},_.default.createElement(c,null))})),kn=S.default.a`
489
+ `,{getPlanesRegistrar:vo}=a.planes,Po=o.connect((e=>({stateGeneralTheme:Rn.themes.getGeneralTheme(e),stateInteractionTheme:Rn.themes.getInteractionTheme(e)})),(e=>({})),null,{context:Tn})((e=>{const{planeID:t,linkCoordinates:a,stateGeneralTheme:n}=e,o=r.useContext(En);if(!o)return x.default.createElement(x.default.Fragment,null);const{planesRegistrar:i}=o,l=vo(i);if(!l)return x.default.createElement(x.default.Fragment,null);const s=l.get(t);if(!s)return x.default.createElement(x.default.Fragment,null);const c=s.component;return"function"!=typeof c?x.default.createElement(x.default.Fragment,null):x.default.createElement(Io,{theme:n,linkCoordinates:a},x.default.createElement(c,null))})),Lo=k.default.a`
490
490
  /**
491
491
  * Forces element to go to the second row if inlined.
492
492
  */
@@ -502,23 +502,24 @@
502
502
  ::after {
503
503
  content: "${({devisible:e,suffix:t})=>e?"":t||"'"}";
504
504
  }
505
- `,{resolveRoute:Wn,computePlaneAddress:Yn}=t.routing,{getPlanesRegistrar:$n,getPluridPlaneIDByData:Hn}=t.planes;var Xn=r.connect((e=>({stateTree:Mt.space.getTree(e),stateGeneralTheme:Mt.themes.getGeneralTheme(e),stateConfiguration:Mt.configuration.getConfiguration(e),stateViewSize:Mt.space.getViewSize(e)})),(e=>({dispatchSetTree:t=>e(yt.space.setTree(t)),dispatchUpdateSpaceLinkCoordinates:t=>e(yt.space.updateSpaceLinkCoordinates(t))})),null,{context:Nt})((a=>{const{children:r,route:o,devisible:i,suffix:l,atClick:s,style:c,className:u,stateTree:d,stateGeneralTheme:T,stateConfiguration:p,stateViewSize:f,dispatchSetTree:E,dispatchUpdateSpaceLinkCoordinates:m}=a,g=p.elements.plane.controls.show,O=e.PLURID_DEFAULT_CONFIGURATION_LINK_PREVIEW_FADE_IN,h=e.PLURID_DEFAULT_CONFIGURATION_LINK_PREVIEW_FADE_OUT,S=Yn(o),R=Wn(S,p.network.protocol,p.network.host),A=n.useContext(vt);if(!A)return _.default.createElement(_.default.Fragment,null,r);const{planesRegistrar:I}=A,C=$n(I);if(!C)return _.default.createElement(_.default.Fragment,null,r);const b=n.useRef(null),L=n.useRef(null),U=n.useRef(null),[N,P]=n.useState(!1),[v,y]=n.useState(!1),[w,D]=n.useState(!1),[M,x]=n.useState(""),[F,G]=n.useState(""),[j,V]=n.useState(""),[B,k]=n.useState(Fn),[W,Y]=n.useState(null!=l?l:e.PLURID_DEFAULT_CONFIGURATION_LINK_SUFFIX),[$,H]=n.useState(null!=i&&i),X=()=>{const e=b.current;if(!e)return Object.assign({},Fn);let t=0,a=0,n=!1,r=e,o=!0,i=0,l=0;for(;o;)if("static"!==window.getComputedStyle(r).position||n||(t+=r.offsetTop,a+=r.offsetLeft,n=!0),"relative"===window.getComputedStyle(r).position&&(i+=t,l+=a,t=0,a=0,n=!1),r.scrollLeft&&(l+=-r.scrollLeft),r.scrollTop&&(i+=-r.scrollTop),r.parentElement){"PluridPlane"===r.parentElement.dataset.pluridEntity&&(o=!1),r=r.parentElement}else o=!1;const s=g?56:0;return{x:l+e.offsetWidth,y:i+s}},z=()=>{w||F?(()=>{const e=t.space.tree.logic.togglePlaneFromTree(d,F);E(e),D((e=>!e)),y(!1)})():(()=>{if(!j||!R)return;const{route:e}=R,a=X(),{pluridPlaneID:n,updatedTree:r}=t.space.tree.logic.updateTreeWithNewPlane(e,j,a,d,C.getAll(),p);n&&(E(r),D(!0),G(n))})()},Z=n.useCallback((e=>{e.preventDefault(),void 0!==s&&s(e),z()}),[b.current,d]);return n.useEffect((()=>{void 0!==l&&Y(l),void 0!==i&&H(i)}),[l,i]),n.useEffect((()=>{w&&(()=>{const e=X();m({planeID:F,linkCoordinates:e})})()}),[f]),n.useEffect((()=>{const e=Hn(b.current);V(e);const t=X();k(t)}),[]),n.useEffect((()=>(N&&U.current&&(L.current=setTimeout((()=>{y(!0)}),O),clearTimeout(U.current)),N||(U.current=setTimeout((()=>{y(!1),L.current&&clearTimeout(L.current)}),h)),()=>{U.current&&clearTimeout(U.current),L.current&&clearTimeout(L.current)})),[N]),n.useEffect((()=>{}),[]),_.default.createElement(kn,{ref:b,onClick:e=>Z(e),onMouseEnter:()=>P(!0),onMouseLeave:()=>P(!1),theme:T,suffix:W,devisible:$,style:Object.assign({},c),className:u,"data-plurid-entity":e.PLURID_ENTITY_LINK},r,v&&!w&&_.default.createElement(Gn,{elementID:`preview-${j}`,rootID:j},_.default.createElement(Bn,{planeID:M,linkCoordinates:B})))}));const zn=S.default.a`
506
- `,Zn=S.default.div`
505
+ `,{resolveRoute:Uo,computePlaneAddress:yo}=a.routing,{getPlanesRegistrar:wo,getPluridPlaneIDByData:No}=a.planes;var Do=o.connect((e=>({stateTree:Rn.space.getTree(e),stateGeneralTheme:Rn.themes.getGeneralTheme(e),stateConfiguration:Rn.configuration.getConfiguration(e),stateViewSize:Rn.space.getViewSize(e)})),(e=>({dispatchSetTree:t=>e(On.space.setTree(t)),dispatchUpdateSpaceLinkCoordinates:t=>e(On.space.updateSpaceLinkCoordinates(t))})),null,{context:Tn})((e=>{const{children:n,route:o,devisible:i,suffix:l,atClick:s,style:c,className:u,stateTree:d,stateGeneralTheme:p,stateConfiguration:f,stateViewSize:m,dispatchSetTree:g,dispatchUpdateSpaceLinkCoordinates:T}=e,h=f.elements.plane.controls.show,E=t.PLURID_DEFAULT_CONFIGURATION_LINK_PREVIEW_FADE_IN,O=t.PLURID_DEFAULT_CONFIGURATION_LINK_PREVIEW_FADE_OUT,_=yo(o),S=Uo(_,f.network.protocol,f.network.host),R=r.useContext(En);if(!R)return x.default.createElement(x.default.Fragment,null,n);const{planesRegistrar:b}=R,A=wo(b);if(!A)return x.default.createElement(x.default.Fragment,null,n);const C=r.useRef(null),I=r.useRef(null),v=r.useRef(null),[P,L]=r.useState(!1),[U,y]=r.useState(!1),[w,N]=r.useState(!1),[D,M]=r.useState(""),[F,j]=r.useState(""),[k,G]=r.useState(""),[B,Y]=r.useState(Ao),[V,$]=r.useState(null!=l?l:t.PLURID_DEFAULT_CONFIGURATION_LINK_SUFFIX),[X,W]=r.useState(null!=i&&i),z=()=>{const e=C.current;if(!e)return Object.assign({},Ao);let t=0,a=0,n=!1,r=e,o=!0,i=0,l=0;for(;o;)if("static"!==window.getComputedStyle(r).position||n||(t+=r.offsetTop,a+=r.offsetLeft,n=!0),"relative"===window.getComputedStyle(r).position&&(i+=t,l+=a,t=0,a=0,n=!1),r.scrollLeft&&(l+=-r.scrollLeft),r.scrollTop&&(i+=-r.scrollTop),r.parentElement){"PluridPlane"===r.parentElement.dataset.pluridEntity&&(o=!1),r=r.parentElement}else o=!1;const s=h?56:0;return{x:l+e.offsetWidth,y:i+s}},H=()=>{w||F?(()=>{const e=a.space.tree.logic.togglePlaneFromTree(d,F);g(e),N((e=>!e)),y(!1)})():(()=>{if(!k||!S)return;const{route:e}=S,t=z(),{pluridPlaneID:n,updatedTree:r}=a.space.tree.logic.updateTreeWithNewPlane(e,k,t,d,A.getAll(),f);n&&(g(r),N(!0),j(n))})()},Z=r.useCallback((e=>{e.preventDefault(),void 0!==s&&s(e),H()}),[C.current,d]);return r.useEffect((()=>{void 0!==l&&$(l),void 0!==i&&W(i)}),[l,i]),r.useEffect((()=>{w&&(()=>{const e=z();T({planeID:F,linkCoordinates:e})})()}),[m]),r.useEffect((()=>{const e=No(C.current);G(e);const t=z();Y(t)}),[]),r.useEffect((()=>(P&&v.current&&(I.current=setTimeout((()=>{y(!0)}),E),clearTimeout(v.current)),P||(v.current=setTimeout((()=>{y(!1),I.current&&clearTimeout(I.current)}),O)),()=>{v.current&&clearTimeout(v.current),I.current&&clearTimeout(I.current)})),[P]),r.useEffect((()=>{}),[]),x.default.createElement(Lo,{ref:C,onClick:e=>Z(e),onMouseEnter:()=>L(!0),onMouseLeave:()=>L(!1),theme:p,suffix:V,devisible:X,style:Object.assign({},c),className:u,"data-plurid-entity":t.PLURID_ENTITY_LINK},n,U&&!w&&x.default.createElement(Co,{elementID:`preview-${k}`,rootID:k},x.default.createElement(Po,{planeID:D,linkCoordinates:B})))}));const Mo=k.default.a`
506
+ `,xo=k.default.div`
507
507
  cursor: pointer;
508
- `,Kn=e=>{const{route:a,children:n,asAnchor:r,style:o,className:i,atClick:l}=e,s={onClick:e=>{if(l){if(l(e))return}e.preventDefault(),t.pluridRouterNavigate(a)},style:o,className:i};return null==r||r?_.default.createElement(zn,Object.assign({href:a},s),n):_.default.createElement(Zn,Object.assign({},s),n)},qn=S.default.div`
508
+ `,Fo=e=>{const{route:t,children:n,asAnchor:r,style:o,className:i,atClick:l}=e,s={onClick:e=>{if(l){if(l(e))return}e.preventDefault(),a.pluridRouterNavigate(t)},style:o,className:i};return null==r||r?x.default.createElement(Mo,Object.assign({href:t},s),n):x.default.createElement(xo,Object.assign({},s),n)},jo=k.default.div`
509
509
  position: absolute;
510
510
  height: 0;
511
511
  width: 0;
512
512
  user-select: none;
513
513
  pointer-events: none;
514
- `,Qn=r.connect((e=>({stateConfiguration:Mt.configuration.getConfiguration(e)})),(e=>({dispatchSetConfiguration:t=>e(yt.configuration.setConfiguration(t))})),null,{context:Nt})((a=>{const r=n.useContext(vt);if(!r)return _.default.createElement(_.default.Fragment,null);const{registerPubSub:o}=r,{configuration:i,pubsub:l,stateConfiguration:s,dispatchSetConfiguration:c}=a,u=n.useRef(null);return n.useEffect((()=>{const e=t.general.configuration.merge(i,s);c(e)}),[i]),n.useEffect((()=>{l&&o(l)}),[l]),_.default.createElement(qn,{ref:u,"data-plurid-entity":e.PLURID_ENTITY_APPLICATION_CONFIGURATOR})})),Jn=S.default.div`
514
+ `,ko=o.connect((e=>({stateConfiguration:Rn.configuration.getConfiguration(e)})),(e=>({dispatchSetConfiguration:t=>e(On.configuration.setConfiguration(t))})),null,{context:Tn})((e=>{const n=r.useContext(En);if(!n)return x.default.createElement(x.default.Fragment,null);const{registerPubSub:o}=n,{configuration:i,pubsub:l,stateConfiguration:s,dispatchSetConfiguration:c}=e,u=r.useRef(null);return r.useEffect((()=>{const e=a.general.configuration.merge(i,s);c(e)}),[i]),r.useEffect((()=>{l&&o(l)}),[l]),x.default.createElement(jo,{ref:u,"data-plurid-entity":t.PLURID_ENTITY_APPLICATION_CONFIGURATOR})})),Go=k.default.div`
515
515
  position: absolute;
516
516
  height: 0;
517
517
  width: 0;
518
518
  user-select: none;
519
519
  pointer-events: none;
520
- `,{getPluridPlaneIDByData:er}=t.planes,tr=r.connect((e=>({})),(e=>({})),null,{context:Nt})((t=>{const a=n.useRef(null),[r,o]=n.useState("");return n.useEffect((()=>{const e=er(a.current);o(e)}),[]),_.default.createElement(Jn,{ref:a,"data-plurid-entity":e.PLURID_ENTITY_PLANE_CONFIGURATOR})})),ar=S.default.div`
521
- `,nr=r.connect((e=>({stateGeneralTheme:Mt.themes.getGeneralTheme(e),stateInteractionTheme:Mt.themes.getInteractionTheme(e)})),(e=>({})),null,{context:Nt})((e=>{const{plurid:t}=e,a=t.value,r=n.useRef(!1),[o,i]=n.useState();return n.useEffect((()=>(r.current=!0,()=>{r.current=!1}))),n.useEffect((()=>{let e=!1;Pt(void 0,void 0,void 0,(function*(){if(!e){e=!0;try{const{domain:e,url:t}=(e=>{const t=e.match(/^pttp:\/\/(\w+(\.|:)\w+)\/?/);if(!t)return{domain:"",url:""};const a=t[1];return{domain:a,url:`http://${a}/pttp`}})(a),n=((e,t)=>{if(e)return t.replace(`pttp://${e}`,"")})(e,a);if(!t||!n)return;const o=yield((e,t)=>Pt(void 0,void 0,void 0,(function*(){try{const a=yield R.default(e,{method:"post",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify({path:t}),credentials:"include"}),n=yield a.json();if(!n.element)return;const{element:r}=n,o=new E.ElementQLClient({url:r.url}),{status:i,Elements:l}=yield o.get(r.json,"json");if(!i)return;const s=l[r.name];return()=>s}catch(e){return}})))(t,n);if(!r.current)return;o&&i(o)}catch(e){return}}}))}),[]),_.default.createElement(ar,null,o&&_.default.createElement(o,null))})),rr=S.default.div`
522
- `,or=r.connect((e=>({stateGeneralTheme:Mt.themes.getGeneralTheme(e),stateInteractionTheme:Mt.themes.getInteractionTheme(e)})),(e=>({})),null,{context:Nt})((e=>{const{plurid:t}=e,a=t.value;return _.default.createElement(rr,null,_.default.createElement("iframe",{src:a}))})),ir=e=>{const{top:t,index:a,element:r,setHeight:o}=e,i=n.useRef(null);return n.useEffect((()=>{i.current&&o(i.current.offsetHeight,a)}),[i.current]),_.default.createElement("div",{ref:i,style:{position:"absolute",top:t+"px"}},r)},{markers:{Spinner:lr}}=u.universal,sr=r.connect((e=>({translationY:Mt.space.getTranslationY(e),viewSize:Mt.space.getViewSize(e)})),(e=>({})),null,{context:Nt})((e=>{const{items:t,generalHeight:a,translationY:r,viewSize:o}=e,i=a||100,s=n.useRef(null),c=n.useRef([]),u=n.useRef(Array(t.length).fill(i)),[d,T]=n.useState(0),[p,f]=n.useState(Math.floor(1e3/i)),[E,m]=n.useState(i*(p-d)),[g,O]=n.useState(!1),h=(e,t)=>{u.current[t]=e};return n.useEffect((()=>{if(u.current){const e=l.mathematics.arithmetic.sum(u.current,u.current.length);m(e)}}),[d,p,u.current]),n.useEffect((()=>{let e=0;for(const[t,a]of u.current.entries())e+=a,r<0?(e<Math.abs(r)&&T(t),e>Math.abs(r)+o.height&&e<Math.abs(r)+o.height+400&&f(t)):(T(0),f(10))}),[o.height,r]),n.useEffect((()=>{O(!0),setTimeout((()=>{const e=l.mathematics.arithmetic.sum(u.current,u.current.length);m(e),O(!1)}),400)}),[o]),_.default.createElement("div",{style:{height:E},ref:s},g&&_.default.createElement(_.default.Fragment,null,_.default.createElement(lr,null)),!g&&_.default.createElement(_.default.Fragment,null,(()=>{c.current=[];for(let e=d;e<=p;e++){const a=t[e];c.current.push(_.default.createElement(ir,{key:e+Math.random(),index:e,top:l.mathematics.arithmetic.sum(u.current,e),element:a,setHeight:h}))}return c.current})()))})),cr=S.default.div`
523
- `,ur=r.connect((e=>({stateGeneralTheme:Mt.themes.getGeneralTheme(e),stateInteractionTheme:Mt.themes.getInteractionTheme(e)})),(e=>({})),null,{context:Nt})((e=>_.default.createElement(cr,null,"PluridPlaneDebugger"))),dr=S.default.div`
524
- `,Tr=r.connect((e=>({stateGeneralTheme:Mt.themes.getGeneralTheme(e),stateInteractionTheme:Mt.themes.getInteractionTheme(e)})),(e=>({})),null,{context:Nt})((e=>_.default.createElement(dr,null,"PluridSpaceDebugger"))),{resolvePluridPlaneData:pr}=t.planes,fr=(e,a,n,r)=>{const o=new Map,i=new Map(e||new Map),l=t.general.configuration.merge(n);if(a)for(const e of a){const a=pr(e),n=t.routing.resolveRoute(a.route);if(!n)continue;const{protocol:r,host:o,path:l,space:s,universe:c,cluster:u,plane:d,route:T}=n,p={protocol:r,host:"",path:"",space:"",universe:"",cluster:"",plane:"",route:T,component:a.component},f=T;i.set(f,p)}const s=new Map(i),c={};for(const[e,t]of i)c[t.route]=e;for(const[e,t]of i);const u=r||[],d=[];for(const e of u)if("string"==typeof e){const a=t.routing.resolveRoute(e);if(!a)continue;d.push(a.route)}return{computedTree:[],indexedPlanesReference:s,planesPropertiesReference:o,appConfiguration:l}},Er=(a,n)=>{const r=((e,a,n)=>{const r=new Map;for(const o of e){if(o.planes)for(const e of o.planes){const i=Un(e),l="/"===o.value?"p":t.utilities.cleanPathElement(o.value),s="s",c="u",u="c",d=t.utilities.cleanPathElement(i.value),T=[a,n,l,s,c,u,d].join("://"),p={protocol:a,host:n,path:l,space:s,universe:c,cluster:u,plane:d,component:i.component,route:T};r.set(T,p)}if(o.spaces){for(const e of o.spaces)if(e.universes)for(const i of e.universes)if(i.clusters)for(const l of i.clusters)for(const s of l.planes){const c=Un(s),u="/"===o.value?"p":t.utilities.cleanPathElement(o.value),d="default"===e.value?"s":t.utilities.cleanPathElement(e.value),T="default"===i.value?"u":t.utilities.cleanPathElement(i.value),p="default"===l.value?"c":t.utilities.cleanPathElement(l.value),f=t.utilities.cleanPathElement(c.value),E=[a,n,u,d,T,p,f].join("://"),m={protocol:a,host:n,path:u,space:d,universe:T,cluster:p,plane:f,component:c.component,route:E};r.set(E,m)}}else{const e="/"===o.value?"p":t.utilities.cleanPathElement(o.value),i=[a,n,e].join("://"),l={protocol:a,host:n,path:e,space:"",universe:"",cluster:"",plane:"",component:o.exterior||(()=>_.default.createElement(_.default.Fragment,null)),route:i};r.set(i,l)}}return r})(n,"http","localhost:63000"),o=((a,n,r)=>{const o={planes:a.data.planes||[],spaces:a.data.spaces||[],view:a.data.view||[],value:a.data.value||""},{planes:i,spaces:l,view:s}=o,c=[];if(l)for(const a of l){const n=[],r=[];if(a.planes)for(const n of a.planes){const r=Un(n);o.value===e.PLURID_ROUTE_DEFAULT_PATH_VALUE?e.PLURID_ROUTE_DEFAULT_PATH:t.utilities.cleanPathElement(o.value),a.value===e.PLURID_ROUTE_DEFAULT_SPACE_VALUE?e.PLURID_ROUTE_DEFAULT_SPACE:t.utilities.cleanPathElement(a.value),t.utilities.cleanPathElement(r.value)}if(a.universes)for(const n of a.universes){if(n.clusters)for(const r of n.clusters)for(const i of r.planes){const l=Un(i);o.value===e.PLURID_ROUTE_DEFAULT_PATH_VALUE?e.PLURID_ROUTE_DEFAULT_PATH:t.utilities.cleanPathElement(o.value),a.value===e.PLURID_ROUTE_DEFAULT_SPACE_VALUE?e.PLURID_ROUTE_DEFAULT_SPACE:t.utilities.cleanPathElement(a.value),n.value===e.PLURID_ROUTE_DEFAULT_UNIVERSE_VALUE?e.PLURID_ROUTE_DEFAULT_UNIVERSE:t.utilities.cleanPathElement(n.value),r.value===e.PLURID_ROUTE_DEFAULT_CLUSTER_VALUE?e.PLURID_ROUTE_DEFAULT_CLUSTER:t.utilities.cleanPathElement(r.value),t.utilities.cleanPathElement(l.value)}if(n.planes)for(const r of n.planes){const i=Un(r);o.value===e.PLURID_ROUTE_DEFAULT_PATH_VALUE?e.PLURID_ROUTE_DEFAULT_PATH:t.utilities.cleanPathElement(o.value),a.value===e.PLURID_ROUTE_DEFAULT_SPACE_VALUE?e.PLURID_ROUTE_DEFAULT_SPACE:t.utilities.cleanPathElement(a.value),n.value===e.PLURID_ROUTE_DEFAULT_UNIVERSE_VALUE?e.PLURID_ROUTE_DEFAULT_UNIVERSE:t.utilities.cleanPathElement(n.value),t.utilities.cleanPathElement(i.value)}}const i={planes:n,view:r};c.push(i)}if(i){const a=[];for(const a of i){const n=Un(a);o.value===e.PLURID_ROUTE_DEFAULT_PATH_VALUE?e.PLURID_ROUTE_DEFAULT_PATH:t.utilities.cleanPathElement(o.value),t.utilities.cleanPathElement(n.value)}const n={planes:a,view:s||[]};c.push(n)}return c})(a),i={};for(const e of o){const{planes:t,view:n}=e,{computedTree:o,appConfiguration:l}=fr(r,t,void 0,n),s={configuration:Object.assign({},l),shortcuts:{global:!0},themes:{general:h.default.plurid,interaction:h.default.plurid},ui:{toolbarScrollPosition:50},space:{loading:!1,animatedTransform:!1,scale:1,rotationX:0,rotationY:0,translationX:0,translationY:0,translationZ:0,initialTree:o,tree:o,activeUniverseID:"",camera:{x:0,y:0,z:0},viewSize:{width:1440,height:821},spaceSize:{width:1440,height:821,depth:0,topCorner:{x:0,y:0,z:0}},view:n,culledView:[]}};i[a.data.value]=s}return{states:i}},{IsoMatcher:mr,RouteParser:gr}=t.routing,_r={PluridPlaneBridge:Bt,PluridPlaneContent:Zt,PluridPlaneControls:Xt,PluridPlaneDebugger:ur,PluridSpaceDebugger:Tr},Or={Application:bn,RouterStatic:Mn,RouterBrowser:Dn,Provider:xn,Link:Xn,RouterLink:Kn,ApplicationConfigurator:Qn,PlaneConfigurator:tr,ExternalPlane:nr,IframePlane:or,VirtualList:sr,SPACE_LAYOUT:e.LAYOUT_TYPES,SIZES:e.SIZES,TRANSFORM_MODES:e.TRANSFORM_MODES,TRANSFORM_TOUCHES:e.TRANSFORM_TOUCHES,PubSub:g.default,PUBSUB_TOPIC:e.PLURID_PUBSUB_TOPIC,serverComputeMetastate:Er,IsoMatcher:mr,routerNavigate:t.pluridRouterNavigate,internals:_r};Object.defineProperty(exports,"PLURID_PUBSUB_TOPIC",{enumerable:!0,get:function(){return e.PLURID_PUBSUB_TOPIC}}),Object.defineProperty(exports,"PLURID_ROUTER_LOCATION_CHANGED",{enumerable:!0,get:function(){return e.PLURID_ROUTER_LOCATION_CHANGED}}),Object.defineProperty(exports,"PLURID_ROUTER_LOCATION_STORED",{enumerable:!0,get:function(){return e.PLURID_ROUTER_LOCATION_STORED}}),Object.defineProperty(exports,"SIZES",{enumerable:!0,get:function(){return e.SIZES}}),Object.defineProperty(exports,"SPACE_LAYOUT",{enumerable:!0,get:function(){return e.LAYOUT_TYPES}}),Object.defineProperty(exports,"TRANSFORM_MODES",{enumerable:!0,get:function(){return e.TRANSFORM_MODES}}),Object.defineProperty(exports,"TRANSFORM_TOUCHES",{enumerable:!0,get:function(){return e.TRANSFORM_TOUCHES}}),Object.defineProperty(exports,"pluridRouterNavigate",{enumerable:!0,get:function(){return t.pluridRouterNavigate}}),Object.defineProperty(exports,"PluridPubSub",{enumerable:!0,get:function(){return g.default}}),exports.PluridApplication=bn,exports.PluridApplicationConfigurator=Qn,exports.PluridExternalPlane=nr,exports.PluridIframePlane=or,exports.PluridIsoMatcher=mr,exports.PluridLink=Xn,exports.PluridPlaneConfigurator=tr,exports.PluridProvider=xn,exports.PluridRouteParser=gr,exports.PluridRouterBrowser=Dn,exports.PluridRouterLink=Kn,exports.PluridRouterStatic=Mn,exports.PluridVirtualList=sr,exports.default=Or,exports.getDirectPlaneMatch=(e,t,a)=>{let n,r,o;for(const a of t){if(a.planes)for(const t of a.planes){const n=Un(t),i="/"===a.value?n.value:a.value+n.value;if(o=i,e===i){r=t;break}}if(r){n=a;break}}if(a)for(const t of a){if(e===Un(t).value){r=t;break}}return{matchRoute:n,matchPlane:r,matchPath:o}},exports.internals=_r,exports.pluridStateModules=bt,exports.serverComputeMetastate=Er,exports.usePluridRouter=()=>{const[t,a]=n.useState("");return n.useEffect((()=>{const t=()=>{const e=l.storage.loadState("__PLURID_ROUTER__");e&&a(e)};return t(),window.addEventListener(e.PLURID_ROUTER_LOCATION_STORED,t),()=>{window.removeEventListener(e.PLURID_ROUTER_LOCATION_STORED,t)}}),[]),t};
520
+ `,{getPluridPlaneIDByData:Bo}=a.planes,Yo=o.connect((e=>({})),(e=>({})),null,{context:Tn})((e=>{const a=r.useRef(null),[n,o]=r.useState("");return r.useEffect((()=>{const e=Bo(a.current);o(e)}),[]),x.default.createElement(Go,{ref:a,"data-plurid-entity":t.PLURID_ENTITY_PLANE_CONFIGURATOR})})),Vo=k.default.div`
521
+ `,$o=o.connect((e=>({stateGeneralTheme:Rn.themes.getGeneralTheme(e),stateInteractionTheme:Rn.themes.getInteractionTheme(e)})),(e=>({})),null,{context:Tn})((e=>{const{plurid:t}=e,a=t.value,n=r.useRef(!1),[o,i]=r.useState();return r.useEffect((()=>(n.current=!0,()=>{n.current=!1}))),r.useEffect((()=>{let e=!1;hn(void 0,void 0,void 0,(function*(){if(!e){e=!0;try{const{domain:e,url:t}=(e=>{const t=e.match(/^pttp:\/\/(\w+(\.|:)\w+)\/?/);if(!t)return{domain:"",url:""};const a=t[1];return{domain:a,url:`http://${a}/pttp`}})(a),r=((e,t)=>{if(e)return t.replace(`pttp://${e}`,"")})(e,a);if(!t||!r)return;const o=yield((e,t)=>hn(void 0,void 0,void 0,(function*(){try{const a=yield G.default(e,{method:"post",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify({path:t}),credentials:"include"}),n=yield a.json();if(!n.element)return;const{element:r}=n,o=new T.ElementQLClient({url:r.url}),{status:i,Elements:l}=yield o.get(r.json,"json");if(!i)return;const s=l[r.name];return()=>s}catch(e){return}})))(t,r);if(!n.current)return;o&&i(o)}catch(e){return}}}))}),[]),x.default.createElement(Vo,null,o&&x.default.createElement(o,null))})),Xo=k.default.div`
522
+ `,Wo=o.connect((e=>({stateGeneralTheme:Rn.themes.getGeneralTheme(e),stateInteractionTheme:Rn.themes.getInteractionTheme(e)})),(e=>({})),null,{context:Tn})((e=>{const{plurid:t}=e,a=t.value;return x.default.createElement(Xo,null,x.default.createElement("iframe",{src:a}))})),zo=e=>{const{top:t,index:a,element:n,setHeight:o}=e,i=r.useRef(null);return r.useEffect((()=>{i.current&&o(i.current.offsetHeight,a)}),[i.current]),x.default.createElement("div",{ref:i,style:{position:"absolute",top:t+"px"}},n)},{markers:{Spinner:Ho}}=d.universal,Zo=o.connect((e=>({translationY:Rn.space.getTranslationY(e),viewSize:Rn.space.getViewSize(e)})),(e=>({})),null,{context:Tn})((e=>{const{items:t,generalHeight:a,translationY:n,viewSize:o}=e,i=a||100,l=r.useRef(null),c=r.useRef([]),u=r.useRef(Array(t.length).fill(i)),[d,p]=r.useState(0),[f,m]=r.useState(Math.floor(1e3/i)),[g,T]=r.useState(i*(f-d)),[h,E]=r.useState(!1),O=(e,t)=>{u.current[t]=e};return r.useEffect((()=>{if(u.current){const e=s.mathematics.arithmetic.sum(u.current,u.current.length);T(e)}}),[d,f,u.current]),r.useEffect((()=>{let e=0;for(const[t,a]of u.current.entries())e+=a,n<0?(e<Math.abs(n)&&p(t),e>Math.abs(n)+o.height&&e<Math.abs(n)+o.height+400&&m(t)):(p(0),m(10))}),[o.height,n]),r.useEffect((()=>{E(!0),setTimeout((()=>{const e=s.mathematics.arithmetic.sum(u.current,u.current.length);T(e),E(!1)}),400)}),[o]),x.default.createElement("div",{style:{height:g},ref:l},h&&x.default.createElement(x.default.Fragment,null,x.default.createElement(Ho,null)),!h&&x.default.createElement(x.default.Fragment,null,(()=>{c.current=[];for(let e=d;e<=f;e++){const a=t[e];c.current.push(x.default.createElement(zo,{key:e+Math.random(),index:e,top:s.mathematics.arithmetic.sum(u.current,e),element:a,setHeight:O}))}return c.current})()))})),Ko=k.default.div`
523
+ `,qo=o.connect((e=>({stateGeneralTheme:Rn.themes.getGeneralTheme(e),stateInteractionTheme:Rn.themes.getInteractionTheme(e)})),(e=>({})),null,{context:Tn})((e=>x.default.createElement(Ko,null,"PluridPlaneDebugger"))),Qo=k.default.div`
524
+ `,Jo=o.connect((e=>({stateGeneralTheme:Rn.themes.getGeneralTheme(e),stateInteractionTheme:Rn.themes.getInteractionTheme(e)})),(e=>({})),null,{context:Tn})((e=>x.default.createElement(Qo,null,"PluridSpaceDebugger"))),{resolvePluridPlaneData:ei}=a.planes,ti=(e,t,n,r)=>{const o=new Map,i=new Map(e||new Map),l=a.general.configuration.merge(n);if(t)for(const e of t){const t=ei(e),n=a.routing.resolveRoute(t.route);if(!n)continue;const{protocol:r,host:o,path:l,space:s,universe:c,cluster:u,plane:d,route:p}=n,f={protocol:r,host:"",path:"",space:"",universe:"",cluster:"",plane:"",route:p,component:t.component},m=p;i.set(m,f)}const s=new Map(i),c={};for(const[e,t]of i)c[t.route]=e;for(const[e,t]of i);const u=r||[],d=[];for(const e of u)if("string"==typeof e){const t=a.routing.resolveRoute(e);if(!t)continue;d.push(t.route)}return{computedTree:[],indexedPlanesReference:s,planesPropertiesReference:o,appConfiguration:l}},ai=(e,n)=>{const r=((e,t,n)=>{const r=new Map;for(const o of e){if(o.planes)for(const e of o.planes){const i=go(e),l="/"===o.value?"p":a.utilities.cleanPathElement(o.value),s="s",c="u",u="c",d=a.utilities.cleanPathElement(i.value),p=[t,n,l,s,c,u,d].join("://"),f={protocol:t,host:n,path:l,space:s,universe:c,cluster:u,plane:d,component:i.component,route:p};r.set(p,f)}if(o.spaces){for(const e of o.spaces)if(e.universes)for(const i of e.universes)if(i.clusters)for(const l of i.clusters)for(const s of l.planes){const c=go(s),u="/"===o.value?"p":a.utilities.cleanPathElement(o.value),d="default"===e.value?"s":a.utilities.cleanPathElement(e.value),p="default"===i.value?"u":a.utilities.cleanPathElement(i.value),f="default"===l.value?"c":a.utilities.cleanPathElement(l.value),m=a.utilities.cleanPathElement(c.value),g=[t,n,u,d,p,f,m].join("://"),T={protocol:t,host:n,path:u,space:d,universe:p,cluster:f,plane:m,component:c.component,route:g};r.set(g,T)}}else{const e="/"===o.value?"p":a.utilities.cleanPathElement(o.value),i=[t,n,e].join("://"),l={protocol:t,host:n,path:e,space:"",universe:"",cluster:"",plane:"",component:o.exterior||(()=>x.default.createElement(x.default.Fragment,null)),route:i};r.set(i,l)}}return r})(n,"http","localhost:63000"),o=((e,n,r)=>{const o={planes:e.data.planes||[],spaces:e.data.spaces||[],view:e.data.view||[],value:e.data.value||""},{planes:i,spaces:l,view:s}=o,c=[];if(l)for(const e of l){const n=[],r=[];if(e.planes)for(const n of e.planes){const r=go(n);o.value===t.PLURID_ROUTE_DEFAULT_PATH_VALUE?t.PLURID_ROUTE_DEFAULT_PATH:a.utilities.cleanPathElement(o.value),e.value===t.PLURID_ROUTE_DEFAULT_SPACE_VALUE?t.PLURID_ROUTE_DEFAULT_SPACE:a.utilities.cleanPathElement(e.value),a.utilities.cleanPathElement(r.value)}if(e.universes)for(const n of e.universes){if(n.clusters)for(const r of n.clusters)for(const i of r.planes){const l=go(i);o.value===t.PLURID_ROUTE_DEFAULT_PATH_VALUE?t.PLURID_ROUTE_DEFAULT_PATH:a.utilities.cleanPathElement(o.value),e.value===t.PLURID_ROUTE_DEFAULT_SPACE_VALUE?t.PLURID_ROUTE_DEFAULT_SPACE:a.utilities.cleanPathElement(e.value),n.value===t.PLURID_ROUTE_DEFAULT_UNIVERSE_VALUE?t.PLURID_ROUTE_DEFAULT_UNIVERSE:a.utilities.cleanPathElement(n.value),r.value===t.PLURID_ROUTE_DEFAULT_CLUSTER_VALUE?t.PLURID_ROUTE_DEFAULT_CLUSTER:a.utilities.cleanPathElement(r.value),a.utilities.cleanPathElement(l.value)}if(n.planes)for(const r of n.planes){const i=go(r);o.value===t.PLURID_ROUTE_DEFAULT_PATH_VALUE?t.PLURID_ROUTE_DEFAULT_PATH:a.utilities.cleanPathElement(o.value),e.value===t.PLURID_ROUTE_DEFAULT_SPACE_VALUE?t.PLURID_ROUTE_DEFAULT_SPACE:a.utilities.cleanPathElement(e.value),n.value===t.PLURID_ROUTE_DEFAULT_UNIVERSE_VALUE?t.PLURID_ROUTE_DEFAULT_UNIVERSE:a.utilities.cleanPathElement(n.value),a.utilities.cleanPathElement(i.value)}}const i={planes:n,view:r};c.push(i)}if(i){const e=[];for(const e of i){const n=go(e);o.value===t.PLURID_ROUTE_DEFAULT_PATH_VALUE?t.PLURID_ROUTE_DEFAULT_PATH:a.utilities.cleanPathElement(o.value),a.utilities.cleanPathElement(n.value)}const n={planes:e,view:s||[]};c.push(n)}return c})(e),i={};for(const t of o){const{planes:a,view:n}=t,{computedTree:o,appConfiguration:l}=ti(r,a,void 0,n),s={configuration:Object.assign({},l),shortcuts:{global:!0},themes:{general:j.default.plurid,interaction:j.default.plurid},ui:{toolbarScrollPosition:50},space:{loading:!1,animatedTransform:!1,scale:1,rotationX:0,rotationY:0,translationX:0,translationY:0,translationZ:0,initialTree:o,tree:o,activeUniverseID:"",camera:{x:0,y:0,z:0},viewSize:{width:1440,height:821},spaceSize:{width:1440,height:821,depth:0,topCorner:{x:0,y:0,z:0}},view:n,culledView:[]}};i[e.data.value]=s}return{states:i}},{IsoMatcher:ni,RouteParser:ri}=a.routing,oi={PluridPlaneBridge:Pn,PluridPlaneContent:xn,PluridPlaneControls:Dn,PluridPlaneDebugger:qo,PluridSpaceDebugger:Jo},ii={Application:fo,RouterStatic:Ro,RouterBrowser:So,Provider:bo,Link:Do,RouterLink:Fo,ApplicationConfigurator:ko,PlaneConfigurator:Yo,ExternalPlane:$o,IframePlane:Wo,VirtualList:Zo,SPACE_LAYOUT:t.LAYOUT_TYPES,SIZES:t.SIZES,TRANSFORM_MODES:t.TRANSFORM_MODES,TRANSFORM_TOUCHES:t.TRANSFORM_TOUCHES,PubSub:M.default,PUBSUB_TOPIC:t.PLURID_PUBSUB_TOPIC,serverComputeMetastate:ai,IsoMatcher:ni,routerNavigate:a.pluridRouterNavigate,internals:oi};Object.defineProperty(e,"PLURID_PUBSUB_TOPIC",{enumerable:!0,get:function(){return t.PLURID_PUBSUB_TOPIC}}),Object.defineProperty(e,"PLURID_ROUTER_LOCATION_CHANGED",{enumerable:!0,get:function(){return t.PLURID_ROUTER_LOCATION_CHANGED}}),Object.defineProperty(e,"PLURID_ROUTER_LOCATION_STORED",{enumerable:!0,get:function(){return t.PLURID_ROUTER_LOCATION_STORED}}),Object.defineProperty(e,"SIZES",{enumerable:!0,get:function(){return t.SIZES}}),Object.defineProperty(e,"SPACE_LAYOUT",{enumerable:!0,get:function(){return t.LAYOUT_TYPES}}),Object.defineProperty(e,"TRANSFORM_MODES",{enumerable:!0,get:function(){return t.TRANSFORM_MODES}}),Object.defineProperty(e,"TRANSFORM_TOUCHES",{enumerable:!0,get:function(){return t.TRANSFORM_TOUCHES}}),Object.defineProperty(e,"pluridRouterNavigate",{enumerable:!0,get:function(){return a.pluridRouterNavigate}}),Object.defineProperty(e,"PluridPubSub",{enumerable:!0,get:function(){return M.default}}),e.PluridApplication=fo,e.PluridApplicationConfigurator=ko,e.PluridExternalPlane=$o,e.PluridIframePlane=Wo,e.PluridIsoMatcher=ni,e.PluridLink=Do,e.PluridPlaneConfigurator=Yo,e.PluridProvider=bo,e.PluridRouteParser=ri,e.PluridRouterBrowser=So,e.PluridRouterLink=Fo,e.PluridRouterStatic=Ro,e.PluridVirtualList=Zo,e.default=ii,e.getDirectPlaneMatch=(e,t,a)=>{let n,r,o;for(const a of t){if(a.planes)for(const t of a.planes){const n=go(t),i="/"===a.value?n.value:a.value+n.value;if(o=i,e===i){r=t;break}}if(r){n=a;break}}if(a)for(const t of a){if(e===go(t).value){r=t;break}}return{matchRoute:n,matchPlane:r,matchPath:o}},e.internals=oi,e.pluridStateModules=fn,e.serverComputeMetastate=ai,e.usePluridRouter=()=>{const[e,a]=r.useState("");return r.useEffect((()=>{const e=()=>{const e=s.storage.loadState("__PLURID_ROUTER__");e&&a(e)};return e(),window.addEventListener(t.PLURID_ROUTER_LOCATION_STORED,e),()=>{window.removeEventListener(t.PLURID_ROUTER_LOCATION_STORED,e)}}),[]),e}}(M);var x,F=(x=M)&&x.__esModule&&Object.prototype.hasOwnProperty.call(x,"default")?x.default:x;exports.default=F;
525
+ //# sourceMappingURL=index.min.js.map