deeptwins-engine-3d 0.1.76 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/Build/DeepTwins/Image/noise.png +0 -0
- package/dist/assets/Build/DeepTwins/Workers/CustomRasterClip.worker.js +1 -2
- package/dist/assets/Build/DeepTwins/Workers/MvtVector.worker.js +1 -1
- package/dist/assets/Build/Map3d/ThirdParty/Workers/zip-web-worker.js +640 -0
- package/dist/assets/Build/Map3d/ThirdParty/wasm_splats_bg.wasm +0 -0
- package/dist/assets/Build/Map3d/ThirdParty/zip-module.wasm +0 -0
- package/dist/assets/Build/Map3d/Workers/chunk-27NG6PQR.js +456 -0
- package/dist/assets/Build/Map3d/Workers/chunk-2JVMMMWT.js +353 -0
- package/dist/assets/Build/Map3d/Workers/chunk-2Y2XYQCS.js +1481 -0
- package/dist/assets/Build/Map3d/Workers/chunk-34RF3V5G.js +220 -0
- package/dist/assets/Build/Map3d/Workers/chunk-35H7BYLJ.js +1800 -0
- package/dist/assets/Build/Map3d/Workers/chunk-57OGEF5V.js +435 -0
- package/dist/assets/Build/Map3d/Workers/chunk-5PX3DYJA.js +196 -0
- package/dist/assets/Build/Map3d/Workers/chunk-7B5XGQRN.js +171 -0
- package/dist/assets/Build/Map3d/Workers/chunk-ATLWOZFF.js +39 -0
- package/dist/assets/Build/Map3d/Workers/chunk-BMSUECTA.js +1055 -0
- package/dist/assets/Build/Map3d/Workers/chunk-C6IA4TKW.js +476 -0
- package/dist/assets/Build/Map3d/Workers/chunk-CZ44I32U.js +157 -0
- package/dist/assets/Build/Map3d/Workers/chunk-DE6UV44R.js +122 -0
- package/dist/assets/Build/Map3d/Workers/chunk-DUCCKVOG.js +834 -0
- package/dist/assets/Build/Map3d/Workers/chunk-EBJBPIYX.js +239 -0
- package/dist/assets/Build/Map3d/Workers/chunk-EYSYQ2R6.js +138 -0
- package/dist/assets/Build/Map3d/Workers/chunk-FMCAAUQI.js +368 -0
- package/dist/assets/Build/Map3d/Workers/chunk-GMYZNRRQ.js +2717 -0
- package/dist/assets/Build/Map3d/Workers/chunk-GWPNZZV4.js +781 -0
- package/dist/assets/Build/Map3d/Workers/chunk-HLP2U4KW.js +758 -0
- package/dist/assets/Build/Map3d/Workers/chunk-HSJSUPQV.js +500 -0
- package/dist/assets/Build/Map3d/Workers/chunk-I73Q3AG7.js +58 -0
- package/dist/assets/Build/Map3d/Workers/chunk-IMZ4YIMV.js +511 -0
- package/dist/assets/Build/Map3d/Workers/chunk-IZSK4DVF.js +421 -0
- package/dist/assets/Build/Map3d/Workers/chunk-JKLMRPKK.js +75 -0
- package/dist/assets/Build/Map3d/Workers/chunk-KGM345JM.js +691 -0
- package/dist/assets/Build/Map3d/Workers/chunk-L4IR5U4G.js +102 -0
- package/dist/assets/Build/Map3d/Workers/chunk-MG4EVQH2.js +44 -0
- package/dist/assets/Build/Map3d/Workers/chunk-NXWEFAZJ.js +300 -0
- package/dist/assets/Build/Map3d/Workers/chunk-PDFAJISJ.js +59 -0
- package/dist/assets/Build/Map3d/Workers/chunk-PHWZFJR5.js +100 -0
- package/dist/assets/Build/Map3d/Workers/chunk-PLE7CHBE.js +101 -0
- package/dist/assets/Build/Map3d/Workers/chunk-PN3GIZ5Q.js +163 -0
- package/dist/assets/Build/Map3d/Workers/chunk-PXL5XLHV.js +1073 -0
- package/dist/assets/Build/Map3d/Workers/chunk-QYXOF5JC.js +959 -0
- package/dist/assets/Build/Map3d/Workers/chunk-R2LIFXV3.js +115 -0
- package/dist/assets/Build/Map3d/Workers/chunk-R4W6IRJZ.js +10357 -0
- package/dist/assets/Build/Map3d/Workers/chunk-R5PZXG56.js +1258 -0
- package/dist/assets/Build/Map3d/Workers/chunk-RZQLZIUI.js +629 -0
- package/dist/assets/Build/Map3d/Workers/chunk-SIBDD6Y4.js +390 -0
- package/dist/assets/Build/Map3d/Workers/chunk-U5NN6JTQ.js +398 -0
- package/dist/assets/Build/Map3d/Workers/chunk-UA5RPPP3.js +73 -0
- package/dist/assets/Build/Map3d/Workers/chunk-UXLKFS3C.js +305 -0
- package/dist/assets/Build/Map3d/Workers/chunk-VUX4BQIM.js +37 -0
- package/dist/assets/Build/Map3d/Workers/chunk-WJDUUUJS.js +684 -0
- package/dist/assets/Build/Map3d/Workers/chunk-XBJOJHWX.js +139 -0
- package/dist/assets/Build/Map3d/Workers/chunk-XJDMTNKD.js +634 -0
- package/dist/assets/Build/Map3d/Workers/chunk-XUCXZZE5.js +963 -0
- package/dist/assets/Build/Map3d/Workers/chunk-YIKGVMJ5.js +287 -0
- package/dist/assets/Build/Map3d/Workers/chunk-YTNCIBPQ.js +262 -0
- package/dist/assets/Build/Map3d/Workers/chunk-ZMDUYETO.js +55 -0
- package/dist/assets/Build/Map3d/Workers/chunk-ZW52HXFN.js +2857 -0
- package/dist/esm/analyze/LineOfSightAnalysis.js +1 -326
- package/dist/esm/analyze/SubmergenceAnalysis.js +1 -137
- package/dist/esm/analyze/SunLightAnalysis.js +1 -91
- package/dist/esm/analyze/TerrainExcavationAnalysis.js +1 -612
- package/dist/esm/analyze/ViewshedAnalysis.js +1 -292
- package/dist/esm/cameraControl/ModelRoamHistory.js +1 -639
- package/dist/esm/cameraControl/ModelRoamRealTime.js +1 -874
- package/dist/esm/cameraControl/Roam.js +1 -418
- package/dist/esm/cameraControl/Rotate.js +1 -134
- package/dist/esm/cameraControl/RotateInPlace.js +1 -99
- package/dist/esm/constant.d.ts +90 -0
- package/dist/esm/constant.js +1 -1287
- package/dist/esm/deepTwins/index.js +1 -121
- package/dist/esm/drawCommand/index.js +1 -3
- package/dist/esm/drawCommand/viewShed/Event.js +1 -142
- package/dist/esm/drawCommand/viewShed/RectangularSensorPrimitive.js +1 -1306
- package/dist/esm/drawCommand/viewShed/ViewShadowPrimitive.js +1 -66
- package/dist/esm/drawCommand/viewShed/ViewShedAnalyserLayer.js +1 -466
- package/dist/esm/drawCommand/viewShed/ViewShedMap.js +1 -1238
- package/dist/esm/drawCommand/viewShed/config.js +1 -21
- package/dist/esm/drawCommand/volumeCloud/GeometryPrimitive.js +1 -89
- package/dist/esm/drawCommand/volumeCloud/ImprovedNoise.js +1 -112
- package/dist/esm/drawCommand/volumeCloud/VolumeClouds.js +1 -91
- package/dist/esm/drawer/algorithm.js +1 -314
- package/dist/esm/drawer/common.js +1 -965
- package/dist/esm/drawer/coordinate.js +1 -184
- package/dist/esm/drawer/index.js +1 -688
- package/dist/esm/drawer/plotUtil.js +1 -266
- package/dist/esm/drawer/shape/Assemble.js +1 -415
- package/dist/esm/drawer/shape/AttackArrow.js +1 -442
- package/dist/esm/drawer/shape/BaseShape.js +1 -383
- package/dist/esm/drawer/shape/Bow.js +1 -375
- package/dist/esm/drawer/shape/Circle.js +1 -461
- package/dist/esm/drawer/shape/Curve.js +1 -386
- package/dist/esm/drawer/shape/DragPoint.js +1 -211
- package/dist/esm/drawer/shape/Elliptic.js +1 -491
- package/dist/esm/drawer/shape/Formation.js +1 -395
- package/dist/esm/drawer/shape/PincerArrow.js +1 -445
- package/dist/esm/drawer/shape/Point.js +1 -131
- package/dist/esm/drawer/shape/Polygon.js +1 -368
- package/dist/esm/drawer/shape/Polyline.js +1 -325
- package/dist/esm/drawer/shape/RegularPolygon.js +1 -468
- package/dist/esm/drawer/shape/RightAngleArrow.js +1 -423
- package/dist/esm/drawer/shape/Sector.js +1 -568
- package/dist/esm/drawer/shape/StraightArrow.js +1 -422
- package/dist/esm/drawer/shape/SwallowtailArrow.js +1 -438
- package/dist/esm/drawer/types.js +1 -11
- package/dist/esm/drawer/utils.js +1 -381
- package/dist/esm/global.css +22 -1
- package/dist/esm/graphicLayer/BaseEntity.js +1 -51
- package/dist/esm/graphicLayer/BaseLayer.js +1 -730
- package/dist/esm/graphicLayer/BasePointPrimitive.js +1 -45
- package/dist/esm/graphicLayer/BasePrimitive.js +1 -36
- package/dist/esm/graphicLayer/BasePrimitiveInstance.js +1 -37
- package/dist/esm/graphicLayer/BaseSource.d.ts +1 -1
- package/dist/esm/graphicLayer/BaseSource.js +1 -630
- package/dist/esm/graphicLayer/BillboardEntity.js +1 -106
- package/dist/esm/graphicLayer/BillboardPrimitive.js +1 -119
- package/dist/esm/graphicLayer/BoxEntity.js +1 -99
- package/dist/esm/graphicLayer/BoxPrimitive.js +1 -48
- package/dist/esm/graphicLayer/BoxPrimitiveInstance.js +1 -91
- package/dist/esm/graphicLayer/EllipseEntity.js +1 -110
- package/dist/esm/graphicLayer/EllipsePrimitive.js +1 -47
- package/dist/esm/graphicLayer/EllipsePrimitiveInstance.js +1 -98
- package/dist/esm/graphicLayer/EllipsoidEntity.js +1 -118
- package/dist/esm/graphicLayer/EllipsoidPrimitive.js +1 -48
- package/dist/esm/graphicLayer/EllipsoidPrimitiveInstance.js +1 -113
- package/dist/esm/graphicLayer/GraphicLayerCollection.js +1 -491
- package/dist/esm/graphicLayer/HtmlEntity.d.ts +4 -0
- package/dist/esm/graphicLayer/HtmlEntity.js +1 -189
- package/dist/esm/graphicLayer/LabelEntity.js +1 -110
- package/dist/esm/graphicLayer/LabelPrimitive.js +1 -127
- package/dist/esm/graphicLayer/ModelEntity.js +1 -122
- package/dist/esm/graphicLayer/ModelPrimitive.js +1 -59
- package/dist/esm/graphicLayer/ModelPrimitiveInstance.js +1 -86
- package/dist/esm/graphicLayer/PointEntity.js +1 -94
- package/dist/esm/graphicLayer/PointPrimitive.js +1 -107
- package/dist/esm/graphicLayer/PolygonEntity.js +1 -103
- package/dist/esm/graphicLayer/PolygonGroundPrimitive.js +1 -49
- package/dist/esm/graphicLayer/PolygonGroundPrimitiveImageMaterialInstance.js +1 -87
- package/dist/esm/graphicLayer/PolygonPrimitive.js +1 -60
- package/dist/esm/graphicLayer/PolygonPrimitiveImageMaterialInstance.js +1 -84
- package/dist/esm/graphicLayer/PolygonPrimitiveInstance.js +1 -101
- package/dist/esm/graphicLayer/PolylineEntity.js +1 -96
- package/dist/esm/graphicLayer/PolylineGroundPrimitive.js +1 -55
- package/dist/esm/graphicLayer/PolylineGroundPrimitiveInstance.js +1 -85
- package/dist/esm/graphicLayer/PolylinePrimitive.js +1 -53
- package/dist/esm/graphicLayer/PolylinePrimitiveInstance.js +1 -85
- package/dist/esm/graphicLayer/PolylineVolumeEntity.js +1 -105
- package/dist/esm/graphicLayer/PolylineVolumePrimitive.js +1 -47
- package/dist/esm/graphicLayer/PolylineVolumePrimitiveInstance.js +1 -94
- package/dist/esm/graphicLayer/WallEntity.js +1 -96
- package/dist/esm/graphicLayer/WallPrimitive.js +1 -47
- package/dist/esm/graphicLayer/WallPrimitiveInstance.js +1 -88
- package/dist/esm/index.d.ts +4 -0
- package/dist/esm/index.js +1 -175
- package/dist/esm/lowAltitude/BarrierLayer.js +1 -172
- package/dist/esm/lowAltitude/BaseGridMvtLayer.js +1 -122
- package/dist/esm/lowAltitude/FactorLayer.js +1 -199
- package/dist/esm/lowAltitude/FlightPlanning.js +1 -411
- package/dist/esm/lowAltitude/FlightRiskEvaluation.js +1 -543
- package/dist/esm/lowAltitude/GridDraw.js +1 -137
- package/dist/esm/lowAltitude/PoiLayer.js +1 -74
- package/dist/esm/lowAltitude/RoutePlanning.js +1 -318
- package/dist/esm/lowAltitude/VisitLayer.js +1 -180
- package/dist/esm/map/Event.js +1 -377
- package/dist/esm/map/GroundSkyBox.js +1 -166
- package/dist/esm/map/Map.js +1 -881
- package/dist/esm/map/Property.js +1 -35
- package/dist/esm/material/AtmosphericDispersion.js +1 -569
- package/dist/esm/material/GlobalVolumetricCloud.js +1 -377
- package/dist/esm/material/VolumeCloud.js +1 -115
- package/dist/esm/material/WeatherEffects.js +1 -351
- package/dist/esm/material/entity/BaseMaterialProperty.js +1 -51
- package/dist/esm/material/entity/CircleWaveMaterialProperty.js +1 -101
- package/dist/esm/material/entity/DynamicWallMaterialProperty.js +1 -101
- package/dist/esm/material/entity/ImageGlowingMaterialProperty.js +1 -89
- package/dist/esm/material/entity/ImageMaterialProperty.js +1 -34
- package/dist/esm/material/entity/PolylineTrailLinkMaterialProperty.js +1 -132
- package/dist/esm/material/primitive/BaseMaterialAppearance.js +1 -28
- package/dist/esm/material/primitive/ImageGlowingMaterialAppearance.js +1 -77
- package/dist/esm/material/primitive/ImageMaterialAppearance.js +1 -77
- package/dist/esm/measure/Area.js +1 -220
- package/dist/esm/measure/BaseDraw.js +1 -105
- package/dist/esm/measure/Distance.js +1 -223
- package/dist/esm/measure/index.js +1 -266
- package/dist/esm/measure/types.js +1 -17
- package/dist/esm/measure/utils.js +1 -319
- package/dist/esm/particle/BaseParticle.js +1 -196
- package/dist/esm/particle/FireParticle.js +1 -65
- package/dist/esm/particle/FountainParticle.js +1 -80
- package/dist/esm/particle/SmokeParticle.js +1 -65
- package/dist/esm/particle/common.js +1 -23
- package/dist/esm/particle/index.js +1 -5
- package/dist/esm/property/PositionProperty.js +1 -56
- package/dist/esm/tileLayer/ArcGisLayer.js +1 -41
- package/dist/esm/tileLayer/CustomRasterClipWorkerClient.js +1 -147
- package/dist/esm/tileLayer/CustomRasterLayer.js +1 -1136
- package/dist/esm/tileLayer/ImageryLayer.js +1 -44
- package/dist/esm/tileLayer/MvtVectorLoad.js +1 -1549
- package/dist/esm/tileLayer/MvtVectorWorkerClient.js +1 -126
- package/dist/esm/tileLayer/RasterLayer.js +1 -23
- package/dist/esm/tileLayer/WmsLayer.js +1 -26
- package/dist/esm/tileLayer/WmtsLayer.js +1 -23
- package/dist/esm/tool/BuildClampedPolygonGrid.js +1 -278
- package/dist/esm/tool/Compass.js +1 -282
- package/dist/esm/tool/PrimitiveCluster.js +1 -706
- package/dist/esm/tool/TimerInterval.js +1 -58
- package/dist/esm/tool/common.js +1 -405
- package/dist/esm/tool/fetch.js +1 -222
- package/dist/esm/tool/heatmap.js +1 -631
- package/dist/esm/tool/utils.d.ts +1 -0
- package/dist/esm/tool/utils.js +1 -501
- package/dist/esm/toolTip/index.js +1 -79
- package/dist/esm/videoFusion/BaseVideo.d.ts +7 -0
- package/dist/esm/videoFusion/BaseVideo.js +1 -330
- package/dist/esm/videoFusion/VideoProject.js +1 -230
- package/dist/esm/videoFusion/VideoTexture.js +1 -163
- package/dist/esm/visualization/BaseHeatmap.js +1 -271
- package/dist/esm/visualization/BoundaryHighlight.d.ts +135 -0
- package/dist/esm/visualization/BoundaryHighlight.js +1 -0
- package/dist/esm/visualization/DynamicWater.js +1 -289
- package/dist/esm/visualization/Frustum.js +1 -248
- package/dist/esm/visualization/Heatmap2d.js +1 -97
- package/dist/esm/visualization/Heatmap3d.js +1 -281
- package/dist/esm/visualization/MigrationEffect.js +1 -397
- package/dist/esm/visualization/PointCluster.js +1 -220
- package/dist/esm/visualization/RadarScan.js +1 -333
- package/dist/esm/visualization/SampledTerrainRiver.d.ts +180 -0
- package/dist/esm/visualization/SampledTerrainRiver.js +1 -0
- package/dist/esm/visualization/SampledTerrainWater.d.ts +170 -0
- package/dist/esm/visualization/SampledTerrainWater.js +1 -0
- package/dist/esm/visualization/WindField.d.ts +72 -0
- package/dist/esm/visualization/WindField.js +1 -0
- package/dist/esm/visualization/windCore.d.ts +161 -0
- package/dist/esm/visualization/windCore.js +8 -0
- package/dist/umd/deeptwins-engine-3d.min.css +1 -1
- package/dist/umd/deeptwins-engine-3d.min.js +1 -1
- package/package.json +6 -4
|
@@ -1 +1 @@
|
|
|
1
|
-
(()=>{"use strict";const e=Object.fromEntries(Object.entries({Point:1,MultiPoint:2,LineString:3,MultiLineString:4,Polygon:5,MultiPolygon:6}).map(([e,t])=>[t,e])),t=(new TextEncoder,new TextDecoder);class r{constructor(e){this.bytes=function(e){if(e instanceof Uint8Array)return e;if(e instanceof ArrayBuffer)return new Uint8Array(e);if(ArrayBuffer.isView(e))return new Uint8Array(e.buffer,e.byteOffset,e.byteLength);throw new Error("输入不是可解码的二进制数据。")}(e),this.offset=0}isEnd(){return this.offset>=this.bytes.length}readVarint(){let e=0,t=0;for(;;){if(this.offset>=this.bytes.length)throw new Error("读取 protobuf varint 时遇到意外 EOF。");const r=this.bytes[this.offset];if(this.offset+=1,e+=(127&r)*2**t,!(128&r))return e;if(t+=7,t>49)throw new Error("protobuf varint 超出当前实现支持范围。")}}readDouble(){if(this.offset+8>this.bytes.length)throw new Error("读取 protobuf double 时遇到意外 EOF。");const e=new DataView(this.bytes.buffer,this.bytes.byteOffset+this.offset,8).getFloat64(0,!0);return this.offset+=8,e}readBytes(){const e=this.readVarint(),t=this.offset+e;if(t>this.bytes.length)throw new Error("读取 protobuf bytes 时遇到意外 EOF。");const r=this.bytes.slice(this.offset,t);return this.offset=t,r}readString(){return t.decode(this.readBytes())}readTag(){const e=this.readVarint();return{fieldNumber:e>>3,wireType:7&e}}skip(e){switch(e){case 0:return void this.readVarint();case 1:if(this.offset+8>this.bytes.length)throw new Error("跳过 protobuf fixed64 时遇到意外 EOF。");return void(this.offset+=8);case 2:{const e=this.readVarint();if(this.offset+e>this.bytes.length)throw new Error("跳过 protobuf bytes 时遇到意外 EOF。");return void(this.offset+=e)}default:throw new Error(`不支持跳过的 protobuf wire type:${e}`)}}}function s(e){const t=new r(e),s=[];let i;for(;!t.isEnd();){const{fieldNumber:e,wireType:r}=t.readTag();1!==e||1!==r?2!==e||1!==r?3!==e||1!==r?t.skip(r):i=t.readDouble():s[1]=t.readDouble():s[0]=t.readDouble()}if(!Number.isFinite(s[0])||!Number.isFinite(s[1]))throw new Error("解码 Position 失败:缺少合法经纬度。");return void 0===i?s:[s[0],s[1],i]}function i(e){const t=new r(e),i=[];for(;!t.isEnd();){const{fieldNumber:e,wireType:r}=t.readTag();1!==e||2!==r?t.skip(r):i.push(s(t.readBytes()))}return i}function o(e){const t=new r(e),i=[];for(;!t.isEnd();){const{fieldNumber:e,wireType:r}=t.readTag();1!==e||2!==r?t.skip(r):i.push(s(t.readBytes()))}return i}function n(e){const t=new r(e),s=[];for(;!t.isEnd();){const{fieldNumber:e,wireType:r}=t.readTag();1!==e||2!==r?t.skip(r):s.push(o(t.readBytes()))}return s}function a(t){const o=new r(t),a={type:"Feature",id:0,properties:{},geometry:{type:"Point",coordinates:[]}},f=[],u=[],d=[];let y=0,c="{}";for(;!o.isEnd();){const{fieldNumber:e,wireType:t}=o.readTag();1!==e||0!==t?2!==e||0!==t?3!==e||2!==t?4!==e||2!==t?5!==e||2!==t?6!==e||2!==t?o.skip(t):d.push(n(o.readBytes())):u.push(i(o.readBytes())):f.push(s(o.readBytes())):c=o.readString():y=o.readVarint():a.id=o.readVarint()}try{a.properties=JSON.parse(c||"{}")}catch(e){throw new Error(`解码 feature 失败:properties 不是合法 JSON:${e.message}`)}const h=e[y];if(!h)throw new Error(`解码 feature 失败:未知 geometryType=${y}`);switch(h){case"Point":a.geometry={type:"Point",coordinates:f[0]};break;case"MultiPoint":a.geometry={type:"MultiPoint",coordinates:f};break;case"LineString":a.geometry={type:"LineString",coordinates:u[0]||[]};break;case"MultiLineString":a.geometry={type:"MultiLineString",coordinates:u};break;case"Polygon":a.geometry={type:"Polygon",coordinates:d[0]||[]};break;case"MultiPolygon":a.geometry={type:"MultiPolygon",coordinates:d};break;default:throw new Error(`解码 feature 失败:未知几何类型 ${h}`)}return a}function f(e){const t=new r(e),s={version:1,z:0,x:0,y:0,features:[]};for(;!t.isEnd();){const{fieldNumber:e,wireType:r}=t.readTag();1!==e||0!==r?2!==e||0!==r?3!==e||0!==r?4!==e||0!==r?5!==e||2!==r?t.skip(r):s.features.push(a(t.readBytes())):s.y=t.readVarint():s.x=t.readVarint():s.z=t.readVarint():s.version=t.readVarint()}return s}const u=self;u.onmessage=e=>{const{id:t,buffer:r}=e.data;try{u.postMessage({id:t,raw:f(r)})}catch(e){u.postMessage({id:t,error:e instanceof Error&&e.message?e.message:"MVT 解码失败"})}}})();
|
|
1
|
+
(function(_0x21ae1b,_0x122d64){const _0x339d09=_0xe8e4,_0x30784f=_0x21ae1b();while(!![]){try{const _0x37e3a6=parseInt(_0x339d09(0x115))/0x1*(-parseInt(_0x339d09(0x124))/0x2)+parseInt(_0x339d09(0x120))/0x3*(-parseInt(_0x339d09(0x129))/0x4)+parseInt(_0x339d09(0x121))/0x5+parseInt(_0x339d09(0x101))/0x6+-parseInt(_0x339d09(0x10a))/0x7*(-parseInt(_0x339d09(0x100))/0x8)+parseInt(_0x339d09(0x108))/0x9+parseInt(_0x339d09(0x11b))/0xa;if(_0x37e3a6===_0x122d64)break;else _0x30784f['push'](_0x30784f['shift']());}catch(_0x3e4d12){_0x30784f['push'](_0x30784f['shift']());}}}(_0x6dc3,0xd29a5),((()=>{'use strict';const _0x1796f1=_0xe8e4;const _0x4599c2=Object[_0x1796f1(0x11f)](Object['entries']({'Point':0x1,'MultiPoint':0x2,'LineString':0x3,'MultiLineString':0x4,'Polygon':0x5,'MultiPolygon':0x6})['map'](([_0x533b86,_0x5368be])=>[_0x5368be,_0x533b86])),_0x16cd8f=(new TextEncoder(),new TextDecoder());class _0x139d9b{constructor(_0xb6bef0){const _0x4ce285=_0x1796f1;this[_0x4ce285(0x119)]=function(_0x30d85a){const _0x640422=_0x4ce285;if(_0x30d85a instanceof Uint8Array)return _0x30d85a;if(_0x30d85a instanceof ArrayBuffer)return new Uint8Array(_0x30d85a);if(ArrayBuffer['isView'](_0x30d85a))return new Uint8Array(_0x30d85a['buffer'],_0x30d85a['byteOffset'],_0x30d85a[_0x640422(0x10f)]);throw new Error('输入不是可解码的二进制数据。');}(_0xb6bef0),this['offset']=0x0;}['isEnd'](){const _0xc7636d=_0x1796f1;return this[_0xc7636d(0x117)]>=this[_0xc7636d(0x119)][_0xc7636d(0x111)];}['readVarint'](){const _0xa56ebc=_0x1796f1;let _0x1b5603=0x0,_0x56ae67=0x0;for(;;){if(this[_0xa56ebc(0x117)]>=this[_0xa56ebc(0x119)][_0xa56ebc(0x111)])throw new Error(_0xa56ebc(0x11a));const _0x5cf1c2=this[_0xa56ebc(0x119)][this['offset']];if(this['offset']+=0x1,_0x1b5603+=(0x7f&_0x5cf1c2)*0x2**_0x56ae67,!(0x80&_0x5cf1c2))return _0x1b5603;if(_0x56ae67+=0x7,_0x56ae67>0x31)throw new Error(_0xa56ebc(0x112));}}['readDouble'](){const _0x49b2f9=_0x1796f1;if(this[_0x49b2f9(0x117)]+0x8>this[_0x49b2f9(0x119)]['length'])throw new Error('读取\x20protobuf\x20double\x20时遇到意外\x20EOF。');const _0x4a734a=new DataView(this['bytes']['buffer'],this['bytes'][_0x49b2f9(0x106)]+this['offset'],0x8)[_0x49b2f9(0x126)](0x0,!0x0);return this['offset']+=0x8,_0x4a734a;}[_0x1796f1(0x104)](){const _0x36fb8b=_0x1796f1,_0x332bf2=this['readVarint'](),_0x185825=this['offset']+_0x332bf2;if(_0x185825>this[_0x36fb8b(0x119)]['length'])throw new Error(_0x36fb8b(0x107));const _0x146fb6=this[_0x36fb8b(0x119)][_0x36fb8b(0x105)](this['offset'],_0x185825);return this['offset']=_0x185825,_0x146fb6;}[_0x1796f1(0x116)](){const _0x589eb9=_0x1796f1;return _0x16cd8f[_0x589eb9(0x10c)](this[_0x589eb9(0x104)]());}['readTag'](){const _0x3c32ea=this['readVarint']();return{'fieldNumber':_0x3c32ea>>0x3,'wireType':0x7&_0x3c32ea};}['skip'](_0x2defbb){const _0x4d6a39=_0x1796f1;switch(_0x2defbb){case 0x0:return void this['readVarint']();case 0x1:if(this['offset']+0x8>this[_0x4d6a39(0x119)]['length'])throw new Error(_0x4d6a39(0x10d));return void(this[_0x4d6a39(0x117)]+=0x8);case 0x2:{const _0x42f70a=this[_0x4d6a39(0xff)]();if(this[_0x4d6a39(0x117)]+_0x42f70a>this[_0x4d6a39(0x119)][_0x4d6a39(0x111)])throw new Error(_0x4d6a39(0x118));return void(this['offset']+=_0x42f70a);}default:throw new Error('不支持跳过的\x20protobuf\x20wire\x20type:'+_0x2defbb);}}}function _0xb711af(_0x567f8c){const _0x3105fe=_0x1796f1,_0x2aa002=new _0x139d9b(_0x567f8c),_0x555f56=[];let _0x58d92c;for(;!_0x2aa002['isEnd']();){const {fieldNumber:_0x34a707,wireType:_0x47aa0d}=_0x2aa002[_0x3105fe(0x113)]();0x1!==_0x34a707||0x1!==_0x47aa0d?0x2!==_0x34a707||0x1!==_0x47aa0d?0x3!==_0x34a707||0x1!==_0x47aa0d?_0x2aa002[_0x3105fe(0x114)](_0x47aa0d):_0x58d92c=_0x2aa002[_0x3105fe(0x110)]():_0x555f56[0x1]=_0x2aa002['readDouble']():_0x555f56[0x0]=_0x2aa002[_0x3105fe(0x110)]();}if(!Number['isFinite'](_0x555f56[0x0])||!Number[_0x3105fe(0x12a)](_0x555f56[0x1]))throw new Error('解码\x20Position\x20失败:缺少合法经纬度。');return void 0x0===_0x58d92c?_0x555f56:[_0x555f56[0x0],_0x555f56[0x1],_0x58d92c];}function _0x1e3227(_0x264123){const _0x3e1d69=_0x1796f1,_0x6bbe58=new _0x139d9b(_0x264123),_0x313ea9=[];for(;!_0x6bbe58[_0x3e1d69(0x11d)]();){const {fieldNumber:_0x4645b5,wireType:_0x35012f}=_0x6bbe58['readTag']();0x1!==_0x4645b5||0x2!==_0x35012f?_0x6bbe58['skip'](_0x35012f):_0x313ea9['push'](_0xb711af(_0x6bbe58['readBytes']()));}return _0x313ea9;}function _0x378733(_0x38b3ac){const _0x2685b3=_0x1796f1,_0x80a7e1=new _0x139d9b(_0x38b3ac),_0x2e4768=[];for(;!_0x80a7e1[_0x2685b3(0x11d)]();){const {fieldNumber:_0x61214b,wireType:_0x4dc6dc}=_0x80a7e1['readTag']();0x1!==_0x61214b||0x2!==_0x4dc6dc?_0x80a7e1['skip'](_0x4dc6dc):_0x2e4768['push'](_0xb711af(_0x80a7e1[_0x2685b3(0x104)]()));}return _0x2e4768;}function _0x34f059(_0x288c01){const _0x4f03ab=_0x1796f1,_0x4bc466=new _0x139d9b(_0x288c01),_0x4dc44b=[];for(;!_0x4bc466[_0x4f03ab(0x11d)]();){const {fieldNumber:_0xb51ee7,wireType:_0x106cba}=_0x4bc466['readTag']();0x1!==_0xb51ee7||0x2!==_0x106cba?_0x4bc466[_0x4f03ab(0x114)](_0x106cba):_0x4dc44b['push'](_0x378733(_0x4bc466[_0x4f03ab(0x104)]()));}return _0x4dc44b;}function _0x59a947(_0x5f11fc){const _0x31f6ce=_0x1796f1,_0x165f2e=new _0x139d9b(_0x5f11fc),_0x6204fc={'type':_0x31f6ce(0x127),'id':0x0,'properties':{},'geometry':{'type':_0x31f6ce(0x123),'coordinates':[]}},_0x47a77f=[],_0x25f59c=[],_0x8cefbb=[];let _0x32c97d=0x0,_0x5305c2='{}';for(;!_0x165f2e['isEnd']();){const {fieldNumber:_0x29843c,wireType:_0x4adfaf}=_0x165f2e['readTag']();0x1!==_0x29843c||0x0!==_0x4adfaf?0x2!==_0x29843c||0x0!==_0x4adfaf?0x3!==_0x29843c||0x2!==_0x4adfaf?0x4!==_0x29843c||0x2!==_0x4adfaf?0x5!==_0x29843c||0x2!==_0x4adfaf?0x6!==_0x29843c||0x2!==_0x4adfaf?_0x165f2e['skip'](_0x4adfaf):_0x8cefbb[_0x31f6ce(0x128)](_0x34f059(_0x165f2e[_0x31f6ce(0x104)]())):_0x25f59c['push'](_0x1e3227(_0x165f2e['readBytes']())):_0x47a77f[_0x31f6ce(0x128)](_0xb711af(_0x165f2e['readBytes']())):_0x5305c2=_0x165f2e['readString']():_0x32c97d=_0x165f2e['readVarint']():_0x6204fc['id']=_0x165f2e['readVarint']();}try{_0x6204fc[_0x31f6ce(0x10e)]=JSON['parse'](_0x5305c2||'{}');}catch(_0x55c66b){throw new Error('解码\x20feature\x20失败:properties\x20不是合法\x20JSON:'+_0x55c66b['message']);}const _0x3cf1e7=_0x4599c2[_0x32c97d];if(!_0x3cf1e7)throw new Error('解码\x20feature\x20失败:未知\x20geometryType='+_0x32c97d);switch(_0x3cf1e7){case _0x31f6ce(0x123):_0x6204fc[_0x31f6ce(0x11c)]={'type':_0x31f6ce(0x123),'coordinates':_0x47a77f[0x0]};break;case'MultiPoint':_0x6204fc[_0x31f6ce(0x11c)]={'type':'MultiPoint','coordinates':_0x47a77f};break;case'LineString':_0x6204fc['geometry']={'type':'LineString','coordinates':_0x25f59c[0x0]||[]};break;case'MultiLineString':_0x6204fc[_0x31f6ce(0x11c)]={'type':_0x31f6ce(0x10b),'coordinates':_0x25f59c};break;case'Polygon':_0x6204fc['geometry']={'type':_0x31f6ce(0x125),'coordinates':_0x8cefbb[0x0]||[]};break;case _0x31f6ce(0x109):_0x6204fc[_0x31f6ce(0x11c)]={'type':'MultiPolygon','coordinates':_0x8cefbb};break;default:throw new Error(_0x31f6ce(0xfe)+_0x3cf1e7);}return _0x6204fc;}function _0x4e865f(_0x140ebd){const _0xbfd730=_0x1796f1,_0x5a212f=new _0x139d9b(_0x140ebd),_0x25c02d={'version':0x1,'z':0x0,'x':0x0,'y':0x0,'features':[]};for(;!_0x5a212f[_0xbfd730(0x11d)]();){const {fieldNumber:_0x4c42c6,wireType:_0x3a72d6}=_0x5a212f['readTag']();0x1!==_0x4c42c6||0x0!==_0x3a72d6?0x2!==_0x4c42c6||0x0!==_0x3a72d6?0x3!==_0x4c42c6||0x0!==_0x3a72d6?0x4!==_0x4c42c6||0x0!==_0x3a72d6?0x5!==_0x4c42c6||0x2!==_0x3a72d6?_0x5a212f[_0xbfd730(0x114)](_0x3a72d6):_0x25c02d[_0xbfd730(0x103)][_0xbfd730(0x128)](_0x59a947(_0x5a212f['readBytes']())):_0x25c02d['y']=_0x5a212f['readVarint']():_0x25c02d['x']=_0x5a212f[_0xbfd730(0xff)]():_0x25c02d['z']=_0x5a212f['readVarint']():_0x25c02d['version']=_0x5a212f[_0xbfd730(0xff)]();}return _0x25c02d;}const _0x1f1970=self;_0x1f1970['onmessage']=_0xa43046=>{const _0x26726d=_0x1796f1,{id:_0x589069,buffer:_0x461acc}=_0xa43046['data'];try{_0x1f1970[_0x26726d(0x102)]({'id':_0x589069,'raw':_0x4e865f(_0x461acc)});}catch(_0x45a1ef){_0x1f1970[_0x26726d(0x102)]({'id':_0x589069,'error':_0x45a1ef instanceof Error&&_0x45a1ef['message']?_0x45a1ef[_0x26726d(0x11e)]:_0x26726d(0x122)});}};})()));function _0xe8e4(_0x13b80b,_0x2fd444){_0x13b80b=_0x13b80b-0xfe;const _0x6dc38d=_0x6dc3();let _0xe8e41d=_0x6dc38d[_0x13b80b];if(_0xe8e4['HtAbvm']===undefined){var _0xb9b69a=function(_0x531c9e){const _0x462022='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x4599c2='',_0x16cd8f='';for(let _0x139d9b=0x0,_0xb711af,_0x1e3227,_0x378733=0x0;_0x1e3227=_0x531c9e['charAt'](_0x378733++);~_0x1e3227&&(_0xb711af=_0x139d9b%0x4?_0xb711af*0x40+_0x1e3227:_0x1e3227,_0x139d9b++%0x4)?_0x4599c2+=String['fromCharCode'](0xff&_0xb711af>>(-0x2*_0x139d9b&0x6)):0x0){_0x1e3227=_0x462022['indexOf'](_0x1e3227);}for(let _0x34f059=0x0,_0x59a947=_0x4599c2['length'];_0x34f059<_0x59a947;_0x34f059++){_0x16cd8f+='%'+('00'+_0x4599c2['charCodeAt'](_0x34f059)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x16cd8f);};_0xe8e4['OrtLJp']=_0xb9b69a,_0xe8e4['EhPcRw']={},_0xe8e4['HtAbvm']=!![];}const _0x3736df=_0x6dc38d[0x0],_0x39f9a2=_0x13b80b+_0x3736df,_0xa6cb2c=_0xe8e4['EhPcRw'][_0x39f9a2];return!_0xa6cb2c?(_0xe8e41d=_0xe8e4['OrtLJp'](_0xe8e41d),_0xe8e4['EhPcRw'][_0x39f9a2]=_0xe8e41d):_0xe8e41d=_0xa6cb2c,_0xe8e41d;}function _0x6dc3(){const _0x3f4464=['ChjVCgvYDgLLCW','yNL0zuXLBMD0Aa','CMvHzerVDwjSzq','BgvUz3rO','ChjVDg9IDwyGDMfYAw50ioI2HEwhUUw9K+wjJEwUNUEoSoAuR+AmGEImG+wBTooaGG','CMvHzfrHzW','C2TPCa','ntm3otq1Dw5qBeHu','CMvHzfn0CMLUzW','B2zMC2v0','6lEZ6l+hihbYB3rVyNvMigj5DgvZioAxTUMbH+wiSoAeJ+wKLIbft0BJGii','yNL0zxm','6k+75y+wihbYB3rVyNvMihzHCMLUDcdML7BPGyFLIldMHi/LPjyGru9g44cc','otyXmdy4mg94zxn5sa','z2vVBwv0CNK','AxnfBMq','BwvZC2fNzq','zNjVBuvUDhjPzxm','m3zhueLKzG','oda2mdmZnuf2veXrvW','tvzuioINO+EGGEwKSEI0Pq','ug9PBNq','nKngueX4zq','ug9SEwDVBG','z2v0rMXVyxq2na','rMvHDhvYzq','ChvZAa','ntC4ntG3nM9WzKntzW','AxngAw5PDgu','6kEJ56cbigzLyxr1CMuG5AsX6lsL77YA5PYQ55+L5yEG5l2v57g75z6lia','CMvHzfzHCMLUDa','ofLJq1PqvG','mteYmdC1ofz1BKLmBq','Cg9ZDe1LC3nHz2u','zMvHDhvYzxm','CMvHzej5DgvZ','C2XPy2u','yNL0zu9MzNnLDa','6k+75y+wihbYB3rVyNvMigj5DgvZioAxTUMbH+wiSoAeJ+wKLIbft0BJGii','mty3mda1ofbYA3nzvW','txvSDgLqB2X5z29U','nJG0mJeWmuzID0jrAa','txvSDgLmAw5Lu3rYAw5N','zgvJB2rL','6lEZ6l+hihbYB3rVyNvMigzPEgvKnJqG5PE26ygh5yIW5Osp5AswievprUoaGG'];_0x6dc3=function(){return _0x3f4464;};return _0x6dc3();}
|
|
@@ -0,0 +1,640 @@
|
|
|
1
|
+
!(function() {
|
|
2
|
+
"use strict";
|
|
3
|
+
const { Array: e, Object: t, Number: n, Math: s, Error: r, Uint8Array: i, Uint16Array: a, Uint32Array: o, Int32Array: c, Map: l, DataView: u, Promise: h, TextEncoder: f, crypto: p, postMessage: d, TransformStream: w, ReadableStream: g, WritableStream: m, CompressionStream: _, DecompressionStream: y } = self, b = void 0, S = "undefined", z = "function", k = [];
|
|
4
|
+
for (let e2 = 0; 256 > e2; e2++) {
|
|
5
|
+
let t2 = e2;
|
|
6
|
+
for (let e3 = 0; 8 > e3; e3++) 1 & t2 ? t2 = t2 >>> 1 ^ 3988292384 : t2 >>>= 1;
|
|
7
|
+
k[e2] = t2;
|
|
8
|
+
}
|
|
9
|
+
class v {
|
|
10
|
+
constructor(e2) {
|
|
11
|
+
this.crc = e2 || -1;
|
|
12
|
+
}
|
|
13
|
+
append(e2) {
|
|
14
|
+
let t2 = 0 | this.crc;
|
|
15
|
+
for (let n2 = 0, s2 = 0 | e2.length; s2 > n2; n2++) t2 = t2 >>> 8 ^ k[255 & (t2 ^ e2[n2])];
|
|
16
|
+
this.crc = t2;
|
|
17
|
+
}
|
|
18
|
+
get() {
|
|
19
|
+
return ~this.crc;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
class H extends w {
|
|
23
|
+
constructor() {
|
|
24
|
+
let e2;
|
|
25
|
+
const t2 = new v();
|
|
26
|
+
super({ transform(e3, n2) {
|
|
27
|
+
t2.append(e3), n2.enqueue(e3);
|
|
28
|
+
}, flush() {
|
|
29
|
+
const n2 = new i(4);
|
|
30
|
+
new u(n2.buffer).setUint32(0, t2.get()), e2.value = n2;
|
|
31
|
+
} }), e2 = this;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
const C = { concat(e2, t2) {
|
|
35
|
+
if (0 === e2.length || 0 === t2.length) return e2.concat(t2);
|
|
36
|
+
const n2 = e2[e2.length - 1], s2 = C.getPartial(n2);
|
|
37
|
+
return 32 === s2 ? e2.concat(t2) : C._shiftRight(t2, s2, 0 | n2, e2.slice(0, e2.length - 1));
|
|
38
|
+
}, bitLength(e2) {
|
|
39
|
+
const t2 = e2.length;
|
|
40
|
+
if (0 === t2) return 0;
|
|
41
|
+
const n2 = e2[t2 - 1];
|
|
42
|
+
return 32 * (t2 - 1) + C.getPartial(n2);
|
|
43
|
+
}, clamp(e2, t2) {
|
|
44
|
+
if (32 * e2.length < t2) return e2;
|
|
45
|
+
const n2 = (e2 = e2.slice(0, s.ceil(t2 / 32))).length;
|
|
46
|
+
return t2 &= 31, n2 > 0 && t2 && (e2[n2 - 1] = C.partial(t2, e2[n2 - 1] & 2147483648 >> t2 - 1, 1)), e2;
|
|
47
|
+
}, partial: (e2, t2, n2) => 32 === e2 ? t2 : (n2 ? 0 | t2 : t2 << 32 - e2) + 1099511627776 * e2, getPartial: (e2) => s.round(e2 / 1099511627776) || 32, _shiftRight(e2, t2, n2, s2) {
|
|
48
|
+
for (void 0 === s2 && (s2 = []); t2 >= 32; t2 -= 32) s2.push(n2), n2 = 0;
|
|
49
|
+
if (0 === t2) return s2.concat(e2);
|
|
50
|
+
for (let r3 = 0; r3 < e2.length; r3++) s2.push(n2 | e2[r3] >>> t2), n2 = e2[r3] << 32 - t2;
|
|
51
|
+
const r2 = e2.length ? e2[e2.length - 1] : 0, i2 = C.getPartial(r2);
|
|
52
|
+
return s2.push(C.partial(t2 + i2 & 31, t2 + i2 > 32 ? n2 : s2.pop(), 1)), s2;
|
|
53
|
+
} }, B = { bytes: { fromBits(e2) {
|
|
54
|
+
const t2 = C.bitLength(e2) / 8, n2 = new i(t2);
|
|
55
|
+
let s2;
|
|
56
|
+
for (let r2 = 0; t2 > r2; r2++) 3 & r2 || (s2 = e2[r2 / 4]), n2[r2] = s2 >>> 24, s2 <<= 8;
|
|
57
|
+
return n2;
|
|
58
|
+
}, toBits(e2) {
|
|
59
|
+
const t2 = [];
|
|
60
|
+
let n2, s2 = 0;
|
|
61
|
+
for (n2 = 0; n2 < e2.length; n2++) s2 = s2 << 8 | e2[n2], 3 & ~n2 || (t2.push(s2), s2 = 0);
|
|
62
|
+
return 3 & n2 && t2.push(C.partial(8 * (3 & n2), s2)), t2;
|
|
63
|
+
} } }, A = class {
|
|
64
|
+
constructor(e2) {
|
|
65
|
+
const t2 = this;
|
|
66
|
+
t2.blockSize = 512, t2._init = [1732584193, 4023233417, 2562383102, 271733878, 3285377520], t2._key = [1518500249, 1859775393, 2400959708, 3395469782], e2 ? (t2._h = e2._h.slice(0), t2._buffer = e2._buffer.slice(0), t2._length = e2._length) : t2.reset();
|
|
67
|
+
}
|
|
68
|
+
reset() {
|
|
69
|
+
const e2 = this;
|
|
70
|
+
return e2._h = e2._init.slice(0), e2._buffer = [], e2._length = 0, e2;
|
|
71
|
+
}
|
|
72
|
+
update(e2) {
|
|
73
|
+
const t2 = this;
|
|
74
|
+
"string" == typeof e2 && (e2 = B.utf8String.toBits(e2));
|
|
75
|
+
const n2 = t2._buffer = C.concat(t2._buffer, e2), s2 = t2._length, i2 = t2._length = s2 + C.bitLength(e2);
|
|
76
|
+
if (i2 > 9007199254740991) throw new r("Cannot hash more than 2^53 - 1 bits");
|
|
77
|
+
const a2 = new o(n2);
|
|
78
|
+
let c2 = 0;
|
|
79
|
+
for (let e3 = t2.blockSize + s2 - (t2.blockSize + s2 & t2.blockSize - 1); i2 >= e3; e3 += t2.blockSize) t2._block(a2.subarray(16 * c2, 16 * (c2 + 1))), c2 += 1;
|
|
80
|
+
return n2.splice(0, 16 * c2), t2;
|
|
81
|
+
}
|
|
82
|
+
finalize() {
|
|
83
|
+
const e2 = this;
|
|
84
|
+
let t2 = e2._buffer;
|
|
85
|
+
const n2 = e2._h;
|
|
86
|
+
t2 = C.concat(t2, [C.partial(1, 1)]);
|
|
87
|
+
for (let e3 = t2.length + 2; 15 & e3; e3++) t2.push(0);
|
|
88
|
+
for (t2.push(s.floor(e2._length / 4294967296)), t2.push(0 | e2._length); t2.length; ) e2._block(t2.splice(0, 16));
|
|
89
|
+
return e2.reset(), n2;
|
|
90
|
+
}
|
|
91
|
+
_f(e2, t2, n2, s2) {
|
|
92
|
+
return e2 > 19 ? e2 > 39 ? e2 > 59 ? e2 > 79 ? void 0 : t2 ^ n2 ^ s2 : t2 & n2 | t2 & s2 | n2 & s2 : t2 ^ n2 ^ s2 : t2 & n2 | ~t2 & s2;
|
|
93
|
+
}
|
|
94
|
+
_S(e2, t2) {
|
|
95
|
+
return t2 << e2 | t2 >>> 32 - e2;
|
|
96
|
+
}
|
|
97
|
+
_block(t2) {
|
|
98
|
+
const n2 = this, r2 = n2._h, i2 = e(80);
|
|
99
|
+
for (let e2 = 0; 16 > e2; e2++) i2[e2] = t2[e2];
|
|
100
|
+
let a2 = r2[0], o2 = r2[1], c2 = r2[2], l2 = r2[3], u2 = r2[4];
|
|
101
|
+
for (let e2 = 0; 79 >= e2; e2++) {
|
|
102
|
+
16 > e2 || (i2[e2] = n2._S(1, i2[e2 - 3] ^ i2[e2 - 8] ^ i2[e2 - 14] ^ i2[e2 - 16]));
|
|
103
|
+
const t3 = n2._S(5, a2) + n2._f(e2, o2, c2, l2) + u2 + i2[e2] + n2._key[s.floor(e2 / 20)] | 0;
|
|
104
|
+
u2 = l2, l2 = c2, c2 = n2._S(30, o2), o2 = a2, a2 = t3;
|
|
105
|
+
}
|
|
106
|
+
r2[0] = r2[0] + a2 | 0, r2[1] = r2[1] + o2 | 0, r2[2] = r2[2] + c2 | 0, r2[3] = r2[3] + l2 | 0, r2[4] = r2[4] + u2 | 0;
|
|
107
|
+
}
|
|
108
|
+
}, R = { getRandomValues(e2) {
|
|
109
|
+
const t2 = new o(e2.buffer), n2 = (e3) => {
|
|
110
|
+
let t3 = 987654321;
|
|
111
|
+
const n3 = 4294967295;
|
|
112
|
+
return () => (t3 = 36969 * (65535 & t3) + (t3 >> 16) & n3, (((t3 << 16) + (e3 = 18e3 * (65535 & e3) + (e3 >> 16) & n3) & n3) / 4294967296 + 0.5) * (s.random() > 0.5 ? 1 : -1));
|
|
113
|
+
};
|
|
114
|
+
for (let r2, i2 = 0; i2 < e2.length; i2 += 4) {
|
|
115
|
+
const e3 = n2(4294967296 * (r2 || s.random()));
|
|
116
|
+
r2 = 987654071 * e3(), t2[i2 / 4] = 4294967296 * e3() | 0;
|
|
117
|
+
}
|
|
118
|
+
return e2;
|
|
119
|
+
} }, I = { importKey: (e2) => new I.hmacSha1(B.bytes.toBits(e2)), pbkdf2(e2, t2, n2, s2) {
|
|
120
|
+
if (n2 = n2 || 1e4, 0 > s2 || 0 > n2) throw new r("invalid params to pbkdf2");
|
|
121
|
+
const i2 = 1 + (s2 >> 5) << 2;
|
|
122
|
+
let a2, o2, c2, l2, h2;
|
|
123
|
+
const f2 = new ArrayBuffer(i2), p2 = new u(f2);
|
|
124
|
+
let d2 = 0;
|
|
125
|
+
const w2 = C;
|
|
126
|
+
for (t2 = B.bytes.toBits(t2), h2 = 1; (i2 || 1) > d2; h2++) {
|
|
127
|
+
for (a2 = o2 = e2.encrypt(w2.concat(t2, [h2])), c2 = 1; n2 > c2; c2++) for (o2 = e2.encrypt(o2), l2 = 0; l2 < o2.length; l2++) a2[l2] ^= o2[l2];
|
|
128
|
+
for (c2 = 0; (i2 || 1) > d2 && c2 < a2.length; c2++) p2.setInt32(d2, a2[c2]), d2 += 4;
|
|
129
|
+
}
|
|
130
|
+
return f2.slice(0, s2 / 8);
|
|
131
|
+
}, hmacSha1: class {
|
|
132
|
+
constructor(e2) {
|
|
133
|
+
const t2 = this, n2 = t2._hash = A, s2 = [[], []];
|
|
134
|
+
t2._baseHash = [new n2(), new n2()];
|
|
135
|
+
const r2 = t2._baseHash[0].blockSize / 32;
|
|
136
|
+
e2.length > r2 && (e2 = new n2().update(e2).finalize());
|
|
137
|
+
for (let t3 = 0; r2 > t3; t3++) s2[0][t3] = 909522486 ^ e2[t3], s2[1][t3] = 1549556828 ^ e2[t3];
|
|
138
|
+
t2._baseHash[0].update(s2[0]), t2._baseHash[1].update(s2[1]), t2._resultHash = new n2(t2._baseHash[0]);
|
|
139
|
+
}
|
|
140
|
+
reset() {
|
|
141
|
+
const e2 = this;
|
|
142
|
+
e2._resultHash = new e2._hash(e2._baseHash[0]), e2._updated = false;
|
|
143
|
+
}
|
|
144
|
+
update(e2) {
|
|
145
|
+
this._updated = true, this._resultHash.update(e2);
|
|
146
|
+
}
|
|
147
|
+
digest() {
|
|
148
|
+
const e2 = this, t2 = e2._resultHash.finalize(), n2 = new e2._hash(e2._baseHash[1]).update(t2).finalize();
|
|
149
|
+
return e2.reset(), n2;
|
|
150
|
+
}
|
|
151
|
+
encrypt(e2) {
|
|
152
|
+
if (this._updated) throw new r("encrypt on already updated hmac called!");
|
|
153
|
+
return this.update(e2), this.digest(e2);
|
|
154
|
+
}
|
|
155
|
+
} }, q = typeof p != S && typeof p.getRandomValues == z, K = "Invalid password", P = "Invalid signature", T = "zipjs-abort-check-password";
|
|
156
|
+
function V(e2) {
|
|
157
|
+
return q ? p.getRandomValues(e2) : R.getRandomValues(e2);
|
|
158
|
+
}
|
|
159
|
+
const x = 16, U = { name: "PBKDF2" }, W = t.assign({ hash: { name: "HMAC" } }, U), M = t.assign({ iterations: 1e3, hash: { name: "SHA-1" } }, U), E = ["deriveBits"], D = [8, 12, 16], L = [16, 24, 32], Z = 10, F = [0, 0, 0, 0], N = typeof p != S, O = N && p.subtle, j = N && typeof O != S, G = B.bytes, X = class {
|
|
160
|
+
constructor(e2) {
|
|
161
|
+
const t2 = this;
|
|
162
|
+
t2._tables = [[[], [], [], [], []], [[], [], [], [], []]], t2._tables[0][0][0] || t2._precompute();
|
|
163
|
+
const n2 = t2._tables[0][4], s2 = t2._tables[1], i2 = e2.length;
|
|
164
|
+
let a2, o2, c2, l2 = 1;
|
|
165
|
+
if (4 !== i2 && 6 !== i2 && 8 !== i2) throw new r("invalid aes key size");
|
|
166
|
+
for (t2._key = [o2 = e2.slice(0), c2 = []], a2 = i2; 4 * i2 + 28 > a2; a2++) {
|
|
167
|
+
let e3 = o2[a2 - 1];
|
|
168
|
+
(a2 % i2 === 0 || 8 === i2 && a2 % i2 === 4) && (e3 = n2[e3 >>> 24] << 24 ^ n2[e3 >> 16 & 255] << 16 ^ n2[e3 >> 8 & 255] << 8 ^ n2[255 & e3], a2 % i2 === 0 && (e3 = e3 << 8 ^ e3 >>> 24 ^ l2 << 24, l2 = l2 << 1 ^ 283 * (l2 >> 7))), o2[a2] = o2[a2 - i2] ^ e3;
|
|
169
|
+
}
|
|
170
|
+
for (let e3 = 0; a2; e3++, a2--) {
|
|
171
|
+
const t3 = o2[3 & e3 ? a2 : a2 - 4];
|
|
172
|
+
c2[e3] = 4 >= a2 || 4 > e3 ? t3 : s2[0][n2[t3 >>> 24]] ^ s2[1][n2[t3 >> 16 & 255]] ^ s2[2][n2[t3 >> 8 & 255]] ^ s2[3][n2[255 & t3]];
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
encrypt(e2) {
|
|
176
|
+
return this._crypt(e2, 0);
|
|
177
|
+
}
|
|
178
|
+
decrypt(e2) {
|
|
179
|
+
return this._crypt(e2, 1);
|
|
180
|
+
}
|
|
181
|
+
_precompute() {
|
|
182
|
+
const e2 = this._tables[0], t2 = this._tables[1], n2 = e2[4], s2 = t2[4], r2 = [], i2 = [];
|
|
183
|
+
let a2, o2, c2, l2;
|
|
184
|
+
for (let e3 = 0; 256 > e3; e3++) i2[(r2[e3] = e3 << 1 ^ 283 * (e3 >> 7)) ^ e3] = e3;
|
|
185
|
+
for (let u2 = a2 = 0; !n2[u2]; u2 ^= o2 || 1, a2 = i2[a2] || 1) {
|
|
186
|
+
let i3 = a2 ^ a2 << 1 ^ a2 << 2 ^ a2 << 3 ^ a2 << 4;
|
|
187
|
+
i3 = i3 >> 8 ^ 255 & i3 ^ 99, n2[u2] = i3, s2[i3] = u2, l2 = r2[c2 = r2[o2 = r2[u2]]];
|
|
188
|
+
let h2 = 16843009 * l2 ^ 65537 * c2 ^ 257 * o2 ^ 16843008 * u2, f2 = 257 * r2[i3] ^ 16843008 * i3;
|
|
189
|
+
for (let n3 = 0; 4 > n3; n3++) e2[n3][u2] = f2 = f2 << 24 ^ f2 >>> 8, t2[n3][i3] = h2 = h2 << 24 ^ h2 >>> 8;
|
|
190
|
+
}
|
|
191
|
+
for (let n3 = 0; 5 > n3; n3++) e2[n3] = e2[n3].slice(0), t2[n3] = t2[n3].slice(0);
|
|
192
|
+
}
|
|
193
|
+
_crypt(e2, t2) {
|
|
194
|
+
if (4 !== e2.length) throw new r("invalid aes block size");
|
|
195
|
+
const n2 = this._key[t2], s2 = n2.length / 4 - 2, i2 = [0, 0, 0, 0], a2 = this._tables[t2], o2 = a2[0], c2 = a2[1], l2 = a2[2], u2 = a2[3], h2 = a2[4];
|
|
196
|
+
let f2, p2, d2, w2 = e2[0] ^ n2[0], g2 = e2[t2 ? 3 : 1] ^ n2[1], m2 = e2[2] ^ n2[2], _2 = e2[t2 ? 1 : 3] ^ n2[3], y2 = 4;
|
|
197
|
+
for (let e3 = 0; s2 > e3; e3++) f2 = o2[w2 >>> 24] ^ c2[g2 >> 16 & 255] ^ l2[m2 >> 8 & 255] ^ u2[255 & _2] ^ n2[y2], p2 = o2[g2 >>> 24] ^ c2[m2 >> 16 & 255] ^ l2[_2 >> 8 & 255] ^ u2[255 & w2] ^ n2[y2 + 1], d2 = o2[m2 >>> 24] ^ c2[_2 >> 16 & 255] ^ l2[w2 >> 8 & 255] ^ u2[255 & g2] ^ n2[y2 + 2], _2 = o2[_2 >>> 24] ^ c2[w2 >> 16 & 255] ^ l2[g2 >> 8 & 255] ^ u2[255 & m2] ^ n2[y2 + 3], y2 += 4, w2 = f2, g2 = p2, m2 = d2;
|
|
198
|
+
for (let e3 = 0; 4 > e3; e3++) i2[t2 ? 3 & -e3 : e3] = h2[w2 >>> 24] << 24 ^ h2[g2 >> 16 & 255] << 16 ^ h2[m2 >> 8 & 255] << 8 ^ h2[255 & _2] ^ n2[y2++], f2 = w2, w2 = g2, g2 = m2, m2 = _2, _2 = f2;
|
|
199
|
+
return i2;
|
|
200
|
+
}
|
|
201
|
+
}, J = class {
|
|
202
|
+
constructor(e2, t2) {
|
|
203
|
+
this._prf = e2, this._initIv = t2, this._iv = t2;
|
|
204
|
+
}
|
|
205
|
+
reset() {
|
|
206
|
+
this._iv = this._initIv;
|
|
207
|
+
}
|
|
208
|
+
update(e2) {
|
|
209
|
+
return this.calculate(this._prf, e2, this._iv);
|
|
210
|
+
}
|
|
211
|
+
incWord(e2) {
|
|
212
|
+
if (255 & ~(e2 >> 24)) e2 += 1 << 24;
|
|
213
|
+
else {
|
|
214
|
+
let t2 = e2 >> 16 & 255, n2 = e2 >> 8 & 255, s2 = 255 & e2;
|
|
215
|
+
255 === t2 ? (t2 = 0, 255 === n2 ? (n2 = 0, 255 === s2 ? s2 = 0 : ++s2) : ++n2) : ++t2, e2 = 0, e2 += t2 << 16, e2 += n2 << 8, e2 += s2;
|
|
216
|
+
}
|
|
217
|
+
return e2;
|
|
218
|
+
}
|
|
219
|
+
incCounter(e2) {
|
|
220
|
+
0 === (e2[0] = this.incWord(e2[0])) && (e2[1] = this.incWord(e2[1]));
|
|
221
|
+
}
|
|
222
|
+
calculate(e2, t2, n2) {
|
|
223
|
+
let s2;
|
|
224
|
+
if (!(s2 = t2.length)) return [];
|
|
225
|
+
const r2 = C.bitLength(t2);
|
|
226
|
+
for (let r3 = 0; s2 > r3; r3 += 4) {
|
|
227
|
+
this.incCounter(n2);
|
|
228
|
+
const s3 = e2.encrypt(n2);
|
|
229
|
+
t2[r3] ^= s3[0], t2[r3 + 1] ^= s3[1], t2[r3 + 2] ^= s3[2], t2[r3 + 3] ^= s3[3];
|
|
230
|
+
}
|
|
231
|
+
return C.clamp(t2, r2);
|
|
232
|
+
}
|
|
233
|
+
}, Q = I.hmacSha1;
|
|
234
|
+
let Y = N && j && typeof O.importKey == z, $ = N && j && typeof O.deriveBits == z;
|
|
235
|
+
class ee extends w {
|
|
236
|
+
constructor({ password: e2, rawPassword: n2, signed: s2, encryptionStrength: a2, checkPasswordOnly: o2 }) {
|
|
237
|
+
super({ start() {
|
|
238
|
+
t.assign(this, { ready: new h((e3) => this.resolveReady = e3), password: re(e2, n2), signed: s2, strength: a2 - 1, pending: new i() });
|
|
239
|
+
}, async transform(e3, t2) {
|
|
240
|
+
const n3 = this, { password: s3, strength: a3, resolveReady: c2, ready: l2 } = n3;
|
|
241
|
+
s3 ? (await (async (e4, t3, n4, s4) => {
|
|
242
|
+
const i2 = await se(e4, t3, n4, ae(s4, 0, D[t3])), a4 = ae(s4, D[t3]);
|
|
243
|
+
if (i2[0] != a4[0] || i2[1] != a4[1]) throw new r(K);
|
|
244
|
+
})(n3, a3, s3, ae(e3, 0, D[a3] + 2)), e3 = ae(e3, D[a3] + 2), o2 ? t2.error(new r(T)) : c2()) : await l2;
|
|
245
|
+
const u2 = new i(e3.length - Z - (e3.length - Z) % x);
|
|
246
|
+
t2.enqueue(ne(n3, e3, u2, 0, Z, true));
|
|
247
|
+
}, async flush(e3) {
|
|
248
|
+
const { signed: t2, ctr: n3, hmac: s3, pending: a3, ready: o3 } = this;
|
|
249
|
+
if (s3 && n3) {
|
|
250
|
+
await o3;
|
|
251
|
+
const c2 = ae(a3, 0, a3.length - Z), l2 = ae(a3, a3.length - Z);
|
|
252
|
+
let u2 = new i();
|
|
253
|
+
if (c2.length) {
|
|
254
|
+
const e4 = ce(G, c2);
|
|
255
|
+
s3.update(e4);
|
|
256
|
+
const t3 = n3.update(e4);
|
|
257
|
+
u2 = oe(G, t3);
|
|
258
|
+
}
|
|
259
|
+
if (t2) {
|
|
260
|
+
const e4 = ae(oe(G, s3.digest()), 0, Z);
|
|
261
|
+
for (let t3 = 0; Z > t3; t3++) if (e4[t3] != l2[t3]) throw new r(P);
|
|
262
|
+
}
|
|
263
|
+
e3.enqueue(u2);
|
|
264
|
+
}
|
|
265
|
+
} });
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
class te extends w {
|
|
269
|
+
constructor({ password: e2, rawPassword: n2, encryptionStrength: s2 }) {
|
|
270
|
+
let r2;
|
|
271
|
+
super({ start() {
|
|
272
|
+
t.assign(this, { ready: new h((e3) => this.resolveReady = e3), password: re(e2, n2), strength: s2 - 1, pending: new i() });
|
|
273
|
+
}, async transform(e3, t2) {
|
|
274
|
+
const n3 = this, { password: s3, strength: r3, resolveReady: a2, ready: o2 } = n3;
|
|
275
|
+
let c2 = new i();
|
|
276
|
+
s3 ? (c2 = await (async (e4, t3, n4) => {
|
|
277
|
+
const s4 = V(new i(D[t3]));
|
|
278
|
+
return ie(s4, await se(e4, t3, n4, s4));
|
|
279
|
+
})(n3, r3, s3), a2()) : await o2;
|
|
280
|
+
const l2 = new i(c2.length + e3.length - e3.length % x);
|
|
281
|
+
l2.set(c2, 0), t2.enqueue(ne(n3, e3, l2, c2.length, 0));
|
|
282
|
+
}, async flush(e3) {
|
|
283
|
+
const { ctr: t2, hmac: n3, pending: s3, ready: a2 } = this;
|
|
284
|
+
if (n3 && t2) {
|
|
285
|
+
await a2;
|
|
286
|
+
let o2 = new i();
|
|
287
|
+
if (s3.length) {
|
|
288
|
+
const e4 = t2.update(ce(G, s3));
|
|
289
|
+
n3.update(e4), o2 = oe(G, e4);
|
|
290
|
+
}
|
|
291
|
+
r2.signature = oe(G, n3.digest()).slice(0, Z), e3.enqueue(ie(o2, r2.signature));
|
|
292
|
+
}
|
|
293
|
+
} }), r2 = this;
|
|
294
|
+
}
|
|
295
|
+
}
|
|
296
|
+
function ne(e2, t2, n2, s2, r2, a2) {
|
|
297
|
+
const { ctr: o2, hmac: c2, pending: l2 } = e2, u2 = t2.length - r2;
|
|
298
|
+
let h2;
|
|
299
|
+
for (l2.length && (t2 = ie(l2, t2), n2 = ((e3, t3) => {
|
|
300
|
+
if (t3 && t3 > e3.length) {
|
|
301
|
+
const n3 = e3;
|
|
302
|
+
(e3 = new i(t3)).set(n3, 0);
|
|
303
|
+
}
|
|
304
|
+
return e3;
|
|
305
|
+
})(n2, u2 - u2 % x)), h2 = 0; u2 - x >= h2; h2 += x) {
|
|
306
|
+
const e3 = ce(G, ae(t2, h2, h2 + x));
|
|
307
|
+
a2 && c2.update(e3);
|
|
308
|
+
const r3 = o2.update(e3);
|
|
309
|
+
a2 || c2.update(r3), n2.set(oe(G, r3), h2 + s2);
|
|
310
|
+
}
|
|
311
|
+
return e2.pending = ae(t2, h2), n2;
|
|
312
|
+
}
|
|
313
|
+
async function se(n2, s2, r2, a2) {
|
|
314
|
+
n2.password = null;
|
|
315
|
+
const o2 = await (async (e2, t2, n3, s3, r3) => {
|
|
316
|
+
if (!Y) return I.importKey(t2);
|
|
317
|
+
try {
|
|
318
|
+
return await O.importKey("raw", t2, n3, false, r3);
|
|
319
|
+
} catch {
|
|
320
|
+
return Y = false, I.importKey(t2);
|
|
321
|
+
}
|
|
322
|
+
})(0, r2, W, 0, E), c2 = await (async (e2, t2, n3) => {
|
|
323
|
+
if (!$) return I.pbkdf2(t2, e2.salt, M.iterations, n3);
|
|
324
|
+
try {
|
|
325
|
+
return await O.deriveBits(e2, t2, n3);
|
|
326
|
+
} catch {
|
|
327
|
+
return $ = false, I.pbkdf2(t2, e2.salt, M.iterations, n3);
|
|
328
|
+
}
|
|
329
|
+
})(t.assign({ salt: a2 }, M), o2, 8 * (2 * L[s2] + 2)), l2 = new i(c2), u2 = ce(G, ae(l2, 0, L[s2])), h2 = ce(G, ae(l2, L[s2], 2 * L[s2])), f2 = ae(l2, 2 * L[s2]);
|
|
330
|
+
return t.assign(n2, { keys: { key: u2, authentication: h2, passwordVerification: f2 }, ctr: new J(new X(u2), e.from(F)), hmac: new Q(h2) }), f2;
|
|
331
|
+
}
|
|
332
|
+
function re(e2, t2) {
|
|
333
|
+
return t2 === b ? ((e3) => {
|
|
334
|
+
if (typeof f == S) {
|
|
335
|
+
const t3 = new i((e3 = unescape(encodeURIComponent(e3))).length);
|
|
336
|
+
for (let n2 = 0; n2 < t3.length; n2++) t3[n2] = e3.charCodeAt(n2);
|
|
337
|
+
return t3;
|
|
338
|
+
}
|
|
339
|
+
return new f().encode(e3);
|
|
340
|
+
})(e2) : t2;
|
|
341
|
+
}
|
|
342
|
+
function ie(e2, t2) {
|
|
343
|
+
let n2 = e2;
|
|
344
|
+
return e2.length + t2.length && (n2 = new i(e2.length + t2.length), n2.set(e2, 0), n2.set(t2, e2.length)), n2;
|
|
345
|
+
}
|
|
346
|
+
function ae(e2, t2, n2) {
|
|
347
|
+
return e2.subarray(t2, n2);
|
|
348
|
+
}
|
|
349
|
+
function oe(e2, t2) {
|
|
350
|
+
return e2.fromBits(t2);
|
|
351
|
+
}
|
|
352
|
+
function ce(e2, t2) {
|
|
353
|
+
return e2.toBits(t2);
|
|
354
|
+
}
|
|
355
|
+
class le extends w {
|
|
356
|
+
constructor({ password: e2, passwordVerification: n2, checkPasswordOnly: s2 }) {
|
|
357
|
+
super({ start() {
|
|
358
|
+
t.assign(this, { password: e2, passwordVerification: n2 }), pe(this, e2);
|
|
359
|
+
}, transform(e3, t2) {
|
|
360
|
+
const n3 = this;
|
|
361
|
+
if (n3.password) {
|
|
362
|
+
const t3 = he(n3, e3.subarray(0, 12));
|
|
363
|
+
if (n3.password = null, t3.at(-1) != n3.passwordVerification) throw new r(K);
|
|
364
|
+
e3 = e3.subarray(12);
|
|
365
|
+
}
|
|
366
|
+
s2 ? t2.error(new r(T)) : t2.enqueue(he(n3, e3));
|
|
367
|
+
} });
|
|
368
|
+
}
|
|
369
|
+
}
|
|
370
|
+
class ue extends w {
|
|
371
|
+
constructor({ password: e2, passwordVerification: n2 }) {
|
|
372
|
+
super({ start() {
|
|
373
|
+
t.assign(this, { password: e2, passwordVerification: n2 }), pe(this, e2);
|
|
374
|
+
}, transform(e3, t2) {
|
|
375
|
+
const n3 = this;
|
|
376
|
+
let s2, r2;
|
|
377
|
+
if (n3.password) {
|
|
378
|
+
n3.password = null;
|
|
379
|
+
const t3 = V(new i(12));
|
|
380
|
+
t3[11] = n3.passwordVerification, s2 = new i(e3.length + t3.length), s2.set(fe(n3, t3), 0), r2 = 12;
|
|
381
|
+
} else s2 = new i(e3.length), r2 = 0;
|
|
382
|
+
s2.set(fe(n3, e3), r2), t2.enqueue(s2);
|
|
383
|
+
} });
|
|
384
|
+
}
|
|
385
|
+
}
|
|
386
|
+
function he(e2, t2) {
|
|
387
|
+
const n2 = new i(t2.length);
|
|
388
|
+
for (let s2 = 0; s2 < t2.length; s2++) n2[s2] = we(e2) ^ t2[s2], de(e2, n2[s2]);
|
|
389
|
+
return n2;
|
|
390
|
+
}
|
|
391
|
+
function fe(e2, t2) {
|
|
392
|
+
const n2 = new i(t2.length);
|
|
393
|
+
for (let s2 = 0; s2 < t2.length; s2++) n2[s2] = we(e2) ^ t2[s2], de(e2, t2[s2]);
|
|
394
|
+
return n2;
|
|
395
|
+
}
|
|
396
|
+
function pe(e2, n2) {
|
|
397
|
+
const s2 = [305419896, 591751049, 878082192];
|
|
398
|
+
t.assign(e2, { keys: s2, crcKey0: new v(s2[0]), crcKey2: new v(s2[2]) });
|
|
399
|
+
for (let t2 = 0; t2 < n2.length; t2++) de(e2, n2.charCodeAt(t2));
|
|
400
|
+
}
|
|
401
|
+
function de(e2, t2) {
|
|
402
|
+
let [n2, r2, i2] = e2.keys;
|
|
403
|
+
e2.crcKey0.append([t2]), n2 = ~e2.crcKey0.get(), r2 = me(s.imul(me(r2 + ge(n2)), 134775813) + 1), e2.crcKey2.append([r2 >>> 24]), i2 = ~e2.crcKey2.get(), e2.keys = [n2, r2, i2];
|
|
404
|
+
}
|
|
405
|
+
function we(e2) {
|
|
406
|
+
const t2 = 2 | e2.keys[2];
|
|
407
|
+
return ge(s.imul(t2, 1 ^ t2) >>> 8);
|
|
408
|
+
}
|
|
409
|
+
function ge(e2) {
|
|
410
|
+
return 255 & e2;
|
|
411
|
+
}
|
|
412
|
+
function me(e2) {
|
|
413
|
+
return 4294967295 & e2;
|
|
414
|
+
}
|
|
415
|
+
class _e extends w {
|
|
416
|
+
constructor(e2, { chunkSize: t2, CompressionStreamZlib: n2, CompressionStream: s2 }) {
|
|
417
|
+
super({});
|
|
418
|
+
const { compressed: r2, encrypted: i2, useCompressionStream: a2, zipCrypto: o2, signed: c2, level: l2 } = e2, h2 = this;
|
|
419
|
+
let f2, p2, d2 = super.readable;
|
|
420
|
+
i2 && !o2 || !c2 || (f2 = new H(), d2 = ze(d2, f2)), r2 && (d2 = Se(d2, a2, { level: l2, chunkSize: t2 }, s2, n2, s2)), i2 && (o2 ? d2 = ze(d2, new ue(e2)) : (p2 = new te(e2), d2 = ze(d2, p2))), be(h2, d2, () => {
|
|
421
|
+
let e3;
|
|
422
|
+
i2 && !o2 && (e3 = p2.signature), i2 && !o2 || !c2 || (e3 = new u(f2.value.buffer).getUint32(0)), h2.signature = e3;
|
|
423
|
+
});
|
|
424
|
+
}
|
|
425
|
+
}
|
|
426
|
+
class ye extends w {
|
|
427
|
+
constructor(e2, { chunkSize: t2, DecompressionStreamZlib: n2, DecompressionStream: s2 }) {
|
|
428
|
+
super({});
|
|
429
|
+
const { zipCrypto: i2, encrypted: a2, signed: o2, signature: c2, compressed: l2, useCompressionStream: h2, deflate64: f2 } = e2;
|
|
430
|
+
let p2, d2, w2 = super.readable;
|
|
431
|
+
a2 && (i2 ? w2 = ze(w2, new le(e2)) : (d2 = new ee(e2), w2 = ze(w2, d2))), l2 && (w2 = Se(w2, h2, { chunkSize: t2, deflate64: f2 }, s2, n2, s2)), a2 && !i2 || !o2 || (p2 = new H(), w2 = ze(w2, p2)), be(this, w2, () => {
|
|
432
|
+
if ((!a2 || i2) && o2) {
|
|
433
|
+
const e3 = new u(p2.value.buffer);
|
|
434
|
+
if (c2 != e3.getUint32(0, false)) throw new r(P);
|
|
435
|
+
}
|
|
436
|
+
});
|
|
437
|
+
}
|
|
438
|
+
}
|
|
439
|
+
function be(e2, n2, s2) {
|
|
440
|
+
n2 = ze(n2, new w({ flush: s2 })), t.defineProperty(e2, "readable", { get: () => n2 });
|
|
441
|
+
}
|
|
442
|
+
function Se(e2, t2, n2, s2, r2, i2) {
|
|
443
|
+
const a2 = t2 && s2 ? s2 : r2 || i2, o2 = n2.deflate64 ? "deflate64-raw" : "deflate-raw";
|
|
444
|
+
try {
|
|
445
|
+
e2 = ze(e2, new a2(o2, n2));
|
|
446
|
+
} catch (s3) {
|
|
447
|
+
if (!t2) throw s3;
|
|
448
|
+
if (r2) e2 = ze(e2, new r2(o2, n2));
|
|
449
|
+
else {
|
|
450
|
+
if (!i2) throw s3;
|
|
451
|
+
e2 = ze(e2, new i2(o2, n2));
|
|
452
|
+
}
|
|
453
|
+
}
|
|
454
|
+
return e2;
|
|
455
|
+
}
|
|
456
|
+
function ze(e2, t2) {
|
|
457
|
+
return e2.pipeThrough(t2);
|
|
458
|
+
}
|
|
459
|
+
const ke = "data", ve = "close";
|
|
460
|
+
class He extends w {
|
|
461
|
+
constructor(e2, n2) {
|
|
462
|
+
super({});
|
|
463
|
+
const s2 = this, { codecType: i2 } = e2;
|
|
464
|
+
let a2;
|
|
465
|
+
i2.startsWith("deflate") ? a2 = _e : i2.startsWith("inflate") && (a2 = ye), s2.outputSize = 0;
|
|
466
|
+
let o2 = 0;
|
|
467
|
+
const c2 = new a2(e2, n2), l2 = super.readable, u2 = new w({ transform(e3, t2) {
|
|
468
|
+
e3 && e3.length && (o2 += e3.length, t2.enqueue(e3));
|
|
469
|
+
}, flush() {
|
|
470
|
+
t.assign(s2, { inputSize: o2 });
|
|
471
|
+
} }), h2 = new w({ transform(t2, n3) {
|
|
472
|
+
if (t2 && t2.length && (n3.enqueue(t2), s2.outputSize += t2.length, e2.outputSize !== b && s2.outputSize > e2.outputSize)) throw new r("Invalid uncompressed size");
|
|
473
|
+
}, flush() {
|
|
474
|
+
const { signature: e3 } = c2;
|
|
475
|
+
t.assign(s2, { signature: e3, inputSize: o2 });
|
|
476
|
+
} });
|
|
477
|
+
t.defineProperty(s2, "readable", { get: () => l2.pipeThrough(u2).pipeThrough(c2).pipeThrough(h2) });
|
|
478
|
+
}
|
|
479
|
+
}
|
|
480
|
+
class Ce extends w {
|
|
481
|
+
constructor(e2) {
|
|
482
|
+
let t2;
|
|
483
|
+
super({ transform: function n2(s2, r2) {
|
|
484
|
+
if (t2) {
|
|
485
|
+
const e3 = new i(t2.length + s2.length);
|
|
486
|
+
e3.set(t2), e3.set(s2, t2.length), s2 = e3, t2 = null;
|
|
487
|
+
}
|
|
488
|
+
s2.length > e2 ? (r2.enqueue(s2.slice(0, e2)), n2(s2.slice(e2), r2)) : t2 = s2;
|
|
489
|
+
}, flush(e3) {
|
|
490
|
+
t2 && t2.length && e3.enqueue(t2);
|
|
491
|
+
} });
|
|
492
|
+
}
|
|
493
|
+
}
|
|
494
|
+
const Be = new l(), Ae = new l();
|
|
495
|
+
let Re, Ie, qe, Ke, Pe, Te = 0;
|
|
496
|
+
async function Ve(e2) {
|
|
497
|
+
try {
|
|
498
|
+
const { options: t2, config: s2 } = e2;
|
|
499
|
+
if (!t2.useCompressionStream) try {
|
|
500
|
+
await self.initModule(e2.config);
|
|
501
|
+
} catch {
|
|
502
|
+
t2.useCompressionStream = true;
|
|
503
|
+
}
|
|
504
|
+
s2.CompressionStream = self.CompressionStream, s2.DecompressionStream = self.DecompressionStream;
|
|
505
|
+
const r2 = { highWaterMark: 1 }, i2 = e2.readable || new g({ async pull(e3) {
|
|
506
|
+
const t3 = new h((e4) => Be.set(Te, e4));
|
|
507
|
+
xe({ type: "pull", messageId: Te }), Te = (Te + 1) % n.MAX_SAFE_INTEGER;
|
|
508
|
+
const { value: s3, done: r3 } = await t3;
|
|
509
|
+
e3.enqueue(s3), r3 && e3.close();
|
|
510
|
+
} }, r2), a2 = e2.writable || new m({ async write(e3) {
|
|
511
|
+
let t3;
|
|
512
|
+
const s3 = new h((e4) => t3 = e4);
|
|
513
|
+
Ae.set(Te, t3), xe({ type: ke, value: e3, messageId: Te }), Te = (Te + 1) % n.MAX_SAFE_INTEGER, await s3;
|
|
514
|
+
} }, r2), o2 = new He(t2, s2);
|
|
515
|
+
Re = new AbortController();
|
|
516
|
+
const { signal: c2 } = Re;
|
|
517
|
+
await i2.pipeThrough(o2).pipeThrough(new Ce(s2.chunkSize)).pipeTo(a2, { signal: c2, preventClose: true, preventAbort: true }), await a2.getWriter().close();
|
|
518
|
+
const { signature: l2, inputSize: u2, outputSize: f2 } = o2;
|
|
519
|
+
xe({ type: ve, result: { signature: l2, inputSize: u2, outputSize: f2 } });
|
|
520
|
+
} catch (e3) {
|
|
521
|
+
e3.outputSize = 0, Ue(e3);
|
|
522
|
+
}
|
|
523
|
+
}
|
|
524
|
+
function xe(e2) {
|
|
525
|
+
let { value: t2 } = e2;
|
|
526
|
+
if (t2) if (t2.length) try {
|
|
527
|
+
t2 = new i(t2), e2.value = t2.buffer, d(e2, [e2.value]);
|
|
528
|
+
} catch {
|
|
529
|
+
d(e2);
|
|
530
|
+
}
|
|
531
|
+
else d(e2);
|
|
532
|
+
else d(e2);
|
|
533
|
+
}
|
|
534
|
+
function Ue(e2 = new r("Unknown error")) {
|
|
535
|
+
const { message: t2, stack: n2, code: s2, name: i2, outputSize: a2 } = e2;
|
|
536
|
+
d({ error: { message: t2, stack: n2, code: s2, name: i2, outputSize: a2 } });
|
|
537
|
+
}
|
|
538
|
+
function We(e2, t2, n2 = {}) {
|
|
539
|
+
const a2 = "number" == typeof n2.level ? n2.level : -1, o2 = "number" == typeof n2.outBuffer ? n2.outBuffer : 65536, c2 = "number" == typeof n2.inBufferSize ? n2.inBufferSize : 65536;
|
|
540
|
+
return new w({ start() {
|
|
541
|
+
let n3;
|
|
542
|
+
if (this.out = qe(o2), this.in = qe(c2), this.inBufferSize = c2, this._scratch = new i(o2), e2 ? (this._process = Ie.deflate_process, this._last_consumed = Ie.deflate_last_consumed, this._end = Ie.deflate_end, this.streamHandle = Ie.deflate_new(), n3 = "gzip" === t2 ? Ie.deflate_init_gzip(this.streamHandle, a2) : "deflate-raw" === t2 ? Ie.deflate_init_raw(this.streamHandle, a2) : Ie.deflate_init(this.streamHandle, a2)) : "deflate64-raw" === t2 ? (this._process = Ie.inflate9_process, this._last_consumed = Ie.inflate9_last_consumed, this._end = Ie.inflate9_end, this.streamHandle = Ie.inflate9_new(), n3 = Ie.inflate9_init_raw(this.streamHandle)) : (this._process = Ie.inflate_process, this._last_consumed = Ie.inflate_last_consumed, this._end = Ie.inflate_end, this.streamHandle = Ie.inflate_new(), n3 = "deflate-raw" === t2 ? Ie.inflate_init_raw(this.streamHandle) : "gzip" === t2 ? Ie.inflate_init_gzip(this.streamHandle) : Ie.inflate_init(this.streamHandle)), 0 !== n3) throw new r("init failed:" + n3);
|
|
543
|
+
}, transform(t3, n3) {
|
|
544
|
+
try {
|
|
545
|
+
const a3 = t3, c3 = new i(Pe.buffer), l2 = this._process, u2 = this._last_consumed, h2 = this.out, f2 = this._scratch;
|
|
546
|
+
let p2 = 0;
|
|
547
|
+
for (; p2 < a3.length; ) {
|
|
548
|
+
const t4 = s.min(a3.length - p2, 32768);
|
|
549
|
+
this.in && this.inBufferSize >= t4 || (this.in && Ke && Ke(this.in), this.in = qe(t4), this.inBufferSize = t4), c3.set(a3.subarray(p2, p2 + t4), this.in);
|
|
550
|
+
const i2 = l2(this.streamHandle, this.in, t4, h2, o2, 0), d2 = 16777215 & i2;
|
|
551
|
+
if (d2 && (f2.set(c3.subarray(h2, h2 + d2), 0), n3.enqueue(f2.slice(0, d2))), !e2) {
|
|
552
|
+
const e3 = i2 >> 24 & 255, t5 = 128 & e3 ? e3 - 256 : e3;
|
|
553
|
+
if (0 > t5) throw new r("process error:" + t5);
|
|
554
|
+
}
|
|
555
|
+
const w2 = u2(this.streamHandle);
|
|
556
|
+
if (0 === w2) break;
|
|
557
|
+
p2 += w2;
|
|
558
|
+
}
|
|
559
|
+
} catch (e3) {
|
|
560
|
+
this._end && this.streamHandle && this._end(this.streamHandle), this.in && Ke && Ke(this.in), this.out && Ke && Ke(this.out), n3.error(e3);
|
|
561
|
+
}
|
|
562
|
+
}, flush(t3) {
|
|
563
|
+
try {
|
|
564
|
+
const n3 = new i(Pe.buffer), s2 = this._process, a3 = this.out, c3 = this._scratch;
|
|
565
|
+
for (; ; ) {
|
|
566
|
+
const i2 = s2(this.streamHandle, 0, 0, a3, o2, 4), l2 = 16777215 & i2, u2 = i2 >> 24 & 255;
|
|
567
|
+
if (!e2) {
|
|
568
|
+
const e3 = 128 & u2 ? u2 - 256 : u2;
|
|
569
|
+
if (0 > e3) throw new r("process error:" + e3);
|
|
570
|
+
}
|
|
571
|
+
if (l2 && (c3.set(n3.subarray(a3, a3 + l2), 0), t3.enqueue(c3.slice(0, l2))), 1 === u2 || 0 === l2) break;
|
|
572
|
+
}
|
|
573
|
+
} catch (e3) {
|
|
574
|
+
t3.error(e3);
|
|
575
|
+
} finally {
|
|
576
|
+
if (this._end && this.streamHandle) {
|
|
577
|
+
const e3 = this._end(this.streamHandle);
|
|
578
|
+
0 !== e3 && t3.error(new r("end error:" + e3));
|
|
579
|
+
}
|
|
580
|
+
this.in && Ke && Ke(this.in), this.out && Ke && Ke(this.out);
|
|
581
|
+
}
|
|
582
|
+
} });
|
|
583
|
+
}
|
|
584
|
+
addEventListener("message", ({ data: e2 }) => {
|
|
585
|
+
const { type: t2, messageId: n2, value: s2, done: r2 } = e2;
|
|
586
|
+
try {
|
|
587
|
+
if ("start" == t2 && Ve(e2), t2 == ke) {
|
|
588
|
+
const e3 = Be.get(n2);
|
|
589
|
+
Be.delete(n2), e3({ value: new i(s2), done: r2 });
|
|
590
|
+
}
|
|
591
|
+
if ("ack" == t2) {
|
|
592
|
+
const e3 = Ae.get(n2);
|
|
593
|
+
Ae.delete(n2), e3();
|
|
594
|
+
}
|
|
595
|
+
t2 == ve && Re.abort();
|
|
596
|
+
} catch (e3) {
|
|
597
|
+
Ue(e3);
|
|
598
|
+
}
|
|
599
|
+
});
|
|
600
|
+
class Me {
|
|
601
|
+
constructor(e2 = "deflate", t2) {
|
|
602
|
+
return We(true, e2, t2);
|
|
603
|
+
}
|
|
604
|
+
}
|
|
605
|
+
class Ee {
|
|
606
|
+
constructor(e2 = "deflate", t2) {
|
|
607
|
+
return We(false, e2, t2);
|
|
608
|
+
}
|
|
609
|
+
}
|
|
610
|
+
let De = false;
|
|
611
|
+
self.initModule = async (e2) => {
|
|
612
|
+
try {
|
|
613
|
+
const t2 = await (async (e3, { baseURI: t3 }) => {
|
|
614
|
+
if (!De) {
|
|
615
|
+
let n2, s2;
|
|
616
|
+
try {
|
|
617
|
+
try {
|
|
618
|
+
s2 = new URL(e3, t3);
|
|
619
|
+
} catch {
|
|
620
|
+
}
|
|
621
|
+
const r2 = await fetch(s2);
|
|
622
|
+
n2 = await r2.arrayBuffer();
|
|
623
|
+
} catch (t4) {
|
|
624
|
+
if (!e3.startsWith("data:application/wasm;base64,")) throw t4;
|
|
625
|
+
n2 = ((e4) => {
|
|
626
|
+
const t5 = e4.split(",")[1], n3 = atob(t5), s3 = n3.length, r2 = new i(s3);
|
|
627
|
+
for (let e5 = 0; s3 > e5; ++e5) r2[e5] = n3.charCodeAt(e5);
|
|
628
|
+
return r2.buffer;
|
|
629
|
+
})(e3);
|
|
630
|
+
}
|
|
631
|
+
((e4) => {
|
|
632
|
+
if (Ie = e4, { malloc: qe, free: Ke, memory: Pe } = Ie, "function" != typeof qe || "function" != typeof Ke || !Pe) throw Ie = qe = Ke = Pe = null, new r("Invalid WASM module");
|
|
633
|
+
})((await WebAssembly.instantiate(n2)).instance.exports), De = true;
|
|
634
|
+
}
|
|
635
|
+
})(e2.wasmURI, e2);
|
|
636
|
+
return e2.CompressionStreamZlib = Me, e2.DecompressionStreamZlib = Ee, t2;
|
|
637
|
+
} catch {
|
|
638
|
+
}
|
|
639
|
+
};
|
|
640
|
+
})();
|
|
Binary file
|