@holoviz/geoviews 1.14.1-rc.0 → 1.15.0-b.1
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/dist/geoviews.js +139 -3
- package/dist/geoviews.js.map +1 -1
- package/dist/geoviews.json +1 -1
- package/dist/geoviews.min.js +4 -3
- package/dist/lib/models/index.d.ts +1 -0
- package/dist/lib/models/index.js +1 -0
- package/dist/lib/models/index.js.map +1 -1
- package/dist/lib/models/wind_barb.d.ts +47 -0
- package/dist/lib/models/wind_barb.js +127 -0
- package/dist/lib/models/wind_barb.js.map +1 -0
- package/package.json +2 -3
package/dist/geoviews.js
CHANGED
|
@@ -45,12 +45,12 @@
|
|
|
45
45
|
"c764d38756": /* index.js */ function _(require, module, exports, __esModule, __esExport) {
|
|
46
46
|
__esModule();
|
|
47
47
|
const tslib_1 = require("tslib");
|
|
48
|
-
const GeoViews = tslib_1.__importStar(require("
|
|
48
|
+
const GeoViews = tslib_1.__importStar(require("2e3df39bba") /* ./models */);
|
|
49
49
|
exports.GeoViews = GeoViews;
|
|
50
50
|
const base_1 = require("@bokehjs/base");
|
|
51
51
|
(0, base_1.register_models)(GeoViews);
|
|
52
52
|
},
|
|
53
|
-
"
|
|
53
|
+
"2e3df39bba": /* models/index.js */ function _(require, module, exports, __esModule, __esExport) {
|
|
54
54
|
__esModule();
|
|
55
55
|
var checkpoint_tool_1 = require("49636d3eef") /* ./checkpoint_tool */;
|
|
56
56
|
__esExport("CheckpointTool", checkpoint_tool_1.CheckpointTool);
|
|
@@ -62,6 +62,8 @@
|
|
|
62
62
|
__esExport("PolyVertexEditTool", poly_edit_1.PolyVertexEditTool);
|
|
63
63
|
var restore_tool_1 = require("1a96add9eb") /* ./restore_tool */;
|
|
64
64
|
__esExport("RestoreTool", restore_tool_1.RestoreTool);
|
|
65
|
+
var wind_barb_1 = require("028985dc77") /* ./wind_barb */;
|
|
66
|
+
__esExport("WindBarb", wind_barb_1.WindBarb);
|
|
65
67
|
},
|
|
66
68
|
"49636d3eef": /* models/checkpoint_tool.js */ function _(require, module, exports, __esModule, __esExport) {
|
|
67
69
|
var _a;
|
|
@@ -643,5 +645,139 @@
|
|
|
643
645
|
}));
|
|
644
646
|
})();
|
|
645
647
|
},
|
|
646
|
-
|
|
648
|
+
"028985dc77": /* models/wind_barb.js */ function _(require, module, exports, __esModule, __esExport) {
|
|
649
|
+
var _a;
|
|
650
|
+
__esModule();
|
|
651
|
+
const tslib_1 = require("tslib");
|
|
652
|
+
const xy_glyph_1 = require("@bokehjs/models/glyphs/xy_glyph");
|
|
653
|
+
const property_mixins_1 = require("@bokehjs/core/property_mixins");
|
|
654
|
+
const p = tslib_1.__importStar(require("@bokehjs/core/properties"));
|
|
655
|
+
const selection_1 = require("@bokehjs/models/selections/selection");
|
|
656
|
+
class WindBarbView extends xy_glyph_1.XYGlyphView {
|
|
657
|
+
_paint(ctx, indices, data) {
|
|
658
|
+
const { sx, sy, angle, magnitude } = data ?? this;
|
|
659
|
+
const y = this.y;
|
|
660
|
+
const scale = this.model.scale;
|
|
661
|
+
for (const i of indices) {
|
|
662
|
+
const screen_x = sx[i];
|
|
663
|
+
const screen_y = sy[i];
|
|
664
|
+
const a = angle.get(i);
|
|
665
|
+
const mag = magnitude.get(i);
|
|
666
|
+
const lat = y[i];
|
|
667
|
+
if (!isFinite(screen_x + screen_y + a + mag + lat))
|
|
668
|
+
continue;
|
|
669
|
+
this._draw_wind_barb(ctx, screen_x, screen_y, a, mag, scale, i);
|
|
670
|
+
}
|
|
671
|
+
}
|
|
672
|
+
_draw_wind_barb(ctx, cx, cy, angle, magnitude, scale, idx = 0) {
|
|
673
|
+
// Wind barb drawing using meteorological convention
|
|
674
|
+
// magnitude is in knots (or appropriate units)
|
|
675
|
+
// angle is in meteorological convention (direction wind comes FROM)
|
|
676
|
+
// barbs point in the direction the wind is coming FROM
|
|
677
|
+
const barb_length = this.model.barb_length * scale;
|
|
678
|
+
const barb_width = this.model.barb_width * scale;
|
|
679
|
+
const flag_width = this.model.flag_width * scale;
|
|
680
|
+
ctx.save();
|
|
681
|
+
ctx.translate(cx, cy);
|
|
682
|
+
ctx.rotate(-angle);
|
|
683
|
+
ctx.beginPath();
|
|
684
|
+
this.visuals.line.apply(ctx, idx);
|
|
685
|
+
ctx.strokeStyle = ctx.strokeStyle || "black";
|
|
686
|
+
ctx.lineCap = "round";
|
|
687
|
+
ctx.lineJoin = "round";
|
|
688
|
+
// Determine barbs/flags based on magnitude
|
|
689
|
+
// Standard increments: 50 knots = flag (triangle), 10 knots = full barb, 5 knots = half barb
|
|
690
|
+
const mag_rounded = Math.round(magnitude / 5) * 5;
|
|
691
|
+
if (mag_rounded >= 5) {
|
|
692
|
+
// Draw the main staff (pointing in direction wind is coming from)
|
|
693
|
+
ctx.moveTo(0, 0);
|
|
694
|
+
ctx.lineTo(0, -barb_length);
|
|
695
|
+
ctx.stroke();
|
|
696
|
+
let remaining = mag_rounded;
|
|
697
|
+
let y_offset = -barb_length;
|
|
698
|
+
const spacing = this.model.spacing * scale;
|
|
699
|
+
// Draw 50-knot flags (filled triangles)
|
|
700
|
+
while (remaining >= 50) {
|
|
701
|
+
ctx.fillStyle = ctx.strokeStyle || "black";
|
|
702
|
+
ctx.beginPath();
|
|
703
|
+
ctx.moveTo(0, y_offset);
|
|
704
|
+
ctx.lineTo(flag_width, y_offset + spacing);
|
|
705
|
+
ctx.lineTo(0, y_offset + spacing * 2);
|
|
706
|
+
ctx.closePath();
|
|
707
|
+
ctx.fill();
|
|
708
|
+
y_offset += spacing * 2.5;
|
|
709
|
+
remaining -= 50;
|
|
710
|
+
}
|
|
711
|
+
// Draw 10-knot barbs (full lines)
|
|
712
|
+
while (remaining >= 10) {
|
|
713
|
+
ctx.beginPath();
|
|
714
|
+
ctx.moveTo(0, y_offset);
|
|
715
|
+
ctx.lineTo(barb_width, y_offset + barb_width * 0.2);
|
|
716
|
+
ctx.stroke();
|
|
717
|
+
y_offset += spacing;
|
|
718
|
+
remaining -= 10;
|
|
719
|
+
}
|
|
720
|
+
// Draw 5-knot half-barb
|
|
721
|
+
if (remaining >= 5) {
|
|
722
|
+
ctx.beginPath();
|
|
723
|
+
ctx.moveTo(0, y_offset);
|
|
724
|
+
ctx.lineTo(barb_width / 2, y_offset + barb_width * 0.1);
|
|
725
|
+
ctx.stroke();
|
|
726
|
+
}
|
|
727
|
+
}
|
|
728
|
+
else {
|
|
729
|
+
// For calm winds (< 5 knots), draw only a circle (no staff line)
|
|
730
|
+
ctx.beginPath();
|
|
731
|
+
ctx.arc(0, 0, this.model.calm_circle_radius * scale, 0, 2 * Math.PI);
|
|
732
|
+
ctx.stroke();
|
|
733
|
+
}
|
|
734
|
+
ctx.restore();
|
|
735
|
+
}
|
|
736
|
+
_hit_point(geometry) {
|
|
737
|
+
const { sx, sy } = geometry;
|
|
738
|
+
const candidates = [];
|
|
739
|
+
for (let i = 0; i < this.data_size; i++) {
|
|
740
|
+
const dx = this.sx[i] - sx;
|
|
741
|
+
const dy = this.sy[i] - sy;
|
|
742
|
+
const dist = Math.sqrt(dx * dx + dy * dy);
|
|
743
|
+
if (dist < 10 * this.model.scale) { // Hit radius
|
|
744
|
+
candidates.push(i);
|
|
745
|
+
}
|
|
746
|
+
}
|
|
747
|
+
return new selection_1.Selection({ indices: candidates });
|
|
748
|
+
}
|
|
749
|
+
draw_legend_for_index(ctx, { x0, x1, y0, y1 }, _index) {
|
|
750
|
+
const cx = (x0 + x1) / 2;
|
|
751
|
+
const cy = (y0 + y1) / 2;
|
|
752
|
+
// Draw a representative wind barb in the legend
|
|
753
|
+
this._draw_wind_barb(ctx, cx, cy, Math.PI / 4, 25, 0.5);
|
|
754
|
+
}
|
|
755
|
+
}
|
|
756
|
+
exports.WindBarbView = WindBarbView;
|
|
757
|
+
WindBarbView.__name__ = "WindBarbView";
|
|
758
|
+
class WindBarb extends xy_glyph_1.XYGlyph {
|
|
759
|
+
constructor(attrs) {
|
|
760
|
+
super(attrs);
|
|
761
|
+
}
|
|
762
|
+
}
|
|
763
|
+
exports.WindBarb = WindBarb;
|
|
764
|
+
_a = WindBarb;
|
|
765
|
+
WindBarb.__name__ = "WindBarb";
|
|
766
|
+
WindBarb.__module__ = "geoviews.models.wind_barb";
|
|
767
|
+
(() => {
|
|
768
|
+
_a.prototype.default_view = WindBarbView;
|
|
769
|
+
_a.define(({ Float }) => ({
|
|
770
|
+
angle: [p.AngleSpec, { value: 0 }],
|
|
771
|
+
magnitude: [p.NumberSpec, { value: 0 }],
|
|
772
|
+
scale: [Float, 1.0],
|
|
773
|
+
barb_length: [Float, 30.0],
|
|
774
|
+
barb_width: [Float, 15.0],
|
|
775
|
+
flag_width: [Float, 15.0],
|
|
776
|
+
spacing: [Float, 6.0],
|
|
777
|
+
calm_circle_radius: [Float, 3.0],
|
|
778
|
+
}));
|
|
779
|
+
_a.mixins(property_mixins_1.LineVector);
|
|
780
|
+
})();
|
|
781
|
+
},
|
|
782
|
+
}, "c764d38756", {"index":"c764d38756","models/index":"2e3df39bba","models/checkpoint_tool":"49636d3eef","models/clear_tool":"356402dee7","models/poly_draw":"c03d81e6d5","models/poly_edit":"238deef1f5","models/restore_tool":"1a96add9eb","models/wind_barb":"028985dc77"}, {});});
|
|
647
783
|
//# sourceMappingURL=geoviews.js.map
|
package/dist/geoviews.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["@@/geoviews/dist/lib/index.js","@@/geoviews/dist/lib/models/index.js","@@/geoviews/dist/lib/models/checkpoint_tool.js","@@/geoviews/dist/lib/models/clear_tool.js","@@/geoviews/dist/lib/models/poly_draw.js","@@/geoviews/dist/lib/models/poly_edit.js","@@/geoviews/dist/lib/models/restore_tool.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,ACRA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,ACbA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,ACpDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,ACjCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,AC1MA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,AC7PA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","file":"generated.js","sourceRoot":"","sourcesContent":["/* index.js */ function _(require, module, exports, __esModule, __esExport) {\n __esModule();\n const tslib_1 = require(\"tslib\");\n const GeoViews = tslib_1.__importStar(require(\"b4555bea44\") /* ./models */);\n exports.GeoViews = GeoViews;\n const base_1 = require(\"@bokehjs/base\");\n (0, base_1.register_models)(GeoViews);\n}\n","/* models/index.js */ function _(require, module, exports, __esModule, __esExport) {\n __esModule();\n var checkpoint_tool_1 = require(\"49636d3eef\") /* ./checkpoint_tool */;\n __esExport(\"CheckpointTool\", checkpoint_tool_1.CheckpointTool);\n var clear_tool_1 = require(\"356402dee7\") /* ./clear_tool */;\n __esExport(\"ClearTool\", clear_tool_1.ClearTool);\n var poly_draw_1 = require(\"c03d81e6d5\") /* ./poly_draw */;\n __esExport(\"PolyVertexDrawTool\", poly_draw_1.PolyVertexDrawTool);\n var poly_edit_1 = require(\"238deef1f5\") /* ./poly_edit */;\n __esExport(\"PolyVertexEditTool\", poly_edit_1.PolyVertexEditTool);\n var restore_tool_1 = require(\"1a96add9eb\") /* ./restore_tool */;\n __esExport(\"RestoreTool\", restore_tool_1.RestoreTool);\n}\n","/* models/checkpoint_tool.js */ function _(require, module, exports, __esModule, __esExport) {\n var _a;\n __esModule();\n const object_1 = require(\"@bokehjs/core/util/object\");\n const array_1 = require(\"@bokehjs/core/util/array\");\n const action_tool_1 = require(\"@bokehjs/models/tools/actions/action_tool\");\n const column_data_source_1 = require(\"@bokehjs/models/sources/column_data_source\");\n const icons_css_1 = require(\"@bokehjs/styles/icons.css\");\n class CheckpointToolView extends action_tool_1.ActionToolView {\n doit() {\n const sources = this.model.sources;\n for (const source of sources) {\n if (source.buffer == null) {\n source.buffer = [];\n }\n const data_copy = {};\n for (const [key, column] of (0, object_1.entries)(source.data)) {\n const new_column = [];\n for (const arr of column) {\n if (Array.isArray(arr) || ArrayBuffer.isView(arr)) {\n new_column.push((0, array_1.copy)(arr));\n }\n else {\n new_column.push(arr);\n }\n }\n data_copy[key] = new_column;\n }\n source.buffer.push(data_copy);\n }\n }\n }\n exports.CheckpointToolView = CheckpointToolView;\n CheckpointToolView.__name__ = \"CheckpointToolView\";\n class CheckpointTool extends action_tool_1.ActionTool {\n constructor(attrs) {\n super(attrs);\n this.tool_name = \"Checkpoint\";\n this.tool_icon = icons_css_1.tool_icon_save;\n }\n }\n exports.CheckpointTool = CheckpointTool;\n _a = CheckpointTool;\n CheckpointTool.__name__ = \"CheckpointTool\";\n CheckpointTool.__module__ = \"geoviews.models.custom_tools\";\n (() => {\n _a.prototype.default_view = CheckpointToolView;\n _a.define(({ List, Ref }) => ({\n sources: [List(Ref(column_data_source_1.ColumnDataSource)), []],\n }));\n })();\n}\n","/* models/clear_tool.js */ function _(require, module, exports, __esModule, __esExport) {\n var _a;\n __esModule();\n const action_tool_1 = require(\"@bokehjs/models/tools/actions/action_tool\");\n const column_data_source_1 = require(\"@bokehjs/models/sources/column_data_source\");\n const icons_css_1 = require(\"@bokehjs/styles/icons.css\");\n class ClearToolView extends action_tool_1.ActionToolView {\n doit() {\n for (const source of this.model.sources) {\n source.clear();\n }\n }\n }\n exports.ClearToolView = ClearToolView;\n ClearToolView.__name__ = \"ClearToolView\";\n class ClearTool extends action_tool_1.ActionTool {\n constructor(attrs) {\n super(attrs);\n this.tool_name = \"Clear data\";\n this.tool_icon = icons_css_1.tool_icon_reset;\n }\n }\n exports.ClearTool = ClearTool;\n _a = ClearTool;\n ClearTool.__name__ = \"ClearTool\";\n ClearTool.__module__ = \"geoviews.models.custom_tools\";\n (() => {\n _a.prototype.default_view = ClearToolView;\n _a.define(({ List, Ref }) => ({\n sources: [List(Ref(column_data_source_1.ColumnDataSource)), []],\n }));\n })();\n}\n","/* models/poly_draw.js */ function _(require, module, exports, __esModule, __esExport) {\n var _a;\n __esModule();\n const vectorization_1 = require(\"@bokehjs/core/vectorization\");\n const object_1 = require(\"@bokehjs/core/util/object\");\n const types_1 = require(\"@bokehjs/core/util/types\");\n const assert_1 = require(\"@bokehjs/core/util/assert\");\n const poly_draw_tool_1 = require(\"@bokehjs/models/tools/edit/poly_draw_tool\");\n class PolyVertexDrawToolView extends poly_draw_tool_1.PolyDrawToolView {\n _split_path(x, y) {\n for (const renderer of this.model.renderers) {\n const glyph = renderer.glyph;\n const cds = renderer.data_source;\n const [xkey, ykey] = [glyph.xs.field, glyph.ys.field];\n const xpaths = cds.data[xkey];\n const ypaths = cds.data[ykey];\n for (let index = 0; index < xpaths.length; index++) {\n let xs = xpaths[index];\n if (!(0, types_1.isArray)(xs)) {\n xs = Array.from(xs);\n cds.data[xkey][index] = xs;\n }\n let ys = ypaths[index];\n if (!(0, types_1.isArray)(ys)) {\n ys = Array.from(ys);\n cds.data[ykey][index] = ys;\n }\n for (let i = 0; i < xs.length; i++) {\n if ((xs[i] == x) && (ys[i] == y) && (i != 0) && (i != (xs.length - 1))) {\n xpaths.splice(index + 1, 0, xs.slice(i));\n ypaths.splice(index + 1, 0, ys.slice(i));\n xs.splice(i + 1);\n ys.splice(i + 1);\n for (const column of cds.columns()) {\n if ((column !== xkey) && (column != ykey)) {\n cds.data[column].splice(index + 1, 0, cds.data[column][index]);\n }\n }\n return;\n }\n }\n }\n }\n }\n _snap_to_vertex(ev, x, y) {\n const { vertex_renderer } = this.model;\n if (vertex_renderer != null) {\n // If an existing vertex is hit snap to it\n const vertex_selected = this._select_event(ev, \"replace\", [vertex_renderer]);\n const point_ds = vertex_renderer.data_source;\n // Type once dataspecs are typed\n const point_glyph = vertex_renderer.glyph;\n const [pxkey, pykey] = [point_glyph.x.field, point_glyph.y.field];\n if (vertex_selected.length > 0) {\n // If existing vertex is hit split path at that location\n // converting to feature vertex\n const index = point_ds.selected.indices[0];\n if (pxkey) {\n x = point_ds.get(pxkey)[index];\n }\n if (pykey) {\n y = point_ds.get(pykey)[index];\n }\n if (ev.type != \"move\") {\n this._split_path(x, y);\n }\n point_ds.selection_manager.clear();\n }\n }\n return [x, y];\n }\n _set_vertices(xs, ys, styles) {\n const { vertex_renderer } = this.model;\n if (vertex_renderer == null) {\n return;\n }\n const point_glyph = vertex_renderer.glyph;\n const point_cds = vertex_renderer.data_source;\n const [pxkey, pykey] = [point_glyph.x.field, point_glyph.y.field];\n if (pxkey) {\n if ((0, types_1.isArray)(xs)) {\n point_cds.set(pxkey, xs);\n }\n else {\n point_glyph.x = { value: xs };\n }\n }\n if (pykey) {\n if ((0, types_1.isArray)(ys)) {\n point_cds.set(pykey, ys);\n }\n else {\n point_glyph.y = { value: ys };\n }\n }\n if (styles != null) {\n for (const key of (0, object_1.keys)(styles)) {\n point_cds.set(key, styles[key]);\n point_glyph[key] = { field: key };\n }\n }\n else {\n for (const col of point_cds.columns()) {\n point_cds.set(col, []);\n }\n }\n this._emit_cds_changes(point_cds, true, true, false);\n }\n _show_vertices() {\n if (!this.model.active) {\n return;\n }\n const { renderers, node_style, end_style } = this.model;\n const xs = [];\n const ys = [];\n const styles = {};\n for (const key of (0, object_1.keys)(end_style)) {\n styles[key] = [];\n }\n for (let i = 0; i < renderers.length; i++) {\n const renderer = renderers[i];\n const cds = renderer.data_source;\n const glyph = renderer.glyph;\n const [xkey, ykey] = [glyph.xs.field, glyph.ys.field];\n for (const array of cds.get_array(xkey)) {\n (0, assert_1.assert)((0, types_1.isArray)(array));\n xs.push(...array);\n for (const [key, val] of (0, object_1.entries)(end_style)) {\n styles[key].push(val);\n }\n for (const [key, val] of (0, object_1.entries)(node_style)) {\n for (let index = 0; index < array.length - 2; index++) {\n styles[key].push(val);\n }\n }\n for (const [key, val] of (0, object_1.entries)(end_style)) {\n styles[key].push(val);\n }\n }\n for (const array of cds.get_array(ykey)) {\n (0, assert_1.assert)((0, types_1.isArray)(array));\n ys.push(...array);\n }\n if (this._drawing && i == renderers.length - 1) {\n // Skip currently drawn vertex\n xs.splice(xs.length - 1, 1);\n ys.splice(ys.length - 1, 1);\n for (const [_, array] of (0, object_1.entries)(styles)) {\n array.splice(array.length - 1, 1);\n }\n }\n }\n this._set_vertices(xs, ys, styles);\n }\n _remove() {\n const renderer = this.model.renderers[0];\n const cds = renderer.data_source;\n const glyph = renderer.glyph;\n if ((0, vectorization_1.isField)(glyph.xs)) {\n const xkey = glyph.xs.field;\n const array = cds.get_array(xkey);\n const xidx = array.length - 1;\n const xs = array[xidx];\n xs.splice(xs.length - 1, 1);\n if (xs.length == 1) {\n array.splice(xidx, 1);\n }\n }\n if ((0, vectorization_1.isField)(glyph.ys)) {\n const ykey = glyph.ys.field;\n const array = cds.get_array(ykey);\n const yidx = array.length - 1;\n const ys = array[yidx];\n ys.splice(ys.length - 1, 1);\n if (ys.length == 1) {\n array.splice(yidx, 1);\n }\n }\n this._emit_cds_changes(cds);\n this._drawing = false;\n this._show_vertices();\n }\n }\n exports.PolyVertexDrawToolView = PolyVertexDrawToolView;\n PolyVertexDrawToolView.__name__ = \"PolyVertexDrawToolView\";\n class PolyVertexDrawTool extends poly_draw_tool_1.PolyDrawTool {\n constructor(attrs) {\n super(attrs);\n }\n }\n exports.PolyVertexDrawTool = PolyVertexDrawTool;\n _a = PolyVertexDrawTool;\n PolyVertexDrawTool.__name__ = \"PolyVertexDrawTool\";\n PolyVertexDrawTool.__module__ = \"geoviews.models.custom_tools\";\n (() => {\n _a.prototype.default_view = PolyVertexDrawToolView;\n _a.define(({ Dict, Unknown }) => ({\n end_style: [Dict(Unknown), {}],\n node_style: [Dict(Unknown), {}],\n }));\n })();\n}\n","/* models/poly_edit.js */ function _(require, module, exports, __esModule, __esExport) {\n var _a;\n __esModule();\n const object_1 = require(\"@bokehjs/core/util/object\");\n const types_1 = require(\"@bokehjs/core/util/types\");\n const poly_edit_tool_1 = require(\"@bokehjs/models/tools/edit/poly_edit_tool\");\n class PolyVertexEditToolView extends poly_edit_tool_1.PolyEditToolView {\n deactivate() {\n this._hide_vertices();\n if (this._selected_renderer == null) {\n return;\n }\n else if (this._drawing) {\n this._remove_vertex();\n this._drawing = false;\n }\n this._emit_cds_changes(this._selected_renderer.data_source, false, true, false);\n }\n _pan(ev) {\n if (this._basepoint == null || this.model.vertex_renderer == null) {\n return;\n }\n const points = this._drag_points(ev, [this.model.vertex_renderer]);\n if (!ev.modifiers.shift) {\n this._move_linked(points);\n }\n if (this._selected_renderer != null) {\n this._selected_renderer.data_source.change.emit();\n }\n }\n _pan_end(ev) {\n if (this._basepoint == null || this.model.vertex_renderer == null) {\n return;\n }\n const points = this._drag_points(ev, [this.model.vertex_renderer]);\n if (!ev.modifiers.shift) {\n this._move_linked(points);\n }\n this._emit_cds_changes(this.model.vertex_renderer.data_source, false, true, true);\n if (this._selected_renderer != null) {\n this._emit_cds_changes(this._selected_renderer.data_source);\n }\n this._basepoint = null;\n }\n _drag_points(ev, renderers) {\n if (this._basepoint == null) {\n return [];\n }\n const [bx, by] = this._basepoint;\n const points = [];\n for (const renderer of renderers) {\n const basepoint = this._map_drag(bx, by, renderer);\n const point = this._map_drag(ev.sx, ev.sy, renderer);\n if (point == null || basepoint == null) {\n continue;\n }\n const [x, y] = point;\n const [px, py] = basepoint;\n const [dx, dy] = [x - px, y - py];\n // Type once dataspecs are typed\n const glyph = renderer.glyph;\n const cds = renderer.data_source;\n const [xkey, ykey] = [glyph.x.field, glyph.y.field];\n for (const index of cds.selected.indices) {\n const point = [];\n if (xkey) {\n const xs = cds.get(xkey);\n point.push(xs[index]);\n xs[index] += dx;\n }\n if (ykey) {\n const ys = cds.get(ykey);\n point.push(ys[index]);\n ys[index] += dy;\n }\n point.push(dx);\n point.push(dy);\n points.push(point);\n }\n cds.change.emit();\n }\n this._basepoint = [ev.sx, ev.sy];\n return points;\n }\n _set_vertices(xs, ys, styles) {\n if (this.model.vertex_renderer == null) {\n return;\n }\n const point_glyph = this.model.vertex_renderer.glyph;\n const point_cds = this.model.vertex_renderer.data_source;\n const [pxkey, pykey] = [point_glyph.x.field, point_glyph.y.field];\n if (pxkey) {\n if ((0, types_1.isArray)(xs)) {\n point_cds.set(pxkey, xs);\n }\n else {\n point_glyph.x = { value: xs };\n }\n }\n if (pykey) {\n if ((0, types_1.isArray)(ys)) {\n point_cds.set(pykey, ys);\n }\n else {\n point_glyph.y = { value: ys };\n }\n }\n if (styles != null) {\n for (const [key, array] of (0, object_1.entries)(styles)) {\n point_cds.set(key, array);\n point_glyph[key] = { field: key };\n }\n }\n else {\n for (const col of point_cds.columns()) {\n point_cds.set(col, []);\n }\n }\n this._emit_cds_changes(point_cds, true, true, false);\n }\n _move_linked(points) {\n if (this._selected_renderer == null) {\n return;\n }\n const renderer = this._selected_renderer;\n const glyph = renderer.glyph;\n const cds = renderer.data_source;\n const [xkey, ykey] = [glyph.xs.field, glyph.ys.field];\n const xpaths = cds.data[xkey];\n const ypaths = cds.data[ykey];\n for (const point of points) {\n const [x, y, dx, dy] = point;\n for (let index = 0; index < xpaths.length; index++) {\n const xs = xpaths[index];\n const ys = ypaths[index];\n for (let i = 0; i < xs.length; i++) {\n if ((xs[i] == x) && (ys[i] == y)) {\n xs[i] += dx;\n ys[i] += dy;\n }\n }\n }\n }\n }\n _tap(ev) {\n if (this.model.vertex_renderer == null) {\n return;\n }\n const renderer = this.model.vertex_renderer;\n const point = this._map_drag(ev.sx, ev.sy, renderer);\n if (point == null) {\n return;\n }\n else if (this._drawing && this._selected_renderer != null) {\n let [x, y] = point;\n const cds = renderer.data_source;\n // Type once dataspecs are typed\n const glyph = renderer.glyph;\n const [xkey, ykey] = [glyph.x.field, glyph.y.field];\n const indices = cds.selected.indices;\n [x, y] = this._snap_to_vertex(ev, x, y);\n const index = indices[0];\n cds.selected.indices = [index + 1];\n if (xkey) {\n const xs = cds.get_array(xkey);\n const nx = xs[index];\n xs[index] = x;\n xs.splice(index + 1, 0, nx);\n }\n if (ykey) {\n const ys = cds.get_array(ykey);\n const ny = ys[index];\n ys[index] = y;\n ys.splice(index + 1, 0, ny);\n }\n cds.change.emit();\n this._emit_cds_changes(this._selected_renderer.data_source, true, false, true);\n return;\n }\n this._select_event(ev, this._select_mode(ev), [renderer]);\n }\n _show_vertices(ev) {\n if (!this.model.active) {\n return;\n }\n const renderers = this._select_event(ev, \"replace\", this.model.renderers);\n if (renderers.length === 0) {\n this._hide_vertices();\n this._selected_renderer = null;\n this._drawing = false;\n return;\n }\n const renderer = renderers[0];\n const glyph = renderer.glyph;\n const cds = renderer.data_source;\n const index = cds.selected.indices[0];\n const [xkey, ykey] = [glyph.xs.field, glyph.ys.field];\n let xs;\n let ys;\n if (xkey) {\n xs = cds.get(xkey)[index];\n if (!(0, types_1.isArray)(xs)) {\n cds.get(xkey)[index] = xs = Array.from(xs);\n }\n }\n else {\n xs = glyph.xs.value;\n }\n if (ykey) {\n ys = cds.get(ykey)[index];\n if (!(0, types_1.isArray)(ys)) {\n cds.get(ykey)[index] = ys = Array.from(ys);\n }\n }\n else {\n ys = glyph.ys.value;\n }\n const { end_style, node_style } = this.model;\n const styles = {};\n for (const [key, val] of (0, object_1.entries)(end_style)) {\n styles[key] = [val];\n }\n for (const [key, val] of (0, object_1.entries)(node_style)) {\n for (let index = 0; index < xs.length - 2; index++) {\n styles[key].push(val);\n }\n }\n for (const [key, val] of (0, object_1.entries)(end_style)) {\n styles[key].push(val);\n }\n this._selected_renderer = renderer;\n this._set_vertices(xs, ys, styles);\n }\n }\n exports.PolyVertexEditToolView = PolyVertexEditToolView;\n PolyVertexEditToolView.__name__ = \"PolyVertexEditToolView\";\n class PolyVertexEditTool extends poly_edit_tool_1.PolyEditTool {\n constructor(attrs) {\n super(attrs);\n }\n }\n exports.PolyVertexEditTool = PolyVertexEditTool;\n _a = PolyVertexEditTool;\n PolyVertexEditTool.__name__ = \"PolyVertexEditTool\";\n PolyVertexEditTool.__module__ = \"geoviews.models.custom_tools\";\n (() => {\n _a.prototype.default_view = PolyVertexEditToolView;\n _a.define(({ Dict, Unknown }) => ({\n end_style: [Dict(Unknown), {}],\n node_style: [Dict(Unknown), {}],\n }));\n })();\n}\n","/* models/restore_tool.js */ function _(require, module, exports, __esModule, __esExport) {\n var _a;\n __esModule();\n const action_tool_1 = require(\"@bokehjs/models/tools/actions/action_tool\");\n const column_data_source_1 = require(\"@bokehjs/models/sources/column_data_source\");\n const icons_css_1 = require(\"@bokehjs/styles/icons.css\");\n class RestoreToolView extends action_tool_1.ActionToolView {\n doit() {\n const sources = this.model.sources;\n for (const source of sources) {\n const new_data = source.buffer?.pop();\n if (new_data == null) {\n continue;\n }\n source.data = new_data;\n source.change.emit();\n source.properties.data.change.emit();\n }\n }\n }\n exports.RestoreToolView = RestoreToolView;\n RestoreToolView.__name__ = \"RestoreToolView\";\n class RestoreTool extends action_tool_1.ActionTool {\n constructor(attrs) {\n super(attrs);\n this.tool_name = \"Restore\";\n this.tool_icon = icons_css_1.tool_icon_undo;\n }\n }\n exports.RestoreTool = RestoreTool;\n _a = RestoreTool;\n RestoreTool.__name__ = \"RestoreTool\";\n RestoreTool.__module__ = \"geoviews.models.custom_tools\";\n (() => {\n _a.prototype.default_view = RestoreToolView;\n _a.define(({ List, Ref }) => ({\n sources: [List(Ref(column_data_source_1.ColumnDataSource)), []],\n }));\n })();\n}\n"]}
|
|
1
|
+
{"version":3,"sources":["@@/geoviews/dist/lib/index.js","@@/geoviews/dist/lib/models/index.js","@@/geoviews/dist/lib/models/checkpoint_tool.js","@@/geoviews/dist/lib/models/clear_tool.js","@@/geoviews/dist/lib/models/poly_draw.js","@@/geoviews/dist/lib/models/poly_edit.js","@@/geoviews/dist/lib/models/restore_tool.js","@@/geoviews/dist/lib/models/wind_barb.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,ACRA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,ACfA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,ACpDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,ACjCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,AC1MA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,AC7PA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,ACxCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","file":"generated.js","sourceRoot":"","sourcesContent":["/* index.js */ function _(require, module, exports, __esModule, __esExport) {\n __esModule();\n const tslib_1 = require(\"tslib\");\n const GeoViews = tslib_1.__importStar(require(\"2e3df39bba\") /* ./models */);\n exports.GeoViews = GeoViews;\n const base_1 = require(\"@bokehjs/base\");\n (0, base_1.register_models)(GeoViews);\n}\n","/* models/index.js */ function _(require, module, exports, __esModule, __esExport) {\n __esModule();\n var checkpoint_tool_1 = require(\"49636d3eef\") /* ./checkpoint_tool */;\n __esExport(\"CheckpointTool\", checkpoint_tool_1.CheckpointTool);\n var clear_tool_1 = require(\"356402dee7\") /* ./clear_tool */;\n __esExport(\"ClearTool\", clear_tool_1.ClearTool);\n var poly_draw_1 = require(\"c03d81e6d5\") /* ./poly_draw */;\n __esExport(\"PolyVertexDrawTool\", poly_draw_1.PolyVertexDrawTool);\n var poly_edit_1 = require(\"238deef1f5\") /* ./poly_edit */;\n __esExport(\"PolyVertexEditTool\", poly_edit_1.PolyVertexEditTool);\n var restore_tool_1 = require(\"1a96add9eb\") /* ./restore_tool */;\n __esExport(\"RestoreTool\", restore_tool_1.RestoreTool);\n var wind_barb_1 = require(\"028985dc77\") /* ./wind_barb */;\n __esExport(\"WindBarb\", wind_barb_1.WindBarb);\n}\n","/* models/checkpoint_tool.js */ function _(require, module, exports, __esModule, __esExport) {\n var _a;\n __esModule();\n const object_1 = require(\"@bokehjs/core/util/object\");\n const array_1 = require(\"@bokehjs/core/util/array\");\n const action_tool_1 = require(\"@bokehjs/models/tools/actions/action_tool\");\n const column_data_source_1 = require(\"@bokehjs/models/sources/column_data_source\");\n const icons_css_1 = require(\"@bokehjs/styles/icons.css\");\n class CheckpointToolView extends action_tool_1.ActionToolView {\n doit() {\n const sources = this.model.sources;\n for (const source of sources) {\n if (source.buffer == null) {\n source.buffer = [];\n }\n const data_copy = {};\n for (const [key, column] of (0, object_1.entries)(source.data)) {\n const new_column = [];\n for (const arr of column) {\n if (Array.isArray(arr) || ArrayBuffer.isView(arr)) {\n new_column.push((0, array_1.copy)(arr));\n }\n else {\n new_column.push(arr);\n }\n }\n data_copy[key] = new_column;\n }\n source.buffer.push(data_copy);\n }\n }\n }\n exports.CheckpointToolView = CheckpointToolView;\n CheckpointToolView.__name__ = \"CheckpointToolView\";\n class CheckpointTool extends action_tool_1.ActionTool {\n constructor(attrs) {\n super(attrs);\n this.tool_name = \"Checkpoint\";\n this.tool_icon = icons_css_1.tool_icon_save;\n }\n }\n exports.CheckpointTool = CheckpointTool;\n _a = CheckpointTool;\n CheckpointTool.__name__ = \"CheckpointTool\";\n CheckpointTool.__module__ = \"geoviews.models.custom_tools\";\n (() => {\n _a.prototype.default_view = CheckpointToolView;\n _a.define(({ List, Ref }) => ({\n sources: [List(Ref(column_data_source_1.ColumnDataSource)), []],\n }));\n })();\n}\n","/* models/clear_tool.js */ function _(require, module, exports, __esModule, __esExport) {\n var _a;\n __esModule();\n const action_tool_1 = require(\"@bokehjs/models/tools/actions/action_tool\");\n const column_data_source_1 = require(\"@bokehjs/models/sources/column_data_source\");\n const icons_css_1 = require(\"@bokehjs/styles/icons.css\");\n class ClearToolView extends action_tool_1.ActionToolView {\n doit() {\n for (const source of this.model.sources) {\n source.clear();\n }\n }\n }\n exports.ClearToolView = ClearToolView;\n ClearToolView.__name__ = \"ClearToolView\";\n class ClearTool extends action_tool_1.ActionTool {\n constructor(attrs) {\n super(attrs);\n this.tool_name = \"Clear data\";\n this.tool_icon = icons_css_1.tool_icon_reset;\n }\n }\n exports.ClearTool = ClearTool;\n _a = ClearTool;\n ClearTool.__name__ = \"ClearTool\";\n ClearTool.__module__ = \"geoviews.models.custom_tools\";\n (() => {\n _a.prototype.default_view = ClearToolView;\n _a.define(({ List, Ref }) => ({\n sources: [List(Ref(column_data_source_1.ColumnDataSource)), []],\n }));\n })();\n}\n","/* models/poly_draw.js */ function _(require, module, exports, __esModule, __esExport) {\n var _a;\n __esModule();\n const vectorization_1 = require(\"@bokehjs/core/vectorization\");\n const object_1 = require(\"@bokehjs/core/util/object\");\n const types_1 = require(\"@bokehjs/core/util/types\");\n const assert_1 = require(\"@bokehjs/core/util/assert\");\n const poly_draw_tool_1 = require(\"@bokehjs/models/tools/edit/poly_draw_tool\");\n class PolyVertexDrawToolView extends poly_draw_tool_1.PolyDrawToolView {\n _split_path(x, y) {\n for (const renderer of this.model.renderers) {\n const glyph = renderer.glyph;\n const cds = renderer.data_source;\n const [xkey, ykey] = [glyph.xs.field, glyph.ys.field];\n const xpaths = cds.data[xkey];\n const ypaths = cds.data[ykey];\n for (let index = 0; index < xpaths.length; index++) {\n let xs = xpaths[index];\n if (!(0, types_1.isArray)(xs)) {\n xs = Array.from(xs);\n cds.data[xkey][index] = xs;\n }\n let ys = ypaths[index];\n if (!(0, types_1.isArray)(ys)) {\n ys = Array.from(ys);\n cds.data[ykey][index] = ys;\n }\n for (let i = 0; i < xs.length; i++) {\n if ((xs[i] == x) && (ys[i] == y) && (i != 0) && (i != (xs.length - 1))) {\n xpaths.splice(index + 1, 0, xs.slice(i));\n ypaths.splice(index + 1, 0, ys.slice(i));\n xs.splice(i + 1);\n ys.splice(i + 1);\n for (const column of cds.columns()) {\n if ((column !== xkey) && (column != ykey)) {\n cds.data[column].splice(index + 1, 0, cds.data[column][index]);\n }\n }\n return;\n }\n }\n }\n }\n }\n _snap_to_vertex(ev, x, y) {\n const { vertex_renderer } = this.model;\n if (vertex_renderer != null) {\n // If an existing vertex is hit snap to it\n const vertex_selected = this._select_event(ev, \"replace\", [vertex_renderer]);\n const point_ds = vertex_renderer.data_source;\n // Type once dataspecs are typed\n const point_glyph = vertex_renderer.glyph;\n const [pxkey, pykey] = [point_glyph.x.field, point_glyph.y.field];\n if (vertex_selected.length > 0) {\n // If existing vertex is hit split path at that location\n // converting to feature vertex\n const index = point_ds.selected.indices[0];\n if (pxkey) {\n x = point_ds.get(pxkey)[index];\n }\n if (pykey) {\n y = point_ds.get(pykey)[index];\n }\n if (ev.type != \"move\") {\n this._split_path(x, y);\n }\n point_ds.selection_manager.clear();\n }\n }\n return [x, y];\n }\n _set_vertices(xs, ys, styles) {\n const { vertex_renderer } = this.model;\n if (vertex_renderer == null) {\n return;\n }\n const point_glyph = vertex_renderer.glyph;\n const point_cds = vertex_renderer.data_source;\n const [pxkey, pykey] = [point_glyph.x.field, point_glyph.y.field];\n if (pxkey) {\n if ((0, types_1.isArray)(xs)) {\n point_cds.set(pxkey, xs);\n }\n else {\n point_glyph.x = { value: xs };\n }\n }\n if (pykey) {\n if ((0, types_1.isArray)(ys)) {\n point_cds.set(pykey, ys);\n }\n else {\n point_glyph.y = { value: ys };\n }\n }\n if (styles != null) {\n for (const key of (0, object_1.keys)(styles)) {\n point_cds.set(key, styles[key]);\n point_glyph[key] = { field: key };\n }\n }\n else {\n for (const col of point_cds.columns()) {\n point_cds.set(col, []);\n }\n }\n this._emit_cds_changes(point_cds, true, true, false);\n }\n _show_vertices() {\n if (!this.model.active) {\n return;\n }\n const { renderers, node_style, end_style } = this.model;\n const xs = [];\n const ys = [];\n const styles = {};\n for (const key of (0, object_1.keys)(end_style)) {\n styles[key] = [];\n }\n for (let i = 0; i < renderers.length; i++) {\n const renderer = renderers[i];\n const cds = renderer.data_source;\n const glyph = renderer.glyph;\n const [xkey, ykey] = [glyph.xs.field, glyph.ys.field];\n for (const array of cds.get_array(xkey)) {\n (0, assert_1.assert)((0, types_1.isArray)(array));\n xs.push(...array);\n for (const [key, val] of (0, object_1.entries)(end_style)) {\n styles[key].push(val);\n }\n for (const [key, val] of (0, object_1.entries)(node_style)) {\n for (let index = 0; index < array.length - 2; index++) {\n styles[key].push(val);\n }\n }\n for (const [key, val] of (0, object_1.entries)(end_style)) {\n styles[key].push(val);\n }\n }\n for (const array of cds.get_array(ykey)) {\n (0, assert_1.assert)((0, types_1.isArray)(array));\n ys.push(...array);\n }\n if (this._drawing && i == renderers.length - 1) {\n // Skip currently drawn vertex\n xs.splice(xs.length - 1, 1);\n ys.splice(ys.length - 1, 1);\n for (const [_, array] of (0, object_1.entries)(styles)) {\n array.splice(array.length - 1, 1);\n }\n }\n }\n this._set_vertices(xs, ys, styles);\n }\n _remove() {\n const renderer = this.model.renderers[0];\n const cds = renderer.data_source;\n const glyph = renderer.glyph;\n if ((0, vectorization_1.isField)(glyph.xs)) {\n const xkey = glyph.xs.field;\n const array = cds.get_array(xkey);\n const xidx = array.length - 1;\n const xs = array[xidx];\n xs.splice(xs.length - 1, 1);\n if (xs.length == 1) {\n array.splice(xidx, 1);\n }\n }\n if ((0, vectorization_1.isField)(glyph.ys)) {\n const ykey = glyph.ys.field;\n const array = cds.get_array(ykey);\n const yidx = array.length - 1;\n const ys = array[yidx];\n ys.splice(ys.length - 1, 1);\n if (ys.length == 1) {\n array.splice(yidx, 1);\n }\n }\n this._emit_cds_changes(cds);\n this._drawing = false;\n this._show_vertices();\n }\n }\n exports.PolyVertexDrawToolView = PolyVertexDrawToolView;\n PolyVertexDrawToolView.__name__ = \"PolyVertexDrawToolView\";\n class PolyVertexDrawTool extends poly_draw_tool_1.PolyDrawTool {\n constructor(attrs) {\n super(attrs);\n }\n }\n exports.PolyVertexDrawTool = PolyVertexDrawTool;\n _a = PolyVertexDrawTool;\n PolyVertexDrawTool.__name__ = \"PolyVertexDrawTool\";\n PolyVertexDrawTool.__module__ = \"geoviews.models.custom_tools\";\n (() => {\n _a.prototype.default_view = PolyVertexDrawToolView;\n _a.define(({ Dict, Unknown }) => ({\n end_style: [Dict(Unknown), {}],\n node_style: [Dict(Unknown), {}],\n }));\n })();\n}\n","/* models/poly_edit.js */ function _(require, module, exports, __esModule, __esExport) {\n var _a;\n __esModule();\n const object_1 = require(\"@bokehjs/core/util/object\");\n const types_1 = require(\"@bokehjs/core/util/types\");\n const poly_edit_tool_1 = require(\"@bokehjs/models/tools/edit/poly_edit_tool\");\n class PolyVertexEditToolView extends poly_edit_tool_1.PolyEditToolView {\n deactivate() {\n this._hide_vertices();\n if (this._selected_renderer == null) {\n return;\n }\n else if (this._drawing) {\n this._remove_vertex();\n this._drawing = false;\n }\n this._emit_cds_changes(this._selected_renderer.data_source, false, true, false);\n }\n _pan(ev) {\n if (this._basepoint == null || this.model.vertex_renderer == null) {\n return;\n }\n const points = this._drag_points(ev, [this.model.vertex_renderer]);\n if (!ev.modifiers.shift) {\n this._move_linked(points);\n }\n if (this._selected_renderer != null) {\n this._selected_renderer.data_source.change.emit();\n }\n }\n _pan_end(ev) {\n if (this._basepoint == null || this.model.vertex_renderer == null) {\n return;\n }\n const points = this._drag_points(ev, [this.model.vertex_renderer]);\n if (!ev.modifiers.shift) {\n this._move_linked(points);\n }\n this._emit_cds_changes(this.model.vertex_renderer.data_source, false, true, true);\n if (this._selected_renderer != null) {\n this._emit_cds_changes(this._selected_renderer.data_source);\n }\n this._basepoint = null;\n }\n _drag_points(ev, renderers) {\n if (this._basepoint == null) {\n return [];\n }\n const [bx, by] = this._basepoint;\n const points = [];\n for (const renderer of renderers) {\n const basepoint = this._map_drag(bx, by, renderer);\n const point = this._map_drag(ev.sx, ev.sy, renderer);\n if (point == null || basepoint == null) {\n continue;\n }\n const [x, y] = point;\n const [px, py] = basepoint;\n const [dx, dy] = [x - px, y - py];\n // Type once dataspecs are typed\n const glyph = renderer.glyph;\n const cds = renderer.data_source;\n const [xkey, ykey] = [glyph.x.field, glyph.y.field];\n for (const index of cds.selected.indices) {\n const point = [];\n if (xkey) {\n const xs = cds.get(xkey);\n point.push(xs[index]);\n xs[index] += dx;\n }\n if (ykey) {\n const ys = cds.get(ykey);\n point.push(ys[index]);\n ys[index] += dy;\n }\n point.push(dx);\n point.push(dy);\n points.push(point);\n }\n cds.change.emit();\n }\n this._basepoint = [ev.sx, ev.sy];\n return points;\n }\n _set_vertices(xs, ys, styles) {\n if (this.model.vertex_renderer == null) {\n return;\n }\n const point_glyph = this.model.vertex_renderer.glyph;\n const point_cds = this.model.vertex_renderer.data_source;\n const [pxkey, pykey] = [point_glyph.x.field, point_glyph.y.field];\n if (pxkey) {\n if ((0, types_1.isArray)(xs)) {\n point_cds.set(pxkey, xs);\n }\n else {\n point_glyph.x = { value: xs };\n }\n }\n if (pykey) {\n if ((0, types_1.isArray)(ys)) {\n point_cds.set(pykey, ys);\n }\n else {\n point_glyph.y = { value: ys };\n }\n }\n if (styles != null) {\n for (const [key, array] of (0, object_1.entries)(styles)) {\n point_cds.set(key, array);\n point_glyph[key] = { field: key };\n }\n }\n else {\n for (const col of point_cds.columns()) {\n point_cds.set(col, []);\n }\n }\n this._emit_cds_changes(point_cds, true, true, false);\n }\n _move_linked(points) {\n if (this._selected_renderer == null) {\n return;\n }\n const renderer = this._selected_renderer;\n const glyph = renderer.glyph;\n const cds = renderer.data_source;\n const [xkey, ykey] = [glyph.xs.field, glyph.ys.field];\n const xpaths = cds.data[xkey];\n const ypaths = cds.data[ykey];\n for (const point of points) {\n const [x, y, dx, dy] = point;\n for (let index = 0; index < xpaths.length; index++) {\n const xs = xpaths[index];\n const ys = ypaths[index];\n for (let i = 0; i < xs.length; i++) {\n if ((xs[i] == x) && (ys[i] == y)) {\n xs[i] += dx;\n ys[i] += dy;\n }\n }\n }\n }\n }\n _tap(ev) {\n if (this.model.vertex_renderer == null) {\n return;\n }\n const renderer = this.model.vertex_renderer;\n const point = this._map_drag(ev.sx, ev.sy, renderer);\n if (point == null) {\n return;\n }\n else if (this._drawing && this._selected_renderer != null) {\n let [x, y] = point;\n const cds = renderer.data_source;\n // Type once dataspecs are typed\n const glyph = renderer.glyph;\n const [xkey, ykey] = [glyph.x.field, glyph.y.field];\n const indices = cds.selected.indices;\n [x, y] = this._snap_to_vertex(ev, x, y);\n const index = indices[0];\n cds.selected.indices = [index + 1];\n if (xkey) {\n const xs = cds.get_array(xkey);\n const nx = xs[index];\n xs[index] = x;\n xs.splice(index + 1, 0, nx);\n }\n if (ykey) {\n const ys = cds.get_array(ykey);\n const ny = ys[index];\n ys[index] = y;\n ys.splice(index + 1, 0, ny);\n }\n cds.change.emit();\n this._emit_cds_changes(this._selected_renderer.data_source, true, false, true);\n return;\n }\n this._select_event(ev, this._select_mode(ev), [renderer]);\n }\n _show_vertices(ev) {\n if (!this.model.active) {\n return;\n }\n const renderers = this._select_event(ev, \"replace\", this.model.renderers);\n if (renderers.length === 0) {\n this._hide_vertices();\n this._selected_renderer = null;\n this._drawing = false;\n return;\n }\n const renderer = renderers[0];\n const glyph = renderer.glyph;\n const cds = renderer.data_source;\n const index = cds.selected.indices[0];\n const [xkey, ykey] = [glyph.xs.field, glyph.ys.field];\n let xs;\n let ys;\n if (xkey) {\n xs = cds.get(xkey)[index];\n if (!(0, types_1.isArray)(xs)) {\n cds.get(xkey)[index] = xs = Array.from(xs);\n }\n }\n else {\n xs = glyph.xs.value;\n }\n if (ykey) {\n ys = cds.get(ykey)[index];\n if (!(0, types_1.isArray)(ys)) {\n cds.get(ykey)[index] = ys = Array.from(ys);\n }\n }\n else {\n ys = glyph.ys.value;\n }\n const { end_style, node_style } = this.model;\n const styles = {};\n for (const [key, val] of (0, object_1.entries)(end_style)) {\n styles[key] = [val];\n }\n for (const [key, val] of (0, object_1.entries)(node_style)) {\n for (let index = 0; index < xs.length - 2; index++) {\n styles[key].push(val);\n }\n }\n for (const [key, val] of (0, object_1.entries)(end_style)) {\n styles[key].push(val);\n }\n this._selected_renderer = renderer;\n this._set_vertices(xs, ys, styles);\n }\n }\n exports.PolyVertexEditToolView = PolyVertexEditToolView;\n PolyVertexEditToolView.__name__ = \"PolyVertexEditToolView\";\n class PolyVertexEditTool extends poly_edit_tool_1.PolyEditTool {\n constructor(attrs) {\n super(attrs);\n }\n }\n exports.PolyVertexEditTool = PolyVertexEditTool;\n _a = PolyVertexEditTool;\n PolyVertexEditTool.__name__ = \"PolyVertexEditTool\";\n PolyVertexEditTool.__module__ = \"geoviews.models.custom_tools\";\n (() => {\n _a.prototype.default_view = PolyVertexEditToolView;\n _a.define(({ Dict, Unknown }) => ({\n end_style: [Dict(Unknown), {}],\n node_style: [Dict(Unknown), {}],\n }));\n })();\n}\n","/* models/restore_tool.js */ function _(require, module, exports, __esModule, __esExport) {\n var _a;\n __esModule();\n const action_tool_1 = require(\"@bokehjs/models/tools/actions/action_tool\");\n const column_data_source_1 = require(\"@bokehjs/models/sources/column_data_source\");\n const icons_css_1 = require(\"@bokehjs/styles/icons.css\");\n class RestoreToolView extends action_tool_1.ActionToolView {\n doit() {\n const sources = this.model.sources;\n for (const source of sources) {\n const new_data = source.buffer?.pop();\n if (new_data == null) {\n continue;\n }\n source.data = new_data;\n source.change.emit();\n source.properties.data.change.emit();\n }\n }\n }\n exports.RestoreToolView = RestoreToolView;\n RestoreToolView.__name__ = \"RestoreToolView\";\n class RestoreTool extends action_tool_1.ActionTool {\n constructor(attrs) {\n super(attrs);\n this.tool_name = \"Restore\";\n this.tool_icon = icons_css_1.tool_icon_undo;\n }\n }\n exports.RestoreTool = RestoreTool;\n _a = RestoreTool;\n RestoreTool.__name__ = \"RestoreTool\";\n RestoreTool.__module__ = \"geoviews.models.custom_tools\";\n (() => {\n _a.prototype.default_view = RestoreToolView;\n _a.define(({ List, Ref }) => ({\n sources: [List(Ref(column_data_source_1.ColumnDataSource)), []],\n }));\n })();\n}\n","/* models/wind_barb.js */ function _(require, module, exports, __esModule, __esExport) {\n var _a;\n __esModule();\n const tslib_1 = require(\"tslib\");\n const xy_glyph_1 = require(\"@bokehjs/models/glyphs/xy_glyph\");\n const property_mixins_1 = require(\"@bokehjs/core/property_mixins\");\n const p = tslib_1.__importStar(require(\"@bokehjs/core/properties\"));\n const selection_1 = require(\"@bokehjs/models/selections/selection\");\n class WindBarbView extends xy_glyph_1.XYGlyphView {\n _paint(ctx, indices, data) {\n const { sx, sy, angle, magnitude } = data ?? this;\n const y = this.y;\n const scale = this.model.scale;\n for (const i of indices) {\n const screen_x = sx[i];\n const screen_y = sy[i];\n const a = angle.get(i);\n const mag = magnitude.get(i);\n const lat = y[i];\n if (!isFinite(screen_x + screen_y + a + mag + lat))\n continue;\n this._draw_wind_barb(ctx, screen_x, screen_y, a, mag, scale, i);\n }\n }\n _draw_wind_barb(ctx, cx, cy, angle, magnitude, scale, idx = 0) {\n // Wind barb drawing using meteorological convention\n // magnitude is in knots (or appropriate units)\n // angle is in meteorological convention (direction wind comes FROM)\n // barbs point in the direction the wind is coming FROM\n const barb_length = this.model.barb_length * scale;\n const barb_width = this.model.barb_width * scale;\n const flag_width = this.model.flag_width * scale;\n ctx.save();\n ctx.translate(cx, cy);\n ctx.rotate(-angle);\n ctx.beginPath();\n this.visuals.line.apply(ctx, idx);\n ctx.strokeStyle = ctx.strokeStyle || \"black\";\n ctx.lineCap = \"round\";\n ctx.lineJoin = \"round\";\n // Determine barbs/flags based on magnitude\n // Standard increments: 50 knots = flag (triangle), 10 knots = full barb, 5 knots = half barb\n const mag_rounded = Math.round(magnitude / 5) * 5;\n if (mag_rounded >= 5) {\n // Draw the main staff (pointing in direction wind is coming from)\n ctx.moveTo(0, 0);\n ctx.lineTo(0, -barb_length);\n ctx.stroke();\n let remaining = mag_rounded;\n let y_offset = -barb_length;\n const spacing = this.model.spacing * scale;\n // Draw 50-knot flags (filled triangles)\n while (remaining >= 50) {\n ctx.fillStyle = ctx.strokeStyle || \"black\";\n ctx.beginPath();\n ctx.moveTo(0, y_offset);\n ctx.lineTo(flag_width, y_offset + spacing);\n ctx.lineTo(0, y_offset + spacing * 2);\n ctx.closePath();\n ctx.fill();\n y_offset += spacing * 2.5;\n remaining -= 50;\n }\n // Draw 10-knot barbs (full lines)\n while (remaining >= 10) {\n ctx.beginPath();\n ctx.moveTo(0, y_offset);\n ctx.lineTo(barb_width, y_offset + barb_width * 0.2);\n ctx.stroke();\n y_offset += spacing;\n remaining -= 10;\n }\n // Draw 5-knot half-barb\n if (remaining >= 5) {\n ctx.beginPath();\n ctx.moveTo(0, y_offset);\n ctx.lineTo(barb_width / 2, y_offset + barb_width * 0.1);\n ctx.stroke();\n }\n }\n else {\n // For calm winds (< 5 knots), draw only a circle (no staff line)\n ctx.beginPath();\n ctx.arc(0, 0, this.model.calm_circle_radius * scale, 0, 2 * Math.PI);\n ctx.stroke();\n }\n ctx.restore();\n }\n _hit_point(geometry) {\n const { sx, sy } = geometry;\n const candidates = [];\n for (let i = 0; i < this.data_size; i++) {\n const dx = this.sx[i] - sx;\n const dy = this.sy[i] - sy;\n const dist = Math.sqrt(dx * dx + dy * dy);\n if (dist < 10 * this.model.scale) { // Hit radius\n candidates.push(i);\n }\n }\n return new selection_1.Selection({ indices: candidates });\n }\n draw_legend_for_index(ctx, { x0, x1, y0, y1 }, _index) {\n const cx = (x0 + x1) / 2;\n const cy = (y0 + y1) / 2;\n // Draw a representative wind barb in the legend\n this._draw_wind_barb(ctx, cx, cy, Math.PI / 4, 25, 0.5);\n }\n }\n exports.WindBarbView = WindBarbView;\n WindBarbView.__name__ = \"WindBarbView\";\n class WindBarb extends xy_glyph_1.XYGlyph {\n constructor(attrs) {\n super(attrs);\n }\n }\n exports.WindBarb = WindBarb;\n _a = WindBarb;\n WindBarb.__name__ = \"WindBarb\";\n WindBarb.__module__ = \"geoviews.models.wind_barb\";\n (() => {\n _a.prototype.default_view = WindBarbView;\n _a.define(({ Float }) => ({\n angle: [p.AngleSpec, { value: 0 }],\n magnitude: [p.NumberSpec, { value: 0 }],\n scale: [Float, 1.0],\n barb_length: [Float, 30.0],\n barb_width: [Float, 15.0],\n flag_width: [Float, 15.0],\n spacing: [Float, 6.0],\n calm_circle_radius: [Float, 3.0],\n }));\n _a.mixins(property_mixins_1.LineVector);\n })();\n}\n"]}
|
package/dist/geoviews.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":4,"artifacts":[{"module":{"file":"/home/runner/work/geoviews/geoviews/geoviews/dist/lib/index.js","base":"/home/runner/work/geoviews/geoviews/geoviews/dist/lib","base_path":"index.js","canonical":"index","resolution":"ESM","id":"c764d38756","hash":"c764d387562670624c9da140449548667d1588e6dd8d12da2fe04c18f1fadf6b","source":"\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.GeoViews = void 0;\nconst tslib_1 = require(\"tslib\");\nconst GeoViews = tslib_1.__importStar(require(\"./models\"));\nexports.GeoViews = GeoViews;\nconst base_1 = require(\"@bokehjs/base\");\n(0, base_1.register_models)(GeoViews);\n//# sourceMappingURL=index.js.map\n","type":"js","dependency_paths":[["./models","/home/runner/work/geoviews/geoviews/geoviews/dist/lib/models/index.js"]],"dependency_map":[],"exported":[],"externals":[],"shims":[]},"code":{"source":"/* index.js */ function _(require, module, exports, __esModule, __esExport) {\n __esModule();\n const tslib_1 = require(\"tslib\");\n const GeoViews = tslib_1.__importStar(require(\"b4555bea44\") /* ./models */);\n exports.GeoViews = GeoViews;\n const base_1 = require(\"@bokehjs/base\");\n (0, base_1.register_models)(GeoViews);\n}\n","min_source":"function _(e,s,o,t,b){t();const i=e(\"tslib\").__importStar(e(\"b4555bea44\"));o.GeoViews=i;(0,e(\"@bokehjs/base\").register_models)(i)}\n//# sourceMappingURL=index.min.js.map","min_map":"{\"version\":3,\"file\":\"index.min.js\",\"names\":[\"_\",\"require\",\"module\",\"exports\",\"__esModule\",\"__esExport\",\"GeoViews\",\"__importStar\",\"register_models\"],\"sources\":[\"0\"],\"mappings\":\"AAAe,SAASA,EAAEC,EAASC,EAAQC,EAASC,EAAYC,GAC5DD,IACA,MACME,EADUL,EAAQ,SACCM,aAAaN,EAAQ,eAC9CE,EAAQG,SAAWA,GAEnB,EADeL,EAAQ,iBACZO,iBAAiBF,EAChC\",\"ignoreList\":[]}"}},{"module":{"file":"/home/runner/work/geoviews/geoviews/geoviews/dist/lib/models/index.js","base":"/home/runner/work/geoviews/geoviews/geoviews/dist/lib","base_path":"models/index.js","canonical":"models/index","resolution":"ESM","id":"b4555bea44","hash":"b4555bea4497cc5bbb2ea67ae1cbd42552a9de3a7d8633abf56c3a7ca693300d","source":"\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.RestoreTool = exports.PolyVertexEditTool = exports.PolyVertexDrawTool = exports.ClearTool = exports.CheckpointTool = void 0;\nvar checkpoint_tool_1 = require(\"./checkpoint_tool\");\nObject.defineProperty(exports, \"CheckpointTool\", { enumerable: true, get: function () { return checkpoint_tool_1.CheckpointTool; } });\nvar clear_tool_1 = require(\"./clear_tool\");\nObject.defineProperty(exports, \"ClearTool\", { enumerable: true, get: function () { return clear_tool_1.ClearTool; } });\nvar poly_draw_1 = require(\"./poly_draw\");\nObject.defineProperty(exports, \"PolyVertexDrawTool\", { enumerable: true, get: function () { return poly_draw_1.PolyVertexDrawTool; } });\nvar poly_edit_1 = require(\"./poly_edit\");\nObject.defineProperty(exports, \"PolyVertexEditTool\", { enumerable: true, get: function () { return poly_edit_1.PolyVertexEditTool; } });\nvar restore_tool_1 = require(\"./restore_tool\");\nObject.defineProperty(exports, \"RestoreTool\", { enumerable: true, get: function () { return restore_tool_1.RestoreTool; } });\n//# sourceMappingURL=index.js.map\n","type":"js","dependency_paths":[["./checkpoint_tool","/home/runner/work/geoviews/geoviews/geoviews/dist/lib/models/checkpoint_tool.js"],["./clear_tool","/home/runner/work/geoviews/geoviews/geoviews/dist/lib/models/clear_tool.js"],["./poly_draw","/home/runner/work/geoviews/geoviews/geoviews/dist/lib/models/poly_draw.js"],["./poly_edit","/home/runner/work/geoviews/geoviews/geoviews/dist/lib/models/poly_edit.js"],["./restore_tool","/home/runner/work/geoviews/geoviews/geoviews/dist/lib/models/restore_tool.js"]],"dependency_map":[],"exported":[{"type":"bindings","bindings":[[null,"CheckpointTool"]],"module":"./checkpoint_tool"},{"type":"bindings","bindings":[[null,"ClearTool"]],"module":"./clear_tool"},{"type":"bindings","bindings":[[null,"PolyVertexDrawTool"]],"module":"./poly_draw"},{"type":"bindings","bindings":[[null,"PolyVertexEditTool"]],"module":"./poly_edit"},{"type":"bindings","bindings":[[null,"RestoreTool"]],"module":"./restore_tool"}],"externals":[],"shims":[]},"code":{"source":"/* models/index.js */ function _(require, module, exports, __esModule, __esExport) {\n __esModule();\n var checkpoint_tool_1 = require(\"49636d3eef\") /* ./checkpoint_tool */;\n __esExport(\"CheckpointTool\", checkpoint_tool_1.CheckpointTool);\n var clear_tool_1 = require(\"356402dee7\") /* ./clear_tool */;\n __esExport(\"ClearTool\", clear_tool_1.ClearTool);\n var poly_draw_1 = require(\"c03d81e6d5\") /* ./poly_draw */;\n __esExport(\"PolyVertexDrawTool\", poly_draw_1.PolyVertexDrawTool);\n var poly_edit_1 = require(\"238deef1f5\") /* ./poly_edit */;\n __esExport(\"PolyVertexEditTool\", poly_edit_1.PolyVertexEditTool);\n var restore_tool_1 = require(\"1a96add9eb\") /* ./restore_tool */;\n __esExport(\"RestoreTool\", restore_tool_1.RestoreTool);\n}\n","min_source":"function _(o,e,l,t,r){t(),r(\"CheckpointTool\",o(\"49636d3eef\").CheckpointTool),r(\"ClearTool\",o(\"356402dee7\").ClearTool),r(\"PolyVertexDrawTool\",o(\"c03d81e6d5\").PolyVertexDrawTool),r(\"PolyVertexEditTool\",o(\"238deef1f5\").PolyVertexEditTool),r(\"RestoreTool\",o(\"1a96add9eb\").RestoreTool)}\n//# sourceMappingURL=index.min.js.map","min_map":"{\"version\":3,\"file\":\"index.min.js\",\"names\":[\"_\",\"require\",\"module\",\"exports\",\"__esModule\",\"__esExport\",\"CheckpointTool\",\"ClearTool\",\"PolyVertexDrawTool\",\"PolyVertexEditTool\",\"RestoreTool\"],\"sources\":[\"0\"],\"mappings\":\"AAAsB,SAASA,EAAEC,EAASC,EAAQC,EAASC,EAAYC,GACnED,IAEAC,EAAW,iBADaJ,EAAQ,cACeK,gBAE/CD,EAAW,YADQJ,EAAQ,cACUM,WAErCF,EAAW,qBADOJ,EAAQ,cACmBO,oBAE7CH,EAAW,qBADOJ,EAAQ,cACmBQ,oBAE7CJ,EAAW,cADUJ,EAAQ,cACYS,YAC7C\",\"ignoreList\":[]}"}},{"module":{"file":"/home/runner/work/geoviews/geoviews/geoviews/dist/lib/models/checkpoint_tool.js","base":"/home/runner/work/geoviews/geoviews/geoviews/dist/lib","base_path":"models/checkpoint_tool.js","canonical":"models/checkpoint_tool","resolution":"ESM","id":"49636d3eef","hash":"49636d3eef126a1582e9f4ddc918cc5880bce09ee9d3a8b91ca8e1e0df56ec2a","source":"\"use strict\";\nvar _a;\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.CheckpointTool = exports.CheckpointToolView = void 0;\nconst object_1 = require(\"@bokehjs/core/util/object\");\nconst array_1 = require(\"@bokehjs/core/util/array\");\nconst action_tool_1 = require(\"@bokehjs/models/tools/actions/action_tool\");\nconst column_data_source_1 = require(\"@bokehjs/models/sources/column_data_source\");\nconst icons_css_1 = require(\"@bokehjs/styles/icons.css\");\nclass CheckpointToolView extends action_tool_1.ActionToolView {\n doit() {\n const sources = this.model.sources;\n for (const source of sources) {\n if (source.buffer == null) {\n source.buffer = [];\n }\n const data_copy = {};\n for (const [key, column] of (0, object_1.entries)(source.data)) {\n const new_column = [];\n for (const arr of column) {\n if (Array.isArray(arr) || ArrayBuffer.isView(arr)) {\n new_column.push((0, array_1.copy)(arr));\n }\n else {\n new_column.push(arr);\n }\n }\n data_copy[key] = new_column;\n }\n source.buffer.push(data_copy);\n }\n }\n}\nexports.CheckpointToolView = CheckpointToolView;\nCheckpointToolView.__name__ = \"CheckpointToolView\";\nclass CheckpointTool extends action_tool_1.ActionTool {\n constructor(attrs) {\n super(attrs);\n this.tool_name = \"Checkpoint\";\n this.tool_icon = icons_css_1.tool_icon_save;\n }\n}\nexports.CheckpointTool = CheckpointTool;\n_a = CheckpointTool;\nCheckpointTool.__name__ = \"CheckpointTool\";\nCheckpointTool.__module__ = \"geoviews.models.custom_tools\";\n(() => {\n _a.prototype.default_view = CheckpointToolView;\n _a.define(({ List, Ref }) => ({\n sources: [List(Ref(column_data_source_1.ColumnDataSource)), []],\n }));\n})();\n//# sourceMappingURL=checkpoint_tool.js.map\n","type":"js","dependency_paths":[],"dependency_map":[],"exported":[{"type":"named","name":"CheckpointToolView"},{"type":"named","name":"CheckpointTool"}],"externals":[],"shims":[]},"code":{"source":"/* models/checkpoint_tool.js */ function _(require, module, exports, __esModule, __esExport) {\n var _a;\n __esModule();\n const object_1 = require(\"@bokehjs/core/util/object\");\n const array_1 = require(\"@bokehjs/core/util/array\");\n const action_tool_1 = require(\"@bokehjs/models/tools/actions/action_tool\");\n const column_data_source_1 = require(\"@bokehjs/models/sources/column_data_source\");\n const icons_css_1 = require(\"@bokehjs/styles/icons.css\");\n class CheckpointToolView extends action_tool_1.ActionToolView {\n doit() {\n const sources = this.model.sources;\n for (const source of sources) {\n if (source.buffer == null) {\n source.buffer = [];\n }\n const data_copy = {};\n for (const [key, column] of (0, object_1.entries)(source.data)) {\n const new_column = [];\n for (const arr of column) {\n if (Array.isArray(arr) || ArrayBuffer.isView(arr)) {\n new_column.push((0, array_1.copy)(arr));\n }\n else {\n new_column.push(arr);\n }\n }\n data_copy[key] = new_column;\n }\n source.buffer.push(data_copy);\n }\n }\n }\n exports.CheckpointToolView = CheckpointToolView;\n CheckpointToolView.__name__ = \"CheckpointToolView\";\n class CheckpointTool extends action_tool_1.ActionTool {\n constructor(attrs) {\n super(attrs);\n this.tool_name = \"Checkpoint\";\n this.tool_icon = icons_css_1.tool_icon_save;\n }\n }\n exports.CheckpointTool = CheckpointTool;\n _a = CheckpointTool;\n CheckpointTool.__name__ = \"CheckpointTool\";\n CheckpointTool.__module__ = \"geoviews.models.custom_tools\";\n (() => {\n _a.prototype.default_view = CheckpointToolView;\n _a.define(({ List, Ref }) => ({\n sources: [List(Ref(column_data_source_1.ColumnDataSource)), []],\n }));\n })();\n}\n","min_source":"function _(o,e,s,t,c){var n;t();const i=o(\"@bokehjs/core/util/object\"),r=o(\"@bokehjs/core/util/array\"),l=o(\"@bokehjs/models/tools/actions/action_tool\"),u=o(\"@bokehjs/models/sources/column_data_source\"),_=o(\"@bokehjs/styles/icons.css\");class a extends l.ActionToolView{doit(){const o=this.model.sources;for(const e of o){null==e.buffer&&(e.buffer=[]);const o={};for(const[s,t]of(0,i.entries)(e.data)){const e=[];for(const o of t)Array.isArray(o)||ArrayBuffer.isView(o)?e.push((0,r.copy)(o)):e.push(o);o[s]=e}e.buffer.push(o)}}}s.CheckpointToolView=a,a.__name__=\"CheckpointToolView\";class f extends l.ActionTool{constructor(o){super(o),this.tool_name=\"Checkpoint\",this.tool_icon=_.tool_icon_save}}s.CheckpointTool=f,n=f,f.__name__=\"CheckpointTool\",f.__module__=\"geoviews.models.custom_tools\",n.prototype.default_view=a,n.define((({List:o,Ref:e})=>({sources:[o(e(u.ColumnDataSource)),[]]})))}\n//# sourceMappingURL=checkpoint_tool.min.js.map","min_map":"{\"version\":3,\"file\":\"checkpoint_tool.min.js\",\"names\":[\"_\",\"require\",\"module\",\"exports\",\"__esModule\",\"__esExport\",\"_a\",\"object_1\",\"array_1\",\"action_tool_1\",\"column_data_source_1\",\"icons_css_1\",\"CheckpointToolView\",\"ActionToolView\",\"doit\",\"sources\",\"this\",\"model\",\"source\",\"buffer\",\"data_copy\",\"key\",\"column\",\"entries\",\"data\",\"new_column\",\"arr\",\"Array\",\"isArray\",\"ArrayBuffer\",\"isView\",\"push\",\"copy\",\"__name__\",\"CheckpointTool\",\"ActionTool\",\"constructor\",\"attrs\",\"super\",\"tool_name\",\"tool_icon\",\"tool_icon_save\",\"__module__\",\"prototype\",\"default_view\",\"define\",\"List\",\"Ref\",\"ColumnDataSource\"],\"sources\":[\"0\"],\"mappings\":\"AAAgC,SAASA,EAAEC,EAASC,EAAQC,EAASC,EAAYC,GAC7E,IAAIC,EACJF,IACA,MAAMG,EAAWN,EAAQ,6BACnBO,EAAUP,EAAQ,4BAClBQ,EAAgBR,EAAQ,6CACxBS,EAAuBT,EAAQ,8CAC/BU,EAAcV,EAAQ,6BAC5B,MAAMW,UAA2BH,EAAcI,eAC3C,IAAAC,GACI,MAAMC,EAAUC,KAAKC,MAAMF,QAC3B,IAAK,MAAMG,KAAUH,EAAS,CACL,MAAjBG,EAAOC,SACPD,EAAOC,OAAS,IAEpB,MAAMC,EAAY,CAAC,EACnB,IAAK,MAAOC,EAAKC,KAAW,EAAIf,EAASgB,SAASL,EAAOM,MAAO,CAC5D,MAAMC,EAAa,GACnB,IAAK,MAAMC,KAAOJ,EACVK,MAAMC,QAAQF,IAAQG,YAAYC,OAAOJ,GACzCD,EAAWM,MAAK,EAAIvB,EAAQwB,MAAMN,IAGlCD,EAAWM,KAAKL,GAGxBN,EAAUC,GAAOI,CACrB,CACAP,EAAOC,OAAOY,KAAKX,EACvB,CACJ,EAEJjB,EAAQS,mBAAqBA,EAC7BA,EAAmBqB,SAAW,qBAC9B,MAAMC,UAAuBzB,EAAc0B,WACvC,WAAAC,CAAYC,GACRC,MAAMD,GACNrB,KAAKuB,UAAY,aACjBvB,KAAKwB,UAAY7B,EAAY8B,cACjC,EAEJtC,EAAQ+B,eAAiBA,EACzB5B,EAAK4B,EACLA,EAAeD,SAAW,iBAC1BC,EAAeQ,WAAa,+BAExBpC,EAAGqC,UAAUC,aAAehC,EAC5BN,EAAGuC,QAAO,EAAGC,OAAMC,UAAU,CACzBhC,QAAS,CAAC+B,EAAKC,EAAIrC,EAAqBsC,mBAAoB,OAGxE\",\"ignoreList\":[]}"}},{"module":{"file":"/home/runner/work/geoviews/geoviews/geoviews/dist/lib/models/clear_tool.js","base":"/home/runner/work/geoviews/geoviews/geoviews/dist/lib","base_path":"models/clear_tool.js","canonical":"models/clear_tool","resolution":"ESM","id":"356402dee7","hash":"356402dee73a0a3cae7eee79cb5a74a74906a381397ff772675a6a6bf7f27412","source":"\"use strict\";\nvar _a;\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ClearTool = exports.ClearToolView = void 0;\nconst action_tool_1 = require(\"@bokehjs/models/tools/actions/action_tool\");\nconst column_data_source_1 = require(\"@bokehjs/models/sources/column_data_source\");\nconst icons_css_1 = require(\"@bokehjs/styles/icons.css\");\nclass ClearToolView extends action_tool_1.ActionToolView {\n doit() {\n for (const source of this.model.sources) {\n source.clear();\n }\n }\n}\nexports.ClearToolView = ClearToolView;\nClearToolView.__name__ = \"ClearToolView\";\nclass ClearTool extends action_tool_1.ActionTool {\n constructor(attrs) {\n super(attrs);\n this.tool_name = \"Clear data\";\n this.tool_icon = icons_css_1.tool_icon_reset;\n }\n}\nexports.ClearTool = ClearTool;\n_a = ClearTool;\nClearTool.__name__ = \"ClearTool\";\nClearTool.__module__ = \"geoviews.models.custom_tools\";\n(() => {\n _a.prototype.default_view = ClearToolView;\n _a.define(({ List, Ref }) => ({\n sources: [List(Ref(column_data_source_1.ColumnDataSource)), []],\n }));\n})();\n//# sourceMappingURL=clear_tool.js.map\n","type":"js","dependency_paths":[],"dependency_map":[],"exported":[{"type":"named","name":"ClearToolView"},{"type":"named","name":"ClearTool"}],"externals":[],"shims":[]},"code":{"source":"/* models/clear_tool.js */ function _(require, module, exports, __esModule, __esExport) {\n var _a;\n __esModule();\n const action_tool_1 = require(\"@bokehjs/models/tools/actions/action_tool\");\n const column_data_source_1 = require(\"@bokehjs/models/sources/column_data_source\");\n const icons_css_1 = require(\"@bokehjs/styles/icons.css\");\n class ClearToolView extends action_tool_1.ActionToolView {\n doit() {\n for (const source of this.model.sources) {\n source.clear();\n }\n }\n }\n exports.ClearToolView = ClearToolView;\n ClearToolView.__name__ = \"ClearToolView\";\n class ClearTool extends action_tool_1.ActionTool {\n constructor(attrs) {\n super(attrs);\n this.tool_name = \"Clear data\";\n this.tool_icon = icons_css_1.tool_icon_reset;\n }\n }\n exports.ClearTool = ClearTool;\n _a = ClearTool;\n ClearTool.__name__ = \"ClearTool\";\n ClearTool.__module__ = \"geoviews.models.custom_tools\";\n (() => {\n _a.prototype.default_view = ClearToolView;\n _a.define(({ List, Ref }) => ({\n sources: [List(Ref(column_data_source_1.ColumnDataSource)), []],\n }));\n })();\n}\n","min_source":"function _(o,e,s,t,l){var c;t();const _=o(\"@bokehjs/models/tools/actions/action_tool\"),a=o(\"@bokehjs/models/sources/column_data_source\"),n=o(\"@bokehjs/styles/icons.css\");class i extends _.ActionToolView{doit(){for(const o of this.model.sources)o.clear()}}s.ClearToolView=i,i.__name__=\"ClearToolView\";class r extends _.ActionTool{constructor(o){super(o),this.tool_name=\"Clear data\",this.tool_icon=n.tool_icon_reset}}s.ClearTool=r,c=r,r.__name__=\"ClearTool\",r.__module__=\"geoviews.models.custom_tools\",c.prototype.default_view=i,c.define((({List:o,Ref:e})=>({sources:[o(e(a.ColumnDataSource)),[]]})))}\n//# sourceMappingURL=clear_tool.min.js.map","min_map":"{\"version\":3,\"file\":\"clear_tool.min.js\",\"names\":[\"_\",\"require\",\"module\",\"exports\",\"__esModule\",\"__esExport\",\"_a\",\"action_tool_1\",\"column_data_source_1\",\"icons_css_1\",\"ClearToolView\",\"ActionToolView\",\"doit\",\"source\",\"this\",\"model\",\"sources\",\"clear\",\"__name__\",\"ClearTool\",\"ActionTool\",\"constructor\",\"attrs\",\"super\",\"tool_name\",\"tool_icon\",\"tool_icon_reset\",\"__module__\",\"prototype\",\"default_view\",\"define\",\"List\",\"Ref\",\"ColumnDataSource\"],\"sources\":[\"0\"],\"mappings\":\"AAA2B,SAASA,EAAEC,EAASC,EAAQC,EAASC,EAAYC,GACxE,IAAIC,EACJF,IACA,MAAMG,EAAgBN,EAAQ,6CACxBO,EAAuBP,EAAQ,8CAC/BQ,EAAcR,EAAQ,6BAC5B,MAAMS,UAAsBH,EAAcI,eACtC,IAAAC,GACI,IAAK,MAAMC,KAAUC,KAAKC,MAAMC,QAC5BH,EAAOI,OAEf,EAEJd,EAAQO,cAAgBA,EACxBA,EAAcQ,SAAW,gBACzB,MAAMC,UAAkBZ,EAAca,WAClC,WAAAC,CAAYC,GACRC,MAAMD,GACNR,KAAKU,UAAY,aACjBV,KAAKW,UAAYhB,EAAYiB,eACjC,EAEJvB,EAAQgB,UAAYA,EACpBb,EAAKa,EACLA,EAAUD,SAAW,YACrBC,EAAUQ,WAAa,+BAEnBrB,EAAGsB,UAAUC,aAAenB,EAC5BJ,EAAGwB,QAAO,EAAGC,OAAMC,UAAU,CACzBhB,QAAS,CAACe,EAAKC,EAAIxB,EAAqByB,mBAAoB,OAGxE\",\"ignoreList\":[]}"}},{"module":{"file":"/home/runner/work/geoviews/geoviews/geoviews/dist/lib/models/poly_draw.js","base":"/home/runner/work/geoviews/geoviews/geoviews/dist/lib","base_path":"models/poly_draw.js","canonical":"models/poly_draw","resolution":"ESM","id":"c03d81e6d5","hash":"c03d81e6d5ff9c73a8c71b5ba3f2a86bfaf7ff4d529fcd797cc70e1d5dc10a7c","source":"\"use strict\";\nvar _a;\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.PolyVertexDrawTool = exports.PolyVertexDrawToolView = void 0;\nconst vectorization_1 = require(\"@bokehjs/core/vectorization\");\nconst object_1 = require(\"@bokehjs/core/util/object\");\nconst types_1 = require(\"@bokehjs/core/util/types\");\nconst assert_1 = require(\"@bokehjs/core/util/assert\");\nconst poly_draw_tool_1 = require(\"@bokehjs/models/tools/edit/poly_draw_tool\");\nclass PolyVertexDrawToolView extends poly_draw_tool_1.PolyDrawToolView {\n _split_path(x, y) {\n for (const renderer of this.model.renderers) {\n const glyph = renderer.glyph;\n const cds = renderer.data_source;\n const [xkey, ykey] = [glyph.xs.field, glyph.ys.field];\n const xpaths = cds.data[xkey];\n const ypaths = cds.data[ykey];\n for (let index = 0; index < xpaths.length; index++) {\n let xs = xpaths[index];\n if (!(0, types_1.isArray)(xs)) {\n xs = Array.from(xs);\n cds.data[xkey][index] = xs;\n }\n let ys = ypaths[index];\n if (!(0, types_1.isArray)(ys)) {\n ys = Array.from(ys);\n cds.data[ykey][index] = ys;\n }\n for (let i = 0; i < xs.length; i++) {\n if ((xs[i] == x) && (ys[i] == y) && (i != 0) && (i != (xs.length - 1))) {\n xpaths.splice(index + 1, 0, xs.slice(i));\n ypaths.splice(index + 1, 0, ys.slice(i));\n xs.splice(i + 1);\n ys.splice(i + 1);\n for (const column of cds.columns()) {\n if ((column !== xkey) && (column != ykey)) {\n cds.data[column].splice(index + 1, 0, cds.data[column][index]);\n }\n }\n return;\n }\n }\n }\n }\n }\n _snap_to_vertex(ev, x, y) {\n const { vertex_renderer } = this.model;\n if (vertex_renderer != null) {\n // If an existing vertex is hit snap to it\n const vertex_selected = this._select_event(ev, \"replace\", [vertex_renderer]);\n const point_ds = vertex_renderer.data_source;\n // Type once dataspecs are typed\n const point_glyph = vertex_renderer.glyph;\n const [pxkey, pykey] = [point_glyph.x.field, point_glyph.y.field];\n if (vertex_selected.length > 0) {\n // If existing vertex is hit split path at that location\n // converting to feature vertex\n const index = point_ds.selected.indices[0];\n if (pxkey) {\n x = point_ds.get(pxkey)[index];\n }\n if (pykey) {\n y = point_ds.get(pykey)[index];\n }\n if (ev.type != \"move\") {\n this._split_path(x, y);\n }\n point_ds.selection_manager.clear();\n }\n }\n return [x, y];\n }\n _set_vertices(xs, ys, styles) {\n const { vertex_renderer } = this.model;\n if (vertex_renderer == null) {\n return;\n }\n const point_glyph = vertex_renderer.glyph;\n const point_cds = vertex_renderer.data_source;\n const [pxkey, pykey] = [point_glyph.x.field, point_glyph.y.field];\n if (pxkey) {\n if ((0, types_1.isArray)(xs)) {\n point_cds.set(pxkey, xs);\n }\n else {\n point_glyph.x = { value: xs };\n }\n }\n if (pykey) {\n if ((0, types_1.isArray)(ys)) {\n point_cds.set(pykey, ys);\n }\n else {\n point_glyph.y = { value: ys };\n }\n }\n if (styles != null) {\n for (const key of (0, object_1.keys)(styles)) {\n point_cds.set(key, styles[key]);\n point_glyph[key] = { field: key };\n }\n }\n else {\n for (const col of point_cds.columns()) {\n point_cds.set(col, []);\n }\n }\n this._emit_cds_changes(point_cds, true, true, false);\n }\n _show_vertices() {\n if (!this.model.active) {\n return;\n }\n const { renderers, node_style, end_style } = this.model;\n const xs = [];\n const ys = [];\n const styles = {};\n for (const key of (0, object_1.keys)(end_style)) {\n styles[key] = [];\n }\n for (let i = 0; i < renderers.length; i++) {\n const renderer = renderers[i];\n const cds = renderer.data_source;\n const glyph = renderer.glyph;\n const [xkey, ykey] = [glyph.xs.field, glyph.ys.field];\n for (const array of cds.get_array(xkey)) {\n (0, assert_1.assert)((0, types_1.isArray)(array));\n xs.push(...array);\n for (const [key, val] of (0, object_1.entries)(end_style)) {\n styles[key].push(val);\n }\n for (const [key, val] of (0, object_1.entries)(node_style)) {\n for (let index = 0; index < array.length - 2; index++) {\n styles[key].push(val);\n }\n }\n for (const [key, val] of (0, object_1.entries)(end_style)) {\n styles[key].push(val);\n }\n }\n for (const array of cds.get_array(ykey)) {\n (0, assert_1.assert)((0, types_1.isArray)(array));\n ys.push(...array);\n }\n if (this._drawing && i == renderers.length - 1) {\n // Skip currently drawn vertex\n xs.splice(xs.length - 1, 1);\n ys.splice(ys.length - 1, 1);\n for (const [_, array] of (0, object_1.entries)(styles)) {\n array.splice(array.length - 1, 1);\n }\n }\n }\n this._set_vertices(xs, ys, styles);\n }\n _remove() {\n const renderer = this.model.renderers[0];\n const cds = renderer.data_source;\n const glyph = renderer.glyph;\n if ((0, vectorization_1.isField)(glyph.xs)) {\n const xkey = glyph.xs.field;\n const array = cds.get_array(xkey);\n const xidx = array.length - 1;\n const xs = array[xidx];\n xs.splice(xs.length - 1, 1);\n if (xs.length == 1) {\n array.splice(xidx, 1);\n }\n }\n if ((0, vectorization_1.isField)(glyph.ys)) {\n const ykey = glyph.ys.field;\n const array = cds.get_array(ykey);\n const yidx = array.length - 1;\n const ys = array[yidx];\n ys.splice(ys.length - 1, 1);\n if (ys.length == 1) {\n array.splice(yidx, 1);\n }\n }\n this._emit_cds_changes(cds);\n this._drawing = false;\n this._show_vertices();\n }\n}\nexports.PolyVertexDrawToolView = PolyVertexDrawToolView;\nPolyVertexDrawToolView.__name__ = \"PolyVertexDrawToolView\";\nclass PolyVertexDrawTool extends poly_draw_tool_1.PolyDrawTool {\n constructor(attrs) {\n super(attrs);\n }\n}\nexports.PolyVertexDrawTool = PolyVertexDrawTool;\n_a = PolyVertexDrawTool;\nPolyVertexDrawTool.__name__ = \"PolyVertexDrawTool\";\nPolyVertexDrawTool.__module__ = \"geoviews.models.custom_tools\";\n(() => {\n _a.prototype.default_view = PolyVertexDrawToolView;\n _a.define(({ Dict, Unknown }) => ({\n end_style: [Dict(Unknown), {}],\n node_style: [Dict(Unknown), {}],\n }));\n})();\n//# sourceMappingURL=poly_draw.js.map\n","type":"js","dependency_paths":[],"dependency_map":[],"exported":[{"type":"named","name":"PolyVertexDrawToolView"},{"type":"named","name":"PolyVertexDrawTool"}],"externals":[],"shims":[]},"code":{"source":"/* models/poly_draw.js */ function _(require, module, exports, __esModule, __esExport) {\n var _a;\n __esModule();\n const vectorization_1 = require(\"@bokehjs/core/vectorization\");\n const object_1 = require(\"@bokehjs/core/util/object\");\n const types_1 = require(\"@bokehjs/core/util/types\");\n const assert_1 = require(\"@bokehjs/core/util/assert\");\n const poly_draw_tool_1 = require(\"@bokehjs/models/tools/edit/poly_draw_tool\");\n class PolyVertexDrawToolView extends poly_draw_tool_1.PolyDrawToolView {\n _split_path(x, y) {\n for (const renderer of this.model.renderers) {\n const glyph = renderer.glyph;\n const cds = renderer.data_source;\n const [xkey, ykey] = [glyph.xs.field, glyph.ys.field];\n const xpaths = cds.data[xkey];\n const ypaths = cds.data[ykey];\n for (let index = 0; index < xpaths.length; index++) {\n let xs = xpaths[index];\n if (!(0, types_1.isArray)(xs)) {\n xs = Array.from(xs);\n cds.data[xkey][index] = xs;\n }\n let ys = ypaths[index];\n if (!(0, types_1.isArray)(ys)) {\n ys = Array.from(ys);\n cds.data[ykey][index] = ys;\n }\n for (let i = 0; i < xs.length; i++) {\n if ((xs[i] == x) && (ys[i] == y) && (i != 0) && (i != (xs.length - 1))) {\n xpaths.splice(index + 1, 0, xs.slice(i));\n ypaths.splice(index + 1, 0, ys.slice(i));\n xs.splice(i + 1);\n ys.splice(i + 1);\n for (const column of cds.columns()) {\n if ((column !== xkey) && (column != ykey)) {\n cds.data[column].splice(index + 1, 0, cds.data[column][index]);\n }\n }\n return;\n }\n }\n }\n }\n }\n _snap_to_vertex(ev, x, y) {\n const { vertex_renderer } = this.model;\n if (vertex_renderer != null) {\n // If an existing vertex is hit snap to it\n const vertex_selected = this._select_event(ev, \"replace\", [vertex_renderer]);\n const point_ds = vertex_renderer.data_source;\n // Type once dataspecs are typed\n const point_glyph = vertex_renderer.glyph;\n const [pxkey, pykey] = [point_glyph.x.field, point_glyph.y.field];\n if (vertex_selected.length > 0) {\n // If existing vertex is hit split path at that location\n // converting to feature vertex\n const index = point_ds.selected.indices[0];\n if (pxkey) {\n x = point_ds.get(pxkey)[index];\n }\n if (pykey) {\n y = point_ds.get(pykey)[index];\n }\n if (ev.type != \"move\") {\n this._split_path(x, y);\n }\n point_ds.selection_manager.clear();\n }\n }\n return [x, y];\n }\n _set_vertices(xs, ys, styles) {\n const { vertex_renderer } = this.model;\n if (vertex_renderer == null) {\n return;\n }\n const point_glyph = vertex_renderer.glyph;\n const point_cds = vertex_renderer.data_source;\n const [pxkey, pykey] = [point_glyph.x.field, point_glyph.y.field];\n if (pxkey) {\n if ((0, types_1.isArray)(xs)) {\n point_cds.set(pxkey, xs);\n }\n else {\n point_glyph.x = { value: xs };\n }\n }\n if (pykey) {\n if ((0, types_1.isArray)(ys)) {\n point_cds.set(pykey, ys);\n }\n else {\n point_glyph.y = { value: ys };\n }\n }\n if (styles != null) {\n for (const key of (0, object_1.keys)(styles)) {\n point_cds.set(key, styles[key]);\n point_glyph[key] = { field: key };\n }\n }\n else {\n for (const col of point_cds.columns()) {\n point_cds.set(col, []);\n }\n }\n this._emit_cds_changes(point_cds, true, true, false);\n }\n _show_vertices() {\n if (!this.model.active) {\n return;\n }\n const { renderers, node_style, end_style } = this.model;\n const xs = [];\n const ys = [];\n const styles = {};\n for (const key of (0, object_1.keys)(end_style)) {\n styles[key] = [];\n }\n for (let i = 0; i < renderers.length; i++) {\n const renderer = renderers[i];\n const cds = renderer.data_source;\n const glyph = renderer.glyph;\n const [xkey, ykey] = [glyph.xs.field, glyph.ys.field];\n for (const array of cds.get_array(xkey)) {\n (0, assert_1.assert)((0, types_1.isArray)(array));\n xs.push(...array);\n for (const [key, val] of (0, object_1.entries)(end_style)) {\n styles[key].push(val);\n }\n for (const [key, val] of (0, object_1.entries)(node_style)) {\n for (let index = 0; index < array.length - 2; index++) {\n styles[key].push(val);\n }\n }\n for (const [key, val] of (0, object_1.entries)(end_style)) {\n styles[key].push(val);\n }\n }\n for (const array of cds.get_array(ykey)) {\n (0, assert_1.assert)((0, types_1.isArray)(array));\n ys.push(...array);\n }\n if (this._drawing && i == renderers.length - 1) {\n // Skip currently drawn vertex\n xs.splice(xs.length - 1, 1);\n ys.splice(ys.length - 1, 1);\n for (const [_, array] of (0, object_1.entries)(styles)) {\n array.splice(array.length - 1, 1);\n }\n }\n }\n this._set_vertices(xs, ys, styles);\n }\n _remove() {\n const renderer = this.model.renderers[0];\n const cds = renderer.data_source;\n const glyph = renderer.glyph;\n if ((0, vectorization_1.isField)(glyph.xs)) {\n const xkey = glyph.xs.field;\n const array = cds.get_array(xkey);\n const xidx = array.length - 1;\n const xs = array[xidx];\n xs.splice(xs.length - 1, 1);\n if (xs.length == 1) {\n array.splice(xidx, 1);\n }\n }\n if ((0, vectorization_1.isField)(glyph.ys)) {\n const ykey = glyph.ys.field;\n const array = cds.get_array(ykey);\n const yidx = array.length - 1;\n const ys = array[yidx];\n ys.splice(ys.length - 1, 1);\n if (ys.length == 1) {\n array.splice(yidx, 1);\n }\n }\n this._emit_cds_changes(cds);\n this._drawing = false;\n this._show_vertices();\n }\n }\n exports.PolyVertexDrawToolView = PolyVertexDrawToolView;\n PolyVertexDrawToolView.__name__ = \"PolyVertexDrawToolView\";\n class PolyVertexDrawTool extends poly_draw_tool_1.PolyDrawTool {\n constructor(attrs) {\n super(attrs);\n }\n }\n exports.PolyVertexDrawTool = PolyVertexDrawTool;\n _a = PolyVertexDrawTool;\n PolyVertexDrawTool.__name__ = \"PolyVertexDrawTool\";\n PolyVertexDrawTool.__module__ = \"geoviews.models.custom_tools\";\n (() => {\n _a.prototype.default_view = PolyVertexDrawToolView;\n _a.define(({ Dict, Unknown }) => ({\n end_style: [Dict(Unknown), {}],\n node_style: [Dict(Unknown), {}],\n }));\n })();\n}\n","min_source":"function _(e,s,t,o,r){var l;o();const i=e(\"@bokehjs/core/vectorization\"),n=e(\"@bokehjs/core/util/object\"),c=e(\"@bokehjs/core/util/types\"),a=e(\"@bokehjs/core/util/assert\"),_=e(\"@bokehjs/models/tools/edit/poly_draw_tool\");class d extends _.PolyDrawToolView{_split_path(e,s){for(const t of this.model.renderers){const o=t.glyph,r=t.data_source,[l,i]=[o.xs.field,o.ys.field],n=r.data[l],a=r.data[i];for(let t=0;t<n.length;t++){let o=n[t];(0,c.isArray)(o)||(o=Array.from(o),r.data[l][t]=o);let _=a[t];(0,c.isArray)(_)||(_=Array.from(_),r.data[i][t]=_);for(let c=0;c<o.length;c++)if(o[c]==e&&_[c]==s&&0!=c&&c!=o.length-1){n.splice(t+1,0,o.slice(c)),a.splice(t+1,0,_.slice(c)),o.splice(c+1),_.splice(c+1);for(const e of r.columns())e!==l&&e!=i&&r.data[e].splice(t+1,0,r.data[e][t]);return}}}}_snap_to_vertex(e,s,t){const{vertex_renderer:o}=this.model;if(null!=o){const r=this._select_event(e,\"replace\",[o]),l=o.data_source,i=o.glyph,[n,c]=[i.x.field,i.y.field];if(r.length>0){const o=l.selected.indices[0];n&&(s=l.get(n)[o]),c&&(t=l.get(c)[o]),\"move\"!=e.type&&this._split_path(s,t),l.selection_manager.clear()}}return[s,t]}_set_vertices(e,s,t){const{vertex_renderer:o}=this.model;if(null==o)return;const r=o.glyph,l=o.data_source,[i,a]=[r.x.field,r.y.field];if(i&&((0,c.isArray)(e)?l.set(i,e):r.x={value:e}),a&&((0,c.isArray)(s)?l.set(a,s):r.y={value:s}),null!=t)for(const e of(0,n.keys)(t))l.set(e,t[e]),r[e]={field:e};else for(const e of l.columns())l.set(e,[]);this._emit_cds_changes(l,!0,!0,!1)}_show_vertices(){if(!this.model.active)return;const{renderers:e,node_style:s,end_style:t}=this.model,o=[],r=[],l={};for(const e of(0,n.keys)(t))l[e]=[];for(let i=0;i<e.length;i++){const _=e[i],d=_.data_source,f=_.glyph,[h,y]=[f.xs.field,f.ys.field];for(const e of d.get_array(h)){(0,a.assert)((0,c.isArray)(e)),o.push(...e);for(const[e,s]of(0,n.entries)(t))l[e].push(s);for(const[t,o]of(0,n.entries)(s))for(let s=0;s<e.length-2;s++)l[t].push(o);for(const[e,s]of(0,n.entries)(t))l[e].push(s)}for(const e of d.get_array(y))(0,a.assert)((0,c.isArray)(e)),r.push(...e);if(this._drawing&&i==e.length-1){o.splice(o.length-1,1),r.splice(r.length-1,1);for(const[e,s]of(0,n.entries)(l))s.splice(s.length-1,1)}}this._set_vertices(o,r,l)}_remove(){const e=this.model.renderers[0],s=e.data_source,t=e.glyph;if((0,i.isField)(t.xs)){const e=t.xs.field,o=s.get_array(e),r=o.length-1,l=o[r];l.splice(l.length-1,1),1==l.length&&o.splice(r,1)}if((0,i.isField)(t.ys)){const e=t.ys.field,o=s.get_array(e),r=o.length-1,l=o[r];l.splice(l.length-1,1),1==l.length&&o.splice(r,1)}this._emit_cds_changes(s),this._drawing=!1,this._show_vertices()}}t.PolyVertexDrawToolView=d,d.__name__=\"PolyVertexDrawToolView\";class f extends _.PolyDrawTool{constructor(e){super(e)}}t.PolyVertexDrawTool=f,l=f,f.__name__=\"PolyVertexDrawTool\",f.__module__=\"geoviews.models.custom_tools\",l.prototype.default_view=d,l.define((({Dict:e,Unknown:s})=>({end_style:[e(s),{}],node_style:[e(s),{}]})))}\n//# sourceMappingURL=poly_draw.min.js.map","min_map":"{\"version\":3,\"file\":\"poly_draw.min.js\",\"names\":[\"_\",\"require\",\"module\",\"exports\",\"__esModule\",\"__esExport\",\"_a\",\"vectorization_1\",\"object_1\",\"types_1\",\"assert_1\",\"poly_draw_tool_1\",\"PolyVertexDrawToolView\",\"PolyDrawToolView\",\"_split_path\",\"x\",\"y\",\"renderer\",\"this\",\"model\",\"renderers\",\"glyph\",\"cds\",\"data_source\",\"xkey\",\"ykey\",\"xs\",\"field\",\"ys\",\"xpaths\",\"data\",\"ypaths\",\"index\",\"length\",\"isArray\",\"Array\",\"from\",\"i\",\"splice\",\"slice\",\"column\",\"columns\",\"_snap_to_vertex\",\"ev\",\"vertex_renderer\",\"vertex_selected\",\"_select_event\",\"point_ds\",\"point_glyph\",\"pxkey\",\"pykey\",\"selected\",\"indices\",\"get\",\"type\",\"selection_manager\",\"clear\",\"_set_vertices\",\"styles\",\"point_cds\",\"set\",\"value\",\"key\",\"keys\",\"col\",\"_emit_cds_changes\",\"_show_vertices\",\"active\",\"node_style\",\"end_style\",\"array\",\"get_array\",\"assert\",\"push\",\"val\",\"entries\",\"_drawing\",\"_remove\",\"isField\",\"xidx\",\"yidx\",\"__name__\",\"PolyVertexDrawTool\",\"PolyDrawTool\",\"constructor\",\"attrs\",\"super\",\"__module__\",\"prototype\",\"default_view\",\"define\",\"Dict\",\"Unknown\"],\"sources\":[\"0\"],\"mappings\":\"AAA0B,SAASA,EAAEC,EAASC,EAAQC,EAASC,EAAYC,GACvE,IAAIC,EACJF,IACA,MAAMG,EAAkBN,EAAQ,+BAC1BO,EAAWP,EAAQ,6BACnBQ,EAAUR,EAAQ,4BAClBS,EAAWT,EAAQ,6BACnBU,EAAmBV,EAAQ,6CACjC,MAAMW,UAA+BD,EAAiBE,iBAClD,WAAAC,CAAYC,EAAGC,GACX,IAAK,MAAMC,KAAYC,KAAKC,MAAMC,UAAW,CACzC,MAAMC,EAAQJ,EAASI,MACjBC,EAAML,EAASM,aACdC,EAAMC,GAAQ,CAACJ,EAAMK,GAAGC,MAAON,EAAMO,GAAGD,OACzCE,EAASP,EAAIQ,KAAKN,GAClBO,EAAST,EAAIQ,KAAKL,GACxB,IAAK,IAAIO,EAAQ,EAAGA,EAAQH,EAAOI,OAAQD,IAAS,CAChD,IAAIN,EAAKG,EAAOG,IACX,EAAIvB,EAAQyB,SAASR,KACtBA,EAAKS,MAAMC,KAAKV,GAChBJ,EAAIQ,KAAKN,GAAMQ,GAASN,GAE5B,IAAIE,EAAKG,EAAOC,IACX,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BL,EAAK0C,EAAMU,GACjBpD,EAAGU,OAAOV,EAAGK,OAAS,EAAG,GACR,GAAbL,EAAGK,QACHqC,EAAMhC,OAAO0C,EAAM,EAE3B,CACA9D,KAAK+C,kBAAkB3C,GACvBJ,KAAK0D,UAAW,EAChB1D,KAAKgD,gBACT,EAEJ/D,EAAQS,uBAAyBA,EACjCA,EAAuBqE,SAAW,yBAClC,MAAMC,UAA2BvE,EAAiBwE,aAC9C,WAAAC,CAAYC,GACRC,MAAMD,EACV,EAEJlF,EAAQ+E,mBAAqBA,EAC7B5E,EAAK4E,EACLA,EAAmBD,SAAW,qBAC9BC,EAAmBK,WAAa,+BAE5BjF,EAAGkF,UAAUC,aAAe7E,EAC5BN,EAAGoF,QAAO,EAAGC,OAAMC,cAAc,CAC7BvB,UAAW,CAACsB,EAAKC,GAAU,CAAC,GAC5BxB,WAAY,CAACuB,EAAKC,GAAU,CAAC,MAGzC\",\"ignoreList\":[]}"}},{"module":{"file":"/home/runner/work/geoviews/geoviews/geoviews/dist/lib/models/poly_edit.js","base":"/home/runner/work/geoviews/geoviews/geoviews/dist/lib","base_path":"models/poly_edit.js","canonical":"models/poly_edit","resolution":"ESM","id":"238deef1f5","hash":"238deef1f5b70608e38100a2ed10a7b3f655db10593de22b5797c78e79402037","source":"\"use strict\";\nvar _a;\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.PolyVertexEditTool = exports.PolyVertexEditToolView = void 0;\nconst object_1 = require(\"@bokehjs/core/util/object\");\nconst types_1 = require(\"@bokehjs/core/util/types\");\nconst poly_edit_tool_1 = require(\"@bokehjs/models/tools/edit/poly_edit_tool\");\nclass PolyVertexEditToolView extends poly_edit_tool_1.PolyEditToolView {\n deactivate() {\n this._hide_vertices();\n if (this._selected_renderer == null) {\n return;\n }\n else if (this._drawing) {\n this._remove_vertex();\n this._drawing = false;\n }\n this._emit_cds_changes(this._selected_renderer.data_source, false, true, false);\n }\n _pan(ev) {\n if (this._basepoint == null || this.model.vertex_renderer == null) {\n return;\n }\n const points = this._drag_points(ev, [this.model.vertex_renderer]);\n if (!ev.modifiers.shift) {\n this._move_linked(points);\n }\n if (this._selected_renderer != null) {\n this._selected_renderer.data_source.change.emit();\n }\n }\n _pan_end(ev) {\n if (this._basepoint == null || this.model.vertex_renderer == null) {\n return;\n }\n const points = this._drag_points(ev, [this.model.vertex_renderer]);\n if (!ev.modifiers.shift) {\n this._move_linked(points);\n }\n this._emit_cds_changes(this.model.vertex_renderer.data_source, false, true, true);\n if (this._selected_renderer != null) {\n this._emit_cds_changes(this._selected_renderer.data_source);\n }\n this._basepoint = null;\n }\n _drag_points(ev, renderers) {\n if (this._basepoint == null) {\n return [];\n }\n const [bx, by] = this._basepoint;\n const points = [];\n for (const renderer of renderers) {\n const basepoint = this._map_drag(bx, by, renderer);\n const point = this._map_drag(ev.sx, ev.sy, renderer);\n if (point == null || basepoint == null) {\n continue;\n }\n const [x, y] = point;\n const [px, py] = basepoint;\n const [dx, dy] = [x - px, y - py];\n // Type once dataspecs are typed\n const glyph = renderer.glyph;\n const cds = renderer.data_source;\n const [xkey, ykey] = [glyph.x.field, glyph.y.field];\n for (const index of cds.selected.indices) {\n const point = [];\n if (xkey) {\n const xs = cds.get(xkey);\n point.push(xs[index]);\n xs[index] += dx;\n }\n if (ykey) {\n const ys = cds.get(ykey);\n point.push(ys[index]);\n ys[index] += dy;\n }\n point.push(dx);\n point.push(dy);\n points.push(point);\n }\n cds.change.emit();\n }\n this._basepoint = [ev.sx, ev.sy];\n return points;\n }\n _set_vertices(xs, ys, styles) {\n if (this.model.vertex_renderer == null) {\n return;\n }\n const point_glyph = this.model.vertex_renderer.glyph;\n const point_cds = this.model.vertex_renderer.data_source;\n const [pxkey, pykey] = [point_glyph.x.field, point_glyph.y.field];\n if (pxkey) {\n if ((0, types_1.isArray)(xs)) {\n point_cds.set(pxkey, xs);\n }\n else {\n point_glyph.x = { value: xs };\n }\n }\n if (pykey) {\n if ((0, types_1.isArray)(ys)) {\n point_cds.set(pykey, ys);\n }\n else {\n point_glyph.y = { value: ys };\n }\n }\n if (styles != null) {\n for (const [key, array] of (0, object_1.entries)(styles)) {\n point_cds.set(key, array);\n point_glyph[key] = { field: key };\n }\n }\n else {\n for (const col of point_cds.columns()) {\n point_cds.set(col, []);\n }\n }\n this._emit_cds_changes(point_cds, true, true, false);\n }\n _move_linked(points) {\n if (this._selected_renderer == null) {\n return;\n }\n const renderer = this._selected_renderer;\n const glyph = renderer.glyph;\n const cds = renderer.data_source;\n const [xkey, ykey] = [glyph.xs.field, glyph.ys.field];\n const xpaths = cds.data[xkey];\n const ypaths = cds.data[ykey];\n for (const point of points) {\n const [x, y, dx, dy] = point;\n for (let index = 0; index < xpaths.length; index++) {\n const xs = xpaths[index];\n const ys = ypaths[index];\n for (let i = 0; i < xs.length; i++) {\n if ((xs[i] == x) && (ys[i] == y)) {\n xs[i] += dx;\n ys[i] += dy;\n }\n }\n }\n }\n }\n _tap(ev) {\n if (this.model.vertex_renderer == null) {\n return;\n }\n const renderer = this.model.vertex_renderer;\n const point = this._map_drag(ev.sx, ev.sy, renderer);\n if (point == null) {\n return;\n }\n else if (this._drawing && this._selected_renderer != null) {\n let [x, y] = point;\n const cds = renderer.data_source;\n // Type once dataspecs are typed\n const glyph = renderer.glyph;\n const [xkey, ykey] = [glyph.x.field, glyph.y.field];\n const indices = cds.selected.indices;\n [x, y] = this._snap_to_vertex(ev, x, y);\n const index = indices[0];\n cds.selected.indices = [index + 1];\n if (xkey) {\n const xs = cds.get_array(xkey);\n const nx = xs[index];\n xs[index] = x;\n xs.splice(index + 1, 0, nx);\n }\n if (ykey) {\n const ys = cds.get_array(ykey);\n const ny = ys[index];\n ys[index] = y;\n ys.splice(index + 1, 0, ny);\n }\n cds.change.emit();\n this._emit_cds_changes(this._selected_renderer.data_source, true, false, true);\n return;\n }\n this._select_event(ev, this._select_mode(ev), [renderer]);\n }\n _show_vertices(ev) {\n if (!this.model.active) {\n return;\n }\n const renderers = this._select_event(ev, \"replace\", this.model.renderers);\n if (renderers.length === 0) {\n this._hide_vertices();\n this._selected_renderer = null;\n this._drawing = false;\n return;\n }\n const renderer = renderers[0];\n const glyph = renderer.glyph;\n const cds = renderer.data_source;\n const index = cds.selected.indices[0];\n const [xkey, ykey] = [glyph.xs.field, glyph.ys.field];\n let xs;\n let ys;\n if (xkey) {\n xs = cds.get(xkey)[index];\n if (!(0, types_1.isArray)(xs)) {\n cds.get(xkey)[index] = xs = Array.from(xs);\n }\n }\n else {\n xs = glyph.xs.value;\n }\n if (ykey) {\n ys = cds.get(ykey)[index];\n if (!(0, types_1.isArray)(ys)) {\n cds.get(ykey)[index] = ys = Array.from(ys);\n }\n }\n else {\n ys = glyph.ys.value;\n }\n const { end_style, node_style } = this.model;\n const styles = {};\n for (const [key, val] of (0, object_1.entries)(end_style)) {\n styles[key] = [val];\n }\n for (const [key, val] of (0, object_1.entries)(node_style)) {\n for (let index = 0; index < xs.length - 2; index++) {\n styles[key].push(val);\n }\n }\n for (const [key, val] of (0, object_1.entries)(end_style)) {\n styles[key].push(val);\n }\n this._selected_renderer = renderer;\n this._set_vertices(xs, ys, styles);\n }\n}\nexports.PolyVertexEditToolView = PolyVertexEditToolView;\nPolyVertexEditToolView.__name__ = \"PolyVertexEditToolView\";\nclass PolyVertexEditTool extends poly_edit_tool_1.PolyEditTool {\n constructor(attrs) {\n super(attrs);\n }\n}\nexports.PolyVertexEditTool = PolyVertexEditTool;\n_a = PolyVertexEditTool;\nPolyVertexEditTool.__name__ = \"PolyVertexEditTool\";\nPolyVertexEditTool.__module__ = \"geoviews.models.custom_tools\";\n(() => {\n _a.prototype.default_view = PolyVertexEditToolView;\n _a.define(({ Dict, Unknown }) => ({\n end_style: [Dict(Unknown), {}],\n node_style: [Dict(Unknown), {}],\n }));\n})();\n//# sourceMappingURL=poly_edit.js.map\n","type":"js","dependency_paths":[],"dependency_map":[],"exported":[{"type":"named","name":"PolyVertexEditToolView"},{"type":"named","name":"PolyVertexEditTool"}],"externals":[],"shims":[]},"code":{"source":"/* models/poly_edit.js */ function _(require, module, exports, __esModule, __esExport) {\n var _a;\n __esModule();\n const object_1 = require(\"@bokehjs/core/util/object\");\n const types_1 = require(\"@bokehjs/core/util/types\");\n const poly_edit_tool_1 = require(\"@bokehjs/models/tools/edit/poly_edit_tool\");\n class PolyVertexEditToolView extends poly_edit_tool_1.PolyEditToolView {\n deactivate() {\n this._hide_vertices();\n if (this._selected_renderer == null) {\n return;\n }\n else if (this._drawing) {\n this._remove_vertex();\n this._drawing = false;\n }\n this._emit_cds_changes(this._selected_renderer.data_source, false, true, false);\n }\n _pan(ev) {\n if (this._basepoint == null || this.model.vertex_renderer == null) {\n return;\n }\n const points = this._drag_points(ev, [this.model.vertex_renderer]);\n if (!ev.modifiers.shift) {\n this._move_linked(points);\n }\n if (this._selected_renderer != null) {\n this._selected_renderer.data_source.change.emit();\n }\n }\n _pan_end(ev) {\n if (this._basepoint == null || this.model.vertex_renderer == null) {\n return;\n }\n const points = this._drag_points(ev, [this.model.vertex_renderer]);\n if (!ev.modifiers.shift) {\n this._move_linked(points);\n }\n this._emit_cds_changes(this.model.vertex_renderer.data_source, false, true, true);\n if (this._selected_renderer != null) {\n this._emit_cds_changes(this._selected_renderer.data_source);\n }\n this._basepoint = null;\n }\n _drag_points(ev, renderers) {\n if (this._basepoint == null) {\n return [];\n }\n const [bx, by] = this._basepoint;\n const points = [];\n for (const renderer of renderers) {\n const basepoint = this._map_drag(bx, by, renderer);\n const point = this._map_drag(ev.sx, ev.sy, renderer);\n if (point == null || basepoint == null) {\n continue;\n }\n const [x, y] = point;\n const [px, py] = basepoint;\n const [dx, dy] = [x - px, y - py];\n // Type once dataspecs are typed\n const glyph = renderer.glyph;\n const cds = renderer.data_source;\n const [xkey, ykey] = [glyph.x.field, glyph.y.field];\n for (const index of cds.selected.indices) {\n const point = [];\n if (xkey) {\n const xs = cds.get(xkey);\n point.push(xs[index]);\n xs[index] += dx;\n }\n if (ykey) {\n const ys = cds.get(ykey);\n point.push(ys[index]);\n ys[index] += dy;\n }\n point.push(dx);\n point.push(dy);\n points.push(point);\n }\n cds.change.emit();\n }\n this._basepoint = [ev.sx, ev.sy];\n return points;\n }\n _set_vertices(xs, ys, styles) {\n if (this.model.vertex_renderer == null) {\n return;\n }\n const point_glyph = this.model.vertex_renderer.glyph;\n const point_cds = this.model.vertex_renderer.data_source;\n const [pxkey, pykey] = [point_glyph.x.field, point_glyph.y.field];\n if (pxkey) {\n if ((0, types_1.isArray)(xs)) {\n point_cds.set(pxkey, xs);\n }\n else {\n point_glyph.x = { value: xs };\n }\n }\n if (pykey) {\n if ((0, types_1.isArray)(ys)) {\n point_cds.set(pykey, ys);\n }\n else {\n point_glyph.y = { value: ys };\n }\n }\n if (styles != null) {\n for (const [key, array] of (0, object_1.entries)(styles)) {\n point_cds.set(key, array);\n point_glyph[key] = { field: key };\n }\n }\n else {\n for (const col of point_cds.columns()) {\n point_cds.set(col, []);\n }\n }\n this._emit_cds_changes(point_cds, true, true, false);\n }\n _move_linked(points) {\n if (this._selected_renderer == null) {\n return;\n }\n const renderer = this._selected_renderer;\n const glyph = renderer.glyph;\n const cds = renderer.data_source;\n const [xkey, ykey] = [glyph.xs.field, glyph.ys.field];\n const xpaths = cds.data[xkey];\n const ypaths = cds.data[ykey];\n for (const point of points) {\n const [x, y, dx, dy] = point;\n for (let index = 0; index < xpaths.length; index++) {\n const xs = xpaths[index];\n const ys = ypaths[index];\n for (let i = 0; i < xs.length; i++) {\n if ((xs[i] == x) && (ys[i] == y)) {\n xs[i] += dx;\n ys[i] += dy;\n }\n }\n }\n }\n }\n _tap(ev) {\n if (this.model.vertex_renderer == null) {\n return;\n }\n const renderer = this.model.vertex_renderer;\n const point = this._map_drag(ev.sx, ev.sy, renderer);\n if (point == null) {\n return;\n }\n else if (this._drawing && this._selected_renderer != null) {\n let [x, y] = point;\n const cds = renderer.data_source;\n // Type once dataspecs are typed\n const glyph = renderer.glyph;\n const [xkey, ykey] = [glyph.x.field, glyph.y.field];\n const indices = cds.selected.indices;\n [x, y] = this._snap_to_vertex(ev, x, y);\n const index = indices[0];\n cds.selected.indices = [index + 1];\n if (xkey) {\n const xs = cds.get_array(xkey);\n const nx = xs[index];\n xs[index] = x;\n xs.splice(index + 1, 0, nx);\n }\n if (ykey) {\n const ys = cds.get_array(ykey);\n const ny = ys[index];\n ys[index] = y;\n ys.splice(index + 1, 0, ny);\n }\n cds.change.emit();\n this._emit_cds_changes(this._selected_renderer.data_source, true, false, true);\n return;\n }\n this._select_event(ev, this._select_mode(ev), [renderer]);\n }\n _show_vertices(ev) {\n if (!this.model.active) {\n return;\n }\n const renderers = this._select_event(ev, \"replace\", this.model.renderers);\n if (renderers.length === 0) {\n this._hide_vertices();\n this._selected_renderer = null;\n this._drawing = false;\n return;\n }\n const renderer = renderers[0];\n const glyph = renderer.glyph;\n const cds = renderer.data_source;\n const index = cds.selected.indices[0];\n const [xkey, ykey] = [glyph.xs.field, glyph.ys.field];\n let xs;\n let ys;\n if (xkey) {\n xs = cds.get(xkey)[index];\n if (!(0, types_1.isArray)(xs)) {\n cds.get(xkey)[index] = xs = Array.from(xs);\n }\n }\n else {\n xs = glyph.xs.value;\n }\n if (ykey) {\n ys = cds.get(ykey)[index];\n if (!(0, types_1.isArray)(ys)) {\n cds.get(ykey)[index] = ys = Array.from(ys);\n }\n }\n else {\n ys = glyph.ys.value;\n }\n const { end_style, node_style } = this.model;\n const styles = {};\n for (const [key, val] of (0, object_1.entries)(end_style)) {\n styles[key] = [val];\n }\n for (const [key, val] of (0, object_1.entries)(node_style)) {\n for (let index = 0; index < xs.length - 2; index++) {\n styles[key].push(val);\n }\n }\n for (const [key, val] of (0, object_1.entries)(end_style)) {\n styles[key].push(val);\n }\n this._selected_renderer = renderer;\n this._set_vertices(xs, ys, styles);\n }\n }\n exports.PolyVertexEditToolView = PolyVertexEditToolView;\n PolyVertexEditToolView.__name__ = \"PolyVertexEditToolView\";\n class PolyVertexEditTool extends poly_edit_tool_1.PolyEditTool {\n constructor(attrs) {\n super(attrs);\n }\n }\n exports.PolyVertexEditTool = PolyVertexEditTool;\n _a = PolyVertexEditTool;\n PolyVertexEditTool.__name__ = \"PolyVertexEditTool\";\n PolyVertexEditTool.__module__ = \"geoviews.models.custom_tools\";\n (() => {\n _a.prototype.default_view = PolyVertexEditToolView;\n _a.define(({ Dict, Unknown }) => ({\n end_style: [Dict(Unknown), {}],\n node_style: [Dict(Unknown), {}],\n }));\n })();\n}\n","min_source":"function _(e,t,s,r,i){var n;r();const o=e(\"@bokehjs/core/util/object\"),_=e(\"@bokehjs/core/util/types\"),l=e(\"@bokehjs/models/tools/edit/poly_edit_tool\");class d extends l.PolyEditToolView{deactivate(){this._hide_vertices(),null!=this._selected_renderer&&(this._drawing&&(this._remove_vertex(),this._drawing=!1),this._emit_cds_changes(this._selected_renderer.data_source,!1,!0,!1))}_pan(e){if(null==this._basepoint||null==this.model.vertex_renderer)return;const t=this._drag_points(e,[this.model.vertex_renderer]);e.modifiers.shift||this._move_linked(t),null!=this._selected_renderer&&this._selected_renderer.data_source.change.emit()}_pan_end(e){if(null==this._basepoint||null==this.model.vertex_renderer)return;const t=this._drag_points(e,[this.model.vertex_renderer]);e.modifiers.shift||this._move_linked(t),this._emit_cds_changes(this.model.vertex_renderer.data_source,!1,!0,!0),null!=this._selected_renderer&&this._emit_cds_changes(this._selected_renderer.data_source),this._basepoint=null}_drag_points(e,t){if(null==this._basepoint)return[];const[s,r]=this._basepoint,i=[];for(const n of t){const t=this._map_drag(s,r,n),o=this._map_drag(e.sx,e.sy,n);if(null==o||null==t)continue;const[_,l]=o,[d,c]=t,[h,a]=[_-d,l-c],u=n.glyph,f=n.data_source,[m,g]=[u.x.field,u.y.field];for(const e of f.selected.indices){const t=[];if(m){const s=f.get(m);t.push(s[e]),s[e]+=h}if(g){const s=f.get(g);t.push(s[e]),s[e]+=a}t.push(h),t.push(a),i.push(t)}f.change.emit()}return this._basepoint=[e.sx,e.sy],i}_set_vertices(e,t,s){if(null==this.model.vertex_renderer)return;const r=this.model.vertex_renderer.glyph,i=this.model.vertex_renderer.data_source,[n,l]=[r.x.field,r.y.field];if(n&&((0,_.isArray)(e)?i.set(n,e):r.x={value:e}),l&&((0,_.isArray)(t)?i.set(l,t):r.y={value:t}),null!=s)for(const[e,t]of(0,o.entries)(s))i.set(e,t),r[e]={field:e};else for(const e of i.columns())i.set(e,[]);this._emit_cds_changes(i,!0,!0,!1)}_move_linked(e){if(null==this._selected_renderer)return;const t=this._selected_renderer,s=t.glyph,r=t.data_source,[i,n]=[s.xs.field,s.ys.field],o=r.data[i],_=r.data[n];for(const t of e){const[e,s,r,i]=t;for(let t=0;t<o.length;t++){const n=o[t],l=_[t];for(let t=0;t<n.length;t++)n[t]==e&&l[t]==s&&(n[t]+=r,l[t]+=i)}}}_tap(e){if(null==this.model.vertex_renderer)return;const t=this.model.vertex_renderer,s=this._map_drag(e.sx,e.sy,t);if(null!=s){if(this._drawing&&null!=this._selected_renderer){let[r,i]=s;const n=t.data_source,o=t.glyph,[_,l]=[o.x.field,o.y.field],d=n.selected.indices;[r,i]=this._snap_to_vertex(e,r,i);const c=d[0];if(n.selected.indices=[c+1],_){const e=n.get_array(_),t=e[c];e[c]=r,e.splice(c+1,0,t)}if(l){const e=n.get_array(l),t=e[c];e[c]=i,e.splice(c+1,0,t)}return n.change.emit(),void this._emit_cds_changes(this._selected_renderer.data_source,!0,!1,!0)}this._select_event(e,this._select_mode(e),[t])}}_show_vertices(e){if(!this.model.active)return;const t=this._select_event(e,\"replace\",this.model.renderers);if(0===t.length)return this._hide_vertices(),this._selected_renderer=null,void(this._drawing=!1);const s=t[0],r=s.glyph,i=s.data_source,n=i.selected.indices[0],[l,d]=[r.xs.field,r.ys.field];let c,h;l?(c=i.get(l)[n],(0,_.isArray)(c)||(i.get(l)[n]=c=Array.from(c))):c=r.xs.value,d?(h=i.get(d)[n],(0,_.isArray)(h)||(i.get(d)[n]=h=Array.from(h))):h=r.ys.value;const{end_style:a,node_style:u}=this.model,f={};for(const[e,t]of(0,o.entries)(a))f[e]=[t];for(const[e,t]of(0,o.entries)(u))for(let s=0;s<c.length-2;s++)f[e].push(t);for(const[e,t]of(0,o.entries)(a))f[e].push(t);this._selected_renderer=s,this._set_vertices(c,h,f)}}s.PolyVertexEditToolView=d,d.__name__=\"PolyVertexEditToolView\";class c extends l.PolyEditTool{constructor(e){super(e)}}s.PolyVertexEditTool=c,n=c,c.__name__=\"PolyVertexEditTool\",c.__module__=\"geoviews.models.custom_tools\",n.prototype.default_view=d,n.define((({Dict:e,Unknown:t})=>({end_style:[e(t),{}],node_style:[e(t),{}]})))}\n//# sourceMappingURL=poly_edit.min.js.map","min_map":"{\"version\":3,\"file\":\"poly_edit.min.js\",\"names\":[\"_\",\"require\",\"module\",\"exports\",\"__esModule\",\"__esExport\",\"_a\",\"object_1\",\"types_1\",\"poly_edit_tool_1\",\"PolyVertexEditToolView\",\"PolyEditToolView\",\"deactivate\",\"this\",\"_hide_vertices\",\"_selected_renderer\",\"_drawing\",\"_remove_vertex\",\"_emit_cds_changes\",\"data_source\",\"_pan\",\"ev\",\"_basepoint\",\"model\",\"vertex_renderer\",\"points\",\"_drag_points\",\"modifiers\",\"shift\",\"_move_linked\",\"change\",\"emit\",\"_pan_end\",\"renderers\",\"bx\",\"by\",\"renderer\",\"basepoint\",\"_map_drag\",\"point\",\"sx\",\"sy\",\"x\",\"y\",\"px\",\"py\",\"dx\",\"dy\",\"glyph\",\"cds\",\"xkey\",\"ykey\",\"field\",\"index\",\"selected\",\"indices\",\"xs\",\"get\",\"push\",\"ys\",\"_set_vertices\",\"styles\",\"point_glyph\",\"point_cds\",\"pxkey\",\"pykey\",\"isArray\",\"set\",\"value\",\"key\",\"array\",\"entries\",\"col\",\"columns\",\"xpaths\",\"data\",\"ypaths\",\"length\",\"i\",\"_tap\",\"_snap_to_vertex\",\"get_array\",\"nx\",\"splice\",\"ny\",\"_select_event\",\"_select_mode\",\"_show_vertices\",\"active\",\"Array\",\"from\",\"end_style\",\"node_style\",\"val\",\"__name__\",\"PolyVertexEditTool\",\"PolyEditTool\",\"constructor\",\"attrs\",\"super\",\"__module__\",\"prototype\",\"default_view\",\"define\",\"Dict\",\"Unknown\"],\"sources\":[\"0\"],\"mappings\":\"AAA0B,SAASA,EAAEC,EAASC,EAAQC,EAASC,EAAYC,GACvE,IAAIC,EACJF,IACA,MAAMG,EAAWN,EAAQ,6BACnBO,EAAUP,EAAQ,4BAClBQ,EAAmBR,EAAQ,6CACjC,MAAMS,UAA+BD,EAAiBE,iBAClD,UAAAC,GACIC,KAAKC,iBAC0B,MAA3BD,KAAKE,qBAGAF,KAAKG,WACVH,KAAKI,iBACLJ,KAAKG,UAAW,GAEpBH,KAAKK,kBAAkBL,KAAKE,mBAAmBI,aAAa,GAAO,GAAM,GAC7E,CACA,IAAAC,CAAKC,GACD,GAAuB,MAAnBR,KAAKS,YAAoD,MAA9BT,KAAKU,MAAMC,gBACtC,OAEJ,MAAMC,EAASZ,KAAKa,aAAaL,EAAI,CAACR,KAAKU,MAAMC,kBAC5CH,EAAGM,UAAUC,OACdf,KAAKgB,aAAaJ,GAES,MAA3BZ,KAAKE,oBACLF,KAAKE,mBAAmBI,YAAYW,OAAOC,MAEnD,CACA,QAAAC,CAASX,GACL,GAAuB,MAAnBR,KAAKS,YAAoD,MAA9BT,KAAKU,MAAMC,gBACtC,OAEJ,MAAMC,EAASZ,KAAKa,aAAaL,EAAI,CAACR,KAAKU,MAAMC,kBAC5CH,EAAGM,UAAUC,OACdf,KAAKgB,aAAaJ,GAEtBZ,KAAKK,kBAAkBL,KAAKU,MAAMC,gBAAgBL,aAAa,GAAO,GAAM,GAC7C,MAA3BN,KAAKE,oBACLF,KAAKK,kBAAkBL,KAAKE,mBAAmBI,aAEnDN,KAAKS,WAAa,IACtB,CACA,YAAAI,CAAaL,EAAIY,GACb,GAAuB,MAAnBpB,KAAKS,WACL,MAAO,GAEX,MAAOY,EAAIC,GAAMtB,KAAKS,WAChBG,EAAS,GACf,IA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IAAIP,GAAMG,GAASG,EAAKiC,MAAMC,KAAKlC,KAI3CA,EAAKR,EAAMQ,GAAGY,MAEdjB,GACAQ,EAAKV,EAAIQ,IAAIN,GAAME,IACd,EAAI7C,EAAQ0D,SAASP,KACtBV,EAAIQ,IAAIN,GAAME,GAASM,EAAK8B,MAAMC,KAAK/B,KAI3CA,EAAKX,EAAMW,GAAGS,MAElB,MAAMuB,UAAEA,EAASC,WAAEA,GAAe/E,KAAKU,MACjCsC,EAAS,CAAC,EAChB,IAAK,MAAOQ,EAAKwB,KAAQ,EAAItF,EAASgE,SAASoB,GAC3C9B,EAAOQ,GAAO,CAACwB,GAEnB,IAAK,MAAOxB,EAAKwB,KAAQ,EAAItF,EAASgE,SAASqB,GAC3C,IAAK,IAAIvC,EAAQ,EAAGA,EAAQG,EAAGqB,OAAS,EAAGxB,IACvCQ,EAAOQ,GAAKX,KAAKmC,GAGzB,IAAK,MAAOxB,EAAKwB,KAAQ,EAAItF,EAASgE,SAASoB,GAC3C9B,EAAOQ,GAAKX,KAAKmC,GAErBhF,KAAKE,mBAAqBqB,EAC1BvB,KAAK+C,cAAcJ,EAAIG,EAAIE,EAC/B,EAEJ1D,EAAQO,uBAAyBA,EACjCA,EAAuBoF,SAAW,yBAClC,MAAMC,UAA2BtF,EAAiBuF,aAC9C,WAAAC,CAAYC,GACRC,MAAMD,EACV,EAEJ/F,EAAQ4F,mBAAqBA,EAC7BzF,EAAKyF,EACLA,EAAmBD,SAAW,qBAC9BC,EAAmBK,WAAa,+BAE5B9F,EAAG+F,UAAUC,aAAe5F,EAC5BJ,EAAGiG,QAAO,EAAGC,OAAMC,cAAc,CAC7Bd,UAAW,CAACa,EAAKC,GAAU,CAAC,GAC5Bb,WAAY,CAACY,EAAKC,GAAU,CAAC,MAGzC\",\"ignoreList\":[]}"}},{"module":{"file":"/home/runner/work/geoviews/geoviews/geoviews/dist/lib/models/restore_tool.js","base":"/home/runner/work/geoviews/geoviews/geoviews/dist/lib","base_path":"models/restore_tool.js","canonical":"models/restore_tool","resolution":"ESM","id":"1a96add9eb","hash":"1a96add9ebb76db2ebe81ac1e6eb79c6f6fa3ccc059df6a04b9cd1c4fbd66ea7","source":"\"use strict\";\nvar _a;\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.RestoreTool = exports.RestoreToolView = void 0;\nconst action_tool_1 = require(\"@bokehjs/models/tools/actions/action_tool\");\nconst column_data_source_1 = require(\"@bokehjs/models/sources/column_data_source\");\nconst icons_css_1 = require(\"@bokehjs/styles/icons.css\");\nclass RestoreToolView extends action_tool_1.ActionToolView {\n doit() {\n const sources = this.model.sources;\n for (const source of sources) {\n const new_data = source.buffer?.pop();\n if (new_data == null) {\n continue;\n }\n source.data = new_data;\n source.change.emit();\n source.properties.data.change.emit();\n }\n }\n}\nexports.RestoreToolView = RestoreToolView;\nRestoreToolView.__name__ = \"RestoreToolView\";\nclass RestoreTool extends action_tool_1.ActionTool {\n constructor(attrs) {\n super(attrs);\n this.tool_name = \"Restore\";\n this.tool_icon = icons_css_1.tool_icon_undo;\n }\n}\nexports.RestoreTool = RestoreTool;\n_a = RestoreTool;\nRestoreTool.__name__ = \"RestoreTool\";\nRestoreTool.__module__ = \"geoviews.models.custom_tools\";\n(() => {\n _a.prototype.default_view = RestoreToolView;\n _a.define(({ List, Ref }) => ({\n sources: [List(Ref(column_data_source_1.ColumnDataSource)), []],\n }));\n})();\n//# sourceMappingURL=restore_tool.js.map\n","type":"js","dependency_paths":[],"dependency_map":[],"exported":[{"type":"named","name":"RestoreToolView"},{"type":"named","name":"RestoreTool"}],"externals":[],"shims":[]},"code":{"source":"/* models/restore_tool.js */ function _(require, module, exports, __esModule, __esExport) {\n var _a;\n __esModule();\n const action_tool_1 = require(\"@bokehjs/models/tools/actions/action_tool\");\n const column_data_source_1 = require(\"@bokehjs/models/sources/column_data_source\");\n const icons_css_1 = require(\"@bokehjs/styles/icons.css\");\n class RestoreToolView extends action_tool_1.ActionToolView {\n doit() {\n const sources = this.model.sources;\n for (const source of sources) {\n const new_data = source.buffer?.pop();\n if (new_data == null) {\n continue;\n }\n source.data = new_data;\n source.change.emit();\n source.properties.data.change.emit();\n }\n }\n }\n exports.RestoreToolView = RestoreToolView;\n RestoreToolView.__name__ = \"RestoreToolView\";\n class RestoreTool extends action_tool_1.ActionTool {\n constructor(attrs) {\n super(attrs);\n this.tool_name = \"Restore\";\n this.tool_icon = icons_css_1.tool_icon_undo;\n }\n }\n exports.RestoreTool = RestoreTool;\n _a = RestoreTool;\n RestoreTool.__name__ = \"RestoreTool\";\n RestoreTool.__module__ = \"geoviews.models.custom_tools\";\n (() => {\n _a.prototype.default_view = RestoreToolView;\n _a.define(({ List, Ref }) => ({\n sources: [List(Ref(column_data_source_1.ColumnDataSource)), []],\n }));\n })();\n}\n","min_source":"function _(o,e,s,t,c){var n;t();const l=o(\"@bokehjs/models/tools/actions/action_tool\"),i=o(\"@bokehjs/models/sources/column_data_source\"),_=o(\"@bokehjs/styles/icons.css\");class a extends l.ActionToolView{doit(){const o=this.model.sources;for(const e of o){const o=e.buffer?.pop();null!=o&&(e.data=o,e.change.emit(),e.properties.data.change.emit())}}}s.RestoreToolView=a,a.__name__=\"RestoreToolView\";class r extends l.ActionTool{constructor(o){super(o),this.tool_name=\"Restore\",this.tool_icon=_.tool_icon_undo}}s.RestoreTool=r,n=r,r.__name__=\"RestoreTool\",r.__module__=\"geoviews.models.custom_tools\",n.prototype.default_view=a,n.define((({List:o,Ref:e})=>({sources:[o(e(i.ColumnDataSource)),[]]})))}\n//# sourceMappingURL=restore_tool.min.js.map","min_map":"{\"version\":3,\"file\":\"restore_tool.min.js\",\"names\":[\"_\",\"require\",\"module\",\"exports\",\"__esModule\",\"__esExport\",\"_a\",\"action_tool_1\",\"column_data_source_1\",\"icons_css_1\",\"RestoreToolView\",\"ActionToolView\",\"doit\",\"sources\",\"this\",\"model\",\"source\",\"new_data\",\"buffer\",\"pop\",\"data\",\"change\",\"emit\",\"properties\",\"__name__\",\"RestoreTool\",\"ActionTool\",\"constructor\",\"attrs\",\"super\",\"tool_name\",\"tool_icon\",\"tool_icon_undo\",\"__module__\",\"prototype\",\"default_view\",\"define\",\"List\",\"Ref\",\"ColumnDataSource\"],\"sources\":[\"0\"],\"mappings\":\"AAA6B,SAASA,EAAEC,EAASC,EAAQC,EAASC,EAAYC,GAC1E,IAAIC,EACJF,IACA,MAAMG,EAAgBN,EAAQ,6CACxBO,EAAuBP,EAAQ,8CAC/BQ,EAAcR,EAAQ,6BAC5B,MAAMS,UAAwBH,EAAcI,eACxC,IAAAC,GACI,MAAMC,EAAUC,KAAKC,MAAMF,QAC3B,IAAK,MAAMG,KAAUH,EAAS,CAC1B,MAAMI,EAAWD,EAAOE,QAAQC,MAChB,MAAZF,IAGJD,EAAOI,KAAOH,EACdD,EAAOK,OAAOC,OACdN,EAAOO,WAAWH,KAAKC,OAAOC,OAClC,CACJ,EAEJnB,EAAQO,gBAAkBA,EAC1BA,EAAgBc,SAAW,kBAC3B,MAAMC,UAAoBlB,EAAcmB,WACpC,WAAAC,CAAYC,GACRC,MAAMD,GACNd,KAAKgB,UAAY,UACjBhB,KAAKiB,UAAYtB,EAAYuB,cACjC,EAEJ7B,EAAQsB,YAAcA,EACtBnB,EAAKmB,EACLA,EAAYD,SAAW,cACvBC,EAAYQ,WAAa,+BAErB3B,EAAG4B,UAAUC,aAAezB,EAC5BJ,EAAG8B,QAAO,EAAGC,OAAMC,UAAU,CACzBzB,QAAS,CAACwB,EAAKC,EAAI9B,EAAqB+B,mBAAoB,OAGxE\",\"ignoreList\":[]}"}}]}
|
|
1
|
+
{"version":4,"artifacts":[{"module":{"file":"/home/runner/work/geoviews/geoviews/geoviews/dist/lib/index.js","base":"/home/runner/work/geoviews/geoviews/geoviews/dist/lib","base_path":"index.js","canonical":"index","resolution":"ESM","id":"c764d38756","hash":"c764d387562670624c9da140449548667d1588e6dd8d12da2fe04c18f1fadf6b","source":"\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.GeoViews = void 0;\nconst tslib_1 = require(\"tslib\");\nconst GeoViews = tslib_1.__importStar(require(\"./models\"));\nexports.GeoViews = GeoViews;\nconst base_1 = require(\"@bokehjs/base\");\n(0, base_1.register_models)(GeoViews);\n//# sourceMappingURL=index.js.map\n","type":"js","dependency_paths":[["./models","/home/runner/work/geoviews/geoviews/geoviews/dist/lib/models/index.js"]],"dependency_map":[],"exported":[],"externals":[],"shims":[]},"code":{"source":"/* index.js */ function _(require, module, exports, __esModule, __esExport) {\n __esModule();\n const tslib_1 = require(\"tslib\");\n const GeoViews = tslib_1.__importStar(require(\"2e3df39bba\") /* ./models */);\n exports.GeoViews = GeoViews;\n const base_1 = require(\"@bokehjs/base\");\n (0, base_1.register_models)(GeoViews);\n}\n","min_source":"function _(e,s,o,t,b){t();const i=e(\"tslib\").__importStar(e(\"2e3df39bba\"));o.GeoViews=i;(0,e(\"@bokehjs/base\").register_models)(i)}\n//# sourceMappingURL=index.min.js.map","min_map":"{\"version\":3,\"file\":\"index.min.js\",\"names\":[\"_\",\"require\",\"module\",\"exports\",\"__esModule\",\"__esExport\",\"GeoViews\",\"__importStar\",\"register_models\"],\"sources\":[\"0\"],\"mappings\":\"AAAe,SAASA,EAAEC,EAASC,EAAQC,EAASC,EAAYC,GAC5DD,IACA,MACME,EADUL,EAAQ,SACCM,aAAaN,EAAQ,eAC9CE,EAAQG,SAAWA,GAEnB,EADeL,EAAQ,iBACZO,iBAAiBF,EAChC\",\"ignoreList\":[]}"}},{"module":{"file":"/home/runner/work/geoviews/geoviews/geoviews/dist/lib/models/index.js","base":"/home/runner/work/geoviews/geoviews/geoviews/dist/lib","base_path":"models/index.js","canonical":"models/index","resolution":"ESM","id":"2e3df39bba","hash":"2e3df39bba7c3d4353bcf4dc2478f3dccd3cfea307ecf4b8d5f60e25149a8fdb","source":"\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.WindBarb = exports.RestoreTool = exports.PolyVertexEditTool = exports.PolyVertexDrawTool = exports.ClearTool = exports.CheckpointTool = void 0;\nvar checkpoint_tool_1 = require(\"./checkpoint_tool\");\nObject.defineProperty(exports, \"CheckpointTool\", { enumerable: true, get: function () { return checkpoint_tool_1.CheckpointTool; } });\nvar clear_tool_1 = require(\"./clear_tool\");\nObject.defineProperty(exports, \"ClearTool\", { enumerable: true, get: function () { return clear_tool_1.ClearTool; } });\nvar poly_draw_1 = require(\"./poly_draw\");\nObject.defineProperty(exports, \"PolyVertexDrawTool\", { enumerable: true, get: function () { return poly_draw_1.PolyVertexDrawTool; } });\nvar poly_edit_1 = require(\"./poly_edit\");\nObject.defineProperty(exports, \"PolyVertexEditTool\", { enumerable: true, get: function () { return poly_edit_1.PolyVertexEditTool; } });\nvar restore_tool_1 = require(\"./restore_tool\");\nObject.defineProperty(exports, \"RestoreTool\", { enumerable: true, get: function () { return restore_tool_1.RestoreTool; } });\nvar wind_barb_1 = require(\"./wind_barb\");\nObject.defineProperty(exports, \"WindBarb\", { enumerable: true, get: function () { return wind_barb_1.WindBarb; } });\n//# sourceMappingURL=index.js.map\n","type":"js","dependency_paths":[["./checkpoint_tool","/home/runner/work/geoviews/geoviews/geoviews/dist/lib/models/checkpoint_tool.js"],["./clear_tool","/home/runner/work/geoviews/geoviews/geoviews/dist/lib/models/clear_tool.js"],["./poly_draw","/home/runner/work/geoviews/geoviews/geoviews/dist/lib/models/poly_draw.js"],["./poly_edit","/home/runner/work/geoviews/geoviews/geoviews/dist/lib/models/poly_edit.js"],["./restore_tool","/home/runner/work/geoviews/geoviews/geoviews/dist/lib/models/restore_tool.js"],["./wind_barb","/home/runner/work/geoviews/geoviews/geoviews/dist/lib/models/wind_barb.js"]],"dependency_map":[],"exported":[{"type":"bindings","bindings":[[null,"CheckpointTool"]],"module":"./checkpoint_tool"},{"type":"bindings","bindings":[[null,"ClearTool"]],"module":"./clear_tool"},{"type":"bindings","bindings":[[null,"PolyVertexDrawTool"]],"module":"./poly_draw"},{"type":"bindings","bindings":[[null,"PolyVertexEditTool"]],"module":"./poly_edit"},{"type":"bindings","bindings":[[null,"RestoreTool"]],"module":"./restore_tool"},{"type":"bindings","bindings":[[null,"WindBarb"]],"module":"./wind_barb"}],"externals":[],"shims":[]},"code":{"source":"/* models/index.js */ function _(require, module, exports, __esModule, __esExport) {\n __esModule();\n var checkpoint_tool_1 = require(\"49636d3eef\") /* ./checkpoint_tool */;\n __esExport(\"CheckpointTool\", checkpoint_tool_1.CheckpointTool);\n var clear_tool_1 = require(\"356402dee7\") /* ./clear_tool */;\n __esExport(\"ClearTool\", clear_tool_1.ClearTool);\n var poly_draw_1 = require(\"c03d81e6d5\") /* ./poly_draw */;\n __esExport(\"PolyVertexDrawTool\", poly_draw_1.PolyVertexDrawTool);\n var poly_edit_1 = require(\"238deef1f5\") /* ./poly_edit */;\n __esExport(\"PolyVertexEditTool\", poly_edit_1.PolyVertexEditTool);\n var restore_tool_1 = require(\"1a96add9eb\") /* ./restore_tool */;\n __esExport(\"RestoreTool\", restore_tool_1.RestoreTool);\n var wind_barb_1 = require(\"028985dc77\") /* ./wind_barb */;\n __esExport(\"WindBarb\", wind_barb_1.WindBarb);\n}\n","min_source":"function _(o,e,l,d,r){d(),r(\"CheckpointTool\",o(\"49636d3eef\").CheckpointTool),r(\"ClearTool\",o(\"356402dee7\").ClearTool),r(\"PolyVertexDrawTool\",o(\"c03d81e6d5\").PolyVertexDrawTool),r(\"PolyVertexEditTool\",o(\"238deef1f5\").PolyVertexEditTool),r(\"RestoreTool\",o(\"1a96add9eb\").RestoreTool),r(\"WindBarb\",o(\"028985dc77\").WindBarb)}\n//# sourceMappingURL=index.min.js.map","min_map":"{\"version\":3,\"file\":\"index.min.js\",\"names\":[\"_\",\"require\",\"module\",\"exports\",\"__esModule\",\"__esExport\",\"CheckpointTool\",\"ClearTool\",\"PolyVertexDrawTool\",\"PolyVertexEditTool\",\"RestoreTool\",\"WindBarb\"],\"sources\":[\"0\"],\"mappings\":\"AAAsB,SAASA,EAAEC,EAASC,EAAQC,EAASC,EAAYC,GACnED,IAEAC,EAAW,iBADaJ,EAAQ,cACeK,gBAE/CD,EAAW,YADQJ,EAAQ,cACUM,WAErCF,EAAW,qBADOJ,EAAQ,cACmBO,oBAE7CH,EAAW,qBADOJ,EAAQ,cACmBQ,oBAE7CJ,EAAW,cADUJ,EAAQ,cACYS,aAEzCL,EAAW,WADOJ,EAAQ,cACSU,SACvC\",\"ignoreList\":[]}"}},{"module":{"file":"/home/runner/work/geoviews/geoviews/geoviews/dist/lib/models/checkpoint_tool.js","base":"/home/runner/work/geoviews/geoviews/geoviews/dist/lib","base_path":"models/checkpoint_tool.js","canonical":"models/checkpoint_tool","resolution":"ESM","id":"49636d3eef","hash":"49636d3eef126a1582e9f4ddc918cc5880bce09ee9d3a8b91ca8e1e0df56ec2a","source":"\"use strict\";\nvar _a;\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.CheckpointTool = exports.CheckpointToolView = void 0;\nconst object_1 = require(\"@bokehjs/core/util/object\");\nconst array_1 = require(\"@bokehjs/core/util/array\");\nconst action_tool_1 = require(\"@bokehjs/models/tools/actions/action_tool\");\nconst column_data_source_1 = require(\"@bokehjs/models/sources/column_data_source\");\nconst icons_css_1 = require(\"@bokehjs/styles/icons.css\");\nclass CheckpointToolView extends action_tool_1.ActionToolView {\n doit() {\n const sources = this.model.sources;\n for (const source of sources) {\n if (source.buffer == null) {\n source.buffer = [];\n }\n const data_copy = {};\n for (const [key, column] of (0, object_1.entries)(source.data)) {\n const new_column = [];\n for (const arr of column) {\n if (Array.isArray(arr) || ArrayBuffer.isView(arr)) {\n new_column.push((0, array_1.copy)(arr));\n }\n else {\n new_column.push(arr);\n }\n }\n data_copy[key] = new_column;\n }\n source.buffer.push(data_copy);\n }\n }\n}\nexports.CheckpointToolView = CheckpointToolView;\nCheckpointToolView.__name__ = \"CheckpointToolView\";\nclass CheckpointTool extends action_tool_1.ActionTool {\n constructor(attrs) {\n super(attrs);\n this.tool_name = \"Checkpoint\";\n this.tool_icon = icons_css_1.tool_icon_save;\n }\n}\nexports.CheckpointTool = CheckpointTool;\n_a = CheckpointTool;\nCheckpointTool.__name__ = \"CheckpointTool\";\nCheckpointTool.__module__ = \"geoviews.models.custom_tools\";\n(() => {\n _a.prototype.default_view = CheckpointToolView;\n _a.define(({ List, Ref }) => ({\n sources: [List(Ref(column_data_source_1.ColumnDataSource)), []],\n }));\n})();\n//# sourceMappingURL=checkpoint_tool.js.map\n","type":"js","dependency_paths":[],"dependency_map":[],"exported":[{"type":"named","name":"CheckpointToolView"},{"type":"named","name":"CheckpointTool"}],"externals":[],"shims":[]},"code":{"source":"/* models/checkpoint_tool.js */ function _(require, module, exports, __esModule, __esExport) {\n var _a;\n __esModule();\n const object_1 = require(\"@bokehjs/core/util/object\");\n const array_1 = require(\"@bokehjs/core/util/array\");\n const action_tool_1 = require(\"@bokehjs/models/tools/actions/action_tool\");\n const column_data_source_1 = require(\"@bokehjs/models/sources/column_data_source\");\n const icons_css_1 = require(\"@bokehjs/styles/icons.css\");\n class CheckpointToolView extends action_tool_1.ActionToolView {\n doit() {\n const sources = this.model.sources;\n for (const source of sources) {\n if (source.buffer == null) {\n source.buffer = [];\n }\n const data_copy = {};\n for (const [key, column] of (0, object_1.entries)(source.data)) {\n const new_column = [];\n for (const arr of column) {\n if (Array.isArray(arr) || ArrayBuffer.isView(arr)) {\n new_column.push((0, array_1.copy)(arr));\n }\n else {\n new_column.push(arr);\n }\n }\n data_copy[key] = new_column;\n }\n source.buffer.push(data_copy);\n }\n }\n }\n exports.CheckpointToolView = CheckpointToolView;\n CheckpointToolView.__name__ = \"CheckpointToolView\";\n class CheckpointTool extends action_tool_1.ActionTool {\n constructor(attrs) {\n super(attrs);\n this.tool_name = \"Checkpoint\";\n this.tool_icon = icons_css_1.tool_icon_save;\n }\n }\n exports.CheckpointTool = CheckpointTool;\n _a = CheckpointTool;\n CheckpointTool.__name__ = \"CheckpointTool\";\n CheckpointTool.__module__ = \"geoviews.models.custom_tools\";\n (() => {\n _a.prototype.default_view = CheckpointToolView;\n _a.define(({ List, Ref }) => ({\n sources: [List(Ref(column_data_source_1.ColumnDataSource)), []],\n }));\n })();\n}\n","min_source":"function _(o,e,s,t,c){var n;t();const i=o(\"@bokehjs/core/util/object\"),r=o(\"@bokehjs/core/util/array\"),l=o(\"@bokehjs/models/tools/actions/action_tool\"),u=o(\"@bokehjs/models/sources/column_data_source\"),_=o(\"@bokehjs/styles/icons.css\");class a extends l.ActionToolView{doit(){const o=this.model.sources;for(const e of o){null==e.buffer&&(e.buffer=[]);const o={};for(const[s,t]of(0,i.entries)(e.data)){const e=[];for(const o of t)Array.isArray(o)||ArrayBuffer.isView(o)?e.push((0,r.copy)(o)):e.push(o);o[s]=e}e.buffer.push(o)}}}s.CheckpointToolView=a,a.__name__=\"CheckpointToolView\";class f extends l.ActionTool{constructor(o){super(o),this.tool_name=\"Checkpoint\",this.tool_icon=_.tool_icon_save}}s.CheckpointTool=f,n=f,f.__name__=\"CheckpointTool\",f.__module__=\"geoviews.models.custom_tools\",n.prototype.default_view=a,n.define((({List:o,Ref:e})=>({sources:[o(e(u.ColumnDataSource)),[]]})))}\n//# sourceMappingURL=checkpoint_tool.min.js.map","min_map":"{\"version\":3,\"file\":\"checkpoint_tool.min.js\",\"names\":[\"_\",\"require\",\"module\",\"exports\",\"__esModule\",\"__esExport\",\"_a\",\"object_1\",\"array_1\",\"action_tool_1\",\"column_data_source_1\",\"icons_css_1\",\"CheckpointToolView\",\"ActionToolView\",\"doit\",\"sources\",\"this\",\"model\",\"source\",\"buffer\",\"data_copy\",\"key\",\"column\",\"entries\",\"data\",\"new_column\",\"arr\",\"Array\",\"isArray\",\"ArrayBuffer\",\"isView\",\"push\",\"copy\",\"__name__\",\"CheckpointTool\",\"ActionTool\",\"constructor\",\"attrs\",\"super\",\"tool_name\",\"tool_icon\",\"tool_icon_save\",\"__module__\",\"prototype\",\"default_view\",\"define\",\"List\",\"Ref\",\"ColumnDataSource\"],\"sources\":[\"0\"],\"mappings\":\"AAAgC,SAASA,EAAEC,EAASC,EAAQC,EAASC,EAAYC,GAC7E,IAAIC,EACJF,IACA,MAAMG,EAAWN,EAAQ,6BACnBO,EAAUP,EAAQ,4BAClBQ,EAAgBR,EAAQ,6CACxBS,EAAuBT,EAAQ,8CAC/BU,EAAcV,EAAQ,6BAC5B,MAAMW,UAA2BH,EAAcI,eAC3C,IAAAC,GACI,MAAMC,EAAUC,KAAKC,MAAMF,QAC3B,IAAK,MAAMG,KAAUH,EAAS,CACL,MAAjBG,EAAOC,SACPD,EAAOC,OAAS,IAEpB,MAAMC,EAAY,CAAC,EACnB,IAAK,MAAOC,EAAKC,KAAW,EAAIf,EAASgB,SAASL,EAAOM,MAAO,CAC5D,MAAMC,EAAa,GACnB,IAAK,MAAMC,KAAOJ,EACVK,MAAMC,QAAQF,IAAQG,YAAYC,OAAOJ,GACzCD,EAAWM,MAAK,EAAIvB,EAAQwB,MAAMN,IAGlCD,EAAWM,KAAKL,GAGxBN,EAAUC,GAAOI,CACrB,CACAP,EAAOC,OAAOY,KAAKX,EACvB,CACJ,EAEJjB,EAAQS,mBAAqBA,EAC7BA,EAAmBqB,SAAW,qBAC9B,MAAMC,UAAuBzB,EAAc0B,WACvC,WAAAC,CAAYC,GACRC,MAAMD,GACNrB,KAAKuB,UAAY,aACjBvB,KAAKwB,UAAY7B,EAAY8B,cACjC,EAEJtC,EAAQ+B,eAAiBA,EACzB5B,EAAK4B,EACLA,EAAeD,SAAW,iBAC1BC,EAAeQ,WAAa,+BAExBpC,EAAGqC,UAAUC,aAAehC,EAC5BN,EAAGuC,QAAO,EAAGC,OAAMC,UAAU,CACzBhC,QAAS,CAAC+B,EAAKC,EAAIrC,EAAqBsC,mBAAoB,OAGxE\",\"ignoreList\":[]}"}},{"module":{"file":"/home/runner/work/geoviews/geoviews/geoviews/dist/lib/models/clear_tool.js","base":"/home/runner/work/geoviews/geoviews/geoviews/dist/lib","base_path":"models/clear_tool.js","canonical":"models/clear_tool","resolution":"ESM","id":"356402dee7","hash":"356402dee73a0a3cae7eee79cb5a74a74906a381397ff772675a6a6bf7f27412","source":"\"use strict\";\nvar _a;\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ClearTool = exports.ClearToolView = void 0;\nconst action_tool_1 = require(\"@bokehjs/models/tools/actions/action_tool\");\nconst column_data_source_1 = require(\"@bokehjs/models/sources/column_data_source\");\nconst icons_css_1 = require(\"@bokehjs/styles/icons.css\");\nclass ClearToolView extends action_tool_1.ActionToolView {\n doit() {\n for (const source of this.model.sources) {\n source.clear();\n }\n }\n}\nexports.ClearToolView = ClearToolView;\nClearToolView.__name__ = \"ClearToolView\";\nclass ClearTool extends action_tool_1.ActionTool {\n constructor(attrs) {\n super(attrs);\n this.tool_name = \"Clear data\";\n this.tool_icon = icons_css_1.tool_icon_reset;\n }\n}\nexports.ClearTool = ClearTool;\n_a = ClearTool;\nClearTool.__name__ = \"ClearTool\";\nClearTool.__module__ = \"geoviews.models.custom_tools\";\n(() => {\n _a.prototype.default_view = ClearToolView;\n _a.define(({ List, Ref }) => ({\n sources: [List(Ref(column_data_source_1.ColumnDataSource)), []],\n }));\n})();\n//# sourceMappingURL=clear_tool.js.map\n","type":"js","dependency_paths":[],"dependency_map":[],"exported":[{"type":"named","name":"ClearToolView"},{"type":"named","name":"ClearTool"}],"externals":[],"shims":[]},"code":{"source":"/* models/clear_tool.js */ function _(require, module, exports, __esModule, __esExport) {\n var _a;\n __esModule();\n const action_tool_1 = require(\"@bokehjs/models/tools/actions/action_tool\");\n const column_data_source_1 = require(\"@bokehjs/models/sources/column_data_source\");\n const icons_css_1 = require(\"@bokehjs/styles/icons.css\");\n class ClearToolView extends action_tool_1.ActionToolView {\n doit() {\n for (const source of this.model.sources) {\n source.clear();\n }\n }\n }\n exports.ClearToolView = ClearToolView;\n ClearToolView.__name__ = \"ClearToolView\";\n class ClearTool extends action_tool_1.ActionTool {\n constructor(attrs) {\n super(attrs);\n this.tool_name = \"Clear data\";\n this.tool_icon = icons_css_1.tool_icon_reset;\n }\n }\n exports.ClearTool = ClearTool;\n _a = ClearTool;\n ClearTool.__name__ = \"ClearTool\";\n ClearTool.__module__ = \"geoviews.models.custom_tools\";\n (() => {\n _a.prototype.default_view = ClearToolView;\n _a.define(({ List, Ref }) => ({\n sources: [List(Ref(column_data_source_1.ColumnDataSource)), []],\n }));\n })();\n}\n","min_source":"function _(o,e,s,t,l){var c;t();const _=o(\"@bokehjs/models/tools/actions/action_tool\"),a=o(\"@bokehjs/models/sources/column_data_source\"),n=o(\"@bokehjs/styles/icons.css\");class i extends _.ActionToolView{doit(){for(const o of this.model.sources)o.clear()}}s.ClearToolView=i,i.__name__=\"ClearToolView\";class r extends _.ActionTool{constructor(o){super(o),this.tool_name=\"Clear data\",this.tool_icon=n.tool_icon_reset}}s.ClearTool=r,c=r,r.__name__=\"ClearTool\",r.__module__=\"geoviews.models.custom_tools\",c.prototype.default_view=i,c.define((({List:o,Ref:e})=>({sources:[o(e(a.ColumnDataSource)),[]]})))}\n//# sourceMappingURL=clear_tool.min.js.map","min_map":"{\"version\":3,\"file\":\"clear_tool.min.js\",\"names\":[\"_\",\"require\",\"module\",\"exports\",\"__esModule\",\"__esExport\",\"_a\",\"action_tool_1\",\"column_data_source_1\",\"icons_css_1\",\"ClearToolView\",\"ActionToolView\",\"doit\",\"source\",\"this\",\"model\",\"sources\",\"clear\",\"__name__\",\"ClearTool\",\"ActionTool\",\"constructor\",\"attrs\",\"super\",\"tool_name\",\"tool_icon\",\"tool_icon_reset\",\"__module__\",\"prototype\",\"default_view\",\"define\",\"List\",\"Ref\",\"ColumnDataSource\"],\"sources\":[\"0\"],\"mappings\":\"AAA2B,SAASA,EAAEC,EAASC,EAAQC,EAASC,EAAYC,GACxE,IAAIC,EACJF,IACA,MAAMG,EAAgBN,EAAQ,6CACxBO,EAAuBP,EAAQ,8CAC/BQ,EAAcR,EAAQ,6BAC5B,MAAMS,UAAsBH,EAAcI,eACtC,IAAAC,GACI,IAAK,MAAMC,KAAUC,KAAKC,MAAMC,QAC5BH,EAAOI,OAEf,EAEJd,EAAQO,cAAgBA,EACxBA,EAAcQ,SAAW,gBACzB,MAAMC,UAAkBZ,EAAca,WAClC,WAAAC,CAAYC,GACRC,MAAMD,GACNR,KAAKU,UAAY,aACjBV,KAAKW,UAAYhB,EAAYiB,eACjC,EAEJvB,EAAQgB,UAAYA,EACpBb,EAAKa,EACLA,EAAUD,SAAW,YACrBC,EAAUQ,WAAa,+BAEnBrB,EAAGsB,UAAUC,aAAenB,EAC5BJ,EAAGwB,QAAO,EAAGC,OAAMC,UAAU,CACzBhB,QAAS,CAACe,EAAKC,EAAIxB,EAAqByB,mBAAoB,OAGxE\",\"ignoreList\":[]}"}},{"module":{"file":"/home/runner/work/geoviews/geoviews/geoviews/dist/lib/models/poly_draw.js","base":"/home/runner/work/geoviews/geoviews/geoviews/dist/lib","base_path":"models/poly_draw.js","canonical":"models/poly_draw","resolution":"ESM","id":"c03d81e6d5","hash":"c03d81e6d5ff9c73a8c71b5ba3f2a86bfaf7ff4d529fcd797cc70e1d5dc10a7c","source":"\"use strict\";\nvar _a;\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.PolyVertexDrawTool = exports.PolyVertexDrawToolView = void 0;\nconst vectorization_1 = require(\"@bokehjs/core/vectorization\");\nconst object_1 = require(\"@bokehjs/core/util/object\");\nconst types_1 = require(\"@bokehjs/core/util/types\");\nconst assert_1 = require(\"@bokehjs/core/util/assert\");\nconst poly_draw_tool_1 = require(\"@bokehjs/models/tools/edit/poly_draw_tool\");\nclass PolyVertexDrawToolView extends poly_draw_tool_1.PolyDrawToolView {\n _split_path(x, y) {\n for (const renderer of this.model.renderers) {\n const glyph = renderer.glyph;\n const cds = renderer.data_source;\n const [xkey, ykey] = [glyph.xs.field, glyph.ys.field];\n const xpaths = cds.data[xkey];\n const ypaths = cds.data[ykey];\n for (let index = 0; index < xpaths.length; index++) {\n let xs = xpaths[index];\n if (!(0, types_1.isArray)(xs)) {\n xs = Array.from(xs);\n cds.data[xkey][index] = xs;\n }\n let ys = ypaths[index];\n if (!(0, types_1.isArray)(ys)) {\n ys = Array.from(ys);\n cds.data[ykey][index] = ys;\n }\n for (let i = 0; i < xs.length; i++) {\n if ((xs[i] == x) && (ys[i] == y) && (i != 0) && (i != (xs.length - 1))) {\n xpaths.splice(index + 1, 0, xs.slice(i));\n ypaths.splice(index + 1, 0, ys.slice(i));\n xs.splice(i + 1);\n ys.splice(i + 1);\n for (const column of cds.columns()) {\n if ((column !== xkey) && (column != ykey)) {\n cds.data[column].splice(index + 1, 0, cds.data[column][index]);\n }\n }\n return;\n }\n }\n }\n }\n }\n _snap_to_vertex(ev, x, y) {\n const { vertex_renderer } = this.model;\n if (vertex_renderer != null) {\n // If an existing vertex is hit snap to it\n const vertex_selected = this._select_event(ev, \"replace\", [vertex_renderer]);\n const point_ds = vertex_renderer.data_source;\n // Type once dataspecs are typed\n const point_glyph = vertex_renderer.glyph;\n const [pxkey, pykey] = [point_glyph.x.field, point_glyph.y.field];\n if (vertex_selected.length > 0) {\n // If existing vertex is hit split path at that location\n // converting to feature vertex\n const index = point_ds.selected.indices[0];\n if (pxkey) {\n x = point_ds.get(pxkey)[index];\n }\n if (pykey) {\n y = point_ds.get(pykey)[index];\n }\n if (ev.type != \"move\") {\n this._split_path(x, y);\n }\n point_ds.selection_manager.clear();\n }\n }\n return [x, y];\n }\n _set_vertices(xs, ys, styles) {\n const { vertex_renderer } = this.model;\n if (vertex_renderer == null) {\n return;\n }\n const point_glyph = vertex_renderer.glyph;\n const point_cds = vertex_renderer.data_source;\n const [pxkey, pykey] = [point_glyph.x.field, point_glyph.y.field];\n if (pxkey) {\n if ((0, types_1.isArray)(xs)) {\n point_cds.set(pxkey, xs);\n }\n else {\n point_glyph.x = { value: xs };\n }\n }\n if (pykey) {\n if ((0, types_1.isArray)(ys)) {\n point_cds.set(pykey, ys);\n }\n else {\n point_glyph.y = { value: ys };\n }\n }\n if (styles != null) {\n for (const key of (0, object_1.keys)(styles)) {\n point_cds.set(key, styles[key]);\n point_glyph[key] = { field: key };\n }\n }\n else {\n for (const col of point_cds.columns()) {\n point_cds.set(col, []);\n }\n }\n this._emit_cds_changes(point_cds, true, true, false);\n }\n _show_vertices() {\n if (!this.model.active) {\n return;\n }\n const { renderers, node_style, end_style } = this.model;\n const xs = [];\n const ys = [];\n const styles = {};\n for (const key of (0, object_1.keys)(end_style)) {\n styles[key] = [];\n }\n for (let i = 0; i < renderers.length; i++) {\n const renderer = renderers[i];\n const cds = renderer.data_source;\n const glyph = renderer.glyph;\n const [xkey, ykey] = [glyph.xs.field, glyph.ys.field];\n for (const array of cds.get_array(xkey)) {\n (0, assert_1.assert)((0, types_1.isArray)(array));\n xs.push(...array);\n for (const [key, val] of (0, object_1.entries)(end_style)) {\n styles[key].push(val);\n }\n for (const [key, val] of (0, object_1.entries)(node_style)) {\n for (let index = 0; index < array.length - 2; index++) {\n styles[key].push(val);\n }\n }\n for (const [key, val] of (0, object_1.entries)(end_style)) {\n styles[key].push(val);\n }\n }\n for (const array of cds.get_array(ykey)) {\n (0, assert_1.assert)((0, types_1.isArray)(array));\n ys.push(...array);\n }\n if (this._drawing && i == renderers.length - 1) {\n // Skip currently drawn vertex\n xs.splice(xs.length - 1, 1);\n ys.splice(ys.length - 1, 1);\n for (const [_, array] of (0, object_1.entries)(styles)) {\n array.splice(array.length - 1, 1);\n }\n }\n }\n this._set_vertices(xs, ys, styles);\n }\n _remove() {\n const renderer = this.model.renderers[0];\n const cds = renderer.data_source;\n const glyph = renderer.glyph;\n if ((0, vectorization_1.isField)(glyph.xs)) {\n const xkey = glyph.xs.field;\n const array = cds.get_array(xkey);\n const xidx = array.length - 1;\n const xs = array[xidx];\n xs.splice(xs.length - 1, 1);\n if (xs.length == 1) {\n array.splice(xidx, 1);\n }\n }\n if ((0, vectorization_1.isField)(glyph.ys)) {\n const ykey = glyph.ys.field;\n const array = cds.get_array(ykey);\n const yidx = array.length - 1;\n const ys = array[yidx];\n ys.splice(ys.length - 1, 1);\n if (ys.length == 1) {\n array.splice(yidx, 1);\n }\n }\n this._emit_cds_changes(cds);\n this._drawing = false;\n this._show_vertices();\n }\n}\nexports.PolyVertexDrawToolView = PolyVertexDrawToolView;\nPolyVertexDrawToolView.__name__ = \"PolyVertexDrawToolView\";\nclass PolyVertexDrawTool extends poly_draw_tool_1.PolyDrawTool {\n constructor(attrs) {\n super(attrs);\n }\n}\nexports.PolyVertexDrawTool = PolyVertexDrawTool;\n_a = PolyVertexDrawTool;\nPolyVertexDrawTool.__name__ = \"PolyVertexDrawTool\";\nPolyVertexDrawTool.__module__ = \"geoviews.models.custom_tools\";\n(() => {\n _a.prototype.default_view = PolyVertexDrawToolView;\n _a.define(({ Dict, Unknown }) => ({\n end_style: [Dict(Unknown), {}],\n node_style: [Dict(Unknown), {}],\n }));\n})();\n//# sourceMappingURL=poly_draw.js.map\n","type":"js","dependency_paths":[],"dependency_map":[],"exported":[{"type":"named","name":"PolyVertexDrawToolView"},{"type":"named","name":"PolyVertexDrawTool"}],"externals":[],"shims":[]},"code":{"source":"/* models/poly_draw.js */ function _(require, module, exports, __esModule, __esExport) {\n var _a;\n __esModule();\n const vectorization_1 = require(\"@bokehjs/core/vectorization\");\n const object_1 = require(\"@bokehjs/core/util/object\");\n const types_1 = require(\"@bokehjs/core/util/types\");\n const assert_1 = require(\"@bokehjs/core/util/assert\");\n const poly_draw_tool_1 = require(\"@bokehjs/models/tools/edit/poly_draw_tool\");\n class PolyVertexDrawToolView extends poly_draw_tool_1.PolyDrawToolView {\n _split_path(x, y) {\n for (const renderer of this.model.renderers) {\n const glyph = renderer.glyph;\n const cds = renderer.data_source;\n const [xkey, ykey] = [glyph.xs.field, glyph.ys.field];\n const xpaths = cds.data[xkey];\n const ypaths = cds.data[ykey];\n for (let index = 0; index < xpaths.length; index++) {\n let xs = xpaths[index];\n if (!(0, types_1.isArray)(xs)) {\n xs = Array.from(xs);\n cds.data[xkey][index] = xs;\n }\n let ys = ypaths[index];\n if (!(0, types_1.isArray)(ys)) {\n ys = Array.from(ys);\n cds.data[ykey][index] = ys;\n }\n for (let i = 0; i < xs.length; i++) {\n if ((xs[i] == x) && (ys[i] == y) && (i != 0) && (i != (xs.length - 1))) {\n xpaths.splice(index + 1, 0, xs.slice(i));\n ypaths.splice(index + 1, 0, ys.slice(i));\n xs.splice(i + 1);\n ys.splice(i + 1);\n for (const column of cds.columns()) {\n if ((column !== xkey) && (column != ykey)) {\n cds.data[column].splice(index + 1, 0, cds.data[column][index]);\n }\n }\n return;\n }\n }\n }\n }\n }\n _snap_to_vertex(ev, x, y) {\n const { vertex_renderer } = this.model;\n if (vertex_renderer != null) {\n // If an existing vertex is hit snap to it\n const vertex_selected = this._select_event(ev, \"replace\", [vertex_renderer]);\n const point_ds = vertex_renderer.data_source;\n // Type once dataspecs are typed\n const point_glyph = vertex_renderer.glyph;\n const [pxkey, pykey] = [point_glyph.x.field, point_glyph.y.field];\n if (vertex_selected.length > 0) {\n // If existing vertex is hit split path at that location\n // converting to feature vertex\n const index = point_ds.selected.indices[0];\n if (pxkey) {\n x = point_ds.get(pxkey)[index];\n }\n if (pykey) {\n y = point_ds.get(pykey)[index];\n }\n if (ev.type != \"move\") {\n this._split_path(x, y);\n }\n point_ds.selection_manager.clear();\n }\n }\n return [x, y];\n }\n _set_vertices(xs, ys, styles) {\n const { vertex_renderer } = this.model;\n if (vertex_renderer == null) {\n return;\n }\n const point_glyph = vertex_renderer.glyph;\n const point_cds = vertex_renderer.data_source;\n const [pxkey, pykey] = [point_glyph.x.field, point_glyph.y.field];\n if (pxkey) {\n if ((0, types_1.isArray)(xs)) {\n point_cds.set(pxkey, xs);\n }\n else {\n point_glyph.x = { value: xs };\n }\n }\n if (pykey) {\n if ((0, types_1.isArray)(ys)) {\n point_cds.set(pykey, ys);\n }\n else {\n point_glyph.y = { value: ys };\n }\n }\n if (styles != null) {\n for (const key of (0, object_1.keys)(styles)) {\n point_cds.set(key, styles[key]);\n point_glyph[key] = { field: key };\n }\n }\n else {\n for (const col of point_cds.columns()) {\n point_cds.set(col, []);\n }\n }\n this._emit_cds_changes(point_cds, true, true, false);\n }\n _show_vertices() {\n if (!this.model.active) {\n return;\n }\n const { renderers, node_style, end_style } = this.model;\n const xs = [];\n const ys = [];\n const styles = {};\n for (const key of (0, object_1.keys)(end_style)) {\n styles[key] = [];\n }\n for (let i = 0; i < renderers.length; i++) {\n const renderer = renderers[i];\n const cds = renderer.data_source;\n const glyph = renderer.glyph;\n const [xkey, ykey] = [glyph.xs.field, glyph.ys.field];\n for (const array of cds.get_array(xkey)) {\n (0, assert_1.assert)((0, types_1.isArray)(array));\n xs.push(...array);\n for (const [key, val] of (0, object_1.entries)(end_style)) {\n styles[key].push(val);\n }\n for (const [key, val] of (0, object_1.entries)(node_style)) {\n for (let index = 0; index < array.length - 2; index++) {\n styles[key].push(val);\n }\n }\n for (const [key, val] of (0, object_1.entries)(end_style)) {\n styles[key].push(val);\n }\n }\n for (const array of cds.get_array(ykey)) {\n (0, assert_1.assert)((0, types_1.isArray)(array));\n ys.push(...array);\n }\n if (this._drawing && i == renderers.length - 1) {\n // Skip currently drawn vertex\n xs.splice(xs.length - 1, 1);\n ys.splice(ys.length - 1, 1);\n for (const [_, array] of (0, object_1.entries)(styles)) {\n array.splice(array.length - 1, 1);\n }\n }\n }\n this._set_vertices(xs, ys, styles);\n }\n _remove() {\n const renderer = this.model.renderers[0];\n const cds = renderer.data_source;\n const glyph = renderer.glyph;\n if ((0, vectorization_1.isField)(glyph.xs)) {\n const xkey = glyph.xs.field;\n const array = cds.get_array(xkey);\n const xidx = array.length - 1;\n const xs = array[xidx];\n xs.splice(xs.length - 1, 1);\n if (xs.length == 1) {\n array.splice(xidx, 1);\n }\n }\n if ((0, vectorization_1.isField)(glyph.ys)) {\n const ykey = glyph.ys.field;\n const array = cds.get_array(ykey);\n const yidx = array.length - 1;\n const ys = array[yidx];\n ys.splice(ys.length - 1, 1);\n if (ys.length == 1) {\n array.splice(yidx, 1);\n }\n }\n this._emit_cds_changes(cds);\n this._drawing = false;\n this._show_vertices();\n }\n }\n exports.PolyVertexDrawToolView = PolyVertexDrawToolView;\n PolyVertexDrawToolView.__name__ = \"PolyVertexDrawToolView\";\n class PolyVertexDrawTool extends poly_draw_tool_1.PolyDrawTool {\n constructor(attrs) {\n super(attrs);\n }\n }\n exports.PolyVertexDrawTool = PolyVertexDrawTool;\n _a = PolyVertexDrawTool;\n PolyVertexDrawTool.__name__ = \"PolyVertexDrawTool\";\n PolyVertexDrawTool.__module__ = \"geoviews.models.custom_tools\";\n (() => {\n _a.prototype.default_view = PolyVertexDrawToolView;\n _a.define(({ Dict, Unknown }) => ({\n end_style: [Dict(Unknown), {}],\n node_style: [Dict(Unknown), {}],\n }));\n })();\n}\n","min_source":"function _(e,s,t,o,r){var l;o();const i=e(\"@bokehjs/core/vectorization\"),n=e(\"@bokehjs/core/util/object\"),c=e(\"@bokehjs/core/util/types\"),a=e(\"@bokehjs/core/util/assert\"),_=e(\"@bokehjs/models/tools/edit/poly_draw_tool\");class d extends _.PolyDrawToolView{_split_path(e,s){for(const t of this.model.renderers){const o=t.glyph,r=t.data_source,[l,i]=[o.xs.field,o.ys.field],n=r.data[l],a=r.data[i];for(let t=0;t<n.length;t++){let o=n[t];(0,c.isArray)(o)||(o=Array.from(o),r.data[l][t]=o);let _=a[t];(0,c.isArray)(_)||(_=Array.from(_),r.data[i][t]=_);for(let c=0;c<o.length;c++)if(o[c]==e&&_[c]==s&&0!=c&&c!=o.length-1){n.splice(t+1,0,o.slice(c)),a.splice(t+1,0,_.slice(c)),o.splice(c+1),_.splice(c+1);for(const e of r.columns())e!==l&&e!=i&&r.data[e].splice(t+1,0,r.data[e][t]);return}}}}_snap_to_vertex(e,s,t){const{vertex_renderer:o}=this.model;if(null!=o){const r=this._select_event(e,\"replace\",[o]),l=o.data_source,i=o.glyph,[n,c]=[i.x.field,i.y.field];if(r.length>0){const o=l.selected.indices[0];n&&(s=l.get(n)[o]),c&&(t=l.get(c)[o]),\"move\"!=e.type&&this._split_path(s,t),l.selection_manager.clear()}}return[s,t]}_set_vertices(e,s,t){const{vertex_renderer:o}=this.model;if(null==o)return;const r=o.glyph,l=o.data_source,[i,a]=[r.x.field,r.y.field];if(i&&((0,c.isArray)(e)?l.set(i,e):r.x={value:e}),a&&((0,c.isArray)(s)?l.set(a,s):r.y={value:s}),null!=t)for(const e of(0,n.keys)(t))l.set(e,t[e]),r[e]={field:e};else for(const e of l.columns())l.set(e,[]);this._emit_cds_changes(l,!0,!0,!1)}_show_vertices(){if(!this.model.active)return;const{renderers:e,node_style:s,end_style:t}=this.model,o=[],r=[],l={};for(const e of(0,n.keys)(t))l[e]=[];for(let i=0;i<e.length;i++){const _=e[i],d=_.data_source,f=_.glyph,[h,y]=[f.xs.field,f.ys.field];for(const e of d.get_array(h)){(0,a.assert)((0,c.isArray)(e)),o.push(...e);for(const[e,s]of(0,n.entries)(t))l[e].push(s);for(const[t,o]of(0,n.entries)(s))for(let s=0;s<e.length-2;s++)l[t].push(o);for(const[e,s]of(0,n.entries)(t))l[e].push(s)}for(const e of d.get_array(y))(0,a.assert)((0,c.isArray)(e)),r.push(...e);if(this._drawing&&i==e.length-1){o.splice(o.length-1,1),r.splice(r.length-1,1);for(const[e,s]of(0,n.entries)(l))s.splice(s.length-1,1)}}this._set_vertices(o,r,l)}_remove(){const e=this.model.renderers[0],s=e.data_source,t=e.glyph;if((0,i.isField)(t.xs)){const e=t.xs.field,o=s.get_array(e),r=o.length-1,l=o[r];l.splice(l.length-1,1),1==l.length&&o.splice(r,1)}if((0,i.isField)(t.ys)){const e=t.ys.field,o=s.get_array(e),r=o.length-1,l=o[r];l.splice(l.length-1,1),1==l.length&&o.splice(r,1)}this._emit_cds_changes(s),this._drawing=!1,this._show_vertices()}}t.PolyVertexDrawToolView=d,d.__name__=\"PolyVertexDrawToolView\";class f extends _.PolyDrawTool{constructor(e){super(e)}}t.PolyVertexDrawTool=f,l=f,f.__name__=\"PolyVertexDrawTool\",f.__module__=\"geoviews.models.custom_tools\",l.prototype.default_view=d,l.define((({Dict:e,Unknown:s})=>({end_style:[e(s),{}],node_style:[e(s),{}]})))}\n//# sourceMappingURL=poly_draw.min.js.map","min_map":"{\"version\":3,\"file\":\"poly_draw.min.js\",\"names\":[\"_\",\"require\",\"module\",\"exports\",\"__esModule\",\"__esExport\",\"_a\",\"vectorization_1\",\"object_1\",\"types_1\",\"assert_1\",\"poly_draw_tool_1\",\"PolyVertexDrawToolView\",\"PolyDrawToolView\",\"_split_path\",\"x\",\"y\",\"renderer\",\"this\",\"model\",\"renderers\",\"glyph\",\"cds\",\"data_source\",\"xkey\",\"ykey\",\"xs\",\"field\",\"ys\",\"xpaths\",\"data\",\"ypaths\",\"index\",\"length\",\"isArray\",\"Array\",\"from\",\"i\",\"splice\",\"slice\",\"column\",\"columns\",\"_snap_to_vertex\",\"ev\",\"vertex_renderer\",\"vertex_selected\",\"_select_event\",\"point_ds\",\"point_glyph\",\"pxkey\",\"pykey\",\"selected\",\"indices\",\"get\",\"type\",\"selection_manager\",\"clear\",\"_set_vertices\",\"styles\",\"point_cds\",\"set\",\"value\",\"key\",\"keys\",\"col\",\"_emit_cds_changes\",\"_show_vertices\",\"active\",\"node_style\",\"end_style\",\"array\",\"get_array\",\"assert\",\"push\",\"val\",\"entries\",\"_drawing\",\"_remove\",\"isField\",\"xidx\",\"yidx\",\"__name__\",\"PolyVertexDrawTool\",\"PolyDrawTool\",\"constructor\",\"attrs\",\"super\",\"__module__\",\"prototype\",\"default_view\",\"define\",\"Dict\",\"Unknown\"],\"sources\":[\"0\"],\"mappings\":\"AAA0B,SAASA,EAAEC,EAASC,EAAQC,EAASC,EAAYC,GACvE,IAAIC,EACJF,IACA,MAAMG,EAAkBN,EAAQ,+BAC1BO,EAAWP,EAAQ,6BACnBQ,EAAUR,EAAQ,4BAClBS,EAAWT,EAAQ,6BACnBU,EAAmBV,EAAQ,6CACjC,MAAMW,UAA+BD,EAAiBE,iBAClD,WAAAC,CAAYC,EAAGC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J,EAASI,MACvB,IAAI,EAAId,EAAgBuE,SAASzD,EAAMK,IAAK,CACxC,MAAMF,EAAOH,EAAMK,GAAGC,MAChB2C,EAAQhD,EAAIiD,UAAU/C,GACtBuD,EAAOT,EAAMrC,OAAS,EACtBP,EAAK4C,EAAMS,GACjBrD,EAAGY,OAAOZ,EAAGO,OAAS,EAAG,GACR,GAAbP,EAAGO,QACHqC,EAAMhC,OAAOyC,EAAM,EAE3B,CACA,IAAI,EAAIxE,EAAgBuE,SAASzD,EAAMO,IAAK,CACxC,MAAMH,EAAOJ,EAAMO,GAAGD,MAChB2C,EAAQhD,EAAIiD,UAAU9C,GACtBuD,EAAOV,EAAMrC,OAAS,EACtBL,EAAK0C,EAAMU,GACjBpD,EAAGU,OAAOV,EAAGK,OAAS,EAAG,GACR,GAAbL,EAAGK,QACHqC,EAAMhC,OAAO0C,EAAM,EAE3B,CACA9D,KAAK+C,kBAAkB3C,GACvBJ,KAAK0D,UAAW,EAChB1D,KAAKgD,gBACT,EAEJ/D,EAAQS,uBAAyBA,EACjCA,EAAuBqE,SAAW,yBAClC,MAAMC,UAA2BvE,EAAiBwE,aAC9C,WAAAC,CAAYC,GACRC,MAAMD,EACV,EAEJlF,EAAQ+E,mBAAqBA,EAC7B5E,EAAK4E,EACLA,EAAmBD,SAAW,qBAC9BC,EAAmBK,WAAa,+BAE5BjF,EAAGkF,UAAUC,aAAe7E,EAC5BN,EAAGoF,QAAO,EAAGC,OAAMC,cAAc,CAC7BvB,UAAW,CAACsB,EAAKC,GAAU,CAAC,GAC5BxB,WAAY,CAACuB,EAAKC,GAAU,CAAC,MAGzC\",\"ignoreList\":[]}"}},{"module":{"file":"/home/runner/work/geoviews/geoviews/geoviews/dist/lib/models/poly_edit.js","base":"/home/runner/work/geoviews/geoviews/geoviews/dist/lib","base_path":"models/poly_edit.js","canonical":"models/poly_edit","resolution":"ESM","id":"238deef1f5","hash":"238deef1f5b70608e38100a2ed10a7b3f655db10593de22b5797c78e79402037","source":"\"use strict\";\nvar _a;\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.PolyVertexEditTool = exports.PolyVertexEditToolView = void 0;\nconst object_1 = require(\"@bokehjs/core/util/object\");\nconst types_1 = require(\"@bokehjs/core/util/types\");\nconst poly_edit_tool_1 = require(\"@bokehjs/models/tools/edit/poly_edit_tool\");\nclass PolyVertexEditToolView extends poly_edit_tool_1.PolyEditToolView {\n deactivate() {\n this._hide_vertices();\n if (this._selected_renderer == null) {\n return;\n }\n else if (this._drawing) {\n this._remove_vertex();\n this._drawing = false;\n }\n this._emit_cds_changes(this._selected_renderer.data_source, false, true, false);\n }\n _pan(ev) {\n if (this._basepoint == null || this.model.vertex_renderer == null) {\n return;\n }\n const points = this._drag_points(ev, [this.model.vertex_renderer]);\n if (!ev.modifiers.shift) {\n this._move_linked(points);\n }\n if (this._selected_renderer != null) {\n this._selected_renderer.data_source.change.emit();\n }\n }\n _pan_end(ev) {\n if (this._basepoint == null || this.model.vertex_renderer == null) {\n return;\n }\n const points = this._drag_points(ev, [this.model.vertex_renderer]);\n if (!ev.modifiers.shift) {\n this._move_linked(points);\n }\n this._emit_cds_changes(this.model.vertex_renderer.data_source, false, true, true);\n if (this._selected_renderer != null) {\n this._emit_cds_changes(this._selected_renderer.data_source);\n }\n this._basepoint = null;\n }\n _drag_points(ev, renderers) {\n if (this._basepoint == null) {\n return [];\n }\n const [bx, by] = this._basepoint;\n const points = [];\n for (const renderer of renderers) {\n const basepoint = this._map_drag(bx, by, renderer);\n const point = this._map_drag(ev.sx, ev.sy, renderer);\n if (point == null || basepoint == null) {\n continue;\n }\n const [x, y] = point;\n const [px, py] = basepoint;\n const [dx, dy] = [x - px, y - py];\n // Type once dataspecs are typed\n const glyph = renderer.glyph;\n const cds = renderer.data_source;\n const [xkey, ykey] = [glyph.x.field, glyph.y.field];\n for (const index of cds.selected.indices) {\n const point = [];\n if (xkey) {\n const xs = cds.get(xkey);\n point.push(xs[index]);\n xs[index] += dx;\n }\n if (ykey) {\n const ys = cds.get(ykey);\n point.push(ys[index]);\n ys[index] += dy;\n }\n point.push(dx);\n point.push(dy);\n points.push(point);\n }\n cds.change.emit();\n }\n this._basepoint = [ev.sx, ev.sy];\n return points;\n }\n _set_vertices(xs, ys, styles) {\n if (this.model.vertex_renderer == null) {\n return;\n }\n const point_glyph = this.model.vertex_renderer.glyph;\n const point_cds = this.model.vertex_renderer.data_source;\n const [pxkey, pykey] = [point_glyph.x.field, point_glyph.y.field];\n if (pxkey) {\n if ((0, types_1.isArray)(xs)) {\n point_cds.set(pxkey, xs);\n }\n else {\n point_glyph.x = { value: xs };\n }\n }\n if (pykey) {\n if ((0, types_1.isArray)(ys)) {\n point_cds.set(pykey, ys);\n }\n else {\n point_glyph.y = { value: ys };\n }\n }\n if (styles != null) {\n for (const [key, array] of (0, object_1.entries)(styles)) {\n point_cds.set(key, array);\n point_glyph[key] = { field: key };\n }\n }\n else {\n for (const col of point_cds.columns()) {\n point_cds.set(col, []);\n }\n }\n this._emit_cds_changes(point_cds, true, true, false);\n }\n _move_linked(points) {\n if (this._selected_renderer == null) {\n return;\n }\n const renderer = this._selected_renderer;\n const glyph = renderer.glyph;\n const cds = renderer.data_source;\n const [xkey, ykey] = [glyph.xs.field, glyph.ys.field];\n const xpaths = cds.data[xkey];\n const ypaths = cds.data[ykey];\n for (const point of points) {\n const [x, y, dx, dy] = point;\n for (let index = 0; index < xpaths.length; index++) {\n const xs = xpaths[index];\n const ys = ypaths[index];\n for (let i = 0; i < xs.length; i++) {\n if ((xs[i] == x) && (ys[i] == y)) {\n xs[i] += dx;\n ys[i] += dy;\n }\n }\n }\n }\n }\n _tap(ev) {\n if (this.model.vertex_renderer == null) {\n return;\n }\n const renderer = this.model.vertex_renderer;\n const point = this._map_drag(ev.sx, ev.sy, renderer);\n if (point == null) {\n return;\n }\n else if (this._drawing && this._selected_renderer != null) {\n let [x, y] = point;\n const cds = renderer.data_source;\n // Type once dataspecs are typed\n const glyph = renderer.glyph;\n const [xkey, ykey] = [glyph.x.field, glyph.y.field];\n const indices = cds.selected.indices;\n [x, y] = this._snap_to_vertex(ev, x, y);\n const index = indices[0];\n cds.selected.indices = [index + 1];\n if (xkey) {\n const xs = cds.get_array(xkey);\n const nx = xs[index];\n xs[index] = x;\n xs.splice(index + 1, 0, nx);\n }\n if (ykey) {\n const ys = cds.get_array(ykey);\n const ny = ys[index];\n ys[index] = y;\n ys.splice(index + 1, 0, ny);\n }\n cds.change.emit();\n this._emit_cds_changes(this._selected_renderer.data_source, true, false, true);\n return;\n }\n this._select_event(ev, this._select_mode(ev), [renderer]);\n }\n _show_vertices(ev) {\n if (!this.model.active) {\n return;\n }\n const renderers = this._select_event(ev, \"replace\", this.model.renderers);\n if (renderers.length === 0) {\n this._hide_vertices();\n this._selected_renderer = null;\n this._drawing = false;\n return;\n }\n const renderer = renderers[0];\n const glyph = renderer.glyph;\n const cds = renderer.data_source;\n const index = cds.selected.indices[0];\n const [xkey, ykey] = [glyph.xs.field, glyph.ys.field];\n let xs;\n let ys;\n if (xkey) {\n xs = cds.get(xkey)[index];\n if (!(0, types_1.isArray)(xs)) {\n cds.get(xkey)[index] = xs = Array.from(xs);\n }\n }\n else {\n xs = glyph.xs.value;\n }\n if (ykey) {\n ys = cds.get(ykey)[index];\n if (!(0, types_1.isArray)(ys)) {\n cds.get(ykey)[index] = ys = Array.from(ys);\n }\n }\n else {\n ys = glyph.ys.value;\n }\n const { end_style, node_style } = this.model;\n const styles = {};\n for (const [key, val] of (0, object_1.entries)(end_style)) {\n styles[key] = [val];\n }\n for (const [key, val] of (0, object_1.entries)(node_style)) {\n for (let index = 0; index < xs.length - 2; index++) {\n styles[key].push(val);\n }\n }\n for (const [key, val] of (0, object_1.entries)(end_style)) {\n styles[key].push(val);\n }\n this._selected_renderer = renderer;\n this._set_vertices(xs, ys, styles);\n }\n}\nexports.PolyVertexEditToolView = PolyVertexEditToolView;\nPolyVertexEditToolView.__name__ = \"PolyVertexEditToolView\";\nclass PolyVertexEditTool extends poly_edit_tool_1.PolyEditTool {\n constructor(attrs) {\n super(attrs);\n }\n}\nexports.PolyVertexEditTool = PolyVertexEditTool;\n_a = PolyVertexEditTool;\nPolyVertexEditTool.__name__ = \"PolyVertexEditTool\";\nPolyVertexEditTool.__module__ = \"geoviews.models.custom_tools\";\n(() => {\n _a.prototype.default_view = PolyVertexEditToolView;\n _a.define(({ Dict, Unknown }) => ({\n end_style: [Dict(Unknown), {}],\n node_style: [Dict(Unknown), {}],\n }));\n})();\n//# sourceMappingURL=poly_edit.js.map\n","type":"js","dependency_paths":[],"dependency_map":[],"exported":[{"type":"named","name":"PolyVertexEditToolView"},{"type":"named","name":"PolyVertexEditTool"}],"externals":[],"shims":[]},"code":{"source":"/* models/poly_edit.js */ function _(require, module, exports, __esModule, __esExport) {\n var _a;\n __esModule();\n const object_1 = require(\"@bokehjs/core/util/object\");\n const types_1 = require(\"@bokehjs/core/util/types\");\n const poly_edit_tool_1 = require(\"@bokehjs/models/tools/edit/poly_edit_tool\");\n class PolyVertexEditToolView extends poly_edit_tool_1.PolyEditToolView {\n deactivate() {\n this._hide_vertices();\n if (this._selected_renderer == null) {\n return;\n }\n else if (this._drawing) {\n this._remove_vertex();\n this._drawing = false;\n }\n this._emit_cds_changes(this._selected_renderer.data_source, false, true, false);\n }\n _pan(ev) {\n if (this._basepoint == null || this.model.vertex_renderer == null) {\n return;\n }\n const points = this._drag_points(ev, [this.model.vertex_renderer]);\n if (!ev.modifiers.shift) {\n this._move_linked(points);\n }\n if (this._selected_renderer != null) {\n this._selected_renderer.data_source.change.emit();\n }\n }\n _pan_end(ev) {\n if (this._basepoint == null || this.model.vertex_renderer == null) {\n return;\n }\n const points = this._drag_points(ev, [this.model.vertex_renderer]);\n if (!ev.modifiers.shift) {\n this._move_linked(points);\n }\n this._emit_cds_changes(this.model.vertex_renderer.data_source, false, true, true);\n if (this._selected_renderer != null) {\n this._emit_cds_changes(this._selected_renderer.data_source);\n }\n this._basepoint = null;\n }\n _drag_points(ev, renderers) {\n if (this._basepoint == null) {\n return [];\n }\n const [bx, by] = this._basepoint;\n const points = [];\n for (const renderer of renderers) {\n const basepoint = this._map_drag(bx, by, renderer);\n const point = this._map_drag(ev.sx, ev.sy, renderer);\n if (point == null || basepoint == null) {\n continue;\n }\n const [x, y] = point;\n const [px, py] = basepoint;\n const [dx, dy] = [x - px, y - py];\n // Type once dataspecs are typed\n const glyph = renderer.glyph;\n const cds = renderer.data_source;\n const [xkey, ykey] = [glyph.x.field, glyph.y.field];\n for (const index of cds.selected.indices) {\n const point = [];\n if (xkey) {\n const xs = cds.get(xkey);\n point.push(xs[index]);\n xs[index] += dx;\n }\n if (ykey) {\n const ys = cds.get(ykey);\n point.push(ys[index]);\n ys[index] += dy;\n }\n point.push(dx);\n point.push(dy);\n points.push(point);\n }\n cds.change.emit();\n }\n this._basepoint = [ev.sx, ev.sy];\n return points;\n }\n _set_vertices(xs, ys, styles) {\n if (this.model.vertex_renderer == null) {\n return;\n }\n const point_glyph = this.model.vertex_renderer.glyph;\n const point_cds = this.model.vertex_renderer.data_source;\n const [pxkey, pykey] = [point_glyph.x.field, point_glyph.y.field];\n if (pxkey) {\n if ((0, types_1.isArray)(xs)) {\n point_cds.set(pxkey, xs);\n }\n else {\n point_glyph.x = { value: xs };\n }\n }\n if (pykey) {\n if ((0, types_1.isArray)(ys)) {\n point_cds.set(pykey, ys);\n }\n else {\n point_glyph.y = { value: ys };\n }\n }\n if (styles != null) {\n for (const [key, array] of (0, object_1.entries)(styles)) {\n point_cds.set(key, array);\n point_glyph[key] = { field: key };\n }\n }\n else {\n for (const col of point_cds.columns()) {\n point_cds.set(col, []);\n }\n }\n this._emit_cds_changes(point_cds, true, true, false);\n }\n _move_linked(points) {\n if (this._selected_renderer == null) {\n return;\n }\n const renderer = this._selected_renderer;\n const glyph = renderer.glyph;\n const cds = renderer.data_source;\n const [xkey, ykey] = [glyph.xs.field, glyph.ys.field];\n const xpaths = cds.data[xkey];\n const ypaths = cds.data[ykey];\n for (const point of points) {\n const [x, y, dx, dy] = point;\n for (let index = 0; index < xpaths.length; index++) {\n const xs = xpaths[index];\n const ys = ypaths[index];\n for (let i = 0; i < xs.length; i++) {\n if ((xs[i] == x) && (ys[i] == y)) {\n xs[i] += dx;\n ys[i] += dy;\n }\n }\n }\n }\n }\n _tap(ev) {\n if (this.model.vertex_renderer == null) {\n return;\n }\n const renderer = this.model.vertex_renderer;\n const point = this._map_drag(ev.sx, ev.sy, renderer);\n if (point == null) {\n return;\n }\n else if (this._drawing && this._selected_renderer != null) {\n let [x, y] = point;\n const cds = renderer.data_source;\n // Type once dataspecs are typed\n const glyph = renderer.glyph;\n const [xkey, ykey] = [glyph.x.field, glyph.y.field];\n const indices = cds.selected.indices;\n [x, y] = this._snap_to_vertex(ev, x, y);\n const index = indices[0];\n cds.selected.indices = [index + 1];\n if (xkey) {\n const xs = cds.get_array(xkey);\n const nx = xs[index];\n xs[index] = x;\n xs.splice(index + 1, 0, nx);\n }\n if (ykey) {\n const ys = cds.get_array(ykey);\n const ny = ys[index];\n ys[index] = y;\n ys.splice(index + 1, 0, ny);\n }\n cds.change.emit();\n this._emit_cds_changes(this._selected_renderer.data_source, true, false, true);\n return;\n }\n this._select_event(ev, this._select_mode(ev), [renderer]);\n }\n _show_vertices(ev) {\n if (!this.model.active) {\n return;\n }\n const renderers = this._select_event(ev, \"replace\", this.model.renderers);\n if (renderers.length === 0) {\n this._hide_vertices();\n this._selected_renderer = null;\n this._drawing = false;\n return;\n }\n const renderer = renderers[0];\n const glyph = renderer.glyph;\n const cds = renderer.data_source;\n const index = cds.selected.indices[0];\n const [xkey, ykey] = [glyph.xs.field, glyph.ys.field];\n let xs;\n let ys;\n if (xkey) {\n xs = cds.get(xkey)[index];\n if (!(0, types_1.isArray)(xs)) {\n cds.get(xkey)[index] = xs = Array.from(xs);\n }\n }\n else {\n xs = glyph.xs.value;\n }\n if (ykey) {\n ys = cds.get(ykey)[index];\n if (!(0, types_1.isArray)(ys)) {\n cds.get(ykey)[index] = ys = Array.from(ys);\n }\n }\n else {\n ys = glyph.ys.value;\n }\n const { end_style, node_style } = this.model;\n const styles = {};\n for (const [key, val] of (0, object_1.entries)(end_style)) {\n styles[key] = [val];\n }\n for (const [key, val] of (0, object_1.entries)(node_style)) {\n for (let index = 0; index < xs.length - 2; index++) {\n styles[key].push(val);\n }\n }\n for (const [key, val] of (0, object_1.entries)(end_style)) {\n styles[key].push(val);\n }\n this._selected_renderer = renderer;\n this._set_vertices(xs, ys, styles);\n }\n }\n exports.PolyVertexEditToolView = PolyVertexEditToolView;\n PolyVertexEditToolView.__name__ = \"PolyVertexEditToolView\";\n class PolyVertexEditTool extends poly_edit_tool_1.PolyEditTool {\n constructor(attrs) {\n super(attrs);\n }\n }\n exports.PolyVertexEditTool = PolyVertexEditTool;\n _a = PolyVertexEditTool;\n PolyVertexEditTool.__name__ = \"PolyVertexEditTool\";\n PolyVertexEditTool.__module__ = \"geoviews.models.custom_tools\";\n (() => {\n _a.prototype.default_view = PolyVertexEditToolView;\n _a.define(({ Dict, Unknown }) => ({\n end_style: [Dict(Unknown), {}],\n node_style: [Dict(Unknown), {}],\n }));\n })();\n}\n","min_source":"function _(e,t,s,r,i){var n;r();const o=e(\"@bokehjs/core/util/object\"),_=e(\"@bokehjs/core/util/types\"),l=e(\"@bokehjs/models/tools/edit/poly_edit_tool\");class d extends l.PolyEditToolView{deactivate(){this._hide_vertices(),null!=this._selected_renderer&&(this._drawing&&(this._remove_vertex(),this._drawing=!1),this._emit_cds_changes(this._selected_renderer.data_source,!1,!0,!1))}_pan(e){if(null==this._basepoint||null==this.model.vertex_renderer)return;const t=this._drag_points(e,[this.model.vertex_renderer]);e.modifiers.shift||this._move_linked(t),null!=this._selected_renderer&&this._selected_renderer.data_source.change.emit()}_pan_end(e){if(null==this._basepoint||null==this.model.vertex_renderer)return;const t=this._drag_points(e,[this.model.vertex_renderer]);e.modifiers.shift||this._move_linked(t),this._emit_cds_changes(this.model.vertex_renderer.data_source,!1,!0,!0),null!=this._selected_renderer&&this._emit_cds_changes(this._selected_renderer.data_source),this._basepoint=null}_drag_points(e,t){if(null==this._basepoint)return[];const[s,r]=this._basepoint,i=[];for(const n of t){const t=this._map_drag(s,r,n),o=this._map_drag(e.sx,e.sy,n);if(null==o||null==t)continue;const[_,l]=o,[d,c]=t,[h,a]=[_-d,l-c],u=n.glyph,f=n.data_source,[m,g]=[u.x.field,u.y.field];for(const e of f.selected.indices){const t=[];if(m){const s=f.get(m);t.push(s[e]),s[e]+=h}if(g){const s=f.get(g);t.push(s[e]),s[e]+=a}t.push(h),t.push(a),i.push(t)}f.change.emit()}return this._basepoint=[e.sx,e.sy],i}_set_vertices(e,t,s){if(null==this.model.vertex_renderer)return;const r=this.model.vertex_renderer.glyph,i=this.model.vertex_renderer.data_source,[n,l]=[r.x.field,r.y.field];if(n&&((0,_.isArray)(e)?i.set(n,e):r.x={value:e}),l&&((0,_.isArray)(t)?i.set(l,t):r.y={value:t}),null!=s)for(const[e,t]of(0,o.entries)(s))i.set(e,t),r[e]={field:e};else for(const e of i.columns())i.set(e,[]);this._emit_cds_changes(i,!0,!0,!1)}_move_linked(e){if(null==this._selected_renderer)return;const t=this._selected_renderer,s=t.glyph,r=t.data_source,[i,n]=[s.xs.field,s.ys.field],o=r.data[i],_=r.data[n];for(const t of e){const[e,s,r,i]=t;for(let t=0;t<o.length;t++){const n=o[t],l=_[t];for(let t=0;t<n.length;t++)n[t]==e&&l[t]==s&&(n[t]+=r,l[t]+=i)}}}_tap(e){if(null==this.model.vertex_renderer)return;const t=this.model.vertex_renderer,s=this._map_drag(e.sx,e.sy,t);if(null!=s){if(this._drawing&&null!=this._selected_renderer){let[r,i]=s;const n=t.data_source,o=t.glyph,[_,l]=[o.x.field,o.y.field],d=n.selected.indices;[r,i]=this._snap_to_vertex(e,r,i);const c=d[0];if(n.selected.indices=[c+1],_){const e=n.get_array(_),t=e[c];e[c]=r,e.splice(c+1,0,t)}if(l){const e=n.get_array(l),t=e[c];e[c]=i,e.splice(c+1,0,t)}return n.change.emit(),void this._emit_cds_changes(this._selected_renderer.data_source,!0,!1,!0)}this._select_event(e,this._select_mode(e),[t])}}_show_vertices(e){if(!this.model.active)return;const t=this._select_event(e,\"replace\",this.model.renderers);if(0===t.length)return this._hide_vertices(),this._selected_renderer=null,void(this._drawing=!1);const s=t[0],r=s.glyph,i=s.data_source,n=i.selected.indices[0],[l,d]=[r.xs.field,r.ys.field];let c,h;l?(c=i.get(l)[n],(0,_.isArray)(c)||(i.get(l)[n]=c=Array.from(c))):c=r.xs.value,d?(h=i.get(d)[n],(0,_.isArray)(h)||(i.get(d)[n]=h=Array.from(h))):h=r.ys.value;const{end_style:a,node_style:u}=this.model,f={};for(const[e,t]of(0,o.entries)(a))f[e]=[t];for(const[e,t]of(0,o.entries)(u))for(let s=0;s<c.length-2;s++)f[e].push(t);for(const[e,t]of(0,o.entries)(a))f[e].push(t);this._selected_renderer=s,this._set_vertices(c,h,f)}}s.PolyVertexEditToolView=d,d.__name__=\"PolyVertexEditToolView\";class c extends l.PolyEditTool{constructor(e){super(e)}}s.PolyVertexEditTool=c,n=c,c.__name__=\"PolyVertexEditTool\",c.__module__=\"geoviews.models.custom_tools\",n.prototype.default_view=d,n.define((({Dict:e,Unknown:t})=>({end_style:[e(t),{}],node_style:[e(t),{}]})))}\n//# sourceMappingURL=poly_edit.min.js.map","min_map":"{\"version\":3,\"file\":\"poly_edit.min.js\",\"names\":[\"_\",\"require\",\"module\",\"exports\",\"__esModule\",\"__esExport\",\"_a\",\"object_1\",\"types_1\",\"poly_edit_tool_1\",\"PolyVertexEditToolView\",\"PolyEditToolView\",\"deactivate\",\"this\",\"_hide_vertices\",\"_selected_renderer\",\"_drawing\",\"_remove_vertex\",\"_emit_cds_changes\",\"data_source\",\"_pan\",\"ev\",\"_basepoint\",\"model\",\"vertex_renderer\",\"points\",\"_drag_points\",\"modifiers\",\"shift\",\"_move_linked\",\"change\",\"emit\",\"_pan_end\",\"renderers\",\"bx\",\"by\",\"renderer\",\"basepoint\",\"_map_drag\",\"point\",\"sx\",\"sy\",\"x\",\"y\",\"px\",\"py\",\"dx\",\"dy\",\"glyph\",\"cds\",\"xkey\",\"ykey\",\"field\",\"index\",\"selected\",\"indices\",\"xs\",\"get\",\"push\",\"ys\",\"_set_vertices\",\"styles\",\"point_glyph\",\"point_cds\",\"pxkey\",\"pykey\",\"isArray\",\"set\",\"value\",\"key\",\"array\",\"entries\",\"col\",\"columns\",\"xpaths\",\"data\",\"ypaths\",\"length\",\"i\",\"_tap\",\"_snap_to_vertex\",\"get_array\",\"nx\",\"splice\",\"ny\",\"_select_event\",\"_select_mode\",\"_show_vertices\",\"active\",\"Array\",\"from\",\"end_style\",\"node_style\",\"val\",\"__name__\",\"PolyVertexEditTool\",\"PolyEditTool\",\"constructor\",\"attrs\",\"super\",\"__module__\",\"prototype\",\"default_view\",\"define\",\"Dict\",\"Unknown\"],\"sources\":[\"0\"],\"mappings\":\"AAA0B,SAASA,EAAEC,EAASC,EAAQC,EAASC,EAAYC,GACvE,IAAIC,EACJF,IACA,MAAMG,EAAWN,EAAQ,6BACnBO,EAAUP,EAAQ,4BAClBQ,EAAmBR,EAAQ,6CACjC,MAAMS,UAA+BD,EAAiBE,iBAClD,UAAAC,GACIC,KAAKC,iBAC0B,MAA3BD,KAAKE,qBAGAF,KAAKG,WACVH,KAAKI,iBACLJ,KAAKG,UAAW,GAEpBH,KAAKK,kBAAkBL,KAAKE,mBAAmBI,aAAa,GAAO,GAAM,GAC7E,CACA,IAAAC,CAAKC,GACD,GAAuB,MAAnBR,KAAKS,YAAoD,MAA9BT,KAAKU,MAAMC,gBACtC,OAEJ,MAAMC,EAASZ,KAAKa,aAAaL,EAAI,CAACR,KAAKU,MAAMC,kBAC5CH,EAAGM,UAAUC,OACdf,KAAKgB,aAAaJ,GAES,MAA3BZ,KAAKE,oBACLF,KAAKE,mBAAmBI,YAAYW,OAAOC,MAEnD,CACA,QAAAC,CAASX,GACL,GAAuB,MAAnBR,KAAK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iBuF,aAC9C,WAAAC,CAAYC,GACRC,MAAMD,EACV,EAEJ/F,EAAQ4F,mBAAqBA,EAC7BzF,EAAKyF,EACLA,EAAmBD,SAAW,qBAC9BC,EAAmBK,WAAa,+BAE5B9F,EAAG+F,UAAUC,aAAe5F,EAC5BJ,EAAGiG,QAAO,EAAGC,OAAMC,cAAc,CAC7Bd,UAAW,CAACa,EAAKC,GAAU,CAAC,GAC5Bb,WAAY,CAACY,EAAKC,GAAU,CAAC,MAGzC\",\"ignoreList\":[]}"}},{"module":{"file":"/home/runner/work/geoviews/geoviews/geoviews/dist/lib/models/restore_tool.js","base":"/home/runner/work/geoviews/geoviews/geoviews/dist/lib","base_path":"models/restore_tool.js","canonical":"models/restore_tool","resolution":"ESM","id":"1a96add9eb","hash":"1a96add9ebb76db2ebe81ac1e6eb79c6f6fa3ccc059df6a04b9cd1c4fbd66ea7","source":"\"use strict\";\nvar _a;\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.RestoreTool = exports.RestoreToolView = void 0;\nconst action_tool_1 = require(\"@bokehjs/models/tools/actions/action_tool\");\nconst column_data_source_1 = require(\"@bokehjs/models/sources/column_data_source\");\nconst icons_css_1 = require(\"@bokehjs/styles/icons.css\");\nclass RestoreToolView extends action_tool_1.ActionToolView {\n doit() {\n const sources = this.model.sources;\n for (const source of sources) {\n const new_data = source.buffer?.pop();\n if (new_data == null) {\n continue;\n }\n source.data = new_data;\n source.change.emit();\n source.properties.data.change.emit();\n }\n }\n}\nexports.RestoreToolView = RestoreToolView;\nRestoreToolView.__name__ = \"RestoreToolView\";\nclass RestoreTool extends action_tool_1.ActionTool {\n constructor(attrs) {\n super(attrs);\n this.tool_name = \"Restore\";\n this.tool_icon = icons_css_1.tool_icon_undo;\n }\n}\nexports.RestoreTool = RestoreTool;\n_a = RestoreTool;\nRestoreTool.__name__ = \"RestoreTool\";\nRestoreTool.__module__ = \"geoviews.models.custom_tools\";\n(() => {\n _a.prototype.default_view = RestoreToolView;\n _a.define(({ List, Ref }) => ({\n sources: [List(Ref(column_data_source_1.ColumnDataSource)), []],\n }));\n})();\n//# sourceMappingURL=restore_tool.js.map\n","type":"js","dependency_paths":[],"dependency_map":[],"exported":[{"type":"named","name":"RestoreToolView"},{"type":"named","name":"RestoreTool"}],"externals":[],"shims":[]},"code":{"source":"/* models/restore_tool.js */ function _(require, module, exports, __esModule, __esExport) {\n var _a;\n __esModule();\n const action_tool_1 = require(\"@bokehjs/models/tools/actions/action_tool\");\n const column_data_source_1 = require(\"@bokehjs/models/sources/column_data_source\");\n const icons_css_1 = require(\"@bokehjs/styles/icons.css\");\n class RestoreToolView extends action_tool_1.ActionToolView {\n doit() {\n const sources = this.model.sources;\n for (const source of sources) {\n const new_data = source.buffer?.pop();\n if (new_data == null) {\n continue;\n }\n source.data = new_data;\n source.change.emit();\n source.properties.data.change.emit();\n }\n }\n }\n exports.RestoreToolView = RestoreToolView;\n RestoreToolView.__name__ = \"RestoreToolView\";\n class RestoreTool extends action_tool_1.ActionTool {\n constructor(attrs) {\n super(attrs);\n this.tool_name = \"Restore\";\n this.tool_icon = icons_css_1.tool_icon_undo;\n }\n }\n exports.RestoreTool = RestoreTool;\n _a = RestoreTool;\n RestoreTool.__name__ = \"RestoreTool\";\n RestoreTool.__module__ = \"geoviews.models.custom_tools\";\n (() => {\n _a.prototype.default_view = RestoreToolView;\n _a.define(({ List, Ref }) => ({\n sources: [List(Ref(column_data_source_1.ColumnDataSource)), []],\n }));\n })();\n}\n","min_source":"function _(o,e,s,t,c){var n;t();const l=o(\"@bokehjs/models/tools/actions/action_tool\"),i=o(\"@bokehjs/models/sources/column_data_source\"),_=o(\"@bokehjs/styles/icons.css\");class a extends l.ActionToolView{doit(){const o=this.model.sources;for(const e of o){const o=e.buffer?.pop();null!=o&&(e.data=o,e.change.emit(),e.properties.data.change.emit())}}}s.RestoreToolView=a,a.__name__=\"RestoreToolView\";class r extends l.ActionTool{constructor(o){super(o),this.tool_name=\"Restore\",this.tool_icon=_.tool_icon_undo}}s.RestoreTool=r,n=r,r.__name__=\"RestoreTool\",r.__module__=\"geoviews.models.custom_tools\",n.prototype.default_view=a,n.define((({List:o,Ref:e})=>({sources:[o(e(i.ColumnDataSource)),[]]})))}\n//# sourceMappingURL=restore_tool.min.js.map","min_map":"{\"version\":3,\"file\":\"restore_tool.min.js\",\"names\":[\"_\",\"require\",\"module\",\"exports\",\"__esModule\",\"__esExport\",\"_a\",\"action_tool_1\",\"column_data_source_1\",\"icons_css_1\",\"RestoreToolView\",\"ActionToolView\",\"doit\",\"sources\",\"this\",\"model\",\"source\",\"new_data\",\"buffer\",\"pop\",\"data\",\"change\",\"emit\",\"properties\",\"__name__\",\"RestoreTool\",\"ActionTool\",\"constructor\",\"attrs\",\"super\",\"tool_name\",\"tool_icon\",\"tool_icon_undo\",\"__module__\",\"prototype\",\"default_view\",\"define\",\"List\",\"Ref\",\"ColumnDataSource\"],\"sources\":[\"0\"],\"mappings\":\"AAA6B,SAASA,EAAEC,EAASC,EAAQC,EAASC,EAAYC,GAC1E,IAAIC,EACJF,IACA,MAAMG,EAAgBN,EAAQ,6CACxBO,EAAuBP,EAAQ,8CAC/BQ,EAAcR,EAAQ,6BAC5B,MAAMS,UAAwBH,EAAcI,eACxC,IAAAC,GACI,MAAMC,EAAUC,KAAKC,MAAMF,QAC3B,IAAK,MAAMG,KAAUH,EAAS,CAC1B,MAAMI,EAAWD,EAAOE,QAAQC,MAChB,MAAZF,IAGJD,EAAOI,KAAOH,EACdD,EAAOK,OAAOC,OACdN,EAAOO,WAAWH,KAAKC,OAAOC,OAClC,CACJ,EAEJnB,EAAQO,gBAAkBA,EAC1BA,EAAgBc,SAAW,kBAC3B,MAAMC,UAAoBlB,EAAcmB,WACpC,WAAAC,CAAYC,GACRC,MAAMD,GACNd,KAAKgB,UAAY,UACjBhB,KAAKiB,UAAYtB,EAAYuB,cACjC,EAEJ7B,EAAQsB,YAAcA,EACtBnB,EAAKmB,EACLA,EAAYD,SAAW,cACvBC,EAAYQ,WAAa,+BAErB3B,EAAG4B,UAAUC,aAAezB,EAC5BJ,EAAG8B,QAAO,EAAGC,OAAMC,UAAU,CACzBzB,QAAS,CAACwB,EAAKC,EAAI9B,EAAqB+B,mBAAoB,OAGxE\",\"ignoreList\":[]}"}},{"module":{"file":"/home/runner/work/geoviews/geoviews/geoviews/dist/lib/models/wind_barb.js","base":"/home/runner/work/geoviews/geoviews/geoviews/dist/lib","base_path":"models/wind_barb.js","canonical":"models/wind_barb","resolution":"ESM","id":"028985dc77","hash":"028985dc77195ecaa8164a560761bee75bc41efdb5f110bb5d5c531574af156f","source":"\"use strict\";\nvar _a;\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.WindBarb = exports.WindBarbView = void 0;\nconst tslib_1 = require(\"tslib\");\nconst xy_glyph_1 = require(\"@bokehjs/models/glyphs/xy_glyph\");\nconst property_mixins_1 = require(\"@bokehjs/core/property_mixins\");\nconst p = tslib_1.__importStar(require(\"@bokehjs/core/properties\"));\nconst selection_1 = require(\"@bokehjs/models/selections/selection\");\nclass WindBarbView extends xy_glyph_1.XYGlyphView {\n _paint(ctx, indices, data) {\n const { sx, sy, angle, magnitude } = data ?? this;\n const y = this.y;\n const scale = this.model.scale;\n for (const i of indices) {\n const screen_x = sx[i];\n const screen_y = sy[i];\n const a = angle.get(i);\n const mag = magnitude.get(i);\n const lat = y[i];\n if (!isFinite(screen_x + screen_y + a + mag + lat))\n continue;\n this._draw_wind_barb(ctx, screen_x, screen_y, a, mag, scale, i);\n }\n }\n _draw_wind_barb(ctx, cx, cy, angle, magnitude, scale, idx = 0) {\n // Wind barb drawing using meteorological convention\n // magnitude is in knots (or appropriate units)\n // angle is in meteorological convention (direction wind comes FROM)\n // barbs point in the direction the wind is coming FROM\n const barb_length = this.model.barb_length * scale;\n const barb_width = this.model.barb_width * scale;\n const flag_width = this.model.flag_width * scale;\n ctx.save();\n ctx.translate(cx, cy);\n ctx.rotate(-angle);\n ctx.beginPath();\n this.visuals.line.apply(ctx, idx);\n ctx.strokeStyle = ctx.strokeStyle || \"black\";\n ctx.lineCap = \"round\";\n ctx.lineJoin = \"round\";\n // Determine barbs/flags based on magnitude\n // Standard increments: 50 knots = flag (triangle), 10 knots = full barb, 5 knots = half barb\n const mag_rounded = Math.round(magnitude / 5) * 5;\n if (mag_rounded >= 5) {\n // Draw the main staff (pointing in direction wind is coming from)\n ctx.moveTo(0, 0);\n ctx.lineTo(0, -barb_length);\n ctx.stroke();\n let remaining = mag_rounded;\n let y_offset = -barb_length;\n const spacing = this.model.spacing * scale;\n // Draw 50-knot flags (filled triangles)\n while (remaining >= 50) {\n ctx.fillStyle = ctx.strokeStyle || \"black\";\n ctx.beginPath();\n ctx.moveTo(0, y_offset);\n ctx.lineTo(flag_width, y_offset + spacing);\n ctx.lineTo(0, y_offset + spacing * 2);\n ctx.closePath();\n ctx.fill();\n y_offset += spacing * 2.5;\n remaining -= 50;\n }\n // Draw 10-knot barbs (full lines)\n while (remaining >= 10) {\n ctx.beginPath();\n ctx.moveTo(0, y_offset);\n ctx.lineTo(barb_width, y_offset + barb_width * 0.2);\n ctx.stroke();\n y_offset += spacing;\n remaining -= 10;\n }\n // Draw 5-knot half-barb\n if (remaining >= 5) {\n ctx.beginPath();\n ctx.moveTo(0, y_offset);\n ctx.lineTo(barb_width / 2, y_offset + barb_width * 0.1);\n ctx.stroke();\n }\n }\n else {\n // For calm winds (< 5 knots), draw only a circle (no staff line)\n ctx.beginPath();\n ctx.arc(0, 0, this.model.calm_circle_radius * scale, 0, 2 * Math.PI);\n ctx.stroke();\n }\n ctx.restore();\n }\n _hit_point(geometry) {\n const { sx, sy } = geometry;\n const candidates = [];\n for (let i = 0; i < this.data_size; i++) {\n const dx = this.sx[i] - sx;\n const dy = this.sy[i] - sy;\n const dist = Math.sqrt(dx * dx + dy * dy);\n if (dist < 10 * this.model.scale) { // Hit radius\n candidates.push(i);\n }\n }\n return new selection_1.Selection({ indices: candidates });\n }\n draw_legend_for_index(ctx, { x0, x1, y0, y1 }, _index) {\n const cx = (x0 + x1) / 2;\n const cy = (y0 + y1) / 2;\n // Draw a representative wind barb in the legend\n this._draw_wind_barb(ctx, cx, cy, Math.PI / 4, 25, 0.5);\n }\n}\nexports.WindBarbView = WindBarbView;\nWindBarbView.__name__ = \"WindBarbView\";\nclass WindBarb extends xy_glyph_1.XYGlyph {\n constructor(attrs) {\n super(attrs);\n }\n}\nexports.WindBarb = WindBarb;\n_a = WindBarb;\nWindBarb.__name__ = \"WindBarb\";\nWindBarb.__module__ = \"geoviews.models.wind_barb\";\n(() => {\n _a.prototype.default_view = WindBarbView;\n _a.define(({ Float }) => ({\n angle: [p.AngleSpec, { value: 0 }],\n magnitude: [p.NumberSpec, { value: 0 }],\n scale: [Float, 1.0],\n barb_length: [Float, 30.0],\n barb_width: [Float, 15.0],\n flag_width: [Float, 15.0],\n spacing: [Float, 6.0],\n calm_circle_radius: [Float, 3.0],\n }));\n _a.mixins(property_mixins_1.LineVector);\n})();\n//# sourceMappingURL=wind_barb.js.map\n","type":"js","dependency_paths":[],"dependency_map":[],"exported":[{"type":"named","name":"WindBarbView"},{"type":"named","name":"WindBarb"}],"externals":[],"shims":[]},"code":{"source":"/* models/wind_barb.js */ function _(require, module, exports, __esModule, __esExport) {\n var _a;\n __esModule();\n const tslib_1 = require(\"tslib\");\n const xy_glyph_1 = require(\"@bokehjs/models/glyphs/xy_glyph\");\n const property_mixins_1 = require(\"@bokehjs/core/property_mixins\");\n const p = tslib_1.__importStar(require(\"@bokehjs/core/properties\"));\n const selection_1 = require(\"@bokehjs/models/selections/selection\");\n class WindBarbView extends xy_glyph_1.XYGlyphView {\n _paint(ctx, indices, data) {\n const { sx, sy, angle, magnitude } = data ?? this;\n const y = this.y;\n const scale = this.model.scale;\n for (const i of indices) {\n const screen_x = sx[i];\n const screen_y = sy[i];\n const a = angle.get(i);\n const mag = magnitude.get(i);\n const lat = y[i];\n if (!isFinite(screen_x + screen_y + a + mag + lat))\n continue;\n this._draw_wind_barb(ctx, screen_x, screen_y, a, mag, scale, i);\n }\n }\n _draw_wind_barb(ctx, cx, cy, angle, magnitude, scale, idx = 0) {\n // Wind barb drawing using meteorological convention\n // magnitude is in knots (or appropriate units)\n // angle is in meteorological convention (direction wind comes FROM)\n // barbs point in the direction the wind is coming FROM\n const barb_length = this.model.barb_length * scale;\n const barb_width = this.model.barb_width * scale;\n const flag_width = this.model.flag_width * scale;\n ctx.save();\n ctx.translate(cx, cy);\n ctx.rotate(-angle);\n ctx.beginPath();\n this.visuals.line.apply(ctx, idx);\n ctx.strokeStyle = ctx.strokeStyle || \"black\";\n ctx.lineCap = \"round\";\n ctx.lineJoin = \"round\";\n // Determine barbs/flags based on magnitude\n // Standard increments: 50 knots = flag (triangle), 10 knots = full barb, 5 knots = half barb\n const mag_rounded = Math.round(magnitude / 5) * 5;\n if (mag_rounded >= 5) {\n // Draw the main staff (pointing in direction wind is coming from)\n ctx.moveTo(0, 0);\n ctx.lineTo(0, -barb_length);\n ctx.stroke();\n let remaining = mag_rounded;\n let y_offset = -barb_length;\n const spacing = this.model.spacing * scale;\n // Draw 50-knot flags (filled triangles)\n while (remaining >= 50) {\n ctx.fillStyle = ctx.strokeStyle || \"black\";\n ctx.beginPath();\n ctx.moveTo(0, y_offset);\n ctx.lineTo(flag_width, y_offset + spacing);\n ctx.lineTo(0, y_offset + spacing * 2);\n ctx.closePath();\n ctx.fill();\n y_offset += spacing * 2.5;\n remaining -= 50;\n }\n // Draw 10-knot barbs (full lines)\n while (remaining >= 10) {\n ctx.beginPath();\n ctx.moveTo(0, y_offset);\n ctx.lineTo(barb_width, y_offset + barb_width * 0.2);\n ctx.stroke();\n y_offset += spacing;\n remaining -= 10;\n }\n // Draw 5-knot half-barb\n if (remaining >= 5) {\n ctx.beginPath();\n ctx.moveTo(0, y_offset);\n ctx.lineTo(barb_width / 2, y_offset + barb_width * 0.1);\n ctx.stroke();\n }\n }\n else {\n // For calm winds (< 5 knots), draw only a circle (no staff line)\n ctx.beginPath();\n ctx.arc(0, 0, this.model.calm_circle_radius * scale, 0, 2 * Math.PI);\n ctx.stroke();\n }\n ctx.restore();\n }\n _hit_point(geometry) {\n const { sx, sy } = geometry;\n const candidates = [];\n for (let i = 0; i < this.data_size; i++) {\n const dx = this.sx[i] - sx;\n const dy = this.sy[i] - sy;\n const dist = Math.sqrt(dx * dx + dy * dy);\n if (dist < 10 * this.model.scale) { // Hit radius\n candidates.push(i);\n }\n }\n return new selection_1.Selection({ indices: candidates });\n }\n draw_legend_for_index(ctx, { x0, x1, y0, y1 }, _index) {\n const cx = (x0 + x1) / 2;\n const cy = (y0 + y1) / 2;\n // Draw a representative wind barb in the legend\n this._draw_wind_barb(ctx, cx, cy, Math.PI / 4, 25, 0.5);\n }\n }\n exports.WindBarbView = WindBarbView;\n WindBarbView.__name__ = \"WindBarbView\";\n class WindBarb extends xy_glyph_1.XYGlyph {\n constructor(attrs) {\n super(attrs);\n }\n }\n exports.WindBarb = WindBarb;\n _a = WindBarb;\n WindBarb.__name__ = \"WindBarb\";\n WindBarb.__module__ = \"geoviews.models.wind_barb\";\n (() => {\n _a.prototype.default_view = WindBarbView;\n _a.define(({ Float }) => ({\n angle: [p.AngleSpec, { value: 0 }],\n magnitude: [p.NumberSpec, { value: 0 }],\n scale: [Float, 1.0],\n barb_length: [Float, 30.0],\n barb_width: [Float, 15.0],\n flag_width: [Float, 15.0],\n spacing: [Float, 6.0],\n calm_circle_radius: [Float, 3.0],\n }));\n _a.mixins(property_mixins_1.LineVector);\n })();\n}\n","min_source":"function _(e,t,i,s,o){var n;s();const l=e(\"tslib\"),a=e(\"@bokehjs/models/glyphs/xy_glyph\"),r=e(\"@bokehjs/core/property_mixins\"),_=l.__importStar(e(\"@bokehjs/core/properties\")),d=e(\"@bokehjs/models/selections/selection\");class h extends a.XYGlyphView{_paint(e,t,i){const{sx:s,sy:o,angle:n,magnitude:l}=i??this,a=this.y,r=this.model.scale;for(const i of t){const t=s[i],_=o[i],d=n.get(i),h=l.get(i),c=a[i];isFinite(t+_+d+h+c)&&this._draw_wind_barb(e,t,_,d,h,r,i)}}_draw_wind_barb(e,t,i,s,o,n,l=0){const a=this.model.barb_length*n,r=this.model.barb_width*n,_=this.model.flag_width*n;e.save(),e.translate(t,i),e.rotate(-s),e.beginPath(),this.visuals.line.apply(e,l),e.strokeStyle=e.strokeStyle||\"black\",e.lineCap=\"round\",e.lineJoin=\"round\";const d=5*Math.round(o/5);if(d>=5){e.moveTo(0,0),e.lineTo(0,-a),e.stroke();let t=d,i=-a;const s=this.model.spacing*n;for(;t>=50;)e.fillStyle=e.strokeStyle||\"black\",e.beginPath(),e.moveTo(0,i),e.lineTo(_,i+s),e.lineTo(0,i+2*s),e.closePath(),e.fill(),i+=2.5*s,t-=50;for(;t>=10;)e.beginPath(),e.moveTo(0,i),e.lineTo(r,i+.2*r),e.stroke(),i+=s,t-=10;t>=5&&(e.beginPath(),e.moveTo(0,i),e.lineTo(r/2,i+.1*r),e.stroke())}else e.beginPath(),e.arc(0,0,this.model.calm_circle_radius*n,0,2*Math.PI),e.stroke();e.restore()}_hit_point(e){const{sx:t,sy:i}=e,s=[];for(let e=0;e<this.data_size;e++){const o=this.sx[e]-t,n=this.sy[e]-i;Math.sqrt(o*o+n*n)<10*this.model.scale&&s.push(e)}return new d.Selection({indices:s})}draw_legend_for_index(e,{x0:t,x1:i,y0:s,y1:o},n){const l=(t+i)/2,a=(s+o)/2;this._draw_wind_barb(e,l,a,Math.PI/4,25,.5)}}i.WindBarbView=h,h.__name__=\"WindBarbView\";class c extends a.XYGlyph{constructor(e){super(e)}}i.WindBarb=c,n=c,c.__name__=\"WindBarb\",c.__module__=\"geoviews.models.wind_barb\",n.prototype.default_view=h,n.define((({Float:e})=>({angle:[_.AngleSpec,{value:0}],magnitude:[_.NumberSpec,{value:0}],scale:[e,1],barb_length:[e,30],barb_width:[e,15],flag_width:[e,15],spacing:[e,6],calm_circle_radius:[e,3]}))),n.mixins(r.LineVector)}\n//# sourceMappingURL=wind_barb.min.js.map","min_map":"{\"version\":3,\"file\":\"wind_barb.min.js\",\"names\":[\"_\",\"require\",\"module\",\"exports\",\"__esModule\",\"__esExport\",\"_a\",\"tslib_1\",\"xy_glyph_1\",\"property_mixins_1\",\"p\",\"__importStar\",\"selection_1\",\"WindBarbView\",\"XYGlyphView\",\"_paint\",\"ctx\",\"indices\",\"data\",\"sx\",\"sy\",\"angle\",\"magnitude\",\"this\",\"y\",\"scale\",\"model\",\"i\",\"screen_x\",\"screen_y\",\"a\",\"get\",\"mag\",\"lat\",\"isFinite\",\"_draw_wind_barb\",\"cx\",\"cy\",\"idx\",\"barb_length\",\"barb_width\",\"flag_width\",\"save\",\"translate\",\"rotate\",\"beginPath\",\"visuals\",\"line\",\"apply\",\"strokeStyle\",\"lineCap\",\"lineJoin\",\"mag_rounded\",\"Math\",\"round\",\"moveTo\",\"lineTo\",\"stroke\",\"remaining\",\"y_offset\",\"spacing\",\"fillStyle\",\"closePath\",\"fill\",\"arc\",\"calm_circle_radius\",\"PI\",\"restore\",\"_hit_point\",\"geometry\",\"candidates\",\"data_size\",\"dx\",\"dy\",\"sqrt\",\"push\",\"Selection\",\"draw_legend_for_index\",\"x0\",\"x1\",\"y0\",\"y1\",\"_index\",\"__name__\",\"WindBarb\",\"XYGlyph\",\"constructor\",\"attrs\",\"super\",\"__module__\",\"prototype\",\"default_view\",\"define\",\"Float\",\"AngleSpec\",\"value\",\"NumberSpec\",\"mixins\",\"LineVector\"],\"sources\":[\"0\"],\"mappings\":\"AAA0B,SAASA,EAAEC,EAASC,EAAQC,EAASC,EAAYC,GACvE,IAAIC,EACJF,IACA,MAAMG,EAAUN,EAAQ,SAClBO,EAAaP,EAAQ,mCACrBQ,EAAoBR,EAAQ,iCAC5BS,EAAIH,EAAQI,aAAaV,EAAQ,6BACjCW,EAAcX,EAAQ,wCAC5B,MAAMY,UAAqBL,EAAWM,YAClC,MAAAC,CAAOC,EAAKC,EAASC,GACjB,MAAMC,GAAEA,EAAEC,GAAEA,EAAEC,MA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AWA,EACnB9E,EAAK8E,EACLA,EAASD,SAAW,WACpBC,EAASK,WAAa,4BAElBnF,EAAGoF,UAAUC,aAAe9E,EAC5BP,EAAGsF,QAAO,EAAGC,YAAY,CACrBxE,MAAO,CAACX,EAAEoF,UAAW,CAAEC,MAAO,IAC9BzE,UAAW,CAACZ,EAAEsF,WAAY,CAAED,MAAO,IACnCtE,MAAO,CAACoE,EAAO,GACftD,YAAa,CAACsD,EAAO,IACrBrD,WAAY,CAACqD,EAAO,IACpBpD,WAAY,CAACoD,EAAO,IACpBjC,QAAS,CAACiC,EAAO,GACjB5B,mBAAoB,CAAC4B,EAAO,OAEhCvF,EAAG2F,OAAOxF,EAAkByF,WAEpC\",\"ignoreList\":[]}"}}]}
|
package/dist/geoviews.min.js
CHANGED
|
@@ -42,11 +42,12 @@
|
|
|
42
42
|
}
|
|
43
43
|
})
|
|
44
44
|
({
|
|
45
|
-
"c764d38756": function _(e,s,o,t,b){t();const i=e("tslib").__importStar(e("
|
|
46
|
-
"
|
|
45
|
+
"c764d38756": function _(e,s,o,t,b){t();const i=e("tslib").__importStar(e("2e3df39bba"));o.GeoViews=i;(0,e("@bokehjs/base").register_models)(i)},
|
|
46
|
+
"2e3df39bba": function _(o,e,l,d,r){d(),r("CheckpointTool",o("49636d3eef").CheckpointTool),r("ClearTool",o("356402dee7").ClearTool),r("PolyVertexDrawTool",o("c03d81e6d5").PolyVertexDrawTool),r("PolyVertexEditTool",o("238deef1f5").PolyVertexEditTool),r("RestoreTool",o("1a96add9eb").RestoreTool),r("WindBarb",o("028985dc77").WindBarb)},
|
|
47
47
|
"49636d3eef": function _(o,e,s,t,c){var n;t();const i=o("@bokehjs/core/util/object"),r=o("@bokehjs/core/util/array"),l=o("@bokehjs/models/tools/actions/action_tool"),u=o("@bokehjs/models/sources/column_data_source"),_=o("@bokehjs/styles/icons.css");class a extends l.ActionToolView{doit(){const o=this.model.sources;for(const e of o){null==e.buffer&&(e.buffer=[]);const o={};for(const[s,t]of(0,i.entries)(e.data)){const e=[];for(const o of t)Array.isArray(o)||ArrayBuffer.isView(o)?e.push((0,r.copy)(o)):e.push(o);o[s]=e}e.buffer.push(o)}}}s.CheckpointToolView=a,a.__name__="CheckpointToolView";class f extends l.ActionTool{constructor(o){super(o),this.tool_name="Checkpoint",this.tool_icon=_.tool_icon_save}}s.CheckpointTool=f,n=f,f.__name__="CheckpointTool",f.__module__="geoviews.models.custom_tools",n.prototype.default_view=a,n.define((({List:o,Ref:e})=>({sources:[o(e(u.ColumnDataSource)),[]]})))},
|
|
48
48
|
"356402dee7": function _(o,e,s,t,l){var c;t();const _=o("@bokehjs/models/tools/actions/action_tool"),a=o("@bokehjs/models/sources/column_data_source"),n=o("@bokehjs/styles/icons.css");class i extends _.ActionToolView{doit(){for(const o of this.model.sources)o.clear()}}s.ClearToolView=i,i.__name__="ClearToolView";class r extends _.ActionTool{constructor(o){super(o),this.tool_name="Clear data",this.tool_icon=n.tool_icon_reset}}s.ClearTool=r,c=r,r.__name__="ClearTool",r.__module__="geoviews.models.custom_tools",c.prototype.default_view=i,c.define((({List:o,Ref:e})=>({sources:[o(e(a.ColumnDataSource)),[]]})))},
|
|
49
49
|
"c03d81e6d5": function _(e,s,t,o,r){var l;o();const i=e("@bokehjs/core/vectorization"),n=e("@bokehjs/core/util/object"),c=e("@bokehjs/core/util/types"),a=e("@bokehjs/core/util/assert"),_=e("@bokehjs/models/tools/edit/poly_draw_tool");class d extends _.PolyDrawToolView{_split_path(e,s){for(const t of this.model.renderers){const o=t.glyph,r=t.data_source,[l,i]=[o.xs.field,o.ys.field],n=r.data[l],a=r.data[i];for(let t=0;t<n.length;t++){let o=n[t];(0,c.isArray)(o)||(o=Array.from(o),r.data[l][t]=o);let _=a[t];(0,c.isArray)(_)||(_=Array.from(_),r.data[i][t]=_);for(let c=0;c<o.length;c++)if(o[c]==e&&_[c]==s&&0!=c&&c!=o.length-1){n.splice(t+1,0,o.slice(c)),a.splice(t+1,0,_.slice(c)),o.splice(c+1),_.splice(c+1);for(const e of r.columns())e!==l&&e!=i&&r.data[e].splice(t+1,0,r.data[e][t]);return}}}}_snap_to_vertex(e,s,t){const{vertex_renderer:o}=this.model;if(null!=o){const r=this._select_event(e,"replace",[o]),l=o.data_source,i=o.glyph,[n,c]=[i.x.field,i.y.field];if(r.length>0){const o=l.selected.indices[0];n&&(s=l.get(n)[o]),c&&(t=l.get(c)[o]),"move"!=e.type&&this._split_path(s,t),l.selection_manager.clear()}}return[s,t]}_set_vertices(e,s,t){const{vertex_renderer:o}=this.model;if(null==o)return;const r=o.glyph,l=o.data_source,[i,a]=[r.x.field,r.y.field];if(i&&((0,c.isArray)(e)?l.set(i,e):r.x={value:e}),a&&((0,c.isArray)(s)?l.set(a,s):r.y={value:s}),null!=t)for(const e of(0,n.keys)(t))l.set(e,t[e]),r[e]={field:e};else for(const e of l.columns())l.set(e,[]);this._emit_cds_changes(l,!0,!0,!1)}_show_vertices(){if(!this.model.active)return;const{renderers:e,node_style:s,end_style:t}=this.model,o=[],r=[],l={};for(const e of(0,n.keys)(t))l[e]=[];for(let i=0;i<e.length;i++){const _=e[i],d=_.data_source,f=_.glyph,[h,y]=[f.xs.field,f.ys.field];for(const e of d.get_array(h)){(0,a.assert)((0,c.isArray)(e)),o.push(...e);for(const[e,s]of(0,n.entries)(t))l[e].push(s);for(const[t,o]of(0,n.entries)(s))for(let s=0;s<e.length-2;s++)l[t].push(o);for(const[e,s]of(0,n.entries)(t))l[e].push(s)}for(const e of d.get_array(y))(0,a.assert)((0,c.isArray)(e)),r.push(...e);if(this._drawing&&i==e.length-1){o.splice(o.length-1,1),r.splice(r.length-1,1);for(const[e,s]of(0,n.entries)(l))s.splice(s.length-1,1)}}this._set_vertices(o,r,l)}_remove(){const e=this.model.renderers[0],s=e.data_source,t=e.glyph;if((0,i.isField)(t.xs)){const e=t.xs.field,o=s.get_array(e),r=o.length-1,l=o[r];l.splice(l.length-1,1),1==l.length&&o.splice(r,1)}if((0,i.isField)(t.ys)){const e=t.ys.field,o=s.get_array(e),r=o.length-1,l=o[r];l.splice(l.length-1,1),1==l.length&&o.splice(r,1)}this._emit_cds_changes(s),this._drawing=!1,this._show_vertices()}}t.PolyVertexDrawToolView=d,d.__name__="PolyVertexDrawToolView";class f extends _.PolyDrawTool{constructor(e){super(e)}}t.PolyVertexDrawTool=f,l=f,f.__name__="PolyVertexDrawTool",f.__module__="geoviews.models.custom_tools",l.prototype.default_view=d,l.define((({Dict:e,Unknown:s})=>({end_style:[e(s),{}],node_style:[e(s),{}]})))},
|
|
50
50
|
"238deef1f5": function _(e,t,s,r,i){var n;r();const o=e("@bokehjs/core/util/object"),_=e("@bokehjs/core/util/types"),l=e("@bokehjs/models/tools/edit/poly_edit_tool");class d extends l.PolyEditToolView{deactivate(){this._hide_vertices(),null!=this._selected_renderer&&(this._drawing&&(this._remove_vertex(),this._drawing=!1),this._emit_cds_changes(this._selected_renderer.data_source,!1,!0,!1))}_pan(e){if(null==this._basepoint||null==this.model.vertex_renderer)return;const t=this._drag_points(e,[this.model.vertex_renderer]);e.modifiers.shift||this._move_linked(t),null!=this._selected_renderer&&this._selected_renderer.data_source.change.emit()}_pan_end(e){if(null==this._basepoint||null==this.model.vertex_renderer)return;const t=this._drag_points(e,[this.model.vertex_renderer]);e.modifiers.shift||this._move_linked(t),this._emit_cds_changes(this.model.vertex_renderer.data_source,!1,!0,!0),null!=this._selected_renderer&&this._emit_cds_changes(this._selected_renderer.data_source),this._basepoint=null}_drag_points(e,t){if(null==this._basepoint)return[];const[s,r]=this._basepoint,i=[];for(const n of t){const t=this._map_drag(s,r,n),o=this._map_drag(e.sx,e.sy,n);if(null==o||null==t)continue;const[_,l]=o,[d,c]=t,[h,a]=[_-d,l-c],u=n.glyph,f=n.data_source,[m,g]=[u.x.field,u.y.field];for(const e of f.selected.indices){const t=[];if(m){const s=f.get(m);t.push(s[e]),s[e]+=h}if(g){const s=f.get(g);t.push(s[e]),s[e]+=a}t.push(h),t.push(a),i.push(t)}f.change.emit()}return this._basepoint=[e.sx,e.sy],i}_set_vertices(e,t,s){if(null==this.model.vertex_renderer)return;const r=this.model.vertex_renderer.glyph,i=this.model.vertex_renderer.data_source,[n,l]=[r.x.field,r.y.field];if(n&&((0,_.isArray)(e)?i.set(n,e):r.x={value:e}),l&&((0,_.isArray)(t)?i.set(l,t):r.y={value:t}),null!=s)for(const[e,t]of(0,o.entries)(s))i.set(e,t),r[e]={field:e};else for(const e of i.columns())i.set(e,[]);this._emit_cds_changes(i,!0,!0,!1)}_move_linked(e){if(null==this._selected_renderer)return;const t=this._selected_renderer,s=t.glyph,r=t.data_source,[i,n]=[s.xs.field,s.ys.field],o=r.data[i],_=r.data[n];for(const t of e){const[e,s,r,i]=t;for(let t=0;t<o.length;t++){const n=o[t],l=_[t];for(let t=0;t<n.length;t++)n[t]==e&&l[t]==s&&(n[t]+=r,l[t]+=i)}}}_tap(e){if(null==this.model.vertex_renderer)return;const t=this.model.vertex_renderer,s=this._map_drag(e.sx,e.sy,t);if(null!=s){if(this._drawing&&null!=this._selected_renderer){let[r,i]=s;const n=t.data_source,o=t.glyph,[_,l]=[o.x.field,o.y.field],d=n.selected.indices;[r,i]=this._snap_to_vertex(e,r,i);const c=d[0];if(n.selected.indices=[c+1],_){const e=n.get_array(_),t=e[c];e[c]=r,e.splice(c+1,0,t)}if(l){const e=n.get_array(l),t=e[c];e[c]=i,e.splice(c+1,0,t)}return n.change.emit(),void this._emit_cds_changes(this._selected_renderer.data_source,!0,!1,!0)}this._select_event(e,this._select_mode(e),[t])}}_show_vertices(e){if(!this.model.active)return;const t=this._select_event(e,"replace",this.model.renderers);if(0===t.length)return this._hide_vertices(),this._selected_renderer=null,void(this._drawing=!1);const s=t[0],r=s.glyph,i=s.data_source,n=i.selected.indices[0],[l,d]=[r.xs.field,r.ys.field];let c,h;l?(c=i.get(l)[n],(0,_.isArray)(c)||(i.get(l)[n]=c=Array.from(c))):c=r.xs.value,d?(h=i.get(d)[n],(0,_.isArray)(h)||(i.get(d)[n]=h=Array.from(h))):h=r.ys.value;const{end_style:a,node_style:u}=this.model,f={};for(const[e,t]of(0,o.entries)(a))f[e]=[t];for(const[e,t]of(0,o.entries)(u))for(let s=0;s<c.length-2;s++)f[e].push(t);for(const[e,t]of(0,o.entries)(a))f[e].push(t);this._selected_renderer=s,this._set_vertices(c,h,f)}}s.PolyVertexEditToolView=d,d.__name__="PolyVertexEditToolView";class c extends l.PolyEditTool{constructor(e){super(e)}}s.PolyVertexEditTool=c,n=c,c.__name__="PolyVertexEditTool",c.__module__="geoviews.models.custom_tools",n.prototype.default_view=d,n.define((({Dict:e,Unknown:t})=>({end_style:[e(t),{}],node_style:[e(t),{}]})))},
|
|
51
51
|
"1a96add9eb": function _(o,e,s,t,c){var n;t();const l=o("@bokehjs/models/tools/actions/action_tool"),i=o("@bokehjs/models/sources/column_data_source"),_=o("@bokehjs/styles/icons.css");class a extends l.ActionToolView{doit(){const o=this.model.sources;for(const e of o){const o=e.buffer?.pop();null!=o&&(e.data=o,e.change.emit(),e.properties.data.change.emit())}}}s.RestoreToolView=a,a.__name__="RestoreToolView";class r extends l.ActionTool{constructor(o){super(o),this.tool_name="Restore",this.tool_icon=_.tool_icon_undo}}s.RestoreTool=r,n=r,r.__name__="RestoreTool",r.__module__="geoviews.models.custom_tools",n.prototype.default_view=a,n.define((({List:o,Ref:e})=>({sources:[o(e(i.ColumnDataSource)),[]]})))},
|
|
52
|
-
|
|
52
|
+
"028985dc77": function _(e,t,i,s,o){var n;s();const l=e("tslib"),a=e("@bokehjs/models/glyphs/xy_glyph"),r=e("@bokehjs/core/property_mixins"),_=l.__importStar(e("@bokehjs/core/properties")),d=e("@bokehjs/models/selections/selection");class h extends a.XYGlyphView{_paint(e,t,i){const{sx:s,sy:o,angle:n,magnitude:l}=i??this,a=this.y,r=this.model.scale;for(const i of t){const t=s[i],_=o[i],d=n.get(i),h=l.get(i),c=a[i];isFinite(t+_+d+h+c)&&this._draw_wind_barb(e,t,_,d,h,r,i)}}_draw_wind_barb(e,t,i,s,o,n,l=0){const a=this.model.barb_length*n,r=this.model.barb_width*n,_=this.model.flag_width*n;e.save(),e.translate(t,i),e.rotate(-s),e.beginPath(),this.visuals.line.apply(e,l),e.strokeStyle=e.strokeStyle||"black",e.lineCap="round",e.lineJoin="round";const d=5*Math.round(o/5);if(d>=5){e.moveTo(0,0),e.lineTo(0,-a),e.stroke();let t=d,i=-a;const s=this.model.spacing*n;for(;t>=50;)e.fillStyle=e.strokeStyle||"black",e.beginPath(),e.moveTo(0,i),e.lineTo(_,i+s),e.lineTo(0,i+2*s),e.closePath(),e.fill(),i+=2.5*s,t-=50;for(;t>=10;)e.beginPath(),e.moveTo(0,i),e.lineTo(r,i+.2*r),e.stroke(),i+=s,t-=10;t>=5&&(e.beginPath(),e.moveTo(0,i),e.lineTo(r/2,i+.1*r),e.stroke())}else e.beginPath(),e.arc(0,0,this.model.calm_circle_radius*n,0,2*Math.PI),e.stroke();e.restore()}_hit_point(e){const{sx:t,sy:i}=e,s=[];for(let e=0;e<this.data_size;e++){const o=this.sx[e]-t,n=this.sy[e]-i;Math.sqrt(o*o+n*n)<10*this.model.scale&&s.push(e)}return new d.Selection({indices:s})}draw_legend_for_index(e,{x0:t,x1:i,y0:s,y1:o},n){const l=(t+i)/2,a=(s+o)/2;this._draw_wind_barb(e,l,a,Math.PI/4,25,.5)}}i.WindBarbView=h,h.__name__="WindBarbView";class c extends a.XYGlyph{constructor(e){super(e)}}i.WindBarb=c,n=c,c.__name__="WindBarb",c.__module__="geoviews.models.wind_barb",n.prototype.default_view=h,n.define((({Float:e})=>({angle:[_.AngleSpec,{value:0}],magnitude:[_.NumberSpec,{value:0}],scale:[e,1],barb_length:[e,30],barb_width:[e,15],flag_width:[e,15],spacing:[e,6],calm_circle_radius:[e,3]}))),n.mixins(r.LineVector)},
|
|
53
|
+
}, "c764d38756", {"index":"c764d38756","models/index":"2e3df39bba","models/checkpoint_tool":"49636d3eef","models/clear_tool":"356402dee7","models/poly_draw":"c03d81e6d5","models/poly_edit":"238deef1f5","models/restore_tool":"1a96add9eb","models/wind_barb":"028985dc77"}, {});});
|
package/dist/lib/models/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../models/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,cAAc,EAAC,MAAM,mBAAmB,CAAA;AAChD,OAAO,EAAC,SAAS,EAAC,MAAM,cAAc,CAAA;AACtC,OAAO,EAAC,kBAAkB,EAAC,MAAM,aAAa,CAAA;AAC9C,OAAO,EAAC,kBAAkB,EAAC,MAAM,aAAa,CAAA;AAC9C,OAAO,EAAC,WAAW,EAAC,MAAM,gBAAgB,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../models/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,cAAc,EAAC,MAAM,mBAAmB,CAAA;AAChD,OAAO,EAAC,SAAS,EAAC,MAAM,cAAc,CAAA;AACtC,OAAO,EAAC,kBAAkB,EAAC,MAAM,aAAa,CAAA;AAC9C,OAAO,EAAC,kBAAkB,EAAC,MAAM,aAAa,CAAA;AAC9C,OAAO,EAAC,WAAW,EAAC,MAAM,gBAAgB,CAAA;AAC1C,OAAO,EAAC,QAAQ,EAAC,MAAM,aAAa,CAAA"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { XYGlyph, XYGlyphView } from "@bokehjs/models/glyphs/xy_glyph";
|
|
2
|
+
import type { PointGeometry } from "@bokehjs/core/geometry";
|
|
3
|
+
import type { Context2d } from "@bokehjs/core/util/canvas";
|
|
4
|
+
import type * as visuals from "@bokehjs/core/visuals";
|
|
5
|
+
import * as p from "@bokehjs/core/properties";
|
|
6
|
+
import { Selection } from "@bokehjs/models/selections/selection";
|
|
7
|
+
export interface WindBarbView extends WindBarb.Data {
|
|
8
|
+
}
|
|
9
|
+
export declare class WindBarbView extends XYGlyphView {
|
|
10
|
+
model: WindBarb;
|
|
11
|
+
visuals: WindBarb.Visuals;
|
|
12
|
+
protected _paint(ctx: Context2d, indices: number[], data?: WindBarb.Data): void;
|
|
13
|
+
protected _draw_wind_barb(ctx: Context2d, cx: number, cy: number, angle: number, magnitude: number, scale: number, idx?: number): void;
|
|
14
|
+
protected _hit_point(geometry: PointGeometry): Selection;
|
|
15
|
+
draw_legend_for_index(ctx: Context2d, { x0, x1, y0, y1 }: {
|
|
16
|
+
x0: number;
|
|
17
|
+
y0: number;
|
|
18
|
+
x1: number;
|
|
19
|
+
y1: number;
|
|
20
|
+
}, _index: number): void;
|
|
21
|
+
}
|
|
22
|
+
export declare namespace WindBarb {
|
|
23
|
+
type Attrs = p.AttrsOf<Props>;
|
|
24
|
+
type Props = XYGlyph.Props & {
|
|
25
|
+
angle: p.AngleSpec;
|
|
26
|
+
magnitude: p.NumberSpec;
|
|
27
|
+
scale: p.Property<number>;
|
|
28
|
+
barb_length: p.Property<number>;
|
|
29
|
+
barb_width: p.Property<number>;
|
|
30
|
+
flag_width: p.Property<number>;
|
|
31
|
+
spacing: p.Property<number>;
|
|
32
|
+
calm_circle_radius: p.Property<number>;
|
|
33
|
+
};
|
|
34
|
+
type Visuals = XYGlyph.Visuals & {
|
|
35
|
+
line: visuals.LineVector;
|
|
36
|
+
};
|
|
37
|
+
type Data = p.GlyphDataOf<Props>;
|
|
38
|
+
}
|
|
39
|
+
export interface WindBarb extends WindBarb.Attrs {
|
|
40
|
+
}
|
|
41
|
+
export declare class WindBarb extends XYGlyph {
|
|
42
|
+
properties: WindBarb.Props;
|
|
43
|
+
__view_type__: WindBarbView;
|
|
44
|
+
constructor(attrs?: Partial<WindBarb.Attrs>);
|
|
45
|
+
static __module__: string;
|
|
46
|
+
}
|
|
47
|
+
//# sourceMappingURL=wind_barb.d.ts.map
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
import { XYGlyph, XYGlyphView } from "@bokehjs/models/glyphs/xy_glyph";
|
|
2
|
+
import { LineVector } from "@bokehjs/core/property_mixins";
|
|
3
|
+
import * as p from "@bokehjs/core/properties";
|
|
4
|
+
import { Selection } from "@bokehjs/models/selections/selection";
|
|
5
|
+
export class WindBarbView extends XYGlyphView {
|
|
6
|
+
static __name__ = "WindBarbView";
|
|
7
|
+
_paint(ctx, indices, data) {
|
|
8
|
+
const { sx, sy, angle, magnitude } = data ?? this;
|
|
9
|
+
const y = this.y;
|
|
10
|
+
const scale = this.model.scale;
|
|
11
|
+
for (const i of indices) {
|
|
12
|
+
const screen_x = sx[i];
|
|
13
|
+
const screen_y = sy[i];
|
|
14
|
+
const a = angle.get(i);
|
|
15
|
+
const mag = magnitude.get(i);
|
|
16
|
+
const lat = y[i];
|
|
17
|
+
if (!isFinite(screen_x + screen_y + a + mag + lat))
|
|
18
|
+
continue;
|
|
19
|
+
this._draw_wind_barb(ctx, screen_x, screen_y, a, mag, scale, i);
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
_draw_wind_barb(ctx, cx, cy, angle, magnitude, scale, idx = 0) {
|
|
23
|
+
// Wind barb drawing using meteorological convention
|
|
24
|
+
// magnitude is in knots (or appropriate units)
|
|
25
|
+
// angle is in meteorological convention (direction wind comes FROM)
|
|
26
|
+
// barbs point in the direction the wind is coming FROM
|
|
27
|
+
const barb_length = this.model.barb_length * scale;
|
|
28
|
+
const barb_width = this.model.barb_width * scale;
|
|
29
|
+
const flag_width = this.model.flag_width * scale;
|
|
30
|
+
ctx.save();
|
|
31
|
+
ctx.translate(cx, cy);
|
|
32
|
+
ctx.rotate(-angle);
|
|
33
|
+
ctx.beginPath();
|
|
34
|
+
this.visuals.line.apply(ctx, idx);
|
|
35
|
+
ctx.strokeStyle = ctx.strokeStyle || "black";
|
|
36
|
+
ctx.lineCap = "round";
|
|
37
|
+
ctx.lineJoin = "round";
|
|
38
|
+
// Determine barbs/flags based on magnitude
|
|
39
|
+
// Standard increments: 50 knots = flag (triangle), 10 knots = full barb, 5 knots = half barb
|
|
40
|
+
const mag_rounded = Math.round(magnitude / 5) * 5;
|
|
41
|
+
if (mag_rounded >= 5) {
|
|
42
|
+
// Draw the main staff (pointing in direction wind is coming from)
|
|
43
|
+
ctx.moveTo(0, 0);
|
|
44
|
+
ctx.lineTo(0, -barb_length);
|
|
45
|
+
ctx.stroke();
|
|
46
|
+
let remaining = mag_rounded;
|
|
47
|
+
let y_offset = -barb_length;
|
|
48
|
+
const spacing = this.model.spacing * scale;
|
|
49
|
+
// Draw 50-knot flags (filled triangles)
|
|
50
|
+
while (remaining >= 50) {
|
|
51
|
+
ctx.fillStyle = ctx.strokeStyle || "black";
|
|
52
|
+
ctx.beginPath();
|
|
53
|
+
ctx.moveTo(0, y_offset);
|
|
54
|
+
ctx.lineTo(flag_width, y_offset + spacing);
|
|
55
|
+
ctx.lineTo(0, y_offset + spacing * 2);
|
|
56
|
+
ctx.closePath();
|
|
57
|
+
ctx.fill();
|
|
58
|
+
y_offset += spacing * 2.5;
|
|
59
|
+
remaining -= 50;
|
|
60
|
+
}
|
|
61
|
+
// Draw 10-knot barbs (full lines)
|
|
62
|
+
while (remaining >= 10) {
|
|
63
|
+
ctx.beginPath();
|
|
64
|
+
ctx.moveTo(0, y_offset);
|
|
65
|
+
ctx.lineTo(barb_width, y_offset + barb_width * 0.2);
|
|
66
|
+
ctx.stroke();
|
|
67
|
+
y_offset += spacing;
|
|
68
|
+
remaining -= 10;
|
|
69
|
+
}
|
|
70
|
+
// Draw 5-knot half-barb
|
|
71
|
+
if (remaining >= 5) {
|
|
72
|
+
ctx.beginPath();
|
|
73
|
+
ctx.moveTo(0, y_offset);
|
|
74
|
+
ctx.lineTo(barb_width / 2, y_offset + barb_width * 0.1);
|
|
75
|
+
ctx.stroke();
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
else {
|
|
79
|
+
// For calm winds (< 5 knots), draw only a circle (no staff line)
|
|
80
|
+
ctx.beginPath();
|
|
81
|
+
ctx.arc(0, 0, this.model.calm_circle_radius * scale, 0, 2 * Math.PI);
|
|
82
|
+
ctx.stroke();
|
|
83
|
+
}
|
|
84
|
+
ctx.restore();
|
|
85
|
+
}
|
|
86
|
+
_hit_point(geometry) {
|
|
87
|
+
const { sx, sy } = geometry;
|
|
88
|
+
const candidates = [];
|
|
89
|
+
for (let i = 0; i < this.data_size; i++) {
|
|
90
|
+
const dx = this.sx[i] - sx;
|
|
91
|
+
const dy = this.sy[i] - sy;
|
|
92
|
+
const dist = Math.sqrt(dx * dx + dy * dy);
|
|
93
|
+
if (dist < 10 * this.model.scale) { // Hit radius
|
|
94
|
+
candidates.push(i);
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
return new Selection({ indices: candidates });
|
|
98
|
+
}
|
|
99
|
+
draw_legend_for_index(ctx, { x0, x1, y0, y1 }, _index) {
|
|
100
|
+
const cx = (x0 + x1) / 2;
|
|
101
|
+
const cy = (y0 + y1) / 2;
|
|
102
|
+
// Draw a representative wind barb in the legend
|
|
103
|
+
this._draw_wind_barb(ctx, cx, cy, Math.PI / 4, 25, 0.5);
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
export class WindBarb extends XYGlyph {
|
|
107
|
+
static __name__ = "WindBarb";
|
|
108
|
+
constructor(attrs) {
|
|
109
|
+
super(attrs);
|
|
110
|
+
}
|
|
111
|
+
static __module__ = "geoviews.models.wind_barb";
|
|
112
|
+
static {
|
|
113
|
+
this.prototype.default_view = WindBarbView;
|
|
114
|
+
this.define(({ Float }) => ({
|
|
115
|
+
angle: [p.AngleSpec, { value: 0 }],
|
|
116
|
+
magnitude: [p.NumberSpec, { value: 0 }],
|
|
117
|
+
scale: [Float, 1.0],
|
|
118
|
+
barb_length: [Float, 30.0],
|
|
119
|
+
barb_width: [Float, 15.0],
|
|
120
|
+
flag_width: [Float, 15.0],
|
|
121
|
+
spacing: [Float, 6.0],
|
|
122
|
+
calm_circle_radius: [Float, 3.0],
|
|
123
|
+
}));
|
|
124
|
+
this.mixins(LineVector);
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
//# sourceMapping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"1.15.0-b.1",
|
|
4
4
|
"description": "Simple, concise geographical visualization in Python",
|
|
5
5
|
"license": "BSD-3-Clause",
|
|
6
6
|
"repository": {
|
|
@@ -8,13 +8,12 @@
|
|
|
8
8
|
"url": "https://github.com/holoviz/geoviews.git"
|
|
9
9
|
},
|
|
10
10
|
"dependencies": {
|
|
11
|
-
"@bokeh/bokehjs": "
|
|
11
|
+
"@bokeh/bokehjs": "^3.8.0",
|
|
12
12
|
"@stylistic/eslint-plugin": "^1.6.3",
|
|
13
13
|
"@typescript-eslint/eslint-plugin": "^7.2.0",
|
|
14
14
|
"@typescript-eslint/parser": "^7.2.0",
|
|
15
15
|
"eslint": "^8.57.0"
|
|
16
16
|
},
|
|
17
|
-
"devDependencies": {},
|
|
18
17
|
"files": [
|
|
19
18
|
"dist/**/*.{js,js.map,d.ts,json,css}"
|
|
20
19
|
],
|