@realsee/dnalogel 2.0.0-alpha.36 → 2.0.0-alpha.39

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 (118) hide show
  1. package/dist/ItemLabelPlugin/index.js +60 -36
  2. package/dist/ItemLabelPlugin/typings.d.ts +4 -0
  3. package/dist/ModelViewPlugin/Plugin.d.ts +4 -4
  4. package/dist/ModelViewPlugin/index.js +2 -3
  5. package/dist/PanoRulerProPlugin/Controller.d.ts +15 -0
  6. package/dist/PanoRulerProPlugin/index.d.ts +8 -0
  7. package/dist/PanoRulerProPlugin/index.js +1006 -0
  8. package/dist/PanoRulerProPlugin/typings.d.ts +46 -0
  9. package/dist/floorplan/ModelFloorplanPlugin/Controller.d.ts +2 -1
  10. package/dist/floorplan/ModelFloorplanPlugin/index.js +8 -1
  11. package/dist/index.d.ts +2 -0
  12. package/dist/index.es.js +1036 -243
  13. package/dist/index.js +1037 -242
  14. package/dist/index.umd.js +1037 -242
  15. package/dist/shared-utils/logger.d.ts +16 -0
  16. package/docs/assets/search.js +1 -1
  17. package/docs/classes/Magnifier.html +4 -4
  18. package/docs/classes/ModelRoomLabelController.html +4 -4
  19. package/docs/enums/CameraMovementEffect.html +2 -2
  20. package/docs/enums/DIRECTION.html +1 -1
  21. package/docs/enums/DISPLAY_STRATEGY_TYPE.html +1 -1
  22. package/docs/enums/FLOOR_PLAN_ATTACHED_TO.html +1 -1
  23. package/docs/enums/ITEM_LABEL_PLUGIN_DISPLAY_STRATEGY_TYPE.html +1 -1
  24. package/docs/enums/Rotation.html +2 -2
  25. package/docs/index.html +2 -2
  26. package/docs/interfaces/CSS3DRenderPluginExportType.html +2 -2
  27. package/docs/interfaces/CameraMovementPluginExportType.html +2 -2
  28. package/docs/interfaces/FloorplanBounding.html +4 -4
  29. package/docs/interfaces/FloorplanData.html +2 -2
  30. package/docs/interfaces/FloorplanEntrance.html +7 -7
  31. package/docs/interfaces/FloorplanExtraObject.html +3 -3
  32. package/docs/interfaces/FloorplanExtraObject3D.html +2 -2
  33. package/docs/interfaces/FloorplanFloorData.html +2 -2
  34. package/docs/interfaces/FloorplanImagePosition.html +2 -2
  35. package/docs/interfaces/FloorplanObserver.html +2 -2
  36. package/docs/interfaces/FloorplanOutlineItem.html +2 -2
  37. package/docs/interfaces/FloorplanPosition.html +2 -2
  38. package/docs/interfaces/FloorplanRoomItem.html +6 -6
  39. package/docs/interfaces/FloorplanRoomLabelItem.html +3 -3
  40. package/docs/interfaces/FloorplanServerBounding.html +4 -4
  41. package/docs/interfaces/FloorplanServerComputedData.html +1 -1
  42. package/docs/interfaces/FloorplanServerData.html +2 -2
  43. package/docs/interfaces/FloorplanServerEntrance.html +7 -7
  44. package/docs/interfaces/FloorplanServerFloorData.html +2 -2
  45. package/docs/interfaces/FloorplanServerImagePosition.html +2 -2
  46. package/docs/interfaces/FloorplanServerObserver.html +2 -2
  47. package/docs/interfaces/FloorplanServerOutlineItem.html +2 -2
  48. package/docs/interfaces/FloorplanServerPosition.html +2 -2
  49. package/docs/interfaces/FloorplanServerRoomItem.html +7 -7
  50. package/docs/interfaces/FloorplanServerRoomLabelItem.html +3 -3
  51. package/docs/interfaces/ItemLabelPluginData.html +1 -1
  52. package/docs/interfaces/ItemLabelPluginExportReturnsType.html +1 -1
  53. package/docs/interfaces/ItemLabelPluginParametersType.html +1 -1
  54. package/docs/interfaces/LineJson.html +1 -1
  55. package/docs/interfaces/ModelChassisCompassPluginData.html +1 -1
  56. package/docs/interfaces/ModelChassisCompassPluginExportType.html +1 -1
  57. package/docs/interfaces/ModelChassisCompassPluginParameterType.html +1 -1
  58. package/docs/interfaces/ModelEntryDoorGuidePluginData.html +1 -1
  59. package/docs/interfaces/ModelEntryDoorGuidePluginExportType.html +1 -1
  60. package/docs/interfaces/ModelItemLabelPluginData.html +1 -1
  61. package/docs/interfaces/ModelItemLabelPluginExportReturnsType.html +1 -1
  62. package/docs/interfaces/ModelItemLabelPluginParametersType.html +1 -1
  63. package/docs/interfaces/ModelRoomLabelPluginData.html +1 -1
  64. package/docs/interfaces/ModelTVVideoPluginData.html +1 -1
  65. package/docs/interfaces/ModelTVVideoPluginExportType.html +1 -1
  66. package/docs/interfaces/ModelTVVideoPluginParameterType.html +1 -1
  67. package/docs/interfaces/ModelViewPluginExportType.html +1 -1
  68. package/docs/interfaces/OpenParameter.html +2 -2
  69. package/docs/interfaces/PanoCompassPluginData.html +1 -1
  70. package/docs/interfaces/PanoCompassPluginParameterType.html +1 -1
  71. package/docs/interfaces/PanoCursorRaycasterPluginExportType.html +6 -6
  72. package/docs/interfaces/PanoCursorRaycasterPluginParameterType.html +1 -1
  73. package/docs/interfaces/PanoMeasureParameterType.html +1 -1
  74. package/docs/interfaces/PanoRulerPluginExportType.html +1 -1
  75. package/docs/interfaces/PanoRulerPluginOptions.html +1 -1
  76. package/docs/interfaces/PanoRulerPluginParameterType.html +1 -1
  77. package/docs/interfaces/PanoRulerProPluginExportType.html +1 -0
  78. package/docs/interfaces/PanoRulerProPluginOptions.html +1 -0
  79. package/docs/interfaces/PanoRulerProPluginParameterType.html +1 -0
  80. package/docs/interfaces/PanoRulerProPluginState.html +1 -0
  81. package/docs/interfaces/PanoSpatialTagPluginContentEvent.html +1 -1
  82. package/docs/interfaces/PanoSpatialTagPluginContentReplacement.html +1 -1
  83. package/docs/interfaces/PanoSpatialTagPluginData.html +1 -1
  84. package/docs/interfaces/PanoSpatialTagPluginDataElement.html +1 -1
  85. package/docs/interfaces/PanoSpatialTagPluginExportType.html +1 -1
  86. package/docs/interfaces/PanoSpatialTagPluginOriginElement.html +1 -1
  87. package/docs/interfaces/PanoSpatialTagPluginParameterType.html +1 -1
  88. package/docs/interfaces/PanoSpatialTagPluginPointElement.html +1 -1
  89. package/docs/interfaces/PanoSpatialTagPluginTagElement.html +1 -1
  90. package/docs/interfaces/Point.html +1 -1
  91. package/docs/interfaces/PointJson.html +1 -1
  92. package/docs/interfaces/Room.html +1 -1
  93. package/docs/interfaces/RoomInfo.html +1 -1
  94. package/docs/interfaces/RoomLabel.html +7 -7
  95. package/docs/interfaces/RoomRules.html +1 -1
  96. package/docs/interfaces/Rooms.html +1 -1
  97. package/docs/modules.html +19 -17
  98. package/libs/ItemLabelPlugin/ItemLabelComponent.js +34 -21
  99. package/libs/ItemLabelPlugin/Plugin.js +16 -10
  100. package/libs/ItemLabelPlugin/typings.d.ts +4 -0
  101. package/libs/ItemLabelPlugin/utils/parseData.js +1 -1
  102. package/libs/ModelViewPlugin/Plugin.d.ts +4 -4
  103. package/libs/ModelViewPlugin/Plugin.js +2 -3
  104. package/libs/PanoRulerProPlugin/Controller.d.ts +15 -0
  105. package/libs/PanoRulerProPlugin/Controller.js +110 -0
  106. package/libs/PanoRulerProPlugin/RulerItem.js +314 -0
  107. package/libs/PanoRulerProPlugin/RulerItems.js +377 -0
  108. package/libs/PanoRulerProPlugin/index.d.ts +8 -0
  109. package/libs/PanoRulerProPlugin/index.js +8 -0
  110. package/libs/PanoRulerProPlugin/typings.d.ts +46 -0
  111. package/libs/PanoRulerProPlugin/typings.js +1 -0
  112. package/libs/floorplan/ModelFloorplanPlugin/Controller.d.ts +2 -1
  113. package/libs/floorplan/ModelFloorplanPlugin/Controller.js +8 -1
  114. package/libs/index.d.ts +2 -0
  115. package/libs/index.js +3 -0
  116. package/libs/shared-utils/logger.d.ts +16 -0
  117. package/libs/shared-utils/logger.js +47 -0
  118. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -92,8 +92,7 @@ const ModelViewPlugin = (five) => {
92
92
  };
