@teselagen/ove 0.3.25 → 0.3.27
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.
- package/index.cjs.js +1815 -1550
- package/index.es.js +1815 -1550
- package/index.umd.js +1307 -1103
- package/package.json +3 -3
- package/src/AlignmentView/index.js +2 -2
- package/src/CircularView/Labels/index.js +9 -4
- package/src/CircularView/drawAnnotations.js +7 -5
- package/src/helperComponents/withHover.js +38 -14
- package/style.css +12 -0
- package/index.js +0 -197011
- package/index.mjs +0 -196957
package/index.umd.js
CHANGED
|
@@ -23198,11 +23198,174 @@ var __async = (__this, __arguments, generator) => {
|
|
|
23198
23198
|
}
|
|
23199
23199
|
}, "effect")
|
|
23200
23200
|
});
|
|
23201
|
+
var mouseCoords = {
|
|
23202
|
+
clientX: 0,
|
|
23203
|
+
clientY: 0
|
|
23204
|
+
};
|
|
23205
|
+
var activeInstances = [];
|
|
23206
|
+
function storeMouseCoords(_ref) {
|
|
23207
|
+
var clientX = _ref.clientX, clientY = _ref.clientY;
|
|
23208
|
+
mouseCoords = {
|
|
23209
|
+
clientX,
|
|
23210
|
+
clientY
|
|
23211
|
+
};
|
|
23212
|
+
}
|
|
23213
|
+
__name(storeMouseCoords, "storeMouseCoords");
|
|
23214
|
+
function addMouseCoordsListener(doc) {
|
|
23215
|
+
doc.addEventListener("mousemove", storeMouseCoords);
|
|
23216
|
+
}
|
|
23217
|
+
__name(addMouseCoordsListener, "addMouseCoordsListener");
|
|
23218
|
+
function removeMouseCoordsListener(doc) {
|
|
23219
|
+
doc.removeEventListener("mousemove", storeMouseCoords);
|
|
23220
|
+
}
|
|
23221
|
+
__name(removeMouseCoordsListener, "removeMouseCoordsListener");
|
|
23222
|
+
var followCursor = {
|
|
23223
|
+
name: "followCursor",
|
|
23224
|
+
defaultValue: false,
|
|
23225
|
+
fn: /* @__PURE__ */ __name(function fn2(instance) {
|
|
23226
|
+
var reference2 = instance.reference;
|
|
23227
|
+
var doc = getOwnerDocument(instance.props.triggerTarget || reference2);
|
|
23228
|
+
var isInternalUpdate = false;
|
|
23229
|
+
var wasFocusEvent = false;
|
|
23230
|
+
var isUnmounted = true;
|
|
23231
|
+
var prevProps = instance.props;
|
|
23232
|
+
function getIsInitialBehavior() {
|
|
23233
|
+
return instance.props.followCursor === "initial" && instance.state.isVisible;
|
|
23234
|
+
}
|
|
23235
|
+
__name(getIsInitialBehavior, "getIsInitialBehavior");
|
|
23236
|
+
function addListener() {
|
|
23237
|
+
doc.addEventListener("mousemove", onMouseMove);
|
|
23238
|
+
}
|
|
23239
|
+
__name(addListener, "addListener");
|
|
23240
|
+
function removeListener() {
|
|
23241
|
+
doc.removeEventListener("mousemove", onMouseMove);
|
|
23242
|
+
}
|
|
23243
|
+
__name(removeListener, "removeListener");
|
|
23244
|
+
function unsetGetReferenceClientRect() {
|
|
23245
|
+
isInternalUpdate = true;
|
|
23246
|
+
instance.setProps({
|
|
23247
|
+
getReferenceClientRect: null
|
|
23248
|
+
});
|
|
23249
|
+
isInternalUpdate = false;
|
|
23250
|
+
}
|
|
23251
|
+
__name(unsetGetReferenceClientRect, "unsetGetReferenceClientRect");
|
|
23252
|
+
function onMouseMove(event) {
|
|
23253
|
+
var isCursorOverReference = event.target ? reference2.contains(event.target) : true;
|
|
23254
|
+
var followCursor2 = instance.props.followCursor;
|
|
23255
|
+
var clientX = event.clientX, clientY = event.clientY;
|
|
23256
|
+
var rect = reference2.getBoundingClientRect();
|
|
23257
|
+
var relativeX = clientX - rect.left;
|
|
23258
|
+
var relativeY = clientY - rect.top;
|
|
23259
|
+
if (isCursorOverReference || !instance.props.interactive) {
|
|
23260
|
+
instance.setProps({
|
|
23261
|
+
// @ts-ignore - unneeded DOMRect properties
|
|
23262
|
+
getReferenceClientRect: /* @__PURE__ */ __name(function getReferenceClientRect() {
|
|
23263
|
+
var rect2 = reference2.getBoundingClientRect();
|
|
23264
|
+
var x2 = clientX;
|
|
23265
|
+
var y2 = clientY;
|
|
23266
|
+
if (followCursor2 === "initial") {
|
|
23267
|
+
x2 = rect2.left + relativeX;
|
|
23268
|
+
y2 = rect2.top + relativeY;
|
|
23269
|
+
}
|
|
23270
|
+
var top2 = followCursor2 === "horizontal" ? rect2.top : y2;
|
|
23271
|
+
var right2 = followCursor2 === "vertical" ? rect2.right : x2;
|
|
23272
|
+
var bottom2 = followCursor2 === "horizontal" ? rect2.bottom : y2;
|
|
23273
|
+
var left2 = followCursor2 === "vertical" ? rect2.left : x2;
|
|
23274
|
+
return {
|
|
23275
|
+
width: right2 - left2,
|
|
23276
|
+
height: bottom2 - top2,
|
|
23277
|
+
top: top2,
|
|
23278
|
+
right: right2,
|
|
23279
|
+
bottom: bottom2,
|
|
23280
|
+
left: left2
|
|
23281
|
+
};
|
|
23282
|
+
}, "getReferenceClientRect")
|
|
23283
|
+
});
|
|
23284
|
+
}
|
|
23285
|
+
}
|
|
23286
|
+
__name(onMouseMove, "onMouseMove");
|
|
23287
|
+
function create2() {
|
|
23288
|
+
if (instance.props.followCursor) {
|
|
23289
|
+
activeInstances.push({
|
|
23290
|
+
instance,
|
|
23291
|
+
doc
|
|
23292
|
+
});
|
|
23293
|
+
addMouseCoordsListener(doc);
|
|
23294
|
+
}
|
|
23295
|
+
}
|
|
23296
|
+
__name(create2, "create");
|
|
23297
|
+
function destroy2() {
|
|
23298
|
+
activeInstances = activeInstances.filter(function(data) {
|
|
23299
|
+
return data.instance !== instance;
|
|
23300
|
+
});
|
|
23301
|
+
if (activeInstances.filter(function(data) {
|
|
23302
|
+
return data.doc === doc;
|
|
23303
|
+
}).length === 0) {
|
|
23304
|
+
removeMouseCoordsListener(doc);
|
|
23305
|
+
}
|
|
23306
|
+
}
|
|
23307
|
+
__name(destroy2, "destroy");
|
|
23308
|
+
return {
|
|
23309
|
+
onCreate: create2,
|
|
23310
|
+
onDestroy: destroy2,
|
|
23311
|
+
onBeforeUpdate: /* @__PURE__ */ __name(function onBeforeUpdate() {
|
|
23312
|
+
prevProps = instance.props;
|
|
23313
|
+
}, "onBeforeUpdate"),
|
|
23314
|
+
onAfterUpdate: /* @__PURE__ */ __name(function onAfterUpdate(_2, _ref2) {
|
|
23315
|
+
var followCursor2 = _ref2.followCursor;
|
|
23316
|
+
if (isInternalUpdate) {
|
|
23317
|
+
return;
|
|
23318
|
+
}
|
|
23319
|
+
if (followCursor2 !== void 0 && prevProps.followCursor !== followCursor2) {
|
|
23320
|
+
destroy2();
|
|
23321
|
+
if (followCursor2) {
|
|
23322
|
+
create2();
|
|
23323
|
+
if (instance.state.isMounted && !wasFocusEvent && !getIsInitialBehavior()) {
|
|
23324
|
+
addListener();
|
|
23325
|
+
}
|
|
23326
|
+
} else {
|
|
23327
|
+
removeListener();
|
|
23328
|
+
unsetGetReferenceClientRect();
|
|
23329
|
+
}
|
|
23330
|
+
}
|
|
23331
|
+
}, "onAfterUpdate"),
|
|
23332
|
+
onMount: /* @__PURE__ */ __name(function onMount() {
|
|
23333
|
+
if (instance.props.followCursor && !wasFocusEvent) {
|
|
23334
|
+
if (isUnmounted) {
|
|
23335
|
+
onMouseMove(mouseCoords);
|
|
23336
|
+
isUnmounted = false;
|
|
23337
|
+
}
|
|
23338
|
+
if (!getIsInitialBehavior()) {
|
|
23339
|
+
addListener();
|
|
23340
|
+
}
|
|
23341
|
+
}
|
|
23342
|
+
}, "onMount"),
|
|
23343
|
+
onTrigger: /* @__PURE__ */ __name(function onTrigger(_2, event) {
|
|
23344
|
+
if (isMouseEvent$1(event)) {
|
|
23345
|
+
mouseCoords = {
|
|
23346
|
+
clientX: event.clientX,
|
|
23347
|
+
clientY: event.clientY
|
|
23348
|
+
};
|
|
23349
|
+
}
|
|
23350
|
+
wasFocusEvent = event.type === "focus";
|
|
23351
|
+
}, "onTrigger"),
|
|
23352
|
+
onHidden: /* @__PURE__ */ __name(function onHidden() {
|
|
23353
|
+
if (instance.props.followCursor) {
|
|
23354
|
+
unsetGetReferenceClientRect();
|
|
23355
|
+
removeListener();
|
|
23356
|
+
isUnmounted = true;
|
|
23357
|
+
}
|
|
23358
|
+
}, "onHidden")
|
|
23359
|
+
};
|
|
23360
|
+
}, "fn")
|
|
23361
|
+
};
|
|
23201
23362
|
tippy$1.setDefaultProps({
|
|
23202
23363
|
render: render$1
|
|
23203
23364
|
});
|
|
23204
23365
|
const tippy = "";
|
|
23205
23366
|
let tippys = [];
|
|
23367
|
+
let recentlyHidden = false;
|
|
23368
|
+
let clearMe;
|
|
23206
23369
|
(function() {
|
|
23207
23370
|
let lastMouseOverElement = null;
|
|
23208
23371
|
document.addEventListener("mouseover", function(event) {
|
|
@@ -23223,21 +23386,63 @@ var __async = (__this, __arguments, generator) => {
|
|
|
23223
23386
|
lastMouseOverElement = element2;
|
|
23224
23387
|
const id2 = "tippyEllipsizedEl";
|
|
23225
23388
|
let innerRun = false;
|
|
23226
|
-
const inner2 = /* @__PURE__ */ __name((content2, el22) => {
|
|
23389
|
+
const inner2 = /* @__PURE__ */ __name((content2, el22, { dataTitle, dataAvoid, dataAvoidBackup }) => {
|
|
23390
|
+
var _a3, _b3;
|
|
23227
23391
|
innerRun = true;
|
|
23228
23392
|
document.querySelectorAll(`.${id2}`).forEach((elem) => {
|
|
23229
23393
|
elem.classList.remove(id2);
|
|
23230
23394
|
});
|
|
23231
23395
|
el22.classList.add(id2);
|
|
23232
|
-
const inst = tippy$1(`.${id2}`, {
|
|
23396
|
+
const inst = tippy$1(`.${id2}`, __spreadValues(__spreadProps(__spreadValues({
|
|
23397
|
+
plugins: [followCursor],
|
|
23233
23398
|
content: content2,
|
|
23234
|
-
delay: [0, 0],
|
|
23399
|
+
delay: dataTitle && !recentlyHidden ? [1300, 1300] : dataTitle ? [150, 150] : [0, 0],
|
|
23235
23400
|
allowHTML: true
|
|
23236
|
-
}
|
|
23401
|
+
}, dataTitle && {
|
|
23402
|
+
followCursor: dataTitle ? "initial" : false
|
|
23403
|
+
}), {
|
|
23404
|
+
onHidden() {
|
|
23405
|
+
recentlyHidden = true;
|
|
23406
|
+
clearMe && clearTimeout(clearMe);
|
|
23407
|
+
clearMe = setTimeout(() => {
|
|
23408
|
+
if (tippys.length === 0)
|
|
23409
|
+
recentlyHidden = false;
|
|
23410
|
+
}, 700);
|
|
23411
|
+
}
|
|
23412
|
+
}), dataAvoid && {
|
|
23413
|
+
popperOptions: {
|
|
23414
|
+
modifiers: [
|
|
23415
|
+
{
|
|
23416
|
+
name: "myModifier",
|
|
23417
|
+
enabled: true,
|
|
23418
|
+
phase: "beforeWrite",
|
|
23419
|
+
requires: ["computeStyles"],
|
|
23420
|
+
requiresIfExists: ["offset"],
|
|
23421
|
+
fn({ state: state2 }) {
|
|
23422
|
+
const customBoundary = document.querySelector(dataAvoid) || document.querySelector(dataAvoidBackup);
|
|
23423
|
+
if (!customBoundary)
|
|
23424
|
+
return;
|
|
23425
|
+
const a2 = customBoundary.getBoundingClientRect();
|
|
23426
|
+
if (a2.top < state2.rects.reference.y) {
|
|
23427
|
+
const b3 = Math.abs(
|
|
23428
|
+
Math.abs(a2.top - state2.rects.reference.y) - 10
|
|
23429
|
+
);
|
|
23430
|
+
state2.styles.popper.bottom = b3 + "px";
|
|
23431
|
+
}
|
|
23432
|
+
}
|
|
23433
|
+
}
|
|
23434
|
+
]
|
|
23435
|
+
}
|
|
23436
|
+
}));
|
|
23437
|
+
if (dataTitle) {
|
|
23438
|
+
(_b3 = (_a3 = inst[0]) == null ? void 0 : _a3.popper) == null ? void 0 : _b3.classList.add("isDataTitle");
|
|
23439
|
+
}
|
|
23237
23440
|
clearOldTippys(...inst);
|
|
23238
|
-
|
|
23239
|
-
|
|
23240
|
-
|
|
23441
|
+
if (!dataTitle) {
|
|
23442
|
+
inst.forEach((i2) => {
|
|
23443
|
+
i2.show();
|
|
23444
|
+
});
|
|
23445
|
+
}
|
|
23241
23446
|
tippys = [...tippys, ...inst];
|
|
23242
23447
|
if (content2 === el22.getAttribute("title")) {
|
|
23243
23448
|
el22.removeAttribute("title");
|
|
@@ -23252,14 +23457,22 @@ var __async = (__this, __arguments, generator) => {
|
|
|
23252
23457
|
const style2 = window.getComputedStyle(el2);
|
|
23253
23458
|
const whiteSpace = style2.getPropertyValue("white-space");
|
|
23254
23459
|
const textOverflow = style2.getPropertyValue("text-overflow");
|
|
23255
|
-
|
|
23460
|
+
const dataTitle = el2.getAttribute("data-title");
|
|
23461
|
+
const dataAvoid = el2.getAttribute("data-avoid");
|
|
23462
|
+
const dataAvoidBackup = el2.getAttribute("data-avoid-backup");
|
|
23463
|
+
dataTip = el2.getAttribute("data-tip") || dataTitle;
|
|
23256
23464
|
const isEllipsized = whiteSpace === "nowrap" && textOverflow === "ellipsis";
|
|
23465
|
+
const opts2 = {
|
|
23466
|
+
dataTitle,
|
|
23467
|
+
dataAvoid,
|
|
23468
|
+
dataAvoidBackup
|
|
23469
|
+
};
|
|
23257
23470
|
if (dataTip) {
|
|
23258
|
-
inner2(dataTip, el2);
|
|
23471
|
+
inner2(dataTip, el2, opts2);
|
|
23259
23472
|
break;
|
|
23260
23473
|
} else if (isEllipsized && el2.offsetWidth < el2.scrollWidth - 4 && //the -4 is adding a teeny bit of tolerance to fix issues with the column headers getting tooltips even when fully visible
|
|
23261
23474
|
!el2.classList.contains("no-data-tip") && el2.textContent && ((_b2 = (_a2 = el2.textContent) == null ? void 0 : _a2.trim) == null ? void 0 : _b2.call(_a2).length) !== 0) {
|
|
23262
|
-
inner2(el2.textContent, el2);
|
|
23475
|
+
inner2(el2.textContent, el2, opts2);
|
|
23263
23476
|
break;
|
|
23264
23477
|
} else if (isEllipsized && el2.offsetWidth >= el2.scrollWidth)
|
|
23265
23478
|
;
|
|
@@ -26907,10 +27120,10 @@ var __async = (__this, __arguments, generator) => {
|
|
|
26907
27120
|
/* istanbul ignore next */
|
|
26908
27121
|
Object.getOwnPropertyNames
|
|
26909
27122
|
);
|
|
26910
|
-
function toPrimitive$
|
|
27123
|
+
function toPrimitive$3(value) {
|
|
26911
27124
|
return value === null ? null : typeof value === "object" ? "" + value : value;
|
|
26912
27125
|
}
|
|
26913
|
-
__name(toPrimitive$
|
|
27126
|
+
__name(toPrimitive$3, "toPrimitive$3");
|
|
26914
27127
|
function hasProp(target, prop2) {
|
|
26915
27128
|
return objectPrototype$2.hasOwnProperty.call(target, prop2);
|
|
26916
27129
|
}
|
|
@@ -27807,7 +28020,7 @@ var __async = (__this, __arguments, generator) => {
|
|
|
27807
28020
|
return this.name_ + "[" + this.value_ + "]";
|
|
27808
28021
|
}, "toString");
|
|
27809
28022
|
_proto.valueOf = /* @__PURE__ */ __name(function valueOf() {
|
|
27810
|
-
return toPrimitive$
|
|
28023
|
+
return toPrimitive$3(this.get());
|
|
27811
28024
|
}, "valueOf");
|
|
27812
28025
|
_proto[_Symbol$toPrimitive] = function() {
|
|
27813
28026
|
return this.valueOf();
|
|
@@ -27992,7 +28205,7 @@ var __async = (__this, __arguments, generator) => {
|
|
|
27992
28205
|
return this.name_ + "[" + this.derivation.toString() + "]";
|
|
27993
28206
|
}, "toString");
|
|
27994
28207
|
_proto.valueOf = /* @__PURE__ */ __name(function valueOf() {
|
|
27995
|
-
return toPrimitive$
|
|
28208
|
+
return toPrimitive$3(this.get());
|
|
27996
28209
|
}, "valueOf");
|
|
27997
28210
|
_proto[_Symbol$toPrimitive$1] = function() {
|
|
27998
28211
|
return this.valueOf();
|
|
@@ -44651,20 +44864,11 @@ ${latestSubscriptionCallbackError.current.stack}
|
|
|
44651
44864
|
return true;
|
|
44652
44865
|
}
|
|
44653
44866
|
}, "_fails");
|
|
44654
|
-
var _descriptors
|
|
44655
|
-
|
|
44656
|
-
|
|
44657
|
-
|
|
44658
|
-
|
|
44659
|
-
hasRequired_descriptors = 1;
|
|
44660
|
-
_descriptors = !_fails(function() {
|
|
44661
|
-
return Object.defineProperty({}, "a", { get: function() {
|
|
44662
|
-
return 7;
|
|
44663
|
-
} }).a != 7;
|
|
44664
|
-
});
|
|
44665
|
-
return _descriptors;
|
|
44666
|
-
}
|
|
44667
|
-
__name(require_descriptors, "require_descriptors");
|
|
44867
|
+
var _descriptors = !_fails(function() {
|
|
44868
|
+
return Object.defineProperty({}, "a", { get: function() {
|
|
44869
|
+
return 7;
|
|
44870
|
+
} }).a != 7;
|
|
44871
|
+
});
|
|
44668
44872
|
var _domCreate;
|
|
44669
44873
|
var hasRequired_domCreate;
|
|
44670
44874
|
function require_domCreate() {
|
|
@@ -44680,20 +44884,11 @@ ${latestSubscriptionCallbackError.current.stack}
|
|
|
44680
44884
|
return _domCreate;
|
|
44681
44885
|
}
|
|
44682
44886
|
__name(require_domCreate, "require_domCreate");
|
|
44683
|
-
var _ie8DomDefine
|
|
44684
|
-
|
|
44685
|
-
|
|
44686
|
-
|
|
44687
|
-
|
|
44688
|
-
hasRequired_ie8DomDefine = 1;
|
|
44689
|
-
_ie8DomDefine = !require_descriptors() && !_fails(function() {
|
|
44690
|
-
return Object.defineProperty(require_domCreate()("div"), "a", { get: function() {
|
|
44691
|
-
return 7;
|
|
44692
|
-
} }).a != 7;
|
|
44693
|
-
});
|
|
44694
|
-
return _ie8DomDefine;
|
|
44695
|
-
}
|
|
44696
|
-
__name(require_ie8DomDefine, "require_ie8DomDefine");
|
|
44887
|
+
var _ie8DomDefine = !_descriptors && !_fails(function() {
|
|
44888
|
+
return Object.defineProperty(require_domCreate()("div"), "a", { get: function() {
|
|
44889
|
+
return 7;
|
|
44890
|
+
} }).a != 7;
|
|
44891
|
+
});
|
|
44697
44892
|
var isObject$6 = _isObject;
|
|
44698
44893
|
var _toPrimitive$1 = /* @__PURE__ */ __name(function(it, S2) {
|
|
44699
44894
|
if (!isObject$6(it))
|
|
@@ -44707,33 +44902,25 @@ ${latestSubscriptionCallbackError.current.stack}
|
|
|
44707
44902
|
return val2;
|
|
44708
44903
|
throw TypeError("Can't convert object to primitive value");
|
|
44709
44904
|
}, "_toPrimitive$1");
|
|
44710
|
-
var
|
|
44711
|
-
|
|
44712
|
-
|
|
44713
|
-
|
|
44714
|
-
|
|
44715
|
-
|
|
44716
|
-
|
|
44717
|
-
|
|
44718
|
-
|
|
44719
|
-
|
|
44720
|
-
|
|
44721
|
-
|
|
44722
|
-
|
|
44723
|
-
|
|
44724
|
-
|
|
44725
|
-
|
|
44726
|
-
|
|
44727
|
-
|
|
44728
|
-
|
|
44729
|
-
throw TypeError("Accessors not supported!");
|
|
44730
|
-
if ("value" in Attributes)
|
|
44731
|
-
O2[P2] = Attributes.value;
|
|
44732
|
-
return O2;
|
|
44733
|
-
}, "defineProperty");
|
|
44734
|
-
return _objectDp;
|
|
44735
|
-
}
|
|
44736
|
-
__name(require_objectDp, "require_objectDp");
|
|
44905
|
+
var anObject$5 = _anObject;
|
|
44906
|
+
var IE8_DOM_DEFINE$1 = _ie8DomDefine;
|
|
44907
|
+
var toPrimitive$2 = _toPrimitive$1;
|
|
44908
|
+
var dP$3 = Object.defineProperty;
|
|
44909
|
+
_objectDp.f = _descriptors ? Object.defineProperty : /* @__PURE__ */ __name(function defineProperty2(O2, P2, Attributes) {
|
|
44910
|
+
anObject$5(O2);
|
|
44911
|
+
P2 = toPrimitive$2(P2, true);
|
|
44912
|
+
anObject$5(Attributes);
|
|
44913
|
+
if (IE8_DOM_DEFINE$1)
|
|
44914
|
+
try {
|
|
44915
|
+
return dP$3(O2, P2, Attributes);
|
|
44916
|
+
} catch (e2) {
|
|
44917
|
+
}
|
|
44918
|
+
if ("get" in Attributes || "set" in Attributes)
|
|
44919
|
+
throw TypeError("Accessors not supported!");
|
|
44920
|
+
if ("value" in Attributes)
|
|
44921
|
+
O2[P2] = Attributes.value;
|
|
44922
|
+
return O2;
|
|
44923
|
+
}, "defineProperty");
|
|
44737
44924
|
var _propertyDesc = /* @__PURE__ */ __name(function(bitmap, value) {
|
|
44738
44925
|
return {
|
|
44739
44926
|
enumerable: !(bitmap & 1),
|
|
@@ -44742,9 +44929,9 @@ ${latestSubscriptionCallbackError.current.stack}
|
|
|
44742
44929
|
value
|
|
44743
44930
|
};
|
|
44744
44931
|
}, "_propertyDesc");
|
|
44745
|
-
var dP$2 =
|
|
44932
|
+
var dP$2 = _objectDp;
|
|
44746
44933
|
var createDesc$3 = _propertyDesc;
|
|
44747
|
-
var _hide =
|
|
44934
|
+
var _hide = _descriptors ? function(object2, key2, value) {
|
|
44748
44935
|
return dP$2.f(object2, key2, createDesc$3(1, value));
|
|
44749
44936
|
} : function(object2, key2, value) {
|
|
44750
44937
|
object2[key2] = value;
|
|
@@ -44816,25 +45003,16 @@ ${latestSubscriptionCallbackError.current.stack}
|
|
|
44816
45003
|
var _cof = /* @__PURE__ */ __name(function(it) {
|
|
44817
45004
|
return toString$4.call(it).slice(8, -1);
|
|
44818
45005
|
}, "_cof");
|
|
44819
|
-
var
|
|
44820
|
-
var
|
|
44821
|
-
|
|
44822
|
-
|
|
44823
|
-
return _iobject;
|
|
44824
|
-
hasRequired_iobject = 1;
|
|
44825
|
-
var cof2 = _cof;
|
|
44826
|
-
_iobject = Object("z").propertyIsEnumerable(0) ? Object : function(it) {
|
|
44827
|
-
return cof2(it) == "String" ? it.split("") : Object(it);
|
|
44828
|
-
};
|
|
44829
|
-
return _iobject;
|
|
44830
|
-
}
|
|
44831
|
-
__name(require_iobject, "require_iobject");
|
|
45006
|
+
var cof$2 = _cof;
|
|
45007
|
+
var _iobject = Object("z").propertyIsEnumerable(0) ? Object : function(it) {
|
|
45008
|
+
return cof$2(it) == "String" ? it.split("") : Object(it);
|
|
45009
|
+
};
|
|
44832
45010
|
var _defined = /* @__PURE__ */ __name(function(it) {
|
|
44833
45011
|
if (it == void 0)
|
|
44834
45012
|
throw TypeError("Can't call method on " + it);
|
|
44835
45013
|
return it;
|
|
44836
45014
|
}, "_defined");
|
|
44837
|
-
var IObject =
|
|
45015
|
+
var IObject = _iobject;
|
|
44838
45016
|
var defined$2 = _defined;
|
|
44839
45017
|
var _toIobject = /* @__PURE__ */ __name(function(it) {
|
|
44840
45018
|
return IObject(defined$2(it));
|
|
@@ -44931,15 +45109,7 @@ ${latestSubscriptionCallbackError.current.stack}
|
|
|
44931
45109
|
var _objectGops = {};
|
|
44932
45110
|
_objectGops.f = Object.getOwnPropertySymbols;
|
|
44933
45111
|
var _objectPie = {};
|
|
44934
|
-
|
|
44935
|
-
function require_objectPie() {
|
|
44936
|
-
if (hasRequired_objectPie)
|
|
44937
|
-
return _objectPie;
|
|
44938
|
-
hasRequired_objectPie = 1;
|
|
44939
|
-
_objectPie.f = {}.propertyIsEnumerable;
|
|
44940
|
-
return _objectPie;
|
|
44941
|
-
}
|
|
44942
|
-
__name(require_objectPie, "require_objectPie");
|
|
45112
|
+
_objectPie.f = {}.propertyIsEnumerable;
|
|
44943
45113
|
var defined$1 = _defined;
|
|
44944
45114
|
var _toObject = /* @__PURE__ */ __name(function(it) {
|
|
44945
45115
|
return Object(defined$1(it));
|
|
@@ -44950,12 +45120,12 @@ ${latestSubscriptionCallbackError.current.stack}
|
|
|
44950
45120
|
if (hasRequired_objectAssign)
|
|
44951
45121
|
return _objectAssign;
|
|
44952
45122
|
hasRequired_objectAssign = 1;
|
|
44953
|
-
var DESCRIPTORS2 =
|
|
45123
|
+
var DESCRIPTORS2 = _descriptors;
|
|
44954
45124
|
var getKeys2 = _objectKeys;
|
|
44955
45125
|
var gOPS2 = _objectGops;
|
|
44956
|
-
var pIE2 =
|
|
45126
|
+
var pIE2 = _objectPie;
|
|
44957
45127
|
var toObject2 = _toObject;
|
|
44958
|
-
var IObject2 =
|
|
45128
|
+
var IObject2 = _iobject;
|
|
44959
45129
|
var $assign = Object.assign;
|
|
44960
45130
|
_objectAssign = !$assign || _fails(function() {
|
|
44961
45131
|
var A2 = {};
|
|
@@ -45016,10 +45186,10 @@ ${latestSubscriptionCallbackError.current.stack}
|
|
|
45016
45186
|
}, "_iterStep");
|
|
45017
45187
|
var _iterators = {};
|
|
45018
45188
|
var _redefine = _hide;
|
|
45019
|
-
var dP$1 =
|
|
45189
|
+
var dP$1 = _objectDp;
|
|
45020
45190
|
var anObject$4 = _anObject;
|
|
45021
45191
|
var getKeys$1 = _objectKeys;
|
|
45022
|
-
var _objectDps =
|
|
45192
|
+
var _objectDps = _descriptors ? Object.defineProperties : /* @__PURE__ */ __name(function defineProperties2(O2, Properties2) {
|
|
45023
45193
|
anObject$4(O2);
|
|
45024
45194
|
var keys2 = getKeys$1(Properties2);
|
|
45025
45195
|
var length = keys2.length;
|
|
@@ -45086,7 +45256,7 @@ ${latestSubscriptionCallbackError.current.stack}
|
|
|
45086
45256
|
};
|
|
45087
45257
|
$exports.store = store$2;
|
|
45088
45258
|
var _wksExports = _wks.exports;
|
|
45089
|
-
var def =
|
|
45259
|
+
var def = _objectDp.f;
|
|
45090
45260
|
var has$b = _has;
|
|
45091
45261
|
var TAG$1 = _wksExports("toStringTag");
|
|
45092
45262
|
var _setToStringTag = /* @__PURE__ */ __name(function(it, tag, stat) {
|
|
@@ -45359,7 +45529,7 @@ ${latestSubscriptionCallbackError.current.stack}
|
|
|
45359
45529
|
var _isArrayIter = /* @__PURE__ */ __name(function(it) {
|
|
45360
45530
|
return it !== void 0 && (Iterators.Array === it || ArrayProto[ITERATOR] === it);
|
|
45361
45531
|
}, "_isArrayIter");
|
|
45362
|
-
var $defineProperty$1 =
|
|
45532
|
+
var $defineProperty$1 = _objectDp;
|
|
45363
45533
|
var createDesc$2 = _propertyDesc;
|
|
45364
45534
|
var _createProperty = /* @__PURE__ */ __name(function(object2, index2, value) {
|
|
45365
45535
|
if (index2 in object2)
|
|
@@ -45488,7 +45658,7 @@ ${latestSubscriptionCallbackError.current.stack}
|
|
|
45488
45658
|
}
|
|
45489
45659
|
}, "_default$8");
|
|
45490
45660
|
var $export$3 = _export;
|
|
45491
|
-
$export$3($export$3.S + $export$3.F * !
|
|
45661
|
+
$export$3($export$3.S + $export$3.F * !_descriptors, "Object", { defineProperty: _objectDp.f });
|
|
45492
45662
|
var $Object$1 = _coreExports.Object;
|
|
45493
45663
|
var defineProperty$6 = /* @__PURE__ */ __name(function defineProperty2(it, key2, desc) {
|
|
45494
45664
|
return $Object$1.defineProperty(it, key2, desc);
|
|
@@ -45529,7 +45699,7 @@ ${latestSubscriptionCallbackError.current.stack}
|
|
|
45529
45699
|
var META$1 = _uid("meta");
|
|
45530
45700
|
var isObject$5 = _isObject;
|
|
45531
45701
|
var has$9 = _has;
|
|
45532
|
-
var setDesc =
|
|
45702
|
+
var setDesc = _objectDp.f;
|
|
45533
45703
|
var id$1 = 0;
|
|
45534
45704
|
var isExtensible = Object.isExtensible || function() {
|
|
45535
45705
|
return true;
|
|
@@ -45582,7 +45752,7 @@ ${latestSubscriptionCallbackError.current.stack}
|
|
|
45582
45752
|
var _metaExports = _meta.exports;
|
|
45583
45753
|
var core = _coreExports;
|
|
45584
45754
|
var wksExt$1 = _wksExt;
|
|
45585
|
-
var defineProperty$4 =
|
|
45755
|
+
var defineProperty$4 = _objectDp.f;
|
|
45586
45756
|
var _wksDefine = /* @__PURE__ */ __name(function(name2) {
|
|
45587
45757
|
var $Symbol2 = core.Symbol || (core.Symbol = {});
|
|
45588
45758
|
if (name2.charAt(0) != "_" && !(name2 in $Symbol2))
|
|
@@ -45590,7 +45760,7 @@ ${latestSubscriptionCallbackError.current.stack}
|
|
|
45590
45760
|
}, "_wksDefine");
|
|
45591
45761
|
var getKeys = _objectKeys;
|
|
45592
45762
|
var gOPS$1 = _objectGops;
|
|
45593
|
-
var pIE$1 =
|
|
45763
|
+
var pIE$1 = _objectPie;
|
|
45594
45764
|
var _enumKeys = /* @__PURE__ */ __name(function(it) {
|
|
45595
45765
|
var result = getKeys(it);
|
|
45596
45766
|
var getSymbols2 = gOPS$1.f;
|
|
@@ -45631,14 +45801,14 @@ ${latestSubscriptionCallbackError.current.stack}
|
|
|
45631
45801
|
return windowNames && toString$3.call(it) == "[object Window]" ? getWindowNames(it) : gOPN$1(toIObject$2(it));
|
|
45632
45802
|
}, "getOwnPropertyNames");
|
|
45633
45803
|
var _objectGopd = {};
|
|
45634
|
-
var pIE =
|
|
45804
|
+
var pIE = _objectPie;
|
|
45635
45805
|
var createDesc$1 = _propertyDesc;
|
|
45636
45806
|
var toIObject$1 = _toIobject;
|
|
45637
45807
|
var toPrimitive$1 = _toPrimitive$1;
|
|
45638
45808
|
var has$8 = _has;
|
|
45639
|
-
var IE8_DOM_DEFINE =
|
|
45809
|
+
var IE8_DOM_DEFINE = _ie8DomDefine;
|
|
45640
45810
|
var gOPD$2 = Object.getOwnPropertyDescriptor;
|
|
45641
|
-
_objectGopd.f =
|
|
45811
|
+
_objectGopd.f = _descriptors ? gOPD$2 : /* @__PURE__ */ __name(function getOwnPropertyDescriptor2(O2, P2) {
|
|
45642
45812
|
O2 = toIObject$1(O2);
|
|
45643
45813
|
P2 = toPrimitive$1(P2, true);
|
|
45644
45814
|
if (IE8_DOM_DEFINE)
|
|
@@ -45651,7 +45821,7 @@ ${latestSubscriptionCallbackError.current.stack}
|
|
|
45651
45821
|
}, "getOwnPropertyDescriptor");
|
|
45652
45822
|
var global$1 = _globalExports;
|
|
45653
45823
|
var has$7 = _has;
|
|
45654
|
-
var DESCRIPTORS =
|
|
45824
|
+
var DESCRIPTORS = _descriptors;
|
|
45655
45825
|
var $export$2 = _export;
|
|
45656
45826
|
var redefine = _redefine;
|
|
45657
45827
|
var META = _metaExports.KEY;
|
|
@@ -45674,7 +45844,7 @@ ${latestSubscriptionCallbackError.current.stack}
|
|
|
45674
45844
|
var gOPNExt = _objectGopnExt;
|
|
45675
45845
|
var $GOPD = _objectGopd;
|
|
45676
45846
|
var $GOPS = _objectGops;
|
|
45677
|
-
var $DP =
|
|
45847
|
+
var $DP = _objectDp;
|
|
45678
45848
|
var $keys$1 = _objectKeys;
|
|
45679
45849
|
var gOPD$1 = $GOPD.f;
|
|
45680
45850
|
var dP = $DP.f;
|
|
@@ -45811,7 +45981,7 @@ ${latestSubscriptionCallbackError.current.stack}
|
|
|
45811
45981
|
$GOPD.f = $getOwnPropertyDescriptor;
|
|
45812
45982
|
$DP.f = $defineProperty;
|
|
45813
45983
|
_objectGopn.f = gOPNExt.f = $getOwnPropertyNames;
|
|
45814
|
-
|
|
45984
|
+
_objectPie.f = $propertyIsEnumerable;
|
|
45815
45985
|
$GOPS.f = $getOwnPropertySymbols;
|
|
45816
45986
|
if (DESCRIPTORS && !_library) {
|
|
45817
45987
|
redefine(ObjectProto, "propertyIsEnumerable", $propertyIsEnumerable);
|
|
@@ -88405,12 +88575,13 @@ ${latestSubscriptionCallbackError.current.stack}
|
|
|
88405
88575
|
tabIndex: -1,
|
|
88406
88576
|
onKeyDown: (e2) => {
|
|
88407
88577
|
var _a2, _b2, _c2, _d2, _e, _f;
|
|
88408
|
-
const
|
|
88409
|
-
|
|
88578
|
+
const isTabKey = e2.keyCode === 9;
|
|
88579
|
+
const isArrowKey = e2.keyCode >= 37 && e2.keyCode <= 40;
|
|
88580
|
+
if (isArrowKey && ((_a2 = e2.target) == null ? void 0 : _a2.tagName) !== "INPUT" || isTabKey) {
|
|
88410
88581
|
const { schema: schema22, entities: entities2 } = computePresets(this.props);
|
|
88411
88582
|
const left2 = e2.keyCode === 37;
|
|
88412
88583
|
const up = e2.keyCode === 38;
|
|
88413
|
-
const down = e2.keyCode === 40;
|
|
88584
|
+
const down = e2.keyCode === 40 || e2.keyCode === 13;
|
|
88414
88585
|
let cellIdToUse = this.getPrimarySelectedCellId();
|
|
88415
88586
|
const pathToIndex = getFieldPathToIndex(schema22);
|
|
88416
88587
|
const entityMap = getEntityIdToEntity(entities2);
|
|
@@ -101531,9 +101702,7 @@ ${latestSubscriptionCallbackError.current.stack}
|
|
|
101531
101702
|
if (!acceptedFiles.length)
|
|
101532
101703
|
return;
|
|
101533
101704
|
setLoading(true);
|
|
101534
|
-
|
|
101535
|
-
acceptedFiles = acceptedFiles.slice(0, fileLimit);
|
|
101536
|
-
}
|
|
101705
|
+
acceptedFiles = trimFiles(acceptedFiles, fileLimit);
|
|
101537
101706
|
acceptedFiles.forEach((file) => {
|
|
101538
101707
|
file.preview = URL.createObjectURL(file);
|
|
101539
101708
|
file.loading = true;
|
|
@@ -101719,9 +101888,9 @@ ${latestSubscriptionCallbackError.current.stack}
|
|
|
101719
101888
|
`It looks like there wasn't any data in your file. Please add some data and try again`
|
|
101720
101889
|
);
|
|
101721
101890
|
}
|
|
101722
|
-
const cleanedFileList =
|
|
101723
|
-
|
|
101724
|
-
fileLimit
|
|
101891
|
+
const cleanedFileList = trimFiles(
|
|
101892
|
+
[...toKeep, ...fileListToUse],
|
|
101893
|
+
fileLimit
|
|
101725
101894
|
);
|
|
101726
101895
|
handleSecondHalfOfUpload({ acceptedFiles, cleanedFileList });
|
|
101727
101896
|
})
|
|
@@ -101969,6 +102138,18 @@ ${latestSubscriptionCallbackError.current.stack}
|
|
|
101969
102138
|
__name(stripId, "stripId");
|
|
101970
102139
|
const manualEnterMessage = "Build CSV File";
|
|
101971
102140
|
const manualEnterSubMessage = "Paste or type data to build a CSV file";
|
|
102141
|
+
function trimFiles(incomingFiles, fileLimit) {
|
|
102142
|
+
if (fileLimit) {
|
|
102143
|
+
if (fileLimit && incomingFiles.length > fileLimit) {
|
|
102144
|
+
window.toastr && window.toastr.warning(
|
|
102145
|
+
`Detected additional files in your upload that we are ignoring. You can only upload ${fileLimit} file${fileLimit > 1 ? "s" : ""} at a time.`
|
|
102146
|
+
);
|
|
102147
|
+
}
|
|
102148
|
+
return incomingFiles.slice(0, fileLimit);
|
|
102149
|
+
}
|
|
102150
|
+
return incomingFiles;
|
|
102151
|
+
}
|
|
102152
|
+
__name(trimFiles, "trimFiles");
|
|
101972
102153
|
const style$w = "";
|
|
101973
102154
|
function DNALoader({ style: style2, className }) {
|
|
101974
102155
|
return /* @__PURE__ */ React$2.createElement("div", { className: classNames$1("dna-loader", className), style: style2 }, /* @__PURE__ */ React$2.createElement("div", { className: "nucleobase" }), /* @__PURE__ */ React$2.createElement("div", { className: "nucleobase" }), /* @__PURE__ */ React$2.createElement("div", { className: "nucleobase" }), /* @__PURE__ */ React$2.createElement("div", { className: "nucleobase" }), /* @__PURE__ */ React$2.createElement("div", { className: "nucleobase" }), /* @__PURE__ */ React$2.createElement("div", { className: "nucleobase" }), /* @__PURE__ */ React$2.createElement("div", { className: "nucleobase" }), /* @__PURE__ */ React$2.createElement("div", { className: "nucleobase" }), /* @__PURE__ */ React$2.createElement("div", { className: "nucleobase" }), /* @__PURE__ */ React$2.createElement("div", { className: "nucleobase" }));
|
|
@@ -123873,18 +124054,20 @@ ${latestSubscriptionCallbackError.current.stack}
|
|
|
123873
124054
|
const isKeyRunon = isKeywordRunon(line);
|
|
123874
124055
|
const isSubKey = isSubKeyword(line);
|
|
123875
124056
|
const isKey2 = isKeyword(line);
|
|
123876
|
-
if (
|
|
123877
|
-
|
|
123878
|
-
|
|
123879
|
-
|
|
123880
|
-
|
|
123881
|
-
|
|
123882
|
-
|
|
123883
|
-
|
|
123884
|
-
|
|
123885
|
-
|
|
123886
|
-
|
|
123887
|
-
|
|
124057
|
+
if (!isKeyRunon) {
|
|
124058
|
+
if (key2 === "LOCUS") {
|
|
124059
|
+
LINETYPE = key2;
|
|
124060
|
+
} else if (key2 === "REFERENCE") {
|
|
124061
|
+
LINETYPE = key2;
|
|
124062
|
+
} else if (key2 === "FEATURES") {
|
|
124063
|
+
LINETYPE = key2;
|
|
124064
|
+
} else if (key2 === "ORIGIN") {
|
|
124065
|
+
LINETYPE = key2;
|
|
124066
|
+
} else if (key2 === "//") {
|
|
124067
|
+
LINETYPE = key2;
|
|
124068
|
+
} else if (isKey2 === true) {
|
|
124069
|
+
LINETYPE = key2;
|
|
124070
|
+
}
|
|
123888
124071
|
}
|
|
123889
124072
|
if (line.trim() === "" || key2 === ";") {
|
|
123890
124073
|
return false;
|
|
@@ -150445,8 +150628,23 @@ ${seq.sequence}
|
|
|
150445
150628
|
}, hoveredAnnotationActions)
|
|
150446
150629
|
),
|
|
150447
150630
|
withHandlers({
|
|
150448
|
-
onMouseOver: (props) => (e2)
|
|
150631
|
+
onMouseOver: (props) => function(e2) {
|
|
150449
150632
|
var _a2;
|
|
150633
|
+
const target = e2.target;
|
|
150634
|
+
let alreadyHandled = false;
|
|
150635
|
+
let currentElement = target;
|
|
150636
|
+
while (currentElement) {
|
|
150637
|
+
if (currentElement === e2.currentTarget) {
|
|
150638
|
+
break;
|
|
150639
|
+
}
|
|
150640
|
+
if (currentElement.classList.contains("hoverHelper")) {
|
|
150641
|
+
alreadyHandled = true;
|
|
150642
|
+
break;
|
|
150643
|
+
}
|
|
150644
|
+
currentElement = currentElement.parentElement;
|
|
150645
|
+
}
|
|
150646
|
+
if (alreadyHandled)
|
|
150647
|
+
return;
|
|
150450
150648
|
const { editorName, id: id2, hoveredAnnotationUpdate: hoveredAnnotationUpdate2 } = props;
|
|
150451
150649
|
const isIdHashmap = typeof id2 === "object";
|
|
150452
150650
|
const idToPass = isIdHashmap ? Object.keys(id2)[0] : id2;
|
|
@@ -150456,7 +150654,6 @@ ${seq.sequence}
|
|
|
150456
150654
|
}
|
|
150457
150655
|
if (window.__veDragging || window.__veScrolling)
|
|
150458
150656
|
return;
|
|
150459
|
-
e2.stopPropagation();
|
|
150460
150657
|
hoveredAnnotationUpdate2 && hoveredAnnotationUpdate2(idToPass, { editorName });
|
|
150461
150658
|
},
|
|
150462
150659
|
onMouseLeave: (props) => (e2) => {
|
|
@@ -154975,7 +155172,7 @@ Part of ${annotation.translationType} Translation from BPs ${annotation.start +
|
|
|
154975
155172
|
}
|
|
154976
155173
|
__name(showFileDialog, "showFileDialog");
|
|
154977
155174
|
const name = "@teselagen/ove";
|
|
154978
|
-
const version = "0.3.
|
|
155175
|
+
const version = "0.3.26";
|
|
154979
155176
|
const main = "./src/index.js";
|
|
154980
155177
|
const exports$1 = {
|
|
154981
155178
|
".": {
|
|
@@ -161864,438 +162061,18 @@ Part of ${annotation.translationType} Translation from BPs ${annotation.start +
|
|
|
161864
162061
|
}
|
|
161865
162062
|
__name(combineLabels, "combineLabels");
|
|
161866
162063
|
const style$f = "";
|
|
161867
|
-
|
|
161868
|
-
|
|
161869
|
-
|
|
161870
|
-
|
|
161871
|
-
|
|
161872
|
-
|
|
161873
|
-
|
|
161874
|
-
|
|
161875
|
-
|
|
161876
|
-
|
|
161877
|
-
extraSideSpace,
|
|
161878
|
-
smartCircViewLabelRender,
|
|
161879
|
-
radius: outerRadius,
|
|
161880
|
-
editorName,
|
|
161881
|
-
noRedux,
|
|
161882
|
-
rotationRadians,
|
|
161883
|
-
textScalingFactor,
|
|
161884
|
-
labelLineIntensity: labelLineIntensity2,
|
|
161885
|
-
labelSize: labelSize2 = 8,
|
|
161886
|
-
fontHeightMultiplier = 2.4,
|
|
161887
|
-
circularViewWidthVsHeightRatio,
|
|
161888
|
-
//width of the circular view
|
|
161889
|
-
condenseOverflowingXLabels = true
|
|
161890
|
-
//set to true to make labels tha
|
|
161891
|
-
}) {
|
|
161892
|
-
if (!labels2.length) {
|
|
161893
|
-
return {
|
|
161894
|
-
component: null,
|
|
161895
|
-
height: 15
|
|
161896
|
-
};
|
|
161897
|
-
}
|
|
161898
|
-
const originalOuterRadius = outerRadius;
|
|
161899
|
-
outerRadius += smartCircViewLabelRender ? 10 : 25;
|
|
161900
|
-
const radius = outerRadius;
|
|
161901
|
-
const outerPointRadius = outerRadius - 20;
|
|
161902
|
-
const fontWidth = labelSize2 * (textScalingFactor < 1 ? textScalingFactor : 1);
|
|
161903
|
-
const fontHeight = fontWidth * lodashExports.clamp(fontHeightMultiplier, 1.5, 3.5);
|
|
161904
|
-
const labelPoints = labels2.map(function(label) {
|
|
161905
|
-
const {
|
|
161906
|
-
annotationCenterAngle: _annotationCenterAngle,
|
|
161907
|
-
annotationCenterRadius
|
|
161908
|
-
} = label;
|
|
161909
|
-
const annotationCenterAngle = _annotationCenterAngle + (rotationRadians || 0);
|
|
161910
|
-
return __spreadProps(__spreadValues(__spreadProps(__spreadValues({}, label), {
|
|
161911
|
-
width: getTextLength(label.text) * fontWidth,
|
|
161912
|
-
//three points define the label:
|
|
161913
|
-
innerPoint: __spreadProps(__spreadValues({}, polarToSpecialCartesian$1(
|
|
161914
|
-
annotationCenterRadius,
|
|
161915
|
-
annotationCenterAngle
|
|
161916
|
-
)), {
|
|
161917
|
-
radius: annotationCenterRadius,
|
|
161918
|
-
angle: annotationCenterAngle
|
|
161919
|
-
}),
|
|
161920
|
-
truncatedInnerPoint: __spreadProps(__spreadValues({}, polarToSpecialCartesian$1(
|
|
161921
|
-
outerPointRadius - 15,
|
|
161922
|
-
annotationCenterAngle
|
|
161923
|
-
)), {
|
|
161924
|
-
radius: outerPointRadius - 15,
|
|
161925
|
-
angle: annotationCenterAngle
|
|
161926
|
-
}),
|
|
161927
|
-
outerPoint: __spreadProps(__spreadValues({}, polarToSpecialCartesian$1(outerPointRadius, annotationCenterAngle)), {
|
|
161928
|
-
radius: outerPointRadius,
|
|
161929
|
-
angle: annotationCenterAngle
|
|
161930
|
-
})
|
|
161931
|
-
}), polarToSpecialCartesian$1(radius, annotationCenterAngle)), {
|
|
161932
|
-
radius: radius + 10,
|
|
161933
|
-
angle: annotationCenterAngle
|
|
161934
|
-
});
|
|
161935
|
-
}).map(function(label) {
|
|
161936
|
-
label.labelAndSublabels = [label];
|
|
161937
|
-
label.labelIds = { [label.id]: true };
|
|
161938
|
-
return label;
|
|
161939
|
-
});
|
|
161940
|
-
let maxRadius = 1;
|
|
161941
|
-
const groupedLabels = relaxLabelAngles(labelPoints, fontHeight, outerRadius).filter((l2) => !!l2).map((originalLabel) => {
|
|
161942
|
-
if (smartCircViewLabelRender) {
|
|
161943
|
-
const newR = Math.sqrt(
|
|
161944
|
-
Math.pow(
|
|
161945
|
-
Math.abs(originalLabel.x) + Math.max(0, originalLabel.text.length * 11 - extraSideSpace / 2),
|
|
161946
|
-
2
|
|
161947
|
-
) + Math.pow(Math.abs(originalLabel.y), 2)
|
|
161948
|
-
);
|
|
161949
|
-
if (newR > maxRadius)
|
|
161950
|
-
maxRadius = newR;
|
|
161951
|
-
}
|
|
161952
|
-
if (originalLabel.highPriorityLabel) {
|
|
161953
|
-
return originalLabel;
|
|
161954
|
-
}
|
|
161955
|
-
const _highPrioritySublabel = originalLabel.labelAndSublabels.find(
|
|
161956
|
-
(l2) => l2.highPriorityLabel
|
|
161957
|
-
);
|
|
161958
|
-
if (_highPrioritySublabel) {
|
|
161959
|
-
const highPrioritySublabel = lodashExports.cloneDeep(_highPrioritySublabel);
|
|
161960
|
-
[
|
|
161961
|
-
"angle",
|
|
161962
|
-
"annotationCenterAngle",
|
|
161963
|
-
"annotationCenterRadius",
|
|
161964
|
-
"innerPoint",
|
|
161965
|
-
"labelAndSublabels",
|
|
161966
|
-
"labelIds",
|
|
161967
|
-
"outerPoint",
|
|
161968
|
-
"radius",
|
|
161969
|
-
"truncatedInnerPoint",
|
|
161970
|
-
"x",
|
|
161971
|
-
"y"
|
|
161972
|
-
].forEach((k2) => {
|
|
161973
|
-
highPrioritySublabel[k2] = originalLabel[k2];
|
|
161974
|
-
});
|
|
161975
|
-
delete originalLabel.labelAndSublabels;
|
|
161976
|
-
return highPrioritySublabel;
|
|
161977
|
-
}
|
|
161978
|
-
return originalLabel;
|
|
161979
|
-
});
|
|
161980
|
-
window.isLabelGroupOpen = false;
|
|
161981
|
-
return {
|
|
161982
|
-
component: /* @__PURE__ */ React$2.createElement(
|
|
161983
|
-
"g",
|
|
161984
|
-
{
|
|
161985
|
-
key: "veLabels",
|
|
161986
|
-
className: "veLabels ve-monospace-font",
|
|
161987
|
-
transform: `rotate(-${rotationRadians * 180 / Math.PI})`
|
|
161988
|
-
},
|
|
161989
|
-
/* @__PURE__ */ React$2.createElement(
|
|
161990
|
-
DrawGroupedLabels,
|
|
161991
|
-
__spreadValues({}, {
|
|
161992
|
-
editorName,
|
|
161993
|
-
noRedux,
|
|
161994
|
-
groupedLabels,
|
|
161995
|
-
circularViewWidthVsHeightRatio,
|
|
161996
|
-
fontWidth,
|
|
161997
|
-
fontHeight,
|
|
161998
|
-
condenseOverflowingXLabels,
|
|
161999
|
-
outerRadius,
|
|
162000
|
-
labelLineIntensity: labelLineIntensity2
|
|
162001
|
-
})
|
|
162002
|
-
)
|
|
162003
|
-
),
|
|
162004
|
-
//we use the <use> tag to position the hovered label group at the top of the stack
|
|
162005
|
-
//point events: none is to fix a click bug..
|
|
162006
|
-
//http://stackoverflow.com/questions/24078524/svg-click-events-not-firing-bubbling-when-using-use-element
|
|
162007
|
-
height: smartCircViewLabelRender ? Math.min(105, maxRadius - originalOuterRadius) : 120
|
|
162008
|
-
};
|
|
162009
|
-
}
|
|
162010
|
-
__name(Labels, "Labels");
|
|
162011
|
-
const DrawLabelGroup = withHover(function({
|
|
162012
|
-
hovered,
|
|
162013
|
-
className,
|
|
162014
|
-
label,
|
|
162015
|
-
labelAndSublabels,
|
|
162016
|
-
fontWidth,
|
|
162017
|
-
noRedux,
|
|
162018
|
-
fontHeight,
|
|
162019
|
-
outerRadius,
|
|
162020
|
-
onMouseLeave,
|
|
162021
|
-
onMouseOver,
|
|
162022
|
-
editorName,
|
|
162023
|
-
circularViewWidthVsHeightRatio,
|
|
162024
|
-
condenseOverflowingXLabels,
|
|
162025
|
-
hoveredId,
|
|
162026
|
-
labelLineIntensity: labelLineIntensity2,
|
|
162027
|
-
// labelIds,
|
|
162028
|
-
multipleLabels
|
|
162029
|
-
// isIdHashmap,
|
|
162030
|
-
}) {
|
|
162031
|
-
let { text: text2 = "Unlabeled" } = label;
|
|
162032
|
-
const textLength = getTextLength(text2);
|
|
162033
|
-
let groupLabelXStart;
|
|
162034
|
-
if (label.labelAndSublabels && label.labelAndSublabels.length > 1) {
|
|
162035
|
-
text2 = "+" + (label.labelAndSublabels.length - 1) + "," + text2;
|
|
162036
|
-
}
|
|
162037
|
-
const labelLength = textLength * fontWidth;
|
|
162038
|
-
const maxLabelLength = labelAndSublabels.reduce(function(currentLength, { text: text22 = "Unlabeled" }) {
|
|
162039
|
-
const _textLength = getTextLength(text22);
|
|
162040
|
-
if (_textLength > currentLength) {
|
|
162041
|
-
return _textLength;
|
|
162042
|
-
}
|
|
162043
|
-
return currentLength;
|
|
162044
|
-
}, 0);
|
|
162045
|
-
const maxLabelWidth = maxLabelLength * fontWidth;
|
|
162046
|
-
const labelOnLeft = label.angle > Math.PI;
|
|
162047
|
-
let labelXStart = label.x - (labelOnLeft ? labelLength : 0);
|
|
162048
|
-
if (condenseOverflowingXLabels) {
|
|
162049
|
-
const distancePastBoundary = Math.abs(label.x + (labelOnLeft ? -labelLength : labelLength)) - (outerRadius + 90) * Math.max(1, circularViewWidthVsHeightRatio);
|
|
162050
|
-
if (distancePastBoundary > 0) {
|
|
162051
|
-
const numberOfCharsToChop = Math.ceil(distancePastBoundary / fontWidth) + 2;
|
|
162052
|
-
text2 = text2.slice(0, -numberOfCharsToChop) + "..";
|
|
162053
|
-
groupLabelXStart = labelXStart + (labelOnLeft ? distancePastBoundary : -distancePastBoundary);
|
|
162054
|
-
labelXStart += labelOnLeft ? distancePastBoundary : 0;
|
|
162055
|
-
}
|
|
162056
|
-
}
|
|
162057
|
-
const dy = fontHeight;
|
|
162058
|
-
const textYStart = label.y + dy / 2;
|
|
162059
|
-
let content2;
|
|
162060
|
-
const labelClass = ` veLabelText veCircularViewLabelText clickable ${label.color} `;
|
|
162061
|
-
if ((multipleLabels || groupLabelXStart !== void 0) && hovered) {
|
|
162062
|
-
window.isLabelGroupOpen = true;
|
|
162063
|
-
let hoveredLabel;
|
|
162064
|
-
if (groupLabelXStart !== void 0) {
|
|
162065
|
-
labelXStart = groupLabelXStart;
|
|
162066
|
-
}
|
|
162067
|
-
labelAndSublabels.some(function(label2) {
|
|
162068
|
-
if (label2.id === hoveredId) {
|
|
162069
|
-
hoveredLabel = label2;
|
|
162070
|
-
return true;
|
|
162071
|
-
}
|
|
162072
|
-
return false;
|
|
162073
|
-
});
|
|
162074
|
-
if (!hoveredLabel) {
|
|
162075
|
-
hoveredLabel = label;
|
|
162076
|
-
}
|
|
162077
|
-
let labelYStart = label.y;
|
|
162078
|
-
const labelGroupHeight = labelAndSublabels.length * dy;
|
|
162079
|
-
const labelGroupBottom = label.y + labelGroupHeight;
|
|
162080
|
-
if (labelGroupBottom > outerRadius + 20) {
|
|
162081
|
-
labelYStart -= (label.labelAndSublabels.length - 1) * dy;
|
|
162082
|
-
}
|
|
162083
|
-
const line = LabelLine(
|
|
162084
|
-
[
|
|
162085
|
-
hoveredLabel.innerPoint,
|
|
162086
|
-
// hoveredLabel.labelAndSublabels &&
|
|
162087
|
-
// hoveredLabel.labelAndSublabels.length > 0
|
|
162088
|
-
// ? hoveredLabel.outerPoint
|
|
162089
|
-
// : {},
|
|
162090
|
-
label
|
|
162091
|
-
],
|
|
162092
|
-
{ style: { opacity: 1 }, strokeWidth: 2 }
|
|
162093
|
-
);
|
|
162094
|
-
content2 = [
|
|
162095
|
-
line,
|
|
162096
|
-
/* @__PURE__ */ React$2.createElement(PutMyParentOnTop, { editorName, key: "gGroup" }, /* @__PURE__ */ React$2.createElement("g", { className: className + " topLevelLabelGroup" }, /* @__PURE__ */ React$2.createElement(
|
|
162097
|
-
"rect",
|
|
162098
|
-
{
|
|
162099
|
-
onMouseOver: cancelFn,
|
|
162100
|
-
x: labelXStart - 4,
|
|
162101
|
-
y: labelYStart - dy / 2,
|
|
162102
|
-
width: maxLabelWidth + 24,
|
|
162103
|
-
height: labelGroupHeight + 4,
|
|
162104
|
-
fill: "white",
|
|
162105
|
-
stroke: "black"
|
|
162106
|
-
}
|
|
162107
|
-
), /* @__PURE__ */ React$2.createElement(
|
|
162108
|
-
"text",
|
|
162109
|
-
{
|
|
162110
|
-
x: labelXStart,
|
|
162111
|
-
y: labelYStart,
|
|
162112
|
-
style: {
|
|
162113
|
-
fontSize: fontWidth * fontWidthToFontSize,
|
|
162114
|
-
fontStyle: label.fontStyle
|
|
162115
|
-
}
|
|
162116
|
-
},
|
|
162117
|
-
labelAndSublabels.map(function(label2, index2) {
|
|
162118
|
-
return /* @__PURE__ */ React$2.createElement(
|
|
162119
|
-
DrawGroupInnerLabel,
|
|
162120
|
-
__spreadValues({
|
|
162121
|
-
isSubLabel: true,
|
|
162122
|
-
noRedux,
|
|
162123
|
-
editorName,
|
|
162124
|
-
logHover: true,
|
|
162125
|
-
key: "labelItem" + index2,
|
|
162126
|
-
className: (label2.className || "") + labelClass + " veDrawGroupInnerLabel",
|
|
162127
|
-
id: label2.id
|
|
162128
|
-
}, { labelXStart, label: label2, fontWidth, index: index2, dy })
|
|
162129
|
-
);
|
|
162130
|
-
})
|
|
162131
|
-
)))
|
|
162132
|
-
];
|
|
162133
|
-
} else {
|
|
162134
|
-
content2 = [
|
|
162135
|
-
/* @__PURE__ */ React$2.createElement("title", { key: "labeltitle" }, label.title || label.text),
|
|
162136
|
-
/* @__PURE__ */ React$2.createElement(
|
|
162137
|
-
"text",
|
|
162138
|
-
{
|
|
162139
|
-
key: "text",
|
|
162140
|
-
x: labelXStart,
|
|
162141
|
-
textLength: getTextLength(text2) * fontWidth,
|
|
162142
|
-
lengthAdjust: "spacing",
|
|
162143
|
-
className: labelClass + label.className + (hovered ? " veAnnotationHovered" : ""),
|
|
162144
|
-
y: textYStart,
|
|
162145
|
-
style: {
|
|
162146
|
-
fontSize: fontWidth * fontWidthToFontSize,
|
|
162147
|
-
fontStyle: label.fontStyle,
|
|
162148
|
-
fill: label.color || "black"
|
|
162149
|
-
// stroke: label.color ? label.color : "black"
|
|
162150
|
-
}
|
|
162151
|
-
},
|
|
162152
|
-
text2
|
|
162153
|
-
),
|
|
162154
|
-
LabelLine(
|
|
162155
|
-
[
|
|
162156
|
-
label.innerPoint,
|
|
162157
|
-
// hovered || label.annotationType === "part" //because parts live on the outside of the sequence, we don't need to show the truncated point, we can just point to them directly
|
|
162158
|
-
// ? label.innerPoint
|
|
162159
|
-
// : label.truncatedInnerPoint,
|
|
162160
|
-
label.outerPoint,
|
|
162161
|
-
label
|
|
162162
|
-
],
|
|
162163
|
-
hovered ? { style: { opacity: 1 }, strokeWidth: 2 } : { style: { opacity: labelLineIntensity2 } }
|
|
162164
|
-
)
|
|
162165
|
-
];
|
|
162166
|
-
}
|
|
162167
|
-
return /* @__PURE__ */ React$2.createElement(
|
|
162168
|
-
"g",
|
|
162169
|
-
__spreadValues(__spreadValues({}, { onMouseLeave, onMouseOver }), {
|
|
162170
|
-
onClick: label.onClick,
|
|
162171
|
-
onDoubleClick: label.onDoubleClick || lodashExports.noop,
|
|
162172
|
-
onContextMenu: label.onContextMenu || lodashExports.noop
|
|
162173
|
-
}),
|
|
162174
|
-
content2
|
|
162175
|
-
);
|
|
162176
|
-
});
|
|
162177
|
-
function LabelLine(pointArray, options) {
|
|
162178
|
-
let points = "";
|
|
162179
|
-
pointArray.forEach(function({ x: x2, y: y2 }) {
|
|
162180
|
-
if (!x2 && x2 !== 0)
|
|
162181
|
-
return;
|
|
162182
|
-
points += `${x2},${y2} `;
|
|
162183
|
-
});
|
|
162184
|
-
return /* @__PURE__ */ React$2.createElement(React$2.Fragment, { key: "labelLine" }, /* @__PURE__ */ React$2.createElement(
|
|
162185
|
-
"polyline",
|
|
162186
|
-
__spreadValues({}, __spreadValues({
|
|
162187
|
-
key: "polyline-long",
|
|
162188
|
-
points,
|
|
162189
|
-
stroke: "black",
|
|
162190
|
-
fill: "none",
|
|
162191
|
-
strokeWidth: 1,
|
|
162192
|
-
className: "veLabelLine"
|
|
162193
|
-
}, options))
|
|
162194
|
-
));
|
|
162195
|
-
}
|
|
162196
|
-
__name(LabelLine, "LabelLine");
|
|
162197
|
-
const DrawGroupInnerLabel = withHover(
|
|
162198
|
-
({ className, labelXStart, label, fontWidth, onMouseOver, index: index2, dy }) => {
|
|
162199
|
-
return /* @__PURE__ */ React$2.createElement(
|
|
162200
|
-
"tspan",
|
|
162201
|
-
__spreadProps(__spreadValues({
|
|
162202
|
-
x: labelXStart,
|
|
162203
|
-
textLength: getTextLength(label.text) * fontWidth,
|
|
162204
|
-
lengthAdjust: "spacing",
|
|
162205
|
-
onClick: label.onClick,
|
|
162206
|
-
onDoubleClick: (e2) => {
|
|
162207
|
-
e2.stopPropagation();
|
|
162208
|
-
label.onDoubleClick && label.onDoubleClick(e2);
|
|
162209
|
-
},
|
|
162210
|
-
onContextMenu: label.onContextMenu,
|
|
162211
|
-
dy: index2 === 0 ? dy / 2 : dy,
|
|
162212
|
-
style: {
|
|
162213
|
-
fill: label.color ? label.color : "black",
|
|
162214
|
-
fontStyle: label.fontStyle
|
|
162215
|
-
}
|
|
162216
|
-
}, { onMouseOver }), {
|
|
162217
|
-
className
|
|
162218
|
-
}),
|
|
162219
|
-
/* @__PURE__ */ React$2.createElement("title", null, label.title),
|
|
162220
|
-
label.text
|
|
162221
|
-
);
|
|
162222
|
-
}
|
|
162223
|
-
);
|
|
162224
|
-
const DrawGroupedLabels = /* @__PURE__ */ __name(function DrawGroupedLabelsInner({
|
|
162225
|
-
groupedLabels,
|
|
162226
|
-
circularViewWidthVsHeightRatio,
|
|
162227
|
-
fontWidth,
|
|
162228
|
-
noRedux,
|
|
162229
|
-
fontHeight,
|
|
162230
|
-
condenseOverflowingXLabels,
|
|
162231
|
-
outerRadius,
|
|
162232
|
-
editorName,
|
|
162233
|
-
labelLineIntensity: labelLineIntensity2
|
|
162234
|
-
}) {
|
|
162235
|
-
return groupedLabels.map(function(label, i2) {
|
|
162236
|
-
const { labelAndSublabels, labelIds } = label;
|
|
162237
|
-
const multipleLabels = labelAndSublabels.length > 1;
|
|
162238
|
-
return /* @__PURE__ */ React$2.createElement(
|
|
162239
|
-
DrawLabelGroup,
|
|
162240
|
-
__spreadValues({
|
|
162241
|
-
key: i2,
|
|
162242
|
-
id: labelIds
|
|
162243
|
-
}, {
|
|
162244
|
-
label,
|
|
162245
|
-
noRedux,
|
|
162246
|
-
passHoveredId: true,
|
|
162247
|
-
//needed to get the hoveredId
|
|
162248
|
-
isLabelGroup: true,
|
|
162249
|
-
className: "DrawLabelGroup",
|
|
162250
|
-
multipleLabels,
|
|
162251
|
-
labelAndSublabels,
|
|
162252
|
-
labelIds,
|
|
162253
|
-
circularViewWidthVsHeightRatio,
|
|
162254
|
-
fontWidth,
|
|
162255
|
-
editorName,
|
|
162256
|
-
fontHeight,
|
|
162257
|
-
condenseOverflowingXLabels,
|
|
162258
|
-
outerRadius,
|
|
162259
|
-
labelLineIntensity: labelLineIntensity2
|
|
162260
|
-
})
|
|
162261
|
-
);
|
|
162262
|
-
});
|
|
162263
|
-
}, "DrawGroupedLabelsInner");
|
|
162264
|
-
function cancelFn(e2) {
|
|
162265
|
-
e2.stopPropagation();
|
|
162266
|
-
}
|
|
162267
|
-
__name(cancelFn, "cancelFn");
|
|
162268
|
-
const _PutMyParentOnTop = class _PutMyParentOnTop extends React$2.Component {
|
|
162269
|
-
componentDidMount() {
|
|
162270
|
-
const { editorName } = this.props;
|
|
162271
|
-
try {
|
|
162272
|
-
const el2 = document.querySelector(
|
|
162273
|
-
`.veEditor.${editorName} .topLevelLabelGroup`
|
|
162274
|
-
);
|
|
162275
|
-
const parent2 = el2.parentElement.parentElement;
|
|
162276
|
-
const i2 = Array.prototype.indexOf.call(parent2.children, el2.parentElement);
|
|
162277
|
-
parent2.insertBefore(parent2.children[i2], null);
|
|
162278
|
-
} catch (error) {
|
|
162279
|
-
console.warn(
|
|
162280
|
-
"OVE-975239 - hit an error trying to re-order labels:",
|
|
162281
|
-
error
|
|
162282
|
-
);
|
|
162283
|
-
}
|
|
162284
|
-
}
|
|
162285
|
-
render() {
|
|
162286
|
-
return this.props.children;
|
|
162287
|
-
}
|
|
162288
|
-
};
|
|
162289
|
-
__name(_PutMyParentOnTop, "PutMyParentOnTop");
|
|
162290
|
-
let PutMyParentOnTop = _PutMyParentOnTop;
|
|
162291
|
-
var baseGetTag = _baseGetTag, isObjectLike = isObjectLike_1;
|
|
162292
|
-
var numberTag = "[object Number]";
|
|
162293
|
-
function isNumber(value) {
|
|
162294
|
-
return typeof value == "number" || isObjectLike(value) && baseGetTag(value) == numberTag;
|
|
162064
|
+
function getRangeAnglesSpecial() {
|
|
162065
|
+
const _a2 = getRangeAngles.apply(
|
|
162066
|
+
this,
|
|
162067
|
+
arguments
|
|
162068
|
+
), { endAngle, totalAngle } = _a2, rest = __objRest(_a2, ["endAngle", "totalAngle"]);
|
|
162069
|
+
return __spreadValues({
|
|
162070
|
+
endAngle: endAngle - 1e-5,
|
|
162071
|
+
//we subtract a tiny amount because an angle of 2PI will cause nothing to be drawn!
|
|
162072
|
+
totalAngle: totalAngle - 1e-5
|
|
162073
|
+
}, rest);
|
|
162295
162074
|
}
|
|
162296
|
-
__name(
|
|
162297
|
-
var isNumber_1 = isNumber;
|
|
162298
|
-
const isNumber$1 = /* @__PURE__ */ getDefaultExportFromCjs(isNumber_1);
|
|
162075
|
+
__name(getRangeAnglesSpecial, "getRangeAnglesSpecial");
|
|
162299
162076
|
function PositionAnnotationOnCircle(_z) {
|
|
162300
162077
|
var _A = _z, {
|
|
162301
162078
|
children,
|
|
@@ -162326,60 +162103,6 @@ Part of ${annotation.translationType} Translation from BPs ${annotation.start +
|
|
|
162326
162103
|
return React$2.cloneElement(children, props);
|
|
162327
162104
|
}
|
|
162328
162105
|
__name(PositionAnnotationOnCircle, "PositionAnnotationOnCircle");
|
|
162329
|
-
function Caret({
|
|
162330
|
-
caretPosition: caretPosition2,
|
|
162331
|
-
sequenceLength,
|
|
162332
|
-
className,
|
|
162333
|
-
onClick,
|
|
162334
|
-
isSelection,
|
|
162335
|
-
innerRadius,
|
|
162336
|
-
outerRadius,
|
|
162337
|
-
isProtein: isProtein2,
|
|
162338
|
-
selectionMessage
|
|
162339
|
-
}) {
|
|
162340
|
-
const { startAngle, endAngle } = getRangeAngles(
|
|
162341
|
-
{ start: caretPosition2, end: caretPosition2 },
|
|
162342
|
-
sequenceLength || 1
|
|
162343
|
-
);
|
|
162344
|
-
if (!isNumber$1(startAngle)) {
|
|
162345
|
-
console.error("we've got a problem!");
|
|
162346
|
-
}
|
|
162347
|
-
const { transform: transform2 } = PositionAnnotationOnCircle({
|
|
162348
|
-
sAngle: startAngle,
|
|
162349
|
-
eAngle: endAngle,
|
|
162350
|
-
height: 0
|
|
162351
|
-
});
|
|
162352
|
-
return /* @__PURE__ */ React$2.createElement(
|
|
162353
|
-
"g",
|
|
162354
|
-
{
|
|
162355
|
-
onClick,
|
|
162356
|
-
transform: transform2,
|
|
162357
|
-
className: className + " veCaret " + draggableClassnames.caret
|
|
162358
|
-
},
|
|
162359
|
-
/* @__PURE__ */ React$2.createElement("title", null, selectionMessage || getSelectionMessage({ caretPosition: caretPosition2, isProtein: isProtein2, sequenceLength })),
|
|
162360
|
-
/* @__PURE__ */ React$2.createElement(
|
|
162361
|
-
"line",
|
|
162362
|
-
{
|
|
162363
|
-
strokeWidth: "1.5px",
|
|
162364
|
-
x1: 0,
|
|
162365
|
-
y1: -innerRadius,
|
|
162366
|
-
x2: 0,
|
|
162367
|
-
y2: -outerRadius
|
|
162368
|
-
}
|
|
162369
|
-
),
|
|
162370
|
-
isSelection ? /* @__PURE__ */ React$2.createElement(
|
|
162371
|
-
"polygon",
|
|
162372
|
-
{
|
|
162373
|
-
className: "vePolygonCaretHandle",
|
|
162374
|
-
fill: "black",
|
|
162375
|
-
points: `0,${-outerRadius + 2} 5,${-outerRadius - 10} -5,${-outerRadius - 10}`
|
|
162376
|
-
}
|
|
162377
|
-
) : null
|
|
162378
|
-
);
|
|
162379
|
-
}
|
|
162380
|
-
__name(Caret, "Caret");
|
|
162381
|
-
const Caret$1 = pure(Caret);
|
|
162382
|
-
var sector$1 = { exports: {} };
|
|
162383
162106
|
var path = { exports: {} };
|
|
162384
162107
|
var geom = { exports: {} };
|
|
162385
162108
|
(function(module2, exports3) {
|
|
@@ -162988,407 +162711,6 @@ Part of ${annotation.translationType} Translation from BPs ${annotation.start +
|
|
|
162988
162711
|
})(path, path.exports);
|
|
162989
162712
|
var pathExports = path.exports;
|
|
162990
162713
|
const Path = /* @__PURE__ */ getDefaultExportFromCjs(pathExports);
|
|
162991
|
-
var ops = {};
|
|
162992
|
-
(function(exports3) {
|
|
162993
|
-
Object.defineProperty(exports3, "__esModule", {
|
|
162994
|
-
value: true
|
|
162995
|
-
});
|
|
162996
|
-
var _slicedToArray2 = function() {
|
|
162997
|
-
function sliceIterator(arr, i2) {
|
|
162998
|
-
var _arr = [];
|
|
162999
|
-
var _n = true;
|
|
163000
|
-
var _d2 = false;
|
|
163001
|
-
var _e = void 0;
|
|
163002
|
-
try {
|
|
163003
|
-
for (var _i = arr[Symbol.iterator](), _s2; !(_n = (_s2 = _i.next()).done); _n = true) {
|
|
163004
|
-
_arr.push(_s2.value);
|
|
163005
|
-
if (i2 && _arr.length === i2)
|
|
163006
|
-
break;
|
|
163007
|
-
}
|
|
163008
|
-
} catch (err2) {
|
|
163009
|
-
_d2 = true;
|
|
163010
|
-
_e = err2;
|
|
163011
|
-
} finally {
|
|
163012
|
-
try {
|
|
163013
|
-
if (!_n && _i["return"])
|
|
163014
|
-
_i["return"]();
|
|
163015
|
-
} finally {
|
|
163016
|
-
if (_d2)
|
|
163017
|
-
throw _e;
|
|
163018
|
-
}
|
|
163019
|
-
}
|
|
163020
|
-
return _arr;
|
|
163021
|
-
}
|
|
163022
|
-
__name(sliceIterator, "sliceIterator");
|
|
163023
|
-
return function(arr, i2) {
|
|
163024
|
-
if (Array.isArray(arr)) {
|
|
163025
|
-
return arr;
|
|
163026
|
-
} else if (Symbol.iterator in Object(arr)) {
|
|
163027
|
-
return sliceIterator(arr, i2);
|
|
163028
|
-
} else {
|
|
163029
|
-
throw new TypeError("Invalid attempt to destructure non-iterable instance");
|
|
163030
|
-
}
|
|
163031
|
-
};
|
|
163032
|
-
}();
|
|
163033
|
-
var sum2 = /* @__PURE__ */ __name(function sum3(xs) {
|
|
163034
|
-
return xs.reduce(function(a2, b3) {
|
|
163035
|
-
return a2 + b3;
|
|
163036
|
-
}, 0);
|
|
163037
|
-
}, "sum");
|
|
163038
|
-
var min2 = /* @__PURE__ */ __name(function min3(xs) {
|
|
163039
|
-
return xs.reduce(function(a2, b3) {
|
|
163040
|
-
return Math.min(a2, b3);
|
|
163041
|
-
});
|
|
163042
|
-
}, "min");
|
|
163043
|
-
var max2 = /* @__PURE__ */ __name(function max3(xs) {
|
|
163044
|
-
return xs.reduce(function(a2, b3) {
|
|
163045
|
-
return Math.max(a2, b3);
|
|
163046
|
-
});
|
|
163047
|
-
}, "max");
|
|
163048
|
-
var sumBy = /* @__PURE__ */ __name(function sumBy2(xs, f2) {
|
|
163049
|
-
return xs.reduce(function(a2, b3) {
|
|
163050
|
-
return a2 + f2(b3);
|
|
163051
|
-
}, 0);
|
|
163052
|
-
}, "sumBy");
|
|
163053
|
-
var minBy = /* @__PURE__ */ __name(function minBy2(xs, f2) {
|
|
163054
|
-
return xs.reduce(function(a2, b3) {
|
|
163055
|
-
return Math.min(a2, f2(b3));
|
|
163056
|
-
}, Infinity);
|
|
163057
|
-
}, "minBy");
|
|
163058
|
-
var maxBy = /* @__PURE__ */ __name(function maxBy2(xs, f2) {
|
|
163059
|
-
return xs.reduce(function(a2, b3) {
|
|
163060
|
-
return Math.max(a2, f2(b3));
|
|
163061
|
-
}, -Infinity);
|
|
163062
|
-
}, "maxBy");
|
|
163063
|
-
var plus = /* @__PURE__ */ __name(function plus2(_ref, _ref3) {
|
|
163064
|
-
var _ref2 = _slicedToArray2(_ref, 2);
|
|
163065
|
-
var a2 = _ref2[0];
|
|
163066
|
-
var b3 = _ref2[1];
|
|
163067
|
-
var _ref32 = _slicedToArray2(_ref3, 2);
|
|
163068
|
-
var c2 = _ref32[0];
|
|
163069
|
-
var d2 = _ref32[1];
|
|
163070
|
-
return [a2 + c2, b3 + d2];
|
|
163071
|
-
}, "plus");
|
|
163072
|
-
var minus = /* @__PURE__ */ __name(function minus2(_ref4, _ref5) {
|
|
163073
|
-
var _ref42 = _slicedToArray2(_ref4, 2);
|
|
163074
|
-
var a2 = _ref42[0];
|
|
163075
|
-
var b3 = _ref42[1];
|
|
163076
|
-
var _ref52 = _slicedToArray2(_ref5, 2);
|
|
163077
|
-
var c2 = _ref52[0];
|
|
163078
|
-
var d2 = _ref52[1];
|
|
163079
|
-
return [a2 - c2, b3 - d2];
|
|
163080
|
-
}, "minus");
|
|
163081
|
-
var times = /* @__PURE__ */ __name(function times2(k2, _ref6) {
|
|
163082
|
-
var _ref62 = _slicedToArray2(_ref6, 2);
|
|
163083
|
-
var a2 = _ref62[0];
|
|
163084
|
-
var b3 = _ref62[1];
|
|
163085
|
-
return [k2 * a2, k2 * b3];
|
|
163086
|
-
}, "times");
|
|
163087
|
-
var length = /* @__PURE__ */ __name(function length2(_ref7) {
|
|
163088
|
-
var _ref72 = _slicedToArray2(_ref7, 2);
|
|
163089
|
-
var a2 = _ref72[0];
|
|
163090
|
-
var b3 = _ref72[1];
|
|
163091
|
-
return Math.sqrt(a2 * a2 + b3 * b3);
|
|
163092
|
-
}, "length");
|
|
163093
|
-
var sumVectors = /* @__PURE__ */ __name(function sumVectors2(xs) {
|
|
163094
|
-
return xs.reduce(plus, [0, 0]);
|
|
163095
|
-
}, "sumVectors");
|
|
163096
|
-
var average = /* @__PURE__ */ __name(function average2(points) {
|
|
163097
|
-
return times(1 / points.length, points.reduce(plus));
|
|
163098
|
-
}, "average");
|
|
163099
|
-
var onCircle = /* @__PURE__ */ __name(function onCircle2(r2, angle2) {
|
|
163100
|
-
return times(r2, [Math.sin(angle2), -Math.cos(angle2)]);
|
|
163101
|
-
}, "onCircle");
|
|
163102
|
-
var enhance = /* @__PURE__ */ __name(function enhance2(compute, curve) {
|
|
163103
|
-
var obj = compute || {};
|
|
163104
|
-
for (var key2 in obj) {
|
|
163105
|
-
var method = obj[key2];
|
|
163106
|
-
curve[key2] = method(curve.index, curve.item, curve.group);
|
|
163107
|
-
}
|
|
163108
|
-
return curve;
|
|
163109
|
-
}, "enhance");
|
|
163110
|
-
var range2 = /* @__PURE__ */ __name(function range3(a2, b3, inclusive) {
|
|
163111
|
-
var result = [];
|
|
163112
|
-
for (var i2 = a2; i2 < b3; i2++) {
|
|
163113
|
-
result.push(i2);
|
|
163114
|
-
}
|
|
163115
|
-
if (inclusive) {
|
|
163116
|
-
result.push(b3);
|
|
163117
|
-
}
|
|
163118
|
-
return result;
|
|
163119
|
-
}, "range");
|
|
163120
|
-
var mapObject = /* @__PURE__ */ __name(function mapObject2(obj, f2) {
|
|
163121
|
-
var result = [];
|
|
163122
|
-
var _iteratorNormalCompletion = true;
|
|
163123
|
-
var _didIteratorError = false;
|
|
163124
|
-
var _iteratorError = void 0;
|
|
163125
|
-
try {
|
|
163126
|
-
for (var _iterator3 = Object.keys(obj)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator3.next()).done); _iteratorNormalCompletion = true) {
|
|
163127
|
-
var k2 = _step.value;
|
|
163128
|
-
var v2 = obj[k2];
|
|
163129
|
-
result.push(f2(k2, v2));
|
|
163130
|
-
}
|
|
163131
|
-
} catch (err2) {
|
|
163132
|
-
_didIteratorError = true;
|
|
163133
|
-
_iteratorError = err2;
|
|
163134
|
-
} finally {
|
|
163135
|
-
try {
|
|
163136
|
-
if (!_iteratorNormalCompletion && _iterator3["return"]) {
|
|
163137
|
-
_iterator3["return"]();
|
|
163138
|
-
}
|
|
163139
|
-
} finally {
|
|
163140
|
-
if (_didIteratorError) {
|
|
163141
|
-
throw _iteratorError;
|
|
163142
|
-
}
|
|
163143
|
-
}
|
|
163144
|
-
}
|
|
163145
|
-
return result;
|
|
163146
|
-
}, "mapObject");
|
|
163147
|
-
var pairs = /* @__PURE__ */ __name(function pairs2(obj) {
|
|
163148
|
-
return mapObject(obj, function(k2, v2) {
|
|
163149
|
-
return [k2, v2];
|
|
163150
|
-
});
|
|
163151
|
-
}, "pairs");
|
|
163152
|
-
var id2 = /* @__PURE__ */ __name(function id3(x2) {
|
|
163153
|
-
return x2;
|
|
163154
|
-
}, "id");
|
|
163155
|
-
exports3.sum = sum2;
|
|
163156
|
-
exports3.min = min2;
|
|
163157
|
-
exports3.max = max2;
|
|
163158
|
-
exports3.sumBy = sumBy;
|
|
163159
|
-
exports3.minBy = minBy;
|
|
163160
|
-
exports3.maxBy = maxBy;
|
|
163161
|
-
exports3.plus = plus;
|
|
163162
|
-
exports3.minus = minus;
|
|
163163
|
-
exports3.times = times;
|
|
163164
|
-
exports3.id = id2;
|
|
163165
|
-
exports3.length = length;
|
|
163166
|
-
exports3.sumVectors = sumVectors;
|
|
163167
|
-
exports3.average = average;
|
|
163168
|
-
exports3.onCircle = onCircle;
|
|
163169
|
-
exports3.enhance = enhance;
|
|
163170
|
-
exports3.range = range2;
|
|
163171
|
-
exports3.mapObject = mapObject;
|
|
163172
|
-
exports3.pairs = pairs;
|
|
163173
|
-
exports3["default"] = {
|
|
163174
|
-
sum: sum2,
|
|
163175
|
-
min: min2,
|
|
163176
|
-
max: max2,
|
|
163177
|
-
sumBy,
|
|
163178
|
-
minBy,
|
|
163179
|
-
maxBy,
|
|
163180
|
-
plus,
|
|
163181
|
-
minus,
|
|
163182
|
-
times,
|
|
163183
|
-
id: id2,
|
|
163184
|
-
length,
|
|
163185
|
-
sumVectors,
|
|
163186
|
-
average,
|
|
163187
|
-
onCircle,
|
|
163188
|
-
enhance,
|
|
163189
|
-
range: range2,
|
|
163190
|
-
mapObject,
|
|
163191
|
-
pairs
|
|
163192
|
-
};
|
|
163193
|
-
})(ops);
|
|
163194
|
-
(function(module2, exports3) {
|
|
163195
|
-
Object.defineProperty(exports3, "__esModule", {
|
|
163196
|
-
value: true
|
|
163197
|
-
});
|
|
163198
|
-
function _interopRequireDefault2(obj) {
|
|
163199
|
-
return obj && obj.__esModule ? obj : { "default": obj };
|
|
163200
|
-
}
|
|
163201
|
-
__name(_interopRequireDefault2, "_interopRequireDefault");
|
|
163202
|
-
function _toConsumableArray2(arr) {
|
|
163203
|
-
if (Array.isArray(arr)) {
|
|
163204
|
-
for (var i2 = 0, arr2 = Array(arr.length); i2 < arr.length; i2++)
|
|
163205
|
-
arr2[i2] = arr[i2];
|
|
163206
|
-
return arr2;
|
|
163207
|
-
} else {
|
|
163208
|
-
return Array.from(arr);
|
|
163209
|
-
}
|
|
163210
|
-
}
|
|
163211
|
-
__name(_toConsumableArray2, "_toConsumableArray");
|
|
163212
|
-
var _path = pathExports;
|
|
163213
|
-
var _path2 = _interopRequireDefault2(_path);
|
|
163214
|
-
var _ops = ops;
|
|
163215
|
-
exports3["default"] = function(_ref) {
|
|
163216
|
-
var _Path$moveto$arc$lineto, _Path$moveto$arc, _Path$moveto, _Path;
|
|
163217
|
-
var center = _ref.center;
|
|
163218
|
-
var r2 = _ref.r;
|
|
163219
|
-
var R2 = _ref.R;
|
|
163220
|
-
var start2 = _ref.start;
|
|
163221
|
-
var end2 = _ref.end;
|
|
163222
|
-
var epsilon = 1e-4;
|
|
163223
|
-
if (Math.abs(end2 - 2 * Math.PI) < epsilon) {
|
|
163224
|
-
end2 = 2 * Math.PI - epsilon;
|
|
163225
|
-
}
|
|
163226
|
-
var a2 = (0, _ops.plus)(center, (0, _ops.onCircle)(R2, start2));
|
|
163227
|
-
var b3 = (0, _ops.plus)(center, (0, _ops.onCircle)(R2, end2));
|
|
163228
|
-
var c2 = (0, _ops.plus)(center, (0, _ops.onCircle)(r2, end2));
|
|
163229
|
-
var d2 = (0, _ops.plus)(center, (0, _ops.onCircle)(r2, start2));
|
|
163230
|
-
var large = end2 - start2 > Math.PI ? 1 : 0;
|
|
163231
|
-
var path2 = (_Path$moveto$arc$lineto = (_Path$moveto$arc = (_Path$moveto = (_Path = (0, _path2["default"])()).moveto.apply(_Path, _toConsumableArray2(a2))).arc.apply(_Path$moveto, [R2, R2, 0, large, 1].concat(_toConsumableArray2(b3)))).lineto.apply(_Path$moveto$arc, _toConsumableArray2(c2))).arc.apply(_Path$moveto$arc$lineto, [r2, r2, 0, large, 0].concat(_toConsumableArray2(d2))).closepath();
|
|
163232
|
-
var midAngle = (start2 + end2) / 2;
|
|
163233
|
-
var midRadius = (r2 + R2) / 2;
|
|
163234
|
-
var centroid = (0, _ops.plus)(center, (0, _ops.onCircle)(midRadius, midAngle));
|
|
163235
|
-
return {
|
|
163236
|
-
path: path2,
|
|
163237
|
-
centroid
|
|
163238
|
-
};
|
|
163239
|
-
};
|
|
163240
|
-
module2.exports = exports3["default"];
|
|
163241
|
-
})(sector$1, sector$1.exports);
|
|
163242
|
-
var sectorExports = sector$1.exports;
|
|
163243
|
-
const sector = /* @__PURE__ */ getDefaultExportFromCjs(sectorExports);
|
|
163244
|
-
function getRangeAnglesSpecial() {
|
|
163245
|
-
const _a2 = getRangeAngles.apply(
|
|
163246
|
-
this,
|
|
163247
|
-
arguments
|
|
163248
|
-
), { endAngle, totalAngle } = _a2, rest = __objRest(_a2, ["endAngle", "totalAngle"]);
|
|
163249
|
-
return __spreadValues({
|
|
163250
|
-
endAngle: endAngle - 1e-5,
|
|
163251
|
-
//we subtract a tiny amount because an angle of 2PI will cause nothing to be drawn!
|
|
163252
|
-
totalAngle: totalAngle - 1e-5
|
|
163253
|
-
}, rest);
|
|
163254
|
-
}
|
|
163255
|
-
__name(getRangeAnglesSpecial, "getRangeAnglesSpecial");
|
|
163256
|
-
function SelectionLayer({
|
|
163257
|
-
isDraggable,
|
|
163258
|
-
selectionLayer: selectionLayer2,
|
|
163259
|
-
sequenceLength,
|
|
163260
|
-
radius,
|
|
163261
|
-
hideTitle,
|
|
163262
|
-
innerRadius,
|
|
163263
|
-
onRightClicked,
|
|
163264
|
-
onClick,
|
|
163265
|
-
index: index2,
|
|
163266
|
-
isProtein: isProtein2
|
|
163267
|
-
}) {
|
|
163268
|
-
const {
|
|
163269
|
-
color: color2,
|
|
163270
|
-
start: start2,
|
|
163271
|
-
end: end2,
|
|
163272
|
-
hideCarets = false,
|
|
163273
|
-
style: style2,
|
|
163274
|
-
className
|
|
163275
|
-
} = selectionLayer2;
|
|
163276
|
-
const { startAngle, endAngle, totalAngle } = getRangeAnglesSpecial(
|
|
163277
|
-
selectionLayer2,
|
|
163278
|
-
sequenceLength
|
|
163279
|
-
);
|
|
163280
|
-
const section = sector({
|
|
163281
|
-
center: [0, 0],
|
|
163282
|
-
//the center is always 0,0 for our annotations :) we rotate later!
|
|
163283
|
-
r: innerRadius,
|
|
163284
|
-
R: radius,
|
|
163285
|
-
start: 0,
|
|
163286
|
-
end: totalAngle
|
|
163287
|
-
});
|
|
163288
|
-
const selectionMessage = getSelectionMessage({
|
|
163289
|
-
sequenceLength,
|
|
163290
|
-
selectionLayer: selectionLayer2,
|
|
163291
|
-
isProtein: isProtein2
|
|
163292
|
-
});
|
|
163293
|
-
const { transform: transform2 } = PositionAnnotationOnCircle({
|
|
163294
|
-
sAngle: startAngle,
|
|
163295
|
-
eAngle: endAngle,
|
|
163296
|
-
height: 0
|
|
163297
|
-
});
|
|
163298
|
-
return /* @__PURE__ */ React$2.createElement(
|
|
163299
|
-
"g",
|
|
163300
|
-
{
|
|
163301
|
-
onContextMenu: (event) => {
|
|
163302
|
-
onRightClicked && onRightClicked({
|
|
163303
|
-
annotation: selectionLayer2,
|
|
163304
|
-
event
|
|
163305
|
-
});
|
|
163306
|
-
},
|
|
163307
|
-
onClick: onClick ? (event) => {
|
|
163308
|
-
onClick({
|
|
163309
|
-
annotation: selectionLayer2,
|
|
163310
|
-
event
|
|
163311
|
-
});
|
|
163312
|
-
} : void 0,
|
|
163313
|
-
key: "veSelectionLayer" + index2,
|
|
163314
|
-
className: "veSelectionLayer " + (className || "")
|
|
163315
|
-
},
|
|
163316
|
-
!hideTitle && /* @__PURE__ */ React$2.createElement("title", null, selectionMessage),
|
|
163317
|
-
/* @__PURE__ */ React$2.createElement(
|
|
163318
|
-
"path",
|
|
163319
|
-
{
|
|
163320
|
-
transform: transform2,
|
|
163321
|
-
className: "selectionLayer",
|
|
163322
|
-
style: __spreadValues({ opacity: 0.3 }, style2),
|
|
163323
|
-
d: section.path.print(),
|
|
163324
|
-
fill: color2
|
|
163325
|
-
}
|
|
163326
|
-
),
|
|
163327
|
-
!hideCarets && /* @__PURE__ */ React$2.createElement(
|
|
163328
|
-
Caret$1,
|
|
163329
|
-
{
|
|
163330
|
-
key: "caret1",
|
|
163331
|
-
className: className + " selectionLayerCaret " + (isDraggable ? draggableClassnames.selectionStart : ""),
|
|
163332
|
-
isSelection: true,
|
|
163333
|
-
onClick: onClick ? noop$4 : preventDefaultStopPropagation,
|
|
163334
|
-
selectionMessage,
|
|
163335
|
-
caretPosition: start2,
|
|
163336
|
-
sequenceLength,
|
|
163337
|
-
innerRadius,
|
|
163338
|
-
outerRadius: radius
|
|
163339
|
-
}
|
|
163340
|
-
),
|
|
163341
|
-
!hideCarets && /* @__PURE__ */ React$2.createElement(
|
|
163342
|
-
Caret$1,
|
|
163343
|
-
{
|
|
163344
|
-
key: "caret2",
|
|
163345
|
-
className: className + " selectionLayerCaret " + (isDraggable ? draggableClassnames.selectionEnd : ""),
|
|
163346
|
-
isSelection: true,
|
|
163347
|
-
onClick: onClick ? noop$4 : preventDefaultStopPropagation,
|
|
163348
|
-
selectionMessage,
|
|
163349
|
-
caretPosition: end2 + 1,
|
|
163350
|
-
sequenceLength,
|
|
163351
|
-
innerRadius,
|
|
163352
|
-
outerRadius: radius
|
|
163353
|
-
}
|
|
163354
|
-
)
|
|
163355
|
-
);
|
|
163356
|
-
}
|
|
163357
|
-
__name(SelectionLayer, "SelectionLayer");
|
|
163358
|
-
const SelectionLayer$1 = pure(SelectionLayer);
|
|
163359
|
-
function Axis({
|
|
163360
|
-
radius,
|
|
163361
|
-
showAxisNumbers,
|
|
163362
|
-
tickMarkHeight = 5,
|
|
163363
|
-
textOffset = 15,
|
|
163364
|
-
ringThickness = 4,
|
|
163365
|
-
zoomLevel
|
|
163366
|
-
}) {
|
|
163367
|
-
const height2 = (ringThickness + (showAxisNumbers ? textOffset + tickMarkHeight : 0)) / zoomLevel;
|
|
163368
|
-
const radiusToUse = showAxisNumbers ? radius + textOffset + tickMarkHeight : radius;
|
|
163369
|
-
const component = /* @__PURE__ */ React$2.createElement("g", { key: "veAxis", className: "veAxis" }, /* @__PURE__ */ React$2.createElement(
|
|
163370
|
-
"circle",
|
|
163371
|
-
{
|
|
163372
|
-
className: "veAxisLine veAxisOuter",
|
|
163373
|
-
key: "circleOuter",
|
|
163374
|
-
r: radiusToUse + ringThickness,
|
|
163375
|
-
style: { fill: "#ffffff00", stroke: "black", strokeWidth: 0.5 }
|
|
163376
|
-
}
|
|
163377
|
-
), /* @__PURE__ */ React$2.createElement(
|
|
163378
|
-
"circle",
|
|
163379
|
-
{
|
|
163380
|
-
className: "veAxisLine veAxisInner",
|
|
163381
|
-
key: "circle",
|
|
163382
|
-
r: radiusToUse,
|
|
163383
|
-
style: { fill: "#ffffff00", stroke: "black", strokeWidth: 0.5 }
|
|
163384
|
-
}
|
|
163385
|
-
));
|
|
163386
|
-
return {
|
|
163387
|
-
component,
|
|
163388
|
-
height: height2
|
|
163389
|
-
};
|
|
163390
|
-
}
|
|
163391
|
-
__name(Axis, "Axis");
|
|
163392
162714
|
function polarToSpecialCartesian(radius, angleInRadians) {
|
|
163393
162715
|
return {
|
|
163394
162716
|
x: radius * Math.cos(angleInRadians - Math.PI / 2),
|
|
@@ -163504,30 +162826,6 @@ Part of ${annotation.translationType} Translation from BPs ${annotation.start +
|
|
|
163504
162826
|
return path2;
|
|
163505
162827
|
}
|
|
163506
162828
|
__name(drawDirectedPiePiece, "drawDirectedPiePiece");
|
|
163507
|
-
function CircularPrimer$1({
|
|
163508
|
-
color: color2 = "orange",
|
|
163509
|
-
radius,
|
|
163510
|
-
annotationHeight,
|
|
163511
|
-
totalAngle
|
|
163512
|
-
}) {
|
|
163513
|
-
return /* @__PURE__ */ React$2.createElement(
|
|
163514
|
-
"path",
|
|
163515
|
-
{
|
|
163516
|
-
className: "veOrf",
|
|
163517
|
-
strokeWidth: ".5",
|
|
163518
|
-
stroke: color2,
|
|
163519
|
-
fill: color2,
|
|
163520
|
-
d: drawDirectedPiePiece({
|
|
163521
|
-
radius,
|
|
163522
|
-
annotationHeight,
|
|
163523
|
-
totalAngle,
|
|
163524
|
-
arrowheadLength: 0.4,
|
|
163525
|
-
tailThickness: 0.4
|
|
163526
|
-
}).print()
|
|
163527
|
-
}
|
|
163528
|
-
);
|
|
163529
|
-
}
|
|
163530
|
-
__name(CircularPrimer$1, "CircularPrimer$1");
|
|
163531
162829
|
function getInternalLabel({
|
|
163532
162830
|
ellipsizedName,
|
|
163533
162831
|
id: id2,
|
|
@@ -163641,58 +162939,6 @@ Part of ${annotation.translationType} Translation from BPs ${annotation.start +
|
|
|
163641
162939
|
})));
|
|
163642
162940
|
}
|
|
163643
162941
|
__name(Feature, "Feature");
|
|
163644
|
-
function CircularPrimer(props) {
|
|
163645
|
-
const {
|
|
163646
|
-
color: color2 = "orange",
|
|
163647
|
-
radius,
|
|
163648
|
-
arrowheadLength = 0.5,
|
|
163649
|
-
annotationHeight,
|
|
163650
|
-
totalAngle,
|
|
163651
|
-
id: id2,
|
|
163652
|
-
labelNeedsFlip,
|
|
163653
|
-
ellipsizedName
|
|
163654
|
-
} = props;
|
|
163655
|
-
const [path2, textPath] = drawDirectedPiePiece({
|
|
163656
|
-
radius,
|
|
163657
|
-
annotationHeight,
|
|
163658
|
-
totalAngle,
|
|
163659
|
-
arrowheadLength,
|
|
163660
|
-
tailThickness: 1,
|
|
163661
|
-
//feature specific
|
|
163662
|
-
returnTextPath: true,
|
|
163663
|
-
hasLabel: ellipsizedName,
|
|
163664
|
-
labelNeedsFlip
|
|
163665
|
-
});
|
|
163666
|
-
return /* @__PURE__ */ React$2.createElement(React$2.Fragment, null, getStripedPattern({ color: color2 }), /* @__PURE__ */ React$2.createElement(
|
|
163667
|
-
"path",
|
|
163668
|
-
{
|
|
163669
|
-
className: "vePrimer veCircularViewPrimer",
|
|
163670
|
-
id: id2,
|
|
163671
|
-
strokeWidth: ".5",
|
|
163672
|
-
stroke: "black",
|
|
163673
|
-
fill: "url(#diagonalHatch)",
|
|
163674
|
-
d: path2.print()
|
|
163675
|
-
}
|
|
163676
|
-
), getInternalLabel(__spreadProps(__spreadValues({}, props), { colorToUse: color2, textPath })));
|
|
163677
|
-
}
|
|
163678
|
-
__name(CircularPrimer, "CircularPrimer");
|
|
163679
|
-
function Cutsite({
|
|
163680
|
-
annotationHeight,
|
|
163681
|
-
radius
|
|
163682
|
-
// totalAngle,
|
|
163683
|
-
// ...rest
|
|
163684
|
-
}) {
|
|
163685
|
-
return /* @__PURE__ */ React$2.createElement(
|
|
163686
|
-
"rect",
|
|
163687
|
-
{
|
|
163688
|
-
className: "veCutsite",
|
|
163689
|
-
width: 1,
|
|
163690
|
-
y: -radius - 4,
|
|
163691
|
-
height: annotationHeight
|
|
163692
|
-
}
|
|
163693
|
-
);
|
|
163694
|
-
}
|
|
163695
|
-
__name(Cutsite, "Cutsite");
|
|
163696
162942
|
function drawAnnotations(props) {
|
|
163697
162943
|
const {
|
|
163698
162944
|
readOnly: readOnly2,
|
|
@@ -163973,7 +163219,6 @@ Part of ${annotation.translationType} Translation from BPs ${annotation.start +
|
|
|
163973
163219
|
onMouseLeave,
|
|
163974
163220
|
onMouseOver
|
|
163975
163221
|
};
|
|
163976
|
-
const title = /* @__PURE__ */ React$2.createElement("title", null, titleText);
|
|
163977
163222
|
function getInner({
|
|
163978
163223
|
startAngle: startAngle2,
|
|
163979
163224
|
endAngle: endAngle2,
|
|
@@ -163990,11 +163235,12 @@ Part of ${annotation.translationType} Translation from BPs ${annotation.start +
|
|
|
163990
163235
|
});
|
|
163991
163236
|
return /* @__PURE__ */ React$2.createElement(
|
|
163992
163237
|
"g",
|
|
163993
|
-
__spreadValues({
|
|
163238
|
+
__spreadValues(__spreadProps(__spreadValues({
|
|
163994
163239
|
transform: transform2,
|
|
163240
|
+
"data-title": noTitle ? null : titleText
|
|
163241
|
+
}, avoidOverlapWith), {
|
|
163995
163242
|
key: isNotLocation ? "notLocation" : "location--" + annotation.id + "--" + i2
|
|
163996
|
-
}, sharedProps),
|
|
163997
|
-
noTitle ? null : title,
|
|
163243
|
+
}), sharedProps),
|
|
163998
163244
|
/* @__PURE__ */ React$2.createElement(
|
|
163999
163245
|
Annotation,
|
|
164000
163246
|
__spreadValues(__spreadValues(__spreadProps(__spreadValues({}, passAnnotation && { annotation }), {
|
|
@@ -164027,6 +163273,964 @@ Part of ${annotation.translationType} Translation from BPs ${annotation.start +
|
|
|
164027
163273
|
}
|
|
164028
163274
|
__name(DrawAnnotationInner, "DrawAnnotationInner");
|
|
164029
163275
|
const DrawAnnotation = withHover(DrawAnnotationInner);
|
|
163276
|
+
const avoidOverlapWith = {
|
|
163277
|
+
"data-avoid": ".topLevelLabelGroup",
|
|
163278
|
+
"data-avoid-backup": ".veLabel.veAnnotationHovered"
|
|
163279
|
+
};
|
|
163280
|
+
const fontWidthToFontSize = 1.75;
|
|
163281
|
+
const getTextLength = /* @__PURE__ */ __name((text2) => {
|
|
163282
|
+
let len2 = (text2 || "Unlabeled").length;
|
|
163283
|
+
const nonEnInputReg = /[^\x00-\xff]+/g;
|
|
163284
|
+
const nonEnStrings = (text2 || "Unlabeled").match(nonEnInputReg) || [];
|
|
163285
|
+
nonEnStrings.forEach((str) => len2 += str.length * 0.5);
|
|
163286
|
+
return len2;
|
|
163287
|
+
}, "getTextLength");
|
|
163288
|
+
function Labels({
|
|
163289
|
+
labels: labels2 = [],
|
|
163290
|
+
extraSideSpace,
|
|
163291
|
+
smartCircViewLabelRender,
|
|
163292
|
+
radius: outerRadius,
|
|
163293
|
+
editorName,
|
|
163294
|
+
noRedux,
|
|
163295
|
+
rotationRadians,
|
|
163296
|
+
textScalingFactor,
|
|
163297
|
+
labelLineIntensity: labelLineIntensity2,
|
|
163298
|
+
labelSize: labelSize2 = 8,
|
|
163299
|
+
fontHeightMultiplier = 2.4,
|
|
163300
|
+
circularViewWidthVsHeightRatio,
|
|
163301
|
+
//width of the circular view
|
|
163302
|
+
condenseOverflowingXLabels = true
|
|
163303
|
+
//set to true to make labels tha
|
|
163304
|
+
}) {
|
|
163305
|
+
if (!labels2.length) {
|
|
163306
|
+
return {
|
|
163307
|
+
component: null,
|
|
163308
|
+
height: 15
|
|
163309
|
+
};
|
|
163310
|
+
}
|
|
163311
|
+
const originalOuterRadius = outerRadius;
|
|
163312
|
+
outerRadius += smartCircViewLabelRender ? 10 : 25;
|
|
163313
|
+
const radius = outerRadius;
|
|
163314
|
+
const outerPointRadius = outerRadius - 20;
|
|
163315
|
+
const fontWidth = labelSize2 * (textScalingFactor < 1 ? textScalingFactor : 1);
|
|
163316
|
+
const fontHeight = fontWidth * lodashExports.clamp(fontHeightMultiplier, 1.5, 3.5);
|
|
163317
|
+
const labelPoints = labels2.map(function(label) {
|
|
163318
|
+
const {
|
|
163319
|
+
annotationCenterAngle: _annotationCenterAngle,
|
|
163320
|
+
annotationCenterRadius
|
|
163321
|
+
} = label;
|
|
163322
|
+
const annotationCenterAngle = _annotationCenterAngle + (rotationRadians || 0);
|
|
163323
|
+
return __spreadProps(__spreadValues(__spreadProps(__spreadValues({}, label), {
|
|
163324
|
+
width: getTextLength(label.text) * fontWidth,
|
|
163325
|
+
//three points define the label:
|
|
163326
|
+
innerPoint: __spreadProps(__spreadValues({}, polarToSpecialCartesian$1(
|
|
163327
|
+
annotationCenterRadius,
|
|
163328
|
+
annotationCenterAngle
|
|
163329
|
+
)), {
|
|
163330
|
+
radius: annotationCenterRadius,
|
|
163331
|
+
angle: annotationCenterAngle
|
|
163332
|
+
}),
|
|
163333
|
+
truncatedInnerPoint: __spreadProps(__spreadValues({}, polarToSpecialCartesian$1(
|
|
163334
|
+
outerPointRadius - 15,
|
|
163335
|
+
annotationCenterAngle
|
|
163336
|
+
)), {
|
|
163337
|
+
radius: outerPointRadius - 15,
|
|
163338
|
+
angle: annotationCenterAngle
|
|
163339
|
+
}),
|
|
163340
|
+
outerPoint: __spreadProps(__spreadValues({}, polarToSpecialCartesian$1(outerPointRadius, annotationCenterAngle)), {
|
|
163341
|
+
radius: outerPointRadius,
|
|
163342
|
+
angle: annotationCenterAngle
|
|
163343
|
+
})
|
|
163344
|
+
}), polarToSpecialCartesian$1(radius, annotationCenterAngle)), {
|
|
163345
|
+
radius: radius + 10,
|
|
163346
|
+
angle: annotationCenterAngle
|
|
163347
|
+
});
|
|
163348
|
+
}).map(function(label) {
|
|
163349
|
+
label.labelAndSublabels = [label];
|
|
163350
|
+
label.labelIds = { [label.id]: true };
|
|
163351
|
+
return label;
|
|
163352
|
+
});
|
|
163353
|
+
let maxRadius = 1;
|
|
163354
|
+
const groupedLabels = relaxLabelAngles(labelPoints, fontHeight, outerRadius).filter((l2) => !!l2).map((originalLabel) => {
|
|
163355
|
+
if (smartCircViewLabelRender) {
|
|
163356
|
+
const newR = Math.sqrt(
|
|
163357
|
+
Math.pow(
|
|
163358
|
+
Math.abs(originalLabel.x) + Math.max(0, originalLabel.text.length * 11 - extraSideSpace / 2),
|
|
163359
|
+
2
|
|
163360
|
+
) + Math.pow(Math.abs(originalLabel.y), 2)
|
|
163361
|
+
);
|
|
163362
|
+
if (newR > maxRadius)
|
|
163363
|
+
maxRadius = newR;
|
|
163364
|
+
}
|
|
163365
|
+
if (originalLabel.highPriorityLabel) {
|
|
163366
|
+
return originalLabel;
|
|
163367
|
+
}
|
|
163368
|
+
const _highPrioritySublabel = originalLabel.labelAndSublabels.find(
|
|
163369
|
+
(l2) => l2.highPriorityLabel
|
|
163370
|
+
);
|
|
163371
|
+
if (_highPrioritySublabel) {
|
|
163372
|
+
const highPrioritySublabel = lodashExports.cloneDeep(_highPrioritySublabel);
|
|
163373
|
+
[
|
|
163374
|
+
"angle",
|
|
163375
|
+
"annotationCenterAngle",
|
|
163376
|
+
"annotationCenterRadius",
|
|
163377
|
+
"innerPoint",
|
|
163378
|
+
"labelAndSublabels",
|
|
163379
|
+
"labelIds",
|
|
163380
|
+
"outerPoint",
|
|
163381
|
+
"radius",
|
|
163382
|
+
"truncatedInnerPoint",
|
|
163383
|
+
"x",
|
|
163384
|
+
"y"
|
|
163385
|
+
].forEach((k2) => {
|
|
163386
|
+
highPrioritySublabel[k2] = originalLabel[k2];
|
|
163387
|
+
});
|
|
163388
|
+
delete originalLabel.labelAndSublabels;
|
|
163389
|
+
return highPrioritySublabel;
|
|
163390
|
+
}
|
|
163391
|
+
return originalLabel;
|
|
163392
|
+
});
|
|
163393
|
+
window.isLabelGroupOpen = false;
|
|
163394
|
+
return {
|
|
163395
|
+
component: /* @__PURE__ */ React$2.createElement(
|
|
163396
|
+
"g",
|
|
163397
|
+
{
|
|
163398
|
+
key: "veLabels",
|
|
163399
|
+
className: "veLabels ve-monospace-font",
|
|
163400
|
+
transform: `rotate(-${rotationRadians * 180 / Math.PI})`
|
|
163401
|
+
},
|
|
163402
|
+
/* @__PURE__ */ React$2.createElement(
|
|
163403
|
+
DrawGroupedLabels,
|
|
163404
|
+
__spreadValues({}, {
|
|
163405
|
+
editorName,
|
|
163406
|
+
noRedux,
|
|
163407
|
+
groupedLabels,
|
|
163408
|
+
circularViewWidthVsHeightRatio,
|
|
163409
|
+
fontWidth,
|
|
163410
|
+
fontHeight,
|
|
163411
|
+
condenseOverflowingXLabels,
|
|
163412
|
+
outerRadius,
|
|
163413
|
+
labelLineIntensity: labelLineIntensity2
|
|
163414
|
+
})
|
|
163415
|
+
)
|
|
163416
|
+
),
|
|
163417
|
+
//we use the <use> tag to position the hovered label group at the top of the stack
|
|
163418
|
+
//point events: none is to fix a click bug..
|
|
163419
|
+
//http://stackoverflow.com/questions/24078524/svg-click-events-not-firing-bubbling-when-using-use-element
|
|
163420
|
+
height: smartCircViewLabelRender ? Math.min(105, maxRadius - originalOuterRadius) : 120
|
|
163421
|
+
};
|
|
163422
|
+
}
|
|
163423
|
+
__name(Labels, "Labels");
|
|
163424
|
+
const DrawLabelGroup = withHover(function({
|
|
163425
|
+
hovered,
|
|
163426
|
+
className,
|
|
163427
|
+
label,
|
|
163428
|
+
labelAndSublabels,
|
|
163429
|
+
fontWidth,
|
|
163430
|
+
noRedux,
|
|
163431
|
+
fontHeight,
|
|
163432
|
+
outerRadius,
|
|
163433
|
+
onMouseLeave,
|
|
163434
|
+
onMouseOver,
|
|
163435
|
+
editorName,
|
|
163436
|
+
circularViewWidthVsHeightRatio,
|
|
163437
|
+
condenseOverflowingXLabels,
|
|
163438
|
+
hoveredId,
|
|
163439
|
+
labelLineIntensity: labelLineIntensity2,
|
|
163440
|
+
// labelIds,
|
|
163441
|
+
multipleLabels
|
|
163442
|
+
// isIdHashmap,
|
|
163443
|
+
}) {
|
|
163444
|
+
let { text: text2 = "Unlabeled" } = label;
|
|
163445
|
+
const textLength = getTextLength(text2);
|
|
163446
|
+
let groupLabelXStart;
|
|
163447
|
+
if (label.labelAndSublabels && label.labelAndSublabels.length > 1) {
|
|
163448
|
+
text2 = "+" + (label.labelAndSublabels.length - 1) + "," + text2;
|
|
163449
|
+
}
|
|
163450
|
+
const labelLength = textLength * fontWidth;
|
|
163451
|
+
const maxLabelLength = labelAndSublabels.reduce(function(currentLength, { text: text22 = "Unlabeled" }) {
|
|
163452
|
+
const _textLength = getTextLength(text22);
|
|
163453
|
+
if (_textLength > currentLength) {
|
|
163454
|
+
return _textLength;
|
|
163455
|
+
}
|
|
163456
|
+
return currentLength;
|
|
163457
|
+
}, 0);
|
|
163458
|
+
const maxLabelWidth = maxLabelLength * fontWidth;
|
|
163459
|
+
const labelOnLeft = label.angle > Math.PI;
|
|
163460
|
+
let labelXStart = label.x - (labelOnLeft ? labelLength : 0);
|
|
163461
|
+
if (condenseOverflowingXLabels) {
|
|
163462
|
+
const distancePastBoundary = Math.abs(label.x + (labelOnLeft ? -labelLength : labelLength)) - (outerRadius + 90) * Math.max(1, circularViewWidthVsHeightRatio);
|
|
163463
|
+
if (distancePastBoundary > 0) {
|
|
163464
|
+
const numberOfCharsToChop = Math.ceil(distancePastBoundary / fontWidth) + 2;
|
|
163465
|
+
text2 = text2.slice(0, -numberOfCharsToChop) + "..";
|
|
163466
|
+
groupLabelXStart = labelXStart + (labelOnLeft ? distancePastBoundary : -distancePastBoundary);
|
|
163467
|
+
labelXStart += labelOnLeft ? distancePastBoundary : 0;
|
|
163468
|
+
}
|
|
163469
|
+
}
|
|
163470
|
+
const dy = fontHeight;
|
|
163471
|
+
const textYStart = label.y + dy / 2;
|
|
163472
|
+
let content2;
|
|
163473
|
+
const labelClass = ` veLabelText veLabel veCircularViewLabelText clickable ${label.color} `;
|
|
163474
|
+
if ((multipleLabels || groupLabelXStart !== void 0) && hovered) {
|
|
163475
|
+
window.isLabelGroupOpen = true;
|
|
163476
|
+
let hoveredLabel;
|
|
163477
|
+
if (groupLabelXStart !== void 0) {
|
|
163478
|
+
labelXStart = groupLabelXStart;
|
|
163479
|
+
}
|
|
163480
|
+
labelAndSublabels.some(function(label2) {
|
|
163481
|
+
if (label2.id === hoveredId) {
|
|
163482
|
+
hoveredLabel = label2;
|
|
163483
|
+
return true;
|
|
163484
|
+
}
|
|
163485
|
+
return false;
|
|
163486
|
+
});
|
|
163487
|
+
if (!hoveredLabel) {
|
|
163488
|
+
hoveredLabel = label;
|
|
163489
|
+
}
|
|
163490
|
+
let labelYStart = label.y;
|
|
163491
|
+
const labelGroupHeight = labelAndSublabels.length * dy;
|
|
163492
|
+
const labelGroupBottom = label.y + labelGroupHeight;
|
|
163493
|
+
if (labelGroupBottom > outerRadius + 20) {
|
|
163494
|
+
labelYStart -= (label.labelAndSublabels.length - 1) * dy;
|
|
163495
|
+
}
|
|
163496
|
+
const line = LabelLine(
|
|
163497
|
+
[
|
|
163498
|
+
hoveredLabel.innerPoint,
|
|
163499
|
+
// hoveredLabel.labelAndSublabels &&
|
|
163500
|
+
// hoveredLabel.labelAndSublabels.length > 0
|
|
163501
|
+
// ? hoveredLabel.outerPoint
|
|
163502
|
+
// : {},
|
|
163503
|
+
label
|
|
163504
|
+
],
|
|
163505
|
+
{ style: { opacity: 1 }, strokeWidth: 2 }
|
|
163506
|
+
);
|
|
163507
|
+
content2 = [
|
|
163508
|
+
line,
|
|
163509
|
+
/* @__PURE__ */ React$2.createElement(PutMyParentOnTop, { editorName, key: "gGroup" }, /* @__PURE__ */ React$2.createElement("g", { className: className + " veLabel topLevelLabelGroup" }, /* @__PURE__ */ React$2.createElement(
|
|
163510
|
+
"rect",
|
|
163511
|
+
{
|
|
163512
|
+
onMouseOver: cancelFn,
|
|
163513
|
+
x: labelXStart - 4,
|
|
163514
|
+
y: labelYStart - dy / 2,
|
|
163515
|
+
width: maxLabelWidth + 24,
|
|
163516
|
+
height: labelGroupHeight + 4,
|
|
163517
|
+
fill: "white",
|
|
163518
|
+
stroke: "black"
|
|
163519
|
+
}
|
|
163520
|
+
), /* @__PURE__ */ React$2.createElement(
|
|
163521
|
+
"text",
|
|
163522
|
+
{
|
|
163523
|
+
x: labelXStart,
|
|
163524
|
+
y: labelYStart,
|
|
163525
|
+
style: {
|
|
163526
|
+
fontSize: fontWidth * fontWidthToFontSize,
|
|
163527
|
+
fontStyle: label.fontStyle
|
|
163528
|
+
}
|
|
163529
|
+
},
|
|
163530
|
+
labelAndSublabels.map(function(label2, index2) {
|
|
163531
|
+
return /* @__PURE__ */ React$2.createElement(
|
|
163532
|
+
DrawGroupInnerLabel,
|
|
163533
|
+
__spreadValues({
|
|
163534
|
+
isSubLabel: true,
|
|
163535
|
+
noRedux,
|
|
163536
|
+
editorName,
|
|
163537
|
+
logHover: true,
|
|
163538
|
+
key: "labelItem" + index2,
|
|
163539
|
+
className: (label2.className || "") + labelClass + " veDrawGroupInnerLabel",
|
|
163540
|
+
id: label2.id
|
|
163541
|
+
}, { labelXStart, label: label2, fontWidth, index: index2, dy })
|
|
163542
|
+
);
|
|
163543
|
+
})
|
|
163544
|
+
)))
|
|
163545
|
+
];
|
|
163546
|
+
} else {
|
|
163547
|
+
content2 = [
|
|
163548
|
+
// <title key="labeltitle">{label.title || label.text}</title>,
|
|
163549
|
+
/* @__PURE__ */ React$2.createElement(
|
|
163550
|
+
"text",
|
|
163551
|
+
__spreadProps(__spreadValues({
|
|
163552
|
+
key: "text",
|
|
163553
|
+
"data-title": label.title || label.text
|
|
163554
|
+
}, avoidOverlapWith), {
|
|
163555
|
+
x: labelXStart,
|
|
163556
|
+
textLength: getTextLength(text2) * fontWidth,
|
|
163557
|
+
lengthAdjust: "spacing",
|
|
163558
|
+
className: labelClass + label.className + (hovered ? " veAnnotationHovered" : ""),
|
|
163559
|
+
y: textYStart,
|
|
163560
|
+
style: {
|
|
163561
|
+
fontSize: fontWidth * fontWidthToFontSize,
|
|
163562
|
+
fontStyle: label.fontStyle,
|
|
163563
|
+
fill: label.color || "black"
|
|
163564
|
+
// stroke: label.color ? label.color : "black"
|
|
163565
|
+
}
|
|
163566
|
+
}),
|
|
163567
|
+
text2
|
|
163568
|
+
),
|
|
163569
|
+
LabelLine(
|
|
163570
|
+
[
|
|
163571
|
+
label.innerPoint,
|
|
163572
|
+
// hovered || label.annotationType === "part" //because parts live on the outside of the sequence, we don't need to show the truncated point, we can just point to them directly
|
|
163573
|
+
// ? label.innerPoint
|
|
163574
|
+
// : label.truncatedInnerPoint,
|
|
163575
|
+
label.outerPoint,
|
|
163576
|
+
label
|
|
163577
|
+
],
|
|
163578
|
+
hovered ? { style: { opacity: 1 }, strokeWidth: 2 } : { style: { opacity: labelLineIntensity2 } }
|
|
163579
|
+
)
|
|
163580
|
+
];
|
|
163581
|
+
}
|
|
163582
|
+
return /* @__PURE__ */ React$2.createElement(
|
|
163583
|
+
"g",
|
|
163584
|
+
__spreadValues(__spreadValues({}, { onMouseLeave, onMouseOver }), {
|
|
163585
|
+
onClick: label.onClick,
|
|
163586
|
+
onDoubleClick: label.onDoubleClick || lodashExports.noop,
|
|
163587
|
+
onContextMenu: label.onContextMenu || lodashExports.noop
|
|
163588
|
+
}),
|
|
163589
|
+
content2
|
|
163590
|
+
);
|
|
163591
|
+
});
|
|
163592
|
+
function LabelLine(pointArray, options) {
|
|
163593
|
+
let points = "";
|
|
163594
|
+
pointArray.forEach(function({ x: x2, y: y2 }) {
|
|
163595
|
+
if (!x2 && x2 !== 0)
|
|
163596
|
+
return;
|
|
163597
|
+
points += `${x2},${y2} `;
|
|
163598
|
+
});
|
|
163599
|
+
return /* @__PURE__ */ React$2.createElement(React$2.Fragment, { key: "labelLine" }, /* @__PURE__ */ React$2.createElement(
|
|
163600
|
+
"polyline",
|
|
163601
|
+
__spreadValues({}, __spreadValues({
|
|
163602
|
+
key: "polyline-long",
|
|
163603
|
+
points,
|
|
163604
|
+
stroke: "black",
|
|
163605
|
+
fill: "none",
|
|
163606
|
+
strokeWidth: 1,
|
|
163607
|
+
className: "veLabelLine"
|
|
163608
|
+
}, options))
|
|
163609
|
+
));
|
|
163610
|
+
}
|
|
163611
|
+
__name(LabelLine, "LabelLine");
|
|
163612
|
+
const DrawGroupInnerLabel = withHover(
|
|
163613
|
+
({ className, labelXStart, label, fontWidth, onMouseOver, index: index2, dy }) => {
|
|
163614
|
+
return /* @__PURE__ */ React$2.createElement(
|
|
163615
|
+
"tspan",
|
|
163616
|
+
__spreadProps(__spreadValues(__spreadProps(__spreadValues({
|
|
163617
|
+
"data-title": label.title
|
|
163618
|
+
}, avoidOverlapWith), {
|
|
163619
|
+
x: labelXStart,
|
|
163620
|
+
textLength: getTextLength(label.text) * fontWidth,
|
|
163621
|
+
lengthAdjust: "spacing",
|
|
163622
|
+
onClick: label.onClick,
|
|
163623
|
+
onDoubleClick: (e2) => {
|
|
163624
|
+
e2.stopPropagation();
|
|
163625
|
+
label.onDoubleClick && label.onDoubleClick(e2);
|
|
163626
|
+
},
|
|
163627
|
+
onContextMenu: label.onContextMenu,
|
|
163628
|
+
dy: index2 === 0 ? dy / 2 : dy,
|
|
163629
|
+
style: {
|
|
163630
|
+
fill: label.color ? label.color : "black",
|
|
163631
|
+
fontStyle: label.fontStyle
|
|
163632
|
+
}
|
|
163633
|
+
}), { onMouseOver }), {
|
|
163634
|
+
className
|
|
163635
|
+
}),
|
|
163636
|
+
label.text
|
|
163637
|
+
);
|
|
163638
|
+
}
|
|
163639
|
+
);
|
|
163640
|
+
const DrawGroupedLabels = /* @__PURE__ */ __name(function DrawGroupedLabelsInner({
|
|
163641
|
+
groupedLabels,
|
|
163642
|
+
circularViewWidthVsHeightRatio,
|
|
163643
|
+
fontWidth,
|
|
163644
|
+
noRedux,
|
|
163645
|
+
fontHeight,
|
|
163646
|
+
condenseOverflowingXLabels,
|
|
163647
|
+
outerRadius,
|
|
163648
|
+
editorName,
|
|
163649
|
+
labelLineIntensity: labelLineIntensity2
|
|
163650
|
+
}) {
|
|
163651
|
+
return groupedLabels.map(function(label, i2) {
|
|
163652
|
+
const { labelAndSublabels, labelIds } = label;
|
|
163653
|
+
const multipleLabels = labelAndSublabels.length > 1;
|
|
163654
|
+
return /* @__PURE__ */ React$2.createElement(
|
|
163655
|
+
DrawLabelGroup,
|
|
163656
|
+
__spreadValues({
|
|
163657
|
+
key: i2,
|
|
163658
|
+
id: labelIds
|
|
163659
|
+
}, {
|
|
163660
|
+
label,
|
|
163661
|
+
noRedux,
|
|
163662
|
+
passHoveredId: true,
|
|
163663
|
+
//needed to get the hoveredId
|
|
163664
|
+
isLabelGroup: true,
|
|
163665
|
+
className: "DrawLabelGroup",
|
|
163666
|
+
multipleLabels,
|
|
163667
|
+
labelAndSublabels,
|
|
163668
|
+
labelIds,
|
|
163669
|
+
circularViewWidthVsHeightRatio,
|
|
163670
|
+
fontWidth,
|
|
163671
|
+
editorName,
|
|
163672
|
+
fontHeight,
|
|
163673
|
+
condenseOverflowingXLabels,
|
|
163674
|
+
outerRadius,
|
|
163675
|
+
labelLineIntensity: labelLineIntensity2
|
|
163676
|
+
})
|
|
163677
|
+
);
|
|
163678
|
+
});
|
|
163679
|
+
}, "DrawGroupedLabelsInner");
|
|
163680
|
+
function cancelFn(e2) {
|
|
163681
|
+
e2.stopPropagation();
|
|
163682
|
+
}
|
|
163683
|
+
__name(cancelFn, "cancelFn");
|
|
163684
|
+
const _PutMyParentOnTop = class _PutMyParentOnTop extends React$2.Component {
|
|
163685
|
+
componentDidMount() {
|
|
163686
|
+
const { editorName } = this.props;
|
|
163687
|
+
try {
|
|
163688
|
+
const el2 = document.querySelector(
|
|
163689
|
+
`.veEditor.${editorName} .topLevelLabelGroup`
|
|
163690
|
+
);
|
|
163691
|
+
const parent2 = el2.parentElement.parentElement;
|
|
163692
|
+
const i2 = Array.prototype.indexOf.call(parent2.children, el2.parentElement);
|
|
163693
|
+
parent2.insertBefore(parent2.children[i2], null);
|
|
163694
|
+
} catch (error) {
|
|
163695
|
+
console.warn(
|
|
163696
|
+
"OVE-975239 - hit an error trying to re-order labels:",
|
|
163697
|
+
error
|
|
163698
|
+
);
|
|
163699
|
+
}
|
|
163700
|
+
}
|
|
163701
|
+
render() {
|
|
163702
|
+
return this.props.children;
|
|
163703
|
+
}
|
|
163704
|
+
};
|
|
163705
|
+
__name(_PutMyParentOnTop, "PutMyParentOnTop");
|
|
163706
|
+
let PutMyParentOnTop = _PutMyParentOnTop;
|
|
163707
|
+
var baseGetTag = _baseGetTag, isObjectLike = isObjectLike_1;
|
|
163708
|
+
var numberTag = "[object Number]";
|
|
163709
|
+
function isNumber(value) {
|
|
163710
|
+
return typeof value == "number" || isObjectLike(value) && baseGetTag(value) == numberTag;
|
|
163711
|
+
}
|
|
163712
|
+
__name(isNumber, "isNumber");
|
|
163713
|
+
var isNumber_1 = isNumber;
|
|
163714
|
+
const isNumber$1 = /* @__PURE__ */ getDefaultExportFromCjs(isNumber_1);
|
|
163715
|
+
function Caret({
|
|
163716
|
+
caretPosition: caretPosition2,
|
|
163717
|
+
sequenceLength,
|
|
163718
|
+
className,
|
|
163719
|
+
onClick,
|
|
163720
|
+
isSelection,
|
|
163721
|
+
innerRadius,
|
|
163722
|
+
outerRadius,
|
|
163723
|
+
isProtein: isProtein2,
|
|
163724
|
+
selectionMessage
|
|
163725
|
+
}) {
|
|
163726
|
+
const { startAngle, endAngle } = getRangeAngles(
|
|
163727
|
+
{ start: caretPosition2, end: caretPosition2 },
|
|
163728
|
+
sequenceLength || 1
|
|
163729
|
+
);
|
|
163730
|
+
if (!isNumber$1(startAngle)) {
|
|
163731
|
+
console.error("we've got a problem!");
|
|
163732
|
+
}
|
|
163733
|
+
const { transform: transform2 } = PositionAnnotationOnCircle({
|
|
163734
|
+
sAngle: startAngle,
|
|
163735
|
+
eAngle: endAngle,
|
|
163736
|
+
height: 0
|
|
163737
|
+
});
|
|
163738
|
+
return /* @__PURE__ */ React$2.createElement(
|
|
163739
|
+
"g",
|
|
163740
|
+
{
|
|
163741
|
+
onClick,
|
|
163742
|
+
transform: transform2,
|
|
163743
|
+
className: className + " veCaret " + draggableClassnames.caret
|
|
163744
|
+
},
|
|
163745
|
+
/* @__PURE__ */ React$2.createElement("title", null, selectionMessage || getSelectionMessage({ caretPosition: caretPosition2, isProtein: isProtein2, sequenceLength })),
|
|
163746
|
+
/* @__PURE__ */ React$2.createElement(
|
|
163747
|
+
"line",
|
|
163748
|
+
{
|
|
163749
|
+
strokeWidth: "1.5px",
|
|
163750
|
+
x1: 0,
|
|
163751
|
+
y1: -innerRadius,
|
|
163752
|
+
x2: 0,
|
|
163753
|
+
y2: -outerRadius
|
|
163754
|
+
}
|
|
163755
|
+
),
|
|
163756
|
+
isSelection ? /* @__PURE__ */ React$2.createElement(
|
|
163757
|
+
"polygon",
|
|
163758
|
+
{
|
|
163759
|
+
className: "vePolygonCaretHandle",
|
|
163760
|
+
fill: "black",
|
|
163761
|
+
points: `0,${-outerRadius + 2} 5,${-outerRadius - 10} -5,${-outerRadius - 10}`
|
|
163762
|
+
}
|
|
163763
|
+
) : null
|
|
163764
|
+
);
|
|
163765
|
+
}
|
|
163766
|
+
__name(Caret, "Caret");
|
|
163767
|
+
const Caret$1 = pure(Caret);
|
|
163768
|
+
var sector$1 = { exports: {} };
|
|
163769
|
+
var ops = {};
|
|
163770
|
+
(function(exports3) {
|
|
163771
|
+
Object.defineProperty(exports3, "__esModule", {
|
|
163772
|
+
value: true
|
|
163773
|
+
});
|
|
163774
|
+
var _slicedToArray2 = function() {
|
|
163775
|
+
function sliceIterator(arr, i2) {
|
|
163776
|
+
var _arr = [];
|
|
163777
|
+
var _n = true;
|
|
163778
|
+
var _d2 = false;
|
|
163779
|
+
var _e = void 0;
|
|
163780
|
+
try {
|
|
163781
|
+
for (var _i = arr[Symbol.iterator](), _s2; !(_n = (_s2 = _i.next()).done); _n = true) {
|
|
163782
|
+
_arr.push(_s2.value);
|
|
163783
|
+
if (i2 && _arr.length === i2)
|
|
163784
|
+
break;
|
|
163785
|
+
}
|
|
163786
|
+
} catch (err2) {
|
|
163787
|
+
_d2 = true;
|
|
163788
|
+
_e = err2;
|
|
163789
|
+
} finally {
|
|
163790
|
+
try {
|
|
163791
|
+
if (!_n && _i["return"])
|
|
163792
|
+
_i["return"]();
|
|
163793
|
+
} finally {
|
|
163794
|
+
if (_d2)
|
|
163795
|
+
throw _e;
|
|
163796
|
+
}
|
|
163797
|
+
}
|
|
163798
|
+
return _arr;
|
|
163799
|
+
}
|
|
163800
|
+
__name(sliceIterator, "sliceIterator");
|
|
163801
|
+
return function(arr, i2) {
|
|
163802
|
+
if (Array.isArray(arr)) {
|
|
163803
|
+
return arr;
|
|
163804
|
+
} else if (Symbol.iterator in Object(arr)) {
|
|
163805
|
+
return sliceIterator(arr, i2);
|
|
163806
|
+
} else {
|
|
163807
|
+
throw new TypeError("Invalid attempt to destructure non-iterable instance");
|
|
163808
|
+
}
|
|
163809
|
+
};
|
|
163810
|
+
}();
|
|
163811
|
+
var sum2 = /* @__PURE__ */ __name(function sum3(xs) {
|
|
163812
|
+
return xs.reduce(function(a2, b3) {
|
|
163813
|
+
return a2 + b3;
|
|
163814
|
+
}, 0);
|
|
163815
|
+
}, "sum");
|
|
163816
|
+
var min2 = /* @__PURE__ */ __name(function min3(xs) {
|
|
163817
|
+
return xs.reduce(function(a2, b3) {
|
|
163818
|
+
return Math.min(a2, b3);
|
|
163819
|
+
});
|
|
163820
|
+
}, "min");
|
|
163821
|
+
var max2 = /* @__PURE__ */ __name(function max3(xs) {
|
|
163822
|
+
return xs.reduce(function(a2, b3) {
|
|
163823
|
+
return Math.max(a2, b3);
|
|
163824
|
+
});
|
|
163825
|
+
}, "max");
|
|
163826
|
+
var sumBy = /* @__PURE__ */ __name(function sumBy2(xs, f2) {
|
|
163827
|
+
return xs.reduce(function(a2, b3) {
|
|
163828
|
+
return a2 + f2(b3);
|
|
163829
|
+
}, 0);
|
|
163830
|
+
}, "sumBy");
|
|
163831
|
+
var minBy = /* @__PURE__ */ __name(function minBy2(xs, f2) {
|
|
163832
|
+
return xs.reduce(function(a2, b3) {
|
|
163833
|
+
return Math.min(a2, f2(b3));
|
|
163834
|
+
}, Infinity);
|
|
163835
|
+
}, "minBy");
|
|
163836
|
+
var maxBy = /* @__PURE__ */ __name(function maxBy2(xs, f2) {
|
|
163837
|
+
return xs.reduce(function(a2, b3) {
|
|
163838
|
+
return Math.max(a2, f2(b3));
|
|
163839
|
+
}, -Infinity);
|
|
163840
|
+
}, "maxBy");
|
|
163841
|
+
var plus = /* @__PURE__ */ __name(function plus2(_ref, _ref3) {
|
|
163842
|
+
var _ref2 = _slicedToArray2(_ref, 2);
|
|
163843
|
+
var a2 = _ref2[0];
|
|
163844
|
+
var b3 = _ref2[1];
|
|
163845
|
+
var _ref32 = _slicedToArray2(_ref3, 2);
|
|
163846
|
+
var c2 = _ref32[0];
|
|
163847
|
+
var d2 = _ref32[1];
|
|
163848
|
+
return [a2 + c2, b3 + d2];
|
|
163849
|
+
}, "plus");
|
|
163850
|
+
var minus = /* @__PURE__ */ __name(function minus2(_ref4, _ref5) {
|
|
163851
|
+
var _ref42 = _slicedToArray2(_ref4, 2);
|
|
163852
|
+
var a2 = _ref42[0];
|
|
163853
|
+
var b3 = _ref42[1];
|
|
163854
|
+
var _ref52 = _slicedToArray2(_ref5, 2);
|
|
163855
|
+
var c2 = _ref52[0];
|
|
163856
|
+
var d2 = _ref52[1];
|
|
163857
|
+
return [a2 - c2, b3 - d2];
|
|
163858
|
+
}, "minus");
|
|
163859
|
+
var times = /* @__PURE__ */ __name(function times2(k2, _ref6) {
|
|
163860
|
+
var _ref62 = _slicedToArray2(_ref6, 2);
|
|
163861
|
+
var a2 = _ref62[0];
|
|
163862
|
+
var b3 = _ref62[1];
|
|
163863
|
+
return [k2 * a2, k2 * b3];
|
|
163864
|
+
}, "times");
|
|
163865
|
+
var length = /* @__PURE__ */ __name(function length2(_ref7) {
|
|
163866
|
+
var _ref72 = _slicedToArray2(_ref7, 2);
|
|
163867
|
+
var a2 = _ref72[0];
|
|
163868
|
+
var b3 = _ref72[1];
|
|
163869
|
+
return Math.sqrt(a2 * a2 + b3 * b3);
|
|
163870
|
+
}, "length");
|
|
163871
|
+
var sumVectors = /* @__PURE__ */ __name(function sumVectors2(xs) {
|
|
163872
|
+
return xs.reduce(plus, [0, 0]);
|
|
163873
|
+
}, "sumVectors");
|
|
163874
|
+
var average = /* @__PURE__ */ __name(function average2(points) {
|
|
163875
|
+
return times(1 / points.length, points.reduce(plus));
|
|
163876
|
+
}, "average");
|
|
163877
|
+
var onCircle = /* @__PURE__ */ __name(function onCircle2(r2, angle2) {
|
|
163878
|
+
return times(r2, [Math.sin(angle2), -Math.cos(angle2)]);
|
|
163879
|
+
}, "onCircle");
|
|
163880
|
+
var enhance = /* @__PURE__ */ __name(function enhance2(compute, curve) {
|
|
163881
|
+
var obj = compute || {};
|
|
163882
|
+
for (var key2 in obj) {
|
|
163883
|
+
var method = obj[key2];
|
|
163884
|
+
curve[key2] = method(curve.index, curve.item, curve.group);
|
|
163885
|
+
}
|
|
163886
|
+
return curve;
|
|
163887
|
+
}, "enhance");
|
|
163888
|
+
var range2 = /* @__PURE__ */ __name(function range3(a2, b3, inclusive) {
|
|
163889
|
+
var result = [];
|
|
163890
|
+
for (var i2 = a2; i2 < b3; i2++) {
|
|
163891
|
+
result.push(i2);
|
|
163892
|
+
}
|
|
163893
|
+
if (inclusive) {
|
|
163894
|
+
result.push(b3);
|
|
163895
|
+
}
|
|
163896
|
+
return result;
|
|
163897
|
+
}, "range");
|
|
163898
|
+
var mapObject = /* @__PURE__ */ __name(function mapObject2(obj, f2) {
|
|
163899
|
+
var result = [];
|
|
163900
|
+
var _iteratorNormalCompletion = true;
|
|
163901
|
+
var _didIteratorError = false;
|
|
163902
|
+
var _iteratorError = void 0;
|
|
163903
|
+
try {
|
|
163904
|
+
for (var _iterator3 = Object.keys(obj)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator3.next()).done); _iteratorNormalCompletion = true) {
|
|
163905
|
+
var k2 = _step.value;
|
|
163906
|
+
var v2 = obj[k2];
|
|
163907
|
+
result.push(f2(k2, v2));
|
|
163908
|
+
}
|
|
163909
|
+
} catch (err2) {
|
|
163910
|
+
_didIteratorError = true;
|
|
163911
|
+
_iteratorError = err2;
|
|
163912
|
+
} finally {
|
|
163913
|
+
try {
|
|
163914
|
+
if (!_iteratorNormalCompletion && _iterator3["return"]) {
|
|
163915
|
+
_iterator3["return"]();
|
|
163916
|
+
}
|
|
163917
|
+
} finally {
|
|
163918
|
+
if (_didIteratorError) {
|
|
163919
|
+
throw _iteratorError;
|
|
163920
|
+
}
|
|
163921
|
+
}
|
|
163922
|
+
}
|
|
163923
|
+
return result;
|
|
163924
|
+
}, "mapObject");
|
|
163925
|
+
var pairs = /* @__PURE__ */ __name(function pairs2(obj) {
|
|
163926
|
+
return mapObject(obj, function(k2, v2) {
|
|
163927
|
+
return [k2, v2];
|
|
163928
|
+
});
|
|
163929
|
+
}, "pairs");
|
|
163930
|
+
var id2 = /* @__PURE__ */ __name(function id3(x2) {
|
|
163931
|
+
return x2;
|
|
163932
|
+
}, "id");
|
|
163933
|
+
exports3.sum = sum2;
|
|
163934
|
+
exports3.min = min2;
|
|
163935
|
+
exports3.max = max2;
|
|
163936
|
+
exports3.sumBy = sumBy;
|
|
163937
|
+
exports3.minBy = minBy;
|
|
163938
|
+
exports3.maxBy = maxBy;
|
|
163939
|
+
exports3.plus = plus;
|
|
163940
|
+
exports3.minus = minus;
|
|
163941
|
+
exports3.times = times;
|
|
163942
|
+
exports3.id = id2;
|
|
163943
|
+
exports3.length = length;
|
|
163944
|
+
exports3.sumVectors = sumVectors;
|
|
163945
|
+
exports3.average = average;
|
|
163946
|
+
exports3.onCircle = onCircle;
|
|
163947
|
+
exports3.enhance = enhance;
|
|
163948
|
+
exports3.range = range2;
|
|
163949
|
+
exports3.mapObject = mapObject;
|
|
163950
|
+
exports3.pairs = pairs;
|
|
163951
|
+
exports3["default"] = {
|
|
163952
|
+
sum: sum2,
|
|
163953
|
+
min: min2,
|
|
163954
|
+
max: max2,
|
|
163955
|
+
sumBy,
|
|
163956
|
+
minBy,
|
|
163957
|
+
maxBy,
|
|
163958
|
+
plus,
|
|
163959
|
+
minus,
|
|
163960
|
+
times,
|
|
163961
|
+
id: id2,
|
|
163962
|
+
length,
|
|
163963
|
+
sumVectors,
|
|
163964
|
+
average,
|
|
163965
|
+
onCircle,
|
|
163966
|
+
enhance,
|
|
163967
|
+
range: range2,
|
|
163968
|
+
mapObject,
|
|
163969
|
+
pairs
|
|
163970
|
+
};
|
|
163971
|
+
})(ops);
|
|
163972
|
+
(function(module2, exports3) {
|
|
163973
|
+
Object.defineProperty(exports3, "__esModule", {
|
|
163974
|
+
value: true
|
|
163975
|
+
});
|
|
163976
|
+
function _interopRequireDefault2(obj) {
|
|
163977
|
+
return obj && obj.__esModule ? obj : { "default": obj };
|
|
163978
|
+
}
|
|
163979
|
+
__name(_interopRequireDefault2, "_interopRequireDefault");
|
|
163980
|
+
function _toConsumableArray2(arr) {
|
|
163981
|
+
if (Array.isArray(arr)) {
|
|
163982
|
+
for (var i2 = 0, arr2 = Array(arr.length); i2 < arr.length; i2++)
|
|
163983
|
+
arr2[i2] = arr[i2];
|
|
163984
|
+
return arr2;
|
|
163985
|
+
} else {
|
|
163986
|
+
return Array.from(arr);
|
|
163987
|
+
}
|
|
163988
|
+
}
|
|
163989
|
+
__name(_toConsumableArray2, "_toConsumableArray");
|
|
163990
|
+
var _path = pathExports;
|
|
163991
|
+
var _path2 = _interopRequireDefault2(_path);
|
|
163992
|
+
var _ops = ops;
|
|
163993
|
+
exports3["default"] = function(_ref) {
|
|
163994
|
+
var _Path$moveto$arc$lineto, _Path$moveto$arc, _Path$moveto, _Path;
|
|
163995
|
+
var center = _ref.center;
|
|
163996
|
+
var r2 = _ref.r;
|
|
163997
|
+
var R2 = _ref.R;
|
|
163998
|
+
var start2 = _ref.start;
|
|
163999
|
+
var end2 = _ref.end;
|
|
164000
|
+
var epsilon = 1e-4;
|
|
164001
|
+
if (Math.abs(end2 - 2 * Math.PI) < epsilon) {
|
|
164002
|
+
end2 = 2 * Math.PI - epsilon;
|
|
164003
|
+
}
|
|
164004
|
+
var a2 = (0, _ops.plus)(center, (0, _ops.onCircle)(R2, start2));
|
|
164005
|
+
var b3 = (0, _ops.plus)(center, (0, _ops.onCircle)(R2, end2));
|
|
164006
|
+
var c2 = (0, _ops.plus)(center, (0, _ops.onCircle)(r2, end2));
|
|
164007
|
+
var d2 = (0, _ops.plus)(center, (0, _ops.onCircle)(r2, start2));
|
|
164008
|
+
var large = end2 - start2 > Math.PI ? 1 : 0;
|
|
164009
|
+
var path2 = (_Path$moveto$arc$lineto = (_Path$moveto$arc = (_Path$moveto = (_Path = (0, _path2["default"])()).moveto.apply(_Path, _toConsumableArray2(a2))).arc.apply(_Path$moveto, [R2, R2, 0, large, 1].concat(_toConsumableArray2(b3)))).lineto.apply(_Path$moveto$arc, _toConsumableArray2(c2))).arc.apply(_Path$moveto$arc$lineto, [r2, r2, 0, large, 0].concat(_toConsumableArray2(d2))).closepath();
|
|
164010
|
+
var midAngle = (start2 + end2) / 2;
|
|
164011
|
+
var midRadius = (r2 + R2) / 2;
|
|
164012
|
+
var centroid = (0, _ops.plus)(center, (0, _ops.onCircle)(midRadius, midAngle));
|
|
164013
|
+
return {
|
|
164014
|
+
path: path2,
|
|
164015
|
+
centroid
|
|
164016
|
+
};
|
|
164017
|
+
};
|
|
164018
|
+
module2.exports = exports3["default"];
|
|
164019
|
+
})(sector$1, sector$1.exports);
|
|
164020
|
+
var sectorExports = sector$1.exports;
|
|
164021
|
+
const sector = /* @__PURE__ */ getDefaultExportFromCjs(sectorExports);
|
|
164022
|
+
function SelectionLayer({
|
|
164023
|
+
isDraggable,
|
|
164024
|
+
selectionLayer: selectionLayer2,
|
|
164025
|
+
sequenceLength,
|
|
164026
|
+
radius,
|
|
164027
|
+
hideTitle,
|
|
164028
|
+
innerRadius,
|
|
164029
|
+
onRightClicked,
|
|
164030
|
+
onClick,
|
|
164031
|
+
index: index2,
|
|
164032
|
+
isProtein: isProtein2
|
|
164033
|
+
}) {
|
|
164034
|
+
const {
|
|
164035
|
+
color: color2,
|
|
164036
|
+
start: start2,
|
|
164037
|
+
end: end2,
|
|
164038
|
+
hideCarets = false,
|
|
164039
|
+
style: style2,
|
|
164040
|
+
className
|
|
164041
|
+
} = selectionLayer2;
|
|
164042
|
+
const { startAngle, endAngle, totalAngle } = getRangeAnglesSpecial(
|
|
164043
|
+
selectionLayer2,
|
|
164044
|
+
sequenceLength
|
|
164045
|
+
);
|
|
164046
|
+
const section = sector({
|
|
164047
|
+
center: [0, 0],
|
|
164048
|
+
//the center is always 0,0 for our annotations :) we rotate later!
|
|
164049
|
+
r: innerRadius,
|
|
164050
|
+
R: radius,
|
|
164051
|
+
start: 0,
|
|
164052
|
+
end: totalAngle
|
|
164053
|
+
});
|
|
164054
|
+
const selectionMessage = getSelectionMessage({
|
|
164055
|
+
sequenceLength,
|
|
164056
|
+
selectionLayer: selectionLayer2,
|
|
164057
|
+
isProtein: isProtein2
|
|
164058
|
+
});
|
|
164059
|
+
const { transform: transform2 } = PositionAnnotationOnCircle({
|
|
164060
|
+
sAngle: startAngle,
|
|
164061
|
+
eAngle: endAngle,
|
|
164062
|
+
height: 0
|
|
164063
|
+
});
|
|
164064
|
+
return /* @__PURE__ */ React$2.createElement(
|
|
164065
|
+
"g",
|
|
164066
|
+
{
|
|
164067
|
+
onContextMenu: (event) => {
|
|
164068
|
+
onRightClicked && onRightClicked({
|
|
164069
|
+
annotation: selectionLayer2,
|
|
164070
|
+
event
|
|
164071
|
+
});
|
|
164072
|
+
},
|
|
164073
|
+
onClick: onClick ? (event) => {
|
|
164074
|
+
onClick({
|
|
164075
|
+
annotation: selectionLayer2,
|
|
164076
|
+
event
|
|
164077
|
+
});
|
|
164078
|
+
} : void 0,
|
|
164079
|
+
key: "veSelectionLayer" + index2,
|
|
164080
|
+
className: "veSelectionLayer " + (className || "")
|
|
164081
|
+
},
|
|
164082
|
+
!hideTitle && /* @__PURE__ */ React$2.createElement("title", null, selectionMessage),
|
|
164083
|
+
/* @__PURE__ */ React$2.createElement(
|
|
164084
|
+
"path",
|
|
164085
|
+
{
|
|
164086
|
+
transform: transform2,
|
|
164087
|
+
className: "selectionLayer",
|
|
164088
|
+
style: __spreadValues({ opacity: 0.3 }, style2),
|
|
164089
|
+
d: section.path.print(),
|
|
164090
|
+
fill: color2
|
|
164091
|
+
}
|
|
164092
|
+
),
|
|
164093
|
+
!hideCarets && /* @__PURE__ */ React$2.createElement(
|
|
164094
|
+
Caret$1,
|
|
164095
|
+
{
|
|
164096
|
+
key: "caret1",
|
|
164097
|
+
className: className + " selectionLayerCaret " + (isDraggable ? draggableClassnames.selectionStart : ""),
|
|
164098
|
+
isSelection: true,
|
|
164099
|
+
onClick: onClick ? noop$4 : preventDefaultStopPropagation,
|
|
164100
|
+
selectionMessage,
|
|
164101
|
+
caretPosition: start2,
|
|
164102
|
+
sequenceLength,
|
|
164103
|
+
innerRadius,
|
|
164104
|
+
outerRadius: radius
|
|
164105
|
+
}
|
|
164106
|
+
),
|
|
164107
|
+
!hideCarets && /* @__PURE__ */ React$2.createElement(
|
|
164108
|
+
Caret$1,
|
|
164109
|
+
{
|
|
164110
|
+
key: "caret2",
|
|
164111
|
+
className: className + " selectionLayerCaret " + (isDraggable ? draggableClassnames.selectionEnd : ""),
|
|
164112
|
+
isSelection: true,
|
|
164113
|
+
onClick: onClick ? noop$4 : preventDefaultStopPropagation,
|
|
164114
|
+
selectionMessage,
|
|
164115
|
+
caretPosition: end2 + 1,
|
|
164116
|
+
sequenceLength,
|
|
164117
|
+
innerRadius,
|
|
164118
|
+
outerRadius: radius
|
|
164119
|
+
}
|
|
164120
|
+
)
|
|
164121
|
+
);
|
|
164122
|
+
}
|
|
164123
|
+
__name(SelectionLayer, "SelectionLayer");
|
|
164124
|
+
const SelectionLayer$1 = pure(SelectionLayer);
|
|
164125
|
+
function Axis({
|
|
164126
|
+
radius,
|
|
164127
|
+
showAxisNumbers,
|
|
164128
|
+
tickMarkHeight = 5,
|
|
164129
|
+
textOffset = 15,
|
|
164130
|
+
ringThickness = 4,
|
|
164131
|
+
zoomLevel
|
|
164132
|
+
}) {
|
|
164133
|
+
const height2 = (ringThickness + (showAxisNumbers ? textOffset + tickMarkHeight : 0)) / zoomLevel;
|
|
164134
|
+
const radiusToUse = showAxisNumbers ? radius + textOffset + tickMarkHeight : radius;
|
|
164135
|
+
const component = /* @__PURE__ */ React$2.createElement("g", { key: "veAxis", className: "veAxis" }, /* @__PURE__ */ React$2.createElement(
|
|
164136
|
+
"circle",
|
|
164137
|
+
{
|
|
164138
|
+
className: "veAxisLine veAxisOuter",
|
|
164139
|
+
key: "circleOuter",
|
|
164140
|
+
r: radiusToUse + ringThickness,
|
|
164141
|
+
style: { fill: "#ffffff00", stroke: "black", strokeWidth: 0.5 }
|
|
164142
|
+
}
|
|
164143
|
+
), /* @__PURE__ */ React$2.createElement(
|
|
164144
|
+
"circle",
|
|
164145
|
+
{
|
|
164146
|
+
className: "veAxisLine veAxisInner",
|
|
164147
|
+
key: "circle",
|
|
164148
|
+
r: radiusToUse,
|
|
164149
|
+
style: { fill: "#ffffff00", stroke: "black", strokeWidth: 0.5 }
|
|
164150
|
+
}
|
|
164151
|
+
));
|
|
164152
|
+
return {
|
|
164153
|
+
component,
|
|
164154
|
+
height: height2
|
|
164155
|
+
};
|
|
164156
|
+
}
|
|
164157
|
+
__name(Axis, "Axis");
|
|
164158
|
+
function CircularPrimer$1({
|
|
164159
|
+
color: color2 = "orange",
|
|
164160
|
+
radius,
|
|
164161
|
+
annotationHeight,
|
|
164162
|
+
totalAngle
|
|
164163
|
+
}) {
|
|
164164
|
+
return /* @__PURE__ */ React$2.createElement(
|
|
164165
|
+
"path",
|
|
164166
|
+
{
|
|
164167
|
+
className: "veOrf",
|
|
164168
|
+
strokeWidth: ".5",
|
|
164169
|
+
stroke: color2,
|
|
164170
|
+
fill: color2,
|
|
164171
|
+
d: drawDirectedPiePiece({
|
|
164172
|
+
radius,
|
|
164173
|
+
annotationHeight,
|
|
164174
|
+
totalAngle,
|
|
164175
|
+
arrowheadLength: 0.4,
|
|
164176
|
+
tailThickness: 0.4
|
|
164177
|
+
}).print()
|
|
164178
|
+
}
|
|
164179
|
+
);
|
|
164180
|
+
}
|
|
164181
|
+
__name(CircularPrimer$1, "CircularPrimer$1");
|
|
164182
|
+
function CircularPrimer(props) {
|
|
164183
|
+
const {
|
|
164184
|
+
color: color2 = "orange",
|
|
164185
|
+
radius,
|
|
164186
|
+
arrowheadLength = 0.5,
|
|
164187
|
+
annotationHeight,
|
|
164188
|
+
totalAngle,
|
|
164189
|
+
id: id2,
|
|
164190
|
+
labelNeedsFlip,
|
|
164191
|
+
ellipsizedName
|
|
164192
|
+
} = props;
|
|
164193
|
+
const [path2, textPath] = drawDirectedPiePiece({
|
|
164194
|
+
radius,
|
|
164195
|
+
annotationHeight,
|
|
164196
|
+
totalAngle,
|
|
164197
|
+
arrowheadLength,
|
|
164198
|
+
tailThickness: 1,
|
|
164199
|
+
//feature specific
|
|
164200
|
+
returnTextPath: true,
|
|
164201
|
+
hasLabel: ellipsizedName,
|
|
164202
|
+
labelNeedsFlip
|
|
164203
|
+
});
|
|
164204
|
+
return /* @__PURE__ */ React$2.createElement(React$2.Fragment, null, getStripedPattern({ color: color2 }), /* @__PURE__ */ React$2.createElement(
|
|
164205
|
+
"path",
|
|
164206
|
+
{
|
|
164207
|
+
className: "vePrimer veCircularViewPrimer",
|
|
164208
|
+
id: id2,
|
|
164209
|
+
strokeWidth: ".5",
|
|
164210
|
+
stroke: "black",
|
|
164211
|
+
fill: "url(#diagonalHatch)",
|
|
164212
|
+
d: path2.print()
|
|
164213
|
+
}
|
|
164214
|
+
), getInternalLabel(__spreadProps(__spreadValues({}, props), { colorToUse: color2, textPath })));
|
|
164215
|
+
}
|
|
164216
|
+
__name(CircularPrimer, "CircularPrimer");
|
|
164217
|
+
function Cutsite({
|
|
164218
|
+
annotationHeight,
|
|
164219
|
+
radius
|
|
164220
|
+
// totalAngle,
|
|
164221
|
+
// ...rest
|
|
164222
|
+
}) {
|
|
164223
|
+
return /* @__PURE__ */ React$2.createElement(
|
|
164224
|
+
"rect",
|
|
164225
|
+
{
|
|
164226
|
+
className: "veCutsite",
|
|
164227
|
+
width: 1,
|
|
164228
|
+
y: -radius - 4,
|
|
164229
|
+
height: annotationHeight
|
|
164230
|
+
}
|
|
164231
|
+
);
|
|
164232
|
+
}
|
|
164233
|
+
__name(Cutsite, "Cutsite");
|
|
164030
164234
|
const style$e = "";
|
|
164031
164235
|
function c(u2, e2, c2) {
|
|
164032
164236
|
var i2 = this, a2 = reactExports.useRef(null), o2 = reactExports.useRef(0), f2 = reactExports.useRef(null), l2 = reactExports.useRef([]), m2 = reactExports.useRef(), v2 = reactExports.useRef(), d2 = reactExports.useRef(u2), p2 = reactExports.useRef(true);
|
|
@@ -170546,7 +170750,7 @@ ${seqDataToCopy}\r
|
|
|
170546
170750
|
scrollbarWidth: "none",
|
|
170547
170751
|
whiteSpace: "nowrap"
|
|
170548
170752
|
},
|
|
170549
|
-
title: name2,
|
|
170753
|
+
"data-title": name2,
|
|
170550
170754
|
key: i2
|
|
170551
170755
|
},
|
|
170552
170756
|
/* @__PURE__ */ React$2.createElement(
|
|
@@ -171346,7 +171550,7 @@ ${seqDataToCopy}\r
|
|
|
171346
171550
|
textOverflow: "ellipsis",
|
|
171347
171551
|
whiteSpace: "nowrap"
|
|
171348
171552
|
},
|
|
171349
|
-
title: this.props.alignmentType || "Unknown Alignment Type"
|
|
171553
|
+
"data-title": this.props.alignmentType || "Unknown Alignment Type"
|
|
171350
171554
|
},
|
|
171351
171555
|
this.props.alignmentType || "Unknown Alignment Type"
|
|
171352
171556
|
)),
|