diff --git a/src/Obj/Analysis/Flat/index.js b/src/Obj/Analysis/Flat/index.js index bbca206..f88fc9c 100644 --- a/src/Obj/Analysis/Flat/index.js +++ b/src/Obj/Analysis/Flat/index.js @@ -1,125 +1,125 @@ import Base from "../../Base/index"; import Dialog from '../../../BaseDialog' -import { setActiveViewer, closeRotateAround, closeViewFollow} from '../../../Global/global' +import { setActiveViewer, closeRotateAround, closeViewFollow } from '../../../Global/global' let FlatList = {} class Flat extends Base { - /** - * @constructor - * @description 模型压平 - * @param sdk - * @param {Cesium.Cesium3DTileset} tileset 三维模型 - * @param {Object} options - * @param {string} attr.id id - * @param {Cesium.Cartesian3[]} attr.positions 压平面坐标 - */ - constructor(sdk, tileset, options = {}, _Dialog = {}) { - super(sdk) - if (!tileset || !this.sdk || !this.sdk.viewer) return; - this.options = { ...options } - this.options.id = options.id || this.randomString() - this.options.name = options.name || '压平面' - this.options.positions = options.positions || [] - this.options.show = (options.show || options.show === false) ? options.show : true - this.tileset = tileset; - this.Dialog = _Dialog + /** + * @constructor + * @description 模型压平 + * @param sdk + * @param {Cesium.Cesium3DTileset} tileset 三维模型 + * @param {Object} options + * @param {string} attr.id id + * @param {Cesium.Cartesian3[]} attr.positions 压平面坐标 + */ + constructor(sdk, tileset, options = {}, _Dialog = {}) { + super(sdk) + if (!tileset || !this.sdk || !this.sdk.viewer) return; + this.options = { ...options } + this.options.id = options.id || this.randomString() + this.options.name = options.name || '压平面' + this.options.positions = options.positions || [] + this.options.show = (options.show || options.show === false) ? options.show : true + this.tileset = tileset; + this.Dialog = _Dialog - if (!this.options.height && this.options.height !== 0) { - let height = this.options.positions[0].alt - for (let i = 0; i < this.options.positions.length; i++) { - if (height > this.options.positions[i].alt) { - height = this.options.positions[i].alt - } - } - this.options.height = height + if (!this.options.height && this.options.height !== 0) { + let height = this.options.positions[0].alt + for (let i = 0; i < this.options.positions.length; i++) { + if (height > this.options.positions[i].alt) { + height = this.options.positions[i].alt } - - if (FlatList[this.tileset.id]) { - FlatList[this.tileset.id].push({ ...this.options }) - } - else { - FlatList[this.tileset.id] = [{ ...this.options }] - } - - this.center = tileset.boundingSphere.center.clone(); - this.center84 = this.cartesian3Towgs84(this.center, this.sdk.viewer) - this.matrix = Cesium.Transforms.eastNorthUpToFixedFrame(this.center.clone()); - this.localMatrix = Cesium.Matrix4.inverse(this.matrix, new Cesium.Matrix4()); - // this.entity = { - // id: this.options.id - // } - this.addFlat() - // Flat.createPolygon(this) + } + this.options.height = height } - get show() { - return this.options.show + if (FlatList[this.tileset.id]) { + FlatList[this.tileset.id].push({ ...this.options }) + } + else { + FlatList[this.tileset.id] = [{ ...this.options }] } - set show(v) { - this.options.show = v - for (let i = 0; i < FlatList[this.tileset.id].length; i++) { - if (FlatList[this.tileset.id][i].id == this.options.id) { - FlatList[this.tileset.id][i].show = v - } + this.center = tileset.boundingSphere.center.clone(); + this.center84 = this.cartesian3Towgs84(this.center, this.sdk.viewer) + this.matrix = Cesium.Transforms.eastNorthUpToFixedFrame(this.center.clone()); + this.localMatrix = Cesium.Matrix4.inverse(this.matrix, new Cesium.Matrix4()); + // this.entity = { + // id: this.options.id + // } + this.addFlat() + // Flat.createPolygon(this) + } + + get show() { + return this.options.show + } + + set show(v) { + this.options.show = v + for (let i = 0; i < FlatList[this.tileset.id].length; i++) { + if (FlatList[this.tileset.id][i].id == this.options.id) { + FlatList[this.tileset.id][i].show = v + } + } + this.addFlat() + } + + get height() { + return this.options.height + } + + set height(v) { + this.options.height = Number(v) + for (let i = 0; i < FlatList[this.tileset.id].length; i++) { + if (FlatList[this.tileset.id][i].id == this.options.id) { + FlatList[this.tileset.id][i].height = Number(v) + } + } + this.addFlat() + } + + get name() { + return this.options.name + } + + set name(v) { + this.options.name = v + for (let i = 0; i < FlatList[this.tileset.id].length; i++) { + if (FlatList[this.tileset.id][i].id == this.options.id) { + FlatList[this.tileset.id][i].name = v + } + } + } + + addFlat() { + let localPositionsArr = [] + for (let i = 0; i < FlatList[this.tileset.id].length; i++) { + let item = FlatList[this.tileset.id][i]; + if (item.show) { + const positions = item.positions; + let height = item.height + let fromDegreesArray = [] + for (let i = 0; i < positions.length; i++) { + fromDegreesArray.push(positions[i].lng, positions[i].lat) } - this.addFlat() + FlatList[this.tileset.id][i].flatHeight = height - this.center84.alt + let localCoor = this.cartesiansToLocal(Cesium.Cartesian3.fromDegreesArray(fromDegreesArray)); + localPositionsArr.push(localCoor); + } } - get height() { - return this.options.height - } - - set height(v) { - this.options.height = Number(v) - for (let i = 0; i < FlatList[this.tileset.id].length; i++) { - if (FlatList[this.tileset.id][i].id == this.options.id) { - FlatList[this.tileset.id][i].height = Number(v) - } - } - this.addFlat() - } - - get name() { - return this.options.name - } - - set name(v) { - this.options.name = v - for (let i = 0; i < FlatList[this.tileset.id].length; i++) { - if (FlatList[this.tileset.id][i].id == this.options.id) { - FlatList[this.tileset.id][i].name = v - } - } - } - - addFlat() { - let localPositionsArr = [] - for (let i = 0; i < FlatList[this.tileset.id].length; i++) { - let item = FlatList[this.tileset.id][i]; - if (item.show) { - const positions = item.positions; - let height = item.height - let fromDegreesArray = [] - for (let i = 0; i < positions.length; i++) { - fromDegreesArray.push(positions[i].lng, positions[i].lat) - } - FlatList[this.tileset.id][i].flatHeight = height - this.center84.alt - let localCoor = this.cartesiansToLocal(Cesium.Cartesian3.fromDegreesArray(fromDegreesArray)); - localPositionsArr.push(localCoor); - } - } - - const funstr = this.getIsinPolygonFun(localPositionsArr); - let str = ``; - for (let i = 0; i < localPositionsArr.length; i++) { - const coors = localPositionsArr[i]; - const n = coors.length; - let instr = ``; - coors.forEach((coordinate, index) => { - instr += `points_${n}[${index}] = vec2(${coordinate[0]}, ${coordinate[1]});\n`; - }) - str += ` + const funstr = this.getIsinPolygonFun(localPositionsArr); + let str = ``; + for (let i = 0; i < localPositionsArr.length; i++) { + const coors = localPositionsArr[i]; + const n = coors.length; + let instr = ``; + coors.forEach((coordinate, index) => { + instr += `points_${n}[${index}] = vec2(${coordinate[0]}, ${coordinate[1]});\n`; + }) + str += ` ${instr} if(isPointInPolygon_${n}(position2D)){ vec4 tileset_local_position_transformed = vec4(tileset_local_position.x, tileset_local_position.y, ground_z + ${FlatList[this.tileset.id][i].flatHeight}, 1.0); @@ -130,68 +130,68 @@ class Flat extends Base { return; }`; - } - - this.updateShader(funstr, str); } - // static createPolygon(that) { - // let color = '#ffffff' - // let linecolor = '#000000' - // let positions = that.options.positions - // let fromDegreesArray = [] - // for (let i = 0; i < positions.length; i++) { - // fromDegreesArray.push(positions[i].lng, positions[i].lat, that.options.height) - // } - // that.positions = Cesium.Cartesian3.fromDegreesArrayHeights(fromDegreesArray) - // that.entity = that.sdk.viewer.entities.add({ - // show: that.options.show, - // id: that.options.id, - // polyline: { - // positions: [...that.positions, that.positions[0], that.positions[1]], - // width: 2, - // material: Cesium.Color.fromCssColorString(linecolor), - // depthFailMaterial: new Cesium.PolylineDashMaterialProperty({ - // color: Cesium.Color.YELLOW - // }), - // clampToGround: false, - // zIndex: that.sdk._entityZIndex - // }, - // }) - // that.sdk._entityZIndex++ - // } + this.updateShader(funstr, str); + } - remove() { - FlatList[this.tileset.id] = FlatList[this.tileset.id].filter((attr) => { - return attr.id != this.options.id; - }) + // static createPolygon(that) { + // let color = '#ffffff' + // let linecolor = '#000000' + // let positions = that.options.positions + // let fromDegreesArray = [] + // for (let i = 0; i < positions.length; i++) { + // fromDegreesArray.push(positions[i].lng, positions[i].lat, that.options.height) + // } + // that.positions = Cesium.Cartesian3.fromDegreesArrayHeights(fromDegreesArray) + // that.entity = that.sdk.viewer.entities.add({ + // show: that.options.show, + // id: that.options.id, + // polyline: { + // positions: [...that.positions, that.positions[0], that.positions[1]], + // width: 2, + // material: Cesium.Color.fromCssColorString(linecolor), + // depthFailMaterial: new Cesium.PolylineDashMaterialProperty({ + // color: Cesium.Color.YELLOW + // }), + // clampToGround: false, + // zIndex: that.sdk._entityZIndex + // }, + // }) + // that.sdk._entityZIndex++ + // } - let localPositionsArr = []; - for (let i = 0; i < FlatList[this.tileset.id].length; i++) { - let item = FlatList[this.tileset.id][i]; - if (item.show) { - const positions = item.positions; - let height = item.height - let fromDegreesArray = [] - for (let i = 0; i < positions.length; i++) { - fromDegreesArray.push(positions[i].lng, positions[i].lat) - } - FlatList[this.tileset.id][i].flatHeight = height - this.center84.alt - let localCoor = this.cartesiansToLocal(Cesium.Cartesian3.fromDegreesArray(fromDegreesArray)); - localPositionsArr.push(localCoor); - } + remove() { + FlatList[this.tileset.id] = FlatList[this.tileset.id].filter((attr) => { + return attr.id != this.options.id; + }) + + let localPositionsArr = []; + for (let i = 0; i < FlatList[this.tileset.id].length; i++) { + let item = FlatList[this.tileset.id][i]; + if (item.show) { + const positions = item.positions; + let height = item.height + let fromDegreesArray = [] + for (let i = 0; i < positions.length; i++) { + fromDegreesArray.push(positions[i].lng, positions[i].lat) } + FlatList[this.tileset.id][i].flatHeight = height - this.center84.alt + let localCoor = this.cartesiansToLocal(Cesium.Cartesian3.fromDegreesArray(fromDegreesArray)); + localPositionsArr.push(localCoor); + } + } - const funstr = this.getIsinPolygonFun(localPositionsArr); - let str = ``; - for (let i = 0; i < localPositionsArr.length; i++) { - const coors = localPositionsArr[i]; - const n = coors.length; - let instr = ``; - coors.forEach((coordinate, index) => { - instr += `points_${n}[${index}] = vec2(${coordinate[0]}, ${coordinate[1]});\n`; - }) - str += ` + const funstr = this.getIsinPolygonFun(localPositionsArr); + let str = ``; + for (let i = 0; i < localPositionsArr.length; i++) { + const coors = localPositionsArr[i]; + const n = coors.length; + let instr = ``; + coors.forEach((coordinate, index) => { + instr += `points_${n}[${index}] = vec2(${coordinate[0]}, ${coordinate[1]});\n`; + }) + str += ` ${instr} if(isPointInPolygon_${n}(position2D)){ vec4 tileset_local_position_transformed = vec4(tileset_local_position.x, tileset_local_position.y, ground_z + ${FlatList[this.tileset.id][i].flatHeight}, 1.0); @@ -201,21 +201,21 @@ class Flat extends Base { return; }`; - } - this.updateShader(funstr, str); } + this.updateShader(funstr, str); + } - // 根据数组长度,构建 判断点是否在面内 的压平函数 - getIsinPolygonFun(polygons) { - let pmap = polygons.map((polygon) => polygon.length); - let uniqueArray = this.getUniqueArray(pmap); - let str = ``; - uniqueArray.forEach(length => { - str += ` + // 根据数组长度,构建 判断点是否在面内 的压平函数 + getIsinPolygonFun(polygons) { + let pmap = polygons.map((polygon) => polygon.length); + let uniqueArray = this.getUniqueArray(pmap); + let str = ``; + uniqueArray.forEach(length => { + str += ` vec2 points_${length}[${length}]; bool isPointInPolygon_${length}(vec2 point){ int nCross = 0; // 交点数 - const int n = ${length}; + const int n = ${length}; for(int i = 0; i < n; i++){ vec2 p1 = points_${length}[i]; vec2 p2 = points_${length}[int(mod(float(i+1),float(n)))]; @@ -236,27 +236,27 @@ class Flat extends Base { return int(mod(float(nCross), float(2))) == 1; } ` - }) - return str - } + }) + return str + } - updateShader(vtx1, vtx2) { - let flatCustomShader = new Cesium.CustomShader({ - uniforms: { - u_tileset_localToWorldMatrix: { - type: Cesium.UniformType.MAT4, - value: this.matrix, - }, - u_tileset_worldToLocalMatrix: { - type: Cesium.UniformType.MAT4, - value: this.localMatrix, - }, - u_flatHeight: { - type: Cesium.UniformType.FLOAT, - value: this.flatHeight, - }, - }, - vertexShaderText: ` + updateShader(vtx1, vtx2) { + let flatCustomShader = new Cesium.CustomShader({ + uniforms: { + u_tileset_localToWorldMatrix: { + type: Cesium.UniformType.MAT4, + value: this.matrix, + }, + u_tileset_worldToLocalMatrix: { + type: Cesium.UniformType.MAT4, + value: this.localMatrix, + }, + u_flatHeight: { + type: Cesium.UniformType.FLOAT, + value: this.flatHeight, + }, + }, + vertexShaderText: ` // 所有isPointInPolygon函数 ${vtx1} void vertexMain(VertexInput vsInput, inout czm_modelVertexOutput vsOutput){ @@ -268,216 +268,225 @@ class Flat extends Base { // 多个多边形区域 ${vtx2} }`, - }); - this.tileset.customShader = flatCustomShader; - this.sdk.viewer.scene.requestRender(); + }); + this.tileset.customShader = flatCustomShader; + this.sdk.viewer.scene.requestRender(); + } + + // 数组去重,不能处理嵌套的数组 + getUniqueArray = (arr) => { + return arr.filter(function (item, index, arr) { + //当前元素,在原始数组中的第一个索引==当前索引值,否则返回当前元素 + return arr.indexOf(item, 0) === index; + }); + } + + + // 世界坐标转数组局部坐标 + cartesiansToLocal(positions) { + let arr = []; + for (let i = 0; i < positions.length; i++) { + let position = positions[i]; + let localp = Cesium.Matrix4.multiplyByPoint( + this.localMatrix, + position.clone(), + new Cesium.Cartesian3() + ) + arr.push([localp.x, localp.y]); } + return arr; + } - // 数组去重,不能处理嵌套的数组 - getUniqueArray = (arr) => { - return arr.filter(function (item, index, arr) { - //当前元素,在原始数组中的第一个索引==当前索引值,否则返回当前元素 - return arr.indexOf(item, 0) === index; - }); + /** + * 飞到 +*/ + async flyTo() { + setActiveViewer(0) + closeRotateAround(this.sdk) + closeViewFollow(this.sdk) + + if (this.options.customView && this.options.customView.relativePosition && this.options.customView.orientation) { + let orientation = { + heading: Cesium.Math.toRadians(this.options.customView.orientation.heading || 0.0), + pitch: Cesium.Math.toRadians(this.options.customView.orientation.pitch || -60.0), + roll: Cesium.Math.toRadians(this.options.customView.orientation.roll || 0.0) + } + + let lng = this.options.customView.relativePosition.lng + let lat = this.options.customView.relativePosition.lat + let alt = this.options.customView.relativePosition.alt + let destination = Cesium.Cartesian3.fromDegrees(lng, lat, alt) + + let position = { lng: 0, lat: 0 } + if (this.options.position) { + position = { ...this.options.position } + } + else if (this.options.positions) { + position = { ...this.options.positions[0] } + } + else if (this.options.line && this.options.line.positions) { + position = { ...this.options.line.positions[0] } + } + else if (this.options.center) { + position = { ...this.options.center } + } + else if (this.options.start) { + position = { ...this.options.start } + } + else { + if (this.options.hasOwnProperty('lng')) { + position.lng = this.options.lng + } + if (this.options.hasOwnProperty('lat')) { + position.lat = this.options.lat + } + if (this.options.hasOwnProperty('alt')) { + position.alt = this.options.alt + } + } + // 如果没有高度值,则获取紧贴高度计算 + if (!position.hasOwnProperty('alt')) { + position.alt = await this.getClampToHeight(position) + } + lng = this.options.customView.relativePosition.lng + position.lng + lat = this.options.customView.relativePosition.lat + position.lat + alt = this.options.customView.relativePosition.alt + position.alt + destination = Cesium.Cartesian3.fromDegrees(lng, lat, alt) + this.sdk.viewer.camera.flyTo({ + destination: destination, + orientation: orientation + }) } - - - // 世界坐标转数组局部坐标 - cartesiansToLocal(positions) { - let arr = []; - for (let i = 0; i < positions.length; i++) { - let position = positions[i]; - let localp = Cesium.Matrix4.multiplyByPoint( - this.localMatrix, - position.clone(), - new Cesium.Cartesian3() - ) - arr.push([localp.x, localp.y]); + else { + let positionArray = [] + for (let i = 0; i < this.options.positions.length; i++) { + let a = Cesium.Cartesian3.fromDegrees(this.options.positions[i].lng, this.options.positions[i].lat, this.center84.alt) + positionArray.push(a.x, a.y, a.z) + } + let BoundingSphere = Cesium.BoundingSphere.fromVertices(positionArray) + this.sdk.viewer.camera.flyToBoundingSphere(BoundingSphere, { + offset: { + heading: Cesium.Math.toRadians(0.0), + pitch: Cesium.Math.toRadians(-90.0), + roll: Cesium.Math.toRadians(0.0) } - return arr; + }) } + } - /** - * 飞到 - */ - async flyTo() { - setActiveViewer(0) - closeRotateAround(this.sdk) - closeViewFollow(this.sdk) + async edit(state) { + if (state) { + this.originalOptions = this.deepCopyObj(this.options) + // this._DialogObject = await new Dialog(this.sdk.viewer._container, { + // title: '压平面属性', left: '180px', top: '100px', + // removeCallBack: () => { + // this.Dialog.removeCallBack && this.Dialog.removeCallBack() + // }, + // closeCallBack: () => { + // this.reset() + // this.Dialog.closeCallBack && this.Dialog.closeCallBack() + // } + // }) + // await this._DialogObject.init() + // 内容部分 + // let contentElm = document.createElement('div'); + // contentElm.innerHTML = ` + // + //
+ //
+ //
+ // 名称 + // + //
+ //
+ //
+ //
+ // 压平高度 + //
+ // + // m + // + //
+ //
+ //
+ //
+ // ` + // this._DialogObject.contentAppChild(contentElm) + let contentElm = document.getElementsByClassName('flatPlane')[0] + let name_elm = contentElm.getElementsByClassName('input-name')[0] + name_elm.value = this.options.name + name_elm.addEventListener('input', () => { + this.name = name_elm.value + }) - if (this.options.customView && this.options.customView.relativePosition && this.options.customView.orientation) { - let orientation = { - heading: Cesium.Math.toRadians(this.options.customView.orientation.heading || 0.0), - pitch: Cesium.Math.toRadians(this.options.customView.orientation.pitch || -60.0), - roll: Cesium.Math.toRadians(this.options.customView.orientation.roll || 0.0) - } - - let lng = this.options.customView.relativePosition.lng - let lat = this.options.customView.relativePosition.lat - let alt = this.options.customView.relativePosition.alt - let destination = Cesium.Cartesian3.fromDegrees(lng, lat, alt) - - let position = { lng: 0, lat: 0 } - if (this.options.position) { - position = { ...this.options.position } - } - else if (this.options.positions) { - position = { ...this.options.positions[0] } - } - else if (this.options.line && this.options.line.positions) { - position = { ...this.options.line.positions[0] } - } - else if (this.options.center) { - position = { ...this.options.center } - } - else if (this.options.start) { - position = { ...this.options.start } - } - else { - if (this.options.hasOwnProperty('lng')) { - position.lng = this.options.lng - } - if (this.options.hasOwnProperty('lat')) { - position.lat = this.options.lat - } - if (this.options.hasOwnProperty('alt')) { - position.alt = this.options.alt - } - } - // 如果没有高度值,则获取紧贴高度计算 - if (!position.hasOwnProperty('alt')) { - position.alt = await this.getClampToHeight(position) - } - lng = this.options.customView.relativePosition.lng + position.lng - lat = this.options.customView.relativePosition.lat + position.lat - alt = this.options.customView.relativePosition.alt + position.alt - destination = Cesium.Cartesian3.fromDegrees(lng, lat, alt) - this.sdk.viewer.camera.flyTo({ - destination: destination, - orientation: orientation - }) - } - else { - let positionArray = [] - for (let i = 0; i < this.options.positions.length; i++) { - let a = Cesium.Cartesian3.fromDegrees(this.options.positions[i].lng, this.options.positions[i].lat, this.center84.alt) - positionArray.push(a.x, a.y, a.z) - } - let BoundingSphere = Cesium.BoundingSphere.fromVertices(positionArray) - this.sdk.viewer.camera.flyToBoundingSphere(BoundingSphere, { - offset: { - heading: Cesium.Math.toRadians(0.0), - pitch: Cesium.Math.toRadians(-90.0), - roll: Cesium.Math.toRadians(0.0) - } - }) - } - } - - async edit(state) { - if (state) { - this.originalOptions = this.deepCopyObj(this.options) - this._DialogObject = await new Dialog(this.sdk.viewer._container, { - title: '压平面属性', left: '180px', top: '100px', - removeCallBack: () => { - this.Dialog.removeCallBack && this.Dialog.removeCallBack() - }, - closeCallBack: () => { - this.reset() - this.Dialog.closeCallBack && this.Dialog.closeCallBack() - } - }) - await this._DialogObject.init() - // 内容部分 - let contentElm = document.createElement('div'); - contentElm.innerHTML = ` - -
-
-
- 名称 - -
-
-
-
- 压平高度 -
- - m - -
-
-
-
- ` - this._DialogObject.contentAppChild(contentElm) - let name_elm = contentElm.getElementsByClassName('input-name')[0] - name_elm.value = this.options.name - name_elm.addEventListener('input', () => { - this.name = name_elm.value - }) - - let height_elm = contentElm.getElementsByClassName('flat-height')[0] - height_elm.value = this.options.height - height_elm.addEventListener('input', () => { - this.height = Number(height_elm.value) - this.addFlat() - }) - - let confirmElm = document.createElement('button'); - confirmElm.className = 'btn' - confirmElm.innerHTML = '确认' - this._DialogObject.footAppChild(confirmElm) - confirmElm.addEventListener('click', () => { - if (!this.options.name) { - this.options.name = '压平面' - } - this.originalOptions = this.deepCopyObj(this.options) - this._DialogObject.close() - this.Dialog.confirmCallBack && this.Dialog.confirmCallBack(this.options) - }) - - // let flatElm = document.createElement('button'); - // flatElm.className = 'btn' - // flatElm.innerHTML = '二次编辑' - // flatElm.style.width = 'auto' - // flatElm.style.position = 'absolute' - // flatElm.style.left = '10px' - // this._DialogObject.footAppChild(flatElm) - // flatElm.addEventListener('click', () => { - // console.log('二次编辑') - // }) - } - else { - if (this._DialogObject && this._DialogObject.close) { - this._DialogObject.close() - this._DialogObject = null - } - } - } - - reset() { - this.options = this.deepCopyObj(this.originalOptions) - this.name = this.options.name - this.height = this.options.height + let height_elm = contentElm.getElementsByClassName('flat-height')[0] + height_elm.value = this.options.height + height_elm.addEventListener('input', () => { + this.height = Number(height_elm.value) this.addFlat() - } + }) - flatEdit(state) { - if (state) { - let positions = that.options.positions - let fromDegreesArray = [] - for (let i = 0; i < positions.length; i++) { - fromDegreesArray.push(positions[i].lng, positions[i].lat, FlatList[this.tileset.id]) - } - that.positions = Cesium.Cartesian3.fromDegreesArrayHeights(fromDegreesArray) - } - } + // let confirmElm = document.createElement('button'); + // confirmElm.className = 'btn' + // confirmElm.innerHTML = '确认' + // this._DialogObject.footAppChild(confirmElm) + // confirmElm.addEventListener('click', () => { + // if (!this.options.name) { + // this.options.name = '压平面' + // } + // this.originalOptions = this.deepCopyObj(this.options) + // this._DialogObject.close() + // this.Dialog.confirmCallBack && this.Dialog.confirmCallBack(this.options) + // }) - flicker() { } + // let flatElm = document.createElement('button'); + // flatElm.className = 'btn' + // flatElm.innerHTML = '二次编辑' + // flatElm.style.width = 'auto' + // flatElm.style.position = 'absolute' + // flatElm.style.left = '10px' + // this._DialogObject.footAppChild(flatElm) + // flatElm.addEventListener('click', () => { + // console.log('二次编辑') + // }) + } + else { + if (this._DialogObject && this._DialogObject.close) { + this._DialogObject.close() + this._DialogObject = null + } + } + } + + sure() { + if (!this.options.name) { + this.options.name = '压平面' + } + this.originalOptions = this.deepCopyObj(this.options) + // this._DialogObject.close() + // this.Dialog.confirmCallBack && this.Dialog.confirmCallBack(this.options) + } + reset() { + this.options = this.deepCopyObj(this.originalOptions) + this.name = this.options.name + this.height = this.options.height + this.addFlat() + } + + flatEdit(state) { + if (state) { + let positions = that.options.positions + let fromDegreesArray = [] + for (let i = 0; i < positions.length; i++) { + fromDegreesArray.push(positions[i].lng, positions[i].lat, FlatList[this.tileset.id]) + } + that.positions = Cesium.Cartesian3.fromDegreesArrayHeights(fromDegreesArray) + } + } + + flicker() { } } -export default Flat; \ No newline at end of file +export default Flat; diff --git a/src/Obj/Base/RoutePlanning/index.js b/src/Obj/Base/RoutePlanning/index.js index f277340..07c8f0f 100644 --- a/src/Obj/Base/RoutePlanning/index.js +++ b/src/Obj/Base/RoutePlanning/index.js @@ -195,22 +195,23 @@ class RoutePlanning extends Base { this._element_style.type = 'text/css' this._element_style.setAttribute('data-name', 'YJ_style_dialog') this._element_style.innerHTML = css() - this._DialogObject = await new Dialog(this.sdk.viewer._container, { - title: '路径规划', - closeCallBack: () => { - this.tip && this.tip.destroy() - this.event && this.event.destroy() - this.Dialog.closeCallBack && this.Dialog.closeCallBack() - } - }) - await this._DialogObject.init() + // this._DialogObject = await new Dialog(this.sdk.viewer._container, { + // title: '路径规划', + // closeCallBack: () => { + // this.tip && this.tip.destroy() + // this.event && this.event.destroy() + // this.Dialog.closeCallBack && this.Dialog.closeCallBack() + // } + // }) + // await this._DialogObject.init() let div = document.createElement('div') div.style.position = 'absolute' div.style.left = '24px' div.style.flet = '0' div.style.display = 'flex' - this._DialogObject.footAppChild(div) + document.getElementsByClassName('RoutePlanning')[0].getElementsByClassName('foot')[0].appendChild(div) + // this._DialogObject.footAppChild(div) let queryBtn = document.createElement('button') queryBtn.className = 'default' @@ -285,10 +286,10 @@ class RoutePlanning extends Base { div.appendChild(cleanBtn) document.getElementsByTagName('head')[0].appendChild(this._element_style) - let contentElm = document.createElement('div') - contentElm.innerHTML = html() - this._DialogObject.contentAppChild(contentElm) - + // let contentElm = document.createElement('div') + // contentElm.innerHTML = html() + // this._DialogObject.contentAppChild(contentElm) + let contentElm = document.getElementsByClassName('RoutePlanning')[0] if (this.options.gps) { let locateCurrentBtn = document.createElement('button') locateCurrentBtn.innerHTML = '当前位置' @@ -300,7 +301,7 @@ class RoutePlanning extends Base { let startColElm = contentElm.getElementsByClassName('start-col')[0] startColElm.appendChild(locateCurrentBtn) - let endPickBtnElm = this._DialogObject._element.body.getElementsByClassName( + let endPickBtnElm = contentElm._element.body.getElementsByClassName( 'end-pick-btn' )[0] endPickBtnElm.style.marginRight = '91px' diff --git a/yarn.lock b/yarn.lock index 68e7568..6b2126b 100644 --- a/yarn.lock +++ b/yarn.lock @@ -24,7 +24,7 @@ resolved "https://registry.npmmirror.com/@babel/compat-data/-/compat-data-7.26.2.tgz" integrity sha512-Z0WgzSEa+aUcdiJuCIqgujCshpMWgUpgOxXotrYPSA53hA3qopNaqcJpyr0hVb1FeWdnqFA35/fUtXgBK8srQg== -"@babel/core@^7.4.0": +"@babel/core@^7.0.0", "@babel/core@^7.0.0-0", "@babel/core@^7.0.0-0 || ^8.0.0-0 <8.0.0", "@babel/core@^7.12.0", "@babel/core@^7.13.0", "@babel/core@^7.4.0", "@babel/core@^7.4.0 || ^8.0.0-0 <8.0.0": version "7.26.0" resolved "https://registry.npmmirror.com/@babel/core/-/core-7.26.0.tgz" integrity sha512-i1SLeK+DzNnQ3LL/CswPCa/E5u4lh1k6IAEphON8F+cXt0t9euTshDru0q7/IqMa1PMPz5RnHuHscF8/ZJsStg== @@ -971,7 +971,7 @@ resolved "https://registry.npmmirror.com/@types/linkify-it/-/linkify-it-5.0.0.tgz" integrity sha512-sVDA58zAw4eWAffKOaQH5/5j3XeayukzDk+ewSsnv3p4yJEZHCCzMDiZM8e0OUrRvmpGZ85jf4yDHkHsgBNr9Q== -"@types/markdown-it@^12.2.3": +"@types/markdown-it@*", "@types/markdown-it@^12.2.3": version "12.2.3" resolved "https://registry.npmmirror.com/@types/markdown-it/-/markdown-it-12.2.3.tgz" integrity sha512-GKMHFfv3458yYy+v/N8gjufHO6MSZKCOXpZc5GXIWWy8uldwfmPn98vp81gZ5f9SVw8YYBctgfJ22a2d7AOMeQ== @@ -1144,7 +1144,7 @@ acorn-jsx@^5.0.0: resolved "https://registry.npmmirror.com/acorn-jsx/-/acorn-jsx-5.3.2.tgz" integrity sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ== -acorn@^6.0.7, acorn@^6.4.1: +"acorn@^6.0.0 || ^7.0.0 || ^8.0.0", acorn@^6.0.7, acorn@^6.4.1: version "6.4.2" resolved "https://registry.npmmirror.com/acorn/-/acorn-6.4.2.tgz" integrity sha512-XtGIhXwF8YM8bJhGxG5kXgjkEuNGLTkoYqVE+KMR+aspr4KGYmKYg7yUe3KghyQ9yheNwLnjmzh/7+gfDBmHCQ== @@ -1159,7 +1159,7 @@ ajv-keywords@^3.1.0, ajv-keywords@^3.4.1, ajv-keywords@^3.5.2: resolved "https://registry.npmmirror.com/ajv-keywords/-/ajv-keywords-3.5.2.tgz" integrity sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ== -ajv@^6.1.0, ajv@^6.10.2, ajv@^6.12.4, ajv@^6.12.5, ajv@^6.9.1: +ajv@^6.1.0, ajv@^6.10.2, ajv@^6.12.4, ajv@^6.12.5, ajv@^6.9.1, ajv@>=5.0.0: version "6.12.6" resolved "https://registry.npmmirror.com/ajv/-/ajv-6.12.6.tgz" integrity sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g== @@ -1422,11 +1422,6 @@ balanced-match@^1.0.0: resolved "https://registry.npmmirror.com/balanced-match/-/balanced-match-1.0.2.tgz" integrity sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw== -base64-js@^1.0.2: - version "1.5.1" - resolved "https://registry.npmmirror.com/base64-js/-/base64-js-1.5.1.tgz" - integrity sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA== - base@^0.11.1: version "0.11.2" resolved "https://registry.npmmirror.com/base/-/base-0.11.2.tgz" @@ -1440,6 +1435,11 @@ base@^0.11.1: mixin-deep "^1.2.0" pascalcase "^0.1.1" +base64-js@^1.0.2: + version "1.5.1" + resolved "https://registry.npmmirror.com/base64-js/-/base64-js-1.5.1.tgz" + integrity sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA== + big.js@^5.2.2: version "5.2.2" resolved "https://registry.npmmirror.com/big.js/-/big.js-5.2.2.tgz" @@ -1455,19 +1455,22 @@ binary-extensions@^2.0.0: resolved "https://registry.npmmirror.com/binary-extensions/-/binary-extensions-2.3.0.tgz" integrity sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw== -bindings@^1.5.0: - version "1.5.0" - resolved "https://registry.npmmirror.com/bindings/-/bindings-1.5.0.tgz#10353c9e945334bc0511a6d90b38fbc7c9c504df" - integrity sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ== - dependencies: - file-uri-to-path "1.0.0" - bluebird@^3.5.5, bluebird@^3.7.2: version "3.7.2" resolved "https://registry.npmmirror.com/bluebird/-/bluebird-3.7.2.tgz" integrity sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg== -bn.js@^4.0.0, bn.js@^4.1.0, bn.js@^4.11.9: +bn.js@^4.0.0: + version "4.12.1" + resolved "https://registry.npmmirror.com/bn.js/-/bn.js-4.12.1.tgz" + integrity sha512-k8TVBiPkPJT9uHLdOKfFpqcfprwBFOAAXXozRubr7R7PfIuKvQlzcI4M0pALeqXN09vdaMbUdUj+pass+uULAg== + +bn.js@^4.1.0: + version "4.12.1" + resolved "https://registry.npmmirror.com/bn.js/-/bn.js-4.12.1.tgz" + integrity sha512-k8TVBiPkPJT9uHLdOKfFpqcfprwBFOAAXXozRubr7R7PfIuKvQlzcI4M0pALeqXN09vdaMbUdUj+pass+uULAg== + +bn.js@^4.11.9: version "4.12.1" resolved "https://registry.npmmirror.com/bn.js/-/bn.js-4.12.1.tgz" integrity sha512-k8TVBiPkPJT9uHLdOKfFpqcfprwBFOAAXXozRubr7R7PfIuKvQlzcI4M0pALeqXN09vdaMbUdUj+pass+uULAg== @@ -1576,7 +1579,7 @@ browserify-zlib@^0.2.0: dependencies: pako "~1.0.5" -browserslist@^4.24.0, browserslist@^4.24.2: +browserslist@^4.24.0, browserslist@^4.24.2, "browserslist@>= 4.21.0": version "4.24.2" resolved "https://registry.npmmirror.com/browserslist/-/browserslist-4.24.2.tgz" integrity sha512-ZIc+Q62revdMcqC6aChtW4jz3My3klmCO1fEmINZY/8J3EpBg5/A/D0AKmBveUh6pgoeycoMkVMko84tuYS+Gg== @@ -2006,7 +2009,14 @@ data-view-byte-offset@^1.0.0: es-errors "^1.3.0" is-data-view "^1.0.1" -debug@^2.2.0, debug@^2.3.3: +debug@^2.2.0: + version "2.6.9" + resolved "https://registry.npmmirror.com/debug/-/debug-2.6.9.tgz" + integrity sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA== + dependencies: + ms "2.0.0" + +debug@^2.3.3: version "2.6.9" resolved "https://registry.npmmirror.com/debug/-/debug-2.6.9.tgz" integrity sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA== @@ -2444,7 +2454,7 @@ eslint-visitor-keys@^1.0.0, eslint-visitor-keys@^1.1.0: resolved "https://registry.npmmirror.com/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz" integrity sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ== -eslint@^5.15.3: +"eslint@^2 || ^3 || ^4 || ^5 || ^6 || ^7.2.0 || ^8 || ^9", eslint@^5.15.3, "eslint@>= 4.12.1", eslint@>=3.14.1, eslint@>=4.19.1, eslint@>=5.0.0: version "5.16.0" resolved "https://registry.npmmirror.com/eslint/-/eslint-5.16.0.tgz" integrity sha512-S3Rz11i7c8AA5JPv7xAH+dOyq/Cu/VXHiHXBPOU1k/JAM5dXqQPt3qcrhpHSorXmrpu2g0gkIBVXAqCpzfoZIg== @@ -2519,7 +2529,12 @@ estraverse@^4.1.1: resolved "https://registry.npmmirror.com/estraverse/-/estraverse-4.3.0.tgz" integrity sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw== -estraverse@^5.1.0, estraverse@^5.2.0: +estraverse@^5.1.0: + version "5.3.0" + resolved "https://registry.npmmirror.com/estraverse/-/estraverse-5.3.0.tgz" + integrity sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA== + +estraverse@^5.2.0: version "5.3.0" resolved "https://registry.npmmirror.com/estraverse/-/estraverse-5.3.0.tgz" integrity sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA== @@ -2639,11 +2654,6 @@ file-entry-cache@^5.0.1: dependencies: flat-cache "^2.0.1" -file-uri-to-path@1.0.0: - version "1.0.0" - resolved "https://registry.npmmirror.com/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz#553a7b8446ff6f684359c445f1e37a05dacc33dd" - integrity sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw== - fill-range@^4.0.0: version "4.0.0" resolved "https://registry.npmmirror.com/fill-range/-/fill-range-4.0.0.tgz" @@ -2768,19 +2778,6 @@ fs.realpath@^1.0.0: resolved "https://registry.npmmirror.com/fs.realpath/-/fs.realpath-1.0.0.tgz" integrity sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw== -fsevents@^1.2.7: - version "1.2.13" - resolved "https://registry.npmmirror.com/fsevents/-/fsevents-1.2.13.tgz#f325cb0455592428bcf11b383370ef70e3bfcc38" - integrity sha512-oWb1Z6mkHIskLzEJ/XWX0srkpkTQ7vaopMQkyaEIoq0fmtFVxOthb8cCxeT+p3ynTdkk/RZwbgG4brR5BeWECw== - dependencies: - bindings "^1.5.0" - nan "^2.12.1" - -fsevents@~2.3.2: - version "2.3.3" - resolved "https://registry.npmmirror.com/fsevents/-/fsevents-2.3.3.tgz#cac6407785d03675a2a5e1a5305c697b347d90d6" - integrity sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw== - function-bind@^1.1.2: version "1.1.2" resolved "https://registry.npmmirror.com/function-bind/-/function-bind-1.1.2.tgz" @@ -3131,7 +3128,7 @@ inflight@^1.0.4: once "^1.3.0" wrappy "1" -inherits@2, inherits@^2.0.1, inherits@^2.0.3, inherits@^2.0.4, inherits@~2.0.1, inherits@~2.0.3: +inherits@^2.0.1, inherits@^2.0.3, inherits@^2.0.4, inherits@~2.0.1, inherits@~2.0.3, inherits@2: version "2.0.4" resolved "https://registry.npmmirror.com/inherits/-/inherits-2.0.4.tgz" integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== @@ -3297,6 +3294,11 @@ is-extendable@^0.1.0, is-extendable@^0.1.1: resolved "https://registry.npmmirror.com/is-extendable/-/is-extendable-0.1.1.tgz" integrity sha512-5BMULNob1vgFX6EjQw5izWDxrecWK9AM72rugNr0TFldMOi0fj6Jk+zeKIt0xGj4cEfQIJth4w3OKWOJ4f+AFw== +is-extendable@^0.1.1: + version "0.1.1" + resolved "https://registry.npmmirror.com/is-extendable/-/is-extendable-0.1.1.tgz" + integrity sha512-5BMULNob1vgFX6EjQw5izWDxrecWK9AM72rugNr0TFldMOi0fj6Jk+zeKIt0xGj4cEfQIJth4w3OKWOJ4f+AFw== + is-extendable@^1.0.1: version "1.0.1" resolved "https://registry.npmmirror.com/is-extendable/-/is-extendable-1.0.1.tgz" @@ -3449,7 +3451,7 @@ is-wsl@^1.1.0: resolved "https://registry.npmmirror.com/is-wsl/-/is-wsl-1.1.0.tgz" integrity sha512-gfygJYZ2gLTDlmbWMI0CE2MwnFzSN/2SZfkMlItC4K/JBlsWVDB0bO6XhqcY13YXE7iMcAJnzTCJjPiTeJJ0Mw== -isarray@1.0.0, isarray@^1.0.0, isarray@~1.0.0: +isarray@^1.0.0, isarray@~1.0.0, isarray@1.0.0: version "1.0.0" resolved "https://registry.npmmirror.com/isarray/-/isarray-1.0.0.tgz" integrity sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ== @@ -3542,7 +3544,14 @@ json-stable-stringify-without-jsonify@^1.0.1: resolved "https://registry.npmmirror.com/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz" integrity sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw== -json5@^1.0.1, json5@^1.0.2: +json5@^1.0.1: + version "1.0.2" + resolved "https://registry.npmmirror.com/json5/-/json5-1.0.2.tgz" + integrity sha512-g1MWMLBiz8FKi1e4w0UyVL3w+iJceWAFBAaBnnGKOpNa5f8TLktkbre1+s6oICydWAm+HRUGTmI+//xv2hvXYA== + dependencies: + minimist "^1.2.0" + +json5@^1.0.2: version "1.0.2" resolved "https://registry.npmmirror.com/json5/-/json5-1.0.2.tgz" integrity sha512-g1MWMLBiz8FKi1e4w0UyVL3w+iJceWAFBAaBnnGKOpNa5f8TLktkbre1+s6oICydWAm+HRUGTmI+//xv2hvXYA== @@ -3554,7 +3563,21 @@ json5@^2.1.2, json5@^2.2.3: resolved "https://registry.npmmirror.com/json5/-/json5-2.2.3.tgz" integrity sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg== -kind-of@^3.0.2, kind-of@^3.0.3, kind-of@^3.2.0: +kind-of@^3.0.2: + version "3.2.2" + resolved "https://registry.npmmirror.com/kind-of/-/kind-of-3.2.2.tgz" + integrity sha512-NOW9QQXMoZGg/oqnVNoNTTIFEIid1627WCffUBJEdMxYApq7mNE7CpzucIPc+ZQg25Phej7IJSmX3hO+oblOtQ== + dependencies: + is-buffer "^1.1.5" + +kind-of@^3.0.3: + version "3.2.2" + resolved "https://registry.npmmirror.com/kind-of/-/kind-of-3.2.2.tgz" + integrity sha512-NOW9QQXMoZGg/oqnVNoNTTIFEIid1627WCffUBJEdMxYApq7mNE7CpzucIPc+ZQg25Phej7IJSmX3hO+oblOtQ== + dependencies: + is-buffer "^1.1.5" + +kind-of@^3.2.0: version "3.2.2" resolved "https://registry.npmmirror.com/kind-of/-/kind-of-3.2.2.tgz" integrity sha512-NOW9QQXMoZGg/oqnVNoNTTIFEIid1627WCffUBJEdMxYApq7mNE7CpzucIPc+ZQg25Phej7IJSmX3hO+oblOtQ== @@ -3600,7 +3623,16 @@ loader-runner@^2.4.0: resolved "https://registry.npmmirror.com/loader-runner/-/loader-runner-2.4.0.tgz" integrity sha512-Jsmr89RcXGIwivFY21FcRrisYZfvLMTWx5kOLc+JTxtpBOG6xML0vzbc6SEQG2FO9/4Fc3wW4LVcB5DmGflaRw== -loader-utils@^1.2.3, loader-utils@^1.4.0: +loader-utils@^1.2.3: + version "1.4.2" + resolved "https://registry.npmmirror.com/loader-utils/-/loader-utils-1.4.2.tgz" + integrity sha512-I5d00Pd/jwMD2QCduo657+YM/6L3KZu++pmX9VFncxaxvHcru9jx1lBaFft+r4Mt2jK0Yhp41XlRAihzPxHNCg== + dependencies: + big.js "^5.2.2" + emojis-list "^3.0.0" + json5 "^1.0.1" + +loader-utils@^1.4.0: version "1.4.2" resolved "https://registry.npmmirror.com/loader-utils/-/loader-utils-1.4.2.tgz" integrity sha512-I5d00Pd/jwMD2QCduo657+YM/6L3KZu++pmX9VFncxaxvHcru9jx1lBaFft+r4Mt2jK0Yhp41XlRAihzPxHNCg== @@ -3682,7 +3714,7 @@ markdown-it-anchor@^8.4.1: resolved "https://registry.npmmirror.com/markdown-it-anchor/-/markdown-it-anchor-8.6.7.tgz" integrity sha512-FlCHFwNnutLgVTflOYHPW2pPcl2AACqVzExlkGQNsi4CJgqOHN7YTgDd4LuhgN1BFO3TS0vLAruV1Td6dwWPJA== -markdown-it@^12.3.2: +markdown-it@*, markdown-it@^12.3.2: version "12.3.2" resolved "https://registry.npmmirror.com/markdown-it/-/markdown-it-12.3.2.tgz" integrity sha512-TchMembfxfNVpHkbtriWltGWc+m3xszaRD0CZup7GFFhzIgQqxIfn3eGj1yZpfuflzPvfkt611B2Q/Bsk1YnGg== @@ -3847,26 +3879,21 @@ move-concurrently@^1.0.1: rimraf "^2.5.4" run-queue "^1.0.3" -ms@2.0.0: - version "2.0.0" - resolved "https://registry.npmmirror.com/ms/-/ms-2.0.0.tgz" - integrity sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A== - ms@^2.1.1, ms@^2.1.3: version "2.1.3" resolved "https://registry.npmmirror.com/ms/-/ms-2.1.3.tgz" integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA== +ms@2.0.0: + version "2.0.0" + resolved "https://registry.npmmirror.com/ms/-/ms-2.0.0.tgz" + integrity sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A== + mute-stream@0.0.7: version "0.0.7" resolved "https://registry.npmmirror.com/mute-stream/-/mute-stream-0.0.7.tgz" integrity sha512-r65nCZhrbXXb6dXOACihYApHw2Q6pV0M3V0PSxd74N0+D8nzAdEAITq2oAjA1jVnKI+tGvEBUpqiMh0+rW6zDQ== -nan@^2.12.1: - version "2.22.2" - resolved "https://registry.npmmirror.com/nan/-/nan-2.22.2.tgz#6b504fd029fb8f38c0990e52ad5c26772fdacfbb" - integrity sha512-DANghxFkS1plDdRsX0X9pm0Z6SJNN6gBdtXfanwoZ8hooC5gosGFSBGRYHUVPz1asKA/kMRqDRdHrluZ61SpBQ== - nanomatch@^1.2.9: version "1.2.13" resolved "https://registry.npmmirror.com/nanomatch/-/nanomatch-1.2.13.tgz" @@ -4258,7 +4285,7 @@ prettier-linter-helpers@^1.0.0: dependencies: fast-diff "^1.1.2" -prettier@^1.16.4: +prettier@^1.16.4, prettier@>=1.13.0: version "1.19.1" resolved "https://registry.npmmirror.com/prettier/-/prettier-1.19.1.tgz" integrity sha512-s7PoyDv/II1ObgQunCbB9PdLmUcBZcnWOcxDh7O0N/UwDEsHyqkW+Qh28jW+mVuCdx7gLB0BotYI1Y6uI9iyew== @@ -4325,7 +4352,12 @@ pumpify@^1.3.3: inherits "^2.0.3" pump "^2.0.0" -punycode@^1.2.4, punycode@^1.4.1: +punycode@^1.2.4: + version "1.4.1" + resolved "https://registry.npmmirror.com/punycode/-/punycode-1.4.1.tgz" + integrity sha512-jmYNElW7yvO7TV33CjSmvSiE2yco3bV2czu/OzDKdMNVZQWfxCblURLhf+47syQRBntjfLdd/H0egrzIG+oaFQ== + +punycode@^1.4.1: version "1.4.1" resolved "https://registry.npmmirror.com/punycode/-/punycode-1.4.1.tgz" integrity sha512-jmYNElW7yvO7TV33CjSmvSiE2yco3bV2czu/OzDKdMNVZQWfxCblURLhf+47syQRBntjfLdd/H0egrzIG+oaFQ== @@ -4362,7 +4394,7 @@ randomfill@^1.0.4: randombytes "^2.0.5" safe-buffer "^5.1.0" -"readable-stream@1 || 2", readable-stream@^2.0.0, readable-stream@^2.0.1, readable-stream@^2.0.2, readable-stream@^2.1.5, readable-stream@^2.2.2, readable-stream@^2.3.3, readable-stream@^2.3.6, readable-stream@^2.3.8, readable-stream@~2.3.6: +readable-stream@^2.0.0, readable-stream@^2.0.1, readable-stream@^2.0.2, readable-stream@^2.1.5, readable-stream@^2.2.2, readable-stream@^2.3.3, readable-stream@^2.3.6, readable-stream@^2.3.8, readable-stream@~2.3.6, "readable-stream@1 || 2": version "2.3.8" resolved "https://registry.npmmirror.com/readable-stream/-/readable-stream-2.3.8.tgz" integrity sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA== @@ -4564,13 +4596,6 @@ ret@~0.1.10: resolved "https://registry.npmmirror.com/ret/-/ret-0.1.15.tgz" integrity sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg== -rimraf@2.6.3: - version "2.6.3" - resolved "https://registry.npmmirror.com/rimraf/-/rimraf-2.6.3.tgz" - integrity sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA== - dependencies: - glob "^7.1.3" - rimraf@^2.5.4, rimraf@^2.6.3: version "2.7.1" resolved "https://registry.npmmirror.com/rimraf/-/rimraf-2.7.1.tgz" @@ -4578,6 +4603,13 @@ rimraf@^2.5.4, rimraf@^2.6.3: dependencies: glob "^7.1.3" +rimraf@2.6.3: + version "2.6.3" + resolved "https://registry.npmmirror.com/rimraf/-/rimraf-2.6.3.tgz" + integrity sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA== + dependencies: + glob "^7.1.3" + ripemd160@^2.0.0, ripemd160@^2.0.1: version "2.0.2" resolved "https://registry.npmmirror.com/ripemd160/-/ripemd160-2.0.2.tgz" @@ -4683,7 +4715,12 @@ schema-utils@^3.0.0: ajv "^6.12.5" ajv-keywords "^3.5.2" -semver@^5.5.0, semver@^5.5.1, semver@^5.6.0: +semver@^5.5.0, semver@^5.5.1: + version "5.7.2" + resolved "https://registry.npmmirror.com/semver/-/semver-5.7.2.tgz" + integrity sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g== + +semver@^5.6.0: version "5.7.2" resolved "https://registry.npmmirror.com/semver/-/semver-5.7.2.tgz" integrity sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g== @@ -4931,6 +4968,13 @@ stream-shift@^1.0.0: resolved "https://registry.npmmirror.com/stream-shift/-/stream-shift-1.0.3.tgz" integrity sha512-76ORR0DO1o1hlKwTbi/DM3EXWGf3ZJYO8cXX5RJwnul2DEg2oyoZyjLNoQM8WsvZiFKCRfC1O0J7iCvie3RZmQ== +string_decoder@^1.0.0, string_decoder@~1.1.1: + version "1.1.1" + resolved "https://registry.npmmirror.com/string_decoder/-/string_decoder-1.1.1.tgz" + integrity sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg== + dependencies: + safe-buffer "~5.1.0" + string-width@^2.1.0: version "2.1.1" resolved "https://registry.npmmirror.com/string-width/-/string-width-2.1.1.tgz" @@ -4939,7 +4983,16 @@ string-width@^2.1.0: is-fullwidth-code-point "^2.0.0" strip-ansi "^4.0.0" -string-width@^3.0.0, string-width@^3.1.0: +string-width@^3.0.0: + version "3.1.0" + resolved "https://registry.npmmirror.com/string-width/-/string-width-3.1.0.tgz" + integrity sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w== + dependencies: + emoji-regex "^7.0.1" + is-fullwidth-code-point "^2.0.0" + strip-ansi "^5.1.0" + +string-width@^3.1.0: version "3.1.0" resolved "https://registry.npmmirror.com/string-width/-/string-width-3.1.0.tgz" integrity sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w== @@ -4976,13 +5029,6 @@ string.prototype.trimstart@^1.0.8: define-properties "^1.2.1" es-object-atoms "^1.0.0" -string_decoder@^1.0.0, string_decoder@~1.1.1: - version "1.1.1" - resolved "https://registry.npmmirror.com/string_decoder/-/string_decoder-1.1.1.tgz" - integrity sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg== - dependencies: - safe-buffer "~5.1.0" - strip-ansi@^4.0.0: version "4.0.0" resolved "https://registry.npmmirror.com/strip-ansi/-/strip-ansi-4.0.0.tgz" @@ -5080,6 +5126,11 @@ text-table@^0.2.0: resolved "https://registry.npmmirror.com/text-table/-/text-table-0.2.0.tgz" integrity sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw== +through@^2.3.6: + version "2.3.8" + resolved "https://registry.npmmirror.com/through/-/through-2.3.8.tgz" + integrity sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg== + through2@^2.0.0: version "2.0.5" resolved "https://registry.npmmirror.com/through2/-/through2-2.0.5.tgz" @@ -5088,11 +5139,6 @@ through2@^2.0.0: readable-stream "~2.3.6" xtend "~4.0.1" -through@^2.3.6: - version "2.3.8" - resolved "https://registry.npmmirror.com/through/-/through-2.3.8.tgz" - integrity sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg== - timers-browserify@^2.0.4: version "2.0.12" resolved "https://registry.npmmirror.com/timers-browserify/-/timers-browserify-2.0.12.tgz" @@ -5428,7 +5474,7 @@ webpack-sources@^1.4.0, webpack-sources@^1.4.1: source-list-map "^2.0.0" source-map "~0.6.1" -webpack@^4.29.6: +webpack@^4.0.0, "webpack@^4.0.0 || ^5.0.0", webpack@^4.29.6, webpack@>=2, webpack@4.x.x: version "4.47.0" resolved "https://registry.npmmirror.com/webpack/-/webpack-4.47.0.tgz" integrity sha512-td7fYwgLSrky3fI1EuU5cneU4+pbH6GgOfuKNS1tNPcfdGinGELAqsb/BP4nnvZyKSG2i/xFGU7+n2PvZA8HJQ== @@ -5513,7 +5559,21 @@ which-typed-array@^1.1.14, which-typed-array@^1.1.15: gopd "^1.0.1" has-tostringtag "^1.0.2" -which@^1.2.14, which@^1.2.9, which@^1.3.1: +which@^1.2.14: + version "1.3.1" + resolved "https://registry.npmmirror.com/which/-/which-1.3.1.tgz" + integrity sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ== + dependencies: + isexe "^2.0.0" + +which@^1.2.9: + version "1.3.1" + resolved "https://registry.npmmirror.com/which/-/which-1.3.1.tgz" + integrity sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ== + dependencies: + isexe "^2.0.0" + +which@^1.3.1: version "1.3.1" resolved "https://registry.npmmirror.com/which/-/which-1.3.1.tgz" integrity sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==