zywlgis 0.5.14 → 0.5.15
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/ZYWLGIS.es.js +377 -538
- package/dist/ZYWLGIS.umd.js +23 -23
- package/index.html +15 -0
- package/jsconfig.json +8 -0
- package/package.json +2 -11
- package/public/data/models/ArrowX.glb +0 -0
- package/public/data/models/ArrowY.glb +0 -0
- package/public/data/models/ArrowZ.glb +0 -0
- package/public/data/models/SphereX.glb +0 -0
- package/public/data/models/SphereY.glb +0 -0
- package/public/data/models/SphereZ.glb +0 -0
- package/public/data/models/uav.glb +0 -0
- package/public/favicon.ico +0 -0
- package/public/libs/SuperMap3D/Assets/Textures/excavationregion_bottom.jpg +0 -0
- package/public/libs/SuperMap3D/Assets/Textures/excavationregion_side.jpg +0 -0
- package/public/libs/SuperMap3D/Assets/Textures/grepin.png +0 -0
- package/public/libs/SuperMap3D/Assets/Textures/middle-edit.png +0 -0
- package/public/libs/SuperMap3D/Assets/Textures/vertex-edit.png +0 -0
- package/public/libs/SuperMap3D/SuperMap3D.js +52777 -0
- package/public/libs/SuperMap3D/ThirdParty/basis_transcoder.wasm +0 -0
- package/public/libs/SuperMap3D/ThirdParty/crunch.wasm +0 -0
- package/public/libs/SuperMap3D/ThirdParty/draco_decoder_new.wasm +0 -0
- package/public/libs/cpRPA.js +277 -0
- package/public/libs/egm96_mhl.js +65560 -0
- package/public/libs/heatmap.js +717 -0
- package/public/libs/measure.js +1068 -0
- package/public/libs/three-to-cesium.js +143 -0
- package/public/logo.png +0 -0
- package/src/App.vue +5 -0
- package/src/components/HeatMap/ZYWLHeatMap.js +541 -0
- package/src/components/ZYWLGIS.vue +6179 -0
- package/src/components/ZYWLGIS2D/MapTalks/GraphicEditings/ZYWLGraphicEditingCircle.js +645 -0
- package/src/components/ZYWLGIS2D/MapTalks/GraphicEditings/ZYWLGraphicEditingIcon.js +391 -0
- package/src/components/ZYWLGIS2D/MapTalks/GraphicEditings/ZYWLGraphicEditingPoint.js +389 -0
- package/src/components/ZYWLGIS2D/MapTalks/GraphicEditings/ZYWLGraphicEditingPolygon.js +1159 -0
- package/src/components/ZYWLGIS2D/MapTalks/GraphicEditings/ZYWLGraphicEditingPolyline.js +1101 -0
- package/src/components/ZYWLGIS2D/MapTalks/GraphicEditings/ZYWLGraphicEditingPolylineDraw.js +1099 -0
- package/src/components/ZYWLGIS2D/MapTalks/Models/ZYWLModel.js +281 -0
- package/src/components/ZYWLGIS2D/MapTalks/NotEditables/ZYWLNotEditableCircle.js +234 -0
- package/src/components/ZYWLGIS2D/MapTalks/NotEditables/ZYWLNotEditableDashedLine.js +401 -0
- package/src/components/ZYWLGIS2D/MapTalks/NotEditables/ZYWLNotEditableIcon.js +237 -0
- package/src/components/ZYWLGIS2D/MapTalks/NotEditables/ZYWLNotEditablePoint.js +238 -0
- package/src/components/ZYWLGIS2D/MapTalks/NotEditables/ZYWLNotEditablePolygon.js +337 -0
- package/src/components/ZYWLGIS2D/MapTalks/NotEditables/ZYWLNotEditablePolyline.js +326 -0
- package/src/components/ZYWLGIS2D/MapTalks/PhotoPresentation/ZYWLPhotoPresentation.js +67 -0
- package/src/components/ZYWLGIS2D/OpenLayers/GraphicEditings/ZYWLGraphicEditingCircle.js +768 -0
- package/src/components/ZYWLGIS2D/OpenLayers/GraphicEditings/ZYWLGraphicEditingIcon.js +448 -0
- package/src/components/ZYWLGIS2D/OpenLayers/GraphicEditings/ZYWLGraphicEditingPoint.js +453 -0
- package/src/components/ZYWLGIS2D/OpenLayers/GraphicEditings/ZYWLGraphicEditingPolygon.js +1238 -0
- package/src/components/ZYWLGIS2D/OpenLayers/GraphicEditings/ZYWLGraphicEditingPolyline.js +1218 -0
- package/src/components/ZYWLGIS2D/OpenLayers/Models/ZYWLModel.js +381 -0
- package/src/components/ZYWLGIS2D/OpenLayers/NotEditables/ZYWLNotEditableCircle.js +290 -0
- package/src/components/ZYWLGIS2D/OpenLayers/NotEditables/ZYWLNotEditableDashedLine.js +416 -0
- package/src/components/ZYWLGIS2D/OpenLayers/NotEditables/ZYWLNotEditableIcon.js +319 -0
- package/src/components/ZYWLGIS2D/OpenLayers/NotEditables/ZYWLNotEditablePoint.js +277 -0
- package/src/components/ZYWLGIS2D/OpenLayers/NotEditables/ZYWLNotEditablePolygon.js +375 -0
- package/src/components/ZYWLGIS2D/OpenLayers/NotEditables/ZYWLNotEditablePolyline.js +370 -0
- package/src/components/ZYWLGIS2D/OpenLayers/PhotoPresentation/ZYWLPhotoPresentation.js +83 -0
- package/src/components/ZYWLGIS3D/GeometryEditings/ZYWLGeometryEditingCircle.js +1295 -0
- package/src/components/ZYWLGIS3D/GeometryEditings/ZYWLGeometryEditingCircleWall.js +1484 -0
- package/src/components/ZYWLGIS3D/GeometryEditings/ZYWLGeometryEditingGroundPolygon.js +1779 -0
- package/src/components/ZYWLGIS3D/GeometryEditings/ZYWLGeometryEditingPolygonWall.js +1400 -0
- package/src/components/ZYWLGIS3D/GeometryEditings/ZYWLGeometryEditingPolyline.js +1992 -0
- package/src/components/ZYWLGIS3D/GeometryEditings/ZYWLGeometryEditingSlantPolygon.js +1394 -0
- package/src/components/ZYWLGIS3D/GraphicEditings/ZYWLGraphicEditingCircle.js +932 -0
- package/src/components/ZYWLGIS3D/GraphicEditings/ZYWLGraphicEditingIcon.js +411 -0
- package/src/components/ZYWLGIS3D/GraphicEditings/ZYWLGraphicEditingPoint.js +408 -0
- package/src/components/ZYWLGIS3D/GraphicEditings/ZYWLGraphicEditingPolygon.js +1032 -0
- package/src/components/ZYWLGIS3D/GraphicEditings/ZYWLGraphicEditingPolyline.js +1130 -0
- package/src/components/ZYWLGIS3D/Models/ZYWLFrustum.js +262 -0
- package/src/components/ZYWLGIS3D/Models/ZYWLModel.js +326 -0
- package/src/components/ZYWLGIS3D/NotEditables/ZYWLNotEditableCircle.js +494 -0
- package/src/components/ZYWLGIS3D/NotEditables/ZYWLNotEditableDashedLine.js +537 -0
- package/src/components/ZYWLGIS3D/NotEditables/ZYWLNotEditableIcon.js +323 -0
- package/src/components/ZYWLGIS3D/NotEditables/ZYWLNotEditablePoint.js +320 -0
- package/src/components/ZYWLGIS3D/NotEditables/ZYWLNotEditablePolygon.js +478 -0
- package/src/components/ZYWLGIS3D/NotEditables/ZYWLNotEditablePolyline.js +384 -0
- package/src/components/ZYWLGIS3D/PhotoPresentation/ZYWLPhotoPresentation.js +88 -0
- package/src/components/ZYWLGIS3D/PointCloudRecognition/ZYWLPointCloudRecognition.js +235 -0
- package/src/components/ZYWLGIS3D/S3M/ZYWLS3M.js +100 -0
- package/src/components/ZYWLGIS3D/Tilesets/ZYWL3DTileset.js +214 -0
- package/src/components/ZYWLGIS3D/ZYWLCustomHTML.js +263 -0
- package/src/components/ZYWLMaplibreGL/ZYWLMapLibreGLPolyline.js +49 -0
- package/src/components/ZYWLSplitScreen/BaseEngine.js +518 -0
- package/src/components/ZYWLSplitScreen/GangedScreen.vue +300 -0
- package/src/components/ZYWLSplitScreen/GeoBase.js +253 -0
- package/src/components/ZYWLSplitScreen/GeoPoint.js +198 -0
- package/src/components/ZYWLSplitScreen/GeoPolygon.js +331 -0
- package/src/components/ZYWLSplitScreen/GeoPolyline.js +296 -0
- package/src/components/ZYWLSplitScreen/GeoText.js +184 -0
- package/src/components/ZYWLSplitScreen/LeftEngine.js +50 -0
- package/src/components/ZYWLSplitScreen/RightEngine.js +56 -0
- package/src/components/ZYWLTools/Arrows.png +0 -0
- package/src/components/ZYWLTools/BillboardBG.svg +10 -0
- package/src/components/ZYWLTools/GISTool.js +10780 -0
- package/src/components/ZYWLTools/PointOfInterest.png +0 -0
- package/src/components/ZYWLTools/PointOfInterestClose.png +0 -0
- package/src/components/ZYWLTools/PointOfInterestOpen.png +0 -0
- package/src/components/ZYWLTools/TakeOffBillboard.png +0 -0
- package/src/components/ZYWLTools/TakeOffCursor.ico +0 -0
- package/src/components/ZYWLTools/ZYWL.css +183 -0
- package/src/components/ZYWLTools/ZYWLAxis.js +1060 -0
- package/src/components/ZYWLTools/air2D.svg +59 -0
- package/src/components/ZYWLTools/airLogo.png +0 -0
- package/src/components/ZYWLTools/arrow.png +0 -0
- package/src/components/ZYWLTools/arrowH.png +0 -0
- package/src/components/ZYWLTools/sliderSvg.svg +7 -0
- package/src/components/ZYWLVector/ZYWLVectorData.js +674 -0
- package/src/components/ZYWLVideo/ZYWLVideoProjection.js +312 -0
- package/src/components/icons/IconCommunity.vue +7 -0
- package/src/components/icons/IconDocumentation.vue +7 -0
- package/src/components/icons/IconEcosystem.vue +7 -0
- package/src/components/icons/IconSupport.vue +7 -0
- package/src/components/icons/IconTooling.vue +19 -0
- package/src/index.js +2 -0
- package/src/main.js +19 -0
package/dist/ZYWLGIS.es.js
CHANGED
|
@@ -3092,21 +3092,21 @@ rbush.prototype = {
|
|
|
3092
3092
|
},
|
|
3093
3093
|
search: function(t) {
|
|
3094
3094
|
var n = this.data, r = [], o = this.toBBox;
|
|
3095
|
-
if (!intersects$
|
|
3095
|
+
if (!intersects$4(t, n)) return r;
|
|
3096
3096
|
for (var c = [], l, d, h, f; n; ) {
|
|
3097
3097
|
for (l = 0, d = n.children.length; l < d; l++)
|
|
3098
|
-
h = n.children[l], f = n.leaf ? o(h) : h, intersects$
|
|
3098
|
+
h = n.children[l], f = n.leaf ? o(h) : h, intersects$4(t, f) && (n.leaf ? r.push(h) : contains$2(t, f) ? this._all(h, r) : c.push(h));
|
|
3099
3099
|
n = c.pop();
|
|
3100
3100
|
}
|
|
3101
3101
|
return r;
|
|
3102
3102
|
},
|
|
3103
3103
|
collides: function(t) {
|
|
3104
3104
|
var n = this.data, r = this.toBBox;
|
|
3105
|
-
if (!intersects$
|
|
3105
|
+
if (!intersects$4(t, n)) return !1;
|
|
3106
3106
|
for (var o = [], c, l, d, h; n; ) {
|
|
3107
3107
|
for (c = 0, l = n.children.length; c < l; c++)
|
|
3108
|
-
if (d = n.children[c], h = n.leaf ? r(d) : d, intersects$
|
|
3109
|
-
if (n.leaf || contains$
|
|
3108
|
+
if (d = n.children[c], h = n.leaf ? r(d) : d, intersects$4(t, h)) {
|
|
3109
|
+
if (n.leaf || contains$2(t, h)) return !0;
|
|
3110
3110
|
o.push(d);
|
|
3111
3111
|
}
|
|
3112
3112
|
n = o.pop();
|
|
@@ -3138,22 +3138,22 @@ rbush.prototype = {
|
|
|
3138
3138
|
return t && this._insert(t, this.data.height - 1), this;
|
|
3139
3139
|
},
|
|
3140
3140
|
clear: function() {
|
|
3141
|
-
return this.data = createNode$
|
|
3141
|
+
return this.data = createNode$3([]), this;
|
|
3142
3142
|
},
|
|
3143
3143
|
remove: function(t, n) {
|
|
3144
3144
|
if (!t) return this;
|
|
3145
3145
|
for (var r = this.data, o = this.toBBox(t), c = [], l = [], d, h, f, A; r || c.length; ) {
|
|
3146
|
-
if (r || (r = c.pop(), h = c[c.length - 1], d = l.pop(), A = !0), r.leaf && (f = findItem$
|
|
3146
|
+
if (r || (r = c.pop(), h = c[c.length - 1], d = l.pop(), A = !0), r.leaf && (f = findItem$1(t, r.children, n), f !== -1))
|
|
3147
3147
|
return r.children.splice(f, 1), c.push(r), this._condense(c), this;
|
|
3148
|
-
!A && !r.leaf && contains$
|
|
3148
|
+
!A && !r.leaf && contains$2(r, o) ? (c.push(r), l.push(d), d = 0, h = r, r = r.children[0]) : h ? (d++, r = h.children[d], A = !1) : r = null;
|
|
3149
3149
|
}
|
|
3150
3150
|
return this;
|
|
3151
3151
|
},
|
|
3152
3152
|
toBBox: function(t) {
|
|
3153
3153
|
return t;
|
|
3154
3154
|
},
|
|
3155
|
-
compareMinX: compareNodeMinX$
|
|
3156
|
-
compareMinY: compareNodeMinY$
|
|
3155
|
+
compareMinX: compareNodeMinX$1,
|
|
3156
|
+
compareMinY: compareNodeMinY$1,
|
|
3157
3157
|
toJSON: function() {
|
|
3158
3158
|
return this.data;
|
|
3159
3159
|
},
|
|
@@ -3168,25 +3168,25 @@ rbush.prototype = {
|
|
|
3168
3168
|
_build: function(t, n, r, o) {
|
|
3169
3169
|
var c = r - n + 1, l = this._maxEntries, d;
|
|
3170
3170
|
if (c <= l)
|
|
3171
|
-
return d = createNode$
|
|
3172
|
-
o || (o = Math.ceil(Math.log(c) / Math.log(l)), l = Math.ceil(c / Math.pow(l, o - 1))), d = createNode$
|
|
3171
|
+
return d = createNode$3(t.slice(n, r + 1)), calcBBox$1(d, this.toBBox), d;
|
|
3172
|
+
o || (o = Math.ceil(Math.log(c) / Math.log(l)), l = Math.ceil(c / Math.pow(l, o - 1))), d = createNode$3([]), d.leaf = !1, d.height = o;
|
|
3173
3173
|
var h = Math.ceil(c / l), f = h * Math.ceil(Math.sqrt(l)), A, g, m, C;
|
|
3174
|
-
for (multiSelect$
|
|
3175
|
-
for (m = Math.min(A + f - 1, r), multiSelect$
|
|
3174
|
+
for (multiSelect$1(t, n, r, f, this.compareMinX), A = n; A <= r; A += f)
|
|
3175
|
+
for (m = Math.min(A + f - 1, r), multiSelect$1(t, A, m, h, this.compareMinY), g = A; g <= m; g += h)
|
|
3176
3176
|
C = Math.min(g + h - 1, m), d.children.push(this._build(t, g, C, o - 1));
|
|
3177
|
-
return calcBBox$
|
|
3177
|
+
return calcBBox$1(d, this.toBBox), d;
|
|
3178
3178
|
},
|
|
3179
3179
|
_chooseSubtree: function(t, n, r, o) {
|
|
3180
3180
|
for (var c, l, d, h, f, A, g, m; o.push(n), !(n.leaf || o.length - 1 === r); ) {
|
|
3181
3181
|
for (g = m = 1 / 0, c = 0, l = n.children.length; c < l; c++)
|
|
3182
|
-
d = n.children[c], f = bboxArea$
|
|
3182
|
+
d = n.children[c], f = bboxArea$1(d), A = enlargedArea$1(t, d) - f, A < m ? (m = A, g = f < g ? f : g, h = d) : A === m && f < g && (g = f, h = d);
|
|
3183
3183
|
n = h || n.children[0];
|
|
3184
3184
|
}
|
|
3185
3185
|
return n;
|
|
3186
3186
|
},
|
|
3187
3187
|
_insert: function(t, n, r) {
|
|
3188
3188
|
var o = this.toBBox, c = r ? t : o(t), l = [], d = this._chooseSubtree(c, this.data, n, l);
|
|
3189
|
-
for (d.children.push(t), extend$
|
|
3189
|
+
for (d.children.push(t), extend$3(d, c); n >= 0 && l[n].children.length > this._maxEntries; )
|
|
3190
3190
|
this._split(l, n), n--;
|
|
3191
3191
|
this._adjustParentBBoxes(c, l, n);
|
|
3192
3192
|
},
|
|
@@ -3194,40 +3194,40 @@ rbush.prototype = {
|
|
|
3194
3194
|
_split: function(t, n) {
|
|
3195
3195
|
var r = t[n], o = r.children.length, c = this._minEntries;
|
|
3196
3196
|
this._chooseSplitAxis(r, c, o);
|
|
3197
|
-
var l = this._chooseSplitIndex(r, c, o), d = createNode$
|
|
3198
|
-
d.height = r.height, d.leaf = r.leaf, calcBBox$
|
|
3197
|
+
var l = this._chooseSplitIndex(r, c, o), d = createNode$3(r.children.splice(l, r.children.length - l));
|
|
3198
|
+
d.height = r.height, d.leaf = r.leaf, calcBBox$1(r, this.toBBox), calcBBox$1(d, this.toBBox), n ? t[n - 1].children.push(d) : this._splitRoot(r, d);
|
|
3199
3199
|
},
|
|
3200
3200
|
_splitRoot: function(t, n) {
|
|
3201
|
-
this.data = createNode$
|
|
3201
|
+
this.data = createNode$3([t, n]), this.data.height = t.height + 1, this.data.leaf = !1, calcBBox$1(this.data, this.toBBox);
|
|
3202
3202
|
},
|
|
3203
3203
|
_chooseSplitIndex: function(t, n, r) {
|
|
3204
3204
|
var o, c, l, d, h, f, A, g;
|
|
3205
3205
|
for (f = A = 1 / 0, o = n; o <= r - n; o++)
|
|
3206
|
-
c = distBBox$
|
|
3206
|
+
c = distBBox$1(t, 0, o, this.toBBox), l = distBBox$1(t, o, r, this.toBBox), d = intersectionArea$1(c, l), h = bboxArea$1(c) + bboxArea$1(l), d < f ? (f = d, g = o, A = h < A ? h : A) : d === f && h < A && (A = h, g = o);
|
|
3207
3207
|
return g;
|
|
3208
3208
|
},
|
|
3209
3209
|
// sorts node children by the best axis for split
|
|
3210
3210
|
_chooseSplitAxis: function(t, n, r) {
|
|
3211
|
-
var o = t.leaf ? this.compareMinX : compareNodeMinX$
|
|
3211
|
+
var o = t.leaf ? this.compareMinX : compareNodeMinX$1, c = t.leaf ? this.compareMinY : compareNodeMinY$1, l = this._allDistMargin(t, n, r, o), d = this._allDistMargin(t, n, r, c);
|
|
3212
3212
|
l < d && t.children.sort(o);
|
|
3213
3213
|
},
|
|
3214
3214
|
// total margin of all possible split distributions where each node is at least m full
|
|
3215
3215
|
_allDistMargin: function(t, n, r, o) {
|
|
3216
3216
|
t.children.sort(o);
|
|
3217
|
-
var c = this.toBBox, l = distBBox$
|
|
3217
|
+
var c = this.toBBox, l = distBBox$1(t, 0, n, c), d = distBBox$1(t, r - n, r, c), h = bboxMargin$1(l) + bboxMargin$1(d), f, A;
|
|
3218
3218
|
for (f = n; f < r - n; f++)
|
|
3219
|
-
A = t.children[f], extend$
|
|
3219
|
+
A = t.children[f], extend$3(l, t.leaf ? c(A) : A), h += bboxMargin$1(l);
|
|
3220
3220
|
for (f = r - n - 1; f >= n; f--)
|
|
3221
|
-
A = t.children[f], extend$
|
|
3221
|
+
A = t.children[f], extend$3(d, t.leaf ? c(A) : A), h += bboxMargin$1(d);
|
|
3222
3222
|
return h;
|
|
3223
3223
|
},
|
|
3224
3224
|
_adjustParentBBoxes: function(t, n, r) {
|
|
3225
3225
|
for (var o = r; o >= 0; o--)
|
|
3226
|
-
extend$
|
|
3226
|
+
extend$3(n[o], t);
|
|
3227
3227
|
},
|
|
3228
3228
|
_condense: function(t) {
|
|
3229
3229
|
for (var n = t.length - 1, r; n >= 0; n--)
|
|
3230
|
-
t[n].children.length === 0 ? n > 0 ? (r = t[n - 1].children, r.splice(r.indexOf(t[n]), 1)) : this.clear() : calcBBox$
|
|
3230
|
+
t[n].children.length === 0 ? n > 0 ? (r = t[n - 1].children, r.splice(r.indexOf(t[n]), 1)) : this.clear() : calcBBox$1(t[n], this.toBBox);
|
|
3231
3231
|
},
|
|
3232
3232
|
_initFormat: function(t) {
|
|
3233
3233
|
var n = ["return a", " - b", ";"];
|
|
@@ -3237,50 +3237,50 @@ rbush.prototype = {
|
|
|
3237
3237
|
);
|
|
3238
3238
|
}
|
|
3239
3239
|
};
|
|
3240
|
-
function findItem$
|
|
3240
|
+
function findItem$1(t, n, r) {
|
|
3241
3241
|
if (!r) return n.indexOf(t);
|
|
3242
3242
|
for (var o = 0; o < n.length; o++)
|
|
3243
3243
|
if (r(t, n[o])) return o;
|
|
3244
3244
|
return -1;
|
|
3245
3245
|
}
|
|
3246
|
-
function calcBBox$
|
|
3247
|
-
distBBox$
|
|
3246
|
+
function calcBBox$1(t, n) {
|
|
3247
|
+
distBBox$1(t, 0, t.children.length, n, t);
|
|
3248
3248
|
}
|
|
3249
|
-
function distBBox$
|
|
3250
|
-
c || (c = createNode$
|
|
3249
|
+
function distBBox$1(t, n, r, o, c) {
|
|
3250
|
+
c || (c = createNode$3(null)), c.minX = 1 / 0, c.minY = 1 / 0, c.maxX = -1 / 0, c.maxY = -1 / 0;
|
|
3251
3251
|
for (var l = n, d; l < r; l++)
|
|
3252
|
-
d = t.children[l], extend$
|
|
3252
|
+
d = t.children[l], extend$3(c, t.leaf ? o(d) : d);
|
|
3253
3253
|
return c;
|
|
3254
3254
|
}
|
|
3255
|
-
function extend$
|
|
3255
|
+
function extend$3(t, n) {
|
|
3256
3256
|
return t.minX = Math.min(t.minX, n.minX), t.minY = Math.min(t.minY, n.minY), t.maxX = Math.max(t.maxX, n.maxX), t.maxY = Math.max(t.maxY, n.maxY), t;
|
|
3257
3257
|
}
|
|
3258
|
-
function compareNodeMinX$
|
|
3258
|
+
function compareNodeMinX$1(t, n) {
|
|
3259
3259
|
return t.minX - n.minX;
|
|
3260
3260
|
}
|
|
3261
|
-
function compareNodeMinY$
|
|
3261
|
+
function compareNodeMinY$1(t, n) {
|
|
3262
3262
|
return t.minY - n.minY;
|
|
3263
3263
|
}
|
|
3264
|
-
function bboxArea$
|
|
3264
|
+
function bboxArea$1(t) {
|
|
3265
3265
|
return (t.maxX - t.minX) * (t.maxY - t.minY);
|
|
3266
3266
|
}
|
|
3267
|
-
function bboxMargin$
|
|
3267
|
+
function bboxMargin$1(t) {
|
|
3268
3268
|
return t.maxX - t.minX + (t.maxY - t.minY);
|
|
3269
3269
|
}
|
|
3270
|
-
function enlargedArea$
|
|
3270
|
+
function enlargedArea$1(t, n) {
|
|
3271
3271
|
return (Math.max(n.maxX, t.maxX) - Math.min(n.minX, t.minX)) * (Math.max(n.maxY, t.maxY) - Math.min(n.minY, t.minY));
|
|
3272
3272
|
}
|
|
3273
|
-
function intersectionArea$
|
|
3273
|
+
function intersectionArea$1(t, n) {
|
|
3274
3274
|
var r = Math.max(t.minX, n.minX), o = Math.max(t.minY, n.minY), c = Math.min(t.maxX, n.maxX), l = Math.min(t.maxY, n.maxY);
|
|
3275
3275
|
return Math.max(0, c - r) * Math.max(0, l - o);
|
|
3276
3276
|
}
|
|
3277
|
-
function contains$
|
|
3277
|
+
function contains$2(t, n) {
|
|
3278
3278
|
return t.minX <= n.minX && t.minY <= n.minY && n.maxX <= t.maxX && n.maxY <= t.maxY;
|
|
3279
3279
|
}
|
|
3280
|
-
function intersects$
|
|
3280
|
+
function intersects$4(t, n) {
|
|
3281
3281
|
return n.minX <= t.maxX && n.minY <= t.maxY && n.maxX >= t.minX && n.maxY >= t.minY;
|
|
3282
3282
|
}
|
|
3283
|
-
function createNode$
|
|
3283
|
+
function createNode$3(t) {
|
|
3284
3284
|
return {
|
|
3285
3285
|
children: t,
|
|
3286
3286
|
height: 1,
|
|
@@ -3291,7 +3291,7 @@ function createNode$4(t) {
|
|
|
3291
3291
|
maxY: -1 / 0
|
|
3292
3292
|
};
|
|
3293
3293
|
}
|
|
3294
|
-
function multiSelect$
|
|
3294
|
+
function multiSelect$1(t, n, r, o, c) {
|
|
3295
3295
|
for (var l = [n, r], d; l.length; )
|
|
3296
3296
|
r = l.pop(), n = l.pop(), !(r - n <= o) && (d = n + Math.ceil((r - n) / o / 2) * o, quickselect$2(t, d, n, r, c), l.push(n, d, d, r));
|
|
3297
3297
|
}
|
|
@@ -20808,7 +20808,7 @@ function createOrUpdateFromFlatCoordinates(t, n, r, o, c) {
|
|
|
20808
20808
|
function equals$4(t, n) {
|
|
20809
20809
|
return t[0] == n[0] && t[2] == n[2] && t[1] == n[1] && t[3] == n[3];
|
|
20810
20810
|
}
|
|
20811
|
-
function extend$
|
|
20811
|
+
function extend$2(t, n) {
|
|
20812
20812
|
return n[0] < t[0] && (t[0] = n[0]), n[2] > t[2] && (t[2] = n[2]), n[1] < t[1] && (t[1] = n[1]), n[3] > t[3] && (t[3] = n[3]), t;
|
|
20813
20813
|
}
|
|
20814
20814
|
function extendCoordinate(t, n) {
|
|
@@ -20888,7 +20888,7 @@ function getHeight$1(t) {
|
|
|
20888
20888
|
}
|
|
20889
20889
|
function getIntersection(t, n, r) {
|
|
20890
20890
|
const o = r || createEmpty();
|
|
20891
|
-
return intersects$
|
|
20891
|
+
return intersects$3(t, n) ? (t[0] > n[0] ? o[0] = t[0] : o[0] = n[0], t[1] > n[1] ? o[1] = t[1] : o[1] = n[1], t[2] < n[2] ? o[2] = t[2] : o[2] = n[2], t[3] < n[3] ? o[3] = t[3] : o[3] = n[3]) : createOrUpdateEmpty(o), o;
|
|
20892
20892
|
}
|
|
20893
20893
|
function getTopLeft(t) {
|
|
20894
20894
|
return [t[0], t[3]];
|
|
@@ -20899,7 +20899,7 @@ function getTopRight(t) {
|
|
|
20899
20899
|
function getWidth(t) {
|
|
20900
20900
|
return t[2] - t[0];
|
|
20901
20901
|
}
|
|
20902
|
-
function intersects$
|
|
20902
|
+
function intersects$3(t, n) {
|
|
20903
20903
|
return t[0] <= n[2] && t[2] >= n[0] && t[1] <= n[3] && t[3] >= n[1];
|
|
20904
20904
|
}
|
|
20905
20905
|
function isEmpty$1(t) {
|
|
@@ -22011,7 +22011,7 @@ function reverseSubArray(t, n, r) {
|
|
|
22011
22011
|
t[n] = t[r], t[r] = o, ++n, --r;
|
|
22012
22012
|
}
|
|
22013
22013
|
}
|
|
22014
|
-
function extend$
|
|
22014
|
+
function extend$1(t, n) {
|
|
22015
22015
|
const r = Array.isArray(n) ? n : [n], o = r.length;
|
|
22016
22016
|
for (let c = 0; c < o; c++)
|
|
22017
22017
|
t[t.length] = r[c];
|
|
@@ -22091,7 +22091,7 @@ function forEach(t, n, r, o, c) {
|
|
|
22091
22091
|
return !1;
|
|
22092
22092
|
}
|
|
22093
22093
|
function intersectsLineString(t, n, r, o, c, l) {
|
|
22094
|
-
return l = l ?? extendFlatCoordinates(createEmpty(), t, n, r, o), intersects$
|
|
22094
|
+
return l = l ?? extendFlatCoordinates(createEmpty(), t, n, r, o), intersects$3(c, l) ? l[0] >= c[0] && l[2] <= c[2] || l[1] >= c[1] && l[3] <= c[3] ? !0 : forEach(
|
|
22095
22095
|
t,
|
|
22096
22096
|
n,
|
|
22097
22097
|
r,
|
|
@@ -23401,7 +23401,7 @@ function render$1(t, n, r, o, c, l, d, h, f, A, g, m, C, I) {
|
|
|
23401
23401
|
y.globalCompositeOperation = "lighter";
|
|
23402
23402
|
const x = createEmpty();
|
|
23403
23403
|
f.forEach(function(O, F, U) {
|
|
23404
|
-
extend$
|
|
23404
|
+
extend$2(x, O.extent);
|
|
23405
23405
|
});
|
|
23406
23406
|
let S;
|
|
23407
23407
|
const M = r / o, P = (m ? 1 : 1 + Math.pow(2, -24)) / M;
|
|
@@ -23667,7 +23667,7 @@ class Triangulation {
|
|
|
23667
23667
|
}
|
|
23668
23668
|
!I && this.sourceProj_.isGlobal() && m && (y = m > MAX_TRIANGLE_WIDTH || y);
|
|
23669
23669
|
}
|
|
23670
|
-
if (!y && this.maxSourceExtent_ && isFinite(g[0]) && isFinite(g[1]) && isFinite(g[2]) && isFinite(g[3]) && !intersects$
|
|
23670
|
+
if (!y && this.maxSourceExtent_ && isFinite(g[0]) && isFinite(g[1]) && isFinite(g[2]) && isFinite(g[3]) && !intersects$3(g, this.maxSourceExtent_))
|
|
23671
23671
|
return;
|
|
23672
23672
|
let b = 0;
|
|
23673
23673
|
if (!y && (!isFinite(l[0]) || !isFinite(l[1]) || !isFinite(d[0]) || !isFinite(d[1]) || !isFinite(h[0]) || !isFinite(h[1]) || !isFinite(f[0]) || !isFinite(f[1]))) {
|
|
@@ -26234,7 +26234,7 @@ class Circle extends SimpleGeometry {
|
|
|
26234
26234
|
*/
|
|
26235
26235
|
intersectsExtent(n) {
|
|
26236
26236
|
const r = this.getExtent();
|
|
26237
|
-
if (intersects$
|
|
26237
|
+
if (intersects$3(n, r)) {
|
|
26238
26238
|
const o = this.getCenter();
|
|
26239
26239
|
return n[0] <= o[0] && n[2] >= o[0] || n[1] <= o[1] && n[3] >= o[1] ? !0 : forEachCorner(n, this.intersectsCoordinate.bind(this));
|
|
26240
26240
|
}
|
|
@@ -26383,7 +26383,7 @@ class GeometryCollection extends Geometry$1 {
|
|
|
26383
26383
|
createOrUpdateEmpty(n);
|
|
26384
26384
|
const r = this.geometries_;
|
|
26385
26385
|
for (let o = 0, c = r.length; o < c; ++o)
|
|
26386
|
-
extend$
|
|
26386
|
+
extend$2(n, r[o].getExtent());
|
|
26387
26387
|
return n;
|
|
26388
26388
|
}
|
|
26389
26389
|
/**
|
|
@@ -26917,7 +26917,7 @@ class LineString extends SimpleGeometry {
|
|
|
26917
26917
|
* @api
|
|
26918
26918
|
*/
|
|
26919
26919
|
appendCoordinate(n) {
|
|
26920
|
-
extend$
|
|
26920
|
+
extend$1(this.flatCoordinates, n), this.changed();
|
|
26921
26921
|
}
|
|
26922
26922
|
/**
|
|
26923
26923
|
* Make a complete copy of the geometry.
|
|
@@ -27152,7 +27152,7 @@ class MultiLineString extends SimpleGeometry {
|
|
|
27152
27152
|
), l = [], d = [];
|
|
27153
27153
|
for (let f = 0, A = c.length; f < A; ++f) {
|
|
27154
27154
|
const g = c[f];
|
|
27155
|
-
extend$
|
|
27155
|
+
extend$1(l, g.getFlatCoordinates()), d.push(l.length);
|
|
27156
27156
|
}
|
|
27157
27157
|
const h = c.length === 0 ? this.getLayout() : c[0].getLayout();
|
|
27158
27158
|
this.setFlatCoordinates(h, l), this.ends_ = d;
|
|
@@ -27164,7 +27164,7 @@ class MultiLineString extends SimpleGeometry {
|
|
|
27164
27164
|
* @api
|
|
27165
27165
|
*/
|
|
27166
27166
|
appendLineString(n) {
|
|
27167
|
-
extend$
|
|
27167
|
+
extend$1(this.flatCoordinates, n.getFlatCoordinates().slice()), this.ends_.push(this.flatCoordinates.length), this.changed();
|
|
27168
27168
|
}
|
|
27169
27169
|
/**
|
|
27170
27170
|
* Make a complete copy of the geometry.
|
|
@@ -27327,7 +27327,7 @@ class MultiLineString extends SimpleGeometry {
|
|
|
27327
27327
|
l,
|
|
27328
27328
|
0.5
|
|
27329
27329
|
);
|
|
27330
|
-
extend$
|
|
27330
|
+
extend$1(n, A), o = f;
|
|
27331
27331
|
}
|
|
27332
27332
|
return n;
|
|
27333
27333
|
}
|
|
@@ -27417,7 +27417,7 @@ class MultiPoint extends SimpleGeometry {
|
|
|
27417
27417
|
* @api
|
|
27418
27418
|
*/
|
|
27419
27419
|
appendPoint(n) {
|
|
27420
|
-
extend$
|
|
27420
|
+
extend$1(this.flatCoordinates, n.getFlatCoordinates()), this.changed();
|
|
27421
27421
|
}
|
|
27422
27422
|
/**
|
|
27423
27423
|
* Make a complete copy of the geometry.
|
|
@@ -27573,7 +27573,7 @@ class Polygon extends SimpleGeometry {
|
|
|
27573
27573
|
* @api
|
|
27574
27574
|
*/
|
|
27575
27575
|
appendLinearRing(n) {
|
|
27576
|
-
this.flatCoordinates ? extend$
|
|
27576
|
+
this.flatCoordinates ? extend$1(this.flatCoordinates, n.getFlatCoordinates()) : this.flatCoordinates = n.getFlatCoordinates().slice(), this.ends_.push(this.flatCoordinates.length), this.changed();
|
|
27577
27577
|
}
|
|
27578
27578
|
/**
|
|
27579
27579
|
* Make a complete copy of the geometry.
|
|
@@ -27832,7 +27832,7 @@ function circular(t, n, r, o) {
|
|
|
27832
27832
|
r = r || 32;
|
|
27833
27833
|
const c = [];
|
|
27834
27834
|
for (let l = 0; l < r; ++l)
|
|
27835
|
-
extend$
|
|
27835
|
+
extend$1(
|
|
27836
27836
|
c,
|
|
27837
27837
|
offset(t, n, 2 * Math.PI * l / r, o)
|
|
27838
27838
|
);
|
|
@@ -27872,7 +27872,7 @@ class MultiPolygon extends SimpleGeometry {
|
|
|
27872
27872
|
const A = c[h], g = l.length, m = A.getEnds();
|
|
27873
27873
|
for (let C = 0, I = m.length; C < I; ++C)
|
|
27874
27874
|
m[C] += g;
|
|
27875
|
-
extend$
|
|
27875
|
+
extend$1(l, A.getFlatCoordinates()), d.push(m);
|
|
27876
27876
|
}
|
|
27877
27877
|
r = c.length === 0 ? this.getLayout() : c[0].getLayout(), n = l, o = d;
|
|
27878
27878
|
}
|
|
@@ -27897,7 +27897,7 @@ class MultiPolygon extends SimpleGeometry {
|
|
|
27897
27897
|
this.flatCoordinates = n.getFlatCoordinates().slice(), r = n.getEnds().slice(), this.endss_.push();
|
|
27898
27898
|
else {
|
|
27899
27899
|
const o = this.flatCoordinates.length;
|
|
27900
|
-
extend$
|
|
27900
|
+
extend$1(this.flatCoordinates, n.getFlatCoordinates()), r = n.getEnds().slice();
|
|
27901
27901
|
for (let c = 0, l = r.length; c < l; ++c)
|
|
27902
27902
|
r[c] += o;
|
|
27903
27903
|
}
|
|
@@ -28277,7 +28277,7 @@ class RenderFeature {
|
|
|
28277
28277
|
);
|
|
28278
28278
|
for (let c = 0, l = o.length; c < l; ++c) {
|
|
28279
28279
|
const d = o[c], h = interpolatePoint(n, r, d, 2, 0.5);
|
|
28280
|
-
extend$
|
|
28280
|
+
extend$1(this.flatMidpoints_, h), r = d;
|
|
28281
28281
|
}
|
|
28282
28282
|
}
|
|
28283
28283
|
return this.flatMidpoints_;
|
|
@@ -28499,7 +28499,7 @@ function swap$3(t, n, r) {
|
|
|
28499
28499
|
function defaultCompare$1(t, n) {
|
|
28500
28500
|
return t < n ? -1 : t > n ? 1 : 0;
|
|
28501
28501
|
}
|
|
28502
|
-
let RBush$
|
|
28502
|
+
let RBush$1 = class {
|
|
28503
28503
|
constructor(n = 9) {
|
|
28504
28504
|
this._maxEntries = Math.max(4, n), this._minEntries = Math.max(2, Math.ceil(this._maxEntries * 0.4)), this.clear();
|
|
28505
28505
|
}
|
|
@@ -28509,12 +28509,12 @@ let RBush$2 = class {
|
|
|
28509
28509
|
search(n) {
|
|
28510
28510
|
let r = this.data;
|
|
28511
28511
|
const o = [];
|
|
28512
|
-
if (!intersects$
|
|
28512
|
+
if (!intersects$2(n, r)) return o;
|
|
28513
28513
|
const c = this.toBBox, l = [];
|
|
28514
28514
|
for (; r; ) {
|
|
28515
28515
|
for (let d = 0; d < r.children.length; d++) {
|
|
28516
28516
|
const h = r.children[d], f = r.leaf ? c(h) : h;
|
|
28517
|
-
intersects$
|
|
28517
|
+
intersects$2(n, f) && (r.leaf ? o.push(h) : contains$1(n, f) ? this._all(h, o) : l.push(h));
|
|
28518
28518
|
}
|
|
28519
28519
|
r = l.pop();
|
|
28520
28520
|
}
|
|
@@ -28522,13 +28522,13 @@ let RBush$2 = class {
|
|
|
28522
28522
|
}
|
|
28523
28523
|
collides(n) {
|
|
28524
28524
|
let r = this.data;
|
|
28525
|
-
if (!intersects$
|
|
28525
|
+
if (!intersects$2(n, r)) return !1;
|
|
28526
28526
|
const o = [];
|
|
28527
28527
|
for (; r; ) {
|
|
28528
28528
|
for (let c = 0; c < r.children.length; c++) {
|
|
28529
28529
|
const l = r.children[c], d = r.leaf ? this.toBBox(l) : l;
|
|
28530
|
-
if (intersects$
|
|
28531
|
-
if (r.leaf || contains$
|
|
28530
|
+
if (intersects$2(n, d)) {
|
|
28531
|
+
if (r.leaf || contains$1(n, d)) return !0;
|
|
28532
28532
|
o.push(l);
|
|
28533
28533
|
}
|
|
28534
28534
|
}
|
|
@@ -28561,7 +28561,7 @@ let RBush$2 = class {
|
|
|
28561
28561
|
return n && this._insert(n, this.data.height - 1), this;
|
|
28562
28562
|
}
|
|
28563
28563
|
clear() {
|
|
28564
|
-
return this.data = createNode$
|
|
28564
|
+
return this.data = createNode$2([]), this;
|
|
28565
28565
|
}
|
|
28566
28566
|
remove(n, r) {
|
|
28567
28567
|
if (!n) return this;
|
|
@@ -28570,11 +28570,11 @@ let RBush$2 = class {
|
|
|
28570
28570
|
let h, f, A;
|
|
28571
28571
|
for (; o || l.length; ) {
|
|
28572
28572
|
if (o || (o = l.pop(), f = l[l.length - 1], h = d.pop(), A = !0), o.leaf) {
|
|
28573
|
-
const g = findItem
|
|
28573
|
+
const g = findItem(n, o.children, r);
|
|
28574
28574
|
if (g !== -1)
|
|
28575
28575
|
return o.children.splice(g, 1), l.push(o), this._condense(l), this;
|
|
28576
28576
|
}
|
|
28577
|
-
!A && !o.leaf && contains$
|
|
28577
|
+
!A && !o.leaf && contains$1(o, c) ? (l.push(o), d.push(h), h = 0, f = o, o = o.children[0]) : f ? (h++, o = f.children[h], A = !1) : o = null;
|
|
28578
28578
|
}
|
|
28579
28579
|
return this;
|
|
28580
28580
|
}
|
|
@@ -28603,25 +28603,25 @@ let RBush$2 = class {
|
|
|
28603
28603
|
const l = o - r + 1;
|
|
28604
28604
|
let d = this._maxEntries, h;
|
|
28605
28605
|
if (l <= d)
|
|
28606
|
-
return h = createNode$
|
|
28607
|
-
c || (c = Math.ceil(Math.log(l) / Math.log(d)), d = Math.ceil(l / Math.pow(d, c - 1))), h = createNode$
|
|
28606
|
+
return h = createNode$2(n.slice(r, o + 1)), calcBBox(h, this.toBBox), h;
|
|
28607
|
+
c || (c = Math.ceil(Math.log(l) / Math.log(d)), d = Math.ceil(l / Math.pow(d, c - 1))), h = createNode$2([]), h.leaf = !1, h.height = c;
|
|
28608
28608
|
const f = Math.ceil(l / d), A = f * Math.ceil(Math.sqrt(d));
|
|
28609
|
-
multiSelect
|
|
28609
|
+
multiSelect(n, r, o, A, this.compareMinX);
|
|
28610
28610
|
for (let g = r; g <= o; g += A) {
|
|
28611
28611
|
const m = Math.min(g + A - 1, o);
|
|
28612
|
-
multiSelect
|
|
28612
|
+
multiSelect(n, g, m, f, this.compareMinY);
|
|
28613
28613
|
for (let C = g; C <= m; C += f) {
|
|
28614
28614
|
const I = Math.min(C + f - 1, m);
|
|
28615
28615
|
h.children.push(this._build(n, C, I, c - 1));
|
|
28616
28616
|
}
|
|
28617
28617
|
}
|
|
28618
|
-
return calcBBox
|
|
28618
|
+
return calcBBox(h, this.toBBox), h;
|
|
28619
28619
|
}
|
|
28620
28620
|
_chooseSubtree(n, r, o, c) {
|
|
28621
28621
|
for (; c.push(r), !(r.leaf || c.length - 1 === o); ) {
|
|
28622
28622
|
let l = 1 / 0, d = 1 / 0, h;
|
|
28623
28623
|
for (let f = 0; f < r.children.length; f++) {
|
|
28624
|
-
const A = r.children[f], g = bboxArea
|
|
28624
|
+
const A = r.children[f], g = bboxArea(A), m = enlargedArea(n, A) - g;
|
|
28625
28625
|
m < d ? (d = m, l = g < l ? g : l, h = A) : m === d && g < l && (l = g, h = A);
|
|
28626
28626
|
}
|
|
28627
28627
|
r = h || r.children[0];
|
|
@@ -28630,7 +28630,7 @@ let RBush$2 = class {
|
|
|
28630
28630
|
}
|
|
28631
28631
|
_insert(n, r, o) {
|
|
28632
28632
|
const c = o ? n : this.toBBox(n), l = [], d = this._chooseSubtree(c, this.data, r, l);
|
|
28633
|
-
for (d.children.push(n), extend
|
|
28633
|
+
for (d.children.push(n), extend(d, c); r >= 0 && l[r].children.length > this._maxEntries; )
|
|
28634
28634
|
this._split(l, r), r--;
|
|
28635
28635
|
this._adjustParentBBoxes(c, l, r);
|
|
28636
28636
|
}
|
|
@@ -28638,95 +28638,95 @@ let RBush$2 = class {
|
|
|
28638
28638
|
_split(n, r) {
|
|
28639
28639
|
const o = n[r], c = o.children.length, l = this._minEntries;
|
|
28640
28640
|
this._chooseSplitAxis(o, l, c);
|
|
28641
|
-
const d = this._chooseSplitIndex(o, l, c), h = createNode$
|
|
28642
|
-
h.height = o.height, h.leaf = o.leaf, calcBBox
|
|
28641
|
+
const d = this._chooseSplitIndex(o, l, c), h = createNode$2(o.children.splice(d, o.children.length - d));
|
|
28642
|
+
h.height = o.height, h.leaf = o.leaf, calcBBox(o, this.toBBox), calcBBox(h, this.toBBox), r ? n[r - 1].children.push(h) : this._splitRoot(o, h);
|
|
28643
28643
|
}
|
|
28644
28644
|
_splitRoot(n, r) {
|
|
28645
|
-
this.data = createNode$
|
|
28645
|
+
this.data = createNode$2([n, r]), this.data.height = n.height + 1, this.data.leaf = !1, calcBBox(this.data, this.toBBox);
|
|
28646
28646
|
}
|
|
28647
28647
|
_chooseSplitIndex(n, r, o) {
|
|
28648
28648
|
let c, l = 1 / 0, d = 1 / 0;
|
|
28649
28649
|
for (let h = r; h <= o - r; h++) {
|
|
28650
|
-
const f = distBBox
|
|
28650
|
+
const f = distBBox(n, 0, h, this.toBBox), A = distBBox(n, h, o, this.toBBox), g = intersectionArea(f, A), m = bboxArea(f) + bboxArea(A);
|
|
28651
28651
|
g < l ? (l = g, c = h, d = m < d ? m : d) : g === l && m < d && (d = m, c = h);
|
|
28652
28652
|
}
|
|
28653
28653
|
return c || o - r;
|
|
28654
28654
|
}
|
|
28655
28655
|
// sorts node children by the best axis for split
|
|
28656
28656
|
_chooseSplitAxis(n, r, o) {
|
|
28657
|
-
const c = n.leaf ? this.compareMinX : compareNodeMinX
|
|
28657
|
+
const c = n.leaf ? this.compareMinX : compareNodeMinX, l = n.leaf ? this.compareMinY : compareNodeMinY, d = this._allDistMargin(n, r, o, c), h = this._allDistMargin(n, r, o, l);
|
|
28658
28658
|
d < h && n.children.sort(c);
|
|
28659
28659
|
}
|
|
28660
28660
|
// total margin of all possible split distributions where each node is at least m full
|
|
28661
28661
|
_allDistMargin(n, r, o, c) {
|
|
28662
28662
|
n.children.sort(c);
|
|
28663
|
-
const l = this.toBBox, d = distBBox
|
|
28664
|
-
let f = bboxMargin
|
|
28663
|
+
const l = this.toBBox, d = distBBox(n, 0, r, l), h = distBBox(n, o - r, o, l);
|
|
28664
|
+
let f = bboxMargin(d) + bboxMargin(h);
|
|
28665
28665
|
for (let A = r; A < o - r; A++) {
|
|
28666
28666
|
const g = n.children[A];
|
|
28667
|
-
extend
|
|
28667
|
+
extend(d, n.leaf ? l(g) : g), f += bboxMargin(d);
|
|
28668
28668
|
}
|
|
28669
28669
|
for (let A = o - r - 1; A >= r; A--) {
|
|
28670
28670
|
const g = n.children[A];
|
|
28671
|
-
extend
|
|
28671
|
+
extend(h, n.leaf ? l(g) : g), f += bboxMargin(h);
|
|
28672
28672
|
}
|
|
28673
28673
|
return f;
|
|
28674
28674
|
}
|
|
28675
28675
|
_adjustParentBBoxes(n, r, o) {
|
|
28676
28676
|
for (let c = o; c >= 0; c--)
|
|
28677
|
-
extend
|
|
28677
|
+
extend(r[c], n);
|
|
28678
28678
|
}
|
|
28679
28679
|
_condense(n) {
|
|
28680
28680
|
for (let r = n.length - 1, o; r >= 0; r--)
|
|
28681
|
-
n[r].children.length === 0 ? r > 0 ? (o = n[r - 1].children, o.splice(o.indexOf(n[r]), 1)) : this.clear() : calcBBox
|
|
28681
|
+
n[r].children.length === 0 ? r > 0 ? (o = n[r - 1].children, o.splice(o.indexOf(n[r]), 1)) : this.clear() : calcBBox(n[r], this.toBBox);
|
|
28682
28682
|
}
|
|
28683
28683
|
};
|
|
28684
|
-
function findItem
|
|
28684
|
+
function findItem(t, n, r) {
|
|
28685
28685
|
if (!r) return n.indexOf(t);
|
|
28686
28686
|
for (let o = 0; o < n.length; o++)
|
|
28687
28687
|
if (r(t, n[o])) return o;
|
|
28688
28688
|
return -1;
|
|
28689
28689
|
}
|
|
28690
|
-
function calcBBox
|
|
28691
|
-
distBBox
|
|
28690
|
+
function calcBBox(t, n) {
|
|
28691
|
+
distBBox(t, 0, t.children.length, n, t);
|
|
28692
28692
|
}
|
|
28693
|
-
function distBBox
|
|
28694
|
-
c || (c = createNode$
|
|
28693
|
+
function distBBox(t, n, r, o, c) {
|
|
28694
|
+
c || (c = createNode$2(null)), c.minX = 1 / 0, c.minY = 1 / 0, c.maxX = -1 / 0, c.maxY = -1 / 0;
|
|
28695
28695
|
for (let l = n; l < r; l++) {
|
|
28696
28696
|
const d = t.children[l];
|
|
28697
|
-
extend
|
|
28697
|
+
extend(c, t.leaf ? o(d) : d);
|
|
28698
28698
|
}
|
|
28699
28699
|
return c;
|
|
28700
28700
|
}
|
|
28701
|
-
function extend
|
|
28701
|
+
function extend(t, n) {
|
|
28702
28702
|
return t.minX = Math.min(t.minX, n.minX), t.minY = Math.min(t.minY, n.minY), t.maxX = Math.max(t.maxX, n.maxX), t.maxY = Math.max(t.maxY, n.maxY), t;
|
|
28703
28703
|
}
|
|
28704
|
-
function compareNodeMinX
|
|
28704
|
+
function compareNodeMinX(t, n) {
|
|
28705
28705
|
return t.minX - n.minX;
|
|
28706
28706
|
}
|
|
28707
|
-
function compareNodeMinY
|
|
28707
|
+
function compareNodeMinY(t, n) {
|
|
28708
28708
|
return t.minY - n.minY;
|
|
28709
28709
|
}
|
|
28710
|
-
function bboxArea
|
|
28710
|
+
function bboxArea(t) {
|
|
28711
28711
|
return (t.maxX - t.minX) * (t.maxY - t.minY);
|
|
28712
28712
|
}
|
|
28713
|
-
function bboxMargin
|
|
28713
|
+
function bboxMargin(t) {
|
|
28714
28714
|
return t.maxX - t.minX + (t.maxY - t.minY);
|
|
28715
28715
|
}
|
|
28716
|
-
function enlargedArea
|
|
28716
|
+
function enlargedArea(t, n) {
|
|
28717
28717
|
return (Math.max(n.maxX, t.maxX) - Math.min(n.minX, t.minX)) * (Math.max(n.maxY, t.maxY) - Math.min(n.minY, t.minY));
|
|
28718
28718
|
}
|
|
28719
|
-
function intersectionArea
|
|
28719
|
+
function intersectionArea(t, n) {
|
|
28720
28720
|
const r = Math.max(t.minX, n.minX), o = Math.max(t.minY, n.minY), c = Math.min(t.maxX, n.maxX), l = Math.min(t.maxY, n.maxY);
|
|
28721
28721
|
return Math.max(0, c - r) * Math.max(0, l - o);
|
|
28722
28722
|
}
|
|
28723
|
-
function contains$
|
|
28723
|
+
function contains$1(t, n) {
|
|
28724
28724
|
return t.minX <= n.minX && t.minY <= n.minY && n.maxX <= t.maxX && n.maxY <= t.maxY;
|
|
28725
28725
|
}
|
|
28726
|
-
function intersects$
|
|
28726
|
+
function intersects$2(t, n) {
|
|
28727
28727
|
return n.minX <= t.maxX && n.minY <= t.maxY && n.maxX >= t.minX && n.maxY >= t.minY;
|
|
28728
28728
|
}
|
|
28729
|
-
function createNode$
|
|
28729
|
+
function createNode$2(t) {
|
|
28730
28730
|
return {
|
|
28731
28731
|
children: t,
|
|
28732
28732
|
height: 1,
|
|
@@ -28737,7 +28737,7 @@ function createNode$3(t) {
|
|
|
28737
28737
|
maxY: -1 / 0
|
|
28738
28738
|
};
|
|
28739
28739
|
}
|
|
28740
|
-
function multiSelect
|
|
28740
|
+
function multiSelect(t, n, r, o, c) {
|
|
28741
28741
|
const l = [n, r];
|
|
28742
28742
|
for (; l.length; ) {
|
|
28743
28743
|
if (r = l.pop(), n = l.pop(), r - n <= o) continue;
|
|
@@ -28745,12 +28745,12 @@ function multiSelect$1(t, n, r, o, c) {
|
|
|
28745
28745
|
quickselect(t, d, n, r, c), l.push(n, d, d, r);
|
|
28746
28746
|
}
|
|
28747
28747
|
}
|
|
28748
|
-
|
|
28748
|
+
class RBush {
|
|
28749
28749
|
/**
|
|
28750
28750
|
* @param {number} [maxEntries] Max entries.
|
|
28751
28751
|
*/
|
|
28752
28752
|
constructor(n) {
|
|
28753
|
-
this.rbush_ = new RBush$
|
|
28753
|
+
this.rbush_ = new RBush$1(n), this.items_ = {};
|
|
28754
28754
|
}
|
|
28755
28755
|
/**
|
|
28756
28756
|
* Insert a value into the RBush.
|
|
@@ -28892,7 +28892,7 @@ let RBush$1 = class {
|
|
|
28892
28892
|
for (const r in n.items_)
|
|
28893
28893
|
this.items_[r] = n.items_[r];
|
|
28894
28894
|
}
|
|
28895
|
-
}
|
|
28895
|
+
}
|
|
28896
28896
|
const VectorEventType = {
|
|
28897
28897
|
/**
|
|
28898
28898
|
* Triggered when a feature is added to the source.
|
|
@@ -28961,7 +28961,7 @@ class VectorSource extends Source$1 {
|
|
|
28961
28961
|
wrapX: n.wrapX !== void 0 ? n.wrapX : !0
|
|
28962
28962
|
}), this.on, this.once, this.un, this.loader_ = VOID, this.format_ = n.format || null, this.overlaps_ = n.overlaps === void 0 ? !0 : n.overlaps, this.url_ = n.url, n.loader !== void 0 ? this.loader_ = n.loader : this.url_ !== void 0 && (assert(this.format_, "`format` must be set when `url` is set"), this.loader_ = xhr(this.url_, this.format_)), this.strategy_ = n.strategy !== void 0 ? n.strategy : all$1;
|
|
28963
28963
|
const r = n.useSpatialIndex !== void 0 ? n.useSpatialIndex : !0;
|
|
28964
|
-
this.featuresRtree_ = r ? new RBush
|
|
28964
|
+
this.featuresRtree_ = r ? new RBush() : null, this.loadedExtentsRtree_ = new RBush(), this.loadingExtentsCount_ = 0, this.nullGeometryFeatures_ = {}, this.idIndex_ = {}, this.uidIndex_ = {}, this.featureChangeKeys_ = {}, this.featuresCollection_ = null;
|
|
28965
28965
|
let o, c;
|
|
28966
28966
|
Array.isArray(n.features) ? c = n.features : n.features && (o = n.features, c = o.getArray()), !r && o === void 0 && (o = new Collection(c)), c !== void 0 && this.addFeaturesInternal(c), o !== void 0 && this.bindFeaturesCollection_(o);
|
|
28967
28967
|
}
|
|
@@ -29252,7 +29252,7 @@ class VectorSource extends Source$1 {
|
|
|
29252
29252
|
*/
|
|
29253
29253
|
getFeatures() {
|
|
29254
29254
|
let n;
|
|
29255
|
-
return this.featuresCollection_ ? n = this.featuresCollection_.getArray().slice(0) : this.featuresRtree_ && (n = this.featuresRtree_.getAll(), isEmpty(this.nullGeometryFeatures_) || extend$
|
|
29255
|
+
return this.featuresCollection_ ? n = this.featuresCollection_.getArray().slice(0) : this.featuresRtree_ && (n = this.featuresRtree_.getAll(), isEmpty(this.nullGeometryFeatures_) || extend$1(n, Object.values(this.nullGeometryFeatures_))), n;
|
|
29256
29256
|
}
|
|
29257
29257
|
/**
|
|
29258
29258
|
* Get all features whose geometry intersects the provided coordinate.
|
|
@@ -30000,7 +30000,7 @@ class Static extends ImageSource {
|
|
|
30000
30000
|
* @override
|
|
30001
30001
|
*/
|
|
30002
30002
|
getImageInternal(n, r, o, c) {
|
|
30003
|
-
return intersects$
|
|
30003
|
+
return intersects$3(n, this.image.getExtent()) ? this.image : null;
|
|
30004
30004
|
}
|
|
30005
30005
|
/**
|
|
30006
30006
|
* Return the URL used for this image source.
|
|
@@ -31119,7 +31119,7 @@ class CanvasImageLayerRenderer extends CanvasLayerRenderer {
|
|
|
31119
31119
|
A.extent,
|
|
31120
31120
|
m.projection
|
|
31121
31121
|
);
|
|
31122
|
-
L = intersects$
|
|
31122
|
+
L = intersects$3(V, n.extent), P = L && !containsExtent(V, n.extent), P && this.clipUnrotated(M, n, V);
|
|
31123
31123
|
}
|
|
31124
31124
|
const O = o.getImage(), F = compose$1(
|
|
31125
31125
|
this.tempTransform,
|
|
@@ -32840,7 +32840,7 @@ class Layer extends BaseLayer {
|
|
|
32840
32840
|
} else
|
|
32841
32841
|
c = this.getLayerState();
|
|
32842
32842
|
const l = this.getExtent();
|
|
32843
|
-
return inView(c, r.viewState) && (!l || intersects$
|
|
32843
|
+
return inView(c, r.viewState) && (!l || intersects$3(l, r.extent));
|
|
32844
32844
|
}
|
|
32845
32845
|
/**
|
|
32846
32846
|
* Get the attributions of the source of this layer for the given view.
|
|
@@ -33405,7 +33405,7 @@ class CanvasTileLayerRenderer extends CanvasLayerRenderer {
|
|
|
33405
33405
|
for (let Qe = 0, Le = X.length; Qe < Le; ++Qe)
|
|
33406
33406
|
if (!me && ee < K[Qe]) {
|
|
33407
33407
|
const ve = X[Qe];
|
|
33408
|
-
intersects$
|
|
33408
|
+
intersects$3(
|
|
33409
33409
|
[Se, Ie, Se + Ee, Ie + Ce],
|
|
33410
33410
|
[ve[0], ve[3], ve[4], ve[7]]
|
|
33411
33411
|
) && (Me || (w.save(), Me = !0), w.beginPath(), w.moveTo(q[0], q[1]), w.lineTo(q[2], q[3]), w.lineTo(q[4], q[5]), w.lineTo(q[6], q[7]), w.moveTo(ve[6], ve[7]), w.lineTo(ve[4], ve[5]), w.lineTo(ve[2], ve[3]), w.lineTo(ve[0], ve[1]), w.clip());
|
|
@@ -34331,7 +34331,7 @@ class CanvasImmediateRenderer extends VectorContext {
|
|
|
34331
34331
|
n.simplifyTransformed(
|
|
34332
34332
|
this.squaredTolerance_,
|
|
34333
34333
|
this.userTransform_
|
|
34334
|
-
)), !!intersects$
|
|
34334
|
+
)), !!intersects$3(this.extent_, n.getExtent())) {
|
|
34335
34335
|
if (this.fillState_ || this.strokeState_) {
|
|
34336
34336
|
this.fillState_ && this.setContextFillState_(this.fillState_), this.strokeState_ && this.setContextStrokeState_(this.strokeState_);
|
|
34337
34337
|
const r = transformGeom2D(
|
|
@@ -34498,7 +34498,7 @@ class CanvasImmediateRenderer extends VectorContext {
|
|
|
34498
34498
|
n.simplifyTransformed(
|
|
34499
34499
|
this.squaredTolerance_,
|
|
34500
34500
|
this.userTransform_
|
|
34501
|
-
)), !!intersects$
|
|
34501
|
+
)), !!intersects$3(this.extent_, n.getExtent())) {
|
|
34502
34502
|
if (this.strokeState_) {
|
|
34503
34503
|
this.setContextStrokeState_(this.strokeState_);
|
|
34504
34504
|
const r = this.context_, o = n.getFlatCoordinates();
|
|
@@ -34530,7 +34530,7 @@ class CanvasImmediateRenderer extends VectorContext {
|
|
|
34530
34530
|
this.userTransform_
|
|
34531
34531
|
));
|
|
34532
34532
|
const r = n.getExtent();
|
|
34533
|
-
if (intersects$
|
|
34533
|
+
if (intersects$3(this.extent_, r)) {
|
|
34534
34534
|
if (this.strokeState_) {
|
|
34535
34535
|
this.setContextStrokeState_(this.strokeState_);
|
|
34536
34536
|
const o = this.context_, c = n.getFlatCoordinates();
|
|
@@ -34568,7 +34568,7 @@ class CanvasImmediateRenderer extends VectorContext {
|
|
|
34568
34568
|
n.simplifyTransformed(
|
|
34569
34569
|
this.squaredTolerance_,
|
|
34570
34570
|
this.userTransform_
|
|
34571
|
-
)), !!intersects$
|
|
34571
|
+
)), !!intersects$3(this.extent_, n.getExtent())) {
|
|
34572
34572
|
if (this.strokeState_ || this.fillState_) {
|
|
34573
34573
|
this.fillState_ && this.setContextFillState_(this.fillState_), this.strokeState_ && this.setContextStrokeState_(this.strokeState_);
|
|
34574
34574
|
const r = this.context_;
|
|
@@ -34597,7 +34597,7 @@ class CanvasImmediateRenderer extends VectorContext {
|
|
|
34597
34597
|
n.simplifyTransformed(
|
|
34598
34598
|
this.squaredTolerance_,
|
|
34599
34599
|
this.userTransform_
|
|
34600
|
-
)), !!intersects$
|
|
34600
|
+
)), !!intersects$3(this.extent_, n.getExtent())) {
|
|
34601
34601
|
if (this.strokeState_ || this.fillState_) {
|
|
34602
34602
|
this.fillState_ && this.setContextFillState_(this.fillState_), this.strokeState_ && this.setContextStrokeState_(this.strokeState_);
|
|
34603
34603
|
const r = this.context_, o = n.getOrientedFlatCoordinates();
|
|
@@ -37309,7 +37309,7 @@ class CanvasTextBuilder extends CanvasBuilder {
|
|
|
37309
37309
|
const A = n.getType();
|
|
37310
37310
|
let g = null, m = n.getStride();
|
|
37311
37311
|
if (d.placement === "line" && (A == "LineString" || A == "MultiLineString" || A == "Polygon" || A == "MultiPolygon")) {
|
|
37312
|
-
if (!intersects$
|
|
37312
|
+
if (!intersects$3(this.maxExtent, n.getExtent()))
|
|
37313
37313
|
return;
|
|
37314
37314
|
let C;
|
|
37315
37315
|
if (g = n.getFlatCoordinates(), A == "LineString")
|
|
@@ -37997,7 +37997,7 @@ class Executor {
|
|
|
37997
37997
|
) {
|
|
37998
37998
|
case Instruction.BEGIN_GEOMETRY:
|
|
37999
37999
|
Z = /** @type {import("../../Feature.js").FeatureLike} */
|
|
38000
|
-
ne[1], re = ne[3], Z.getGeometry() ? h !== void 0 && !intersects$
|
|
38000
|
+
ne[1], re = ne[3], Z.getGeometry() ? h !== void 0 && !intersects$3(h, re.getExtent()) ? m = /** @type {number} */
|
|
38001
38001
|
ne[2] + 1 : ++m : m = /** @type {number} */
|
|
38002
38002
|
ne[2], A && (A.zIndex = ne[4]);
|
|
38003
38003
|
break;
|
|
@@ -38935,7 +38935,7 @@ function createHitDetectionImageData(t, n, r, o, c, l, d, h, f) {
|
|
|
38935
38935
|
const $ = (P * x).toString(16).padStart(7, "#00000");
|
|
38936
38936
|
for (let V = 0, W = F.length; V < W; ++V) {
|
|
38937
38937
|
const G = F[V], H = G.getGeometryFunction()(L);
|
|
38938
|
-
if (!H || !intersects$
|
|
38938
|
+
if (!H || !intersects$3(A, H.getExtent()))
|
|
38939
38939
|
continue;
|
|
38940
38940
|
const w = G.clone(), k = w.getFill();
|
|
38941
38941
|
k && k.setColor($);
|
|
@@ -39098,7 +39098,7 @@ class CanvasVectorLayerRenderer extends CanvasLayerRenderer {
|
|
|
39098
39098
|
return this.container;
|
|
39099
39099
|
if (this.setDrawContext_(), this.preRender(l, n), c.projection, this.clipped_ = !1, h && o.extent && this.clipping) {
|
|
39100
39100
|
const f = fromUserExtent(o.extent);
|
|
39101
|
-
h = intersects$
|
|
39101
|
+
h = intersects$3(f, n.extent), this.clipped_ = h && !containsExtent(f, n.extent), this.clipped_ && this.clipUnrotated(l, n, f);
|
|
39102
39102
|
}
|
|
39103
39103
|
return h && this.renderWorlds(
|
|
39104
39104
|
d,
|
|
@@ -41008,7 +41008,7 @@ class BaseVectorLayer extends Layer {
|
|
|
41008
41008
|
*/
|
|
41009
41009
|
renderDeclutter(n, r) {
|
|
41010
41010
|
const o = this.getDeclutter();
|
|
41011
|
-
o in n.declutter || (n.declutter[o] = new RBush$
|
|
41011
|
+
o in n.declutter || (n.declutter[o] = new RBush$1(9)), this.getRenderer().renderDeclutter(n, r);
|
|
41012
41012
|
}
|
|
41013
41013
|
/**
|
|
41014
41014
|
* @param {import("../render.js").OrderFunction|null|undefined} renderOrder
|
|
@@ -42805,7 +42805,7 @@ function cureLocalIntersections$1(t, n) {
|
|
|
42805
42805
|
let r = t;
|
|
42806
42806
|
do {
|
|
42807
42807
|
const o = r.prev, c = r.next.next;
|
|
42808
|
-
!equals$1(o, c) && intersects$
|
|
42808
|
+
!equals$1(o, c) && intersects$1(o, r, r.next, c) && locallyInside$1(o, c) && locallyInside$1(c, o) && (n.push(o.i, r.i, c.i), removeNode$1(r), removeNode$1(r.next), r = t = c), r = r.next;
|
|
42809
42809
|
} while (r !== t);
|
|
42810
42810
|
return filterPoints$1(r);
|
|
42811
42811
|
}
|
|
@@ -42935,7 +42935,7 @@ function area$1(t, n, r) {
|
|
|
42935
42935
|
function equals$1(t, n) {
|
|
42936
42936
|
return t.x === n.x && t.y === n.y;
|
|
42937
42937
|
}
|
|
42938
|
-
function intersects$
|
|
42938
|
+
function intersects$1(t, n, r, o) {
|
|
42939
42939
|
const c = sign$2(area$1(t, n, r)), l = sign$2(area$1(t, n, o)), d = sign$2(area$1(r, o, t)), h = sign$2(area$1(r, o, n));
|
|
42940
42940
|
return !!(c !== l && d !== h || c === 0 && onSegment$1(t, r, n) || l === 0 && onSegment$1(t, o, n) || d === 0 && onSegment$1(r, t, o) || h === 0 && onSegment$1(r, n, o));
|
|
42941
42941
|
}
|
|
@@ -42948,7 +42948,7 @@ function sign$2(t) {
|
|
|
42948
42948
|
function intersectsPolygon$1(t, n) {
|
|
42949
42949
|
let r = t;
|
|
42950
42950
|
do {
|
|
42951
|
-
if (r.i !== t.i && r.next.i !== t.i && r.i !== n.i && r.next.i !== n.i && intersects$
|
|
42951
|
+
if (r.i !== t.i && r.next.i !== t.i && r.i !== n.i && r.next.i !== n.i && intersects$1(r, r.next, t, n)) return !0;
|
|
42952
42952
|
r = r.next;
|
|
42953
42953
|
} while (r !== t);
|
|
42954
42954
|
return !1;
|
|
@@ -42965,17 +42965,17 @@ function middleInside$1(t, n) {
|
|
|
42965
42965
|
return o;
|
|
42966
42966
|
}
|
|
42967
42967
|
function splitPolygon$1(t, n) {
|
|
42968
|
-
const r = createNode$
|
|
42968
|
+
const r = createNode$1(t.i, t.x, t.y), o = createNode$1(n.i, n.x, n.y), c = t.next, l = n.prev;
|
|
42969
42969
|
return t.next = n, n.prev = t, r.next = c, c.prev = r, o.next = r, r.prev = o, l.next = o, o.prev = l, o;
|
|
42970
42970
|
}
|
|
42971
42971
|
function insertNode$1(t, n, r, o) {
|
|
42972
|
-
const c = createNode$
|
|
42972
|
+
const c = createNode$1(t, n, r);
|
|
42973
42973
|
return o ? (c.next = o.next, c.prev = o, o.next.prev = c, o.next = c) : (c.prev = c, c.next = c), c;
|
|
42974
42974
|
}
|
|
42975
42975
|
function removeNode$1(t) {
|
|
42976
42976
|
t.next.prev = t.prev, t.prev.next = t.next, t.prevZ && (t.prevZ.nextZ = t.nextZ), t.nextZ && (t.nextZ.prevZ = t.prevZ);
|
|
42977
42977
|
}
|
|
42978
|
-
function createNode$
|
|
42978
|
+
function createNode$1(t, n, r) {
|
|
42979
42979
|
return {
|
|
42980
42980
|
i: t,
|
|
42981
42981
|
// vertex index in coordinates array
|
|
@@ -47293,7 +47293,7 @@ class Modify extends PointerInteraction {
|
|
|
47293
47293
|
n
|
|
47294
47294
|
), this.on, this.once, this.un, this.boundHandleFeatureChange_ = this.handleFeatureChange_.bind(this), this.condition_ = n.condition ? n.condition : primaryAction, this.defaultDeleteCondition_ = function(o) {
|
|
47295
47295
|
return altKeyOnly(o) && singleClick(o);
|
|
47296
|
-
}, this.deleteCondition_ = n.deleteCondition ? n.deleteCondition : this.defaultDeleteCondition_, this.insertVertexCondition_ = n.insertVertexCondition ? n.insertVertexCondition : always, this.vertexFeature_ = null, this.vertexSegments_ = null, this.lastPixel_ = [0, 0], this.ignoreNextSingleClick_ = !1, this.featuresBeingModified_ = null, this.rBush_ = new RBush
|
|
47296
|
+
}, this.deleteCondition_ = n.deleteCondition ? n.deleteCondition : this.defaultDeleteCondition_, this.insertVertexCondition_ = n.insertVertexCondition ? n.insertVertexCondition : always, this.vertexFeature_ = null, this.vertexSegments_ = null, this.lastPixel_ = [0, 0], this.ignoreNextSingleClick_ = !1, this.featuresBeingModified_ = null, this.rBush_ = new RBush(), this.pixelTolerance_ = n.pixelTolerance !== void 0 ? n.pixelTolerance : 10, this.snappedToVertex_ = !1, this.changingFeature_ = !1, this.dragSegments_ = [], this.overlay_ = new VectorLayer({
|
|
47297
47297
|
source: new VectorSource({
|
|
47298
47298
|
useSpatialIndex: !1,
|
|
47299
47299
|
wrapX: !!n.wrapX
|
|
@@ -167319,254 +167319,8 @@ StaticGeometryPerMaterialBatch.prototype.removeAllPrimitives = function() {
|
|
|
167319
167319
|
t[r].destroy();
|
|
167320
167320
|
this._items.length = 0;
|
|
167321
167321
|
};
|
|
167322
|
-
class RBush {
|
|
167323
|
-
constructor(n = 9) {
|
|
167324
|
-
this._maxEntries = Math.max(4, n), this._minEntries = Math.max(2, Math.ceil(this._maxEntries * 0.4)), this.clear();
|
|
167325
|
-
}
|
|
167326
|
-
all() {
|
|
167327
|
-
return this._all(this.data, []);
|
|
167328
|
-
}
|
|
167329
|
-
search(n) {
|
|
167330
|
-
let r = this.data;
|
|
167331
|
-
const o = [];
|
|
167332
|
-
if (!intersects$1(n, r)) return o;
|
|
167333
|
-
const c = this.toBBox, l = [];
|
|
167334
|
-
for (; r; ) {
|
|
167335
|
-
for (let d = 0; d < r.children.length; d++) {
|
|
167336
|
-
const h = r.children[d], f = r.leaf ? c(h) : h;
|
|
167337
|
-
intersects$1(n, f) && (r.leaf ? o.push(h) : contains$1(n, f) ? this._all(h, o) : l.push(h));
|
|
167338
|
-
}
|
|
167339
|
-
r = l.pop();
|
|
167340
|
-
}
|
|
167341
|
-
return o;
|
|
167342
|
-
}
|
|
167343
|
-
collides(n) {
|
|
167344
|
-
let r = this.data;
|
|
167345
|
-
if (!intersects$1(n, r)) return !1;
|
|
167346
|
-
const o = [];
|
|
167347
|
-
for (; r; ) {
|
|
167348
|
-
for (let c = 0; c < r.children.length; c++) {
|
|
167349
|
-
const l = r.children[c], d = r.leaf ? this.toBBox(l) : l;
|
|
167350
|
-
if (intersects$1(n, d)) {
|
|
167351
|
-
if (r.leaf || contains$1(n, d)) return !0;
|
|
167352
|
-
o.push(l);
|
|
167353
|
-
}
|
|
167354
|
-
}
|
|
167355
|
-
r = o.pop();
|
|
167356
|
-
}
|
|
167357
|
-
return !1;
|
|
167358
|
-
}
|
|
167359
|
-
load(n) {
|
|
167360
|
-
if (!(n && n.length)) return this;
|
|
167361
|
-
if (n.length < this._minEntries) {
|
|
167362
|
-
for (let o = 0; o < n.length; o++)
|
|
167363
|
-
this.insert(n[o]);
|
|
167364
|
-
return this;
|
|
167365
|
-
}
|
|
167366
|
-
let r = this._build(n.slice(), 0, n.length - 1, 0);
|
|
167367
|
-
if (!this.data.children.length)
|
|
167368
|
-
this.data = r;
|
|
167369
|
-
else if (this.data.height === r.height)
|
|
167370
|
-
this._splitRoot(this.data, r);
|
|
167371
|
-
else {
|
|
167372
|
-
if (this.data.height < r.height) {
|
|
167373
|
-
const o = this.data;
|
|
167374
|
-
this.data = r, r = o;
|
|
167375
|
-
}
|
|
167376
|
-
this._insert(r, this.data.height - r.height - 1, !0);
|
|
167377
|
-
}
|
|
167378
|
-
return this;
|
|
167379
|
-
}
|
|
167380
|
-
insert(n) {
|
|
167381
|
-
return n && this._insert(n, this.data.height - 1), this;
|
|
167382
|
-
}
|
|
167383
|
-
clear() {
|
|
167384
|
-
return this.data = createNode$1([]), this;
|
|
167385
|
-
}
|
|
167386
|
-
remove(n, r) {
|
|
167387
|
-
if (!n) return this;
|
|
167388
|
-
let o = this.data;
|
|
167389
|
-
const c = this.toBBox(n), l = [], d = [];
|
|
167390
|
-
let h, f, A;
|
|
167391
|
-
for (; o || l.length; ) {
|
|
167392
|
-
if (o || (o = l.pop(), f = l[l.length - 1], h = d.pop(), A = !0), o.leaf) {
|
|
167393
|
-
const g = findItem(n, o.children, r);
|
|
167394
|
-
if (g !== -1)
|
|
167395
|
-
return o.children.splice(g, 1), l.push(o), this._condense(l), this;
|
|
167396
|
-
}
|
|
167397
|
-
!A && !o.leaf && contains$1(o, c) ? (l.push(o), d.push(h), h = 0, f = o, o = o.children[0]) : f ? (h++, o = f.children[h], A = !1) : o = null;
|
|
167398
|
-
}
|
|
167399
|
-
return this;
|
|
167400
|
-
}
|
|
167401
|
-
toBBox(n) {
|
|
167402
|
-
return n;
|
|
167403
|
-
}
|
|
167404
|
-
compareMinX(n, r) {
|
|
167405
|
-
return n.minX - r.minX;
|
|
167406
|
-
}
|
|
167407
|
-
compareMinY(n, r) {
|
|
167408
|
-
return n.minY - r.minY;
|
|
167409
|
-
}
|
|
167410
|
-
toJSON() {
|
|
167411
|
-
return this.data;
|
|
167412
|
-
}
|
|
167413
|
-
fromJSON(n) {
|
|
167414
|
-
return this.data = n, this;
|
|
167415
|
-
}
|
|
167416
|
-
_all(n, r) {
|
|
167417
|
-
const o = [];
|
|
167418
|
-
for (; n; )
|
|
167419
|
-
n.leaf ? r.push(...n.children) : o.push(...n.children), n = o.pop();
|
|
167420
|
-
return r;
|
|
167421
|
-
}
|
|
167422
|
-
_build(n, r, o, c) {
|
|
167423
|
-
const l = o - r + 1;
|
|
167424
|
-
let d = this._maxEntries, h;
|
|
167425
|
-
if (l <= d)
|
|
167426
|
-
return h = createNode$1(n.slice(r, o + 1)), calcBBox(h, this.toBBox), h;
|
|
167427
|
-
c || (c = Math.ceil(Math.log(l) / Math.log(d)), d = Math.ceil(l / Math.pow(d, c - 1))), h = createNode$1([]), h.leaf = !1, h.height = c;
|
|
167428
|
-
const f = Math.ceil(l / d), A = f * Math.ceil(Math.sqrt(d));
|
|
167429
|
-
multiSelect(n, r, o, A, this.compareMinX);
|
|
167430
|
-
for (let g = r; g <= o; g += A) {
|
|
167431
|
-
const m = Math.min(g + A - 1, o);
|
|
167432
|
-
multiSelect(n, g, m, f, this.compareMinY);
|
|
167433
|
-
for (let C = g; C <= m; C += f) {
|
|
167434
|
-
const I = Math.min(C + f - 1, m);
|
|
167435
|
-
h.children.push(this._build(n, C, I, c - 1));
|
|
167436
|
-
}
|
|
167437
|
-
}
|
|
167438
|
-
return calcBBox(h, this.toBBox), h;
|
|
167439
|
-
}
|
|
167440
|
-
_chooseSubtree(n, r, o, c) {
|
|
167441
|
-
for (; c.push(r), !(r.leaf || c.length - 1 === o); ) {
|
|
167442
|
-
let l = 1 / 0, d = 1 / 0, h;
|
|
167443
|
-
for (let f = 0; f < r.children.length; f++) {
|
|
167444
|
-
const A = r.children[f], g = bboxArea(A), m = enlargedArea(n, A) - g;
|
|
167445
|
-
m < d ? (d = m, l = g < l ? g : l, h = A) : m === d && g < l && (l = g, h = A);
|
|
167446
|
-
}
|
|
167447
|
-
r = h || r.children[0];
|
|
167448
|
-
}
|
|
167449
|
-
return r;
|
|
167450
|
-
}
|
|
167451
|
-
_insert(n, r, o) {
|
|
167452
|
-
const c = o ? n : this.toBBox(n), l = [], d = this._chooseSubtree(c, this.data, r, l);
|
|
167453
|
-
for (d.children.push(n), extend(d, c); r >= 0 && l[r].children.length > this._maxEntries; )
|
|
167454
|
-
this._split(l, r), r--;
|
|
167455
|
-
this._adjustParentBBoxes(c, l, r);
|
|
167456
|
-
}
|
|
167457
|
-
// split overflowed node into two
|
|
167458
|
-
_split(n, r) {
|
|
167459
|
-
const o = n[r], c = o.children.length, l = this._minEntries;
|
|
167460
|
-
this._chooseSplitAxis(o, l, c);
|
|
167461
|
-
const d = this._chooseSplitIndex(o, l, c), h = createNode$1(o.children.splice(d, o.children.length - d));
|
|
167462
|
-
h.height = o.height, h.leaf = o.leaf, calcBBox(o, this.toBBox), calcBBox(h, this.toBBox), r ? n[r - 1].children.push(h) : this._splitRoot(o, h);
|
|
167463
|
-
}
|
|
167464
|
-
_splitRoot(n, r) {
|
|
167465
|
-
this.data = createNode$1([n, r]), this.data.height = n.height + 1, this.data.leaf = !1, calcBBox(this.data, this.toBBox);
|
|
167466
|
-
}
|
|
167467
|
-
_chooseSplitIndex(n, r, o) {
|
|
167468
|
-
let c, l = 1 / 0, d = 1 / 0;
|
|
167469
|
-
for (let h = r; h <= o - r; h++) {
|
|
167470
|
-
const f = distBBox(n, 0, h, this.toBBox), A = distBBox(n, h, o, this.toBBox), g = intersectionArea(f, A), m = bboxArea(f) + bboxArea(A);
|
|
167471
|
-
g < l ? (l = g, c = h, d = m < d ? m : d) : g === l && m < d && (d = m, c = h);
|
|
167472
|
-
}
|
|
167473
|
-
return c || o - r;
|
|
167474
|
-
}
|
|
167475
|
-
// sorts node children by the best axis for split
|
|
167476
|
-
_chooseSplitAxis(n, r, o) {
|
|
167477
|
-
const c = n.leaf ? this.compareMinX : compareNodeMinX, l = n.leaf ? this.compareMinY : compareNodeMinY, d = this._allDistMargin(n, r, o, c), h = this._allDistMargin(n, r, o, l);
|
|
167478
|
-
d < h && n.children.sort(c);
|
|
167479
|
-
}
|
|
167480
|
-
// total margin of all possible split distributions where each node is at least m full
|
|
167481
|
-
_allDistMargin(n, r, o, c) {
|
|
167482
|
-
n.children.sort(c);
|
|
167483
|
-
const l = this.toBBox, d = distBBox(n, 0, r, l), h = distBBox(n, o - r, o, l);
|
|
167484
|
-
let f = bboxMargin(d) + bboxMargin(h);
|
|
167485
|
-
for (let A = r; A < o - r; A++) {
|
|
167486
|
-
const g = n.children[A];
|
|
167487
|
-
extend(d, n.leaf ? l(g) : g), f += bboxMargin(d);
|
|
167488
|
-
}
|
|
167489
|
-
for (let A = o - r - 1; A >= r; A--) {
|
|
167490
|
-
const g = n.children[A];
|
|
167491
|
-
extend(h, n.leaf ? l(g) : g), f += bboxMargin(h);
|
|
167492
|
-
}
|
|
167493
|
-
return f;
|
|
167494
|
-
}
|
|
167495
|
-
_adjustParentBBoxes(n, r, o) {
|
|
167496
|
-
for (let c = o; c >= 0; c--)
|
|
167497
|
-
extend(r[c], n);
|
|
167498
|
-
}
|
|
167499
|
-
_condense(n) {
|
|
167500
|
-
for (let r = n.length - 1, o; r >= 0; r--)
|
|
167501
|
-
n[r].children.length === 0 ? r > 0 ? (o = n[r - 1].children, o.splice(o.indexOf(n[r]), 1)) : this.clear() : calcBBox(n[r], this.toBBox);
|
|
167502
|
-
}
|
|
167503
|
-
}
|
|
167504
|
-
function findItem(t, n, r) {
|
|
167505
|
-
if (!r) return n.indexOf(t);
|
|
167506
|
-
for (let o = 0; o < n.length; o++)
|
|
167507
|
-
if (r(t, n[o])) return o;
|
|
167508
|
-
return -1;
|
|
167509
|
-
}
|
|
167510
|
-
function calcBBox(t, n) {
|
|
167511
|
-
distBBox(t, 0, t.children.length, n, t);
|
|
167512
|
-
}
|
|
167513
|
-
function distBBox(t, n, r, o, c) {
|
|
167514
|
-
c || (c = createNode$1(null)), c.minX = 1 / 0, c.minY = 1 / 0, c.maxX = -1 / 0, c.maxY = -1 / 0;
|
|
167515
|
-
for (let l = n; l < r; l++) {
|
|
167516
|
-
const d = t.children[l];
|
|
167517
|
-
extend(c, t.leaf ? o(d) : d);
|
|
167518
|
-
}
|
|
167519
|
-
return c;
|
|
167520
|
-
}
|
|
167521
|
-
function extend(t, n) {
|
|
167522
|
-
return t.minX = Math.min(t.minX, n.minX), t.minY = Math.min(t.minY, n.minY), t.maxX = Math.max(t.maxX, n.maxX), t.maxY = Math.max(t.maxY, n.maxY), t;
|
|
167523
|
-
}
|
|
167524
|
-
function compareNodeMinX(t, n) {
|
|
167525
|
-
return t.minX - n.minX;
|
|
167526
|
-
}
|
|
167527
|
-
function compareNodeMinY(t, n) {
|
|
167528
|
-
return t.minY - n.minY;
|
|
167529
|
-
}
|
|
167530
|
-
function bboxArea(t) {
|
|
167531
|
-
return (t.maxX - t.minX) * (t.maxY - t.minY);
|
|
167532
|
-
}
|
|
167533
|
-
function bboxMargin(t) {
|
|
167534
|
-
return t.maxX - t.minX + (t.maxY - t.minY);
|
|
167535
|
-
}
|
|
167536
|
-
function enlargedArea(t, n) {
|
|
167537
|
-
return (Math.max(n.maxX, t.maxX) - Math.min(n.minX, t.minX)) * (Math.max(n.maxY, t.maxY) - Math.min(n.minY, t.minY));
|
|
167538
|
-
}
|
|
167539
|
-
function intersectionArea(t, n) {
|
|
167540
|
-
const r = Math.max(t.minX, n.minX), o = Math.max(t.minY, n.minY), c = Math.min(t.maxX, n.maxX), l = Math.min(t.maxY, n.maxY);
|
|
167541
|
-
return Math.max(0, c - r) * Math.max(0, l - o);
|
|
167542
|
-
}
|
|
167543
|
-
function contains$1(t, n) {
|
|
167544
|
-
return t.minX <= n.minX && t.minY <= n.minY && n.maxX <= t.maxX && n.maxY <= t.maxY;
|
|
167545
|
-
}
|
|
167546
|
-
function intersects$1(t, n) {
|
|
167547
|
-
return n.minX <= t.maxX && n.minY <= t.maxY && n.maxX >= t.minX && n.maxY >= t.minY;
|
|
167548
|
-
}
|
|
167549
|
-
function createNode$1(t) {
|
|
167550
|
-
return {
|
|
167551
|
-
children: t,
|
|
167552
|
-
height: 1,
|
|
167553
|
-
leaf: !0,
|
|
167554
|
-
minX: 1 / 0,
|
|
167555
|
-
minY: 1 / 0,
|
|
167556
|
-
maxX: -1 / 0,
|
|
167557
|
-
maxY: -1 / 0
|
|
167558
|
-
};
|
|
167559
|
-
}
|
|
167560
|
-
function multiSelect(t, n, r, o, c) {
|
|
167561
|
-
const l = [n, r];
|
|
167562
|
-
for (; l.length; ) {
|
|
167563
|
-
if (r = l.pop(), n = l.pop(), r - n <= o) continue;
|
|
167564
|
-
const d = n + Math.ceil((r - n) / o / 2) * o;
|
|
167565
|
-
quickselect(t, d, n, r, c), l.push(n, d, d, r);
|
|
167566
|
-
}
|
|
167567
|
-
}
|
|
167568
167322
|
function RectangleCollisionChecker() {
|
|
167569
|
-
this._tree = new RBush();
|
|
167323
|
+
this._tree = new RBush$1();
|
|
167570
167324
|
}
|
|
167571
167325
|
function RectangleWithId() {
|
|
167572
167326
|
this.minX = 0, this.minY = 0, this.maxX = 0, this.maxY = 0, this.id = "";
|
|
@@ -252562,7 +252316,7 @@ class ZYWLGeometryEditingPolyline {
|
|
|
252562
252316
|
this.containerID_ = n, this.dataClass_ = r;
|
|
252563
252317
|
}
|
|
252564
252318
|
}
|
|
252565
|
-
var imageCache = /* @__PURE__ */ new Map(), bgCache = /* @__PURE__ */ new Map(), resourceCache = /* @__PURE__ */ new Map(), defaultStylesCache = /* @__PURE__ */ new Map(), baseCSSCache = /* @__PURE__ */ new Map(), computedStyleCache = /* @__PURE__ */ new WeakMap();
|
|
252319
|
+
var imageCache = /* @__PURE__ */ new Map(), bgCache = /* @__PURE__ */ new Map(), resourceCache = /* @__PURE__ */ new Map(), defaultStylesCache = /* @__PURE__ */ new Map(), baseCSSCache = /* @__PURE__ */ new Map(), computedStyleCache = /* @__PURE__ */ new WeakMap(), processedFontURLs = /* @__PURE__ */ new Set();
|
|
252566
252320
|
function getDefaultStyleForTag(t) {
|
|
252567
252321
|
if (defaultStylesCache.has(t))
|
|
252568
252322
|
return defaultStylesCache.get(t);
|
|
@@ -252615,6 +252369,21 @@ function generateCSSClasses(t) {
|
|
|
252615
252369
|
r.set(c, `c${o++}`);
|
|
252616
252370
|
return r;
|
|
252617
252371
|
}
|
|
252372
|
+
async function inlineSingleBackgroundEntry(t, n = {}) {
|
|
252373
|
+
const r = t.startsWith("url("), o = /^((repeating-)?(linear|radial|conic)-gradient)\(/i.test(t);
|
|
252374
|
+
if (r) {
|
|
252375
|
+
const c = extractURL(t);
|
|
252376
|
+
if (!c) return t;
|
|
252377
|
+
const l = safeEncodeURI(c);
|
|
252378
|
+
if (bgCache.has(l))
|
|
252379
|
+
return n.skipInline ? void 0 : `url(${bgCache.get(l)})`;
|
|
252380
|
+
{
|
|
252381
|
+
const d = n.crossOrigin ? n.crossOrigin(l) : "anonymous", h = await fetchImage(l, 3e3, d);
|
|
252382
|
+
return bgCache.set(l, h), n.skipInline ? void 0 : `url(${h})`;
|
|
252383
|
+
}
|
|
252384
|
+
}
|
|
252385
|
+
return t;
|
|
252386
|
+
}
|
|
252618
252387
|
function idle(t, { fast: n = !1 } = {}) {
|
|
252619
252388
|
if (n) return t();
|
|
252620
252389
|
"requestIdleCallback" in window ? requestIdleCallback(t, { timeout: 50 }) : setTimeout(t, 1);
|
|
@@ -252654,7 +252423,8 @@ function isIconFont(t) {
|
|
|
252654
252423
|
/feather/i,
|
|
252655
252424
|
/bootstrap\s*icons/i,
|
|
252656
252425
|
/remix\s*icons/i,
|
|
252657
|
-
/heroicons/i
|
|
252426
|
+
/heroicons/i,
|
|
252427
|
+
/lucide/i
|
|
252658
252428
|
].some((r) => r.test(t));
|
|
252659
252429
|
}
|
|
252660
252430
|
function fetchImage(t, n = 3e3, r = "anonymous") {
|
|
@@ -252691,6 +252461,34 @@ function snapshotComputedStyle(t) {
|
|
|
252691
252461
|
function isSafari() {
|
|
252692
252462
|
return /^((?!chrome|android).)*safari/i.test(navigator.userAgent);
|
|
252693
252463
|
}
|
|
252464
|
+
function stripTranslate(t) {
|
|
252465
|
+
if (!t || t === "none") return "";
|
|
252466
|
+
let n = t.replace(/translate[XY]?\([^)]*\)/g, "");
|
|
252467
|
+
return n = n.replace(/matrix\(([^)]+)\)/g, (r, o) => {
|
|
252468
|
+
const c = o.split(",").map((l) => l.trim());
|
|
252469
|
+
return c.length !== 6 ? `matrix(${o})` : (c[4] = "0", c[5] = "0", `matrix(${c.join(", ")})`);
|
|
252470
|
+
}), n = n.replace(/matrix3d\(([^)]+)\)/g, (r, o) => {
|
|
252471
|
+
const c = o.split(",").map((l) => l.trim());
|
|
252472
|
+
return c.length !== 16 ? `matrix3d(${o})` : (c[12] = "0", c[13] = "0", `matrix3d(${c.join(", ")})`);
|
|
252473
|
+
}), n.trim().replace(/\s{2,}/g, " ");
|
|
252474
|
+
}
|
|
252475
|
+
function safeEncodeURI(t) {
|
|
252476
|
+
try {
|
|
252477
|
+
const n = decodeURI(t);
|
|
252478
|
+
return encodeURI(n);
|
|
252479
|
+
} catch {
|
|
252480
|
+
return t;
|
|
252481
|
+
}
|
|
252482
|
+
}
|
|
252483
|
+
function splitBackgroundImage(t) {
|
|
252484
|
+
const n = [];
|
|
252485
|
+
let r = 0, o = 0;
|
|
252486
|
+
for (let c = 0; c < t.length; c++) {
|
|
252487
|
+
const l = t[c];
|
|
252488
|
+
l === "(" && r++, l === ")" && r--, l === "," && r === 0 && (n.push(t.slice(o, c).trim()), o = c + 1);
|
|
252489
|
+
}
|
|
252490
|
+
return n.push(t.slice(o).trim()), n;
|
|
252491
|
+
}
|
|
252694
252492
|
function inlineAllStyles(t, n, r, o, c) {
|
|
252695
252493
|
var A;
|
|
252696
252494
|
if (t.tagName === "STYLE") return;
|
|
@@ -252706,7 +252504,7 @@ function deepClone(t, n, r, o, c) {
|
|
|
252706
252504
|
}
|
|
252707
252505
|
if (t.tagName === "IFRAME") {
|
|
252708
252506
|
const f = document.createElement("div");
|
|
252709
|
-
return f.textContent = "", f.style.cssText = `width: ${t.offsetWidth}px; height: ${t.offsetHeight}px; background: repeating-linear-gradient(45deg, #ddd, #ddd 5px, #f9f9f9 5px, #f9f9f9 10px);display: flex;align-items: center;justify-content: center;font-size: 12px;color: #555; border: 1px solid #aaa;`, f;
|
|
252507
|
+
return f.textContent = "", f.style.cssText = `width: ${t.offsetWidth}px; height: ${t.offsetHeight}px; background-image: repeating-linear-gradient(45deg, #ddd, #ddd 5px, #f9f9f9 5px, #f9f9f9 10px);display: flex;align-items: center;justify-content: center;font-size: 12px;color: #555; border: 1px solid #aaa;`, f;
|
|
252710
252508
|
}
|
|
252711
252509
|
if (t.nodeType === Node.ELEMENT_NODE && t.getAttribute("data-capture") === "placeholder") {
|
|
252712
252510
|
const f = t.cloneNode(!1);
|
|
@@ -252716,7 +252514,7 @@ function deepClone(t, n, r, o, c) {
|
|
|
252716
252514
|
}
|
|
252717
252515
|
if (t.tagName === "CANVAS") {
|
|
252718
252516
|
const f = t.toDataURL(), A = document.createElement("img");
|
|
252719
|
-
return A.src = f, A.width = t.width, A.height = t.height, A.style.display = "inline-block", A.style.width = `${t.width}px`, A.style.height = `${t.height}px`, A;
|
|
252517
|
+
return A.src = f, A.width = t.width, A.height = t.height, A.style.display = "inline-block", A.style.width = t.style.width || `${t.width}px`, A.style.height = t.style.height || `${t.height}px`, A;
|
|
252720
252518
|
}
|
|
252721
252519
|
if (t.nodeType === Node.TEXT_NODE) {
|
|
252722
252520
|
if ((h = t.parentElement) != null && h.shadowRoot) {
|
|
@@ -252749,168 +252547,198 @@ async function iconToImage(t, n, r, o = 32, c = "#000") {
|
|
|
252749
252547
|
const y = I.getContext("2d");
|
|
252750
252548
|
return y.scale(l, l), y.font = h.font, y.textAlign = "left", y.textBaseline = "alphabetic", y.fillStyle = c, y.fillText(t, 0, A), I.toDataURL();
|
|
252751
252549
|
}
|
|
252550
|
+
function isStylesheetLoaded(t) {
|
|
252551
|
+
return Array.from(document.styleSheets).some((n) => n.href === t);
|
|
252552
|
+
}
|
|
252553
|
+
function injectLinkIfMissing(t) {
|
|
252554
|
+
return new Promise((n) => {
|
|
252555
|
+
if (isStylesheetLoaded(t)) return n(null);
|
|
252556
|
+
const r = document.createElement("link");
|
|
252557
|
+
r.rel = "stylesheet", r.href = t, r.setAttribute("data-snapdom", "injected-import"), r.onload = () => n(r), r.onerror = () => n(null), document.head.appendChild(r);
|
|
252558
|
+
});
|
|
252559
|
+
}
|
|
252752
252560
|
async function embedCustomFonts({ ignoreIconFonts: t = !0, preCached: n = !1 } = {}) {
|
|
252753
|
-
|
|
252754
|
-
|
|
252755
|
-
|
|
252561
|
+
if (resourceCache.has("fonts-embed-css")) {
|
|
252562
|
+
if (n) {
|
|
252563
|
+
const d = document.createElement("style");
|
|
252564
|
+
d.setAttribute("data-snapdom", "embedFonts"), d.textContent = resourceCache.get("fonts-embed-css"), document.head.appendChild(d);
|
|
252565
|
+
}
|
|
252566
|
+
return resourceCache.get("fonts-embed-css");
|
|
252567
|
+
}
|
|
252568
|
+
const r = /@import\s+url\(["']?([^"')]+)["']?\)/g, o = [];
|
|
252569
|
+
for (const d of document.querySelectorAll("style")) {
|
|
252570
|
+
const h = d.textContent || "", f = Array.from(h.matchAll(r));
|
|
252571
|
+
for (const A of f) {
|
|
252572
|
+
const g = A[1];
|
|
252573
|
+
isStylesheetLoaded(g) || o.push(g);
|
|
252574
|
+
}
|
|
252575
|
+
}
|
|
252576
|
+
await Promise.all(o.map(injectLinkIfMissing));
|
|
252577
|
+
const c = Array.from(document.querySelectorAll('link[rel="stylesheet"]')).filter((d) => d.href);
|
|
252578
|
+
let l = "";
|
|
252579
|
+
for (const d of c)
|
|
252756
252580
|
try {
|
|
252757
|
-
const
|
|
252758
|
-
if (t && (isIconFont(
|
|
252759
|
-
|
|
252760
|
-
|
|
252761
|
-
|
|
252762
|
-
|
|
252763
|
-
|
|
252764
|
-
|
|
252765
|
-
|
|
252766
|
-
|
|
252767
|
-
|
|
252768
|
-
} catch {
|
|
252769
|
-
console.warn("[snapdom] Failed to encode font URL:", C);
|
|
252770
|
-
}
|
|
252771
|
-
if (t && isIconFont(C))
|
|
252772
|
-
return null;
|
|
252773
|
-
if (resourceCache.has(C))
|
|
252774
|
-
return { original: g[0], inlined: `url(${resourceCache.get(C)})` };
|
|
252581
|
+
const f = await (await fetch(d.href)).text();
|
|
252582
|
+
if (t && (isIconFont(d.href) || isIconFont(f))) continue;
|
|
252583
|
+
const A = /url\((["']?)([^"')]+)\1\)/g, g = await Promise.all(
|
|
252584
|
+
Array.from(f.matchAll(A)).map(async (C) => {
|
|
252585
|
+
let I = extractURL(C[0]);
|
|
252586
|
+
if (!I) return null;
|
|
252587
|
+
let y = I;
|
|
252588
|
+
if (!y.startsWith("http") && !y.startsWith("data:") && (y = new URL(y, d.href).href), t && isIconFont(y)) return null;
|
|
252589
|
+
if (resourceCache.has(y))
|
|
252590
|
+
return processedFontURLs.add(y), { original: C[0], inlined: `url(${resourceCache.get(y)})` };
|
|
252591
|
+
if (processedFontURLs.has(y)) return null;
|
|
252775
252592
|
try {
|
|
252776
|
-
const
|
|
252777
|
-
const
|
|
252778
|
-
|
|
252593
|
+
const x = await (await fetch(y)).blob(), S = await new Promise((M) => {
|
|
252594
|
+
const P = new FileReader();
|
|
252595
|
+
P.onload = () => M(P.result), P.readAsDataURL(x);
|
|
252779
252596
|
});
|
|
252780
|
-
return resourceCache.set(
|
|
252597
|
+
return resourceCache.set(y, S), processedFontURLs.add(y), { original: C[0], inlined: `url(${S})` };
|
|
252781
252598
|
} catch {
|
|
252782
|
-
return console.warn("[snapdom] Failed to fetch font:",
|
|
252599
|
+
return console.warn("[snapdom] Failed to fetch font resource:", y), null;
|
|
252783
252600
|
}
|
|
252784
252601
|
})
|
|
252785
252602
|
);
|
|
252786
|
-
let
|
|
252787
|
-
for (const
|
|
252788
|
-
|
|
252789
|
-
|
|
252603
|
+
let m = f;
|
|
252604
|
+
for (const C of g)
|
|
252605
|
+
C && (m = m.replace(C.original, C.inlined));
|
|
252606
|
+
l += m + `
|
|
252790
252607
|
`;
|
|
252791
252608
|
} catch {
|
|
252792
|
-
console.warn("[snapdom] Failed to fetch CSS:",
|
|
252609
|
+
console.warn("[snapdom] Failed to fetch CSS:", d.href);
|
|
252793
252610
|
}
|
|
252794
|
-
for (const
|
|
252611
|
+
for (const d of document.styleSheets)
|
|
252795
252612
|
try {
|
|
252796
|
-
if (!
|
|
252797
|
-
for (const
|
|
252798
|
-
if (
|
|
252799
|
-
const
|
|
252800
|
-
if (!
|
|
252801
|
-
const
|
|
252802
|
-
let
|
|
252803
|
-
const
|
|
252804
|
-
for (const
|
|
252805
|
-
let
|
|
252806
|
-
if (!
|
|
252807
|
-
let
|
|
252808
|
-
if (!
|
|
252809
|
-
if (resourceCache.has(
|
|
252810
|
-
|
|
252613
|
+
if (!d.href || c.every((h) => h.href !== d.href)) {
|
|
252614
|
+
for (const h of d.cssRules)
|
|
252615
|
+
if (h.type === CSSRule.FONT_FACE_RULE) {
|
|
252616
|
+
const f = h.style.getPropertyValue("src");
|
|
252617
|
+
if (!f) continue;
|
|
252618
|
+
const A = /url\((["']?)([^"')]+)\1\)/g;
|
|
252619
|
+
let g = f;
|
|
252620
|
+
const m = Array.from(f.matchAll(A));
|
|
252621
|
+
for (const C of m) {
|
|
252622
|
+
let I = C[2].trim();
|
|
252623
|
+
if (!I) continue;
|
|
252624
|
+
let y = I;
|
|
252625
|
+
if (!y.startsWith("http") && !y.startsWith("data:") && (y = new URL(y, d.href || location.href).href), !(t && isIconFont(y))) {
|
|
252626
|
+
if (resourceCache.has(y)) {
|
|
252627
|
+
processedFontURLs.add(y), g = g.replace(C[0], `url(${resourceCache.get(y)})`);
|
|
252811
252628
|
continue;
|
|
252812
252629
|
}
|
|
252813
|
-
|
|
252814
|
-
|
|
252815
|
-
const S = new
|
|
252816
|
-
|
|
252817
|
-
|
|
252818
|
-
|
|
252819
|
-
|
|
252820
|
-
|
|
252821
|
-
|
|
252630
|
+
if (!processedFontURLs.has(y))
|
|
252631
|
+
try {
|
|
252632
|
+
const x = await (await fetch(y)).blob(), S = await new Promise((M) => {
|
|
252633
|
+
const P = new FileReader();
|
|
252634
|
+
P.onload = () => M(P.result), P.readAsDataURL(x);
|
|
252635
|
+
});
|
|
252636
|
+
resourceCache.set(y, S), processedFontURLs.add(y), g = g.replace(C[0], `url(${S})`);
|
|
252637
|
+
} catch {
|
|
252638
|
+
console.warn("[snapdom] Failed to fetch font URL:", y);
|
|
252639
|
+
}
|
|
252822
252640
|
}
|
|
252823
252641
|
}
|
|
252824
|
-
|
|
252825
|
-
font-family: ${
|
|
252826
|
-
src: ${
|
|
252827
|
-
font-style: ${
|
|
252828
|
-
font-weight: ${
|
|
252642
|
+
l += `@font-face {
|
|
252643
|
+
font-family: ${h.style.getPropertyValue("font-family")};
|
|
252644
|
+
src: ${g};
|
|
252645
|
+
font-style: ${h.style.getPropertyValue("font-style") || "normal"};
|
|
252646
|
+
font-weight: ${h.style.getPropertyValue("font-weight") || "normal"};
|
|
252829
252647
|
}
|
|
252830
252648
|
`;
|
|
252831
252649
|
}
|
|
252832
252650
|
}
|
|
252833
|
-
} catch (
|
|
252834
|
-
console.warn("[snapdom] Cannot access stylesheet",
|
|
252835
|
-
}
|
|
252836
|
-
for (const
|
|
252837
|
-
if (
|
|
252838
|
-
let
|
|
252839
|
-
if (!
|
|
252840
|
-
if (resourceCache.has(
|
|
252841
|
-
|
|
252842
|
-
else
|
|
252651
|
+
} catch (h) {
|
|
252652
|
+
console.warn("[snapdom] Cannot access stylesheet", d.href, h);
|
|
252653
|
+
}
|
|
252654
|
+
for (const d of document.fonts)
|
|
252655
|
+
if (d.family && d.status === "loaded" && d._snapdomSrc) {
|
|
252656
|
+
let h = d._snapdomSrc;
|
|
252657
|
+
if (!h.startsWith("data:")) {
|
|
252658
|
+
if (resourceCache.has(d._snapdomSrc))
|
|
252659
|
+
h = resourceCache.get(d._snapdomSrc), processedFontURLs.add(d._snapdomSrc);
|
|
252660
|
+
else if (!processedFontURLs.has(d._snapdomSrc))
|
|
252843
252661
|
try {
|
|
252844
|
-
const
|
|
252845
|
-
|
|
252846
|
-
const
|
|
252847
|
-
|
|
252848
|
-
}), resourceCache.set(
|
|
252662
|
+
const A = await (await fetch(d._snapdomSrc)).blob();
|
|
252663
|
+
h = await new Promise((g) => {
|
|
252664
|
+
const m = new FileReader();
|
|
252665
|
+
m.onload = () => g(m.result), m.readAsDataURL(A);
|
|
252666
|
+
}), resourceCache.set(d._snapdomSrc, h), processedFontURLs.add(d._snapdomSrc);
|
|
252849
252667
|
} catch {
|
|
252850
|
-
console.warn("[snapdom] Failed to fetch dynamic font src:",
|
|
252668
|
+
console.warn("[snapdom] Failed to fetch dynamic font src:", d._snapdomSrc);
|
|
252851
252669
|
continue;
|
|
252852
252670
|
}
|
|
252853
|
-
|
|
252854
|
-
|
|
252855
|
-
|
|
252856
|
-
|
|
252857
|
-
font-
|
|
252671
|
+
}
|
|
252672
|
+
l += `@font-face {
|
|
252673
|
+
font-family: '${d.family}';
|
|
252674
|
+
src: url(${h});
|
|
252675
|
+
font-style: ${d.style || "normal"};
|
|
252676
|
+
font-weight: ${d.weight || "normal"};
|
|
252858
252677
|
}
|
|
252859
252678
|
`;
|
|
252860
252679
|
}
|
|
252861
|
-
if (
|
|
252862
|
-
const
|
|
252863
|
-
|
|
252680
|
+
if (l && (resourceCache.set("fonts-embed-css", l), n)) {
|
|
252681
|
+
const d = document.createElement("style");
|
|
252682
|
+
d.setAttribute("data-snapdom", "embedFonts"), d.textContent = l, document.head.appendChild(d);
|
|
252864
252683
|
}
|
|
252865
|
-
return
|
|
252684
|
+
return l;
|
|
252866
252685
|
}
|
|
252867
252686
|
async function inlinePseudoElements(t, n, r, o, c, l = !1) {
|
|
252868
252687
|
if (!(t instanceof Element) || !(n instanceof Element)) return;
|
|
252869
|
-
for (const f of ["::before", "::after"])
|
|
252688
|
+
for (const f of ["::before", "::after", "::first-letter"])
|
|
252870
252689
|
try {
|
|
252871
252690
|
const A = getStyle(t, f);
|
|
252872
|
-
if (!A) continue;
|
|
252873
|
-
|
|
252874
|
-
|
|
252875
|
-
|
|
252876
|
-
M
|
|
252877
|
-
|
|
252878
|
-
r.set(M, L);
|
|
252879
|
-
const O = y && /font.*awesome|material|bootstrap|glyphicons|ionicons|remixicon|simple-line-icons|octicons|feather|typicons|weathericons/i.test(
|
|
252880
|
-
y
|
|
252691
|
+
if (!A || typeof A[Symbol.iterator] != "function") continue;
|
|
252692
|
+
if (f === "::first-letter") {
|
|
252693
|
+
const x = getComputedStyle(t);
|
|
252694
|
+
if (!(A.color !== x.color || A.fontSize !== x.fontSize || A.fontWeight !== x.fontWeight)) continue;
|
|
252695
|
+
const M = Array.from(n.childNodes).find(
|
|
252696
|
+
(G) => G.nodeType === Node.TEXT_NODE && G.textContent && G.textContent.trim().length > 0
|
|
252881
252697
|
);
|
|
252882
|
-
|
|
252883
|
-
|
|
252884
|
-
|
|
252885
|
-
|
|
252886
|
-
|
|
252887
|
-
|
|
252888
|
-
|
|
252889
|
-
|
|
252890
|
-
|
|
252891
|
-
|
|
252892
|
-
|
|
252893
|
-
|
|
252894
|
-
|
|
252895
|
-
|
|
252896
|
-
|
|
252897
|
-
|
|
252898
|
-
|
|
252899
|
-
|
|
252900
|
-
|
|
252901
|
-
|
|
252902
|
-
if (
|
|
252903
|
-
const
|
|
252904
|
-
|
|
252698
|
+
if (!M) continue;
|
|
252699
|
+
const P = M.textContent, L = P.match(/^([^\p{L}\p{N}\s]*[\p{L}\p{N}](?:['’])?)/u), O = L == null ? void 0 : L[0], F = P.slice((O == null ? void 0 : O.length) || 0);
|
|
252700
|
+
if (!O || /[\uD800-\uDFFF]/.test(O)) continue;
|
|
252701
|
+
const U = document.createElement("span");
|
|
252702
|
+
U.textContent = O, U.dataset.snapdomPseudo = "::first-letter";
|
|
252703
|
+
const $ = snapshotComputedStyle(A), V = getStyleKey($, "span", c);
|
|
252704
|
+
r.set(U, V);
|
|
252705
|
+
const W = document.createTextNode(F);
|
|
252706
|
+
n.replaceChild(W, M), n.insertBefore(U, W);
|
|
252707
|
+
continue;
|
|
252708
|
+
}
|
|
252709
|
+
const g = A.getPropertyValue("content"), m = A.getPropertyValue("background-image"), C = A.getPropertyValue("background-color"), I = g !== "none", y = m && m !== "none", b = C && C !== "transparent" && C !== "rgba(0, 0, 0, 0)";
|
|
252710
|
+
if (I || y || b) {
|
|
252711
|
+
const x = A.getPropertyValue("font-family"), S = parseInt(A.getPropertyValue("font-size")) || 32, M = parseInt(A.getPropertyValue("font-weight")) || !1, P = A.getPropertyValue("color") || "#000", L = document.createElement("span");
|
|
252712
|
+
L.dataset.snapdomPseudo = f;
|
|
252713
|
+
const O = snapshotComputedStyle(A), F = getStyleKey(O, "span", c);
|
|
252714
|
+
r.set(L, F);
|
|
252715
|
+
const U = x && /font.*awesome|material|bootstrap|glyphicons|ionicons|remixicon|simple-line-icons|octicons|feather|typicons|weathericons|lucide/i.test(
|
|
252716
|
+
x
|
|
252717
|
+
), $ = parseContent(g);
|
|
252718
|
+
if (!l && U && $.length === 1) {
|
|
252719
|
+
const G = document.createElement("img");
|
|
252720
|
+
G.src = await iconToImage($, x, M, S, P), G.style = "display:block;width:100%;height:100%;object-fit:contain;", L.appendChild(G);
|
|
252721
|
+
} else if ($.startsWith("url(")) {
|
|
252722
|
+
const G = extractURL($);
|
|
252723
|
+
if (G && G.trim() !== "")
|
|
252905
252724
|
try {
|
|
252906
|
-
const
|
|
252907
|
-
|
|
252908
|
-
} catch (
|
|
252909
|
-
console.
|
|
252725
|
+
const H = document.createElement("img"), w = await fetchImage(safeEncodeURI(G));
|
|
252726
|
+
H.src = w, H.style = "display:block;width:100%;height:100%;object-fit:contain;", L.appendChild(H);
|
|
252727
|
+
} catch (H) {
|
|
252728
|
+
console.error(`[snapdom] Error in pseudo ${f} for`, t, H);
|
|
252910
252729
|
}
|
|
252911
|
-
}
|
|
252912
|
-
if (
|
|
252913
|
-
|
|
252730
|
+
} else !U && $ && $ !== "none" && (L.textContent = $);
|
|
252731
|
+
if (y)
|
|
252732
|
+
try {
|
|
252733
|
+
const G = splitBackgroundImage(m), H = await Promise.all(
|
|
252734
|
+
G.map((w) => inlineSingleBackgroundEntry(w))
|
|
252735
|
+
);
|
|
252736
|
+
L.style.backgroundImage = H.join(", ");
|
|
252737
|
+
} catch (G) {
|
|
252738
|
+
console.warn(`[snapdom] Failed to inline background-image for ${f}`, G);
|
|
252739
|
+
}
|
|
252740
|
+
if (b && (L.style.backgroundColor = C), !(L.childNodes.length > 0 || L.textContent && L.textContent.trim() !== "" || y || b)) continue;
|
|
252741
|
+
f === "::before" ? n.insertBefore(L, n.firstChild) : n.appendChild(L);
|
|
252914
252742
|
}
|
|
252915
252743
|
} catch (A) {
|
|
252916
252744
|
console.warn(`[snapdom] Failed to capture ${f} for`, t, A);
|
|
@@ -252964,6 +252792,12 @@ async function prepareClone(t, n = !1, r = !1) {
|
|
|
252964
252792
|
A.appendChild(y);
|
|
252965
252793
|
}
|
|
252966
252794
|
}
|
|
252795
|
+
if (t === l.get(d)) {
|
|
252796
|
+
const A = c.get(t) || window.getComputedStyle(t);
|
|
252797
|
+
c.set(t, A);
|
|
252798
|
+
const g = stripTranslate(A.transform);
|
|
252799
|
+
d.style.margin = "0", d.style.position = "static", d.style.top = "auto", d.style.left = "auto", d.style.right = "auto", d.style.bottom = "auto", d.style.zIndex = "auto", d.style.float = "none", d.style.clear = "none", d.style.transform = g || "";
|
|
252800
|
+
}
|
|
252967
252801
|
return { clone: d, classCSS: h, styleCache: c };
|
|
252968
252802
|
}
|
|
252969
252803
|
async function inlineImages(t, n = {}) {
|
|
@@ -252987,31 +252821,27 @@ async function inlineBackgroundImages(t, n, r, o = {}) {
|
|
|
252987
252821
|
for (; c.length; ) {
|
|
252988
252822
|
const [l, d] = c.shift(), h = r.get(l) || getStyle(l);
|
|
252989
252823
|
r.has(l) || r.set(l, h);
|
|
252990
|
-
const
|
|
252991
|
-
|
|
252992
|
-
const
|
|
252993
|
-
|
|
252994
|
-
|
|
252995
|
-
|
|
252996
|
-
if (bgCache.has(y))
|
|
252997
|
-
b = bgCache.get(y);
|
|
252998
|
-
else {
|
|
252999
|
-
const x = o.crossOrigin ? o.crossOrigin(y) : "anonymous";
|
|
253000
|
-
b = await fetchImage(y, 3e3, x), bgCache.set(y, b);
|
|
253001
|
-
}
|
|
253002
|
-
A[C] = `url(${b})`;
|
|
253003
|
-
} catch {
|
|
253004
|
-
A[C] = "none";
|
|
253005
|
-
}
|
|
252824
|
+
const f = h.getPropertyValue("background-image"), A = h.getPropertyValue("background-color");
|
|
252825
|
+
if (!f || f === "none") {
|
|
252826
|
+
const b = Array.from(l.children), x = Array.from(d.children);
|
|
252827
|
+
for (let S = 0; S < Math.min(b.length, x.length); S++)
|
|
252828
|
+
c.push([b[S], x[S]]);
|
|
252829
|
+
continue;
|
|
253006
252830
|
}
|
|
253007
|
-
|
|
253008
|
-
|
|
253009
|
-
|
|
253010
|
-
|
|
252831
|
+
const g = splitBackgroundImage(f), m = await Promise.all(
|
|
252832
|
+
g.map((b) => inlineSingleBackgroundEntry(b, o))
|
|
252833
|
+
);
|
|
252834
|
+
m.some(
|
|
252835
|
+
(b) => b && b !== "none" && !/^url\(undefined\)/.test(b)
|
|
252836
|
+
) && (d.style.backgroundImage = m.join(", ")), A && A !== "transparent" && A !== "rgba(0, 0, 0, 0)" && (d.style.backgroundColor = A);
|
|
252837
|
+
const I = Array.from(l.children), y = Array.from(d.children);
|
|
252838
|
+
for (let b = 0; b < Math.min(I.length, y.length); b++)
|
|
252839
|
+
c.push([I[b], y[b]]);
|
|
253011
252840
|
}
|
|
253012
252841
|
}
|
|
253013
252842
|
async function captureDOM(t, n = {}) {
|
|
253014
252843
|
if (!t) throw new Error("Element cannot be null or undefined");
|
|
252844
|
+
if (!(t instanceof Element)) throw new Error("captureDOM: Only Element nodes are supported");
|
|
253015
252845
|
const { compress: r = !0, embedFonts: o = !1, fast: c = !0, scale: l = 1 } = n;
|
|
253016
252846
|
let d, h, f, A = "", g = "", m, C;
|
|
253017
252847
|
if ({ clone: d, classCSS: h, styleCache: f } = await prepareClone(t, r, o), await new Promise((y) => {
|
|
@@ -253036,14 +252866,23 @@ async function captureDOM(t, n = {}) {
|
|
|
253036
252866
|
}
|
|
253037
252867
|
await new Promise((y) => {
|
|
253038
252868
|
idle(() => {
|
|
253039
|
-
const b = t.getBoundingClientRect()
|
|
253040
|
-
|
|
253041
|
-
const M =
|
|
253042
|
-
|
|
253043
|
-
|
|
253044
|
-
|
|
253045
|
-
|
|
253046
|
-
|
|
252869
|
+
const b = t.getBoundingClientRect();
|
|
252870
|
+
let x = b.width, S = b.height;
|
|
252871
|
+
const M = Number.isFinite(n.width), P = Number.isFinite(n.height), L = typeof l == "number" && l !== 1;
|
|
252872
|
+
if (!L) {
|
|
252873
|
+
const H = b.width / b.height;
|
|
252874
|
+
M && P ? (x = n.width, S = n.height) : M ? (x = n.width, S = x / H) : P && (S = n.height, x = S * H);
|
|
252875
|
+
}
|
|
252876
|
+
if (x = Math.ceil(x), S = Math.ceil(S), d.setAttribute("xmlns", "http://www.w3.org/1999/xhtml"), d.style.transformOrigin = "top left", !L && (M || P)) {
|
|
252877
|
+
const H = b.width, w = b.height, k = x / H, q = S / w, X = d.style.transform || "", K = `scale(${k}, ${q})`;
|
|
252878
|
+
d.style.transform = `${K} ${X}`.trim();
|
|
252879
|
+
} else L && isSafari() && (d.style.scale = `${l}`);
|
|
252880
|
+
const O = "http://www.w3.org/2000/svg", F = document.createElementNS(O, "foreignObject");
|
|
252881
|
+
F.setAttribute("width", "100%"), F.setAttribute("height", "100%");
|
|
252882
|
+
const U = document.createElement("style");
|
|
252883
|
+
U.textContent = g + A + "svg{overflow:visible;}" + h, F.appendChild(U), F.appendChild(d);
|
|
252884
|
+
const V = new XMLSerializer().serializeToString(F);
|
|
252885
|
+
C = `<svg xmlns="${O}" width="${x}" height="${S}" viewBox="0 0 ${x} ${S}">` + V + "</svg>", m = `data:image/svg+xml;charset=utf-8,${encodeURIComponent(C)}`, y();
|
|
253047
252886
|
}, { fast: c });
|
|
253048
252887
|
});
|
|
253049
252888
|
const I = document.getElementById("snapdom-sandbox");
|