@qispace/vue3-player 0.0.6 → 0.0.8

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 (104) hide show
  1. package/dist/components/apartmentChooser/QiApartmentChooser.vue.d.ts +471 -3
  2. package/dist/components/apartmentChooser/QiApartmentChooserNavigation.vue.d.ts +50 -3
  3. package/dist/components/apartmentChooser/QiApartmentChooserRaster.vue.d.ts +151 -3
  4. package/dist/components/apartmentChooser/QiApartmentChooserRotator.vue.d.ts +66 -3
  5. package/dist/components/apartmentChooser/QiApartmentChooserSvg.vue.d.ts +124 -3
  6. package/dist/components/buildingPicker/QiBuildingChooser.vue.d.ts +425 -2
  7. package/dist/components/buildingPicker/QiBuildingChooserRaster.vue.d.ts +154 -3
  8. package/dist/components/buildingPicker/QiBuildingChooserRasterOverlay.vue.d.ts +53 -3
  9. package/dist/components/buildingPicker/QiBuildingChooserSceneImageStack.vue.d.ts +32 -3
  10. package/dist/components/buildingPicker/QiBuildingChooserSunSimControl.vue.d.ts +41 -4
  11. package/dist/components/buildingPicker/QiBuildingChooserSvg.vue.d.ts +156 -3
  12. package/dist/components/shared/QiFloatingCard.vue.d.ts +17 -3
  13. package/dist/components/shared/QiHoverProbe.vue.d.ts +3 -3
  14. package/dist/components/shared/QiNorthDirection.vue.d.ts +20 -2
  15. package/dist/components/shared/QiZoomBox.vue.d.ts +82 -3
  16. package/dist/components/virtualTourV2/Compass.vue.d.ts +22 -0
  17. package/dist/components/virtualTourV2/Disclaimer.vue.d.ts +3 -3
  18. package/dist/components/virtualTourV2/FloorLevel.vue.d.ts +27 -0
  19. package/dist/components/virtualTourV2/FullScreenButton.vue.d.ts +13 -2
  20. package/dist/components/virtualTourV2/InteriorSelector.vue.d.ts +24 -0
  21. package/dist/components/virtualTourV2/ManualSlideShow.vue.d.ts +72 -3
  22. package/dist/components/virtualTourV2/ManualSlideShowPlayer.vue.d.ts +14 -3
  23. package/dist/components/virtualTourV2/PlayerV2.vue.d.ts +82 -0
  24. package/dist/components/virtualTourV2/SettingsUI.vue.d.ts +105 -0
  25. package/dist/components/virtualTourV2/SingleImage.vue.d.ts +25 -3
  26. package/dist/components/virtualTourV2/SocialShare.vue.d.ts +9 -3
  27. package/dist/components/virtualTourV2/TimeOfDay.vue.d.ts +27 -0
  28. package/dist/components/virtualTourV2/Tutorial.vue.d.ts +23 -0
  29. package/dist/components/virtualTourV2/ViewModeToggle.vue.d.ts +16 -0
  30. package/dist/components/virtualTourV2/VirtualTourV2.vue.d.ts +324 -0
  31. package/dist/components/virtualTourV2/WaypointCarousel.vue.d.ts +30 -3
  32. package/dist/components/virtualTourV2/minimapv2/MiniMapMap.vue.d.ts +82 -0
  33. package/dist/components/virtualTourV2/minimapv2/MiniMapV2.vue.d.ts +78 -0
  34. package/dist/components/virtualTourV2/minimapv2/MinimapCompass.vue.d.ts +30 -0
  35. package/dist/components/virtualTourV2/minimapv2/Moveable.vue.d.ts +8 -0
  36. package/dist/components/virtualTourV2/minimapv2/RotationMarkerV2.vue.d.ts +12 -0
  37. package/dist/components/virtualTourV2/minimapv2/SunsimulationSlider.vue.d.ts +48 -0
  38. package/dist/vue3-player.mjs +5675 -0
  39. package/dist/vue3-player.umd.js +3 -3
  40. package/package.json +12 -10
  41. package/src/components/virtualTourV2/index.js +2 -1
  42. package/dist/components/apartmentChooser/QiApartmentChooser.vue.d.ts.map +0 -1
  43. package/dist/components/apartmentChooser/QiApartmentChooserNavigation.vue.d.ts.map +0 -1
  44. package/dist/components/apartmentChooser/QiApartmentChooserRaster.vue.d.ts.map +0 -1
  45. package/dist/components/apartmentChooser/QiApartmentChooserRotator.vue.d.ts.map +0 -1
  46. package/dist/components/apartmentChooser/QiApartmentChooserSvg.vue.d.ts.map +0 -1
  47. package/dist/components/buildingPicker/QiBuildingChooser.vue.d.ts.map +0 -1
  48. package/dist/components/buildingPicker/QiBuildingChooserRaster.vue.d.ts.map +0 -1
  49. package/dist/components/buildingPicker/QiBuildingChooserRasterOverlay.vue.d.ts.map +0 -1
  50. package/dist/components/buildingPicker/QiBuildingChooserSceneImageStack.vue.d.ts.map +0 -1
  51. package/dist/components/buildingPicker/QiBuildingChooserSunSimControl.vue.d.ts.map +0 -1
  52. package/dist/components/buildingPicker/QiBuildingChooserSvg.vue.d.ts.map +0 -1
  53. package/dist/components/shared/QiFloatingCard.vue.d.ts.map +0 -1
  54. package/dist/components/shared/QiHoverProbe.vue.d.ts.map +0 -1
  55. package/dist/components/shared/QiNorthDirection.vue.d.ts.map +0 -1
  56. package/dist/components/shared/QiZoomBox.vue.d.ts.map +0 -1
  57. package/dist/components/virtualTourV2/Disclaimer.vue.d.ts.map +0 -1
  58. package/dist/components/virtualTourV2/FullScreenButton.vue.d.ts.map +0 -1
  59. package/dist/components/virtualTourV2/ManualSlideShow.vue.d.ts.map +0 -1
  60. package/dist/components/virtualTourV2/ManualSlideShowPlayer.vue.d.ts.map +0 -1
  61. package/dist/components/virtualTourV2/SingleImage.vue.d.ts.map +0 -1
  62. package/dist/components/virtualTourV2/SocialShare.vue.d.ts.map +0 -1
  63. package/dist/components/virtualTourV2/WaypointCarousel.vue.d.ts.map +0 -1
  64. package/dist/lib/virtualTour__/ApartmentConfig.d.ts +0 -27
  65. package/dist/lib/virtualTour__/ApartmentFiles.d.ts +0 -7
  66. package/dist/lib/virtualTour__/MinimapConfig.d.ts +0 -23
  67. package/dist/lib/virtualTour__/impl/HttpApartmentFiles.d.ts +0 -19
  68. package/dist/vue3-player.cjs.js +0 -2
  69. package/dist/vue3-player.esm.js +0 -2992
  70. package/dist/vue3-player.iife.js +0 -3
  71. package/src/entry.esm.js +0 -17
  72. package/src/entry.js +0 -13
  73. package/src/entry.ts_ +0 -17
  74. package/src/lib/virtualTour__/ApartmentConfig.ts +0 -80
  75. package/src/lib/virtualTour__/ApartmentFiles.ts +0 -8
  76. package/src/lib/virtualTour__/CameraNavigator.js_ +0 -74
  77. package/src/lib/virtualTour__/CameraSnapshot.js +0 -42
  78. package/src/lib/virtualTour__/CoordConversions.js +0 -43
  79. package/src/lib/virtualTour__/FullscreenModel.js +0 -69
  80. package/src/lib/virtualTour__/MinimapConfig.ts +0 -46
  81. package/src/lib/virtualTour__/PlayerViewModel.js +0 -423
  82. package/src/lib/virtualTour__/config/ApartmentConfig.js +0 -92
  83. package/src/lib/virtualTour__/config/CameraConfig.js +0 -97
  84. package/src/lib/virtualTour__/config/Interaction.js +0 -393
  85. package/src/lib/virtualTour__/config/Panorama.js +0 -78
  86. package/src/lib/virtualTour__/config/PlayerConfig.js +0 -812
  87. package/src/lib/virtualTour__/config/rawinflate.export.js +0 -833
  88. package/src/lib/virtualTour__/config/shaders.js +0 -24
  89. package/src/lib/virtualTour__/impl/HttpApartmentFiles.ts +0 -57
  90. package/src/lib/virtualTour__/index.js +0 -1
  91. package/src/lib/virtualTour__/textures/arrow.png +0 -0
  92. package/src/lib/virtualTour__/textures/compass-bg.png +0 -0
  93. package/src/lib/virtualTour__/textures/compass-needle.png +0 -0
  94. package/src/lib/virtualTour__/textures/compass-north.png +0 -0
  95. package/src/lib/virtualTour__/textures/floor-1.svg +0 -4
  96. package/src/lib/virtualTour__/textures/floor-2.svg +0 -4
  97. package/src/lib/virtualTour__/textures/marker.png +0 -0
  98. package/src/lib/virtualTour__/textures/tod-sun.png +0 -0
  99. package/src/main.ts_ +0 -24
  100. package/src/shims-png.d.ts +0 -4
  101. package/src/shims-tsx.d.ts +0 -11
  102. package/src/shims-vue.d.ts +0 -4
  103. package/src/style.css +0 -0
  104. package/src/vite-env.d.ts +0 -5