93
93
  const handleModelLoaded = () => {
94
94
  function cloneMaterial(material) {
95
- material = material.clone();
96
- material.uniforms.modelAlpha.value = 1;
95
+ material.clone().uniforms.modelAlpha.value = 1;
97
96
  if (material.uniforms.map.value) {
98
97
  material.uniforms.map.value.needsUpdate = true;
99
98
  }
@@ -141,7 +140,7 @@ const ModelViewPlugin = (five) => {
141
140
  return;
142
141
  const element = renderer.domElement;
143
142
  const container = element.parentNode;
144
- if (container && container.nodeName) {
143
+ if (container === null || container === void 0 ? void 0 : container.nodeName) {
145
144
  const { width = container.offsetWidth, height = container.offsetHeight } = size;
146
145
  renderer.setSize(width, height);
147
146
  // 修改摄像机 aspect 比值
@@ -491,11 +490,11 @@ const ROOM_LABEL_BG = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGAAAAA8CAY
491
490
 
492
491
  /* src/ModelRoomLabelPlugin/RoomLabelItem.svelte generated by Svelte v3.47.0 */
493
492
 
494
- function add_css$o(target) {
493
+ function add_css$p(target) {
495
494
  internal.append_styles(target, "svelte-1ak9fbs", ".room-label-item.svelte-1ak9fbs{position:absolute;font-size:0.41667rem;z-index:0;transform:none;cursor:pointer;pointer-events:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.room-label-item__text.svelte-1ak9fbs{position:absolute;left:0;top:-3.33333rem;transform:translate(-50%, 0);display:flex;justify-content:center;align-items:center;height:1.04167rem;min-width:1.66667rem;padding:0 0.3125rem;pointer-events:all;background-size:100% 100%;background-repeat:no-repeat;white-space:nowrap}.room-label-item__bar.svelte-1ak9fbs{position:absolute;top:-2.29167rem;height:2.5rem;width:1px;background-image:linear-gradient(to bottom, rgba(255, 255, 255, 1), rgba(255, 255, 255, 0))}.wide.svelte-1ak9fbs{font-size:0.52083rem}");
496
495
  }
497
496
 
498
- function create_fragment$s(ctx) {
497
+ function create_fragment$u(ctx) {
499
498
  let div1;
500
499
  let span;
501
500
  let t0_value = /*roomLabel*/ ctx[0].name + "";
@@ -562,7 +561,7 @@ function create_fragment$s(ctx) {
562
561
  };
563
562
  }
564
563
 
565
- function instance$s($$self, $$props, $$invalidate) {
564
+ function instance$u($$self, $$props, $$invalidate) {
566
565
  let { five } = $$props;
567
566
  let { roomLabel } = $$props;
568
567
 
@@ -585,7 +584,7 @@ function instance$s($$self, $$props, $$invalidate) {
585
584
  class RoomLabelItem extends internal.SvelteComponent {
586
585
  constructor(options) {
587
586
  super();
588
- internal.init(this, options, instance$s, create_fragment$s, internal.safe_not_equal, { five: 2, roomLabel: 0 }, add_css$o);
587
+ internal.init(this, options, instance$u, create_fragment$u, internal.safe_not_equal, { five: 2, roomLabel: 0 }, add_css$p);
589
588
  }
590
589
  }
591
590
 
@@ -593,18 +592,18 @@ class RoomLabelItem extends internal.SvelteComponent {
593
592
 
594
593
  const { Map: Map_1 } = internal.globals;
595
594
 
596
- function add_css$n(target) {
595
+ function add_css$o(target) {
597
596
  internal.append_styles(target, "svelte-9eg4zi", ".room-labels-container.svelte-9eg4zi{width:100%;height:100%;position:relative;color:#fff}");
598
597
  }
599
598
 
600
- function get_each_context$a(ctx, list, i) {
599
+ function get_each_context$c(ctx, list, i) {
601
600
  const child_ctx = ctx.slice();
602
601
  child_ctx[12] = list[i];
603
602
  return child_ctx;
604
603
  }
605
604
 
606
605
  // (82:2) {#each roomLabels as roomLableItem (roomLableItem.id)}
607
- function create_each_block$a(key_1, ctx) {
606
+ function create_each_block$c(key_1, ctx) {
608
607
  let first;
609
608
  let roomlabelitem;
610
609
  let current;
@@ -652,7 +651,7 @@ function create_each_block$a(key_1, ctx) {
652
651
  };
653
652
  }
654
653
 
655
- function create_fragment$r(ctx) {
654
+ function create_fragment$t(ctx) {
656
655
  let div;
657
656
  let each_blocks = [];
658
657
  let each_1_lookup = new Map_1();
@@ -662,9 +661,9 @@ function create_fragment$r(ctx) {
662
661
  const get_key = ctx => /*roomLableItem*/ ctx[12].id;
663
662
 
664
663
  for (let i = 0; i < each_value.length; i += 1) {
665
- let child_ctx = get_each_context$a(ctx, each_value, i);
664
+ let child_ctx = get_each_context$c(ctx, each_value, i);
666
665
  let key = get_key(child_ctx);
667
- each_1_lookup.set(key, each_blocks[i] = create_each_block$a(key, child_ctx));
666
+ each_1_lookup.set(key, each_blocks[i] = create_each_block$c(key, child_ctx));
668
667
  }
669
668
 
670
669
  return {
@@ -692,7 +691,7 @@ function create_fragment$r(ctx) {
692
691
  if (dirty & /*roomLabels, five*/ 3) {
693
692
  each_value = /*roomLabels*/ ctx[0];
694
693
  internal.group_outros();
695
- each_blocks = internal.update_keyed_each(each_blocks, dirty, get_key, 1, ctx, each_value, each_1_lookup, div, internal.outro_and_destroy_block, create_each_block$a, null, get_each_context$a);
694
+ each_blocks = internal.update_keyed_each(each_blocks, dirty, get_key, 1, ctx, each_value, each_1_lookup, div, internal.outro_and_destroy_block, create_each_block$c, null, get_each_context$c);
696
695
  internal.check_outros();
697
696
  }
698
697
  },
@@ -724,7 +723,7 @@ function create_fragment$r(ctx) {
724
723
  };
725
724
  }
726
725
 
727
- function instance$r($$self, $$props, $$invalidate) {
726
+ function instance$t($$self, $$props, $$invalidate) {
728
727
  let rendererSize;
729
728
  let { five } = $$props;
730
729
  let { roomLabels } = $$props;
@@ -849,7 +848,7 @@ function instance$r($$self, $$props, $$invalidate) {
849
848
  class RoomLabelItems extends internal.SvelteComponent {
850
849
  constructor(options) {
851
850
  super();
852
- internal.init(this, options, instance$r, create_fragment$r, internal.safe_not_equal, { five: 1, roomLabels: 0 }, add_css$n);
851
+ internal.init(this, options, instance$t, create_fragment$t, internal.safe_not_equal, { five: 1, roomLabels: 0 }, add_css$o);
853
852
  }
854
853
  }
855
854
 
@@ -1137,11 +1136,11 @@ function rad2Deg$1(rad) {
1137
1136
 
1138
1137
  /* src/floorplan/Components/Camera.svelte generated by Svelte v3.47.0 */
1139
1138
 
1140
- function add_css$m(target) {
1139
+ function add_css$n(target) {
1141
1140
  internal.append_styles(target, "svelte-17cl35n", ".floorplan__camera-position.svelte-17cl35n{position:absolute;width:0;height:0}.floorplan__camera-rotate.svelte-17cl35n{position:absolute;background-repeat:no-repeat;background-size:100%}");
1142
1141
  }
1143
1142
 
1144
- function create_fragment$q(ctx) {
1143
+ function create_fragment$s(ctx) {
1145
1144
  let div1;
1146
1145
  let div0;
1147
1146
 
@@ -1178,7 +1177,7 @@ function create_fragment$q(ctx) {
1178
1177
  };
1179
1178
  }
1180
1179
 
1181
- function instance$q($$self, $$props, $$invalidate) {
1180
+ function instance$s($$self, $$props, $$invalidate) {
1182
1181
  let { panoIndex } = $$props;
1183
1182
  let { floorplanData } = $$props;
1184
1183
  let { lastPanoramaLongitude } = $$props;
@@ -1224,8 +1223,8 @@ class Camera$1 extends internal.SvelteComponent {
1224
1223
  internal.init(
1225
1224
  this,
1226
1225
  options,
1227
- instance$q,
1228
- create_fragment$q,
1226
+ instance$s,
1227
+ create_fragment$s,
1229
1228
  internal.safe_not_equal,
1230
1229
  {
1231
1230
  panoIndex: 5,
@@ -1233,7 +1232,7 @@ class Camera$1 extends internal.SvelteComponent {
1233
1232
  lastPanoramaLongitude: 7,
1234
1233
  cameraImageUrl: 0
1235
1234
  },
1236
- add_css$m
1235
+ add_css$n
1237
1236
  );
1238
1237
  }
1239
1238
  }
@@ -1242,12 +1241,12 @@ const COMPASS_IMAGE = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAArUAAAB7CAM
1242
1241
 
1243
1242
  /* src/floorplan/Components/Compass.svelte generated by Svelte v3.47.0 */
1244
1243
 
1245
- function add_css$l(target) {
1244
+ function add_css$m(target) {
1246
1245
  internal.append_styles(target, "svelte-z9kwkx", ".floorplan-plugin__compass.svelte-z9kwkx{position:absolute;left:50%;top:-2.39583rem;width:12.03125rem;height:2.13542rem;will-change:opacity;transform-origin:center 9.58333rem}.floorplan-plugin__compass-image.svelte-z9kwkx{width:100%;height:100%;position:absolute;left:0;top:0;opacity:0.1;background-repeat:no-repeat;background-size:100% 100%}.floorplan-plugin__compass-text.svelte-z9kwkx{position:absolute;left:50%;top:0.78125rem;transform:translateX(-50%);opacity:0.2;font-weight:bold;font-size:0.52083rem;color:#fff}");
1247
1246
  }
1248
1247
 
1249
1248
  // (14:0) {#if canCompassShow}
1250
- function create_if_block$a(ctx) {
1249
+ function create_if_block$b(ctx) {
1251
1250
  let div1;
1252
1251
  let div0;
1253
1252
  let t0;
@@ -1283,9 +1282,9 @@ function create_if_block$a(ctx) {
1283
1282
  };
1284
1283
  }
1285
1284
 
1286
- function create_fragment$p(ctx) {
1285
+ function create_fragment$r(ctx) {
1287
1286
  let if_block_anchor;
1288
- let if_block = /*canCompassShow*/ ctx[1] && create_if_block$a(ctx);
1287
+ let if_block = /*canCompassShow*/ ctx[1] && create_if_block$b(ctx);
1289
1288
 
1290
1289
  return {
1291
1290
  c() {
@@ -1312,7 +1311,7 @@ function rad2Deg(rad) {
1312
1311
  return rad / Math.PI * 180;
1313
1312
  }
1314
1313
 
1315
- function instance$p($$self, $$props, $$invalidate) {
1314
+ function instance$r($$self, $$props, $$invalidate) {
1316
1315
  var _a;
1317
1316
  let { floorplanData } = $$props;
1318
1317
  let { northDesc } = $$props;
@@ -1336,17 +1335,17 @@ function instance$p($$self, $$props, $$invalidate) {
1336
1335
  class Compass extends internal.SvelteComponent {
1337
1336
  constructor(options) {
1338
1337
  super();
1339
- internal.init(this, options, instance$p, create_fragment$p, internal.safe_not_equal, { floorplanData: 3, northDesc: 0 }, add_css$l);
1338
+ internal.init(this, options, instance$r, create_fragment$r, internal.safe_not_equal, { floorplanData: 3, northDesc: 0 }, add_css$m);
1340
1339
  }
1341
1340
  }
1342
1341
 
1343
1342
  /* src/floorplan/Components/Normalmage.svelte generated by Svelte v3.47.0 */
1344
1343
 
1345
- function add_css$k(target) {
1344
+ function add_css$l(target) {
1346
1345
  internal.append_styles(target, "svelte-1gfoniz", "img.svelte-1gfoniz{width:100%;height:100%}");
1347
1346
  }
1348
1347
 
1349
- function create_fragment$o(ctx) {
1348
+ function create_fragment$q(ctx) {
1350
1349
  let img;
1351
1350
  let img_src_value;
1352
1351
 
@@ -1373,7 +1372,7 @@ function create_fragment$o(ctx) {
1373
1372
  };
1374
1373
  }
1375
1374
 
1376
- function instance$o($$self, $$props, $$invalidate) {
1375
+ function instance$q($$self, $$props, $$invalidate) {
1377
1376
  let { url } = $$props;
1378
1377
 
1379
1378
  $$self.$$set = $$props => {
@@ -1386,17 +1385,17 @@ function instance$o($$self, $$props, $$invalidate) {
1386
1385
  class Normalmage extends internal.SvelteComponent {
1387
1386
  constructor(options) {
1388
1387
  super();
1389
- internal.init(this, options, instance$o, create_fragment$o, internal.safe_not_equal, { url: 0 }, add_css$k);
1388
+ internal.init(this, options, instance$q, create_fragment$q, internal.safe_not_equal, { url: 0 }, add_css$l);
1390
1389
  }
1391
1390
  }
1392
1391
 
1393
1392
  /* src/floorplan/Components/SvgImage.svelte generated by Svelte v3.47.0 */
1394
1393
 
1395
- function add_css$j(target) {
1394
+ function add_css$k(target) {
1396
1395
  internal.append_styles(target, "svelte-ub47ya", ".floorplan-plugin__base-image.svelte-ub47ya{width:100%;height:100%}");
1397
1396
  }
1398
1397
 
1399
- function create_fragment$n(ctx) {
1398
+ function create_fragment$p(ctx) {
1400
1399
  let div;
1401
1400
  let html_tag;
1402
1401
  let t;
@@ -1429,7 +1428,7 @@ function create_fragment$n(ctx) {
1429
1428
  };
1430
1429
  }
1431
1430
 
1432
- function instance$n($$self, $$props, $$invalidate) {
1431
+ function instance$p($$self, $$props, $$invalidate) {
1433
1432
  let { content } = $$props;
1434
1433
 
1435
1434
  const svgStyle = `
@@ -1453,13 +1452,13 @@ function instance$n($$self, $$props, $$invalidate) {
1453
1452
  class SvgImage extends internal.SvelteComponent {
1454
1453
  constructor(options) {
1455
1454
  super();
1456
- internal.init(this, options, instance$n, create_fragment$n, internal.safe_not_equal, { content: 0 }, add_css$j);
1455
+ internal.init(this, options, instance$p, create_fragment$p, internal.safe_not_equal, { content: 0 }, add_css$k);
1457
1456
  }
1458
1457
  }
1459
1458
 
1460
1459
  /* src/floorplan/Components/BaseImage.svelte generated by Svelte v3.47.0 */
1461
1460
 
1462
- function add_css$i(target) {
1461
+ function add_css$j(target) {
1463
1462
  internal.append_styles(target, "svelte-ozpg4a", ".floorplan-plugin__base-image.svelte-ozpg4a{position:absolute;z-index:10;width:100%;height:100%;pointer-events:none}");
1464
1463
  }
1465
1464
 
@@ -1498,7 +1497,7 @@ function create_if_block_1$5(ctx) {
1498
1497
  }
1499
1498
 
1500
1499
  // (11:2) {#if svgContent}
1501
- function create_if_block$9(ctx) {
1500
+ function create_if_block$a(ctx) {
1502
1501
  let svgimage;
1503
1502
  let current;
1504
1503
 
@@ -1534,12 +1533,12 @@ function create_if_block$9(ctx) {
1534
1533
  };
1535
1534
  }
1536
1535
 
1537
- function create_fragment$m(ctx) {
1536
+ function create_fragment$o(ctx) {
1538
1537
  let div;
1539
1538
  let current_block_type_index;
1540
1539
  let if_block;
1541
1540
  let current;
1542
- const if_block_creators = [create_if_block$9, create_if_block_1$5];
1541
+ const if_block_creators = [create_if_block$a, create_if_block_1$5];
1543
1542
  const if_blocks = [];
1544
1543
 
1545
1544
  function select_block_type(ctx, dirty) {
@@ -1622,7 +1621,7 @@ function create_fragment$m(ctx) {
1622
1621
  };
1623
1622
  }
1624
1623
 
1625
- function instance$m($$self, $$props, $$invalidate) {
1624
+ function instance$o($$self, $$props, $$invalidate) {
1626
1625
  let imageData;
1627
1626
  let svgContent;
1628
1627
  var _a, _b;
@@ -1654,13 +1653,13 @@ function instance$m($$self, $$props, $$invalidate) {
1654
1653
  class BaseImage extends internal.SvelteComponent {
1655
1654
  constructor(options) {
1656
1655
  super();
1657
- internal.init(this, options, instance$m, create_fragment$m, internal.safe_not_equal, { floorIndex: 2, floorplanData: 3 }, add_css$i);
1656
+ internal.init(this, options, instance$o, create_fragment$o, internal.safe_not_equal, { floorIndex: 2, floorplanData: 3 }, add_css$j);
1658
1657
  }
1659
1658
  }
1660
1659
 
1661
1660
  /* src/floorplan/Components/RoomLabels/RoomLabel.svelte generated by Svelte v3.47.0 */
1662
1661
 
1663
- function add_css$h(target) {
1662
+ function add_css$i(target) {
1664
1663
  internal.append_styles(target, "svelte-12pzct5", ".floorplan-plugin__room-label-item.svelte-12pzct5{position:absolute;display:flex;flex-flow:column;align-items:center;line-height:1;color:#fff;transform:translate(-50%, -50%);white-space:nowrap;will-change:opacity;transition:opacity 300ms}.floorplan-plugin__room-size.svelte-12pzct5{opacity:0.45}");
1665
1664
  }
1666
1665
 
@@ -1691,7 +1690,7 @@ function create_if_block_1$4(ctx) {
1691
1690
  }
1692
1691
 
1693
1692
  // (89:2) {#if getLabelElement === undefined}
1694
- function create_if_block$8(ctx) {
1693
+ function create_if_block$9(ctx) {
1695
1694
  let span0;
1696
1695
  let t0_value = /*room*/ ctx[0].name + "";
1697
1696
  let t0;
@@ -1725,11 +1724,11 @@ function create_if_block$8(ctx) {
1725
1724
  };
1726
1725
  }
1727
1726
 
1728
- function create_fragment$l(ctx) {
1727
+ function create_fragment$n(ctx) {
1729
1728
  let div;
1730
1729
 
1731
1730
  function select_block_type(ctx, dirty) {
1732
- if (/*getLabelElement*/ ctx[1] === undefined) return create_if_block$8;
1731
+ if (/*getLabelElement*/ ctx[1] === undefined) return create_if_block$9;
1733
1732
  if (/*userConfigElement*/ ctx[4]) return create_if_block_1$4;
1734
1733
  }
1735
1734
 
@@ -1799,7 +1798,7 @@ function isPointInPolygon(point, polygon) {
1799
1798
  return inside;
1800
1799
  }
1801
1800
 
1802
- function instance$l($$self, $$props, $$invalidate) {
1801
+ function instance$n($$self, $$props, $$invalidate) {
1803
1802
  let isLabelInRoom;
1804
1803
  let userConfigElement;
1805
1804
  let labelVisible;
@@ -1943,8 +1942,8 @@ class RoomLabel extends internal.SvelteComponent {
1943
1942
  internal.init(
1944
1943
  this,
1945
1944
  options,
1946
- instance$l,
1947
- create_fragment$l,
1945
+ instance$n,
1946
+ create_fragment$n,
1948
1947
  internal.safe_not_equal,
1949
1948
  {
1950
1949
  pxmm: 9,
@@ -1953,25 +1952,25 @@ class RoomLabel extends internal.SvelteComponent {
1953
1952
  getLabelElement: 1,
1954
1953
  adaptiveRoomLabelVisibleEnable: 11
1955
1954
  },
1956
- add_css$h
1955
+ add_css$i
1957
1956
  );
1958
1957
  }
1959
1958
  }
1960
1959
 
1961
1960
  /* src/floorplan/Components/RoomLabels/RoomLabels.svelte generated by Svelte v3.47.0 */
1962
1961
 
1963
- function add_css$g(target) {
1962
+ function add_css$h(target) {
1964
1963
  internal.append_styles(target, "svelte-13xux0b", ".floorplan-plugin__room-labels.svelte-13xux0b{width:100%;height:100%;position:absolute;left:0;top:0;z-index:20;pointer-events:none}");
1965
1964
  }
1966
1965
 
1967
- function get_each_context$9(ctx, list, i) {
1966
+ function get_each_context$b(ctx, list, i) {
1968
1967
  const child_ctx = ctx.slice();
1969
1968
  child_ctx[9] = list[i];
1970
1969
  return child_ctx;
1971
1970
  }
1972
1971
 
1973
1972
  // (17:0) {#if rooms}
1974
- function create_if_block$7(ctx) {
1973
+ function create_if_block$8(ctx) {
1975
1974
  let div;
1976
1975
  let each_blocks = [];
1977
1976
  let each_1_lookup = new Map();
@@ -1981,9 +1980,9 @@ function create_if_block$7(ctx) {
1981
1980
  const get_key = ctx => /*room*/ ctx[9].id;
1982
1981
 
1983
1982
  for (let i = 0; i < each_value.length; i += 1) {
1984
- let child_ctx = get_each_context$9(ctx, each_value, i);
1983
+ let child_ctx = get_each_context$b(ctx, each_value, i);
1985
1984
  let key = get_key(child_ctx);
1986
- each_1_lookup.set(key, each_blocks[i] = create_each_block$9(key, child_ctx));
1985
+ each_1_lookup.set(key, each_blocks[i] = create_each_block$b(key, child_ctx));
1987
1986
  }
1988
1987
 
1989
1988
  return {
@@ -2011,7 +2010,7 @@ function create_if_block$7(ctx) {
2011
2010
  if (dirty & /*pxmm, rooms, getLabelElement, hoveredRoom, adaptiveRoomLabelVisibleEnable*/ 55) {
2012
2011
  each_value = /*rooms*/ ctx[5];
2013
2012
  internal.group_outros();
2014
- each_blocks = internal.update_keyed_each(each_blocks, dirty, get_key, 1, ctx, each_value, each_1_lookup, div, internal.outro_and_destroy_block, create_each_block$9, null, get_each_context$9);
2013
+ each_blocks = internal.update_keyed_each(each_blocks, dirty, get_key, 1, ctx, each_value, each_1_lookup, div, internal.outro_and_destroy_block, create_each_block$b, null, get_each_context$b);
2015
2014
  internal.check_outros();
2016
2015
  }
2017
2016
  },
@@ -2044,7 +2043,7 @@ function create_if_block$7(ctx) {
2044
2043
  }
2045
2044
 
2046
2045
  // (19:4) {#each rooms as room (room.id)}
2047
- function create_each_block$9(key_1, ctx) {
2046
+ function create_each_block$b(key_1, ctx) {
2048
2047
  let first;
2049
2048
  let roomlabel;
2050
2049
  let current;
@@ -2113,10 +2112,10 @@ function create_each_block$9(key_1, ctx) {
2113
2112
  };
2114
2113
  }
2115
2114
 
2116
- function create_fragment$k(ctx) {
2115
+ function create_fragment$m(ctx) {
2117
2116
  let if_block_anchor;
2118
2117
  let current;
2119
- let if_block = /*rooms*/ ctx[5] && create_if_block$7(ctx);
2118
+ let if_block = /*rooms*/ ctx[5] && create_if_block$8(ctx);
2120
2119
 
2121
2120
  return {
2122
2121
  c() {
@@ -2137,7 +2136,7 @@ function create_fragment$k(ctx) {
2137
2136
  internal.transition_in(if_block, 1);
2138
2137
  }
2139
2138
  } else {
2140
- if_block = create_if_block$7(ctx);
2139
+ if_block = create_if_block$8(ctx);
2141
2140
  if_block.c();
2142
2141
  internal.transition_in(if_block, 1);
2143
2142
  if_block.m(if_block_anchor.parentNode, if_block_anchor);
@@ -2168,7 +2167,7 @@ function create_fragment$k(ctx) {
2168
2167
  };
2169
2168
  }
2170
2169
 
2171
- function instance$k($$self, $$props, $$invalidate) {
2170
+ function instance$m($$self, $$props, $$invalidate) {
2172
2171
  let rooms;
2173
2172
  let { floorIndex } = $$props;
2174
2173
  let { floorplanData } = $$props;
@@ -2225,8 +2224,8 @@ class RoomLabels extends internal.SvelteComponent {
2225
2224
  internal.init(
2226
2225
  this,
2227
2226
  options,
2228
- instance$k,
2229
- create_fragment$k,
2227
+ instance$m,
2228
+ create_fragment$m,
2230
2229
  internal.safe_not_equal,
2231
2230
  {
2232
2231
  floorIndex: 6,
@@ -2235,18 +2234,18 @@ class RoomLabels extends internal.SvelteComponent {
2235
2234
  getLabelElement: 1,
2236
2235
  adaptiveRoomLabelVisibleEnable: 2
2237
2236
  },
2238
- add_css$g
2237
+ add_css$h
2239
2238
  );
2240
2239
  }
2241
2240
  }
2242
2241
 
2243
2242
  /* src/floorplan/Components/RuleLabels/RuleItem.svelte generated by Svelte v3.47.0 */
2244
2243
 
2245
- function add_css$f(target) {
2244
+ function add_css$g(target) {
2246
2245
  internal.append_styles(target, "svelte-xt7p1v", ".floorplan-plugin__rule-labels.svelte-xt7p1v.svelte-xt7p1v{position:absolute;display:flex}.floorplan-plugin__rule-labels--top.svelte-xt7p1v.svelte-xt7p1v{left:0;top:-1.25rem}.floorplan-plugin__rule-labels--bottom.svelte-xt7p1v.svelte-xt7p1v{left:0;bottom:-1.25rem}.floorplan-plugin__rule-labels--left.svelte-xt7p1v.svelte-xt7p1v{top:0;left:-1.25rem}.floorplan-plugin__rule-labels--right.svelte-xt7p1v.svelte-xt7p1v{top:0;right:-1.25rem}.floorplan-plugin__rule-line.svelte-xt7p1v.svelte-xt7p1v{background:#fff;opacity:0.05;width:100%;height:100%}.floorplan-plugin__rule-scale-wrapper.svelte-xt7p1v.svelte-xt7p1v{position:absolute;width:0.3125rem;height:100%;left:50%;top:0;transform:translateX(-50%)}.floorplan-plugin__rule-labels.is-row.svelte-xt7p1v .floorplan-plugin__rule-scale-wrapper.svelte-xt7p1v{width:100%;height:0.3125rem;top:50%;left:0;transform:translateY(-50%)}.floorplan-plugin__rule-scale.svelte-xt7p1v.svelte-xt7p1v{position:absolute;background:#fff;opacity:0.05;width:100%;height:0.0625rem}.floorplan-plugin__rule-labels.is-row.svelte-xt7p1v .floorplan-plugin__rule-scale.svelte-xt7p1v{width:0.0625rem;height:100%}.floorplan-plugin__rule-text-wrapper.svelte-xt7p1v.svelte-xt7p1v{position:absolute}.floorplan-plugin__rule-labels--top.svelte-xt7p1v .floorplan-plugin__rule-text-wrapper.svelte-xt7p1v{width:100%;height:0;top:0.625rem}.floorplan-plugin__rule-labels--bottom.svelte-xt7p1v .floorplan-plugin__rule-text-wrapper.svelte-xt7p1v{width:100%;height:0;bottom:0.625rem}.floorplan-plugin__rule-labels--left.svelte-xt7p1v .floorplan-plugin__rule-text-wrapper.svelte-xt7p1v{width:0;height:100%;left:0.625rem}.floorplan-plugin__rule-labels--right.svelte-xt7p1v .floorplan-plugin__rule-text-wrapper.svelte-xt7p1v{width:0;height:100%;right:0.625rem}.floorplan-plugin__rule-text-item.svelte-xt7p1v.svelte-xt7p1v{width:0;height:0;position:absolute;transform:rotate(90deg)}.floorplan-plugin__rule-labels.is-row.svelte-xt7p1v .floorplan-plugin__rule-text-item.svelte-xt7p1v{transform:rotate(0)}.floorplan-plugin__rule-text.svelte-xt7p1v.svelte-xt7p1v{width:-webkit-max-content;width:-moz-max-content;width:max-content;transform:translate(-50%, -50%);font-size:0.625rem;color:#fff;opacity:0.2}");
2247
2246
  }
2248
2247
 
2249
- function get_each_context$8(ctx, list, i) {
2248
+ function get_each_context$a(ctx, list, i) {
2250
2249
  const child_ctx = ctx.slice();
2251
2250
  child_ctx[10] = list[i];
2252
2251
  child_ctx[12] = i;
@@ -2281,7 +2280,7 @@ function create_each_block_1(ctx) {
2281
2280
  }
2282
2281
 
2283
2282
  // (56:4) {#each rulerTexts as textItem, textItemIndex (textItemIndex)}
2284
- function create_each_block$8(key_1, ctx) {
2283
+ function create_each_block$a(key_1, ctx) {
2285
2284
  let div1;
2286
2285
  let div0;
2287
2286
  let t0_value = /*textItem*/ ctx[10].distance + "";
@@ -2318,7 +2317,7 @@ function create_each_block$8(key_1, ctx) {
2318
2317
  };
2319
2318
  }
2320
2319
 
2321
- function create_fragment$j(ctx) {
2320
+ function create_fragment$l(ctx) {
2322
2321
  let div3;
2323
2322
  let div0;
2324
2323
  let t0;
@@ -2339,9 +2338,9 @@ function create_fragment$j(ctx) {
2339
2338
  const get_key = ctx => /*textItemIndex*/ ctx[12];
2340
2339
 
2341
2340
  for (let i = 0; i < each_value.length; i += 1) {
2342
- let child_ctx = get_each_context$8(ctx, each_value, i);
2341
+ let child_ctx = get_each_context$a(ctx, each_value, i);
2343
2342
  let key = get_key(child_ctx);
2344
- each1_lookup.set(key, each_blocks[i] = create_each_block$8(key, child_ctx));
2343
+ each1_lookup.set(key, each_blocks[i] = create_each_block$a(key, child_ctx));
2345
2344
  }
2346
2345
 
2347
2346
  return {
@@ -2414,7 +2413,7 @@ function create_fragment$j(ctx) {
2414
2413
 
2415
2414
  if (dirty & /*rulerTexts, isRow*/ 10) {
2416
2415
  each_value = /*rulerTexts*/ ctx[3];
2417
- each_blocks = internal.update_keyed_each(each_blocks, dirty, get_key, 1, ctx, each_value, each1_lookup, div2, internal.destroy_block, create_each_block$8, null, get_each_context$8);
2416
+ each_blocks = internal.update_keyed_each(each_blocks, dirty, get_key, 1, ctx, each_value, each1_lookup, div2, internal.destroy_block, create_each_block$a, null, get_each_context$a);
2418
2417
  }
2419
2418
 
2420
2419
  if (dirty & /*type*/ 1 && div3_class_value !== (div3_class_value = "floorplan-plugin__rule-labels floorplan-plugin__rule-labels--" + /*type*/ ctx[0] + " svelte-xt7p1v")) {
@@ -2441,7 +2440,7 @@ function create_fragment$j(ctx) {
2441
2440
  const padding$1 = 1000;
2442
2441
  const exteriorWallOffset$1 = 180;
2443
2442
 
2444
- function instance$j($$self, $$props, $$invalidate) {
2443
+ function instance$l($$self, $$props, $$invalidate) {
2445
2444
  let { type } = $$props;
2446
2445
  let { data } = $$props;
2447
2446
  let { bounding } = $$props;
@@ -2500,17 +2499,17 @@ function instance$j($$self, $$props, $$invalidate) {
2500
2499
  class RuleItem extends internal.SvelteComponent {
2501
2500
  constructor(options) {
2502
2501
  super();
2503
- internal.init(this, options, instance$j, create_fragment$j, internal.safe_not_equal, { type: 0, data: 4, bounding: 5 }, add_css$f);
2502
+ internal.init(this, options, instance$l, create_fragment$l, internal.safe_not_equal, { type: 0, data: 4, bounding: 5 }, add_css$g);
2504
2503
  }
2505
2504
  }
2506
2505
 
2507
2506
  /* src/floorplan/Components/RuleLabels/RuleLabels.svelte generated by Svelte v3.47.0 */
2508
2507
 
2509
- function add_css$e(target) {
2508
+ function add_css$f(target) {
2510
2509
  internal.append_styles(target, "svelte-1mzj9p3", ".floorplan-plugin__rule-labels-wrapper.svelte-1mzj9p3{position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);pointer-events:none}");
2511
2510
  }
2512
2511
 
2513
- function get_each_context$7(ctx, list, i) {
2512
+ function get_each_context$9(ctx, list, i) {
2514
2513
  const child_ctx = ctx.slice();
2515
2514
  child_ctx[12] = list[i][0];
2516
2515
  child_ctx[13] = list[i][1];
@@ -2518,7 +2517,7 @@ function get_each_context$7(ctx, list, i) {
2518
2517
  }
2519
2518
 
2520
2519
  // (19:2) {#each ruleLabelArray as [type, data] (type)}
2521
- function create_each_block$7(key_1, ctx) {
2520
+ function create_each_block$9(key_1, ctx) {
2522
2521
  let first;
2523
2522
  let ruleitem;
2524
2523
  let current;
@@ -2583,7 +2582,7 @@ function create_each_block$7(key_1, ctx) {
2583
2582
  };
2584
2583
  }
2585
2584
 
2586
- function create_fragment$i(ctx) {
2585
+ function create_fragment$k(ctx) {
2587
2586
  let div;
2588
2587
  let each_blocks = [];
2589
2588
  let each_1_lookup = new Map();
@@ -2592,9 +2591,9 @@ function create_fragment$i(ctx) {
2592
2591
  const get_key = ctx => /*type*/ ctx[12];
2593
2592
 
2594
2593
  for (let i = 0; i < each_value.length; i += 1) {
2595
- let child_ctx = get_each_context$7(ctx, each_value, i);
2594
+ let child_ctx = get_each_context$9(ctx, each_value, i);
2596
2595
  let key = get_key(child_ctx);
2597
- each_1_lookup.set(key, each_blocks[i] = create_each_block$7(key, child_ctx));
2596
+ each_1_lookup.set(key, each_blocks[i] = create_each_block$9(key, child_ctx));
2598
2597
  }
2599
2598
 
2600
2599
  return {
@@ -2622,7 +2621,7 @@ function create_fragment$i(ctx) {
2622
2621
  if (dirty & /*ruleLabelArray, bounding*/ 9) {
2623
2622
  each_value = /*ruleLabelArray*/ ctx[3];
2624
2623
  internal.group_outros();
2625
- each_blocks = internal.update_keyed_each(each_blocks, dirty, get_key, 1, ctx, each_value, each_1_lookup, div, internal.outro_and_destroy_block, create_each_block$7, null, get_each_context$7);
2624
+ each_blocks = internal.update_keyed_each(each_blocks, dirty, get_key, 1, ctx, each_value, each_1_lookup, div, internal.outro_and_destroy_block, create_each_block$9, null, get_each_context$9);
2626
2625
  internal.check_outros();
2627
2626
  }
2628
2627
 
@@ -2663,7 +2662,7 @@ function create_fragment$i(ctx) {
2663
2662
  const padding = 1000;
2664
2663
  const exteriorWallOffset = 180;
2665
2664
 
2666
- function instance$i($$self, $$props, $$invalidate) {
2665
+ function instance$k($$self, $$props, $$invalidate) {
2667
2666
  let bounding;
2668
2667
  let ruleLabelData;
2669
2668
  let ruleLabelDataKeys;
@@ -2743,7 +2742,7 @@ function instance$i($$self, $$props, $$invalidate) {
2743
2742
  class RuleLabels extends internal.SvelteComponent {
2744
2743
  constructor(options) {
2745
2744
  super();
2746
- internal.init(this, options, instance$i, create_fragment$i, internal.safe_not_equal, { floorIndex: 4, floorplanData: 5 }, add_css$e);
2745
+ internal.init(this, options, instance$k, create_fragment$k, internal.safe_not_equal, { floorIndex: 4, floorplanData: 5 }, add_css$f);
2747
2746
  }
2748
2747
  }
2749
2748
 
@@ -2800,7 +2799,7 @@ function getFloorIndexFromModelPosition(position, five) {
2800
2799
 
2801
2800
  /* src/floorplan/Components/RoomMaterials/RoomMaterial_0.svelte generated by Svelte v3.47.0 */
2802
2801
 
2803
- function create_fragment$h(ctx) {
2802
+ function create_fragment$j(ctx) {
2804
2803
  let path_1;
2805
2804
 
2806
2805
  return {
@@ -2825,7 +2824,7 @@ function create_fragment$h(ctx) {
2825
2824
  };
2826
2825
  }
2827
2826
 
2828
- function instance$h($$self, $$props, $$invalidate) {
2827
+ function instance$j($$self, $$props, $$invalidate) {
2829
2828
  let d;
2830
2829
  let { path } = $$props;
2831
2830
 
@@ -2845,13 +2844,13 @@ function instance$h($$self, $$props, $$invalidate) {
2845
2844
  class RoomMaterial_0 extends internal.SvelteComponent {
2846
2845
  constructor(options) {
2847
2846
  super();
2848
- internal.init(this, options, instance$h, create_fragment$h, internal.safe_not_equal, { path: 1 });
2847
+ internal.init(this, options, instance$j, create_fragment$j, internal.safe_not_equal, { path: 1 });
2849
2848
  }
2850
2849
  }
2851
2850
 
2852
2851
  /* src/floorplan/Components/RoomMaterials/RoomMaterial_1.svelte generated by Svelte v3.47.0 */
2853
2852
 
2854
- function create_fragment$g(ctx) {
2853
+ function create_fragment$i(ctx) {
2855
2854
  let defs;
2856
2855
  let pattern;
2857
2856
  let rect;
@@ -2912,7 +2911,7 @@ function create_fragment$g(ctx) {
2912
2911
 
2913
2912
  const halfWidth = 6;
2914
2913
 
2915
- function instance$g($$self, $$props, $$invalidate) {
2914
+ function instance$i($$self, $$props, $$invalidate) {
2916
2915
  let d;
2917
2916
  let { path } = $$props;
2918
2917
  const width = halfWidth * 2;
@@ -2934,13 +2933,13 @@ function instance$g($$self, $$props, $$invalidate) {
2934
2933
  class RoomMaterial_1 extends internal.SvelteComponent {
2935
2934
  constructor(options) {
2936
2935
  super();
2937
- internal.init(this, options, instance$g, create_fragment$g, internal.safe_not_equal, { path: 3 });
2936
+ internal.init(this, options, instance$i, create_fragment$i, internal.safe_not_equal, { path: 3 });
2938
2937
  }
2939
2938
  }
2940
2939
 
2941
2940
  /* src/floorplan/Components/RoomMaterials/RoomMaterial_2.svelte generated by Svelte v3.47.0 */
2942
2941
 
2943
- function create_fragment$f(ctx) {
2942
+ function create_fragment$h(ctx) {
2944
2943
  let defs;
2945
2944
  let pattern0;
2946
2945
  let rect0;
@@ -3041,7 +3040,7 @@ function create_fragment$f(ctx) {
3041
3040
  };
3042
3041
  }
3043
3042
 
3044
- function instance$f($$self, $$props, $$invalidate) {
3043
+ function instance$h($$self, $$props, $$invalidate) {
3045
3044
  let d;
3046
3045
  let { path } = $$props;
3047
3046
 
@@ -3061,24 +3060,24 @@ function instance$f($$self, $$props, $$invalidate) {
3061
3060
  class RoomMaterial_2 extends internal.SvelteComponent {
3062
3061
  constructor(options) {
3063
3062
  super();
3064
- internal.init(this, options, instance$f, create_fragment$f, internal.safe_not_equal, { path: 1 });
3063
+ internal.init(this, options, instance$h, create_fragment$h, internal.safe_not_equal, { path: 1 });
3065
3064
  }
3066
3065
  }
3067
3066
 
3068
3067
  /* src/floorplan/Components/RoomMaterials/RoomMaterial.svelte generated by Svelte v3.47.0 */
3069
3068
 
3070
- function add_css$d(target) {
3069
+ function add_css$e(target) {
3071
3070
  internal.append_styles(target, "svelte-1dykexu", ".floorplan-plugin__room-material.svelte-1dykexu{position:absolute;left:0;top:0;width:100%;height:100%}svg.svelte-1dykexu{position:absolute;left:0;top:0;width:100%;height:100%;overflow:visible}");
3072
3071
  }
3073
3072
 
3074
- function get_each_context$6(ctx, list, i) {
3073
+ function get_each_context$8(ctx, list, i) {
3075
3074
  const child_ctx = ctx.slice();
3076
3075
  child_ctx[5] = list[i];
3077
3076
  return child_ctx;
3078
3077
  }
3079
3078
 
3080
3079
  // (19:6) {:else}
3081
- function create_else_block(ctx) {
3080
+ function create_else_block$1(ctx) {
3082
3081
  let roommaterial_1;
3083
3082
  let current;
3084
3083
  roommaterial_1 = new RoomMaterial_1({ props: { path: /*room*/ ctx[5].path } });
@@ -3146,7 +3145,7 @@ function create_if_block_1$3(ctx) {
3146
3145
  }
3147
3146
 
3148
3147
  // (15:6) {#if room.floorType === 1}
3149
- function create_if_block$6(ctx) {
3148
+ function create_if_block$7(ctx) {
3150
3149
  let roommaterial_0;
3151
3150
  let current;
3152
3151
  roommaterial_0 = new RoomMaterial_0({ props: { path: /*room*/ ctx[5].path } });
@@ -3180,13 +3179,13 @@ function create_if_block$6(ctx) {
3180
3179
  }
3181
3180
 
3182
3181
  // (13:2) {#each rooms as room}
3183
- function create_each_block$6(ctx) {
3182
+ function create_each_block$8(ctx) {
3184
3183
  let svg;
3185
3184
  let current_block_type_index;
3186
3185
  let if_block;
3187
3186
  let svg_viewBox_value;
3188
3187
  let current;
3189
- const if_block_creators = [create_if_block$6, create_if_block_1$3, create_else_block];
3188
+ const if_block_creators = [create_if_block$7, create_if_block_1$3, create_else_block$1];
3190
3189
  const if_blocks = [];
3191
3190
 
3192
3191
  function select_block_type(ctx, dirty) {
@@ -3255,14 +3254,14 @@ function create_each_block$6(ctx) {
3255
3254
  };
3256
3255
  }
3257
3256
 
3258
- function create_fragment$e(ctx) {
3257
+ function create_fragment$g(ctx) {
3259
3258
  let div;
3260
3259
  let current;
3261
3260
  let each_value = /*rooms*/ ctx[0];
3262
3261
  let each_blocks = [];
3263
3262
 
3264
3263
  for (let i = 0; i < each_value.length; i += 1) {
3265
- each_blocks[i] = create_each_block$6(get_each_context$6(ctx, each_value, i));
3264
+ each_blocks[i] = create_each_block$8(get_each_context$8(ctx, each_value, i));
3266
3265
  }
3267
3266
 
3268
3267
  const out = i => internal.transition_out(each_blocks[i], 1, 1, () => {
@@ -3294,13 +3293,13 @@ function create_fragment$e(ctx) {
3294
3293
  let i;
3295
3294
 
3296
3295
  for (i = 0; i < each_value.length; i += 1) {
3297
- const child_ctx = get_each_context$6(ctx, each_value, i);
3296
+ const child_ctx = get_each_context$8(ctx, each_value, i);
3298
3297
 
3299
3298
  if (each_blocks[i]) {
3300
3299
  each_blocks[i].p(child_ctx, dirty);
3301
3300
  internal.transition_in(each_blocks[i], 1);
3302
3301
  } else {
3303
- each_blocks[i] = create_each_block$6(child_ctx);
3302
+ each_blocks[i] = create_each_block$8(child_ctx);
3304
3303
  each_blocks[i].c();
3305
3304
  internal.transition_in(each_blocks[i], 1);
3306
3305
  each_blocks[i].m(div, null);
@@ -3341,7 +3340,7 @@ function create_fragment$e(ctx) {
3341
3340
  };
3342
3341
  }
3343
3342
 
3344
- function instance$e($$self, $$props, $$invalidate) {
3343
+ function instance$g($$self, $$props, $$invalidate) {
3345
3344
  let rooms;
3346
3345
  let { floorIndex } = $$props;
3347
3346
  let { floorplanData } = $$props;
@@ -3367,17 +3366,17 @@ function instance$e($$self, $$props, $$invalidate) {
3367
3366
  class RoomMaterial extends internal.SvelteComponent {
3368
3367
  constructor(options) {
3369
3368
  super();
3370
- internal.init(this, options, instance$e, create_fragment$e, internal.safe_not_equal, { floorIndex: 3, floorplanData: 4 }, add_css$d);
3369
+ internal.init(this, options, instance$g, create_fragment$g, internal.safe_not_equal, { floorIndex: 3, floorplanData: 4 }, add_css$e);
3371
3370
  }
3372
3371
  }
3373
3372
 
3374
3373
  /* src/floorplan/Components/RoomHighlight/Room.svelte generated by Svelte v3.47.0 */
3375
3374
 
3376
- function add_css$c(target) {
3375
+ function add_css$d(target) {
3377
3376
  internal.append_styles(target, "svelte-19uvvss", "path.svelte-19uvvss{opacity:0}path.svelte-19uvvss:hover{opacity:0.1}");
3378
3377
  }
3379
3378
 
3380
- function create_fragment$d(ctx) {
3379
+ function create_fragment$f(ctx) {
3381
3380
  let path;
3382
3381
  let mounted;
3383
3382
  let dispose;
@@ -3412,7 +3411,7 @@ function create_fragment$d(ctx) {
3412
3411
  };
3413
3412
  }
3414
3413
 
3415
- function instance$d($$self, $$props, $$invalidate) {
3414
+ function instance$f($$self, $$props, $$invalidate) {
3416
3415
  let { room } = $$props;
3417
3416
  let { floorplanData } = $$props;
3418
3417
  let { hoveredRoom } = $$props;
@@ -3448,33 +3447,33 @@ class Room extends internal.SvelteComponent {
3448
3447
  internal.init(
3449
3448
  this,
3450
3449
  options,
3451
- instance$d,
3452
- create_fragment$d,
3450
+ instance$f,
3451
+ create_fragment$f,
3453
3452
  internal.safe_not_equal,
3454
3453
  {
3455
3454
  room: 3,
3456
3455
  floorplanData: 4,
3457
3456
  hoveredRoom: 5
3458
3457
  },
3459
- add_css$c
3458
+ add_css$d
3460
3459
  );
3461
3460
  }
3462
3461
  }
3463
3462
 
3464
3463
  /* src/floorplan/Components/RoomHighlight/RoomHighlight.svelte generated by Svelte v3.47.0 */
3465
3464
 
3466
- function add_css$b(target) {
3465
+ function add_css$c(target) {
3467
3466
  internal.append_styles(target, "svelte-1kqo6e4", ".floorplan-plugin__room-highlight.svelte-1kqo6e4{position:absolute;width:100%;height:100%}svg.svelte-1kqo6e4{width:100%;height:100%;overflow:visible}");
3468
3467
  }
3469
3468
 
3470
- function get_each_context$5(ctx, list, i) {
3469
+ function get_each_context$7(ctx, list, i) {
3471
3470
  const child_ctx = ctx.slice();
3472
3471
  child_ctx[5] = list[i];
3473
3472
  return child_ctx;
3474
3473
  }
3475
3474
 
3476
3475
  // (11:4) {#each floorplanData.floorDatas[floorIndex].rooms as room (room.id)}
3477
- function create_each_block$5(key_1, ctx) {
3476
+ function create_each_block$7(key_1, ctx) {
3478
3477
  let first;
3479
3478
  let room;
3480
3479
  let current;
@@ -3539,7 +3538,7 @@ function create_each_block$5(key_1, ctx) {
3539
3538
  };
3540
3539
  }
3541
3540
 
3542
- function create_fragment$c(ctx) {
3541
+ function create_fragment$e(ctx) {
3543
3542
  let div;
3544
3543
  let svg;
3545
3544
  let each_blocks = [];
@@ -3549,9 +3548,9 @@ function create_fragment$c(ctx) {
3549
3548
  const get_key = ctx => /*room*/ ctx[5].id;
3550
3549
 
3551
3550
  for (let i = 0; i < each_value.length; i += 1) {
3552
- let child_ctx = get_each_context$5(ctx, each_value, i);
3551
+ let child_ctx = get_each_context$7(ctx, each_value, i);
3553
3552
  let key = get_key(child_ctx);
3554
- each_1_lookup.set(key, each_blocks[i] = create_each_block$5(key, child_ctx));
3553
+ each_1_lookup.set(key, each_blocks[i] = create_each_block$7(key, child_ctx));
3555
3554
  }
3556
3555
 
3557
3556
  return {
@@ -3583,7 +3582,7 @@ function create_fragment$c(ctx) {
3583
3582
  if (dirty & /*floorplanData, floorIndex, hoveredRoom*/ 7) {
3584
3583
  each_value = /*floorplanData*/ ctx[1].floorDatas[/*floorIndex*/ ctx[0]].rooms;
3585
3584
  internal.group_outros();
3586
- each_blocks = internal.update_keyed_each(each_blocks, dirty, get_key, 1, ctx, each_value, each_1_lookup, svg, internal.outro_and_destroy_block, create_each_block$5, null, get_each_context$5);
3585
+ each_blocks = internal.update_keyed_each(each_blocks, dirty, get_key, 1, ctx, each_value, each_1_lookup, svg, internal.outro_and_destroy_block, create_each_block$7, null, get_each_context$7);
3587
3586
  internal.check_outros();
3588
3587
  }
3589
3588
  },
@@ -3613,7 +3612,7 @@ function create_fragment$c(ctx) {
3613
3612
  };
3614
3613
  }
3615
3614
 
3616
- function instance$c($$self, $$props, $$invalidate) {
3615
+ function instance$e($$self, $$props, $$invalidate) {
3617
3616
  let { floorIndex } = $$props;
3618
3617
  let { floorplanData } = $$props;
3619
3618
  let { hoveredRoom } = $$props;
@@ -3636,22 +3635,22 @@ class RoomHighlight extends internal.SvelteComponent {
3636
3635
  internal.init(
3637
3636
  this,
3638
3637
  options,
3639
- instance$c,
3640
- create_fragment$c,
3638
+ instance$e,
3639
+ create_fragment$e,
3641
3640
  internal.safe_not_equal,
3642
3641
  {
3643
3642
  floorIndex: 0,
3644
3643
  floorplanData: 1,
3645
3644
  hoveredRoom: 2
3646
3645
  },
3647
- add_css$b
3646
+ add_css$c
3648
3647
  );
3649
3648
  }
3650
3649
  }
3651
3650
 
3652
3651
  /* src/floorplan/Components/CurrentFloor.svelte generated by Svelte v3.47.0 */
3653
3652
 
3654
- function add_css$a(target) {
3653
+ function add_css$b(target) {
3655
3654
  internal.append_styles(target, "svelte-bl8zrz", ".floorplan-plugin__floor.svelte-bl8zrz{position:absolute;left:0;top:0;width:100%;height:100%;opacity:0;pointer-events:none}.floorplan-plugin__floor--is-current.svelte-bl8zrz{opacity:1;pointer-events:auto}");
3656
3655
  }
3657
3656
 
@@ -3774,7 +3773,7 @@ function create_if_block_1$2(ctx) {
3774
3773
  }
3775
3774
 
3776
3775
  // (27:2) {#if ruleLabelsEnable}
3777
- function create_if_block$5(ctx) {
3776
+ function create_if_block$6(ctx) {
3778
3777
  let rulelabels;
3779
3778
  let current;
3780
3779
 
@@ -3828,7 +3827,7 @@ function create_if_block$5(ctx) {
3828
3827
  };
3829
3828
  }
3830
3829
 
3831
- function create_fragment$b(ctx) {
3830
+ function create_fragment$d(ctx) {
3832
3831
  let div;
3833
3832
  let roommaterial;
3834
3833
  let t0;
@@ -3870,7 +3869,7 @@ function create_fragment$b(ctx) {
3870
3869
 
3871
3870
  baseimage = new BaseImage({ props: baseimage_props });
3872
3871
  let if_block1 = /*roomLabelsEnable*/ ctx[3] && create_if_block_1$2(ctx);
3873
- let if_block2 = /*ruleLabelsEnable*/ ctx[4] && create_if_block$5(ctx);
3872
+ let if_block2 = /*ruleLabelsEnable*/ ctx[4] && create_if_block$6(ctx);
3874
3873
 
3875
3874
  return {
3876
3875
  c() {
@@ -3979,7 +3978,7 @@ function create_fragment$b(ctx) {
3979
3978
  internal.transition_in(if_block2, 1);
3980
3979
  }
3981
3980
  } else {
3982
- if_block2 = create_if_block$5(ctx);
3981
+ if_block2 = create_if_block$6(ctx);
3983
3982
  if_block2.c();
3984
3983
  internal.transition_in(if_block2, 1);
3985
3984
  if_block2.m(div, null);
@@ -4028,7 +4027,7 @@ function create_fragment$b(ctx) {
4028
4027
  };
4029
4028
  }
4030
4029
 
4031
- function instance$b($$self, $$props, $$invalidate) {
4030
+ function instance$d($$self, $$props, $$invalidate) {
4032
4031
  let { isCurrent } = $$props;
4033
4032
  let { floorIndex } = $$props;
4034
4033
  let { hoverEnable } = $$props;
@@ -4070,8 +4069,8 @@ class CurrentFloor$1 extends internal.SvelteComponent {
4070
4069
  internal.init(
4071
4070
  this,
4072
4071
  options,
4073
- instance$b,
4074
- create_fragment$b,
4072
+ instance$d,
4073
+ create_fragment$d,
4075
4074
  internal.safe_not_equal,
4076
4075
  {
4077
4076
  isCurrent: 0,
@@ -4083,25 +4082,25 @@ class CurrentFloor$1 extends internal.SvelteComponent {
4083
4082
  getLabelElement: 6,
4084
4083
  adaptiveRoomLabelVisibleEnable: 7
4085
4084
  },
4086
- add_css$a
4085
+ add_css$b
4087
4086
  );
4088
4087
  }
4089
4088
  }
4090
4089
 
4091
4090
  /* src/floorplan/Components/Main.svelte generated by Svelte v3.47.0 */
4092
4091
 
4093
- function add_css$9(target) {
4092
+ function add_css$a(target) {
4094
4093
  internal.append_styles(target, "svelte-86bqav", ".floorplan-main.svelte-86bqav{width:100%;height:100%;pointer-events:none}");
4095
4094
  }
4096
4095
 
4097
- function get_each_context$4(ctx, list, i) {
4096
+ function get_each_context$6(ctx, list, i) {
4098
4097
  const child_ctx = ctx.slice();
4099
4098
  child_ctx[14] = list[i];
4100
4099
  return child_ctx;
4101
4100
  }
4102
4101
 
4103
4102
  // (22:0) {#if visible}
4104
- function create_if_block$4(ctx) {
4103
+ function create_if_block$5(ctx) {
4105
4104
  let div;
4106
4105
  let t0;
4107
4106
  let camera;
@@ -4112,7 +4111,7 @@ function create_if_block$4(ctx) {
4112
4111
  let each_blocks = [];
4113
4112
 
4114
4113
  for (let i = 0; i < each_value.length; i += 1) {
4115
- each_blocks[i] = create_each_block$4(get_each_context$4(ctx, each_value, i));
4114
+ each_blocks[i] = create_each_block$6(get_each_context$6(ctx, each_value, i));
4116
4115
  }
4117
4116
 
4118
4117
  const out = i => internal.transition_out(each_blocks[i], 1, 1, () => {
@@ -4172,13 +4171,13 @@ function create_if_block$4(ctx) {
4172
4171
  let i;
4173
4172
 
4174
4173
  for (i = 0; i < each_value.length; i += 1) {
4175
- const child_ctx = get_each_context$4(ctx, each_value, i);
4174
+ const child_ctx = get_each_context$6(ctx, each_value, i);
4176
4175
 
4177
4176
  if (each_blocks[i]) {
4178
4177
  each_blocks[i].p(child_ctx, dirty);
4179
4178
  internal.transition_in(each_blocks[i], 1);
4180
4179
  } else {
4181
- each_blocks[i] = create_each_block$4(child_ctx);
4180
+ each_blocks[i] = create_each_block$6(child_ctx);
4182
4181
  each_blocks[i].c();
4183
4182
  internal.transition_in(each_blocks[i], 1);
4184
4183
  each_blocks[i].m(div, t0);
@@ -4274,7 +4273,7 @@ function create_if_block$4(ctx) {
4274
4273
  }
4275
4274
 
4276
4275
  // (24:4) {#each floorplanData.floorDatas as floorData}
4277
- function create_each_block$4(ctx) {
4276
+ function create_each_block$6(ctx) {
4278
4277
  let currentfloor;
4279
4278
  let current;
4280
4279
 
@@ -4389,10 +4388,10 @@ function create_if_block_1$1(ctx) {
4389
4388
  };
4390
4389
  }
4391
4390
 
4392
- function create_fragment$a(ctx) {
4391
+ function create_fragment$c(ctx) {
4393
4392
  let if_block_anchor;
4394
4393
  let current;
4395
- let if_block = /*visible*/ ctx[1] && create_if_block$4(ctx);
4394
+ let if_block = /*visible*/ ctx[1] && create_if_block$5(ctx);
4396
4395
 
4397
4396
  return {
4398
4397
  c() {
@@ -4413,7 +4412,7 @@ function create_fragment$a(ctx) {
4413
4412
  internal.transition_in(if_block, 1);
4414
4413
  }
4415
4414
  } else {
4416
- if_block = create_if_block$4(ctx);
4415
+ if_block = create_if_block$5(ctx);
4417
4416
  if_block.c();
4418
4417
  internal.transition_in(if_block, 1);
4419
4418
  if_block.m(if_block_anchor.parentNode, if_block_anchor);
@@ -4444,7 +4443,7 @@ function create_fragment$a(ctx) {
4444
4443
  };
4445
4444
  }
4446
4445
 
4447
- function instance$a($$self, $$props, $$invalidate) {
4446
+ function instance$c($$self, $$props, $$invalidate) {
4448
4447
  let { duration = 0 } = $$props;
4449
4448
  let { visible } = $$props;
4450
4449
  let { northDesc } = $$props;
@@ -4502,8 +4501,8 @@ class Main$1 extends internal.SvelteComponent {
4502
4501
  internal.init(
4503
4502
  this,
4504
4503
  options,
4505
- instance$a,
4506
- create_fragment$a,
4504
+ instance$c,
4505
+ create_fragment$c,
4507
4506
  internal.safe_not_equal,
4508
4507
  {
4509
4508
  duration: 0,
@@ -4521,7 +4520,7 @@ class Main$1 extends internal.SvelteComponent {
4521
4520
  getLabelElement: 12,
4522
4521
  adaptiveRoomLabelVisibleEnable: 13
4523
4522
  },
4524
- add_css$9
4523
+ add_css$a
4525
4524
  );
4526
4525
  }
4527
4526
  }
@@ -4653,7 +4652,7 @@ function omit(object, props) {
4653
4652
  /**
4654
4653
  * plugin 的基本控制器
4655
4654
  */
4656
- class Controller$4 {
4655
+ class Controller$5 {
4657
4656
  constructor(five$1) {
4658
4657
  Object.defineProperty(this, "five", {
4659
4658
  enumerable: true,
@@ -4680,7 +4679,7 @@ class Controller$4 {
4680
4679
  }
4681
4680
  }
4682
4681
 
4683
- class Controller$3 extends Controller$4 {
4682
+ class Controller$4 extends Controller$5 {
4684
4683
  }
4685
4684
 
4686
4685
  /**
@@ -4783,7 +4782,7 @@ function changeModelCanvasOpacity(five, opacity, duration = 300) {
4783
4782
  });
4784
4783
  }
4785
4784
 
4786
- class Controller$2 extends Controller$3 {
4785
+ class Controller$3 extends Controller$4 {
4787
4786
  constructor(five, params) {
4788
4787
  super(five);
4789
4788
  // =============== public properties =================
@@ -5260,7 +5259,7 @@ class Controller$2 extends Controller$3 {
5260
5259
  }
5261
5260
 
5262
5261
  const TopviewFloorplanPlugin = (five, params) => {
5263
- return new Controller$2(five, params);
5262
+ return new Controller$3(five, params);
5264
5263
  };
5265
5264
 
5266
5265
  /**
@@ -5284,11 +5283,11 @@ function throttle(func, wait = 200) {
5284
5283
 
5285
5284
  /* src/floorplan/PanoFloorplanRadarPlugin/Components/Camera.svelte generated by Svelte v3.47.0 */
5286
5285
 
5287
- function add_css$8(target) {
5286
+ function add_css$9(target) {
5288
5287
  internal.append_styles(target, "svelte-1ty3s4p", ".plugin-radar__camera-wrapper.svelte-1ty3s4p{width:100%;height:100%;position:absolute;pointer-events:none}.plugin-radar__camera-position.svelte-1ty3s4p{position:absolute;left:0;top:0;width:0;height:0;transform:none;pointer-events:none;transition:transform 1s linear}.plugin-radar__camera-rotate.svelte-1ty3s4p{position:absolute;left:-0.78125rem;top:-0.78125rem;width:0.88542rem;height:0.88542rem;transform-origin:0.78125rem 0.78125rem;transform:rotate(45deg);background-repeat:no-repeat;background-size:100%}");
5289
5288
  }
5290
5289
 
5291
- function create_fragment$9(ctx) {
5290
+ function create_fragment$b(ctx) {
5292
5291
  let div2;
5293
5292
  let div1;
5294
5293
  let div0;
@@ -5338,7 +5337,7 @@ function getCameraRotateTransform(longitude) {
5338
5337
  return `rotate(${rotate}deg)`;
5339
5338
  }
5340
5339
 
5341
- function instance$9($$self, $$props, $$invalidate) {
5340
+ function instance$b($$self, $$props, $$invalidate) {
5342
5341
  let positionTransform;
5343
5342
  let rotateTransform;
5344
5343
  let { five } = $$props;
@@ -5418,8 +5417,8 @@ class Camera extends internal.SvelteComponent {
5418
5417
  internal.init(
5419
5418
  this,
5420
5419
  options,
5421
- instance$9,
5422
- create_fragment$9,
5420
+ instance$b,
5421
+ create_fragment$b,
5423
5422
  internal.safe_not_equal,
5424
5423
  {
5425
5424
  five: 3,
@@ -5427,25 +5426,25 @@ class Camera extends internal.SvelteComponent {
5427
5426
  floorplanData: 5,
5428
5427
  cameraImageUrl: 0
5429
5428
  },
5430
- add_css$8
5429
+ add_css$9
5431
5430
  );
5432
5431
  }
5433
5432
  }
5434
5433
 
5435
5434
  /* src/floorplan/PanoFloorplanRadarPlugin/Components/CurrentFloor/ExtraObjects.svelte generated by Svelte v3.47.0 */
5436
5435
 
5437
- function add_css$7(target) {
5436
+ function add_css$8(target) {
5438
5437
  internal.append_styles(target, "svelte-1i87fz7", ".plugin-pano-floorplan__extra-objects.svelte-1i87fz7{position:absolute;top:0;left:0;width:100%;height:100%;pointer-events:none}.plugin-pano-floorplan__extra-object-item--position.svelte-1i87fz7{position:absolute;width:0;height:0}.plugin-pano-floorplan__extra-object-item.svelte-1i87fz7{transform:translate(-50%, -50%)}");
5439
5438
  }
5440
5439
 
5441
- function get_each_context$3(ctx, list, i) {
5440
+ function get_each_context$5(ctx, list, i) {
5442
5441
  const child_ctx = ctx.slice();
5443
5442
  child_ctx[1] = list[i];
5444
5443
  return child_ctx;
5445
5444
  }
5446
5445
 
5447
5446
  // (5:2) {#each extraObjects as extraObject (extraObject.id)}
5448
- function create_each_block$3(key_1, ctx) {
5447
+ function create_each_block$5(key_1, ctx) {
5449
5448
  let div1;
5450
5449
  let div0;
5451
5450
  let style_width = `${/*extraObject*/ ctx[1].icon.width / 16}rem`;
@@ -5504,7 +5503,7 @@ function create_each_block$3(key_1, ctx) {
5504
5503
  };
5505
5504
  }
5506
5505
 
5507
- function create_fragment$8(ctx) {
5506
+ function create_fragment$a(ctx) {
5508
5507
  let div;
5509
5508
  let each_blocks = [];
5510
5509
  let each_1_lookup = new Map();
@@ -5512,9 +5511,9 @@ function create_fragment$8(ctx) {
5512
5511
  const get_key = ctx => /*extraObject*/ ctx[1].id;
5513
5512
 
5514
5513
  for (let i = 0; i < each_value.length; i += 1) {
5515
- let child_ctx = get_each_context$3(ctx, each_value, i);
5514
+ let child_ctx = get_each_context$5(ctx, each_value, i);
5516
5515
  let key = get_key(child_ctx);
5517
- each_1_lookup.set(key, each_blocks[i] = create_each_block$3(key, child_ctx));
5516
+ each_1_lookup.set(key, each_blocks[i] = create_each_block$5(key, child_ctx));
5518
5517
  }
5519
5518
 
5520
5519
  return {
@@ -5537,7 +5536,7 @@ function create_fragment$8(ctx) {
5537
5536
  p(ctx, [dirty]) {
5538
5537
  if (dirty & /*extraObjects*/ 1) {
5539
5538
  each_value = /*extraObjects*/ ctx[0];
5540
- each_blocks = internal.update_keyed_each(each_blocks, dirty, get_key, 1, ctx, each_value, each_1_lookup, div, internal.destroy_block, create_each_block$3, null, get_each_context$3);
5539
+ each_blocks = internal.update_keyed_each(each_blocks, dirty, get_key, 1, ctx, each_value, each_1_lookup, div, internal.destroy_block, create_each_block$5, null, get_each_context$5);
5541
5540
  }
5542
5541
  },
5543
5542
  i: internal.noop,
@@ -5552,7 +5551,7 @@ function create_fragment$8(ctx) {
5552
5551
  };
5553
5552
  }
5554
5553
 
5555
- function instance$8($$self, $$props, $$invalidate) {
5554
+ function instance$a($$self, $$props, $$invalidate) {
5556
5555
  let { extraObjects = [] } = $$props;
5557
5556
 
5558
5557
  $$self.$$set = $$props => {
@@ -5565,13 +5564,13 @@ function instance$8($$self, $$props, $$invalidate) {
5565
5564
  class ExtraObjects extends internal.SvelteComponent {
5566
5565
  constructor(options) {
5567
5566
  super();
5568
- internal.init(this, options, instance$8, create_fragment$8, internal.safe_not_equal, { extraObjects: 0 }, add_css$7);
5567
+ internal.init(this, options, instance$a, create_fragment$a, internal.safe_not_equal, { extraObjects: 0 }, add_css$8);
5569
5568
  }
5570
5569
  }
5571
5570
 
5572
5571
  /* src/floorplan/PanoFloorplanRadarPlugin/Components/CurrentFloor/CurrentFloor.svelte generated by Svelte v3.47.0 */
5573
5572
 
5574
- function create_if_block$3(ctx) {
5573
+ function create_if_block$4(ctx) {
5575
5574
  let highlight;
5576
5575
  let current;
5577
5576
 
@@ -5631,7 +5630,7 @@ function create_if_block$3(ctx) {
5631
5630
  };
5632
5631
  }
5633
5632
 
5634
- function create_fragment$7(ctx) {
5633
+ function create_fragment$9(ctx) {
5635
5634
  let baseimage;
5636
5635
  let t0;
5637
5636
  let extraobjects;
@@ -5660,7 +5659,7 @@ function create_fragment$7(ctx) {
5660
5659
  }
5661
5660
  });
5662
5661
 
5663
- let if_block = /*hoverEnable*/ ctx[3] && create_if_block$3(ctx);
5662
+ let if_block = /*hoverEnable*/ ctx[3] && create_if_block$4(ctx);
5664
5663
 
5665
5664
  return {
5666
5665
  c() {
@@ -5703,7 +5702,7 @@ function create_fragment$7(ctx) {
5703
5702
  internal.transition_in(if_block, 1);
5704
5703
  }
5705
5704
  } else {
5706
- if_block = create_if_block$3(ctx);
5705
+ if_block = create_if_block$4(ctx);
5707
5706
  if_block.c();
5708
5707
  internal.transition_in(if_block, 1);
5709
5708
  if_block.m(if_block_anchor.parentNode, if_block_anchor);
@@ -5742,7 +5741,7 @@ function create_fragment$7(ctx) {
5742
5741
  };
5743
5742
  }
5744
5743
 
5745
- function instance$7($$self, $$props, $$invalidate) {
5744
+ function instance$9($$self, $$props, $$invalidate) {
5746
5745
  let currentFloorExtraObjects;
5747
5746
  let { five } = $$props;
5748
5747
  let { pxmm } = $$props;
@@ -5785,7 +5784,7 @@ class CurrentFloor extends internal.SvelteComponent {
5785
5784
  constructor(options) {
5786
5785
  super();
5787
5786
 
5788
- internal.init(this, options, instance$7, create_fragment$7, internal.safe_not_equal, {
5787
+ internal.init(this, options, instance$9, create_fragment$9, internal.safe_not_equal, {
5789
5788
  five: 0,
5790
5789
  pxmm: 1,
5791
5790
  floorIndex: 2,
@@ -5798,12 +5797,12 @@ class CurrentFloor extends internal.SvelteComponent {
5798
5797
 
5799
5798
  /* src/floorplan/PanoFloorplanRadarPlugin/Components/Main.svelte generated by Svelte v3.47.0 */
5800
5799
 
5801
- function add_css$6(target) {
5800
+ function add_css$7(target) {
5802
5801
  internal.append_styles(target, "svelte-1mvqyqq", ".plugin-floorplan-radar.svelte-1mvqyqq{width:100%;height:100%;display:flex;justify-content:center;align-items:center}.plugin-floorplan-radar-container.svelte-1mvqyqq{position:relative}");
5803
5802
  }
5804
5803
 
5805
5804
  // (41:0) {#if visible}
5806
- function create_if_block$2(ctx) {
5805
+ function create_if_block$3(ctx) {
5807
5806
  let div;
5808
5807
  let div_resize_listener;
5809
5808
  let current;
@@ -5982,10 +5981,10 @@ function create_if_block_1(ctx) {
5982
5981
  };
5983
5982
  }
5984
5983
 
5985
- function create_fragment$6(ctx) {
5984
+ function create_fragment$8(ctx) {
5986
5985
  let if_block_anchor;
5987
5986
  let current;
5988
- let if_block = /*visible*/ ctx[1] && create_if_block$2(ctx);
5987
+ let if_block = /*visible*/ ctx[1] && create_if_block$3(ctx);
5989
5988
 
5990
5989
  return {
5991
5990
  c() {
@@ -6006,7 +6005,7 @@ function create_fragment$6(ctx) {
6006
6005
  internal.transition_in(if_block, 1);
6007
6006
  }
6008
6007
  } else {
6009
- if_block = create_if_block$2(ctx);
6008
+ if_block = create_if_block$3(ctx);
6010
6009
  if_block.c();
6011
6010
  internal.transition_in(if_block, 1);
6012
6011
  if_block.m(if_block_anchor.parentNode, if_block_anchor);
@@ -6037,7 +6036,7 @@ function create_fragment$6(ctx) {
6037
6036
  };
6038
6037
  }
6039
6038
 
6040
- function instance$6($$self, $$props, $$invalidate) {
6039
+ function instance$8($$self, $$props, $$invalidate) {
6041
6040
  let { five } = $$props;
6042
6041
  let { visible } = $$props;
6043
6042
  let { hoverEnable } = $$props;
@@ -6123,8 +6122,8 @@ class Main extends internal.SvelteComponent {
6123
6122
  internal.init(
6124
6123
  this,
6125
6124
  options,
6126
- instance$6,
6127
- create_fragment$6,
6125
+ instance$8,
6126
+ create_fragment$8,
6128
6127
  internal.safe_not_equal,
6129
6128
  {
6130
6129
  five: 0,
@@ -6134,12 +6133,12 @@ class Main extends internal.SvelteComponent {
6134
6133
  cameraImageUrl: 4,
6135
6134
  extraObjects: 5
6136
6135
  },
6137
- add_css$6
6136
+ add_css$7
6138
6137
  );
6139
6138
  }
6140
6139
  }
6141
6140
 
6142
- class Controller$1 extends Controller$3 {
6141
+ class Controller$2 extends Controller$4 {
6143
6142
  constructor(five, params) {
6144
6143
  super(five);
6145
6144
  // =============== public properties =================
@@ -6376,7 +6375,7 @@ class Controller$1 extends Controller$3 {
6376
6375
  }
6377
6376
 
6378
6377
  const PanoFloorplanRadarPlugin = (five, params) => {
6379
- return new Controller$1(five, params);
6378
+ return new Controller$2(five, params);
6380
6379
  };
6381
6380
 
6382
6381
  /**
@@ -6484,7 +6483,7 @@ function shouldFloorplanShowWithPose(pose) {
6484
6483
  const longitudeVisible = longitude < 30 * (Math.PI / 180) || longitude > 330 * (Math.PI / 180);
6485
6484
  return latitudeVisible && longitudeVisible;
6486
6485
  }
6487
- class Controller extends Controller$3 {
6486
+ class Controller$1 extends Controller$4 {
6488
6487
  constructor(five, params) {
6489
6488
  var _a;
6490
6489
  super(five);
@@ -6901,7 +6900,7 @@ class Controller extends Controller$3 {
6901
6900
  const fiveCurrentState = this.five.getCurrentState();
6902
6901
  if (shouldFloorplanHideWithPose(fiveCurrentState)) {
6903
6902
  this.updateState({ visible: false }, userAction);
6904
- this._hide({ userAction });
6903
+ this._hide({ userAction, isAutoHide: true });
6905
6904
  }
6906
6905
  }
6907
6906
  });
@@ -7074,6 +7073,13 @@ class Controller extends Controller$3 {
7074
7073
  state.visible ? this._show(options) : this._hide(options);
7075
7074
  }
7076
7075
  }
7076
+ changeConfigs(_config, userAction = true) {
7077
+ const config = Object.assign(Object.assign({}, this.state.config), _config);
7078
+ this.updateState({ config }, userAction);
7079
+ if (!this.container)
7080
+ return;
7081
+ this.render();
7082
+ }
7077
7083
  async formatData(serverData) {
7078
7084
  return await formatData(serverData.data);
7079
7085
  }
@@ -7146,7 +7152,7 @@ class Controller extends Controller$3 {
7146
7152
  }
7147
7153
 
7148
7154
  const ModelFloorplanPlugin = (five, params) => {
7149
- return new Controller(five, params);
7155
+ return new Controller$1(five, params);
7150
7156
  };
7151
7157
 
7152
7158
  /** 房屋数据映射表 */
@@ -8372,31 +8378,792 @@ const PanoRulerPlugin = (five$1, params) => {
8372
8378
  };
8373
8379
  };
8374
8380
 
8375
- const roomInfoIcon = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAZIAAABCCAYAAAB9y1BhAAAAAXNSR0IArs4c6QAADh5JREFUeAHtnVuPLDcVhedwC/dACKAICDxEIBQpygNI/Ab+MX8B8YCQEAjxgBAQLsm5Jjkn58r6Sl4jT52qnu4zXd121dqSx67q7ip7eXsv721XzcVFJAgEgSAQBIJAEAgCQeC4CLx48eKbSu+RH/fKuVoQWB8Cn1tfk9KiIHAUBH6tq/xKiTwSBILADgRCJDvAyUebRuAbpfXxSDatBmn8Pgh8YZ8v5TtBYIMIvFCbSZEgEASuQSBEcg1A+XizCDzfbMvT8CBwIAIhkgMBy9c3g0CIZDNdnYbeFIEQyU0RzO/XikCIZK09m3YdHYEQydEhzQVXgkCIZCUdmWYsj0CIZHmMc4c+EchCe5/9llqfAYEQyRlAzy27QCAeSRfdlEq2gECIpIVeSB1aRAAiudVixVKnINAaAiGS1nok9WkFAUJb8Upa6Y3Uo2kEQiRNd08qd0YEQiJnBD+37guBEElf/ZXang6BEMnpsM6dOkcgRNJ5B66x+nrjLmsTX1J6bSJHZ7+o9HklynWaOse1eKcc+XVlvxYFEnlfaThWfb7mcsn5nPRM6WmVU55KfO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sHOB+GBCV1dgycE5EZDufs/31+D9r8vJg8BSCFT2kojN3K4vvBQm3E3Zy0WIRICwVRcwSFPbdu194LKt+kEdtT/SIQLS4Tddbenohy4nDwKnQGAPG4rdZALehA09KpGo8bhou9iUbbs0/jMNTscBdRgJAm0hIF1+wzWSrt52OXkQOCUC0kNsNNuHsatz24iHqI709GxLAjcmktJQEwj5WPA+aCiuWB4YHKOT4yYRkF7zUNkg0lueSI4EgbMiIJ1kZyshL9LUOjNEwkT9sXT2pBP1VyaSQiCse9Coqa27LApBIPE+BEKkLwSk32zRHESDkp0zkSDQBALF9uKdYHunnkthwo7tfXQqQjmYSNQImBACIU2xIuGreB8CIdIvAtJzNogMosHI4mYkCDSHgPTUXspU2ItoEIvzEArlxWRvIlGFWTSnsnWF+b1dKAhk8QrrHpEgsDgC0ndi0oNoEBIuiASBZhGQvnqCz/KCJ/jYZtto7DPRoUU2N11LJIXxqNyUC0VFqeCTpRlP94gEgZMhIL0nbDCIdJswQSQINI9AIRRsNRP+KfvOkgNrKEddr5660YUqw3k8EAhkbvsuCztPVSF7JDqMBIF1IKAxcOl5S8eZLEWCQDcIFBtO2Kv2UOr645lAKkex4VeIpLo5jHbls1KD4eYaWIu4R+UeyYLA2RHQWGAADiJ9P9u2StcheRB4VQSkyzgD2PQppwBH4MaEMpBFRSDcqCYQx9ggDphr0QUb3SMSBJpAQGPiciei9P6oYYAmGphKbA4B6TRrJ+j1HKHYzh8cZbpVBowXZ8bgQhzPNJAOvvD4QjkOAj0hUAbdUOVMoHrqudT1OgSk2zgLkAl2n/LYvh9s900kutYV4UIvQiBXMMlBEAgCQWA1CBRCgUjmHAkI5vk+PACR1BcZmGmfH64GzTQkCASBILBhBAqhgEC9rDFGJI7FGJEcB4EgEASCQBAIAkEgCASBIBAEgkAQCAJBIAgEgSAQBIJAEAgCm0fg/x4jQQWGalpFAAAAAElFTkSuQmCC';
8381
+ /* src/PanoRulerProPlugin/RulerItem.svelte generated by Svelte v3.47.0 */
8376
8382
 
8377
- function getRoomInfoInstance() {
8378
- const infoDom = document.createElement('div');
8379
- const iconDom = document.createElement('i');
8380
- const textDom = document.createElement('span');
8381
- infoDom.appendChild(iconDom);
8382
- infoDom.appendChild(textDom);
8383
- // infoDom style
8384
- infoDom.style.position = 'relative';
8385
- infoDom.style.width = '100%';
8386
- infoDom.style.display = 'flex';
8387
- infoDom.style.flexDirection = 'column';
8388
- infoDom.style.alignItems = 'center';
8389
- infoDom.style.marginTop = `${150 / 16}rem`;
8390
- infoDom.style.opacity = '0';
8391
- infoDom.style.transition = 'opacity 1000ms linear';
8392
- // iconDom style
8393
- iconDom.style.display = 'block';
8394
- iconDom.style.width = `${134 / 16}rem`;
8395
- iconDom.style.height = `${22 / 16}rem`;
8396
- iconDom.style.backgroundSize = '100%';
8397
- iconDom.style.backgroundRepeat = 'no-repeat';
8398
- iconDom.style.backgroundImage = `url(${roomInfoIcon})`;
8399
- textDom.style.marginTop = `${10 / 16}rem`;
8383
+ function add_css$6(target) {
8384
+ internal.append_styles(target, "svelte-qy4ud2", ".PanoRulerPlugin-rule-line.svelte-qy4ud2.svelte-qy4ud2{position:absolute;transform-origin:left 0.0625rem;width:0;height:0.125rem;pointer-events:none}.PanoRulerPlugin-rule-line.svelte-qy4ud2.svelte-qy4ud2::after{content:'';position:absolute;left:-0.125rem;top:-0.1rem;width:0.25rem;height:0.25rem;border-radius:50%;background:#fff;z-index:1;-webkit-animation:svelte-qy4ud2-viewport-rule-point 0.1s 1s;animation:svelte-qy4ud2-viewport-rule-point 0.1s 1s;-webkit-animation-fill-mode:both;animation-fill-mode:both}.PanoRulerPlugin-rule-line.svelte-qy4ud2.svelte-qy4ud2::before{content:'';position:absolute;right:-0.125rem;top:-0.1rem;width:0.25rem;height:0.25rem;border-radius:50%;background:#fff;z-index:1;-webkit-animation:svelte-qy4ud2-viewport-rule-point 0.1s 1.5s;animation:svelte-qy4ud2-viewport-rule-point 0.1s 1.5s;-webkit-animation-fill-mode:both;animation-fill-mode:both}.PanoRulerPlugin-rule-line.svelte-qy4ud2 em.svelte-qy4ud2{display:block;height:0.0625rem;-webkit-animation:svelte-qy4ud2-viewport-rule-line 0.5s ease 1s;animation:svelte-qy4ud2-viewport-rule-line 0.5s ease 1s;-webkit-animation-fill-mode:both;animation-fill-mode:both;box-shadow:0 0 0.25rem rgb(0 0 0 / 40%);position:relative}.rule-mixed-line.svelte-qy4ud2.svelte-qy4ud2{display:flex;height:0.0625rem;-webkit-animation:svelte-qy4ud2-viewport-rule-line 0.5s ease 1s;animation:svelte-qy4ud2-viewport-rule-line 0.5s ease 1s;-webkit-animation-fill-mode:both;animation-fill-mode:both;align-items:center}.em-solid.svelte-qy4ud2.svelte-qy4ud2{height:100%;background:#ffffff}.em-dotted.svelte-qy4ud2.svelte-qy4ud2{height:0.125rem;background:var(--background-image);background-position:center;background-repeat:repeat}.PanoRulerPlugin-rule-label.svelte-qy4ud2.svelte-qy4ud2{position:absolute;width:0;height:0;top:0.0625rem;pointer-events:none}.PanoRulerPlugin-rule-label-name.svelte-qy4ud2.svelte-qy4ud2{position:absolute;padding:0.1875rem 0.375rem;background:rgba(195, 195, 195, 0.3);backdrop-filter:blur(0.25rem);-webkit-backdrop-filter:blur(0.25rem);border-radius:6.25rem;border:0.0625rem solid rgba(255, 255, 255, 0.6);white-space:nowrap;overflow:hidden;color:#ffffff;font-weight:500;font-size:0.75rem;line-height:1;-webkit-animation:svelte-qy4ud2-viewport-rule-label 0.25s ease 1s;animation:svelte-qy4ud2-viewport-rule-label 0.25s ease 1s;-webkit-animation-fill-mode:both;animation-fill-mode:both;box-shadow:inset 0 0 0.625rem 0 rgba(255, 255, 255, 0.3)}@-webkit-keyframes svelte-qy4ud2-viewport-rule-line{0%{width:0%}100%{width:100%}}@keyframes svelte-qy4ud2-viewport-rule-line{0%{width:0%}100%{width:100%}}@-webkit-keyframes svelte-qy4ud2-viewport-rule-label{0%{opacity:0;transform:scaleX(0)}100%{opacity:1;transform:translate(-50%, -50%) scaleX(1)}}@keyframes svelte-qy4ud2-viewport-rule-label{0%{opacity:0;transform:scaleX(0)}100%{opacity:1;transform:translate(-50%, -50%) scaleX(1)}}@-webkit-keyframes svelte-qy4ud2-viewport-rule-point{0%{transform:scaleX(0)}100%{transform:scaleX(1)}}@keyframes svelte-qy4ud2-viewport-rule-point{0%{transform:scaleX(0)}100%{transform:scaleX(1)}}");
8385
+ }
8386
+
8387
+ function get_each_context$4(ctx, list, i) {
8388
+ const child_ctx = ctx.slice();
8389
+ child_ctx[6] = list[i];
8390
+ return child_ctx;
8391
+ }
8392
+
8393
+ // (28:2) {:else}
8394
+ function create_else_block(ctx) {
8395
+ let div;
8396
+ let each_value = /*rulerItemProp*/ ctx[0].children;
8397
+ let each_blocks = [];
8398
+
8399
+ for (let i = 0; i < each_value.length; i += 1) {
8400
+ each_blocks[i] = create_each_block$4(get_each_context$4(ctx, each_value, i));
8401
+ }
8402
+
8403
+ return {
8404
+ c() {
8405
+ div = internal.element("div");
8406
+
8407
+ for (let i = 0; i < each_blocks.length; i += 1) {
8408
+ each_blocks[i].c();
8409
+ }
8410
+
8411
+ internal.attr(div, "class", "rule-mixed-line svelte-qy4ud2");
8412
+ },
8413
+ m(target, anchor) {
8414
+ internal.insert(target, div, anchor);
8415
+
8416
+ for (let i = 0; i < each_blocks.length; i += 1) {
8417
+ each_blocks[i].m(div, null);
8418
+ }
8419
+ },
8420
+ p(ctx, dirty) {
8421
+ if (dirty & /*rulerItemProp, vars*/ 9) {
8422
+ each_value = /*rulerItemProp*/ ctx[0].children;
8423
+ let i;
8424
+
8425
+ for (i = 0; i < each_value.length; i += 1) {
8426
+ const child_ctx = get_each_context$4(ctx, each_value, i);
8427
+
8428
+ if (each_blocks[i]) {
8429
+ each_blocks[i].p(child_ctx, dirty);
8430
+ } else {
8431
+ each_blocks[i] = create_each_block$4(child_ctx);
8432
+ each_blocks[i].c();
8433
+ each_blocks[i].m(div, null);
8434
+ }
8435
+ }
8436
+
8437
+ for (; i < each_blocks.length; i += 1) {
8438
+ each_blocks[i].d(1);
8439
+ }
8440
+
8441
+ each_blocks.length = each_value.length;
8442
+ }
8443
+ },
8444
+ d(detaching) {
8445
+ if (detaching) internal.detach(div);
8446
+ internal.destroy_each(each_blocks, detaching);
8447
+ }
8448
+ };
8449
+ }
8450
+
8451
+ // (26:2) {#if rulerItemProp.children.length === 0}
8452
+ function create_if_block$2(ctx) {
8453
+ let em;
8454
+ let em_class_value;
8455
+
8456
+ return {
8457
+ c() {
8458
+ em = internal.element("em");
8459
+
8460
+ internal.attr(em, "class", em_class_value = "" + (internal.null_to_empty(/*rulerItemProp*/ ctx[0].state
8461
+ ? 'em-solid'
8462
+ : 'em-dotted') + " svelte-qy4ud2"));
8463
+
8464
+ internal.attr(em, "style", /*vars*/ ctx[3]);
8465
+ },
8466
+ m(target, anchor) {
8467
+ internal.insert(target, em, anchor);
8468
+ },
8469
+ p(ctx, dirty) {
8470
+ if (dirty & /*rulerItemProp*/ 1 && em_class_value !== (em_class_value = "" + (internal.null_to_empty(/*rulerItemProp*/ ctx[0].state
8471
+ ? 'em-solid'
8472
+ : 'em-dotted') + " svelte-qy4ud2"))) {
8473
+ internal.attr(em, "class", em_class_value);
8474
+ }
8475
+
8476
+ if (dirty & /*vars*/ 8) {
8477
+ internal.attr(em, "style", /*vars*/ ctx[3]);
8478
+ }
8479
+ },
8480
+ d(detaching) {
8481
+ if (detaching) internal.detach(em);
8482
+ }
8483
+ };
8484
+ }
8485
+
8486
+ // (30:6) {#each rulerItemProp.children as child}
8487
+ function create_each_block$4(ctx) {
8488
+ let div;
8489
+ let div_class_value;
8490
+ let style_width = `${/*child*/ ctx[6].width}px`;
8491
+
8492
+ return {
8493
+ c() {
8494
+ div = internal.element("div");
8495
+ internal.attr(div, "class", div_class_value = "" + (internal.null_to_empty(/*child*/ ctx[6].state ? 'em-solid' : 'em-dotted') + " svelte-qy4ud2"));
8496
+ internal.attr(div, "style", /*vars*/ ctx[3]);
8497
+ internal.set_style(div, "width", style_width, false);
8498
+ },
8499
+ m(target, anchor) {
8500
+ internal.insert(target, div, anchor);
8501
+ },
8502
+ p(ctx, dirty) {
8503
+ if (dirty & /*rulerItemProp*/ 1 && div_class_value !== (div_class_value = "" + (internal.null_to_empty(/*child*/ ctx[6].state ? 'em-solid' : 'em-dotted') + " svelte-qy4ud2"))) {
8504
+ internal.attr(div, "class", div_class_value);
8505
+ }
8506
+
8507
+ if (dirty & /*vars*/ 8) {
8508
+ internal.attr(div, "style", /*vars*/ ctx[3]);
8509
+ }
8510
+
8511
+ if (dirty & /*rulerItemProp*/ 1 && style_width !== (style_width = `${/*child*/ ctx[6].width}px`)) {
8512
+ internal.set_style(div, "width", style_width, false);
8513
+ }
8514
+ },
8515
+ d(detaching) {
8516
+ if (detaching) internal.detach(div);
8517
+ }
8518
+ };
8519
+ }
8520
+
8521
+ function create_fragment$7(ctx) {
8522
+ let div2;
8523
+ let t0;
8524
+ let div1;
8525
+ let div0;
8526
+ let t1_value = /*rulerItemProp*/ ctx[0].labelElement + "";
8527
+ let t1;
8528
+ let div0_resize_listener;
8529
+ let style_left = `${/*rulerItemProp*/ ctx[0].labelOffset}%`;
8530
+ let style_width = `${/*rulerItemProp*/ ctx[0].width}px`;
8531
+ let style_left_1 = `${/*rulerItemProp*/ ctx[0].left}px`;
8532
+ let style_top = `${/*rulerItemProp*/ ctx[0].top}px`;
8533
+ let style_transform = `rotate(${/*rulerItemProp*/ ctx[0].rotateDeg}deg)`;
8534
+
8535
+ function select_block_type(ctx, dirty) {
8536
+ if (/*rulerItemProp*/ ctx[0].children.length === 0) return create_if_block$2;
8537
+ return create_else_block;
8538
+ }
8539
+
8540
+ let current_block_type = select_block_type(ctx);
8541
+ let if_block = current_block_type(ctx);
8542
+
8543
+ return {
8544
+ c() {
8545
+ div2 = internal.element("div");
8546
+ if_block.c();
8547
+ t0 = internal.space();
8548
+ div1 = internal.element("div");
8549
+ div0 = internal.element("div");
8550
+ t1 = internal.text(t1_value);
8551
+ internal.attr(div0, "class", "PanoRulerPlugin-rule-label-name svelte-qy4ud2");
8552
+ internal.add_render_callback(() => /*div0_elementresize_handler*/ ctx[4].call(div0));
8553
+ internal.attr(div1, "class", "PanoRulerPlugin-rule-label svelte-qy4ud2");
8554
+ internal.set_style(div1, "left", style_left, false);
8555
+ internal.attr(div2, "class", "PanoRulerPlugin-rule-line svelte-qy4ud2");
8556
+ internal.set_style(div2, "width", style_width, false);
8557
+ internal.set_style(div2, "left", style_left_1, false);
8558
+ internal.set_style(div2, "top", style_top, false);
8559
+ internal.set_style(div2, "transform", style_transform, false);
8560
+
8561
+ internal.set_style(
8562
+ div2,
8563
+ "display",
8564
+ /*rulerItemProp*/ ctx[0].visible && /*_visible*/ ctx[2]
8565
+ ? 'block'
8566
+ : 'none',
8567
+ false
8568
+ );
8569
+ },
8570
+ m(target, anchor) {
8571
+ internal.insert(target, div2, anchor);
8572
+ if_block.m(div2, null);
8573
+ internal.append(div2, t0);
8574
+ internal.append(div2, div1);
8575
+ internal.append(div1, div0);
8576
+ internal.append(div0, t1);
8577
+ div0_resize_listener = internal.add_resize_listener(div0, /*div0_elementresize_handler*/ ctx[4].bind(div0));
8578
+ },
8579
+ p(ctx, [dirty]) {
8580
+ if (current_block_type === (current_block_type = select_block_type(ctx)) && if_block) {
8581
+ if_block.p(ctx, dirty);
8582
+ } else {
8583
+ if_block.d(1);
8584
+ if_block = current_block_type(ctx);
8585
+
8586
+ if (if_block) {
8587
+ if_block.c();
8588
+ if_block.m(div2, t0);
8589
+ }
8590
+ }
8591
+
8592
+ if (dirty & /*rulerItemProp*/ 1 && t1_value !== (t1_value = /*rulerItemProp*/ ctx[0].labelElement + "")) internal.set_data(t1, t1_value);
8593
+
8594
+ if (dirty & /*rulerItemProp*/ 1 && style_left !== (style_left = `${/*rulerItemProp*/ ctx[0].labelOffset}%`)) {
8595
+ internal.set_style(div1, "left", style_left, false);
8596
+ }
8597
+
8598
+ if (dirty & /*rulerItemProp*/ 1 && style_width !== (style_width = `${/*rulerItemProp*/ ctx[0].width}px`)) {
8599
+ internal.set_style(div2, "width", style_width, false);
8600
+ }
8601
+
8602
+ if (dirty & /*rulerItemProp*/ 1 && style_left_1 !== (style_left_1 = `${/*rulerItemProp*/ ctx[0].left}px`)) {
8603
+ internal.set_style(div2, "left", style_left_1, false);
8604
+ }
8605
+
8606
+ if (dirty & /*rulerItemProp*/ 1 && style_top !== (style_top = `${/*rulerItemProp*/ ctx[0].top}px`)) {
8607
+ internal.set_style(div2, "top", style_top, false);
8608
+ }
8609
+
8610
+ if (dirty & /*rulerItemProp*/ 1 && style_transform !== (style_transform = `rotate(${/*rulerItemProp*/ ctx[0].rotateDeg}deg)`)) {
8611
+ internal.set_style(div2, "transform", style_transform, false);
8612
+ }
8613
+
8614
+ if (dirty & /*rulerItemProp, _visible*/ 5) {
8615
+ internal.set_style(
8616
+ div2,
8617
+ "display",
8618
+ /*rulerItemProp*/ ctx[0].visible && /*_visible*/ ctx[2]
8619
+ ? 'block'
8620
+ : 'none',
8621
+ false
8622
+ );
8623
+ }
8624
+ },
8625
+ i: internal.noop,
8626
+ o: internal.noop,
8627
+ d(detaching) {
8628
+ if (detaching) internal.detach(div2);
8629
+ if_block.d();
8630
+ div0_resize_listener();
8631
+ }
8632
+ };
8633
+ }
8634
+
8635
+ function instance$7($$self, $$props, $$invalidate) {
8636
+ let vars;
8637
+ let { rulerItemProp } = $$props;
8638
+ let _visible = true;
8639
+ let labelWidth;
8640
+ let EM_DOTTED_BG = `data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjQiIHdpZHRoPSIxMiIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayI+PGRlZnM+PGZpbHRlciBpZD0icHJlZml4X19hIiBoZWlnaHQ9IjQwMCUiIHdpZHRoPSIxMzcuNCUiIHg9Ii0xOC43JSIgeT0iLTE1MCUiPjxmZU1vcnBob2xvZ3kgaW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JlZj0iI3ByZWZpeF9fYiIvPjwvZz48L3N2Zz4=`;
8641
+
8642
+ function div0_elementresize_handler() {
8643
+ labelWidth = this.offsetWidth;
8644
+ $$invalidate(1, labelWidth);
8645
+ }
8646
+
8647
+ $$self.$$set = $$props => {
8648
+ if ('rulerItemProp' in $$props) $$invalidate(0, rulerItemProp = $$props.rulerItemProp);
8649
+ };
8650
+
8651
+ $$self.$$.update = () => {
8652
+ if ($$self.$$.dirty & /*labelWidth, rulerItemProp*/ 3) {
8653
+ {
8654
+ if (labelWidth >= rulerItemProp.width || labelWidth / 2 >= rulerItemProp.labelOffset / 100 * rulerItemProp.width || labelWidth / 2 >= (1 - rulerItemProp.labelOffset / 100) * rulerItemProp.width) {
8655
+ $$invalidate(2, _visible = false);
8656
+ } else {
8657
+ $$invalidate(2, _visible = true);
8658
+ }
8659
+ }
8660
+ }
8661
+ };
8662
+
8663
+ $$invalidate(3, vars = `--background-image: url(${EM_DOTTED_BG})`);
8664
+ return [rulerItemProp, labelWidth, _visible, vars, div0_elementresize_handler];
8665
+ }
8666
+
8667
+ class RulerItem extends internal.SvelteComponent {
8668
+ constructor(options) {
8669
+ super();
8670
+ internal.init(this, options, instance$7, create_fragment$7, internal.safe_not_equal, { rulerItemProp: 0 }, add_css$6);
8671
+ }
8672
+ }
8673
+
8674
+ /* src/PanoRulerProPlugin/RulerItems.svelte generated by Svelte v3.47.0 */
8675
+
8676
+ function get_each_context$3(ctx, list, i) {
8677
+ const child_ctx = ctx.slice();
8678
+ child_ctx[16] = list[i];
8679
+ return child_ctx;
8680
+ }
8681
+
8682
+ // (206:2) {#each rulerItemProp as itemData}
8683
+ function create_each_block$3(ctx) {
8684
+ let ruleritem;
8685
+ let current;
8686
+
8687
+ ruleritem = new RulerItem({
8688
+ props: { rulerItemProp: /*itemData*/ ctx[16] }
8689
+ });
8690
+
8691
+ return {
8692
+ c() {
8693
+ internal.create_component(ruleritem.$$.fragment);
8694
+ },
8695
+ m(target, anchor) {
8696
+ internal.mount_component(ruleritem, target, anchor);
8697
+ current = true;
8698
+ },
8699
+ p(ctx, dirty) {
8700
+ const ruleritem_changes = {};
8701
+ if (dirty & /*rulerItemProp*/ 1) ruleritem_changes.rulerItemProp = /*itemData*/ ctx[16];
8702
+ ruleritem.$set(ruleritem_changes);
8703
+ },
8704
+ i(local) {
8705
+ if (current) return;
8706
+ internal.transition_in(ruleritem.$$.fragment, local);
8707
+ current = true;
8708
+ },
8709
+ o(local) {
8710
+ internal.transition_out(ruleritem.$$.fragment, local);
8711
+ current = false;
8712
+ },
8713
+ d(detaching) {
8714
+ internal.destroy_component(ruleritem, detaching);
8715
+ }
8716
+ };
8717
+ }
8718
+
8719
+ function create_fragment$6(ctx) {
8720
+ let div;
8721
+ let current;
8722
+ let each_value = /*rulerItemProp*/ ctx[0];
8723
+ let each_blocks = [];
8724
+
8725
+ for (let i = 0; i < each_value.length; i += 1) {
8726
+ each_blocks[i] = create_each_block$3(get_each_context$3(ctx, each_value, i));
8727
+ }
8728
+
8729
+ const out = i => internal.transition_out(each_blocks[i], 1, 1, () => {
8730
+ each_blocks[i] = null;
8731
+ });
8732
+
8733
+ return {
8734
+ c() {
8735
+ div = internal.element("div");
8736
+
8737
+ for (let i = 0; i < each_blocks.length; i += 1) {
8738
+ each_blocks[i].c();
8739
+ }
8740
+ },
8741
+ m(target, anchor) {
8742
+ internal.insert(target, div, anchor);
8743
+
8744
+ for (let i = 0; i < each_blocks.length; i += 1) {
8745
+ each_blocks[i].m(div, null);
8746
+ }
8747
+
8748
+ current = true;
8749
+ },
8750
+ p(ctx, [dirty]) {
8751
+ if (dirty & /*rulerItemProp*/ 1) {
8752
+ each_value = /*rulerItemProp*/ ctx[0];
8753
+ let i;
8754
+
8755
+ for (i = 0; i < each_value.length; i += 1) {
8756
+ const child_ctx = get_each_context$3(ctx, each_value, i);
8757
+
8758
+ if (each_blocks[i]) {
8759
+ each_blocks[i].p(child_ctx, dirty);
8760
+ internal.transition_in(each_blocks[i], 1);
8761
+ } else {
8762
+ each_blocks[i] = create_each_block$3(child_ctx);
8763
+ each_blocks[i].c();
8764
+ internal.transition_in(each_blocks[i], 1);
8765
+ each_blocks[i].m(div, null);
8766
+ }
8767
+ }
8768
+
8769
+ internal.group_outros();
8770
+
8771
+ for (i = each_value.length; i < each_blocks.length; i += 1) {
8772
+ out(i);
8773
+ }
8774
+
8775
+ internal.check_outros();
8776
+ }
8777
+ },
8778
+ i(local) {
8779
+ if (current) return;
8780
+
8781
+ for (let i = 0; i < each_value.length; i += 1) {
8782
+ internal.transition_in(each_blocks[i]);
8783
+ }
8784
+
8785
+ current = true;
8786
+ },
8787
+ o(local) {
8788
+ each_blocks = each_blocks.filter(Boolean);
8789
+
8790
+ for (let i = 0; i < each_blocks.length; i += 1) {
8791
+ internal.transition_out(each_blocks[i]);
8792
+ }
8793
+
8794
+ current = false;
8795
+ },
8796
+ d(detaching) {
8797
+ if (detaching) internal.detach(div);
8798
+ internal.destroy_each(each_blocks, detaching);
8799
+ }
8800
+ };
8801
+ }
8802
+
8803
+ function instance$6($$self, $$props, $$invalidate) {
8804
+ var _a, _b, _c, _d;
8805
+ let { five: five$1 } = $$props;
8806
+ let { rulerDatas } = $$props;
8807
+ let { options } = $$props;
8808
+ let rulerItemProp = [];
8809
+
8810
+ const canvasWidth = ((_b = (_a = five$1.getElement()) === null || _a === void 0
8811
+ ? void 0
8812
+ : _a.parentElement) === null || _b === void 0
8813
+ ? void 0
8814
+ : _b.clientWidth) || 0;
8815
+
8816
+ const canvasHeight = ((_d = (_c = five$1.getElement()) === null || _c === void 0
8817
+ ? void 0
8818
+ : _c.parentElement) === null || _d === void 0
8819
+ ? void 0
8820
+ : _d.clientHeight) || 0;
8821
+
8822
+ const getRuleScreenIntr = (startPoint, endPoint) => {
8823
+ const screenLines = [
8824
+ [{ x: 0, y: 0 }, { x: canvasWidth, y: 0 }],
8825
+ [{ x: 0, y: 0 }, { x: 0, y: canvasHeight }],
8826
+ [{ x: canvasWidth, y: 0 }, { x: canvasWidth, y: canvasHeight }],
8827
+ [{ x: 0, y: canvasHeight }, { x: canvasWidth, y: canvasHeight }]
8828
+ ];
8829
+
8830
+ const intr = [];
8831
+
8832
+ for (let i = 0; i < screenLines.length; i++) {
8833
+ const result = intersectionOfLine([startPoint, endPoint], [screenLines[i][0], screenLines[i][1]], true);
8834
+ if (result) intr.push(result);
8835
+ }
8836
+
8837
+ if (intr.length === 0) return false; else {
8838
+ return intr;
8839
+ }
8840
+ };
8841
+
8842
+ const getPosition = (start, end) => {
8843
+ const startPoint = start.clone().project(five$1.camera);
8844
+ const startLeft = (startPoint.x + 1) / 2 * canvasWidth;
8845
+ const startTop = (-startPoint.y + 1) / 2 * canvasHeight;
8846
+ const endPoint = end.clone().project(five$1.camera);
8847
+ const endLeft = (endPoint.x + 1) / 2 * canvasWidth;
8848
+ const endTop = (-endPoint.y + 1) / 2 * canvasHeight;
8849
+ const distance = Math.sqrt(Math.pow(endLeft - startLeft, 2) + Math.pow(endTop - startTop, 2));
8850
+
8851
+ return {
8852
+ startLeft,
8853
+ startTop,
8854
+ endLeft,
8855
+ endTop,
8856
+ distance
8857
+ };
8858
+ };
8859
+
8860
+ const getPositionAndVisible = (start, end, visibleOrigin) => {
8861
+ const cameraPosition = five$1.camera.position;
8862
+ const cameraDirection = five$1.camera.getWorldDirection(new THREE.Vector3());
8863
+ const startAngle = start.clone().sub(cameraPosition).normalize().angleTo(cameraDirection);
8864
+ const endAngle = end.clone().sub(cameraPosition).normalize().angleTo(cameraDirection);
8865
+ const ruleLength = start.distanceTo(end);
8866
+ const midPoint = end.clone().sub(end.clone().sub(start).divide(new THREE.Vector3(2, 2, 2)));
8867
+ const disFromCameraToMid = midPoint.distanceTo(cameraPosition);
8868
+ const { startLeft, startTop, endLeft, endTop, distance } = getPosition(start, end);
8869
+ const rad = Math.PI / 2 - Math.atan2(endLeft - startLeft, startTop - endTop);
8870
+ const deg = -(rad / Math.PI) * 180;
8871
+ let visible = true;
8872
+ if (!visibleOrigin) visible = false;
8873
+
8874
+ // 只显示拐点相连的线
8875
+ if (!equal(start, visibleOrigin) && !equal(end, visibleOrigin)) {
8876
+ visible = false;
8877
+ }
8878
+
8879
+ // 线小于0.3m隐藏
8880
+ if (ruleLength < 0.3) {
8881
+ visible = false;
8882
+ }
8883
+
8884
+ if (startAngle > Math.PI / 2) {
8885
+ visible = false;
8886
+ }
8887
+
8888
+ if (endAngle > Math.PI / 2) {
8889
+ visible = false;
8890
+ }
8891
+
8892
+ if (disFromCameraToMid / ruleLength > 8) {
8893
+ visible = false;
8894
+ }
8895
+
8896
+ let labelOffset = 50;
8897
+ let visibleLength = distance;
8898
+ const intr = getRuleScreenIntr({ x: ~~startLeft, y: ~~startTop }, { x: ~~endLeft, y: ~~endTop });
8899
+
8900
+ if (intr && intr.length === 1) {
8901
+ if (equal(start, visibleOrigin)) {
8902
+ visibleLength = Math.sqrt(Math.pow(intr[0].x - startLeft, 2) + Math.pow(intr[0].y - startTop, 2));
8903
+ labelOffset = visibleLength / distance * 50;
8904
+ } else if (equal(end, visibleOrigin)) {
8905
+ visibleLength = Math.sqrt(Math.pow(intr[0].x - endLeft, 2) + Math.pow(intr[0].y - endTop, 2));
8906
+ labelOffset = 100 - visibleLength / distance * 50;
8907
+ }
8908
+ }
8909
+
8910
+ if (intr && intr.length === 2) {
8911
+ const middlePoint = {
8912
+ x: (intr[0].x + intr[1].x) / 2,
8913
+ y: (intr[0].y + intr[1].y) / 2
8914
+ };
8915
+
8916
+ const distanceFromStart = Math.sqrt(Math.pow(middlePoint.x - startLeft, 2) + Math.pow(middlePoint.y - startTop, 2));
8917
+ labelOffset = distanceFromStart / distance * 100;
8918
+ }
8919
+
8920
+ return {
8921
+ startLeft,
8922
+ startTop,
8923
+ distance,
8924
+ deg,
8925
+ visible,
8926
+ labelOffset,
8927
+ ruleLength
8928
+ };
8929
+ };
8930
+
8931
+ const updatePanoRulerData = () => {
8932
+ const panoIndex = five$1.panoIndex;
8933
+ const rulerData = rulerDatas.find(data => data.panoIndex === panoIndex);
8934
+ if (!rulerData) return $$invalidate(0, rulerItemProp = []);
8935
+
8936
+ // 非全景模式下隐藏所有标尺
8937
+ if (five$1.currentMode !== five.Five.Mode.Panorama) return $$invalidate(0, rulerItemProp = []);
8938
+
8939
+ const cameraPosition = five$1.camera.position;
8940
+ const cameraDirection = five$1.camera.getWorldDirection(new THREE.Vector3());
8941
+ const startPoints = rulerData.lines.map(v => new THREE.Vector3(v.start[0], -v.start[1], -v.start[2]));
8942
+ const endPoints = rulerData.lines.map(v => new THREE.Vector3(v.end[0], -v.end[1], -v.end[2]));
8943
+
8944
+ // 可以看到的角度最小的拐点
8945
+ const [visibleOrigin] = startPoints.concat(endPoints).sort((pointA, pointB) => {
8946
+ const angleA = pointA.clone().setY(0).sub(cameraPosition).normalize().angleTo(cameraDirection.clone().setY(0));
8947
+ const angleB = pointB.clone().setY(0).sub(cameraPosition).normalize().angleTo(cameraDirection.clone().setY(0));
8948
+ return angleA - angleB;
8949
+ });
8950
+
8951
+ const data = rulerData.lines.map(line => {
8952
+ var _a, _b;
8953
+ const start = line.start;
8954
+ const end = line.end;
8955
+ const { startLeft, startTop, distance, deg, visible, labelOffset, ruleLength } = getPositionAndVisible(new THREE.Vector3(start[0], -start[1], -start[2]), new THREE.Vector3(end[0], -end[1], -end[2]), visibleOrigin);
8956
+ const children = [];
8957
+
8958
+ if (line.children && ((_a = line.children) === null || _a === void 0
8959
+ ? void 0
8960
+ : _a.length) > 0) {
8961
+ (_b = line.children) === null || _b === void 0
8962
+ ? void 0
8963
+ : _b.forEach(l => {
8964
+ const start = l.start;
8965
+ const end = l.end;
8966
+ const { distance } = getPosition(new THREE.Vector3(start[0], -start[1], -start[2]), new THREE.Vector3(end[0], -end[1], -end[2]));
8967
+ children.push({ width: distance, state: l.state });
8968
+ });
8969
+ }
8970
+
8971
+ return {
8972
+ width: distance,
8973
+ left: startLeft,
8974
+ top: startTop,
8975
+ rotateDeg: deg,
8976
+ state: line.state,
8977
+ children,
8978
+ labelOffset,
8979
+ visible,
8980
+ labelElement: options.distanceText(ruleLength)
8981
+ };
8982
+ });
8983
+
8984
+ $$invalidate(0, rulerItemProp = data);
8985
+ };
8986
+
8987
+ const nextFrameFreshRule = () => nextFrame$1(updatePanoRulerData);
8988
+ const throttleFreshRule = throttle(updatePanoRulerData, 80);
8989
+
8990
+ svelte.onMount(() => {
8991
+ updatePanoRulerData();
8992
+ five$1.on('panoArrived', updatePanoRulerData);
8993
+ five$1.on('modeChange', updatePanoRulerData);
8994
+ five$1.on('cameraDirectionUpdate', nextFrameFreshRule);
8995
+ five$1.on('movingToPano', nextFrameFreshRule);
8996
+ five$1.on('mouseWheel', () => throttleFreshRule());
8997
+ five$1.on('pinchGesture', () => throttleFreshRule());
8998
+ });
8999
+
9000
+ svelte.onDestroy(() => {
9001
+ five$1.off('panoArrived', updatePanoRulerData);
9002
+ five$1.off('modeChange', updatePanoRulerData);
9003
+ five$1.off('cameraDirectionUpdate', nextFrameFreshRule);
9004
+ five$1.off('movingToPano', nextFrameFreshRule);
9005
+ five$1.off('mouseWheel', () => throttleFreshRule());
9006
+ five$1.off('pinchGesture', () => throttleFreshRule());
9007
+ });
9008
+
9009
+ $$self.$$set = $$props => {
9010
+ if ('five' in $$props) $$invalidate(1, five$1 = $$props.five);
9011
+ if ('rulerDatas' in $$props) $$invalidate(2, rulerDatas = $$props.rulerDatas);
9012
+ if ('options' in $$props) $$invalidate(3, options = $$props.options);
9013
+ };
9014
+
9015
+ return [rulerItemProp, five$1, rulerDatas, options];
9016
+ }
9017
+
9018
+ class RulerItems extends internal.SvelteComponent {
9019
+ constructor(options) {
9020
+ super();
9021
+ internal.init(this, options, instance$6, create_fragment$6, internal.safe_not_equal, { five: 1, rulerDatas: 2, options: 3 });
9022
+ }
9023
+ }
9024
+
9025
+ class Controller {
9026
+ constructor(five, params) {
9027
+ var _a, _b;
9028
+ Object.defineProperty(this, "five", {
9029
+ enumerable: true,
9030
+ configurable: true,
9031
+ writable: true,
9032
+ value: void 0
9033
+ });
9034
+ Object.defineProperty(this, "container", {
9035
+ enumerable: true,
9036
+ configurable: true,
9037
+ writable: true,
9038
+ value: document.createElement('div')
9039
+ });
9040
+ Object.defineProperty(this, "panoRulerProData", {
9041
+ enumerable: true,
9042
+ configurable: true,
9043
+ writable: true,
9044
+ value: void 0
9045
+ });
9046
+ Object.defineProperty(this, "rulerItems", {
9047
+ enumerable: true,
9048
+ configurable: true,
9049
+ writable: true,
9050
+ value: void 0
9051
+ });
9052
+ Object.defineProperty(this, "state", {
9053
+ enumerable: true,
9054
+ configurable: true,
9055
+ writable: true,
9056
+ value: {
9057
+ enabled: false,
9058
+ loaded: false,
9059
+ options: {
9060
+ className: '',
9061
+ distanceText: (distance) => `${distance.toFixed(1)}m`,
9062
+ },
9063
+ }
9064
+ });
9065
+ this.five = five;
9066
+ this.container.classList.add('panoRulerProPlugin-container');
9067
+ this.container.setAttribute('style', `position: absolute;pointer-events: none;width: 100%;height: 100%;left: 0;top: 0;overflow: hidden;`);
9068
+ if (params) {
9069
+ if (params.data) {
9070
+ this.load(params.data);
9071
+ }
9072
+ this.state.options = Object.assign(Object.assign({}, this.state.options), (params.options || {}));
9073
+ if ((_a = params.options) === null || _a === void 0 ? void 0 : _a.className)
9074
+ this.container.classList.add((_b = params.options) === null || _b === void 0 ? void 0 : _b.className);
9075
+ }
9076
+ this.five.once('modelLoaded', async () => {
9077
+ var _a, _b;
9078
+ (_b = (_a = this.five.getElement()) === null || _a === void 0 ? void 0 : _a.parentNode) === null || _b === void 0 ? void 0 : _b.append(this.container);
9079
+ });
9080
+ this.five.once('dispose', () => this.dispose());
9081
+ }
9082
+ async load(serverData) {
9083
+ if (!this.five.work)
9084
+ return;
9085
+ const data = serverData.data;
9086
+ if (!data)
9087
+ throw new Error('标尺数据依赖不齐全!');
9088
+ this.panoRulerProData = data;
9089
+ this.state.loaded = true;
9090
+ }
9091
+ enable() {
9092
+ if (!this.state.loaded)
9093
+ return false;
9094
+ if (this.state.enabled)
9095
+ return true;
9096
+ this.state.enabled = true;
9097
+ this.render();
9098
+ return true;
9099
+ }
9100
+ disable() {
9101
+ if (!this.state.enabled)
9102
+ return true;
9103
+ this.state.enabled = false;
9104
+ this.render();
9105
+ return true;
9106
+ }
9107
+ async render() {
9108
+ var _a;
9109
+ if (this.state.enabled) {
9110
+ if (!this.panoRulerProData || !this.container)
9111
+ return;
9112
+ this.rulerItems = new RulerItems({
9113
+ target: this.container,
9114
+ props: {
9115
+ five: this.five,
9116
+ rulerDatas: this.panoRulerProData,
9117
+ options: this.state.options,
9118
+ },
9119
+ });
9120
+ }
9121
+ else {
9122
+ (_a = this.rulerItems) === null || _a === void 0 ? void 0 : _a.$destroy();
9123
+ this.rulerItems = undefined;
9124
+ }
9125
+ }
9126
+ dispose() {
9127
+ if (this.container) {
9128
+ this.rulerItems.$destroy();
9129
+ this.rulerItems = undefined;
9130
+ }
9131
+ this.container.remove();
9132
+ }
9133
+ }
9134
+
9135
+ /**
9136
+ * 全景标尺插件
9137
+ */
9138
+ const PanoRulerProPlugin = (five, params) => {
9139
+ return new Controller(five, params);
9140
+ };
9141
+
9142
+ const roomInfoIcon = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAZIAAABCCAYAAAB9y1BhAAAAAXNSR0IArs4c6QAADh5JREFUeAHtnVuPLDcVhedwC/dACKAICDxEIBQpygNI/Ab+MX8B8YCQEAjxgBAQLsm5Jjkn58r6Sl4jT52qnu4zXd121dqSx67q7ip7eXsv721XzcVFJAgEgSAQBIJAEAgCQeC4CLx48eKbSu+RH/fKuVoQWB8Cn1tfk9KiIHAUBH6tq/xKiTwSBILADgRCJDvAyUebRuAbpfXxSDatBmn8Pgh8YZ8v5TtBYIMIvFCbSZEgEASuQSBEcg1A+XizCDzfbMvT8CBwIAIhkgMBy9c3g0CIZDNdnYbeFIEQyU0RzO/XikCIZK09m3YdHYEQydEhzQVXgkCIZCUdmWYsj0CIZHmMc4c+EchCe5/9llqfAYEQyRlAzy27QCA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jmHAkI5vk+PACR1BcZmGmfH64GzTQkCASBILBhBAqhgEC9rDFGJI7FGJEcB4EgEASCQBAIAkEgCASBIBAEgkAQCAJBIAgEgSAQBIJAEAgCm0fg/x4jQQWGalpFAAAAAElFTkSuQmCC';
9143
+
9144
+ function getRoomInfoInstance() {
9145
+ const infoDom = document.createElement('div');
9146
+ const iconDom = document.createElement('i');
9147
+ const textDom = document.createElement('span');
9148
+ infoDom.appendChild(iconDom);
9149
+ infoDom.appendChild(textDom);
9150
+ // infoDom style
9151
+ infoDom.style.position = 'relative';
9152
+ infoDom.style.width = '100%';
9153
+ infoDom.style.display = 'flex';
9154
+ infoDom.style.flexDirection = 'column';
9155
+ infoDom.style.alignItems = 'center';
9156
+ infoDom.style.marginTop = `${150 / 16}rem`;
9157
+ infoDom.style.opacity = '0';
9158
+ infoDom.style.transition = 'opacity 1000ms linear';
9159
+ // iconDom style
9160
+ iconDom.style.display = 'block';
9161
+ iconDom.style.width = `${134 / 16}rem`;
9162
+ iconDom.style.height = `${22 / 16}rem`;
9163
+ iconDom.style.backgroundSize = '100%';
9164
+ iconDom.style.backgroundRepeat = 'no-repeat';
9165
+ iconDom.style.backgroundImage = `url(${roomInfoIcon})`;
9166
+ textDom.style.marginTop = `${10 / 16}rem`;
8400
9167
  // textDom style
8401
9168
  textDom.style.fontSize = `${16 / 16}rem`;
8402
9169
  textDom.style.color = '#fff';
@@ -14834,18 +15601,18 @@ function add_css(target) {
14834
15601
 
14835
15602
  function get_each_context(ctx, list, i) {
14836
15603
  const child_ctx = ctx.slice();
14837
- child_ctx[30] = list[i];
15604
+ child_ctx[31] = list[i];
14838
15605
  return child_ctx;
14839
15606
  }
14840
15607
 
14841
- // (229:2) {#if itemLabelItem.visible}
15608
+ // (235:2) {#if itemLabelItem.visible}
14842
15609
  function create_if_block(ctx) {
14843
15610
  let itemlabelitem;
14844
15611
  let current;
14845
15612
 
14846
15613
  itemlabelitem = new ItemLabelItem({
14847
15614
  props: {
14848
- itemLabel: /*itemLabelItem*/ ctx[30],
15615
+ itemLabel: /*itemLabelItem*/ ctx[31],
14849
15616
  hooks: /*hooks*/ ctx[0],
14850
15617
  anchorEnabled: /*anchorEnabled*/ ctx[2],
14851
15618
  onIconClick: /*onIconClick*/ ctx[6]
@@ -14862,7 +15629,7 @@ function create_if_block(ctx) {
14862
15629
  },
14863
15630
  p(ctx, dirty) {
14864
15631
  const itemlabelitem_changes = {};
14865
- if (dirty[0] & /*renderItemLabels*/ 2) itemlabelitem_changes.itemLabel = /*itemLabelItem*/ ctx[30];
15632
+ if (dirty[0] & /*renderItemLabels*/ 2) itemlabelitem_changes.itemLabel = /*itemLabelItem*/ ctx[31];
14866
15633
  if (dirty[0] & /*hooks*/ 1) itemlabelitem_changes.hooks = /*hooks*/ ctx[0];
14867
15634
  if (dirty[0] & /*anchorEnabled*/ 4) itemlabelitem_changes.anchorEnabled = /*anchorEnabled*/ ctx[2];
14868
15635
  itemlabelitem.$set(itemlabelitem_changes);
@@ -14882,12 +15649,12 @@ function create_if_block(ctx) {
14882
15649
  };
14883
15650
  }
14884
15651
 
14885
- // (228:1) {#each renderItemLabels as itemLabelItem (itemLabelItem.id)}
15652
+ // (234:1) {#each renderItemLabels as itemLabelItem (itemLabelItem.id)}
14886
15653
  function create_each_block(key_1, ctx) {
14887
15654
  let first;
14888
15655
  let if_block_anchor;
14889
15656
  let current;
14890
- let if_block = /*itemLabelItem*/ ctx[30].visible && create_if_block(ctx);
15657
+ let if_block = /*itemLabelItem*/ ctx[31].visible && create_if_block(ctx);
14891
15658
 
14892
15659
  return {
14893
15660
  key: key_1,
@@ -14907,7 +15674,7 @@ function create_each_block(key_1, ctx) {
14907
15674
  p(new_ctx, dirty) {
14908
15675
  ctx = new_ctx;
14909
15676
 
14910
- if (/*itemLabelItem*/ ctx[30].visible) {
15677
+ if (/*itemLabelItem*/ ctx[31].visible) {
14911
15678
  if (if_block) {
14912
15679
  if_block.p(ctx, dirty);
14913
15680
 
@@ -14954,7 +15721,7 @@ function create_fragment(ctx) {
14954
15721
  let div_resize_listener;
14955
15722
  let current;
14956
15723
  let each_value = /*renderItemLabels*/ ctx[1];
14957
- const get_key = ctx => /*itemLabelItem*/ ctx[30].id;
15724
+ const get_key = ctx => /*itemLabelItem*/ ctx[31].id;
14958
15725
 
14959
15726
  for (let i = 0; i < each_value.length; i += 1) {
14960
15727
  let child_ctx = get_each_context(ctx, each_value, i);
@@ -14971,7 +15738,7 @@ function create_fragment(ctx) {
14971
15738
  }
14972
15739
 
14973
15740
  internal.attr(div, "class", "item-labels-container svelte-gk8s47");
14974
- internal.add_render_callback(() => /*div_elementresize_handler*/ ctx[12].call(div));
15741
+ internal.add_render_callback(() => /*div_elementresize_handler*/ ctx[13].call(div));
14975
15742
  internal.set_style(div, "opacity", /*itemsVisible*/ ctx[5] ? 1 : 0, false);
14976
15743
  },
14977
15744
  m(target, anchor) {
@@ -14981,7 +15748,7 @@ function create_fragment(ctx) {
14981
15748
  each_blocks[i].m(div, null);
14982
15749
  }
14983
15750
 
14984
- div_resize_listener = internal.add_resize_listener(div, /*div_elementresize_handler*/ ctx[12].bind(div));
15751
+ div_resize_listener = internal.add_resize_listener(div, /*div_elementresize_handler*/ ctx[13].bind(div));
14985
15752
  current = true;
14986
15753
  },
14987
15754
  p(ctx, dirty) {
@@ -15029,6 +15796,7 @@ function instance($$self, $$props, $$invalidate) {
15029
15796
  const { Raycaster, Vector3 } = THREE__namespace;
15030
15797
  let { five: five$1 } = $$props;
15031
15798
  let { modelOcclusionEnable } = $$props;
15799
+ let { onlyVisibleInPanorama } = $$props;
15032
15800
  let { itemLabels } = $$props;
15033
15801
  let { hooks } = $$props;
15034
15802
  let { displayStrategyType } = $$props;
@@ -15080,7 +15848,10 @@ function instance($$self, $$props, $$invalidate) {
15080
15848
  const ratioFromTop = (2 - (offsetYFromCenter + 1)) / 2;
15081
15849
  const isFront = Math.abs(offsetZFromCenter) < 1;
15082
15850
  const cssOffset = [ratioFromLeft, ratioFromTop];
15851
+
15852
+ // 只计算在前面就行
15083
15853
  const isInViewport = isFront && cssOffset.every(ratio => ratio < 1 && ratio >= 0);
15854
+
15084
15855
  return Boolean(isInViewport);
15085
15856
  };
15086
15857
 
@@ -15101,8 +15872,15 @@ function instance($$self, $$props, $$invalidate) {
15101
15872
  };
15102
15873
 
15103
15874
  const getFormatedItemLabels = (five$1, labels) => {
15875
+ console.log(labels);
15876
+
15104
15877
  // 计算位置 & 可见性
15105
15878
  const newLabels = labels.map(label => {
15879
+ // 不在绑定点位则直接不可见
15880
+ if (five$1.state.panoIndex !== label.panoIndex) {
15881
+ return Object.assign(Object.assign({}, label), { visible: false });
15882
+ }
15883
+
15106
15884
  const cssOffset = getLabelCssOffset(five$1, label);
15107
15885
  label.name.length * basicWidth;
15108
15886
  const strokeLength = getStrokeLength(label.modelPosition[1], displayStrategyType);
@@ -15155,16 +15933,6 @@ function instance($$self, $$props, $$invalidate) {
15155
15933
  handleCameraUpdate();
15156
15934
  };
15157
15935
 
15158
- const onFiveModeChange = mode => {
15159
- $$invalidate(5, itemsVisible = false);
15160
-
15161
- five$1.once('initAnimationEnded', (panoIndex, pose, userAction) => {
15162
- $$invalidate(2, anchorEnabled = mode === five.Five.Mode.Panorama);
15163
- $$invalidate(5, itemsVisible = true);
15164
- if (!userAction) return; else onItemLabelUpdate();
15165
- });
15166
- };
15167
-
15168
15936
  const handleCameraUpdate = debounce(
15169
15937
  () => {
15170
15938
  $$invalidate(5, itemsVisible = true);
@@ -15222,11 +15990,10 @@ function instance($$self, $$props, $$invalidate) {
15222
15990
  const onIconClick = itemLabel => {
15223
15991
  if (five$1.state.mode === five.Five.Mode.Panorama) return;
15224
15992
  const observers = five$1.work.observers;
15225
- const fromPositionVector = new Vector3(itemLabel.position[0], itemLabel.position[1], itemLabel.position[2]);
15993
+ const fromPositionVector = new Vector3().fromArray(itemLabel.position);
15226
15994
  const observer = getNearObserverPano(fromPositionVector, observers);
15227
15995
 
15228
15996
  if (observer) {
15229
- console.log('--has observer--');
15230
15997
  itemLabel.observerIndex = observer.panoIndex;
15231
15998
  }
15232
15999
 
@@ -15269,12 +16036,12 @@ function instance($$self, $$props, $$invalidate) {
15269
16036
  onItemLabelUpdate();
15270
16037
  addResizeListener();
15271
16038
  five$1.on('cameraUpdate', handleCameraUpdateCallback);
15272
- five$1.on('modeChange', onFiveModeChange);
15273
- });
16039
+ }); // five.on('modeChange', onFiveModeChange)
15274
16040
 
15275
16041
  svelte.onDestroy(() => {
15276
16042
  five$1.off('cameraUpdate', handleCameraUpdateCallback);
15277
- five$1.off('modeChange', onFiveModeChange);
16043
+
16044
+ // five.off('modeChange', onFiveModeChange)
15278
16045
  window.removeEventListener('resize', onResize, false);
15279
16046
  });
15280
16047
 
@@ -15288,10 +16055,11 @@ function instance($$self, $$props, $$invalidate) {
15288
16055
  $$self.$$set = $$props => {
15289
16056
  if ('five' in $$props) $$invalidate(7, five$1 = $$props.five);
15290
16057
  if ('modelOcclusionEnable' in $$props) $$invalidate(8, modelOcclusionEnable = $$props.modelOcclusionEnable);
15291
- if ('itemLabels' in $$props) $$invalidate(9, itemLabels = $$props.itemLabels);
16058
+ if ('onlyVisibleInPanorama' in $$props) $$invalidate(9, onlyVisibleInPanorama = $$props.onlyVisibleInPanorama);
16059
+ if ('itemLabels' in $$props) $$invalidate(10, itemLabels = $$props.itemLabels);
15292
16060
  if ('hooks' in $$props) $$invalidate(0, hooks = $$props.hooks);
15293
- if ('displayStrategyType' in $$props) $$invalidate(10, displayStrategyType = $$props.displayStrategyType);
15294
- if ('maxVisibleDistance' in $$props) $$invalidate(11, maxVisibleDistance = $$props.maxVisibleDistance);
16061
+ if ('displayStrategyType' in $$props) $$invalidate(11, displayStrategyType = $$props.displayStrategyType);
16062
+ if ('maxVisibleDistance' in $$props) $$invalidate(12, maxVisibleDistance = $$props.maxVisibleDistance);
15295
16063
  };
15296
16064
 
15297
16065
  return [
@@ -15304,6 +16072,7 @@ function instance($$self, $$props, $$invalidate) {
15304
16072
  onIconClick,
15305
16073
  five$1,
15306
16074
  modelOcclusionEnable,
16075
+ onlyVisibleInPanorama,
15307
16076
  itemLabels,
15308
16077
  displayStrategyType,
15309
16078
  maxVisibleDistance,
@@ -15324,10 +16093,11 @@ class ItemLabelComponent extends internal.SvelteComponent {
15324
16093
  {
15325
16094
  five: 7,
15326
16095
  modelOcclusionEnable: 8,
15327
- itemLabels: 9,
16096
+ onlyVisibleInPanorama: 9,
16097
+ itemLabels: 10,
15328
16098
  hooks: 0,
15329
- displayStrategyType: 10,
15330
- maxVisibleDistance: 11
16099
+ displayStrategyType: 11,
16100
+ maxVisibleDistance: 12
15331
16101
  },
15332
16102
  add_css,
15333
16103
  [-1, -1]
@@ -15337,12 +16107,12 @@ class ItemLabelComponent extends internal.SvelteComponent {
15337
16107
 
15338
16108
  /** @description 转成内部所需数据 */
15339
16109
  function parseItemLabelPluginData(data) {
15340
- return data.item_labels.map(label => (Object.assign({ modelPosition: [label.position[0], label.position[1], label.position[2]], observerIndex: undefined }, label)));
16110
+ return data.item_labels.map(label => (Object.assign(Object.assign({}, label), { modelPosition: [label.position[0], label.position[1], label.position[2]], observerIndex: undefined })));
15341
16111
  }
15342
16112
 
15343
16113
  const defaultMaxVisibleDistance = undefined;
15344
16114
  const Plugin = (five$1, params) => {
15345
- var _a, _b, _c;
16115
+ var _a, _b, _c, _d;
15346
16116
  const pluginState = {
15347
16117
  container: document.createElement('div'),
15348
16118
  data: null,
@@ -15353,8 +16123,9 @@ const Plugin = (five$1, params) => {
15353
16123
  app: undefined,
15354
16124
  hooks: new five.Subscribe(),
15355
16125
  modelOcclusionEnable: (_a = params === null || params === void 0 ? void 0 : params.modelOcclusionEnable) !== null && _a !== void 0 ? _a : true,
15356
- displayStrategyType: (_b = params === null || params === void 0 ? void 0 : params.displayStrategyType) !== null && _b !== void 0 ? _b : exports.ITEM_LABEL_PLUGIN_DISPLAY_STRATEGY_TYPE.SMALL,
15357
- maxVisibleDistance: (_c = params === null || params === void 0 ? void 0 : params.maxVisibleDistance) !== null && _c !== void 0 ? _c : defaultMaxVisibleDistance,
16126
+ onlyVisibleInPanorama: (_b = params === null || params === void 0 ? void 0 : params.onlyVisibleInPanorama) !== null && _b !== void 0 ? _b : true,
16127
+ displayStrategyType: (_c = params === null || params === void 0 ? void 0 : params.displayStrategyType) !== null && _c !== void 0 ? _c : exports.ITEM_LABEL_PLUGIN_DISPLAY_STRATEGY_TYPE.SMALL,
16128
+ maxVisibleDistance: (_d = params === null || params === void 0 ? void 0 : params.maxVisibleDistance) !== null && _d !== void 0 ? _d : defaultMaxVisibleDistance,
15358
16129
  };
15359
16130
  pluginState.container.setAttribute('class', 'item-label-plugin-container');
15360
16131
  pluginState.container.style.cssText = `
@@ -15391,6 +16162,7 @@ const Plugin = (five$1, params) => {
15391
16162
  return true;
15392
16163
  };
15393
16164
  const dispose = () => {
16165
+ removeListener4Five();
15394
16166
  pluginState.container.remove();
15395
16167
  };
15396
16168
  const render = () => {
@@ -15410,6 +16182,7 @@ const Plugin = (five$1, params) => {
15410
16182
  props: {
15411
16183
  five: five$1,
15412
16184
  modelOcclusionEnable: pluginState.modelOcclusionEnable,
16185
+ onlyVisibleInPanorama: pluginState.onlyVisibleInPanorama,
15413
16186
  itemLabels: pluginState.itemLabels,
15414
16187
  wrapper: pluginState.wrapper,
15415
16188
  hooks: pluginState.hooks,
@@ -15427,9 +16200,27 @@ const Plugin = (five$1, params) => {
15427
16200
  };
15428
16201
  // 添加 five 监听
15429
16202
  const addListener4Five = () => {
15430
- // five.on('modeChange', onFiveModeChange)
16203
+ five$1.on('modeChange', onFiveModeChange);
15431
16204
  five$1.once('dispose', dispose);
15432
16205
  };
16206
+ // 取消 five 监听
16207
+ const removeListener4Five = () => {
16208
+ five$1.off('modeChange', onFiveModeChange);
16209
+ };
16210
+ const onFiveModeChange = (mode) => {
16211
+ // if (!pluginState.enabled) return
16212
+ if (mode !== five.Five.Mode.Panorama) {
16213
+ pluginState.fiveModeEnabled = false;
16214
+ disable();
16215
+ return;
16216
+ }
16217
+ // pluginState.fiveModeEnabled = false
16218
+ // render()
16219
+ five$1.once('initAnimationEnded', () => {
16220
+ pluginState.fiveModeEnabled = true;
16221
+ enable();
16222
+ });
16223
+ };
15433
16224
  addListener4Five();
15434
16225
  return {
15435
16226
  appendTo,
@@ -15446,8 +16237,11 @@ const itemLabelPluginServerParams = {
15446
16237
  version: 0,
15447
16238
  };
15448
16239
 
16240
+ const DnalogelVersion = '2.0.0-alpha.38';
16241
+
15449
16242
  exports.CSS3DRenderPlugin = CSS3DRenderPlugin;
15450
16243
  exports.CameraMovementPlugin = CameraMovementPlugin;
16244
+ exports.DnalogelVersion = DnalogelVersion;
15451
16245
  exports.FLOOR_TYPE_MAP = FLOOR_TYPE_MAP;
15452
16246
  exports.ItemLabelPlugin = Plugin;
15453
16247
  exports.Magnifier = Magnifier;
@@ -15463,6 +16257,7 @@ exports.PanoCursorRaycasterPlugin = PanoCursorRaycasterPlugin;
15463
16257
  exports.PanoFloorplanRadarPlugin = PanoFloorplanRadarPlugin;
15464
16258
  exports.PanoMeasurePlugin = PanoMeasurePlugin;
15465
16259
  exports.PanoRulerPlugin = PanoRulerPlugin;
16260
+ exports.PanoRulerProPlugin = PanoRulerProPlugin;
15466
16261
  exports.PanoSpatialTagPlugin = PanoSpatialTagPlugin;
15467
16262
  exports.ROOM_FETILE_TYPE_MAP = ROOM_FETILE_TYPE_MAP;
15468
16263
  exports.ROOM_TYPE_MAP = ROOM_TYPE_MAP;