@@ -1,2992 +0,0 @@
1
- (function(){"use strict";try{if(typeof document<"u"){var t=document.createElement("style");t.appendChild(document.createTextNode("@media (hover: hover){.hover-check[data-v-e4729353]{display:none}}#canvas[data-v-3bbbc77b]{position:absolute;top:0;width:100%;-webkit-user-select:none;user-select:none;touch-action:none;padding-top:56.25%}#canvas-mask[data-v-3bbbc77b]{position:absolute;top:0;max-width:100%;z-index:4;-webkit-user-select:none;user-select:none}@media only screen and (min-width: 1280px){#canvas[data-v-3bbbc77b]{border-radius:10px}}#container[data-v-82a61864]{position:absolute;top:0;width:100%;-webkit-user-select:none;user-select:none;touch-action:none;padding-top:56.25%}.svg-container[data-v-82a61864]{transition-property:opacity;transition-duration:.25s;transition-timing-function:ease-in-out}.svg-container[data-v-82a61864],svg[data-v-82a61864]{position:absolute;left:0;top:0;width:100%;height:100%;z-index:10000}svg g[data-v-82a61864] path{cursor:pointer;stroke-width:inherit!important;stroke-opacity:inherit!important;stroke:inherit!important;fill:inherit!important;fill-opacity:inherit!important;transition-property:fill-opacity,fill;transition-duration:.25s;transition-timing-function:ease-in-out}@media only screen and (min-width: 1280px){#canvas[data-v-82a61864]{border-radius:10px}}.v-btn[data-v-129ef905]{background-color:#fff}.frame-container[data-v-e6481f8e]{position:relative;max-width:100%;top:0;left:0;bottom:185px;padding-top:56%;z-index:1;overflow:hidden}.frame-image[data-v-e6481f8e]{position:absolute;top:0;width:100%;height:100%}.frame-image img[data-v-e6481f8e]{min-width:100%;max-width:100%;z-index:0}#image-stack picture[data-v-e6481f8e]{visibility:hidden}#image-stack picture.show[data-v-e6481f8e]{visibility:visible}.fill-parent[data-v-e6481f8e]{position:absolute;top:0;bottom:0;left:0;right:0}.floating-card[data-v-b74de171]{position:absolute;left:0;top:0;z-index:10;display:flex}.is-not-hoverable[data-v-b74de171]{position:relative;width:100%}.top-left[data-v-b74de171]{transform-origin:top left;transform:translate(8px) translateY(8px) scale(.9)}.top-right[data-v-b74de171]{transform-origin:top right;transform:translate(-100%) translate(-8px) translateY(8px) scale(.9)}.bottom-left[data-v-b74de171]{transform-origin:bottom left;transform:translateY(-100%) translate(8px) translateY(-8px) scale(.9)}.bottom-right[data-v-b74de171]{transform-origin:bottom right;transform:translateY(-100%) translate(-100%) translate(-8px) translateY(-8px) scale(.9)}.v-dialog__content[data-v-b74de171]{align-items:flex-start}.zoom-box-container[data-v-83bfd28a]{position:absolute;width:100%;height:100%;left:0;top:0;overflow:hidden;-webkit-user-select:none;user-select:none;touch-action:none}.zoom-box[data-v-83bfd28a]{width:100%;height:100%;-webkit-user-select:none;user-select:none;touch-action:none}.interactive-viewer[data-v-3a1121f3]{padding-top:56.65%;position:relative}.fill-parent[data-v-3a1121f3]{position:absolute;top:0;bottom:0;left:0;right:0}.navigation[data-v-3a1121f3]{position:absolute;width:100%;bottom:32px;z-index:99;padding:0 20px;display:flex;justify-content:center}@media only screen and (max-width: 600px){.navigation[data-v-3a1121f3]{bottom:12px}}.sunsim-time-label[data-v-1fba3edd]{color:#000;vertical-align:top}.sunsim-date[data-v-1fba3edd]{background:#fff;border-radius:30px;min-height:36px;min-width:170px;display:flex;align-content:center;white-space:nowrap}.day-selector[data-v-1fba3edd]{margin-top:0}.day-selector[data-v-1fba3edd] .v-field__outline{display:none}.day-selector[data-v-1fba3edd] .v-field__input{padding-top:2px}.day-selector[data-v-1fba3edd] .v-field__append-inner{padding-top:5px!important}.day-selector.v-text-field[data-v-1fba3edd] .v-input__control>.v-input__slot:before{border-style:none}.day-selector.v-text-field[data-v-1fba3edd] .v-input__control>.v-input__slot:after{border-style:none}.sunsim-slider[data-v-1fba3edd] .v-slider-track__background{background:linear-gradient(270deg,#8183c2,#ffb9b9 20.01%,#b2dfff 40.1%,#b2dfff 59.85%,#ffba96 79.96%,#8183c2)!important}.sunsim-bar-wrapper{display:flex;position:absolute;width:60%;min-width:400px;top:12px;left:0;z-index:3;touch-action:none;pointer-events:none}.sunsim-wrapper{width:100%;background:#fff;border-radius:30px;padding:5px;min-height:16px;z-index:3}.sunsim-bar-wrapper .sunsim-date{margin-right:12px;margin-left:12px}.sunsim-wrapper,.sunsim-date{touch-action:auto;pointer-events:all}.sunsim-wrapper .mdi-white-balance-sunny{color:#ffab02;vertical-align:baseline;font-size:20px}@media only screen and (max-width: 980px) and (min-width: 500px){.sunsim-bar-wrapper{top:101%;width:100%}.sunsim-bar-wrapper .sunsim-date{margin-left:0}}@media only screen and (max-width: 980px) and (min-width: 500px) and (orientation: landscape){.sunsim-bar-wrapper{top:calc(100% + 8px);width:100%}.sunsim-bar-wrapper .sunsim-date{margin-left:0}.sunsim-bar-wrapper .sunsim-date,.sunsim-bar-wrapper .sunsim-wrapper{box-shadow:0 0 7px 1px #aaa}}@media only screen and (max-width: 500px){.sunsim-bar-wrapper{height:calc(100% + 84px);top:0;width:100%;flex-direction:column;justify-content:space-between;margin:-42px 0 0;padding:0;left:0;z-index:0;min-width:100%}.sunsim-bar-wrapper .sunsim-date{margin-right:0;margin-left:0}.sunsim-bar-wrapper .sunsim-date,.sunsim-bar-wrapper .sunsim-wrapper{width:100%;border-radius:0;left:0;margin-left:0!important;box-shadow:0 0 7px 1px #aaa}}.image-instance[data-v-fad48118]{position:absolute;width:100%;opacity:0}.image-instance.active[data-v-fad48118]{opacity:1}.north-indicator[data-v-0a2cec1f]{position:absolute;right:0;top:0;height:42px;width:42px;margin-top:12px;margin-right:8px}.image-container[data-v-0a2cec1f]{position:relative}.image-instances[data-v-0a2cec1f]{position:relative;width:100%;height:100%}canvas[data-v-0a2cec1f]{position:absolute;left:0;top:0;z-index:2;opacity:0}.fill-parent[data-v-0a2cec1f]{position:absolute;top:0;bottom:0;left:0;right:0}.svg-container[data-v-0a2cec1f]{transition-property:opacity;transition-duration:.25s;transition-timing-function:ease-in-out}.svg-container[data-v-0a2cec1f],svg[data-v-0a2cec1f]{position:absolute;left:0;top:0;width:100%;height:100%;z-index:10000}svg g[data-v-0a2cec1f] path{cursor:pointer;stroke-width:inherit!important;stroke-opacity:inherit!important;stroke:inherit!important;fill:inherit!important;fill-opacity:inherit!important;transition-property:fill-opacity,fill;transition-duration:.25s;transition-timing-function:ease-in-out}svg g.restricted[data-v-0a2cec1f] path{cursor:default!important}@media only screen and (max-width: 980px) and (min-width: 500px) and (orientation: landscape){div.image-container[data-v-0a2cec1f]{margin-top:44px}}@media only screen and (max-width: 500px){div.image-container[data-v-0a2cec1f]{margin-top:44px;margin-bottom:44px}}.overlay[data-v-9a90fa2f]{z-index:1!important;opacity:1;transition-property:opacity;transition-duration:.25s;transition-timing-function:ease-in-out}.north-indicator[data-v-08f2ea1e]{position:absolute;right:0;top:0;height:42px;width:42px;margin-top:12px;margin-right:8px}.image-container[data-v-08f2ea1e]{position:relative}.image-instances[data-v-08f2ea1e]{position:relative;width:100%;height:100%}canvas[data-v-08f2ea1e]{position:absolute;left:0;top:0;z-index:2;opacity:0}.fill-parent[data-v-08f2ea1e]{position:absolute;top:0;bottom:0;left:0;right:0}@media only screen and (max-width: 980px) and (min-width: 500px) and (orientation: landscape){div.image-container[data-v-08f2ea1e]{margin-top:44px}}@media only screen and (max-width: 500px){div.image-container[data-v-08f2ea1e]{margin-top:44px;margin-bottom:44px}}.v-card[data-v-f4e6ce2e]{transition:box-shadow .3s ease-in-out;border:2px solid transparent}[data-v-f4e6ce2e] .v-slide-group__content{justify-content:center}[data-v-f4e6ce2e] .v-slide-group__next--disabled,[data-v-f4e6ce2e] .v-slide-group__prev--disabled{pointer-events:all!important}.carousel-button[data-v-f4e6ce2e]{height:108px!important;min-width:54px!important;padding:0!important;z-index:2;background-color:#fff!important;border:2px solid #d2d2d2;color:#d2d2d2!important}.carousel-button.mobile[data-v-f4e6ce2e]{height:58px!important;min-width:38px!important}.carousel-button[data-v-f4e6ce2e]:hover{border:2px solid #999!important;color:#999!important}.carousel-button[data-v-f4e6ce2e]:hover:before,.carousel-button[data-v-f4e6ce2e]:hover:after{background-color:#fff!important}.align-baseline[data-v-f4e6ce2e]{align-items:baseline}.active-apt[data-v-f4e6ce2e]{border:4px solid #4caf50!important}.v-image[data-v-f4e6ce2e]{border-radius:0!important}#share-btns-wrapper button[data-v-3560cd03]{margin:0 8px}.v-btn[data-v-3560cd03]{background-color:#fff;pointer-events:all}.disclaimer[data-v-6e4f02d6]{padding:4px 10px;text-align:center;background-color:#00000040;border-radius:5px;line-height:20px}.disclaimer span[data-v-6e4f02d6]{cursor:pointer;color:#fff;text-decoration:underline;pointer-events:all}#player-wrapper[data-v-1dab1ac3]{position:relative;overflow:hidden}#player-sizer[data-v-1dab1ac3]{display:flex;justify-content:center;align-items:center;overflow:hidden}.player-control[data-v-1dab1ac3]{display:flex;position:absolute;z-index:3}#controls-top-left[data-v-1dab1ac3]{top:10px;left:10px}#controls-top-center[data-v-1dab1ac3]{top:10px;left:50%;transform:translate(-50%);z-index:4}#controls-top-right[data-v-1dab1ac3]{top:10px;right:10px;justify-content:flex-end;align-content:flex-end}#controls-center-left[data-v-1dab1ac3]{left:10px;top:50%;transform:translateY(-50%)}#controls-center-center[data-v-1dab1ac3]{top:50%;left:50%;transform:translate(-50%,-50%);align-items:center;justify-content:space-around;z-index:20}#controls-center-right[data-v-1dab1ac3]{top:50%;right:10px;transform:translateY(-50%);justify-content:flex-end;align-items:center}#controls-bottom-left[data-v-1dab1ac3]{bottom:10px;left:10px;z-index:5}#controls-bottom-center[data-v-1dab1ac3]{bottom:10px;left:50%;transform:translate(-50%);align-items:flex-end;justify-content:space-around;z-index:4}#controls-bottom-right[data-v-1dab1ac3]{bottom:10px;right:10px;justify-content:flex-end;align-content:flex-end;align-items:flex-end;z-index:5}.img-div[data-v-b418cf51]{position:absolute;display:block;height:100%;width:100%;background-size:cover;background-position:center center;z-index:2;left:0;top:0}.static-image-wrapper[data-v-b418cf51]{background:#fff}.compass-wrapper[data-v-e2117d1e]{width:50px}.player-and-components-wrapper[data-v-e2117d1e]{position:relative}.static-image[data-v-e2117d1e]{position:absolute;top:0;left:0;width:100%;height:auto}button.v-btn[data-v-e2117d1e]{background:#fff}.waypoint-carousel.full-screen[data-v-e2117d1e]{scale:.5}div#controls-bottom-center>div[data-v-e2117d1e]{display:flex;flex-direction:column;align-items:center}.player-error[data-v-e2117d1e]{min-height:400px;display:flex;align-items:center;justify-content:space-around;background:#ededed}@media only screen and (max-width: 600px){#btn-fullscreen[data-v-e2117d1e]{display:none}}@media all and (orientation: landscape) and (max-height: 499px){#btn-fullscreen[data-v-e2117d1e]{display:none}}")),document.head.appendChild(t)}}catch(a){console.error("vite-plugin-css-injected-by-js",a)}})();
2
- import ke from "axios";
3
- import { openBlock as d, createElementBlock as m, resolveComponent as u, withDirectives as A, createElementVNode as h, normalizeStyle as D, vShow as x, createVNode as l, Fragment as E, renderList as T, createCommentVNode as I, withCtx as c, toDisplayString as S, createTextVNode as B, normalizeClass as M, createBlock as C, renderSlot as k, resolveDynamicComponent as ue, normalizeProps as he, guardReactiveProps as me, defineComponent as W, ref as ge, mergeProps as F, createSlots as Ie, toHandlers as Ce, Transition as ie } from "vue";
4
- function K(e, t, i, o) {
5
- function n(s) {
6
- return s instanceof i ? s : new i(function(r) {
7
- r(s);
8
- });
9
- }
10
- return new (i || (i = Promise))(function(s, r) {
11
- function a(f) {
12
- try {
13
- v(o.next(f));
14
- } catch (_) {
15
- r(_);
16
- }
17
- }
18
- function g(f) {
19
- try {
20
- v(o.throw(f));
21
- } catch (_) {
22
- r(_);
23
- }
24
- }
25
- function v(f) {
26
- f.done ? s(f.value) : n(f.value).then(a, g);
27
- }
28
- v((o = o.apply(e, t || [])).next());
29
- });
30
- }
31
- class O {
32
- async loadJson(t) {
33
- return (await ke.get(t)).data;
34
- }
35
- async loadImage(t) {
36
- return new Promise((i, o) => {
37
- const n = new Image();
38
- n.crossOrigin = "anonymous", n.onload = () => {
39
- i(n);
40
- }, n.onerror = o, n.src = t;
41
- });
42
- }
43
- async loadImageData(t) {
44
- const i = await this.loadImage(t), o = document.createElement("canvas");
45
- try {
46
- const n = o.getContext("2d");
47
- return o.width = i.width, o.height = i.height, n.drawImage(i, 0, 0), o.toDataURL("image/png");
48
- } finally {
49
- o.remove();
50
- }
51
- }
52
- }
53
- const w = (e, t) => {
54
- const i = e.__vccOpts || e;
55
- for (const [o, n] of t)
56
- i[o] = n;
57
- return i;
58
- }, Se = {
59
- name: "QiHoverProbe",
60
- computed: {
61
- isHoverEnabled() {
62
- return window.getComputedStyle(this.$refs.hoverCheck).display === "none";
63
- }
64
- }
65
- }, Be = {
66
- ref: "hoverCheck",
67
- class: "hover-check"
68
- };
69
- function De(e, t, i, o, n, s) {
70
- return d(), m("div", Be, null, 512);
71
- }
72
- const L = /* @__PURE__ */ w(Se, [["render", De], ["__scopeId", "data-v-e4729353"]]), ne = {
73
- methods: {
74
- throttle(e, t) {
75
- let i = !0;
76
- return function(...o) {
77
- i && (i = !1, e.apply(this, o), setTimeout(() => i = !0, t));
78
- };
79
- }
80
- }
81
- }, Ae = {
82
- name: "QiApartmentChooserRaster",
83
- components: { QiHoverProbe: L },
84
- mixins: [ne],
85
- props: {
86
- cdnFileResolver: { type: Function, required: !0 },
87
- viewModel: { type: Object, required: !0 },
88
- selectedUnitId: { type: String, default: null },
89
- unitCallback: { type: Function, default: (e) => e },
90
- canGoToUnitCallback: { type: Function, default: () => !0 },
91
- sceneData: { type: Array, default: [] },
92
- colorCallback: {
93
- type: Function,
94
- default: () => ({ r: 108, g: 0, b: 108, a: 144, s: 2 })
95
- },
96
- drawObserver: {
97
- type: [Object, Array, String, Number, Boolean],
98
- default: null
99
- }
100
- },
101
- emits: ["select-unit", "go-to-unit", "hover-over", "hover-out"],
102
- data() {
103
- return {
104
- pos: { x: 0, y: 0, width: 0, height: 0 },
105
- canvas: null,
106
- canvasBg: null,
107
- canvasWidth: 0,
108
- canvasHeight: 0,
109
- context: null,
110
- contextBg: null,
111
- image: null,
112
- imageData: null,
113
- originalImageData: null,
114
- hoverApartmentIndex: -1,
115
- showApartmentCard: !1,
116
- cursorX: null,
117
- cursorY: null,
118
- rasterImages: {},
119
- vueCanvasCursor: "auto",
120
- timeout: null,
121
- windowListener: void 0,
122
- resourceLoader: new O(),
123
- apartmentIndexRasterMap: {}
124
- };
125
- },
126
- computed: {
127
- isHoverable() {
128
- return this.$refs.hoverProbe.isHoverEnabled;
129
- },
130
- rasterUrl() {
131
- return this.cdnFileResolver(`/scenedata${this.viewModel.currentScene}.png`);
132
- },
133
- rasterImage() {
134
- return this.rasterUrl in this.rasterImages ? this.rasterImages[this.rasterUrl] : null;
135
- },
136
- hoverApartment() {
137
- if (this.hoverApartmentIndex < 0)
138
- return !1;
139
- const e = this.sceneData.find((t) => t.index === this.hoverApartmentIndex);
140
- return e ? this.unitCallback ? this.unitCallback(e.apartmentId) : e.apartmentId : !1;
141
- },
142
- canvasStyle() {
143
- return {
144
- width: this.canvasWidth + "px",
145
- height: this.canvasHeight + "px",
146
- cursor: this.vueCanvasCursor
147
- };
148
- },
149
- hoverBehaviourIdentifier() {
150
- return `hover-${this.showApartmentCard ? "over" : "out"}-${this.hoverApartment ? typeof this.hoverApartment == "object" && "unitId" in this.hoverApartment ? this.hoverApartment.unitId : this.hoverApartment : ""}`;
151
- }
152
- },
153
- watch: {
154
- rasterUrl: {
155
- handler() {
156
- this.rasterImages[this.rasterUrl] || this.resourceLoader.loadImageData(this.rasterUrl).then((e) => {
157
- this.rasterImages = Object.assign(Object.assign({}, this.rasterImages), { [this.rasterUrl]: e });
158
- });
159
- },
160
- immediate: !0
161
- },
162
- rasterImage() {
163
- this.rasterImage && this.init();
164
- },
165
- "viewModel.currentScene": {
166
- handler() {
167
- this.draw();
168
- },
169
- immediate: !0
170
- },
171
- "viewModel.isRotating"() {
172
- this.draw();
173
- },
174
- drawObserver() {
175
- this.draw();
176
- },
177
- selectedUnitId() {
178
- this.draw();
179
- },
180
- hoverApartment() {
181
- this.draw(), this.hoverApartment ? this.vueCanvasCursor = "pointer" : this.vueCanvasCursor = "auto";
182
- },
183
- hoverBehaviourIdentifier() {
184
- this.$emit(this.showApartmentCard ? "hover-over" : "hover-out", {
185
- hoverApartment: this.hoverApartment,
186
- closeHandler: () => this.closeDialog()
187
- });
188
- },
189
- pos() {
190
- this.$emit("pos", this.pos);
191
- }
192
- },
193
- mounted() {
194
- this.windowListener = () => {
195
- clearTimeout(this.timeout), this.updateCanvasSize(), this.timeout = setTimeout(() => {
196
- this.updateCanvasSize();
197
- }, 50);
198
- }, window.addEventListener("resize", this.windowListener), this.updateCanvasSize();
199
- },
200
- beforeUnmount() {
201
- window.removeEventListener("resize", this.windowListener);
202
- for (const e in this.rasterImages)
203
- URL.revokeObjectURL(this.rasterImages[e]);
204
- },
205
- methods: {
206
- init() {
207
- this.canvas = this.$refs.canvasMask, this.context = this.canvas.getContext("2d", { willReadFrequently: !0 }), this.image = new Image(), this.image.onload = () => {
208
- this.setupDraw(), this.canvas.addEventListener("mousemove", this.throttle(this.handleMouseMove, 50));
209
- }, this.image.src = this.rasterImage;
210
- },
211
- handleMouseMove(e) {
212
- const t = this.getApartmentIndexByCursorPosition(e.offsetX, e.offsetY);
213
- this.showApartmentCard = t >= 0, this.hoverApartmentIndex = t, this.pos = {
214
- x: e.offsetX,
215
- y: e.offsetY,
216
- width: this.canvasWidth,
217
- height: this.canvasHeight
218
- };
219
- },
220
- clickCanvas(e) {
221
- const t = this.getApartmentIndexByCursorPosition(e.offsetX, e.offsetY);
222
- t < 0 || this.isHoverable && this.goToApartmentByIndex(t);
223
- },
224
- setImageData() {
225
- if (this.image && this.image.width) {
226
- this.canvas.width = this.image.width, this.canvas.height = this.image.height, this.context.drawImage(this.image, 0, 0, this.image.width, this.image.height), this.originalImageData = this.context.getImageData(0, 0, this.canvas.width, this.canvas.height), this.imageData = this.context.getImageData(0, 0, this.canvas.width, this.canvas.height);
227
- const e = this.originalImageData.data;
228
- this.apartmentIndexRasterMap = {};
229
- for (let t = 0; t < e.length; t += 4)
230
- this.apartmentIndexRasterMap[e[t]] = [];
231
- for (let t = 3; t < e.length; t += 4)
232
- e[t] === 255 && e[t - 3] in this.apartmentIndexRasterMap && this.apartmentIndexRasterMap[e[t - 3]].push(t - 3);
233
- }
234
- },
235
- getApartmentIndexByCursorPosition(e, t) {
236
- this.cursorX = e, this.cursorY = t;
237
- const i = this.canvas.offsetWidth / this.canvas.width, o = this.canvas.offsetHeight / this.canvas.height, n = (e / i).toFixed(), r = (t / o).toFixed() * (this.canvas.width * 4) + n * 4, a = this.originalImageData.data[r];
238
- return this.originalImageData.data[r + 3] > 0 ? a : -1;
239
- },
240
- getApartmentIndexById(e) {
241
- const t = this.sceneData.find((i) => i.apartmentId === e);
242
- return t ? t.index : -1;
243
- },
244
- highlightApartments() {
245
- this.getApartmentsInRaster().forEach((t) => {
246
- if (t.index >= 0) {
247
- const i = this.getApartmentPixelsByIndex(t.index), o = this.getApartmentIdByIndex(t.index);
248
- let n = "idle";
249
- !this.hoverApartment && this.selectedUnitId && o === this.selectedUnitId ? n = "selected" : this.hoverApartment && this.hoverApartmentIndex === t.index && (n = "hover");
250
- const s = this.unitCallback ? this.unitCallback(o) : o;
251
- if (s) {
252
- const r = this.colorCallback(s, n);
253
- if (r)
254
- for (let a = 0; a < i.length; a++)
255
- this.imageData.data[i[a]] = r.r, this.imageData.data[i[a] + 1] = r.g, this.imageData.data[i[a] + 2] = r.b, this.imageData.data[i[a] + 3] = r.a;
256
- }
257
- }
258
- });
259
- },
260
- // GETTING APARTMENT DATA
261
- // Returns the index of each RGBA value of a given apartment
262
- getApartmentPixelsByIndex(e) {
263
- return this.originalImageData ? this.apartmentIndexRasterMap[e] : !1;
264
- },
265
- getApartmentIdByIndex(e) {
266
- const t = this.sceneData.find((i) => i.index === e);
267
- return t && t.apartmentId;
268
- },
269
- getApartmentsInRaster() {
270
- if (this.originalImageData) {
271
- const e = Object.keys(this.apartmentIndexRasterMap).map((i) => parseInt(i));
272
- return this.sceneData.filter((i) => e.includes(i.index));
273
- } else
274
- return [];
275
- },
276
- goToApartmentByIndex(e) {
277
- const t = this.getApartmentIdByIndex(e);
278
- this.goToApartmentById(t);
279
- },
280
- goToApartmentById(e) {
281
- const t = this.unitCallback ? this.unitCallback(e) : e;
282
- this.$emit("select-unit", t), t && this.canGoToUnitCallback(t) && this.$emit("go-to-unit", t);
283
- },
284
- setAlpha(e = 0) {
285
- if (!this.imageData)
286
- return;
287
- const t = this.imageData.data;
288
- for (let i = 3; i < t.length; i += 4)
289
- t[i] = e;
290
- },
291
- updateCanvasSize() {
292
- if (!this.$el)
293
- return !1;
294
- this.canvasWidth = this.$el.offsetWidth, this.canvasHeight = this.$el.offsetHeight;
295
- },
296
- setupDraw() {
297
- this.setImageData(), this.draw();
298
- },
299
- draw() {
300
- this.setAlpha(), this.highlightApartments(), this.context && this.imageData && this.context.putImageData(this.imageData, 0, 0);
301
- },
302
- closeDialog() {
303
- this.showApartmentCard = !1;
304
- }
305
- }
306
- }, xe = { id: "canvas" };
307
- function Me(e, t, i, o, n, s) {
308
- const r = u("qi-hover-probe");
309
- return d(), m("div", xe, [
310
- A(h("canvas", {
311
- id: "canvas-mask",
312
- ref: "canvasMask",
313
- style: D(s.canvasStyle),
314
- onClick: t[0] || (t[0] = (...a) => s.clickCanvas && s.clickCanvas(...a))
315
- }, null, 4), [
316
- [x, !i.viewModel.isRotating]
317
- ]),
318
- l(r, { ref: "hoverProbe" }, null, 512)
319
- ]);
320
- }
321
- const Q = /* @__PURE__ */ w(Ae, [["render", Me], ["__scopeId", "data-v-3bbbc77b"]]), Re = {
322
- name: "QiApartmentChooserSvg",
323
- components: { QiHoverProbe: L },
324
- mixins: [ne],
325
- props: {
326
- cdnFileResolver: { type: Function, required: !0 },
327
- viewModel: { type: Object, required: !0 },
328
- selectedUnitId: { type: String, default: null },
329
- unitCallback: { type: Function, default: (e) => e },
330
- canGoToUnitCallback: { type: Function, default: () => !0 },
331
- sceneData: { type: Array, default: [] },
332
- colorCallback: {
333
- type: Function,
334
- default: () => ({ r: 108, g: 0, b: 108, a: 144, s: 2 })
335
- },
336
- drawObserver: {
337
- type: [Object, Array, String, Number, Boolean],
338
- default: null
339
- }
340
- },
341
- emits: ["select-unit", "go-to-unit", "hover-over", "hover-out"],
342
- data() {
343
- return {
344
- pos: { x: 0, y: 0, width: 0, height: 0 },
345
- hoverApartmentIndex: -1,
346
- svgImages: {},
347
- currentSvgImage: null,
348
- resourceLoader: new O()
349
- };
350
- },
351
- computed: {
352
- isHoverable() {
353
- return this.$refs.hoverProbe.isHoverEnabled;
354
- }
355
- },
356
- watch: {
357
- "viewModel.currentScene": {
358
- handler() {
359
- this.viewModel.currentScene in this.svgImages && (this.currentSvgImage = this.svgImages[this.viewModel.currentScene]);
360
- },
361
- immediate: !0
362
- },
363
- svgImages: {
364
- handler() {
365
- this.viewModel.currentScene in this.svgImages && (this.currentSvgImage = this.svgImages[this.viewModel.currentScene]);
366
- },
367
- immediate: !0
368
- },
369
- pos() {
370
- this.$emit("pos", this.pos);
371
- },
372
- hoverApartmentIndex(e, t) {
373
- if (e >= 0) {
374
- const i = this.getApartmentByIndex(e);
375
- this.$emit("hover-over", {
376
- hoverApartment: i,
377
- closeHandler: () => {
378
- this.hoverApartmentIndex = -1;
379
- }
380
- });
381
- } else {
382
- const i = this.getApartmentByIndex(t);
383
- this.$emit("hover-out", {
384
- hoverApartment: i,
385
- closeHandler: () => {
386
- this.hoverApartmentIndex = -1;
387
- }
388
- });
389
- }
390
- }
391
- },
392
- mounted() {
393
- for (let e = 1; e <= 4; e++) {
394
- const t = this.cdnFileResolver(`/scenedata${e}.svg`), i = {};
395
- this.resourceLoader.loadJson(t).then((o) => {
396
- i.markup = o;
397
- const s = new DOMParser().parseFromString(o, "image/svg+xml").getElementsByTagName("svg")[0];
398
- i.viewBox = s.getAttribute("viewBox"), i.svgObjects = Array.from(s.querySelectorAll("*[data-index]")).map((r) => ({
399
- index: parseInt(r.getAttribute("data-index")),
400
- svg: r.innerHTML
401
- })), this.svgImages = Object.assign(Object.assign({}, this.svgImages), { [e]: i });
402
- });
403
- }
404
- this.$refs.container.addEventListener("mousemove", this.throttle(this.handleMouseMove, 50));
405
- },
406
- methods: {
407
- handleMouseMove(e) {
408
- this.pos = {
409
- x: e.offsetX,
410
- y: e.offsetY,
411
- width: this.$el.offsetWidth,
412
- height: this.$el.offsetHeight
413
- };
414
- },
415
- getApartmentIdByIndex(e) {
416
- var t;
417
- return (t = this.sceneData.find((i) => i.index === parseInt(e))) === null || t === void 0 ? void 0 : t.apartmentId;
418
- },
419
- getApartmentByIndex(e) {
420
- const t = this.getApartmentIdByIndex(e);
421
- return this.unitCallback ? this.unitCallback(t) : t;
422
- },
423
- mouseEnter(e) {
424
- this.isHoverable && (this.hoverApartmentIndex = e);
425
- },
426
- mouseLeave() {
427
- this.isHoverable && (this.hoverApartmentIndex = -1);
428
- },
429
- click(e) {
430
- const t = this.getApartmentByIndex(e);
431
- this.$emit("select-unit", t), this.isHoverable && t && this.canGoToUnitCallback(t) ? this.$emit("go-to-unit", t) : this.hoverApartmentIndex = e;
432
- },
433
- getGClass(e) {
434
- const t = this.getApartmentIdByIndex(e), i = this.getApartmentByIndex(e);
435
- let o = "idle";
436
- this.hoverApartmentIndex < 0 && this.selectedUnitId && t === this.selectedUnitId ? o = "selected" : this.hoverApartmentIndex >= 0 && this.hoverApartmentIndex === e && (o = "hover");
437
- const n = this.colorCallback(i, o);
438
- if (n) {
439
- const { r: s, g: r, b: a, a: g, s: v } = n;
440
- return {
441
- strokeWidth: v !== void 0 ? v : 2,
442
- stroke: `rgb(${s}, ${r}, ${a})`,
443
- strokeOpacity: 1,
444
- fill: `rgb(${s}, ${r}, ${a})`,
445
- fillOpacity: g / 255,
446
- cursor: `${this.canGoToUnitCallback(i) ? "cursor" : "default"} !important`
447
- };
448
- } else
449
- return {
450
- strokeWidth: 0,
451
- stroke: "white",
452
- strokeOpacity: 0,
453
- fill: "white",
454
- fillOpacity: 0,
455
- cursor: "default !important"
456
- };
457
- }
458
- }
459
- }, Fe = {
460
- id: "container",
461
- ref: "container"
462
- }, He = ["viewBox"], Te = ["innerHTML", "onMouseenter", "onMouseleave", "onClick"];
463
- function Oe(e, t, i, o, n, s) {
464
- const r = u("qi-hover-probe");
465
- return d(), m("div", Fe, [
466
- A(h("div", {
467
- class: "svg-container",
468
- style: D({
469
- opacity: !n.currentSvgImage || !n.currentSvgImage.svgObjects ? 0 : 1
470
- })
471
- }, [
472
- n.currentSvgImage && n.currentSvgImage.svgObjects ? (d(), m("svg", {
473
- key: 0,
474
- viewBox: n.currentSvgImage.viewBox
475
- }, [
476
- (d(!0), m(E, null, T(n.currentSvgImage.svgObjects, ({ index: a, svg: g }) => (d(), m("g", {
477
- key: a,
478
- innerHTML: g,
479
- style: D(s.getGClass(a)),
480
- onMouseenter: (v) => s.mouseEnter(a),
481
- onMouseleave: (v) => s.mouseLeave(a),
482
- onClick: (v) => s.click(a)
483
- }, null, 44, Te))), 128))
484
- ], 8, He)) : I("", !0)
485
- ], 4), [
486
- [x, !i.viewModel.isRotating]
487
- ]),
488
- l(r, { ref: "hoverProbe" }, null, 512)
489
- ], 512);
490
- }
491
- const V = /* @__PURE__ */ w(Re, [["render", Oe], ["__scopeId", "data-v-82a61864"]]), Le = {
492
- name: "QiApartmentChooserNavigation",
493
- inject: ["i18n"],
494
- props: {
495
- canGoToUnitCallback: { type: Function, default: () => !0 },
496
- selectedUnit: { type: Object, default: null },
497
- prevUnit: { type: Object, default: null },
498
- nextUnit: { type: Object, default: null },
499
- viewModel: { type: Object, required: !0 }
500
- },
501
- mounted() {
502
- window.addEventListener("keydown", this.keyNavigate);
503
- },
504
- beforeUnmount() {
505
- window.removeEventListener("keydown", this.keyNavigate);
506
- },
507
- methods: {
508
- keyNavigate(e) {
509
- e.keyCode === 37 ? this.prevUnit && this.$emit("prev-unit") : e.keyCode === 39 && this.nextUnit && this.$emit("next-unit");
510
- }
511
- }
512
- }, Ue = {
513
- key: 0,
514
- class: "d-none d-md-flex"
515
- };
516
- function $e(e, t, i, o, n, s) {
517
- const r = u("v-btn");
518
- return d(), m("div", null, [
519
- l(r, {
520
- elevation: "1",
521
- icon: "mdi-rotate-right",
522
- class: "black darken-1",
523
- onClick: t[0] || (t[0] = (a) => i.viewModel.rotateClockwise())
524
- }),
525
- l(r, {
526
- elevation: "1",
527
- plain: "",
528
- icon: "mdi-chevron-left",
529
- class: "mr-sm-4 ml-sm-8 mr-3 ml-3 black darken-1",
530
- disabled: !i.prevUnit,
531
- onClick: t[1] || (t[1] = (a) => e.$emit("prev-unit"))
532
- }, null, 8, ["disabled"]),
533
- l(r, {
534
- color: "success darken-2",
535
- elevation: "1",
536
- rounded: "",
537
- plain: "",
538
- disabled: !i.selectedUnit || !i.canGoToUnitCallback(i.selectedUnit),
539
- onClick: t[2] || (t[2] = (a) => e.$emit("go-to-unit", i.selectedUnit))
540
- }, {
541
- default: c(() => [
542
- i.selectedUnit && i.canGoToUnitCallback(i.selectedUnit) ? (d(), m("span", Ue, S(s.i18n.getLabel("see-apartment")) + "  ", 1)) : I("", !0),
543
- h("span", null, S(i.selectedUnit && "title" in i.selectedUnit ? i.selectedUnit.title : "-"), 1)
544
- ]),
545
- _: 1
546
- }, 8, ["disabled"]),
547
- l(r, {
548
- elevation: "1",
549
- plain: "",
550
- icon: "mdi-chevron-right",
551
- class: "mr-sm-8 ml-sm-4 mr-3 ml-3 black darken-1",
552
- disabled: !i.nextUnit,
553
- onClick: t[3] || (t[3] = (a) => e.$emit("next-unit"))
554
- }, null, 8, ["disabled"]),
555
- l(r, {
556
- elevation: "1",
557
- plain: "",
558
- icon: "mdi-rotate-left",
559
- class: "black darken-1",
560
- onClick: t[4] || (t[4] = (a) => i.viewModel.rotateCounterClockwise())
561
- })
562
- ]);
563
- }
564
- const se = /* @__PURE__ */ w(Le, [["render", $e], ["__scopeId", "data-v-129ef905"]]);
565
- class G {
566
- constructor(t) {
567
- this._numParts = t, this._loadedCount = 0, this._isError = !1, this._finishedAction = () => {
568
- }, this._errorAction = () => {
569
- }, this._loadProgressAction = () => {
570
- };
571
- }
572
- onLoadFinished(t) {
573
- return this._finishedAction = t, this;
574
- }
575
- onLoadError(t) {
576
- return this._errorAction = t, this;
577
- }
578
- onLoadProgress(t) {
579
- return this._loadProgressAction = t, this;
580
- }
581
- partLoaded() {
582
- this.isFinished || (this._loadedCount++, this._loadProgressAction(this.percentLoaded), this.isFinished && this._finishedAction());
583
- }
584
- errorDetected() {
585
- this._isError || (this._isError = !0, this._errorAction());
586
- }
587
- get isFinished() {
588
- return this._loadedCount >= this._numParts;
589
- }
590
- get isError() {
591
- return this._isError;
592
- }
593
- get percentLoaded() {
594
- return Math.round(this._loadedCount * 100 / this._numParts);
595
- }
596
- }
597
- class oe {
598
- constructor(t, i, o, n) {
599
- this._rotator = t, this._direction = i, this._frameIndex = o, this._sceneCount = n;
600
- }
601
- get atEnd() {
602
- return this._sceneCount === 0;
603
- }
604
- get frameIndex() {
605
- return this._frameIndex;
606
- }
607
- nextFrame() {
608
- const t = this._rotator.clampFrameIndex(
609
- this._frameIndex + this._direction
610
- ), i = this._rotator.isCardinalFrame(t) ? this._sceneCount - 1 : this._sceneCount;
611
- return new oe(
612
- this._rotator,
613
- this._direction,
614
- t,
615
- i
616
- );
617
- }
618
- }
619
- class ve {
620
- constructor(t, i) {
621
- this._cardinalFrames = t, this._totalFrameCount = i;
622
- }
623
- start(t, i, o) {
624
- const n = this.startFrameIndexForScene(i);
625
- return new oe(this, t, n, o);
626
- }
627
- isCardinalFrame(t) {
628
- return this._cardinalFrames.includes(t);
629
- }
630
- clampFrameIndex(t) {
631
- return (this._totalFrameCount + t) % this._totalFrameCount;
632
- }
633
- startFrameIndexForScene(t) {
634
- return this._cardinalFrames[t];
635
- }
636
- }
637
- const ce = 64, j = 4, Ee = 120, je = {
638
- name: "QiApartmentChooserRotator",
639
- props: {
640
- viewModel: { type: Object, required: !0 },
641
- build: { type: String, default: "" },
642
- cdnFileResolver: { type: Function, required: !0 },
643
- cardinalFrames: { type: Array, required: !0 }
644
- },
645
- emits: ["loaded", "error", "progress"],
646
- data() {
647
- const e = this.createFrames();
648
- return {
649
- loadTracker: new G(e.length).onLoadFinished(() => this.$emit("loaded")).onLoadProgress((t) => this.$emit("progress", t)).onLoadError(() => this.$emit("error")),
650
- sceneRotator: new ve(this.cardinalFrames, ce),
651
- images: e,
652
- isPreloaded: !1
653
- };
654
- },
655
- computed: {
656
- activeFrame() {
657
- return this.images.find((e) => e.show);
658
- }
659
- },
660
- watch: {
661
- "viewModel.currentScene"(e, t) {
662
- const i = this.getDirection(t, e), o = this.getSceneCountBetween(t, e);
663
- this.rotateInDirection(t, i, o);
664
- }
665
- },
666
- created() {
667
- this.rotateComplete();
668
- },
669
- methods: {
670
- rotateInDirection(e, t, i) {
671
- this.viewModel.isRotating || (this.viewModel.isRotating = !0, this.rotationStep(this.sceneRotator.start(t, e % j, i)));
672
- },
673
- rotationStep(e) {
674
- setTimeout(() => {
675
- this.images[e.frameIndex].show = !1;
676
- const t = e.nextFrame();
677
- this.images[t.frameIndex].show = !0, t.atEnd ? this.rotateComplete() : window.requestAnimationFrame(() => this.rotationStep(t));
678
- }, 1e3 / Ee);
679
- },
680
- rotateComplete() {
681
- const e = this.sceneRotator.startFrameIndexForScene(this.viewModel.currentScene % j);
682
- e in this.images && (this.images[e].show = !0), this.viewModel.isRotating = !1;
683
- },
684
- createFrames() {
685
- const e = [];
686
- for (let t = 0; t < ce; t++) {
687
- const { sourceSet: i, defaultPath: o } = this.frameImageSource(t);
688
- e.push({
689
- index: t,
690
- sourceSet: i,
691
- defaultPath: o,
692
- show: !1
693
- });
694
- }
695
- return e;
696
- },
697
- frameImageSource(e) {
698
- const t = ("0000" + (e + 1)).slice(-4), i = this.build ? `?v=${this.build}` : "", o = [
699
- `${this.cdnFileResolver(`/480/${t}.jpg${i}`)} 480w`,
700
- `${this.cdnFileResolver(`/960/${t}.jpg${i}`)} 960w`,
701
- `${this.cdnFileResolver(`/1280/${t}.jpg${i}`)} 1280w`
702
- ].join(","), n = this.cdnFileResolver(`/480/${t}.jpg${i}`);
703
- return { sourceSet: o, defaultPath: n };
704
- },
705
- getSceneCountBetween(e, t) {
706
- const i = j / 2, o = Math.abs(e - t);
707
- return o > i ? j - o : o;
708
- },
709
- getDirection(e, t) {
710
- if (e === t)
711
- return 0;
712
- const o = Math.abs(e - t) < j / 2;
713
- return o && e < t || !o && e > t ? 1 : -1;
714
- }
715
- }
716
- }, qe = {
717
- key: 0,
718
- class: "fill-parent d-flex justify-center align-center blue-grey lighten-5"
719
- }, Ye = {
720
- key: 1,
721
- class: "frame-container"
722
- }, ze = { class: "frame-image" }, Pe = ["srcset", "type"], Qe = ["src"], Ve = {
723
- key: 2,
724
- id: "image-stack",
725
- class: "frame-container"
726
- }, Ge = ["alt"], Ne = ["srcset"], Xe = ["src"];
727
- function We(e, t, i, o, n, s) {
728
- const r = u("v-icon");
729
- return d(), m("div", null, [
730
- n.loadTracker.isError ? (d(), m("div", qe, [
731
- l(r, { "x-large": "" }, {
732
- default: c(() => [
733
- B("mdi-alert-circle-outline")
734
- ]),
735
- _: 1
736
- })
737
- ])) : n.isPreloaded ? (d(), m("div", Ve, [
738
- (d(!0), m(E, null, T(n.images, (a) => (d(), m("picture", {
739
- key: a.index,
740
- alt: a.index,
741
- class: M({ "frame-image": !0, show: a.show })
742
- }, [
743
- h("source", {
744
- srcset: a.sourceSet,
745
- type: "image/jpeg"
746
- }, null, 8, Ne),
747
- h("img", {
748
- src: a.defaultPath,
749
- alt: "Building image",
750
- onLoad: t[2] || (t[2] = (g) => n.loadTracker.partLoaded()),
751
- onError: t[3] || (t[3] = (g) => n.loadTracker.errorDetected())
752
- }, null, 40, Xe)
753
- ], 10, Ge))), 128))
754
- ])) : (d(), m("div", Ye, [
755
- h("picture", ze, [
756
- h("source", {
757
- srcset: s.activeFrame.sourceSet,
758
- type: s.activeFrame.type
759
- }, null, 8, Pe),
760
- h("img", {
761
- src: s.activeFrame.defaultPath,
762
- onLoad: t[0] || (t[0] = (a) => n.isPreloaded = !0),
763
- onError: t[1] || (t[1] = (a) => n.loadTracker.errorDetected())
764
- }, null, 40, Qe)
765
- ])
766
- ]))
767
- ]);
768
- }
769
- const re = /* @__PURE__ */ w(je, [["render", We], ["__scopeId", "data-v-e6481f8e"]]), Ke = {
770
- name: "FloatingCard",
771
- props: {
772
- pos: { type: Object, required: !0 },
773
- isHoverable: Boolean
774
- },
775
- computed: {
776
- q() {
777
- const e = this.pos.x <= this.pos.width / 2 ? "left" : "right";
778
- return `${this.pos.y <= this.pos.height / 2 ? "top" : "bottom"}-${e}`;
779
- }
780
- }
781
- };
782
- function Ze(e, t, i, o, n, s) {
783
- const r = u("v-dialog"), a = u("v-fade-transition");
784
- return d(), C(a, {
785
- origin: s.q.replace("-", " ") + " " + i.pos.x + " " + i.pos.y
786
- }, {
787
- default: c(() => [
788
- i.isHoverable ? (d(), m("div", {
789
- key: 0,
790
- class: M(["floating-card", s.q]),
791
- style: D({ left: `${i.pos.x}px`, top: `${i.pos.y}px`, pointerEvents: "none" })
792
- }, [
793
- k(e.$slots, "default", { isHoverable: i.isHoverable }, void 0, !0)
794
- ], 6)) : (d(), C(r, {
795
- key: 1,
796
- value: !0,
797
- width: "auto",
798
- "onClick:outside": t[0] || (t[0] = (g) => e.$emit("outside", g))
799
- }, {
800
- default: c(() => [
801
- k(e.$slots, "default", { isHoverable: i.isHoverable }, void 0, !0)
802
- ]),
803
- _: 3
804
- }))
805
- ]),
806
- _: 3
807
- }, 8, ["origin"]);
808
- }
809
- const q = /* @__PURE__ */ w(Ke, [["render", Ze], ["__scopeId", "data-v-b74de171"]]), Je = {
810
- name: "QiZoomBox",
811
- props: {
812
- desktop: {
813
- type: Boolean,
814
- default: !0
815
- },
816
- mobile: {
817
- type: Boolean,
818
- default: !0
819
- },
820
- maxScale: {
821
- type: Number,
822
- default: 10
823
- },
824
- consumeMouseClickWhenMoved: {
825
- type: Boolean,
826
- default: !0
827
- },
828
- consumeMouseUpWhenMoved: {
829
- type: Boolean,
830
- default: !0
831
- }
832
- },
833
- data() {
834
- return {
835
- zoom: 100,
836
- originX: 0,
837
- originY: 0,
838
- moving: !1,
839
- scaling: !1,
840
- lastEvent: void 0,
841
- moved: !1
842
- };
843
- },
844
- computed: {
845
- transform() {
846
- return `translateX(${this.originX}px) translateY(${this.originY}px) scale(${this.scale})`;
847
- },
848
- scale() {
849
- return this.zoom / 100;
850
- },
851
- actualMaxScale() {
852
- return this.maxScale * 100;
853
- }
854
- },
855
- watch: {
856
- scale() {
857
- this.emitUpdate();
858
- },
859
- originX() {
860
- this.emitUpdate();
861
- },
862
- originY() {
863
- this.emitUpdate();
864
- },
865
- desktop() {
866
- this.desktop ? this.addDesktopHandlers() : this.removeDesktopHandlers();
867
- },
868
- mobile() {
869
- this.mobile ? this.addMobileHandlers() : this.removeMobileHandlers();
870
- }
871
- },
872
- mounted() {
873
- this.desktop && this.addDesktopHandlers(), this.mobile && this.addMobileHandlers();
874
- },
875
- beforeUnmount() {
876
- this.desktop && this.removeDesktopHandlers(), this.mobile && this.removeMobileHandlers();
877
- },
878
- methods: {
879
- addDesktopHandlers() {
880
- this.$refs.box.addEventListener("wheel", this.wheelHandler, {
881
- capture: !0
882
- }), this.$refs.box.addEventListener("mousedown", this.mouseDownHandler, {
883
- capture: !0
884
- }), this.$refs.box.addEventListener("mousemove", this.mouseMoveHandler, {
885
- capture: !0
886
- }), window.addEventListener("mouseup", this.mouseUpHandler, {
887
- capture: !0
888
- }), window.addEventListener("click", this.mouseClickHandler, {
889
- capture: !0
890
- });
891
- },
892
- addMobileHandlers() {
893
- this.$refs.box.addEventListener("touchstart", this.touchStartHandler, {
894
- capture: !0
895
- }), this.$refs.box.addEventListener("touchmove", this.touchMoveHandler, {
896
- capture: !0
897
- }), window.addEventListener("touchend", this.touchEndHandler, {
898
- capture: !0
899
- }), window.addEventListener("touchcancel", this.touchEndHandler, {
900
- capture: !0
901
- });
902
- },
903
- removeDesktopHandlers() {
904
- this.$refs.box.removeEventListener("wheel", this.wheelHandler, {
905
- capture: !0
906
- }), this.$refs.box.removeEventListener("mousedown", this.mouseDownHandler, {
907
- capture: !0
908
- }), this.$refs.box.removeEventListener("mousemove", this.mouseMoveHandler, {
909
- capture: !0
910
- }), window.removeEventListener("mouseup", this.mouseUpHandler, {
911
- capture: !0
912
- }), window.removeEventListener("click", this.mouseClickHandler, {
913
- capture: !0
914
- });
915
- },
916
- removeMobileHandlers() {
917
- this.$refs.box.removeEventListener("touchstart", this.touchStartHandler, {
918
- capture: !0
919
- }), this.$refs.box.removeEventListener("touchmove", this.touchMoveHandler, {
920
- capture: !0
921
- }), window.removeEventListener("touchend", this.touchEndHandler, {
922
- capture: !0
923
- }), window.removeEventListener("touchcancel", this.touchEndHandler, {
924
- capture: !0
925
- });
926
- },
927
- wheelHandler(e) {
928
- const { x: t, y: i } = this.getOffsetCoordinates(e);
929
- this.adjustZoom(-e.deltaY / 10, t, i), e.preventDefault();
930
- },
931
- mouseDownHandler(e) {
932
- this.moving = !0, this.moved = !1, this.lastEvent = e;
933
- },
934
- mouseMoveHandler(e) {
935
- if (this.moving) {
936
- const { x: t, y: i } = this.getOffsetCoordinates(e), { x: o, y: n } = this.getOffsetCoordinates(this.lastEvent), s = {
937
- x: t - o,
938
- y: i - n
939
- };
940
- this.adjustTranslateX(s.x), this.adjustTranslateY(s.y), this.moved = !0, this.lastEvent = e;
941
- }
942
- },
943
- mouseUpHandler(e) {
944
- this.moving && this.moved && this.consumeMouseUpWhenMoved && (e.preventDefault(), e.stopImmediatePropagation());
945
- },
946
- mouseClickHandler(e) {
947
- this.moving && (this.moved && this.consumeMouseClickWhenMoved && (e.preventDefault(), e.stopImmediatePropagation()), this.moving = !1);
948
- },
949
- touchStartHandler(e) {
950
- this.moving = e.touches.length === 1, this.scaling = e.touches.length === 2, this.lastEvent = e;
951
- },
952
- touchMoveHandler(e) {
953
- if (this.moving) {
954
- const { x: t, y: i } = this.getOffsetCoordinates(e.touches[0]), { x: o, y: n } = this.getOffsetCoordinates(this.lastEvent.touches[0]), s = {
955
- x: t - o,
956
- y: i - n
957
- };
958
- this.adjustTranslateX(s.x), this.adjustTranslateY(s.y);
959
- } else if (this.scaling && e.touches.length === 2) {
960
- const { x: t, y: i } = this.getOffsetCoordinates(e.touches[0]), { x: o, y: n } = this.getOffsetCoordinates(this.lastEvent.touches[0]), { x: s, y: r } = this.getOffsetCoordinates(e.touches[1]), { x: a, y: g } = this.getOffsetCoordinates(this.lastEvent.touches[1]), v = Math.hypot(o - a, n - g), f = Math.hypot(t - s, i - r), _ = (s + t) / 2, b = (r + i) / 2;
961
- this.adjustZoom(f - v, _, b);
962
- }
963
- this.lastEvent = e;
964
- },
965
- touchEndHandler() {
966
- this.moving = !1, this.scaling = !1;
967
- },
968
- getOffsetCoordinates(e) {
969
- const { left: t, top: i } = this.$refs.box.getBoundingClientRect();
970
- return {
971
- x: e.clientX - t,
972
- y: e.clientY - i
973
- };
974
- },
975
- adjustTranslateX(e) {
976
- const t = this.$refs.box.clientWidth, i = t * this.scale;
977
- this.originX = Math.max(Math.min(0, this.originX + e), -(i - t));
978
- },
979
- adjustTranslateY(e) {
980
- const t = this.$refs.box.clientHeight, i = t * this.scale;
981
- this.originY = Math.max(Math.min(0, this.originY + e), -(i - t));
982
- },
983
- adjustZoom(e, t, i) {
984
- const o = this.$refs.box.clientWidth, n = this.$refs.box.clientHeight, s = o * this.scale, r = n * this.scale;
985
- this.zoom = Math.min(Math.max(100, this.zoom + e), this.actualMaxScale);
986
- const a = o * this.scale, g = n * this.scale, v = a - s, f = g - r;
987
- this.originX -= t / o * v, this.originY -= i / n * f, this.adjustTranslateX(0), this.adjustTranslateY(0);
988
- },
989
- emitUpdate() {
990
- this.$emit("update", {
991
- scale: this.scale,
992
- x: this.originX,
993
- y: this.originY,
994
- resolve: (e, t) => {
995
- const i = this.$refs.box.clientWidth, o = this.$refs.box.clientHeight, n = this.originX / -this.scale, s = this.originY / -this.scale, r = n + i / this.scale, a = s + o / this.scale, g = e / i * (r - n) + n, v = t / o * (a - s) + s;
996
- return { x: g, y: v };
997
- }
998
- });
999
- }
1000
- }
1001
- }, et = {
1002
- ref: "box",
1003
- class: "zoom-box-container"
1004
- };
1005
- function tt(e, t, i, o, n, s) {
1006
- return d(), m("div", et, [
1007
- h("div", {
1008
- style: D({ "transform-origin": "top left", transform: s.transform }),
1009
- class: "zoom-box"
1010
- }, [
1011
- k(e.$slots, "default", {}, void 0, !0)
1012
- ], 4)
1013
- ], 512);
1014
- }
1015
- const Y = /* @__PURE__ */ w(Je, [["render", tt], ["__scopeId", "data-v-83bfd28a"]]), ae = 4;
1016
- function pe(e) {
1017
- return e < ae ? e + 1 : 1;
1018
- }
1019
- function it(e) {
1020
- return e > 1 ? e - 1 : ae;
1021
- }
1022
- class fe {
1023
- constructor(t) {
1024
- this._state = {
1025
- isRotating: !1,
1026
- currentScene: t
1027
- };
1028
- }
1029
- get isRotating() {
1030
- return this._state.isRotating;
1031
- }
1032
- set isRotating(t) {
1033
- this._state.isRotating = t;
1034
- }
1035
- get navigator() {
1036
- return this._navigator;
1037
- }
1038
- get sceneModel() {
1039
- return this._sceneModel;
1040
- }
1041
- unlessRotatingDo(t) {
1042
- this.isRotating || t();
1043
- }
1044
- get currentScene() {
1045
- return this._state.currentScene;
1046
- }
1047
- set currentScene(t) {
1048
- this._state.currentScene = t;
1049
- }
1050
- rotateCounterClockwise() {
1051
- this.unlessRotatingDo(() => {
1052
- this.currentScene = pe(this.currentScene);
1053
- });
1054
- }
1055
- rotateClockwise() {
1056
- this.unlessRotatingDo(() => {
1057
- this.currentScene = it(this.currentScene);
1058
- });
1059
- }
1060
- }
1061
- const nt = {
1062
- // virtual tour default labels
1063
- interior: "Interiør",
1064
- "see-a-selection-of-the-options-in-the-project": "Se et utvalg av tilvalgsmulighetene i prosjektet.",
1065
- "floor-plan": "Planløsning",
1066
- "all-illustrations-are-indicative-deviations-may-occur": { nb: "Alle illustrasjoner er veiledende. Avvik kan forekomme.", en: "All illustrations are indicative. Discrepancies may exist." },
1067
- "read-more-here": "Les mer her",
1068
- "i-understand": { nb: "Jeg forstår", en: "I understand" },
1069
- share: "Share",
1070
- "share-to-facebook": "Share to Facebook",
1071
- "share-to-linkedin": "Share to Linkedin",
1072
- "share-to-twitter": "Share to Twitter",
1073
- "share-via-email": "Share via Email",
1074
- "copy-link": "Copy link",
1075
- "virtual-view": "Virtuell Visning",
1076
- "slide-show": "Slide Show",
1077
- // building chooser default labels
1078
- room: "Room",
1079
- floor: "Floor",
1080
- "see-apartments": "See apartments",
1081
- // apartment chooser default labels
1082
- "see-apartment": "See apartment",
1083
- "click-and-drag-to-look-around": { en: "Click and drag to look around", nb: "Klikk og dra for å se deg rundt" },
1084
- "click-on-the-cricles-to-move-around": { en: "Click on the circles to move around", nb: "Klikk på sirkelene for å gå rundt" },
1085
- "use-the-mouse-wheel-to-zoom": { en: "Use the mouse wheel to zoom", nb: "Bruk mushjulet for å zoome" },
1086
- "you-can-also-use-the-arrow-keys-to-move-around": { en: "You can also use the arrow keys to move around", nb: "Du kan også bruke pilene på tastaturet for å gå rundt" },
1087
- "tap-and-drag-to-look-around": { en: "Tap and drag to look around", nb: "Trykk og dra for å se deg rundt" },
1088
- "tap-on-the-circles-to-move-around": { en: "Tap on the circles to move around", nb: "Trykk på sirkelene for å gå rundt" },
1089
- "use-two-fingers-to-zoom": { en: "Use two fingers to zoom", nb: "Bruk to fingre for å zoome" },
1090
- "dont-show-again": { en: "Don't Show Again", nb: "Ikke vis igjen" }
1091
- };
1092
- class R {
1093
- constructor(t, i) {
1094
- this._labels = { ...nt, ...t || {} }, this._language = i || "en";
1095
- }
1096
- getLabel(t) {
1097
- return t in this._labels ? this.get(this._labels[t]) : t;
1098
- }
1099
- get(t) {
1100
- if (typeof t == "string")
1101
- return t;
1102
- if (this._language in t && t[this._language])
1103
- return t[this._language];
1104
- for (const i in t)
1105
- if (t[i])
1106
- return t[i];
1107
- return "";
1108
- }
1109
- }
1110
- const st = 4, ot = [0, 16, 32, 48], rt = {
1111
- name: "QiApartmentChooser",
1112
- components: {
1113
- QiApartmentChooserRaster: Q,
1114
- QiApartmentChooserSvg: V,
1115
- QiApartmentChooserNavigation: se,
1116
- QiApartmentChooserRotator: re,
1117
- QiFloatingCard: q,
1118
- QiHoverProbe: L,
1119
- QiZoomBox: Y
1120
- },
1121
- provide() {
1122
- return {
1123
- i18n: this.i18n ? new R(this.i18n.labels, this.i18n.language) : new R()
1124
- };
1125
- },
1126
- emits: [
1127
- "select-unit",
1128
- "go-to-unit",
1129
- "nav-unit",
1130
- "hover-over-unit",
1131
- "hover-out-unit",
1132
- "initialized"
1133
- ],
1134
- props: {
1135
- i18n: { type: Object, default: void 0 },
1136
- showCards: { type: Boolean, default: !0 },
1137
- build: { type: String, default: "" },
1138
- buildingSceneDataResolver: { type: Function, default: null },
1139
- buildingScenesByApartmentResolver: { type: Function, default: null },
1140
- cdnFileResolver: { type: Function, required: !0 },
1141
- colorCallback: {
1142
- type: Function,
1143
- default: () => ({ r: 108, g: 0, b: 108, a: 144, s: 2 })
1144
- },
1145
- unitCallback: { type: Function, default: (e) => e },
1146
- canGoToUnitCallback: { type: Function, default: () => !0 },
1147
- selectedUnitId: { type: String, default: null },
1148
- nextUnit: { type: Object, default: null },
1149
- prevUnit: { type: Object, default: null },
1150
- drawObserver: {
1151
- type: [Object, Array, String, Number, Boolean],
1152
- default: null
1153
- },
1154
- interactiveDesktop: { type: Boolean, default: !0 },
1155
- interactiveMobile: { type: Boolean, default: !0 },
1156
- useSvg: { type: Boolean, default: !1 }
1157
- },
1158
- data() {
1159
- return {
1160
- loadState: { isReady: !1, isError: !1, progress: void 0 },
1161
- scenesByApartment: null,
1162
- sceneData: null,
1163
- scenes: null,
1164
- viewModel: void 0,
1165
- resourceLoader: new O(),
1166
- pos: { x: 0, y: 0, width: 0, height: 0 },
1167
- closeHandler: void 0,
1168
- hoverApartment: void 0
1169
- };
1170
- },
1171
- computed: {
1172
- isHoverable() {
1173
- return this.$refs.hoverProbe.isHoverEnabled;
1174
- },
1175
- selectedUnit() {
1176
- return this.unitCallback ? this.unitCallback(this.selectedUnitId) : this.selectedUnitId;
1177
- },
1178
- overlayComponent() {
1179
- return this.useSvg ? V : Q;
1180
- }
1181
- },
1182
- watch: {
1183
- selectedUnitId: {
1184
- handler() {
1185
- if (this.selectedUnitId && this.viewModel) {
1186
- const e = this.scenesByApartment[this.selectedUnitId];
1187
- e && (this.viewModel.currentScene = e);
1188
- }
1189
- },
1190
- immediate: !0
1191
- }
1192
- },
1193
- mounted() {
1194
- return K(this, void 0, void 0, function* () {
1195
- let e = null;
1196
- try {
1197
- e = yield this.resourceLoader.loadJson(this.cdnFileResolver("/apartmentChooser.json"));
1198
- } catch {
1199
- console.info("apartmentChooser.json not found");
1200
- }
1201
- const t = e && e.startScene !== void 0 ? e.startScene : st;
1202
- this.scenes = e && e.scenes !== void 0 ? e.scenes : ot, this.sceneData = e && e.sceneData !== void 0 ? e.sceneData.map((n) => ({
1203
- apartmentId: n.apartmentID,
1204
- index: n.index
1205
- })) : this.buildingSceneDataResolver ? yield this.buildingSceneDataResolver() : [], this.scenesByApartment = e && e.sceneData !== void 0 ? e.sceneData.map((n) => {
1206
- const s = n.bestScene === 0 ? 4 : n.bestScene;
1207
- return { unitId: n.apartmentID, scene: s };
1208
- }).reduce((n, s) => Object.assign(Object.assign({}, n), { [s.unitId]: s.scene }), {}) : this.buildingScenesByApartmentResolver ? yield this.buildingScenesByApartmentResolver() : [];
1209
- const i = (n, s = "unitId") => {
1210
- let r = t, a = [];
1211
- for (let g = 0; g < ae; g++)
1212
- a.push(r), r = pe(r);
1213
- return n.sort((g, v) => {
1214
- const f = a.findIndex((b) => b === this.scenesByApartment[g[s]]), _ = a.findIndex((b) => b === this.scenesByApartment[v[s]]);
1215
- return f < _ ? -1 : f > _ ? 1 : 0;
1216
- }), n;
1217
- }, o = (n) => {
1218
- this.viewModel = new fe(n);
1219
- };
1220
- this.$emit("initialized", {
1221
- scene: t,
1222
- scenes: this.scenes,
1223
- sceneData: this.sceneData,
1224
- scenesByApartment: this.scenesByApartment,
1225
- unitsSceneSort: i,
1226
- initialize: o
1227
- });
1228
- });
1229
- },
1230
- methods: {
1231
- onPos(e) {
1232
- this.pos = e;
1233
- },
1234
- hoverOver({ hoverApartment: e, closeHandler: t }) {
1235
- this.hoverApartment = e, this.closeHandler = t, this.$emit("hover-over-unit", e);
1236
- },
1237
- hoverOut({ hoverApartment: e, closeHandler: t }) {
1238
- this.hoverApartment = null, this.closeHandler = t, this.$emit("hover-out-unit", e);
1239
- }
1240
- }
1241
- }, at = { key: 0 }, lt = { class: "interactive-viewer" }, dt = { class: "fill-parent" }, ct = { key: 0 }, ut = {
1242
- key: 1,
1243
- class: "navigation"
1244
- }, ht = { key: 2 };
1245
- function mt(e, t, i, o, n, s) {
1246
- const r = u("qi-apartment-chooser-rotator"), a = u("qi-zoom-box"), g = u("qi-floating-card"), v = u("qi-apartment-chooser-navigation"), f = u("v-progress-linear"), _ = u("qi-hover-probe");
1247
- return n.viewModel ? (d(), m("div", at, [
1248
- h("div", lt, [
1249
- h("div", dt, [
1250
- l(a, {
1251
- desktop: n.loadState.isReady && i.interactiveDesktop,
1252
- mobile: n.loadState.isReady && i.interactiveMobile
1253
- }, {
1254
- default: c(() => [
1255
- l(r, {
1256
- "cdn-file-resolver": i.cdnFileResolver,
1257
- "view-model": n.viewModel,
1258
- "cardinal-frames": n.scenes,
1259
- build: i.build,
1260
- onProgress: t[0] || (t[0] = (b) => n.loadState.progress = b),
1261
- onLoaded: t[1] || (t[1] = (b) => n.loadState.isReady = !0),
1262
- onError: t[2] || (t[2] = (b) => n.loadState.isError = !0)
1263
- }, null, 8, ["cdn-file-resolver", "view-model", "cardinal-frames", "build"]),
1264
- n.loadState.isReady ? (d(), m("div", ct, [
1265
- (d(), C(ue(s.overlayComponent), {
1266
- "cdn-file-resolver": i.cdnFileResolver,
1267
- "view-model": n.viewModel,
1268
- "selected-unit-id": i.selectedUnitId,
1269
- "scene-data": n.sceneData,
1270
- "color-callback": i.colorCallback,
1271
- "unit-callback": i.unitCallback,
1272
- "can-go-to-unit-callback": i.canGoToUnitCallback,
1273
- "draw-observer": i.drawObserver,
1274
- onSelectUnit: t[3] || (t[3] = (b) => e.$emit("select-unit", b)),
1275
- onGoToUnit: t[4] || (t[4] = (b) => e.$emit("go-to-unit", b)),
1276
- onHoverOver: s.hoverOver,
1277
- onHoverOut: s.hoverOut,
1278
- onPos: s.onPos
1279
- }, {
1280
- default: c((b) => [
1281
- k(e.$slots, "default", he(me(b)), void 0, !0)
1282
- ]),
1283
- _: 3
1284
- }, 40, ["cdn-file-resolver", "view-model", "selected-unit-id", "scene-data", "color-callback", "unit-callback", "can-go-to-unit-callback", "draw-observer", "onHoverOver", "onHoverOut", "onPos"]))
1285
- ])) : I("", !0)
1286
- ]),
1287
- _: 3
1288
- }, 8, ["desktop", "mobile"]),
1289
- n.hoverApartment && i.showCards ? (d(), C(g, {
1290
- key: 0,
1291
- "is-hoverable": s.isHoverable,
1292
- pos: n.pos,
1293
- onOutside: n.closeHandler
1294
- }, {
1295
- default: c(() => [
1296
- k(e.$slots, "default", {
1297
- unit: n.hoverApartment,
1298
- canGoToUnit: i.canGoToUnitCallback(n.hoverApartment),
1299
- goToUnit: () => i.canGoToUnitCallback(n.hoverApartment) && e.$emit("go-to-unit", n.hoverApartment),
1300
- pos: n.pos,
1301
- isHoverable: s.isHoverable,
1302
- close: n.closeHandler
1303
- }, void 0, !0)
1304
- ]),
1305
- _: 3
1306
- }, 8, ["is-hoverable", "pos", "onOutside"])) : I("", !0),
1307
- n.loadState.isReady ? (d(), m("div", ut, [
1308
- l(v, {
1309
- "can-go-to-unit-callback": i.canGoToUnitCallback,
1310
- "selected-unit": s.selectedUnit,
1311
- "prev-unit": i.prevUnit,
1312
- "next-unit": i.nextUnit,
1313
- "view-model": n.viewModel,
1314
- onGoToUnit: t[5] || (t[5] = (b) => e.$emit("go-to-unit", b)),
1315
- onPrevUnit: t[6] || (t[6] = (b) => e.$emit("nav-unit", i.prevUnit)),
1316
- onNextUnit: t[7] || (t[7] = (b) => e.$emit("nav-unit", i.nextUnit))
1317
- }, null, 8, ["can-go-to-unit-callback", "selected-unit", "prev-unit", "next-unit", "view-model"])
1318
- ])) : n.loadState.isError ? I("", !0) : (d(), m("div", ht, [
1319
- l(f, {
1320
- indeterminate: !n.loadState.progress,
1321
- value: n.loadState.progress
1322
- }, null, 8, ["indeterminate", "value"])
1323
- ]))
1324
- ])
1325
- ]),
1326
- l(_, { ref: "hoverProbe" }, null, 512)
1327
- ])) : I("", !0);
1328
- }
1329
- const be = /* @__PURE__ */ w(rt, [["render", mt], ["__scopeId", "data-v-3a1121f3"]]), gt = "data:image/png;base64,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", vt = {
1330
- name: "QiNorthDirection",
1331
- props: {
1332
- longitude: { type: Number, default: () => 0 }
1333
- },
1334
- data() {
1335
- return {
1336
- compassNeedle: gt
1337
- };
1338
- },
1339
- computed: {
1340
- needleRotation() {
1341
- return {
1342
- transform: `rotate(${90 - this.longitude}deg)`,
1343
- transition: " transform 0.5s ease-in"
1344
- };
1345
- }
1346
- }
1347
- };
1348
- function pt(e, t, i, o, n, s) {
1349
- const r = u("v-img");
1350
- return d(), C(r, {
1351
- src: n.compassNeedle,
1352
- style: D(s.needleRotation)
1353
- }, null, 8, ["src", "style"]);
1354
- }
1355
- const Z = /* @__PURE__ */ w(vt, [["render", pt]]);
1356
- function te(e) {
1357
- return e.toLocaleString("en-no", {
1358
- month: "short",
1359
- day: "numeric"
1360
- });
1361
- }
1362
- const ft = W({
1363
- setup() {
1364
- },
1365
- name: "QiBuildingChooserSunSimControl",
1366
- props: {
1367
- modelValue: { type: Number, required: !0 },
1368
- dateSelector: { type: Object, required: !0 },
1369
- isLoading: { type: Boolean, default: !1 }
1370
- },
1371
- emits: ["update:modelValue"],
1372
- data() {
1373
- return {
1374
- currentValue: this.modelValue,
1375
- currentDate: null
1376
- };
1377
- },
1378
- computed: {
1379
- currentValueString() {
1380
- const e = Math.floor(this.currentValue / 2).toString().padStart(2, "0"), t = this.currentValue % 2 === 0 ? "00" : "30";
1381
- return `${e}:${t}`;
1382
- },
1383
- dates() {
1384
- return this.dateSelector.dates.map(te);
1385
- },
1386
- selectedDate: {
1387
- get() {
1388
- return te(this.dateSelector.selectedDate);
1389
- },
1390
- set(e) {
1391
- this.dateSelector.selectIndex(this.dates.indexOf(e));
1392
- }
1393
- }
1394
- },
1395
- watch: {
1396
- currentValue(e) {
1397
- this.$emit("update:modelValue", e);
1398
- },
1399
- modelValue(e) {
1400
- this.currentValue = Math.floor(e);
1401
- },
1402
- dates: {
1403
- handler(e) {
1404
- this.currentDate = te(this.dateSelector.selectedDate);
1405
- },
1406
- immediate: !0
1407
- },
1408
- currentDate(e) {
1409
- this.dateSelector.selectIndex(this.dates.indexOf(e));
1410
- }
1411
- },
1412
- methods: {}
1413
- }), bt = { class: "sunsim-bar-wrapper" }, yt = { class: "sunsim-date d-flex align-center pl-5 pr-5" }, wt = {
1414
- key: 1,
1415
- class: "text-center text-body-1"
1416
- }, _t = { class: "sunsim-wrapper d-flex align-center px-3" }, kt = { class: "sunsim-time-label text-body-1 font-weight-normal ml-2" };
1417
- function It(e, t, i, o, n, s) {
1418
- const r = u("v-icon"), a = u("v-select"), g = u("v-progress-linear"), v = u("v-slider");
1419
- return d(), m("div", bt, [
1420
- h("div", yt, [
1421
- l(r, {
1422
- color: "black",
1423
- class: "mr-2",
1424
- icon: "mdi-calendar-blank-outline"
1425
- }),
1426
- e.dateSelector.hasMultipleDates ? (d(), C(a, {
1427
- key: 0,
1428
- modelValue: e.currentDate,
1429
- "onUpdate:modelValue": t[0] || (t[0] = (f) => e.currentDate = f),
1430
- items: e.dates,
1431
- density: "compact",
1432
- variant: "underlined",
1433
- "hide-details": "",
1434
- class: "day-selector"
1435
- }, null, 8, ["modelValue", "items"])) : (d(), m("span", wt, S(e.selectedDate), 1))
1436
- ]),
1437
- h("div", _t, [
1438
- h("span", kt, S(e.currentValueString), 1),
1439
- l(r, {
1440
- medium: "",
1441
- class: "ml-2 mr-2 icon"
1442
- }, {
1443
- default: c(() => [
1444
- B("mdi-white-balance-sunny")
1445
- ]),
1446
- _: 1
1447
- }),
1448
- e.isLoading ? (d(), C(g, {
1449
- key: 0,
1450
- indeterminate: "",
1451
- rounded: "",
1452
- height: "6",
1453
- color: "grey lighten-1",
1454
- class: "mr-2"
1455
- })) : (d(), C(v, {
1456
- key: 1,
1457
- modelValue: e.currentValue,
1458
- "onUpdate:modelValue": t[1] || (t[1] = (f) => e.currentValue = f),
1459
- min: 0,
1460
- max: 47,
1461
- step: 1,
1462
- "thumb-label": !1,
1463
- "hide-details": !0,
1464
- "thumb-color": "white",
1465
- "thumb-size": "25",
1466
- "track-size": "7",
1467
- "track-fill-color": "transparent",
1468
- class: "sunsim-slider mr-1"
1469
- }, null, 8, ["modelValue"]))
1470
- ])
1471
- ]);
1472
- }
1473
- const J = /* @__PURE__ */ w(ft, [["render", It], ["__scopeId", "data-v-1fba3edd"]]), Ct = W({
1474
- setup() {
1475
- },
1476
- name: "QiBuildingChooserSceneImageStack",
1477
- props: {
1478
- imageUrls: { type: Array, required: !0 },
1479
- activeIndex: { type: Number, required: !0 }
1480
- },
1481
- emits: ["resize", "ready", "preloaded", "reset"],
1482
- data() {
1483
- return {
1484
- state: "init",
1485
- activeStates: ["preloaded", "loaded"],
1486
- loadTracker: new G(0)
1487
- };
1488
- },
1489
- watch: {
1490
- imageUrls(e) {
1491
- this.$emit("reset"), this.loadImages(e);
1492
- }
1493
- },
1494
- mounted() {
1495
- this.loadImages(this.imageUrls), new ResizeObserver((e) => {
1496
- window.requestAnimationFrame(() => {
1497
- const t = e[0].contentRect.width, i = e[0].contentRect.height;
1498
- this.$emit("resize", { width: t, height: i });
1499
- });
1500
- }).observe(this.$refs.baseImage);
1501
- },
1502
- methods: {
1503
- onPreloaded() {
1504
- this.state = "preloaded", this.$emit("preloaded");
1505
- },
1506
- loadImages(e) {
1507
- this.state = "init", this.$refs.baseImage.src = e[0], this.loadTracker = new G(e.length).onLoadFinished(() => {
1508
- this.state = "loaded", this.$emit("ready");
1509
- });
1510
- }
1511
- }
1512
- }), St = { key: 0 }, Bt = ["src"];
1513
- function Dt(e, t, i, o, n, s) {
1514
- return d(), m("div", null, [
1515
- h("img", {
1516
- ref: "baseImage",
1517
- class: "image-instance zero",
1518
- style: { opacity: 1, borderRadius: 50 },
1519
- onLoad: t[0] || (t[0] = (...r) => e.onPreloaded && e.onPreloaded(...r))
1520
- }, null, 544),
1521
- e.state === "preloaded" || e.state === "loaded" ? A((d(), m("div", St, [
1522
- (d(!0), m(E, null, T(e.imageUrls, (r, a) => (d(), m("img", {
1523
- key: a,
1524
- class: M({ "image-instance": !0, active: a === e.activeIndex }),
1525
- src: r,
1526
- onLoad: t[1] || (t[1] = (g) => e.loadTracker.partLoaded())
1527
- }, null, 42, Bt))), 128)),
1528
- B(" Here ")
1529
- ], 512)), [
1530
- [x, e.state === "loaded"]
1531
- ]) : I("", !0)
1532
- ]);
1533
- }
1534
- const ee = /* @__PURE__ */ w(Ct, [["render", Dt], ["__scopeId", "data-v-fad48118"]]), At = "buildingChooser.json", xt = 180;
1535
- class le {
1536
- constructor(t) {
1537
- this._cdnFileResolver = t, this._resourceLoader = new O();
1538
- }
1539
- constructFileUrl(t) {
1540
- return this._cdnFileResolver ? this._cdnFileResolver(`/${t}`) : null;
1541
- }
1542
- loadConfigFile() {
1543
- const t = this.constructFileUrl(At);
1544
- return t ? this._resourceLoader.loadJson(t) : null;
1545
- }
1546
- loadBuildingMapImage(t) {
1547
- const i = this.constructFileUrl(t.lookupFilename);
1548
- return i ? this._resourceLoader.loadImage(i) : null;
1549
- }
1550
- getViewLongitude(t) {
1551
- return t.cameraRotation && t.cameraRotation.y + 270;
1552
- }
1553
- getBuildingData(t) {
1554
- const i = t ? t.buildings : [], o = i.map((s) => s.id), n = i.map((s) => ({
1555
- id: s.id,
1556
- url: this.constructFileUrl(s.overlayFilename)
1557
- }));
1558
- return { buildingIds: o, buildingOverlays: n };
1559
- }
1560
- getBackgroundImageData(t) {
1561
- return "days" in t ? this.processMultipleDays(t.days) : [this.processTimeSamples(
1562
- xt,
1563
- t.timeSamples
1564
- )];
1565
- }
1566
- processMultipleDays(t) {
1567
- return t.map(
1568
- (i) => this.processTimeSamples(i.dayOfYear, i.timeSamples)
1569
- );
1570
- }
1571
- processTimeSamples(t, i) {
1572
- return {
1573
- urls: i.map(
1574
- (n) => this.constructFileUrl(n.filename)
1575
- ),
1576
- referenceDate: this.makeReferenceDate(t)
1577
- };
1578
- }
1579
- makeReferenceDate(t) {
1580
- const i = /* @__PURE__ */ new Date(0);
1581
- return i.setUTCDate(t), i;
1582
- }
1583
- async loadBuildingChooser() {
1584
- try {
1585
- const t = await this.loadConfigFile();
1586
- if (t) {
1587
- const i = await this.loadBuildingMapImage(t);
1588
- if (i) {
1589
- const o = this.getViewLongitude(t), { buildingIds: n, buildingOverlays: s } = this.getBuildingData(t), r = this.getBackgroundImageData(t);
1590
- return {
1591
- mapImage: i,
1592
- viewLongitude: o,
1593
- buildingIds: n,
1594
- buildingOverlays: s,
1595
- backgrounds: r
1596
- };
1597
- }
1598
- }
1599
- return null;
1600
- } catch {
1601
- return null;
1602
- }
1603
- }
1604
- }
1605
- class U {
1606
- static empty() {
1607
- return new U([]);
1608
- }
1609
- constructor(t) {
1610
- this._buildingIds = t;
1611
- }
1612
- getBuildingId(t, i, o) {
1613
- const n = this._getBuildingIndex(t, i, o);
1614
- if (n !== void 0)
1615
- return this._buildingIds[n];
1616
- }
1617
- _getBuildingIndex(t, i, o) {
1618
- const [n, s, r, a] = t.getPixel(i, o);
1619
- if (a === 255 && n === s && s === r)
1620
- return n;
1621
- }
1622
- }
1623
- class $ {
1624
- static empty() {
1625
- return new $(null);
1626
- }
1627
- constructor(t) {
1628
- this._mapImage = t, this._context = null;
1629
- }
1630
- update(t) {
1631
- this._mapImage && (this._context = t.getContext("2d", { willReadFrequently: !0 }), this._context.drawImage(this._mapImage, 0, 0, t.width, t.height));
1632
- }
1633
- getPixel(t, i) {
1634
- try {
1635
- return this._context ? this._context.getImageData(t, i, 1, 1).data : [0, 0, 0, 0];
1636
- } catch {
1637
- return [0, 0, 0, 0];
1638
- }
1639
- }
1640
- }
1641
- const Mt = /* @__PURE__ */ new Date(0);
1642
- class z {
1643
- static empty() {
1644
- return new z([{ referenceDate: Mt, urls: [] }]);
1645
- }
1646
- constructor(t) {
1647
- this._imagesByDay = t, this._state = { selectedIndex: 0 };
1648
- }
1649
- selectIndex(t) {
1650
- t < this._imagesByDay.length && (this._state.selectedIndex = t);
1651
- }
1652
- get dates() {
1653
- return this._imagesByDay.map((t) => t.referenceDate);
1654
- }
1655
- get hasMultipleDates() {
1656
- return this._imagesByDay.length > 1;
1657
- }
1658
- get selectedIndex() {
1659
- return this._state.selectedIndex;
1660
- }
1661
- get selectedDate() {
1662
- return this._imagesByDay[this.selectedIndex].referenceDate;
1663
- }
1664
- get imageUrls() {
1665
- return this._imagesByDay[this.selectedIndex].urls;
1666
- }
1667
- }
1668
- const Rt = W({
1669
- setup() {
1670
- ge({});
1671
- },
1672
- name: "QiBuildingChooserSvg",
1673
- components: {
1674
- QiBuildingChooserSunSimControl: J,
1675
- QiBuildingChooserSceneImageStack: ee,
1676
- QiNorthDirection: Z,
1677
- QiFloatingCard: q,
1678
- QiHoverProbe: L,
1679
- QiZoomBox: Y
1680
- },
1681
- emits: ["go-to-building", "hover-over-building", "hover-out-building"],
1682
- provide() {
1683
- return {
1684
- i18n: this.i18n ? new R(this.i18n.labels, this.i18n.language) : new R()
1685
- };
1686
- },
1687
- props: {
1688
- showCards: { type: Boolean, default: () => !0 },
1689
- colorCallback: {
1690
- type: Function,
1691
- default: () => ({ r: 108, g: 0, b: 108, a: 144, s: 2 })
1692
- },
1693
- buildingCallback: { type: Function, default: (e) => e },
1694
- canGoToBuildingCallback: { type: Function, default: () => !0 },
1695
- buildingChooserTimeOfDay: { type: String, default: null },
1696
- cdnFileResolver: { type: Function, required: !0 },
1697
- i18n: { type: Object, default: void 0 },
1698
- interactiveDesktop: { type: Boolean, default: !0 },
1699
- interactiveMobile: { type: Boolean, default: !0 },
1700
- customOverlayContent: { type: String, default: "" }
1701
- },
1702
- data() {
1703
- return {
1704
- sceneState: { preloaded: !1, ready: !1 },
1705
- canvasDimensions: { width: 0, height: 0 },
1706
- pos: { x: 0, y: 0, width: 0, height: 0 },
1707
- pickerData: void 0,
1708
- hoverBuildingId: void 0,
1709
- halfHourMark: (/* @__PURE__ */ new Date()).getHours() * 2 + ((/* @__PURE__ */ new Date()).getMinutes() < 30 ? 0 : 1),
1710
- error: !1,
1711
- resourceLoader: new O(),
1712
- svgObjects: void 0,
1713
- svgViewBox: "0 0 0 0"
1714
- };
1715
- },
1716
- computed: {
1717
- isHoverable() {
1718
- return this.$refs.hoverProbe.isHoverEnabled;
1719
- },
1720
- hoverBuilding() {
1721
- return this.getBuildingData(this.hoverBuildingId);
1722
- }
1723
- },
1724
- watch: {
1725
- buildingChooserTimeOfDay: {
1726
- handler() {
1727
- if (this.buildingChooserTimeOfDay) {
1728
- const [e, t, i] = /^(\d\d):(\d\d)$/.exec(this.buildingChooserTimeOfDay), o = parseInt(i);
1729
- this.halfHourMark = parseInt(t) * 2 + (o < 15 ? 0 : o > 45 ? 2 : 1);
1730
- }
1731
- },
1732
- immediate: !0
1733
- },
1734
- hoverBuildingId(e, t) {
1735
- e ? this.$emit("hover-over-building", this.getBuildingData(e)) : this.$emit("hover-out-building", this.getBuildingData(t));
1736
- }
1737
- },
1738
- mounted() {
1739
- return K(this, void 0, void 0, function* () {
1740
- const t = yield new le(this.cdnFileResolver).loadBuildingChooser();
1741
- if (t) {
1742
- this.canvasRaster = new $(t.mapImage), this.buildingMap = new U(t.buildingIds), this.daysOfYear = new z(t.backgrounds), this.pickerData = {
1743
- buildingOverlays: t.buildingOverlays,
1744
- sceneLongitude: t.viewLongitude
1745
- };
1746
- const i = [];
1747
- for (let { id: o, url: n } of t.buildingOverlays)
1748
- this.resourceLoader.loadJson(n.replace(".png", ".svg")).then((s) => {
1749
- const a = new DOMParser().parseFromString(s, "image/svg+xml").getElementsByTagName("svg")[0];
1750
- this.svgViewBox = a.getAttribute("viewBox"), i.push({
1751
- id: o,
1752
- svg: a.innerHTML
1753
- });
1754
- });
1755
- this.svgObjects = i;
1756
- } else
1757
- this.error = !0;
1758
- });
1759
- },
1760
- methods: {
1761
- resizeScene({ width: e, height: t }) {
1762
- this.canvasDimensions.width = e, this.canvasDimensions.height = t;
1763
- },
1764
- sceneReset() {
1765
- this.sceneState = { preloaded: !1, ready: !1 };
1766
- },
1767
- getBuildingData(e) {
1768
- return this.buildingCallback ? this.buildingCallback(e) : e;
1769
- },
1770
- getColor(e) {
1771
- return this.colorCallback(this.getBuildingData(e), e === this.hoverBuildingId ? "hover" : "idle");
1772
- },
1773
- getGClass(e) {
1774
- const t = this.getBuildingData(e), i = this.colorCallback(t, e === this.hoverBuildingId ? "hover" : "idle"), o = [];
1775
- return e === this.hoverBuildingId ? o.push("hover") : o.push("idle"), i && this.canGoToBuildingCallback(t) ? o.push("clickable") : o.push("restricted"), o.join(" ");
1776
- },
1777
- getGStyle(e) {
1778
- const t = this.getBuildingData(e), i = this.colorCallback(t, e === this.hoverBuildingId ? "hover" : "idle");
1779
- if (i) {
1780
- const { r: o, g: n, b: s, a: r, s: a } = i;
1781
- return {
1782
- strokeWidth: a !== void 0 ? a : 2,
1783
- stroke: `rgb(${o}, ${n}, ${s})`,
1784
- strokeOpacity: 1,
1785
- fill: `rgb(${o}, ${n}, ${s})`,
1786
- fillOpacity: r / 255,
1787
- cursor: `${this.canGoToBuildingCallback(t) ? "cursor" : "default"} !important`
1788
- };
1789
- } else
1790
- return {
1791
- strokeWidth: 0,
1792
- stroke: "white",
1793
- strokeOpacity: 0,
1794
- fill: "white",
1795
- fillOpacity: 0,
1796
- cursor: "default !important"
1797
- };
1798
- },
1799
- onBuildingMouseOver(e, t) {
1800
- this.isHoverable && (this.pos = {
1801
- x: e.layerX,
1802
- y: e.layerY,
1803
- width: this.canvasDimensions.width,
1804
- height: this.canvasDimensions.height
1805
- }, this.hoverBuildingId = t, this.$emit("hover-over-building", this.getBuildingData(t)));
1806
- },
1807
- onBuildingMouseOut(e, t) {
1808
- this.isHoverable && (this.pos = {
1809
- x: e.layerX,
1810
- y: e.layerY,
1811
- width: this.canvasDimensions.width,
1812
- height: this.canvasDimensions.height
1813
- }, this.hoverBuildingId = void 0, this.$emit("hover-out-building", this.getBuildingData(t)));
1814
- },
1815
- onBuildingMouseMove(e) {
1816
- this.isHoverable && (this.pos = {
1817
- x: e.layerX,
1818
- y: e.layerY,
1819
- width: this.canvasDimensions.width,
1820
- height: this.canvasDimensions.height
1821
- });
1822
- },
1823
- onBuildingClick(e) {
1824
- this.hoverBuildingId = e, this.isHoverable && this.hoverBuilding && this.canGoToBuildingCallback(this.hoverBuilding) && this.$emit("go-to-building", this.hoverBuilding);
1825
- }
1826
- }
1827
- }), Ft = {
1828
- key: 0,
1829
- style: { height: "50vh" },
1830
- class: "d-flex justify-center align-center blue-grey lighten-5"
1831
- }, Ht = { class: "image-instances" }, Tt = { key: 0 }, Ot = { class: "svg-container" }, Lt = ["viewBox"], Ut = ["innerHTML", "data-building-id", "onMouseover", "onMouseout", "onMousemove", "onClick"], $t = ["innerHTML"];
1832
- function Et(e, t, i, o, n, s) {
1833
- const r = u("v-icon"), a = u("qi-building-chooser-scene-image-stack"), g = u("qi-zoom-box"), v = u("qi-north-direction"), f = u("qi-building-chooser-sun-sim-control"), _ = u("qi-floating-card"), b = u("qi-hover-probe");
1834
- return e.error ? (d(), m("div", Ft, [
1835
- l(r, { "x-large": "" }, {
1836
- default: c(() => [
1837
- B("mdi-alert-circle-outline")
1838
- ]),
1839
- _: 1
1840
- })
1841
- ])) : e.pickerData ? (d(), m("div", {
1842
- key: 1,
1843
- style: D(`height: ${e.canvasDimensions.height}px; position: relative`),
1844
- class: "image-container"
1845
- }, [
1846
- l(g, {
1847
- desktop: e.interactiveDesktop,
1848
- mobile: e.interactiveMobile
1849
- }, {
1850
- default: c(() => [
1851
- h("div", Ht, [
1852
- l(a, {
1853
- "image-urls": e.daysOfYear.imageUrls,
1854
- "active-index": e.halfHourMark,
1855
- onResize: e.resizeScene,
1856
- onPreloaded: t[0] || (t[0] = (y) => e.sceneState.preloaded = !0),
1857
- onReady: t[1] || (t[1] = (y) => e.sceneState.ready = !0),
1858
- onReset: e.sceneReset
1859
- }, null, 8, ["image-urls", "active-index", "onResize", "onReset"]),
1860
- e.svgObjects ? A((d(), m("div", Tt, [
1861
- h("div", Ot, [
1862
- (d(), m("svg", { viewBox: e.svgViewBox }, [
1863
- (d(!0), m(E, null, T(e.svgObjects, ({ id: y, svg: p }, P) => (d(), m("g", {
1864
- key: P,
1865
- innerHTML: p,
1866
- "data-building-id": y,
1867
- class: M(e.getGClass(y)),
1868
- style: D(e.getGStyle(y)),
1869
- onMouseover: (H) => e.onBuildingMouseOver(H, y),
1870
- onMouseout: (H) => e.onBuildingMouseOut(H, y),
1871
- onMousemove: (H) => e.onBuildingMouseMove(H, y),
1872
- onClick: (H) => e.onBuildingClick(y)
1873
- }, null, 46, Ut))), 128))
1874
- ], 8, Lt))
1875
- ])
1876
- ], 512)), [
1877
- [x, e.sceneState.preloaded]
1878
- ]) : I("", !0),
1879
- A(h("div", {
1880
- class: "custom-overlay-layer",
1881
- innerHTML: e.customOverlayContent
1882
- }, null, 8, $t), [
1883
- [x, e.sceneState.preloaded]
1884
- ])
1885
- ])
1886
- ]),
1887
- _: 1
1888
- }, 8, ["desktop", "mobile"]),
1889
- A(h("div", null, [
1890
- e.pickerData.sceneLongitude ? (d(), C(v, {
1891
- key: 0,
1892
- class: "north-indicator",
1893
- longitude: e.pickerData.sceneLongitude
1894
- }, null, 8, ["longitude"])) : I("", !0),
1895
- l(f, {
1896
- modelValue: e.halfHourMark,
1897
- "onUpdate:modelValue": t[2] || (t[2] = (y) => e.halfHourMark = y),
1898
- "date-selector": e.daysOfYear,
1899
- "is-loading": !e.sceneState.ready
1900
- }, null, 8, ["modelValue", "date-selector", "is-loading"])
1901
- ], 512), [
1902
- [x, e.sceneState.preloaded]
1903
- ]),
1904
- e.showCards && e.hoverBuilding ? (d(), C(_, {
1905
- key: 0,
1906
- "is-hoverable": e.isHoverable,
1907
- pos: e.pos,
1908
- onOutside: t[3] || (t[3] = () => e.hoverBuildingId = void 0)
1909
- }, {
1910
- default: c(() => [
1911
- k(e.$slots, "default", {
1912
- building: e.hoverBuilding,
1913
- canGoToBuilding: e.canGoToBuildingCallback(e.hoverBuilding),
1914
- goToBuilding: () => e.canGoToBuildingCallback(e.hoverBuilding) && e.$emit("go-to-building", e.hoverBuilding),
1915
- pos: e.pos,
1916
- isHoverable: e.isHoverable,
1917
- close: () => e.hoverBuildingId = void 0
1918
- }, void 0, !0)
1919
- ]),
1920
- _: 3
1921
- }, 8, ["is-hoverable", "pos"])) : I("", !0),
1922
- l(b, { ref: "hoverProbe" }, null, 512)
1923
- ], 4)) : I("", !0);
1924
- }
1925
- const N = /* @__PURE__ */ w(Rt, [["render", Et], ["__scopeId", "data-v-0a2cec1f"]]), jt = {
1926
- name: "QiBuildingChooserRasterOverlay",
1927
- props: {
1928
- imageUrl: { type: String, required: !0 },
1929
- dimensions: { type: Object, required: !0 },
1930
- color: {
1931
- type: Object,
1932
- default: () => ({ r: 108, g: 0, b: 108, a: 144, s: 2 })
1933
- }
1934
- },
1935
- data() {
1936
- return {
1937
- isLoaded: !1,
1938
- overlayImage: void 0,
1939
- resourceLoader: new O(),
1940
- context: void 0,
1941
- imageData: void 0,
1942
- imageDataIndices: []
1943
- };
1944
- },
1945
- watch: {
1946
- color(e, t) {
1947
- (e.r !== t.r || e.g !== t.g || e.b !== t.b || e.a !== t.a) && this.draw();
1948
- }
1949
- },
1950
- mounted() {
1951
- return K(this, void 0, void 0, function* () {
1952
- this.overlayImage = yield this.resourceLoader.loadImage(this.imageUrl), this.setupDraw();
1953
- });
1954
- },
1955
- methods: {
1956
- setupDraw() {
1957
- if (!this.overlayImage || !this.$refs.canvas)
1958
- return;
1959
- const { width: e, height: t } = this.dimensions;
1960
- if (!(e === 0 || t === 0)) {
1961
- this.context = this.$refs.canvas.getContext("2d", {
1962
- willReadFrequently: !0
1963
- }), this.context.drawImage(this.overlayImage, 0, 0, e, t), this.imageData = this.context.getImageData(0, 0, e, t);
1964
- for (let i = 3; i < this.imageData.data.length; i += 4)
1965
- this.imageData.data[i] !== 0 && this.imageDataIndices.push(i);
1966
- this.draw(), this.isLoaded = !0;
1967
- }
1968
- },
1969
- draw() {
1970
- this.context && this.imageData && (this.applyColor(), this.context.putImageData(this.imageData, 0, 0));
1971
- },
1972
- applyColor() {
1973
- if (this.color)
1974
- for (let e = 0; e < this.imageDataIndices.length; e++)
1975
- this.imageData.data[this.imageDataIndices[e] - 3] = this.color.r, this.imageData.data[this.imageDataIndices[e] - 2] = this.color.g, this.imageData.data[this.imageDataIndices[e] - 1] = this.color.b, this.imageData.data[this.imageDataIndices[e]] = this.color.a;
1976
- }
1977
- }
1978
- };
1979
- function qt(e, t, i, o, n, s) {
1980
- return d(), m("canvas", F({
1981
- ref: "canvas",
1982
- class: "overlay"
1983
- }, i.dimensions), null, 16);
1984
- }
1985
- const de = /* @__PURE__ */ w(jt, [["render", qt], ["__scopeId", "data-v-9a90fa2f"]]), Yt = W({
1986
- setup() {
1987
- ge({});
1988
- },
1989
- name: "QiBuildingChooserRaster",
1990
- components: {
1991
- QiBuildingChooserRasterOverlay: de,
1992
- QiBuildingChooserSunSimControl: J,
1993
- QiBuildingChooserSceneImageStack: ee,
1994
- QiNorthDirection: Z,
1995
- QiFloatingCard: q,
1996
- QiHoverProbe: L,
1997
- QiZoomBox: Y
1998
- },
1999
- emits: ["go-to-building", "hover-over-building", "hover-out-building"],
2000
- provide() {
2001
- return {
2002
- i18n: this.i18n ? new R(this.i18n.labels, this.i18n.language) : new R()
2003
- };
2004
- },
2005
- props: {
2006
- showCards: { type: Boolean, default: () => !0 },
2007
- colorCallback: {
2008
- type: Function,
2009
- default: () => ({ r: 108, g: 0, b: 108, a: 144, s: 2 })
2010
- },
2011
- buildingCallback: { type: Function, default: (e) => e },
2012
- canGoToBuildingCallback: { type: Function, default: () => !0 },
2013
- buildingChooserTimeOfDay: { type: String, default: null },
2014
- cdnFileResolver: { type: Function, required: !0 },
2015
- i18n: { type: Object, default: void 0 },
2016
- interactiveDesktop: { type: Boolean, default: !0 },
2017
- interactiveMobile: { type: Boolean, default: !0 },
2018
- customOverlayContent: { type: String, default: "" }
2019
- },
2020
- data() {
2021
- return {
2022
- sceneState: { preloaded: !1, ready: !1 },
2023
- canvasDimensions: { width: 0, height: 0 },
2024
- pos: { x: 0, y: 0, width: 0, height: 0 },
2025
- pickerData: void 0,
2026
- buildingMap: U.empty(),
2027
- canvasRaster: $.empty(),
2028
- selectedBuildingId: void 0,
2029
- halfHourMark: (/* @__PURE__ */ new Date()).getHours() * 2 + ((/* @__PURE__ */ new Date()).getMinutes() < 30 ? 0 : 1),
2030
- viewResolver: (e, t) => ({ x: e, y: t }),
2031
- error: !1
2032
- };
2033
- },
2034
- computed: {
2035
- isHoverable() {
2036
- return this.$refs.hoverProbe.isHoverEnabled;
2037
- },
2038
- selectedBuilding() {
2039
- return this.getBuildingData(this.selectedBuildingId);
2040
- }
2041
- },
2042
- watch: {
2043
- buildingChooserTimeOfDay: {
2044
- handler() {
2045
- if (this.buildingChooserTimeOfDay) {
2046
- const [e, t, i] = /^(\d\d):(\d\d)$/.exec(this.buildingChooserTimeOfDay), o = parseInt(i);
2047
- this.halfHourMark = parseInt(t) * 2 + (o < 15 ? 0 : o > 45 ? 2 : 1);
2048
- }
2049
- },
2050
- immediate: !0
2051
- },
2052
- selectedBuildingId(e, t) {
2053
- e ? this.$emit("hover-over-building", this.getBuildingData(e)) : this.$emit("hover-out-building", this.getBuildingData(t));
2054
- }
2055
- },
2056
- mounted() {
2057
- return K(this, void 0, void 0, function* () {
2058
- const t = yield new le(this.cdnFileResolver).loadBuildingChooser();
2059
- t ? (this.canvasRaster = new $(t.mapImage), this.buildingMap = new U(t.buildingIds), this.daysOfYear = new z(t.backgrounds), this.pickerData = {
2060
- buildingOverlays: t.buildingOverlays,
2061
- sceneLongitude: t.viewLongitude
2062
- }, this.resizeImages()) : this.error = !0;
2063
- });
2064
- },
2065
- methods: {
2066
- resizeScene({ width: e, height: t }) {
2067
- this.canvasDimensions.width = e, this.canvasDimensions.height = t, this.$nextTick(this.resizeImages);
2068
- },
2069
- sceneReset() {
2070
- this.sceneState = { preloaded: !1, ready: !1 };
2071
- },
2072
- getBuildingData(e) {
2073
- return this.buildingCallback ? this.buildingCallback(e) : e;
2074
- },
2075
- getBuildingId(e) {
2076
- const { x: t, y: i } = this.viewResolver(e.layerX, e.layerY);
2077
- return this.buildingMap.getBuildingId(this.canvasRaster, t, i);
2078
- },
2079
- resizeImages() {
2080
- if (this.$refs.canvas && (this.canvasRaster.update(this.$refs.canvas), this.$refs.overlays))
2081
- for (const e of this.$refs.overlays)
2082
- e.setupDraw();
2083
- },
2084
- onMove(e) {
2085
- this.isHoverable && (this.selectedBuildingId = this.getBuildingId(e), this.selectedBuildingId !== void 0 && (this.pos = {
2086
- x: e.layerX,
2087
- y: e.layerY,
2088
- width: this.canvasDimensions.width,
2089
- height: this.canvasDimensions.height
2090
- }));
2091
- },
2092
- onClick(e) {
2093
- this.selectedBuildingId = this.getBuildingId(e), this.isHoverable && this.selectedBuilding && this.$emit("go-to-building", this.selectedBuilding);
2094
- },
2095
- getColor(e) {
2096
- return this.colorCallback(this.getBuildingData(e), e === this.selectedBuildingId ? "hover" : "idle");
2097
- },
2098
- updateView({ resolve: e }) {
2099
- this.viewResolver = e;
2100
- }
2101
- }
2102
- }), zt = {
2103
- key: 0,
2104
- style: { height: "50vh" },
2105
- class: "d-flex justify-center align-center blue-grey lighten-5"
2106
- }, Pt = { class: "image-instances" }, Qt = ["innerHTML"];
2107
- function Vt(e, t, i, o, n, s) {
2108
- const r = u("v-icon"), a = u("qi-building-chooser-scene-image-stack"), g = u("qi-building-chooser-raster-overlay"), v = u("qi-zoom-box"), f = u("qi-north-direction"), _ = u("qi-building-chooser-sun-sim-control"), b = u("qi-floating-card"), y = u("qi-hover-probe");
2109
- return e.error ? (d(), m("div", zt, [
2110
- l(r, { "x-large": "" }, {
2111
- default: c(() => [
2112
- B("mdi-alert-circle-outline")
2113
- ]),
2114
- _: 1
2115
- })
2116
- ])) : e.pickerData ? (d(), m("div", {
2117
- key: 1,
2118
- style: D(`cursor: ${e.selectedBuildingId ? "pointer" : "auto"};height: ${e.canvasDimensions.height}px; position: relative`),
2119
- class: "image-container"
2120
- }, [
2121
- l(v, {
2122
- desktop: e.interactiveDesktop,
2123
- mobile: e.interactiveMobile,
2124
- onUpdate: e.updateView
2125
- }, {
2126
- default: c(() => [
2127
- h("div", Pt, [
2128
- l(a, {
2129
- "image-urls": e.daysOfYear.imageUrls,
2130
- "active-index": e.halfHourMark,
2131
- onResize: e.resizeScene,
2132
- onPreloaded: t[0] || (t[0] = (p) => e.sceneState.preloaded = !0),
2133
- onReady: t[1] || (t[1] = (p) => e.sceneState.ready = !0),
2134
- onReset: e.sceneReset
2135
- }, null, 8, ["image-urls", "active-index", "onResize", "onReset"]),
2136
- A(h("div", null, [
2137
- (d(!0), m(E, null, T(e.pickerData.buildingOverlays, (p) => (d(), C(g, {
2138
- ref_for: !0,
2139
- ref: "overlays",
2140
- key: p.id,
2141
- "image-url": p.url,
2142
- dimensions: e.canvasDimensions,
2143
- color: e.getColor(p.id)
2144
- }, null, 8, ["image-url", "dimensions", "color"]))), 128))
2145
- ], 512), [
2146
- [x, e.sceneState.preloaded]
2147
- ])
2148
- ]),
2149
- h("canvas", F(e.canvasDimensions, {
2150
- ref: "canvas",
2151
- class: { hover: !!e.selectedBuildingId },
2152
- onClick: t[2] || (t[2] = (...p) => e.onClick && e.onClick(...p)),
2153
- onMousemove: t[3] || (t[3] = (...p) => e.onMove && e.onMove(...p))
2154
- }), null, 16),
2155
- A(h("div", {
2156
- class: "custom-overlay-layer",
2157
- innerHTML: e.customOverlayContent
2158
- }, null, 8, Qt), [
2159
- [x, e.sceneState.preloaded]
2160
- ])
2161
- ]),
2162
- _: 1
2163
- }, 8, ["desktop", "mobile", "onUpdate"]),
2164
- A(h("div", null, [
2165
- e.pickerData.sceneLongitude ? (d(), C(f, {
2166
- key: 0,
2167
- class: "north-indicator",
2168
- longitude: e.pickerData.sceneLongitude
2169
- }, null, 8, ["longitude"])) : I("", !0),
2170
- l(_, {
2171
- modelValue: e.halfHourMark,
2172
- "onUpdate:modelValue": t[4] || (t[4] = (p) => e.halfHourMark = p),
2173
- "date-selector": e.daysOfYear,
2174
- "is-loading": !e.sceneState.ready
2175
- }, null, 8, ["modelValue", "date-selector", "is-loading"])
2176
- ], 512), [
2177
- [x, e.sceneState.preloaded]
2178
- ]),
2179
- e.showCards && e.selectedBuilding ? (d(), C(b, {
2180
- key: 0,
2181
- "is-hoverable": e.isHoverable,
2182
- pos: e.pos,
2183
- onOutside: t[5] || (t[5] = () => e.selectedBuildingId = void 0)
2184
- }, {
2185
- default: c(() => [
2186
- k(e.$slots, "default", {
2187
- building: e.selectedBuilding,
2188
- canGoToBuilding: e.canGoToBuildingCallback(e.selectedBuilding),
2189
- goToBuilding: () => e.canGoToBuildingCallback(e.selectedBuilding) && e.$emit("go-to-building", e.selectedBuilding),
2190
- pos: e.pos,
2191
- isHoverable: e.isHoverable,
2192
- close: () => e.selectedBuildingId = void 0
2193
- }, void 0, !0)
2194
- ]),
2195
- _: 3
2196
- }, 8, ["is-hoverable", "pos"])) : I("", !0),
2197
- l(y, { ref: "hoverProbe" }, null, 512)
2198
- ], 4)) : I("", !0);
2199
- }
2200
- const X = /* @__PURE__ */ w(Yt, [["render", Vt], ["__scopeId", "data-v-08f2ea1e"]]), Gt = {
2201
- name: "QiBuildingChooser",
2202
- components: {
2203
- QiBuildingChooserSvg: N,
2204
- QiBuildingChooserRaster: X
2205
- },
2206
- emits: ["go-to-building", "hover-over-building", "hover-out-building"],
2207
- props: {
2208
- showCards: { type: Boolean, default: () => !0 },
2209
- colorCallback: {
2210
- type: Function,
2211
- default: () => ({ r: 108, g: 0, b: 108, a: 144, s: 2 })
2212
- },
2213
- buildingCallback: { type: Function, default: (e) => e },
2214
- cdnFileResolver: { type: Function, required: !0 },
2215
- i18n: { type: Object, default: void 0 },
2216
- interactiveDesktop: { type: Boolean, default: !0 },
2217
- interactiveMobile: { type: Boolean, default: !0 },
2218
- useSvg: { type: Boolean, default: !1 },
2219
- buildingChooserTimeOfDay: { type: String, default: null },
2220
- canGoToBuildingCallback: { type: Function, default: () => !0 },
2221
- customOverlayContent: { type: String, default: "" }
2222
- },
2223
- computed: {
2224
- component() {
2225
- return this.useSvg ? N : X;
2226
- }
2227
- }
2228
- };
2229
- function Nt(e, t, i, o, n, s) {
2230
- return d(), C(ue(s.component), {
2231
- "show-cards": i.showCards,
2232
- "color-callback": i.colorCallback,
2233
- "building-callback": i.buildingCallback,
2234
- "cdn-file-resolver": i.cdnFileResolver,
2235
- i18n: i.i18n,
2236
- "interactive-desktop": i.interactiveDesktop,
2237
- "interactive-mobile": i.interactiveMobile,
2238
- "building-chooser-time-of-day": i.buildingChooserTimeOfDay,
2239
- "can-go-to-building-callback": i.canGoToBuildingCallback,
2240
- "custom-overlay-content": i.customOverlayContent,
2241
- onGoToBuilding: t[0] || (t[0] = (r) => e.$emit("go-to-building", r)),
2242
- onHoverOverBuilding: t[1] || (t[1] = (r) => e.$emit("hover-over-building", r)),
2243
- onHoverOutBuilding: t[2] || (t[2] = (r) => e.$emit("hover-out-building", r))
2244
- }, Ie({ _: 2 }, [
2245
- T(Object.keys(e.$slots), (r) => ({
2246
- name: r,
2247
- fn: c((a) => [
2248
- k(e.$slots, r, he(me(a)))
2249
- ])
2250
- }))
2251
- ]), 1064, ["show-cards", "color-callback", "building-callback", "cdn-file-resolver", "i18n", "interactive-desktop", "interactive-mobile", "building-chooser-time-of-day", "can-go-to-building-callback", "custom-overlay-content"]);
2252
- }
2253
- const ye = /* @__PURE__ */ w(Gt, [["render", Nt]]), Xt = 37, Wt = 39, Kt = {
2254
- name: "WaypointCarousel",
2255
- props: {
2256
- thumbnails: { type: Array, required: !0 },
2257
- active: { type: Number, required: !0 }
2258
- },
2259
- data() {
2260
- return {
2261
- activeThumb: 0
2262
- };
2263
- },
2264
- computed: {
2265
- activeIndex: {
2266
- get() {
2267
- return this.active;
2268
- },
2269
- set(e) {
2270
- this.activeThumb = e;
2271
- }
2272
- },
2273
- isMobile() {
2274
- return /Android|webOS|iPhone|iPad|BlackBerry|Windows Phone|Opera Mini|IEMobile|Mobile/i.test(window.navigator.userAgent);
2275
- }
2276
- },
2277
- mounted() {
2278
- window.addEventListener("keydown", this.keyNavigate);
2279
- },
2280
- beforeUnmount() {
2281
- window.removeEventListener("keydown", this.keyNavigate);
2282
- },
2283
- methods: {
2284
- keyNavigate(e) {
2285
- switch (e.keyCode) {
2286
- case e.keyCode === Xt:
2287
- this.$emit("previous");
2288
- case e.keyCode === Wt:
2289
- this.$emit("next");
2290
- default:
2291
- return;
2292
- }
2293
- },
2294
- goToCamera(e, t) {
2295
- t(), this.$emit("goto", e);
2296
- }
2297
- }
2298
- }, Zt = { class: "waypoint-carousel" };
2299
- function Jt(e, t, i, o, n, s) {
2300
- const r = u("v-icon"), a = u("v-btn"), g = u("v-hover"), v = u("v-img"), f = u("v-card"), _ = u("v-slide-group-item"), b = u("v-slide-group");
2301
- return d(), m("div", Zt, [
2302
- l(b, {
2303
- modelValue: s.activeIndex,
2304
- "onUpdate:modelValue": t[2] || (t[2] = (y) => s.activeIndex = y),
2305
- "active-class": "active-apt",
2306
- "selected-class": "active-apt",
2307
- "show-arrows": "",
2308
- "center-active": "",
2309
- mandatory: ""
2310
- }, {
2311
- prev: c(() => [
2312
- l(g, null, {
2313
- default: c(({ hover: y }) => [
2314
- l(a, {
2315
- elevation: "0",
2316
- class: M(["carousel-button", { mobile: s.isMobile }]),
2317
- onClick: t[0] || (t[0] = (p) => e.$emit("previous"))
2318
- }, {
2319
- default: c(() => [
2320
- l(r, {
2321
- color: y ? "#999" : "#d2d2d2",
2322
- "x-large": ""
2323
- }, {
2324
- default: c(() => [
2325
- B(" mdi-chevron-left ")
2326
- ]),
2327
- _: 2
2328
- }, 1032, ["color"])
2329
- ]),
2330
- _: 2
2331
- }, 1032, ["class"])
2332
- ]),
2333
- _: 1
2334
- })
2335
- ]),
2336
- next: c(() => [
2337
- l(g, null, {
2338
- default: c(({ hover: y }) => [
2339
- l(a, {
2340
- elevation: "0",
2341
- class: M(["carousel-button", { mobile: s.isMobile }]),
2342
- onClick: t[1] || (t[1] = (p) => e.$emit("next"))
2343
- }, {
2344
- default: c(() => [
2345
- l(r, {
2346
- color: y ? "#999" : "#d2d2d2",
2347
- "x-large": ""
2348
- }, {
2349
- default: c(() => [
2350
- B(" mdi-chevron-right ")
2351
- ]),
2352
- _: 2
2353
- }, 1032, ["color"])
2354
- ]),
2355
- _: 2
2356
- }, 1032, ["class"])
2357
- ]),
2358
- _: 1
2359
- })
2360
- ]),
2361
- default: c(() => [
2362
- (d(!0), m(E, null, T(i.thumbnails, (y) => (d(), C(_, {
2363
- key: y.id
2364
- }, {
2365
- default: c(({ toggle: p, selectedClass: P }) => [
2366
- l(f, {
2367
- class: M(["ma-2", P]),
2368
- align: "center",
2369
- justify: "center",
2370
- height: s.isMobile ? 50 : 100,
2371
- width: s.isMobile ? 80 : 160,
2372
- elevation: "0",
2373
- style: { overflow: "hidden" },
2374
- onClick: (H) => s.goToCamera(y.id, p)
2375
- }, {
2376
- default: c(() => [
2377
- l(v, {
2378
- "max-height": "100",
2379
- "max-width": "160",
2380
- src: y.thumbnailUrl
2381
- }, null, 8, ["src"])
2382
- ]),
2383
- _: 2
2384
- }, 1032, ["class", "height", "width", "onClick"])
2385
- ]),
2386
- _: 2
2387
- }, 1024))), 128))
2388
- ]),
2389
- _: 1
2390
- }, 8, ["modelValue"])
2391
- ]);
2392
- }
2393
- const ei = /* @__PURE__ */ w(Kt, [["render", Jt], ["__scopeId", "data-v-f4e6ce2e"]]), ti = {
2394
- name: "QiVirtualTourSocialShare",
2395
- inject: ["i18n"],
2396
- data() {
2397
- return {
2398
- showSocialShare: !1,
2399
- currentURL: location.href
2400
- };
2401
- },
2402
- methods: {
2403
- shareToFacebook() {
2404
- return window.open("https://www.facebook.com/sharer/sharer.php?u=" + encodeURIComponent(location.href), "facebook-share-dialog", "width=626,height=436"), !1;
2405
- },
2406
- shareToTwitter() {
2407
- return window.open("https://twitter.com/intent/tweet?text=" + encodeURIComponent(location.href), "twiter-share-dialog", "width=626,height=436"), !1;
2408
- },
2409
- shareToLinkedin() {
2410
- return window.open("https://www.linkedin.com/sharing/share-offsite/?url=" + encodeURIComponent(location.href), "linkedin-share-dialog", "width=626,height=736"), !1;
2411
- },
2412
- copyLink() {
2413
- navigator.clipboard.writeText(location.href);
2414
- }
2415
- }
2416
- }, ii = {
2417
- id: "share-btns-wrapper",
2418
- class: "text-center"
2419
- };
2420
- function ni(e, t, i, o, n, s) {
2421
- const r = u("v-btn"), a = u("v-tooltip"), g = u("v-toolbar-title"), v = u("v-spacer"), f = u("v-toolbar"), _ = u("v-card-text"), b = u("v-card"), y = u("v-dialog");
2422
- return d(), m("div", null, [
2423
- l(a, {
2424
- elevation: "2",
2425
- top: "",
2426
- attach: ""
2427
- }, {
2428
- activator: c(({ on: p }) => [
2429
- l(r, F({
2430
- density: "comfortable",
2431
- elevation: "1",
2432
- icon: "mdi-share-variant",
2433
- onClick: t[0] || (t[0] = (P) => n.showSocialShare = !n.showSocialShare)
2434
- }, Ce(Object.assign({}, p))), null, 16)
2435
- ]),
2436
- default: c(() => [
2437
- h("span", null, S(s.i18n.getLabel("share")), 1)
2438
- ]),
2439
- _: 1
2440
- }),
2441
- l(y, {
2442
- id: "share-box",
2443
- width: "400",
2444
- modelValue: n.showSocialShare,
2445
- "onUpdate:modelValue": t[2] || (t[2] = (p) => n.showSocialShare = p)
2446
- }, {
2447
- default: c(() => [
2448
- l(b, null, {
2449
- default: c(() => [
2450
- l(f, { elevation: "0" }, {
2451
- default: c(() => [
2452
- l(r, {
2453
- size: "x-small",
2454
- icon: "mdi-close",
2455
- onClick: t[1] || (t[1] = (p) => n.showSocialShare = !1)
2456
- }),
2457
- l(g, null, {
2458
- default: c(() => [
2459
- B(S(s.i18n.getLabel("share")), 1)
2460
- ]),
2461
- _: 1
2462
- }),
2463
- l(v)
2464
- ]),
2465
- _: 1
2466
- }),
2467
- l(_, { class: "mt-5" }, {
2468
- default: c(() => [
2469
- h("p", ii, [
2470
- l(a, { location: "top" }, {
2471
- activator: c(({ props: p }) => [
2472
- l(r, F({
2473
- depressed: "",
2474
- fab: "",
2475
- light: "",
2476
- icon: "mdi-facebook"
2477
- }, p, { onClick: s.shareToFacebook }), null, 16, ["onClick"])
2478
- ]),
2479
- default: c(() => [
2480
- h("span", null, S(s.i18n.getLabel("share-to-facebook")), 1)
2481
- ]),
2482
- _: 1
2483
- }),
2484
- l(a, { location: "top" }, {
2485
- activator: c(({ props: p }) => [
2486
- l(r, F({
2487
- depressed: "",
2488
- fab: "",
2489
- light: "",
2490
- icon: "mdi-linkedin"
2491
- }, p, { onClick: s.shareToLinkedin }), null, 16, ["onClick"])
2492
- ]),
2493
- default: c(() => [
2494
- h("span", null, S(s.i18n.getLabel("share-to-linkedin")), 1)
2495
- ]),
2496
- _: 1
2497
- }),
2498
- l(a, { location: "top" }, {
2499
- activator: c(({ props: p }) => [
2500
- l(r, F({
2501
- depressed: "",
2502
- fab: "",
2503
- light: "",
2504
- icon: "mdi-twitter"
2505
- }, p, { onClick: s.shareToTwitter }), null, 16, ["onClick"])
2506
- ]),
2507
- default: c(() => [
2508
- h("span", null, S(s.i18n.getLabel("share-to-twitter")), 1)
2509
- ]),
2510
- _: 1
2511
- }),
2512
- l(a, { location: "top" }, {
2513
- activator: c(({ props: p }) => [
2514
- l(r, F({
2515
- depressed: "",
2516
- fab: "",
2517
- light: "",
2518
- icon: "mdi-email",
2519
- link: "",
2520
- href: `mailto:?body=${n.currentURL}`
2521
- }, p), null, 16, ["href"])
2522
- ]),
2523
- default: c(() => [
2524
- h("span", null, S(s.i18n.getLabel("share-via-email")), 1)
2525
- ]),
2526
- _: 1
2527
- }),
2528
- l(a, { location: "top" }, {
2529
- activator: c(({ props: p }) => [
2530
- l(r, F({
2531
- depressed: "",
2532
- fab: "",
2533
- light: "",
2534
- icon: "mdi-content-copy",
2535
- onClick: s.copyLink
2536
- }, p), null, 16, ["onClick"])
2537
- ]),
2538
- default: c(() => [
2539
- h("span", null, S(s.i18n.getLabel("copy-link")), 1)
2540
- ]),
2541
- _: 1
2542
- }),
2543
- l(v)
2544
- ])
2545
- ]),
2546
- _: 1
2547
- })
2548
- ]),
2549
- _: 1
2550
- })
2551
- ]),
2552
- _: 1
2553
- }, 8, ["modelValue"])
2554
- ]);
2555
- }
2556
- const si = /* @__PURE__ */ w(ti, [["render", ni], ["__scopeId", "data-v-3560cd03"]]);
2557
- class oi {
2558
- constructor(t, i) {
2559
- this._doc = t, this._elemId = i, this._state = { isActive: !1 };
2560
- }
2561
- get isActive() {
2562
- return this._state.isActive;
2563
- }
2564
- setup() {
2565
- const t = [
2566
- "fullscreenchange",
2567
- "webkitfullscreenchange",
2568
- "mozfullscreenchange",
2569
- "msfullscreenchange"
2570
- ], i = this._getElement();
2571
- t.forEach((o) => {
2572
- i.addEventListener(o, this._toggle.bind(this), !1);
2573
- });
2574
- }
2575
- toggle() {
2576
- this.isActive ? this._exit() : this._enter();
2577
- }
2578
- _enter() {
2579
- const t = this._getElement(), i = t.requestFullscreen || t.webkitRequestFullscreen || t.mozRequestFullscreen || t.msRequestFullscreen;
2580
- i && i.apply(t);
2581
- }
2582
- _exit() {
2583
- const t = this._doc.exitFullscreen || this._doc.webkitExitFullscreen || this._doc.mozExitFullscreen || this._doc.document.msExitFullscreen;
2584
- t && t.apply(document);
2585
- }
2586
- _getElement() {
2587
- return this._doc.getElementById(this._elemId);
2588
- }
2589
- _toggle() {
2590
- const t = !!(this._doc.fullscreenElement || this._doc.webkitFullscreenElement || this._doc.mozFullscreenElement || this._doc.msFullscreenElement);
2591
- this._state.isActive = t;
2592
- }
2593
- }
2594
- const ri = {
2595
- props: {
2596
- isFullScreen: {
2597
- type: Boolean,
2598
- required: !0
2599
- }
2600
- },
2601
- emits: ["toggle-fullscreen"]
2602
- }, ai = {
2603
- id: "btn-fullscreen",
2604
- class: "btn-placeholder mr-2"
2605
- };
2606
- function li(e, t, i, o, n, s) {
2607
- const r = u("v-btn");
2608
- return d(), m("div", ai, [
2609
- l(r, {
2610
- density: "comfortable",
2611
- elevation: "3",
2612
- icon: i.isFullScreen ? "mdi-fullscreen-exit" : "mdi-fullscreen",
2613
- onClick: t[0] || (t[0] = (a) => e.$emit("toggle-fullscreen"))
2614
- }, null, 8, ["icon"])
2615
- ]);
2616
- }
2617
- const di = /* @__PURE__ */ w(ri, [["render", li]]), ci = {
2618
- name: "Disclaimer",
2619
- inject: ["i18n"],
2620
- data() {
2621
- return {
2622
- isVisible: !0
2623
- };
2624
- }
2625
- }, ui = {
2626
- key: 0,
2627
- class: "text-white disclaimer caption"
2628
- };
2629
- function hi(e, t, i, o, n, s) {
2630
- return d(), C(ie, { name: "fade-transition" }, {
2631
- default: c(() => [
2632
- n.isVisible ? (d(), m("div", ui, [
2633
- B(S(s.i18n.getLabel("all-illustrations-are-indicative-deviations-may-occur")) + " ", 1),
2634
- h("span", {
2635
- onClick: t[0] || (t[0] = (r) => n.isVisible = !1),
2636
- class: "link-text text-decoration-underline"
2637
- }, S(s.i18n.getLabel("i-understand")), 1)
2638
- ])) : I("", !0)
2639
- ]),
2640
- _: 1
2641
- });
2642
- }
2643
- const mi = /* @__PURE__ */ w(ci, [["render", hi], ["__scopeId", "data-v-6e4f02d6"]]), gi = {
2644
- name: "ManualSlideShowImage",
2645
- props: {
2646
- isFullScreen: { type: Boolean, required: !0 }
2647
- },
2648
- data() {
2649
- return {};
2650
- },
2651
- watch: {},
2652
- mounted() {
2653
- window.addEventListener("resize", this.setPlayerSize), this.setPlayerSize();
2654
- },
2655
- methods: {
2656
- findClosestAncestor(e, t) {
2657
- let i = e, o = e;
2658
- for (; (i = i.parentNode) && i.className.indexOf(t) < 0; )
2659
- ;
2660
- return o = i, o;
2661
- },
2662
- setPlayerSize() {
2663
- let e = 1.7777777777777777, t = document.querySelector("#player-sizer");
2664
- if (!t)
2665
- return;
2666
- let i = t.offsetWidth, o = i * (1 / e);
2667
- (window.innerWidth <= 600 || i <= 600) && (o = window.innerHeight * 0.75, i = o * (1 / e)), t.style.height = o + "px", t.style.width = i + "px", this.$emit("new-size-callback", i, o);
2668
- }
2669
- }
2670
- }, vi = { id: "player-wrapper" }, pi = { id: "player-sizer" }, fi = {
2671
- class: "player-control",
2672
- id: "controls-top-left"
2673
- }, bi = {
2674
- class: "player-control",
2675
- id: "controls-top-center"
2676
- }, yi = {
2677
- class: "player-control",
2678
- id: "controls-top-right"
2679
- }, wi = {
2680
- class: "player-control",
2681
- id: "controls-center-left"
2682
- }, _i = {
2683
- class: "player-control",
2684
- id: "controls-center-center"
2685
- }, ki = {
2686
- class: "player-control",
2687
- id: "controls-center-right"
2688
- }, Ii = {
2689
- class: "player-control",
2690
- id: "controls-bottom-left"
2691
- }, Ci = {
2692
- class: "player-control",
2693
- id: "controls-bottom-center"
2694
- }, Si = {
2695
- class: "player-control",
2696
- id: "controls-bottom-right"
2697
- };
2698
- function Bi(e, t, i, o, n, s) {
2699
- return d(), m("div", vi, [
2700
- h("div", pi, [
2701
- k(e.$slots, "slideshow-image", {}, void 0, !0),
2702
- h("div", fi, [
2703
- k(e.$slots, "top-left", {}, void 0, !0)
2704
- ]),
2705
- h("div", bi, [
2706
- k(e.$slots, "top-center", {}, void 0, !0)
2707
- ]),
2708
- h("div", yi, [
2709
- k(e.$slots, "top-right", {}, void 0, !0)
2710
- ]),
2711
- h("div", wi, [
2712
- k(e.$slots, "center-left", {}, void 0, !0)
2713
- ]),
2714
- h("div", _i, [
2715
- k(e.$slots, "center-center", {}, void 0, !0)
2716
- ]),
2717
- h("div", ki, [
2718
- k(e.$slots, "center-right", {}, void 0, !0)
2719
- ]),
2720
- h("div", Ii, [
2721
- k(e.$slots, "bottom-left", {}, void 0, !0)
2722
- ]),
2723
- h("div", Ci, [
2724
- k(e.$slots, "bottom-center", {}, void 0, !0)
2725
- ]),
2726
- h("div", Si, [
2727
- k(e.$slots, "bottom-right", {}, void 0, !0)
2728
- ])
2729
- ])
2730
- ]);
2731
- }
2732
- const Di = /* @__PURE__ */ w(gi, [["render", Bi], ["__scopeId", "data-v-1dab1ac3"]]), Ai = {
2733
- name: "StaticImage",
2734
- props: {
2735
- image: { type: String, required: !0 },
2736
- aspectRatio: { type: String, default: () => "wide" }
2737
- },
2738
- computed: {
2739
- style() {
2740
- return { "background-image": `url("${encodeURI(this.image)}")` };
2741
- }
2742
- }
2743
- }, xi = { class: "static-image-wrapper" };
2744
- function Mi(e, t, i, o, n, s) {
2745
- return d(), m("div", xi, [
2746
- h("div", {
2747
- class: M(["img-div", [i.aspectRatio]]),
2748
- style: D(s.style)
2749
- }, null, 6)
2750
- ]);
2751
- }
2752
- const Ri = /* @__PURE__ */ w(Ai, [["render", Mi], ["__scopeId", "data-v-b418cf51"]]), Fi = {
2753
- name: "ManualSlideShow",
2754
- components: {
2755
- WaypointCarousel: ei,
2756
- SingleImage: Ri,
2757
- SocialShare: si,
2758
- FullScreenButton: di,
2759
- Disclaimer: mi,
2760
- ManualSlideShowPlayer: Di
2761
- },
2762
- provide() {
2763
- return {
2764
- i18n: this.i18n ? new R(this.i18n.labels, this.i18n.language) : new R()
2765
- };
2766
- },
2767
- props: {
2768
- images: { type: Array, required: !0 },
2769
- websiteUrl: { type: String, default: () => {
2770
- } },
2771
- i18n: { type: Object, default: void 0 },
2772
- showFullScreen: { type: Boolean, default: () => !0 },
2773
- showShare: { type: Boolean, default: () => !0 },
2774
- defaultWaypointIndex: { type: Number, default: () => 0 }
2775
- },
2776
- data() {
2777
- return {
2778
- loading: !0,
2779
- error: !1,
2780
- currentIndex: 0,
2781
- currentImageId: void 0,
2782
- fullScreen: new oi(document, "player-wrapper")
2783
- };
2784
- },
2785
- computed: {
2786
- imagesWithThumbnails() {
2787
- return this.images.map((e) => Object.assign(Object.assign({}, e), { thumbnailUrl: e.url }));
2788
- },
2789
- currentImage() {
2790
- return this.images[this.currentIndex].url;
2791
- }
2792
- },
2793
- mounted() {
2794
- this.fullScreen.setup();
2795
- },
2796
- methods: {
2797
- toggleFullscreen() {
2798
- this.fullScreen.toggle(), window.scrollTo({ top: 150, behavior: "smooth" });
2799
- },
2800
- nextImage() {
2801
- let e = this.currentIndex + 1;
2802
- e >= this.images.length && (e = 0), this.currentIndex = e;
2803
- },
2804
- previousImage() {
2805
- let e = this.currentIndex - 1;
2806
- e < 0 && (e = this.images.length - 1), this.currentIndex = e;
2807
- },
2808
- goToImage(e, t = !0) {
2809
- let i = this.images.findIndex((o) => o.id === e);
2810
- i != -1 && (this.currentIndex = i);
2811
- }
2812
- }
2813
- }, Hi = { class: "virtual-tour-v2-wrapper" }, Ti = { class: "player-and-components-wrapper" }, Oi = {
2814
- key: 1,
2815
- class: "btn-placeholder"
2816
- };
2817
- function Li(e, t, i, o, n, s) {
2818
- const r = u("single-image"), a = u("disclaimer"), g = u("v-icon"), v = u("v-btn"), f = u("full-screen-button"), _ = u("social-share"), b = u("waypoint-carousel"), y = u("manual-slide-show-player");
2819
- return d(), m("div", Hi, [
2820
- h("div", Ti, [
2821
- h("div", null, [
2822
- l(y, {
2823
- isFullScreen: n.fullScreen.isActive
2824
- }, {
2825
- "slideshow-image": c(() => [
2826
- l(r, { image: s.currentImage }, null, 8, ["image"])
2827
- ]),
2828
- "top-left": c(() => []),
2829
- "top-center": c(() => [
2830
- l(a, { "return-url": i.websiteUrl }, null, 8, ["return-url"])
2831
- ]),
2832
- "top-right": c(() => []),
2833
- "center-left": c(() => [
2834
- l(ie, { name: "slide-x-transition" }, {
2835
- default: c(() => [
2836
- l(v, {
2837
- elevation: "1",
2838
- rounded: "",
2839
- plain: "",
2840
- icon: "",
2841
- onClick: s.previousImage
2842
- }, {
2843
- default: c(() => [
2844
- l(g, { color: "black darken-1" }, {
2845
- default: c(() => [
2846
- B("mdi-chevron-left")
2847
- ]),
2848
- _: 1
2849
- })
2850
- ]),
2851
- _: 1
2852
- }, 8, ["onClick"])
2853
- ]),
2854
- _: 1
2855
- })
2856
- ]),
2857
- "center-center": c(() => []),
2858
- "center-right": c(() => [
2859
- l(ie, { name: "slide-x-reverse-transition" }, {
2860
- default: c(() => [
2861
- l(v, {
2862
- elevation: "1",
2863
- rounded: "",
2864
- plain: "",
2865
- icon: "",
2866
- onClick: s.nextImage
2867
- }, {
2868
- default: c(() => [
2869
- l(g, { color: "black darken-1" }, {
2870
- default: c(() => [
2871
- B("mdi-chevron-right")
2872
- ]),
2873
- _: 1
2874
- })
2875
- ]),
2876
- _: 1
2877
- }, 8, ["onClick"])
2878
- ]),
2879
- _: 1
2880
- })
2881
- ]),
2882
- "bottom-left": c(() => [
2883
- i.showFullScreen ? (d(), C(f, {
2884
- key: 0,
2885
- isFullScreen: n.fullScreen.isActive,
2886
- class: "btn-fullscreen",
2887
- onToggleFullscreen: s.toggleFullscreen
2888
- }, null, 8, ["isFullScreen", "onToggleFullscreen"])) : I("", !0),
2889
- i.showShare ? (d(), m("div", Oi, [
2890
- l(_)
2891
- ])) : I("", !0)
2892
- ]),
2893
- "bottom-center": c(() => [
2894
- h("div", null, [
2895
- n.fullScreen.isActive ? (d(), C(b, {
2896
- key: 0,
2897
- class: M([n.fullScreen.isActive ? "full-screen" : ""]),
2898
- thumbnails: s.imagesWithThumbnails,
2899
- active: n.currentIndex,
2900
- onNext: s.nextImage,
2901
- onPrevious: s.previousImage,
2902
- onGoto: s.goToImage
2903
- }, null, 8, ["class", "thumbnails", "active", "onNext", "onPrevious", "onGoto"])) : I("", !0)
2904
- ])
2905
- ]),
2906
- "bottom-right": c(() => []),
2907
- _: 1
2908
- }, 8, ["isFullScreen"]),
2909
- l(b, {
2910
- thumbnails: s.imagesWithThumbnails,
2911
- active: n.currentIndex,
2912
- onNext: s.nextImage,
2913
- onPrevious: s.previousImage,
2914
- onGoto: s.goToImage
2915
- }, null, 8, ["thumbnails", "active", "onNext", "onPrevious", "onGoto"])
2916
- ])
2917
- ])
2918
- ]);
2919
- }
2920
- const we = /* @__PURE__ */ w(Fi, [["render", Li], ["__scopeId", "data-v-e2117d1e"]]), Ui = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2921
- __proto__: null,
2922
- ManualSlideShow: we,
2923
- QiApartmentChooser: be,
2924
- QiApartmentChooserNavigation: se,
2925
- QiApartmentChooserRaster: Q,
2926
- QiApartmentChooserRotator: re,
2927
- QiApartmentChooserSvg: V,
2928
- QiBuildingChooser: ye,
2929
- QiBuildingChooserRaster: X,
2930
- QiBuildingChooserRasterOverlay: de,
2931
- QiBuildingChooserSceneImageStack: ee,
2932
- QiBuildingChooserSunSimControl: J,
2933
- QiBuildingChooserSvg: N,
2934
- QiFloatingCard: q,
2935
- QiHoverProbe: L,
2936
- QiNorthDirection: Z,
2937
- QiZoomBox: Y
2938
- }, Symbol.toStringTag, { value: "Module" }));
2939
- class $i {
2940
- constructor(t) {
2941
- this._data = t;
2942
- }
2943
- getPixel(t, i) {
2944
- const o = this._data[t][i];
2945
- if (o !== " ") {
2946
- const n = Number.parseInt(o);
2947
- return [n, n, n, 255];
2948
- } else
2949
- return [0, 0, 0, 0];
2950
- }
2951
- }
2952
- const _e = function(t) {
2953
- Object.entries(Ui).forEach(([i, o]) => {
2954
- t.component(i, o);
2955
- });
2956
- }, Ei = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2957
- __proto__: null,
2958
- BatchLoadTracker: G,
2959
- BuildingMap: U,
2960
- BuildingPickerResourceProvider: le,
2961
- BuildingViewerModel: fe,
2962
- CanvasRaster: $,
2963
- DayOfYearSelector: z,
2964
- I18N: R,
2965
- ManualSlideShow: we,
2966
- QiApartmentChooser: be,
2967
- QiApartmentChooserNavigation: se,
2968
- QiApartmentChooserRaster: Q,
2969
- QiApartmentChooserRotator: re,
2970
- QiApartmentChooserSvg: V,
2971
- QiBuildingChooser: ye,
2972
- QiBuildingChooserRaster: X,
2973
- QiBuildingChooserRasterOverlay: de,
2974
- QiBuildingChooserSceneImageStack: ee,
2975
- QiBuildingChooserSunSimControl: J,
2976
- QiBuildingChooserSvg: N,
2977
- QiFloatingCard: q,
2978
- QiHoverProbe: L,
2979
- QiNorthDirection: Z,
2980
- QiZoomBox: Y,
2981
- ResourceLoader: O,
2982
- SampleRaster: $i,
2983
- SceneRotator: ve,
2984
- default: _e,
2985
- throttle: ne
2986
- }, Symbol.toStringTag, { value: "Module" }));
2987
- Object.entries(Ei).forEach(([e, t]) => {
2988
- e !== "default" && (_e[e] = t);
2989
- });
2990
- export {
2991
- _e as default
2992
- };