@arcgis/core 4.33.0-next.20250210 → 4.33.0-next.20250212
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/AttributeBinsGraphic.js +1 -1
- package/Graphic.js +1 -1
- package/Ground.js +1 -1
- package/WebMap.js +1 -1
- package/WebScene.js +1 -1
- package/arcade/ArcadeModuleResolver.js +1 -1
- package/arcade/featureset/actions/Adapted.js +1 -1
- package/arcade/featureset/support/FeatureSet.js +1 -1
- package/arcade/featureset/support/Guid.js +1 -1
- package/arcade/featureset/support/cache.js +1 -1
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/{d31f7598629f7cc50233.js → 004853abf357f865b4fa.js} +1 -1
- package/assets/esri/core/workers/chunks/00e374e3b4781c4f9a3e.js +1 -0
- package/assets/esri/core/workers/chunks/{746c964cf07e4306f21f.js → 03f51ea011ffbcfb7c7d.js} +1 -1
- package/assets/esri/core/workers/chunks/{ad3e692681b50bd1acc2.js → 03fac4c79641603d8cba.js} +1 -1
- package/assets/esri/core/workers/chunks/{0167cf867d8e46c818b0.js → 09260bbe1fd6ce5a53e6.js} +1 -1
- package/assets/esri/core/workers/chunks/{3c23e567cfb7372c44ba.js → 0a5689348d544090006d.js} +1 -1
- package/assets/esri/core/workers/chunks/0b8bf1966653c326e95a.js +1 -0
- package/assets/esri/core/workers/chunks/{d1718ad93e3271b0525e.js → 0e4350fda5328862f2fb.js} +1 -1
- package/assets/esri/core/workers/chunks/{c26ffbff1115e76bcb0f.js → 1249fd2f83caeaefd8ce.js} +1 -1
- package/assets/esri/core/workers/chunks/135fb580d8afd8d60811.js +1 -0
- package/assets/esri/core/workers/chunks/{946a9890f3621d1dfbc5.js → 144e534d4ac1aafab60d.js} +1 -1
- package/assets/esri/core/workers/chunks/{cee3a38b92a48a58c4d0.js → 152becae48572299b07f.js} +1 -1
- package/assets/esri/core/workers/chunks/{f200dca22f9f9bbb8670.js → 17213c3fc63f580e5b73.js} +1 -1
- package/assets/esri/core/workers/chunks/1a286d43daa3b811c30d.js +1 -0
- package/assets/esri/core/workers/chunks/{e5e3b6d00d27b5bb354f.js → 1d282700e76285a1684c.js} +1 -1
- package/assets/esri/core/workers/chunks/2130e0c8d2410c87f880.js +1 -0
- package/assets/esri/core/workers/chunks/24e6476f32ad2014d39d.js +1 -0
- package/assets/esri/core/workers/chunks/2530e5d1f438db8a7b5c.js +1 -0
- package/assets/esri/core/workers/chunks/272662e4e28341419b4f.js +1 -0
- package/assets/esri/core/workers/chunks/{dfaf1da323906ee60549.js → 2876419a32537e24b7da.js} +1 -1
- package/assets/esri/core/workers/chunks/2b733e8043659466e194.js +1 -0
- package/assets/esri/core/workers/chunks/{5fbdb5fea7d6676fcf19.js → 2c1a85a801cb4d9d737e.js} +1 -1
- package/assets/esri/core/workers/chunks/{7f87cf3d6a365d987f69.js → 30bd5b3204e09f516ea2.js} +1 -1
- package/assets/esri/core/workers/chunks/311c85bd94d5fb28e272.js +1 -0
- package/assets/esri/core/workers/chunks/33c6fd524711efd8ef13.js +1 -0
- package/assets/esri/core/workers/chunks/{594d923400fd74881833.js → 35392bf8f21005ad6170.js} +1 -1
- package/assets/esri/core/workers/chunks/{c04091eea7089dc2e864.js → 35bcb0622234b38d85b4.js} +1 -1
- package/assets/esri/core/workers/chunks/{92984981afcbb95828cd.js → 37cfd102b6ab5b959f9d.js} +1 -1
- package/assets/esri/core/workers/chunks/3835c2884c55e73dc202.js +1 -0
- package/assets/esri/core/workers/chunks/{de1f3c4b8000c2d73013.js → 39dca492cc5f089e1609.js} +1 -1
- package/assets/esri/core/workers/chunks/3ba85f1d660b8887f963.js +314 -0
- package/assets/esri/core/workers/chunks/{1d51c064045e9c47bd2e.js → 3bad184751fcb26c003c.js} +1 -1
- package/assets/esri/core/workers/chunks/{5b85f9da022742f602e2.js → 3c8e5b5fb52611e30ed6.js} +1 -1
- package/assets/esri/core/workers/chunks/{e468bf4ec7402942ad8c.js → 3ebdd0701e77bb28c75d.js} +1 -1
- package/assets/esri/core/workers/chunks/{a559db8654b4f83fd79b.js → 3f6516af411256d90a03.js} +1 -1
- package/assets/esri/core/workers/chunks/{c83b26ff96e39266adc2.js → 4300c80fa10c5d9141e8.js} +1 -1
- package/assets/esri/core/workers/chunks/4848a3e31632d15dc4ce.js +1 -0
- package/assets/esri/core/workers/chunks/{77764ca90bdd13ee2167.js → 486df1e042204b90b0dd.js} +2 -2
- package/assets/esri/core/workers/chunks/{77764ca90bdd13ee2167.js.LICENSE.txt → 486df1e042204b90b0dd.js.LICENSE.txt} +1 -1
- package/assets/esri/core/workers/chunks/491effb2c681493cc3a6.js +1 -0
- package/assets/esri/core/workers/chunks/{e93dea6b112ce8e2779b.js → 4b47549614d53ce1e384.js} +1 -1
- package/assets/esri/core/workers/chunks/52f61e1f5972a72b6b54.js +1 -0
- package/assets/esri/core/workers/chunks/{354531dc2f0dea2ad96f.js → 5693d9ce4472a4c5959f.js} +2 -2
- package/assets/esri/core/workers/chunks/{354531dc2f0dea2ad96f.js.LICENSE.txt → 5693d9ce4472a4c5959f.js.LICENSE.txt} +1 -1
- package/assets/esri/core/workers/chunks/{e56647e61296643c5f84.js → 5719471414810b6a9aec.js} +1 -1
- package/assets/esri/core/workers/chunks/{1accbc048b74857269e4.js → 57924f4909f2cbe5d64c.js} +1 -1
- package/assets/esri/core/workers/chunks/{b21b152fa15896577242.js → 5b56b271afb0fadf48b4.js} +2 -2
- package/assets/esri/core/workers/chunks/{b21b152fa15896577242.js.LICENSE.txt → 5b56b271afb0fadf48b4.js.LICENSE.txt} +1 -1
- package/assets/esri/core/workers/chunks/{b3aeda290470dcb2bdd2.js → 5cf08ee5114273163e09.js} +1 -1
- package/assets/esri/core/workers/chunks/{2971266a49226e769360.js → 5e5045add6567588b90a.js} +1 -1
- package/assets/esri/core/workers/chunks/{5721557a1d8eab23a55b.js → 5eceedac9b2b4d1ef133.js} +1 -1
- package/assets/esri/core/workers/chunks/{76794184ba8c2e66745e.js → 629f4621ba6ffdcaa2f9.js} +1 -1
- package/assets/esri/core/workers/chunks/{32d3657dcae89b740f8b.js → 6518954889df2e781c47.js} +2 -2
- package/assets/esri/core/workers/chunks/{32d3657dcae89b740f8b.js.LICENSE.txt → 6518954889df2e781c47.js.LICENSE.txt} +1 -1
- package/assets/esri/core/workers/chunks/6a9a1cd8134a903dd05a.js +1 -0
- package/assets/esri/core/workers/chunks/{220b12654b94c94f8d8a.js → 6fa1f1e431aae1794ce3.js} +1 -1
- package/assets/esri/core/workers/chunks/7485588bd24217669578.js +1 -0
- package/assets/esri/core/workers/chunks/74e0116ae84def626c87.js +1 -0
- package/assets/esri/core/workers/chunks/{c4374b6bc5c8dc6435c7.js → 7c81e08fc8a67dcd9dad.js} +1 -1
- package/assets/esri/core/workers/chunks/{433576983754f690bcc7.js → 7e3b374f906441cd7fb0.js} +1 -1
- package/assets/esri/core/workers/chunks/{8c32cee395da0a7b9a8e.js → 80d3aa3f27ad5b2b969b.js} +1 -1
- package/assets/esri/core/workers/chunks/82facb23dfaba2819bc7.js +1 -0
- package/assets/esri/core/workers/chunks/{de4384b5833a60e88e31.js → 84c1c3336011a1b79669.js} +1 -1
- package/assets/esri/core/workers/chunks/8722d05ae9b0aa5162a4.js +1 -0
- package/assets/esri/core/workers/chunks/8939479cd433cc53f6c1.js +1 -0
- package/assets/esri/core/workers/chunks/{28dd172faa85080511c5.js → 8a2f3ce46eeac853b3a9.js} +1 -1
- package/assets/esri/core/workers/chunks/8b6580329e1e35ea4190.js +1 -0
- package/assets/esri/core/workers/chunks/8bfeef7cffe1e65c9dab.js +1 -0
- package/assets/esri/core/workers/chunks/8de4280080296adb1757.js +1 -0
- package/assets/esri/core/workers/chunks/{b44cf0e4c2f93408cabc.js → 9205115bdb5bc03d0c02.js} +1 -1
- package/assets/esri/core/workers/chunks/92d76d59113b4139befe.js +1 -0
- package/assets/esri/core/workers/chunks/9421ae38fdf986b9b107.js +1 -0
- package/assets/esri/core/workers/chunks/{1f443b99653708470f31.js → 96d7f47ea8fbf345101c.js} +1 -1
- package/assets/esri/core/workers/chunks/99c136b800e5fc7e04f4.js +1 -0
- package/assets/esri/core/workers/chunks/{d339dee99c4820b63f39.js → 9b74635d80d029498da1.js} +1 -1
- package/assets/esri/core/workers/chunks/{c2336d1f5b2b7bf6e7a7.js → 9bd6a4bf8150a6f618ea.js} +1 -1
- package/assets/esri/core/workers/chunks/9e7895e8201127ffe0a8.js +1 -0
- package/assets/esri/core/workers/chunks/{e6087eda5e3b7e5ad3e1.js → a12afed58acff17708ca.js} +1 -1
- package/assets/esri/core/workers/chunks/{7b367bb0ed9c218ca595.js → a52690a27f8732739c02.js} +1 -1
- package/assets/esri/core/workers/chunks/{cdd8983cf3a301805680.js → a52c282609a7e9c8ca9e.js} +1 -1
- package/assets/esri/core/workers/chunks/a56b3dffd9f38973f350.js +1 -0
- package/assets/esri/core/workers/chunks/{95ad76e58452b60fb79f.js → a864ef9b584c83ebf6ae.js} +1 -1
- package/assets/esri/core/workers/chunks/a9274c9132e7a2691abb.js +1 -0
- package/assets/esri/core/workers/chunks/{df3d1a8d3f11d52eb30d.js → afdbdc1569b56489c14d.js} +1 -1
- package/assets/esri/core/workers/chunks/{308ec51ff4a66f7fcb0d.js → b0952b81d5be214262dd.js} +2 -2
- package/assets/esri/core/workers/chunks/{308ec51ff4a66f7fcb0d.js.LICENSE.txt → b0952b81d5be214262dd.js.LICENSE.txt} +1 -1
- package/assets/esri/core/workers/chunks/b253cf42e53f957b4b4e.js +1 -0
- package/assets/esri/core/workers/chunks/{89e3f7880abd014a62c0.js → b42d26123784997c66e8.js} +1 -1
- package/assets/esri/core/workers/chunks/b50176897ffadc53573e.js +1 -0
- package/assets/esri/core/workers/chunks/{4040158835f9036967cd.js → b83151b03bbeba466f82.js} +2 -2
- package/assets/esri/core/workers/chunks/{4040158835f9036967cd.js.LICENSE.txt → b83151b03bbeba466f82.js.LICENSE.txt} +1 -1
- package/assets/esri/core/workers/chunks/bf0bf2b912d668575a9b.js +1 -0
- package/assets/esri/core/workers/chunks/{94490937dca566fe2640.js → c061cad8323f0469e7e4.js} +1 -1
- package/assets/esri/core/workers/chunks/c3dc355d0f8d89b9b7b8.js +1 -0
- package/assets/esri/core/workers/chunks/{fef135e55706d84d1947.js → c4ce3c35b52b7999e877.js} +1 -1
- package/assets/esri/core/workers/chunks/c77ade444aa2f3f2b599.js +1 -0
- package/assets/esri/core/workers/chunks/ca6180e572e69540c183.js +1 -0
- package/assets/esri/core/workers/chunks/{16f82e9d98371431b46d.js → cc085918c63da416e59d.js} +1 -1
- package/assets/esri/core/workers/chunks/cc8eb975a543556f88ae.js +1 -0
- package/assets/esri/core/workers/chunks/{8e90c5fee4ad7c7275dc.js → cccd215b0a4890551957.js} +1 -1
- package/assets/esri/core/workers/chunks/ce88224af357957dd83a.js +1 -0
- package/assets/esri/core/workers/chunks/{07c5f3fc475c57f5a7a7.js → cf00df122df3db3b0c23.js} +1 -1
- package/assets/esri/core/workers/chunks/d074c916b414432a7b6a.js +1 -0
- package/assets/esri/core/workers/chunks/d342c56558f164e9e786.js +1 -0
- package/assets/esri/core/workers/chunks/{3c591f76e7d6204b7780.js → d3f7ff03ab5b40062d89.js} +1 -1
- package/assets/esri/core/workers/chunks/{6e6422eda398774acbc7.js → d60da671aba70485050e.js} +1 -1
- package/assets/esri/core/workers/chunks/{9d61590c4d21c7421925.js → d7b260d6187f29e0c136.js} +1 -1
- package/assets/esri/core/workers/chunks/de638753a30c9aa41bad.js +1 -0
- package/assets/esri/core/workers/chunks/de87009542886fad9a2f.js +2 -0
- package/assets/esri/core/workers/chunks/{b765670b47d209d7655a.js.LICENSE.txt → de87009542886fad9a2f.js.LICENSE.txt} +1 -1
- package/assets/esri/core/workers/chunks/{bb73cd34fbae935ccbcc.js → dff4a9d656b84fe3e052.js} +1 -1
- package/assets/esri/core/workers/chunks/e03e237e7e6ffc8b7f0d.js +1 -0
- package/assets/esri/core/workers/chunks/{0b62871b89dcb4c70457.js → e21941260bae30061c2c.js} +1 -1
- package/assets/esri/core/workers/chunks/e490f70f192780d7ad50.js +1 -0
- package/assets/esri/core/workers/chunks/e6633f0326a44477f630.js +1 -0
- package/assets/esri/core/workers/chunks/e71b780d1e6a32f303b7.js +1 -0
- package/assets/esri/core/workers/chunks/eac28b0f6fccfabcc3ca.js +1 -0
- package/assets/esri/core/workers/chunks/{01c3507d78398baaf61b.js → eb0ce7937813d1be1284.js} +1 -1
- package/assets/esri/core/workers/chunks/{f198f4ba7d3d52882d98.js → efded84870064c3d8210.js} +1 -1
- package/assets/esri/core/workers/chunks/f088e7db4e7ac85aaff1.js +1 -0
- package/assets/esri/core/workers/chunks/{15e08e8a8a72b177d74c.js → f0d28fe4deb7cd894765.js} +1 -1
- package/assets/esri/core/workers/chunks/{c8a0089e080140db9076.js → f285ed5425b31123d2bc.js} +1 -1
- package/assets/esri/core/workers/chunks/f4ba823c8acd60c7c82d.js +1 -0
- package/assets/esri/core/workers/chunks/f52ed527b46c316eb369.js +1 -0
- package/assets/esri/core/workers/chunks/{140d0c4285c6978103ea.js → f5ce6af342c02a4b0d15.js} +7 -7
- package/assets/esri/core/workers/chunks/{1cbeac3301b6943bb28a.js → fc07d47d44c04f123650.js} +1 -1
- package/assets/esri/libs/lyr3d/lyr3DMain.wasm +0 -0
- package/assets/esri/libs/lyr3d/lyr3DWorker.wasm +0 -0
- package/assets/esri/themes/base/_core.scss +4 -0
- package/assets/esri/themes/base/widgets/_BasemapGallery.scss +0 -5
- package/assets/esri/themes/base/widgets/_FeatureFormUtilityNetworkAssociationLayers.scss +80 -0
- package/assets/esri/themes/base/widgets/_FeatureFormUtilityNetworkAssociationList.scss +14 -0
- package/assets/esri/themes/base/widgets/_FeatureFormUtilityNetworkAssociationSettings.scss +41 -0
- package/assets/esri/themes/base/widgets/_FilterBuilder.scss +1 -6
- package/assets/esri/themes/dark/main.css +1 -1
- package/assets/esri/themes/light/main.css +1 -1
- package/assets/esri/themes/light/view.css +1 -1
- package/chunks/Bufferer-B-V7yYm-.js +5 -0
- package/chunks/Distance2DCalculator-Coa0qAFt.js +5 -0
- package/chunks/Envelope.js +1 -1
- package/chunks/{GeodeticDistanceCalculator-BsWHOuqE.js → GeodeticDistanceCalculator-D4iQ-_NX.js} +1 -1
- package/chunks/Geometry.js +1 -1
- package/chunks/OperatorClip.js +1 -1
- package/chunks/OperatorCut.js +1 -1
- package/chunks/OperatorGeneralize.js +1 -1
- package/chunks/OperatorGeodesicBuffer.js +1 -1
- package/chunks/OperatorGeodeticArea.js +1 -1
- package/chunks/OperatorGeodeticDistance.js +1 -1
- package/chunks/OperatorMultiPartToSinglePart.js +1 -1
- package/chunks/OperatorProximity.js +1 -1
- package/chunks/OperatorProximityGeodesic.js +1 -1
- package/chunks/OperatorShapePreservingLength.js +1 -1
- package/chunks/OperatorShapePreservingProject.js +1 -1
- package/chunks/Point2D.js +1 -1
- package/chunks/ProjectionTransformation.js +1 -1
- package/chunks/QuadraticBezier.js +1 -1
- package/chunks/ShadowHighlight.glsl.js +2 -4
- package/chunks/SideCalculator2D-BNwb5gvz.js +1 -1
- package/chunks/disjointOperator.js +1 -1
- package/chunks/distanceOperator.js +1 -1
- package/chunks/lyr3DWorker.js +1 -1
- package/core/Accessor.js +1 -1
- package/core/Collection.js +1 -1
- package/core/Logger.js +1 -1
- package/core/ObjectPool.js +1 -1
- package/core/RandomLCG.js +1 -1
- package/core/XHRAdapter.js +1 -1
- package/core/accessorSupport/watch.js +1 -1
- package/core/pbf.js +1 -1
- package/core/sql/UnknownTimeZone.js +1 -1
- package/core/sql.js +1 -1
- package/core/workers/RemoteClient.js +1 -1
- package/editing/sharedTemplates/SharedTemplate.d.ts +4 -0
- package/editing/sharedTemplates/SharedTemplate.js +1 -1
- package/editing/sharedTemplates/SharedTemplateMetadata.js +1 -1
- package/editing/sharedTemplates/SharedTemplateProvider.js +1 -1
- package/editing/sharedTemplates/executor/builders/bufferLineToPolygon.js +1 -1
- package/editing/sharedTemplates/executor/builders/bufferPointToPolygon.js +1 -1
- package/editing/sharedTemplates/executor/builders/bufferPolygonToPolygon.js +1 -1
- package/editing/sharedTemplates/executor/builders/equallySpaced.js +1 -1
- package/editing/sharedTemplates/executor/builders/offsetLine.js +1 -1
- package/editing/sharedTemplates/executor/builders/offsetPrimaryLine.js +1 -1
- package/editing/sharedTemplates/executor/builders/pointAtAllVerticesOfLine.js +1 -1
- package/editing/sharedTemplates/executor/builders/pointAtBeginningOfLine.js +1 -1
- package/editing/sharedTemplates/executor/builders/pointAtBeginningOfRadial.js +1 -1
- package/editing/sharedTemplates/executor/builders/pointAtEndOfLine.js +1 -1
- package/editing/sharedTemplates/executor/builders/pointAtInteriorVertices.js +1 -1
- package/editing/sharedTemplates/executor/builders/pointAtIntersectionVerticesOfLine.js +1 -1
- package/editing/sharedTemplates/executor/builders/pointAtNotBeginningOfLine.js +1 -1
- package/editing/sharedTemplates/executor/builders/pointAtNotEndOfLine.js +1 -1
- package/editing/sharedTemplates/executor/builders/pointAtPolygonCentroid.js +1 -1
- package/editing/sharedTemplates/executor/builders/pointAtPolygonNotStart.js +1 -1
- package/editing/sharedTemplates/executor/builders/pointAtPolygonStart.js +1 -1
- package/editing/sharedTemplates/executor/builders/pointIdentity.js +1 -1
- package/editing/sharedTemplates/executor/builders/pointPrimaryIdentity.js +1 -1
- package/editing/sharedTemplates/executor/builders/polygonBoundary.js +1 -1
- package/editing/sharedTemplates/executor/builders/polygonBoundaryTwoPoint.js +1 -1
- package/editing/sharedTemplates/executor/builders/polygonIdentity.js +1 -1
- package/editing/sharedTemplates/executor/builders/polygonPrimaryIdentity.js +1 -1
- package/editing/sharedTemplates/executor/builders/polygonVertices.js +1 -1
- package/editing/sharedTemplates/executor/builders/support/builderUtils.js +1 -1
- package/editing/sharedTemplates/executor/builders/twoPointLines.js +1 -1
- package/editing/sharedTemplates/executor/createTemplateExecutor.js +1 -1
- package/editing/sharedTemplates/executor/support/createServiceEdit.js +1 -1
- package/editing/sharedTemplates/executor/support/executorUtils.js +1 -1
- package/editing/sharedTemplates/templateDefinitions/GroupTemplateDefinition.js +1 -1
- package/editing/sharedTemplates/templateDefinitions/PresetTemplateDefinition.js +1 -1
- package/editing/sharedTemplates/templateDefinitions/parts/builders/builderUtils.js +1 -1
- package/editing/templateUtils.js +1 -1
- package/geometry/SpatialReference.js +1 -1
- package/geometry/operators/extendOperator.js +1 -1
- package/geometry/operators/gx/operatorAlphaShape.js +1 -1
- package/geometry/operators/gx/operatorAutoComplete.js +1 -1
- package/geometry/operators/gx/operatorBuffer.js +1 -1
- package/geometry/operators/gx/operatorGraphicBuffer.js +1 -1
- package/geometry/operators/gx/operatorIntegrate.js +1 -1
- package/geometry/operators/gx/operatorLabelPoint.js +1 -1
- package/geometry/operators/gx/operatorLinesToPolygons.js +1 -1
- package/geometry/operators/gx/operatorOffset.js +1 -1
- package/geometry/operators/gx/operatorPolygonOverlay.js +1 -1
- package/geometry/operators/gx/operatorSimplify.js +1 -1
- package/geometry/operators/gx/operatorSymmetricDifference.js +1 -1
- package/geometry/operators/gx/operatorUnion.js +1 -1
- package/geometry/operators/isNearOperator.js +1 -1
- package/geometry/operators/json/disjointOperator.js +1 -1
- package/geometry/operators/projectOperator.js +1 -1
- package/geometry/operators/reshapeOperator.js +1 -1
- package/geometry/operators/shapePreservingProjectOperator.js +1 -1
- package/geometry/operators/support/apiConverter.js +1 -1
- package/geometry/operators/support/initNoPeFactory.js +1 -1
- package/geometry/operators/support/jsonConverter.js +1 -1
- package/geometry/support/DoubleArray.js +1 -1
- package/geometry/support/MeshGeoreferencedVertexSpace.js +1 -1
- package/geometry/support/MeshTexture.js +1 -1
- package/geometry/support/MeshTransform.js +1 -1
- package/geometry/support/UCharArray.js +5 -0
- package/geometry/support/UShortArray.js +5 -0
- package/geometry/support/buffer/BufferPool.js +1 -1
- package/geometry/support/buffer/BufferView.js +1 -1
- package/geometry/support/buffer/internals/Mat3.js +1 -1
- package/geometry/support/buffer/internals/Mat4.js +1 -1
- package/geometry/support/buffer/internals/Scalar.js +1 -1
- package/geometry/support/buffer/internals/Vec2.js +1 -1
- package/geometry/support/buffer/internals/Vec3.js +1 -1
- package/geometry/support/buffer/internals/Vec4.js +1 -1
- package/geometry/support/meshUtils/exporters/gltf/glb.js +1 -1
- package/identity/OAuthInfo.js +1 -1
- package/interfaces.d.ts +124 -68
- package/layers/VectorTileLayer.js +1 -1
- package/layers/graphics/controllers/I3SOnDemandController.js +1 -1
- package/layers/mixins/EditBusLayer.js +1 -1
- package/layers/mixins/PublishableLayer.js +1 -1
- package/layers/mixins/operationalLayers.js +1 -1
- package/layers/save/featureLayerUtils.js +1 -1
- package/layers/save/utils.js +1 -1
- package/layers/support/AggregateField.js +1 -1
- package/layers/support/CodedValueDomain.js +1 -1
- package/layers/support/Field.js +1 -1
- package/layers/support/ImageElement.js +1 -1
- package/layers/support/InheritedDomain.js +1 -1
- package/layers/support/LOD.js +1 -1
- package/layers/support/LabelClass.js +1 -1
- package/layers/support/LabelExpressionInfo.js +1 -1
- package/layers/support/OrderByInfo.js +1 -1
- package/layers/support/PurgeOptions.js +1 -1
- package/layers/support/RangeDomain.js +1 -1
- package/layers/support/Sublayer.js +1 -1
- package/layers/support/SubtypeSublayer.js +1 -1
- package/layers/support/TileInfo.js +1 -1
- package/layers/support/TilemapCache.js +1 -1
- package/layers/support/VideoElement.js +1 -1
- package/layers/support/commonProperties.js +1 -1
- package/layers/support/rasterFunctions/stretchUtils.js +1 -1
- package/layers/support/source/DataLayerSource.js +1 -1
- package/layers/support/wmsUtils.js +1 -1
- package/networks/Network.js +1 -1
- package/networks/RulesTable.js +1 -1
- package/networks/UtilityNetwork.js +1 -1
- package/networks/support/typeUtils.js +1 -1
- package/package.json +3 -3
- package/portal/Portal.js +1 -1
- package/renderers/support/RasterSymbolizer.js +1 -1
- package/rest/print.js +1 -1
- package/rest/support/AttachmentQuery.js +1 -1
- package/rest/support/ClosestFacilityParameters.js +1 -1
- package/rest/support/DirectionLine.js +1 -1
- package/rest/support/DirectionPoint.js +1 -1
- package/rest/support/JobInfo.js +1 -1
- package/rest/support/NetworkFeatureSet.js +1 -1
- package/rest/support/PointBarrier.js +1 -1
- package/rest/support/PolygonBarrier.js +1 -1
- package/rest/support/PolylineBarrier.js +1 -1
- package/rest/support/Query.js +1 -1
- package/rest/support/RelationshipQuery.js +1 -1
- package/rest/support/RouteInfo.js +1 -1
- package/rest/support/RouteParameters.js +1 -1
- package/rest/support/ServiceAreaParameters.js +1 -1
- package/rest/support/Stop.js +1 -1
- package/rest/support/TopFeaturesQuery.js +1 -1
- package/support/revision.js +1 -1
- package/symbols/ExtrudeSymbol3DLayer.js +1 -1
- package/symbols/FillSymbol3DLayer.js +1 -1
- package/symbols/IconSymbol3DLayer.js +1 -1
- package/symbols/LineSymbol3DLayer.js +1 -1
- package/symbols/ObjectSymbol3DLayer.js +1 -1
- package/symbols/PathSymbol3DLayer.js +1 -1
- package/symbols/TextSymbol3DLayer.js +1 -1
- package/symbols/WaterSymbol3DLayer.js +1 -1
- package/symbols/cim/OverrideHelper.js +1 -1
- package/symbols/cim/effects/EffectAddControlPoints.js +1 -1
- package/symbols/cim/effects/EffectArrow.js +1 -1
- package/symbols/cim/effects/EffectBuffer.js +1 -1
- package/symbols/cim/effects/EffectControlMeasureLine.js +1 -1
- package/symbols/cim/effects/EffectCut.js +1 -1
- package/symbols/cim/effects/EffectDashes.js +1 -1
- package/symbols/cim/effects/EffectDonut.js +1 -1
- package/symbols/cim/effects/EffectJog.js +1 -1
- package/symbols/cim/effects/EffectMove.js +1 -1
- package/symbols/cim/effects/EffectOffset.js +1 -1
- package/symbols/cim/effects/EffectReverse.js +1 -1
- package/symbols/cim/effects/EffectRotate.js +1 -1
- package/symbols/cim/effects/EffectScale.js +1 -1
- package/symbols/cim/effects/EffectWave.js +1 -1
- package/symbols/cim/placements/PlacementAlongLineSameSize.js +1 -1
- package/symbols/cim/placements/PlacementAtExtremities.js +1 -1
- package/symbols/cim/placements/PlacementAtRatioPositions.js +1 -1
- package/symbols/cim/placements/PlacementInsidePolygon.js +1 -1
- package/symbols/cim/placements/PlacementOnLine.js +1 -1
- package/symbols/cim/placements/PlacementOnVertices.js +1 -1
- package/symbols/cim/placements/PlacementPolygonCenter.js +1 -1
- package/symbols/support/ElevationInfo.js +1 -1
- package/time/TimeExtent.js +1 -1
- package/views/2d/engine/vectorTiles/buckets/SymbolBucket.js +1 -1
- package/views/2d/engine/vectorTiles/expression/expression.js +1 -1
- package/views/2d/engine/vectorTiles/shaders/VTLBackgroundMaterial.js +1 -1
- package/views/2d/engine/vectorTiles/shaders/VTLCircleMaterial.js +1 -1
- package/views/2d/engine/vectorTiles/shaders/VTLFillMaterial.js +1 -1
- package/views/2d/engine/vectorTiles/shaders/VTLLineMaterial.js +1 -1
- package/views/2d/engine/vectorTiles/shaders/VTLMaterial.js +1 -1
- package/views/2d/engine/vectorTiles/shaders/VTLSymbolMaterial.js +1 -1
- package/views/2d/engine/vectorTiles/style/StyleDefinition.js +1 -1
- package/views/2d/engine/webgl/AttributeStoreView.js +1 -1
- package/views/2d/engine/webgl/DisplayEntity.js +1 -1
- package/views/2d/engine/webgl/DisplayRecord.js +1 -1
- package/views/2d/engine/webgl/meshing/Mesh.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/GraphShaderModule.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/graph/ShaderGraphNode.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/graph/glsl.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/line/GradientStrokeTechnique.js +1 -1
- package/views/2d/layers/FeatureLayerView2D.js +1 -1
- package/views/2d/layers/LayerView2D.js +1 -1
- package/views/2d/layers/MapNotesLayerView2D.js +1 -1
- package/views/2d/layers/RouteLayerView2D.js +1 -1
- package/views/2d/layers/features/FeatureContainer.js +1 -1
- package/views/2d/layers/features/FeaturePipelineWorker.js +1 -1
- package/views/2d/layers/features/FeatureStoreQueryAdapter.js +1 -1
- package/views/2d/layers/features/sources/FeatureSource.js +1 -1
- package/views/2d/layers/features/sources/strategies/chunks/Overrides.js +1 -1
- package/views/2d/layers/features/sources/strategies/chunks/SourceChunkStore.js +1 -1
- package/views/2d/layers/features/support/FeatureSetReader.js +1 -1
- package/views/2d/layers/support/HighlightCounter.js +1 -1
- package/views/2d/tiling/TileCoverage.js +1 -1
- package/views/2d/tiling/TileKey.js +1 -1
- package/views/3d/analysis/Slice/SliceTool.js +1 -1
- package/views/3d/environment/ChapmanAtmosphere.js +1 -1
- package/views/3d/environment/SceneViewEnvironment.js +1 -1
- package/views/3d/layers/I3SMeshView3D.js +1 -1
- package/views/3d/layers/MediaLayerView3D.js +1 -1
- package/views/3d/layers/PointCloudLayerView3D.js +1 -1
- package/views/3d/layers/SceneLayerGraphicsView3D.js +1 -1
- package/views/3d/layers/graphics/Graphics3DCore.js +1 -1
- package/views/3d/layers/graphics/Graphics3DIconSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DLineCalloutSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DLineSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DMeshFillSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DPolygonFillSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DWaterSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/GraphicsCorePerformanceInfo.js +1 -1
- package/views/3d/layers/graphics/pipeline/featureSet/TiledFeatureStore.js +1 -1
- package/views/3d/layers/graphics/pipeline/rendering/DirectRenderer.js +1 -1
- package/views/3d/layers/graphics/pipeline/rendering/FeaturePipelineRenderManager.js +1 -1
- package/views/3d/layers/graphics/pipeline/rendering/LodRenderer.js +1 -1
- package/views/3d/layers/graphics/pipeline/rendering/RenderCommandEncoder.js +1 -1
- package/views/3d/layers/graphics/pipeline/symbolization/TestObjectSymbol.js +1 -1
- package/views/3d/layers/i3s/I3SBinaryReader.js +1 -1
- package/views/3d/layers/i3s/I3SClientMaterialUtil.js +1 -1
- package/views/3d/layers/i3s/I3SIndex.js +1 -1
- package/views/3d/layers/i3s/I3SNodeLoader.js +1 -1
- package/views/3d/layers/i3s/PointCloudWorkerUtil.js +1 -1
- package/views/3d/layers/support/DefinitionExpressionSceneLayerView.js +1 -1
- package/views/3d/layers/support/HeatmapFeatureProcessor.js +1 -1
- package/views/3d/state/Frustum.js +1 -1
- package/views/3d/support/DisplayQualityProfile.js +1 -1
- package/views/3d/support/QualitySettings.js +1 -1
- package/views/3d/terrain/OverlayManager.js +1 -1
- package/views/3d/terrain/TerrainSurface.js +1 -1
- package/views/3d/terrain/TextureFader.js +1 -1
- package/views/3d/terrain/TilingScheme.js +1 -1
- package/views/3d/webgl-engine/collections/Component/ComponentIntersectionData.js +1 -1
- package/views/3d/webgl-engine/effects/haze/Haze.js +1 -1
- package/views/3d/webgl-engine/lib/DepthRange.js +1 -1
- package/views/3d/webgl-engine/lib/Octree.js +1 -1
- package/views/3d/webgl-engine/lib/ShadowAccumulator.js +1 -1
- package/views/3d/webgl-engine/lib/ShadowMap.js +1 -1
- package/views/3d/webgl-engine/lib/TextTextureAtlas.js +1 -1
- package/views/3d/webgl-engine/lib/Texture.js +1 -1
- package/views/3d/webgl-engine/lib/ViewshedShadowMap.js +1 -1
- package/views/3d/webgl-engine/lib/edgeRendering/edgeBufferWriters.js +1 -1
- package/views/3d/webgl-engine/lib/lodRendering/LodResources.js +1 -1
- package/views/3d/webgl-engine/lib/textureUtils.js +1 -1
- package/views/3d/webgl-engine/parts/RenderView.js +1 -1
- package/views/SceneView.js +1 -1
- package/views/View.js +1 -1
- package/views/View2D.js +1 -1
- package/views/draw/DrawAction.js +1 -1
- package/views/draw/drawSurfaces.js +1 -1
- package/views/input/BrowserEventSource.js +1 -1
- package/views/interactive/editGeometry/operations/UndoGroup.js +1 -1
- package/views/interactive/snapping/featureSources/sceneLayerSource/SceneLayerSnappingSourceWorker.js +1 -1
- package/views/layers/LayerView.js +1 -1
- package/views/support/Scheduler.js +1 -1
- package/views/support/imageReprojection.js +1 -1
- package/views/webgl/FramebufferObject.js +1 -1
- package/views/webgl/Parameters.js +1 -1
- package/views/webgl/RenderingContext.js +1 -1
- package/views/webgl/ShaderBuilder.js +1 -1
- package/views/webgl/Texture.js +1 -1
- package/webscene/Environment.js +1 -1
- package/webscene/SunLighting.js +1 -1
- package/webscene/VirtualLighting.js +1 -1
- package/widgets/AreaMeasurement2D/AreaMeasurement2DTool.js +1 -1
- package/widgets/AreaMeasurement2D/AreaMeasurement2DViewModel.js +1 -1
- package/widgets/AreaMeasurement2D.js +1 -1
- package/widgets/BatchAttributeForm/BatchAttributeFormViewModel.js +1 -1
- package/widgets/BatchAttributeForm/ReactiveGraphic.js +1 -1
- package/widgets/BatchAttributeForm/inputs/EditableInput.js +1 -1
- package/widgets/BatchAttributeForm/inputs/FieldInput.js +1 -1
- package/widgets/BatchAttributeForm/inputs/GroupInput.js +1 -1
- package/widgets/BatchAttributeForm/inputs/InputBase.js +1 -1
- package/widgets/BatchAttributeForm/inputs/support/inputUtils.js +1 -1
- package/widgets/BatchAttributeForm/templates/support/createBatchFormTemplate.js +1 -1
- package/widgets/BatchAttributeForm.js +1 -1
- package/widgets/BuildingExplorer/BuildingDisciplinesTree/BuildingDisciplinesNode.js +1 -1
- package/widgets/BuildingExplorer/BuildingDisciplinesTree/BuildingDisciplinesTree.js +1 -1
- package/widgets/DistanceMeasurement2D/DistanceMeasurement2DTool.js +1 -1
- package/widgets/DistanceMeasurement2D/DistanceMeasurement2DViewModel.js +1 -1
- package/widgets/DistanceMeasurement2D.js +1 -1
- package/widgets/Editor/AddAssociationWorkflow.js +5 -0
- package/widgets/Editor/AddAssociationWorkflowData.js +5 -0
- package/widgets/Editor/CreateFeaturesWorkflow.js +1 -1
- package/widgets/Editor/CreateFeaturesWorkflowData.js +1 -1
- package/widgets/Editor/EditorViewModel.js +1 -1
- package/widgets/Editor/UpdateRecordWorkflow.js +1 -1
- package/widgets/Editor/UpdateWorkflow.js +1 -1
- package/widgets/Editor/UpdateWorkflowData.js +1 -1
- package/widgets/Editor/components/PendingFeatureList.js +1 -1
- package/widgets/Editor/components/UpdateFeaturePanelContent.js +1 -1
- package/widgets/Editor/modelUploadUtils.js +1 -1
- package/widgets/Editor/workflowUtils.js +1 -1
- package/widgets/Editor.js +1 -1
- package/widgets/Feature/FeatureUtilityNetworkAssociationList.js +1 -1
- package/widgets/Feature/FeatureUtilityNetworkAssociations.js +1 -1
- package/widgets/Feature/FeatureViewModel.js +1 -1
- package/widgets/Feature/support/featureUtils.js +1 -1
- package/widgets/FeatureForm/FeatureFormUtilityNetworkAssociations/FeatureFormUtilityNetworkAssociationList.js +1 -1
- package/widgets/FeatureForm/FeatureFormUtilityNetworkAssociations/UtilityNetworkAssociationItemList.js +5 -0
- package/widgets/FeatureForm/FeatureFormUtilityNetworkAssociations/UtilityNetworkAssociationSettings.js +5 -0
- package/widgets/FeatureForm/FeatureFormViewModel.js +1 -1
- package/widgets/FeatureForm/UtilityNetworkAssociationAddAssociationViewModel.js +5 -0
- package/widgets/FeatureForm/UtilityNetworkAssociationInput.js +1 -1
- package/widgets/FeatureForm.js +1 -1
- package/widgets/FeatureTable/support/FeatureStore.js +1 -1
- package/widgets/LayerList/LayerListItem.js +1 -1
- package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
- package/widgets/OrientedImageryViewer/components/SketchTools.js +1 -1
- package/widgets/OrientedImageryViewer/constants.js +1 -1
- package/widgets/OrientedImageryViewer/galleryUtils.js +5 -0
- package/widgets/OrientedImageryViewer/utils.js +1 -1
- package/widgets/OrientedImageryViewer.js +1 -1
- package/widgets/ScaleRangeSlider/ScaleRanges.js +1 -1
- package/widgets/Search/SearchViewModel.js +1 -1
- package/widgets/Sketch/support/ResponsiveToolbar/OverflowGroup.js +1 -1
- package/widgets/Sketch/support/ResponsiveToolbar/SplitButton.js +1 -1
- package/widgets/Sketch/support/sketchUtils.js +1 -1
- package/widgets/UtilityNetworkAssociations/UtilityNetworkAssociationsViewModel.d.ts +2 -2
- package/widgets/Widget.js +1 -1
- package/widgets/support/FilterBuilder/FilterBuilderViewModel.js +1 -1
- package/widgets/support/FilterBuilder.js +1 -1
- package/widgets/support/FilterCondition/FilterConditionViewModel.js +1 -1
- package/widgets/support/FilterCondition.js +1 -1
- package/widgets/support/UtilityNetworkAssociations/FeatureUtilityNetworkAssociationsViewModel.js +5 -0
- package/widgets/support/UtilityNetworkAssociations/UtilityNetworkAssociationList.js +1 -1
- package/widgets/support/UtilityNetworkAssociations/utilityNetworkUtils.js +1 -1
- package/widgets/support/forms/expressions/FormExpressionArcadeExecutor.js +1 -1
- package/assets/esri/core/workers/chunks/00e0c53d89e074399f04.js +0 -1
- package/assets/esri/core/workers/chunks/08c4b585290efc98ca5d.js +0 -1
- package/assets/esri/core/workers/chunks/117e7a12af77c761efb5.js +0 -1
- package/assets/esri/core/workers/chunks/12d6baeffd55a98a7c75.js +0 -1
- package/assets/esri/core/workers/chunks/207c040b0e42358a5389.js +0 -1
- package/assets/esri/core/workers/chunks/21c12edc0632eb911e73.js +0 -1
- package/assets/esri/core/workers/chunks/24c94f97a76646d415ae.js +0 -1
- package/assets/esri/core/workers/chunks/2611adb4f328f95ee508.js +0 -1
- package/assets/esri/core/workers/chunks/26a2bd432e7a1b3870c3.js +0 -1
- package/assets/esri/core/workers/chunks/2def7db73a776e759dae.js +0 -1
- package/assets/esri/core/workers/chunks/2ff63a71213f618377d6.js +0 -1
- package/assets/esri/core/workers/chunks/324a5547c64a3bae670d.js +0 -1
- package/assets/esri/core/workers/chunks/369a2b8484a8807bde38.js +0 -1
- package/assets/esri/core/workers/chunks/44abd2cd17aae3299ede.js +0 -1
- package/assets/esri/core/workers/chunks/4b56c0c109e10d7409b8.js +0 -1
- package/assets/esri/core/workers/chunks/5660f13d78e9e4240034.js +0 -1
- package/assets/esri/core/workers/chunks/568bcf809fcfd4d9c713.js +0 -1
- package/assets/esri/core/workers/chunks/5be7cf1564e756c24066.js +0 -1
- package/assets/esri/core/workers/chunks/5e889a675cbaff03ad5a.js +0 -1
- package/assets/esri/core/workers/chunks/61795bde00f2e16d04f1.js +0 -1
- package/assets/esri/core/workers/chunks/62a1d60ad4bf6469c4dd.js +0 -1
- package/assets/esri/core/workers/chunks/6d79ec15d1858839f576.js +0 -1
- package/assets/esri/core/workers/chunks/6ea02ff25f051c08e6c3.js +0 -1
- package/assets/esri/core/workers/chunks/7966c245a073c85f04b1.js +0 -1
- package/assets/esri/core/workers/chunks/7bf08823f861628144a1.js +0 -1
- package/assets/esri/core/workers/chunks/86149b4a5a148744c7d1.js +0 -1
- package/assets/esri/core/workers/chunks/8bd51b5b392dfacc922f.js +0 -1
- package/assets/esri/core/workers/chunks/9b2fab133786e5d47631.js +0 -1
- package/assets/esri/core/workers/chunks/9bfb091cec7eed6c8111.js +0 -1
- package/assets/esri/core/workers/chunks/9c6380af3bc3130658e1.js +0 -1
- package/assets/esri/core/workers/chunks/a2409d4921c02614169a.js +0 -1
- package/assets/esri/core/workers/chunks/b18620fc15707e4413a1.js +0 -1
- package/assets/esri/core/workers/chunks/b1baf39daf5725404be5.js +0 -1
- package/assets/esri/core/workers/chunks/b43d88b6e7dc4ab13599.js +0 -1
- package/assets/esri/core/workers/chunks/b765670b47d209d7655a.js +0 -2
- package/assets/esri/core/workers/chunks/b9d9a1dc3c5d799e2685.js +0 -1
- package/assets/esri/core/workers/chunks/c1970657a287ec96001e.js +0 -1
- package/assets/esri/core/workers/chunks/c249ad935f54d3b49ae3.js +0 -1
- package/assets/esri/core/workers/chunks/cc75bbfd779f409943a3.js +0 -1
- package/assets/esri/core/workers/chunks/d27a199fd8e2ade69254.js +0 -1
- package/assets/esri/core/workers/chunks/d35efcbe439500bf18bc.js +0 -1
- package/assets/esri/core/workers/chunks/d599ba865da87b487b1b.js +0 -1
- package/assets/esri/core/workers/chunks/da1157e288dbc6ba842a.js +0 -1
- package/assets/esri/core/workers/chunks/ddc30044f61a2c2df3fe.js +0 -1
- package/assets/esri/core/workers/chunks/e37e5d2e233d7f6ccd52.js +0 -314
- package/assets/esri/core/workers/chunks/f14b318bab5efcf43419.js +0 -1
- package/assets/esri/core/workers/chunks/f29715459ecd46180829.js +0 -1
- package/assets/esri/core/workers/chunks/f4e48bbdbc9da10ec71a.js +0 -1
- package/assets/esri/core/workers/chunks/f62f657f9fef28f492e0.js +0 -1
- package/assets/esri/core/workers/chunks/f9070edd8e0b2a57af79.js +0 -1
- package/assets/esri/core/workers/chunks/faf9063420262ea40fd8.js +0 -1
- package/chunks/Bufferer-DjC-SKTJ.js +0 -5
- package/chunks/Distance2DCalculator-8-JrFGHH.js +0 -5
- package/editing/sharedTemplates/support/sharedTemplateUtils.js +0 -5
- package/widgets/FeatureForm/FeatureFormUtilityNetworkAssociations/FeatureFormUtilityNetworkAssociationSettings.js +0 -5
- package/widgets/support/UtilityNetworkAssociations/UtilityNetworkAssociationsViewModel.d.ts +0 -4
- package/widgets/support/UtilityNetworkAssociations/UtilityNetworkAssociationsViewModel.js +0 -5
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{invert as e,translate as i}from"../core/libs/gl-matrix-2/math/mat4.js";import{create as t}from"../core/libs/gl-matrix-2/factories/mat4f64.js";import{n as o,t as r}from"./vec32.js";import{create as a}from"../core/libs/gl-matrix-2/factories/vec3f64.js";import{NormalFromDepth as
|
|
5
|
+
import{invert as e,translate as i}from"../core/libs/gl-matrix-2/math/mat4.js";import{create as t}from"../core/libs/gl-matrix-2/factories/mat4f64.js";import{n as o,t as r}from"./vec32.js";import{create as a}from"../core/libs/gl-matrix-2/factories/vec3f64.js";import{NormalFromDepth as l}from"../views/3d/webgl-engine/core/shaderLibrary/NormalFromDepth.glsl.js";import{ScreenSpacePass as h}from"../views/3d/webgl-engine/core/shaderLibrary/ScreenSpacePass.glsl.js";import{ReadShadowMapPass as s}from"../views/3d/webgl-engine/core/shaderLibrary/shading/ReadShadowMap.glsl.js";import{RgbaFloatEncoding as n}from"../views/3d/webgl-engine/core/shaderLibrary/util/RgbaFloatEncoding.glsl.js";import{Float3BindUniform as d}from"../views/3d/webgl-engine/core/shaderModules/Float3BindUniform.js";import{Float4PassUniform as g}from"../views/3d/webgl-engine/core/shaderModules/Float4PassUniform.js";import{FloatPassUniform as c}from"../views/3d/webgl-engine/core/shaderModules/FloatPassUniform.js";import{glsl as p}from"../views/3d/webgl-engine/core/shaderModules/glsl.js";import{Matrix4BindUniform as w}from"../views/3d/webgl-engine/core/shaderModules/Matrix4BindUniform.js";import{Texture2DBindUniform as m}from"../views/3d/webgl-engine/core/shaderModules/Texture2DBindUniform.js";import{Texture2DPassUniform as u}from"../views/3d/webgl-engine/core/shaderModules/Texture2DPassUniform.js";import{SnapshotSlot as f}from"../views/3d/webgl-engine/lib/ShadowMap.js";import{ReadShadowMapConfiguration as v}from"../views/3d/webgl-engine/shaders/ReadShadowMapConfiguration.js";import{ShaderBuilder as x}from"../views/webgl/ShaderBuilder.js";const b=.025;function M(){const t=new x;t.include(s,D),t.include(h),t.include(l);const a=t.fragment;return a.include(n),a.uniforms.add(new m("defaultDepthTex",(e=>e.shadowMap.getSnapshot(f.ExcludeHighlight))),new m("highlightDepthTex",(e=>e.shadowMap.getSnapshot(f.Highlight))),new m("depthMap",(e=>e.depth?.attachment)),new u("highlightTexture",(e=>e.highlight)),new g("uColor",(e=>e.shadowColor)),new c("opacity",(e=>e.shadowOpacity)),new c("occludedOpacity",(e=>e.occludedShadowOpacity)),new c("terminationFactor",(e=>e.opacityElevation*e.dayNightTerminator)),new d("lightingMainDirectionView",(({lighting:e,camera:i})=>o(y,r(y,e.mainLight.direction,i.viewInverseTransposeMatrix)))),new w("inverseViewMatrix",(({camera:t})=>e(S,i(S,t.viewMatrix,t.center))))).main.add(p`
|
|
6
6
|
ivec2 highlightTextureSize = textureSize(highlightTexture, 0);
|
|
7
7
|
ivec2 highlightIUV = ivec2(uv * vec2(highlightTextureSize));
|
|
8
8
|
vec4 highlightInfo = texelFetch(highlightTexture, highlightIUV, 0);
|
|
@@ -12,9 +12,7 @@ import{invert as e,translate as i}from"../core/libs/gl-matrix-2/math/mat4.js";im
|
|
|
12
12
|
// Calculate bit mask to check if pixel is highlit unoccluded at any level
|
|
13
13
|
int ored =
|
|
14
14
|
(int(highlightInfo.r*255.0) << 0)
|
|
15
|
-
| (int(highlightInfo.g*255.0) << 8)
|
|
16
|
-
| (int(highlightInfo.b*255.0) << 16)
|
|
17
|
-
| (int(highlightInfo.a*255.0) << 24);
|
|
15
|
+
| (int(highlightInfo.g*255.0) << 8);
|
|
18
16
|
bool visiblyHighlighted = ((ored & ~(ored >> 1)) & (1+4+16+64)) != 0;
|
|
19
17
|
if (visiblyHighlighted) {
|
|
20
18
|
return;
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{P as e}from"./Point2D.js";import{f as t,G as n,t as r}from"./Geometry.js";import{Envelope2D as o}from"./Envelope2D.js";import{i}from"./ProjectionTransformation.js";function s(){return g(new e,-1,Number.NaN)}function g(e,t,n){return{m_coordinate:e.clone(),m_vertexIndex:t,m_geometryIndex:0,m_distance:n,m_bRightSide:!1,isEmpty:u}}function u(){return Number.isNaN(this.m_distance)}function c(e,r,i=-1,s=-1){if(e.isEmpty())return 3;const g=e.getGeometryType();if(t(g))return a(e,r,i,s);if(g===n.enumPolygon)return f(e,r,i,s);if(g===n.enumPolyline)return m(e,r,i,s);if(g===n.enumEnvelope){const t=new o;return e.queryEnvelope(t),t.contains(r)?t.containsExclusive(r)?1:2:0}return 3}function a(t,n,o,i){if(o>=0||i>=0)return r("");if(t.isDegenerate(0))return t.getStartXY().equals(n)?2:3;if(!t.isCurve()){const r=e.orientationRobust(n,t.getStartXY(),t.getEndXY());return r<0?1:r>0?0:2}const s=t.getClosestCoordinate(n,!1),g=t.getTangent(s),u=t.getCoord2D(s),c=e.orientationRobust(n,u,u.add(g));return c<0?1:c>0?0:2}function f(e,t,n,s){(n>=0||s>=0)&&r("");const g=new o;e.queryEnvelope(g);const u=i(e,t,0);return 0===u?0:1===u?1:2}function m(t,n,o,i){(o<0&&i>=0||o>=0&&i<0)&&r("");const s=t.querySegmentIterator();if(o<0){let t=Number.MAX_VALUE,r=0;for(;s.nextPath();)for(;s.hasNextSegment();){const g=s.nextSegment(),u=g.getClosestCoordinate(n,!1),c=g.getCoord2D(u),a=e.sqrDistance(c,n);a<t?(r=1,o=s.getStartPointIndex(),i=s.getPathIndex(),t=a):a===t&&r++}if(0===r)return 3;if(1===r){s.resetToVertex(o,i);return c(s.nextSegment(),n)}}const g=h(n,s,o,i);if(-1!==g.i1&&-1===g.i2)return g.bRight1?1:0;if(-1!==g.i1&&-1!==g.i2){if(g.bRight1===g.bRight2)return g.bRight1?1:0;{s.resetToVertex(g.i1,-1);const e=s.nextSegment().getTangent(1);s.resetToVertex(g.i2,-1);const t=s.nextSegment().getTangent(0);return e.crossProduct(t)>=0?1:0}}s.resetToVertex(o,i);return c(s.nextSegment(),n)}function x(e,t,n){for(e.resetToVertex(t,n);e.hasNextSegment();){if(!e.nextSegment().isDegenerate(0))return e.getStartPointIndex()}for(e.resetToVertex(t,n);e.hasPreviousSegment();){if(!e.previousSegment().isDegenerate(0))return e.getStartPointIndex()}return-1}function S(e,t){for(e.resetToVertex(t,-1),e.nextSegment();e.hasNextSegment();){if(!e.nextSegment().isDegenerate(0))return e.getStartPointIndex()}return-1}function d(e,t){for(e.resetToVertex(t,-1);e.hasPreviousSegment();){if(!e.previousSegment().isDegenerate(0))return e.getStartPointIndex()}return-1}function h(t,n,r,o){const i={i1:-1,i2:-1,bRight1:!1,bRight2:!1};if(i.i1=x(n,r,o),-1!==i.i1){n.resetToVertex(i.i1,-1);const r=n.nextSegment(),o=r.getClosestCoordinate(t,!1),s=r.getCoord2D(o),g=e.sqrDistance(s,t);{const e=s.clone();e.subThis(r.getStartXY());const n=t.clone();n.subThis(r.getStartXY()),i.bRight1=e.crossProduct(n)<0}if(i.i2=S(n,i.i1),-1!==i.i2){n.resetToVertex(i.i2,-1);const r=n.nextSegment(),o=r.getClosestCoordinate(t,!1),s=r.getCoord2D(o);if(e.sqrDistance(s,t)>g)i.i2=-1;else{const e=s.clone();e.subThis(r.getStartXY());const n=t.clone();n.subThis(r.getStartXY()),i.bRight2=e.crossProduct(n)<0}}if(-1===i.i2&&(i.i2=d(n,i.i1),-1!==i.i2)){n.resetToVertex(i.i2,-1);const r=n.nextSegment(),o=r.getClosestCoordinate(t,!1),s=r.getCoord2D(o);if(e.sqrDistance(s,t)>g)i.i2=-1;else{const e=s.clone();e.subThis(r.getStartXY());const n=t.clone();n.subThis(r.getStartXY()),i.bRight2=e.crossProduct(n)<0;const o=i.i1;i.i1=i.i2,i.i2=o;const g=i.bRight1;i.bRight1=i.bRight2,i.bRight2=g}}}return i}export{g as a,c,s as m};
|
|
5
|
+
import{P as e}from"./Point2D.js";import{f as t,G as n,t as r}from"./Geometry.js";import{Envelope2D as o}from"./Envelope2D.js";import{g as i}from"./ProjectionTransformation.js";function s(){return g(new e,-1,Number.NaN)}function g(e,t,n){return{m_coordinate:e.clone(),m_vertexIndex:t,m_geometryIndex:0,m_distance:n,m_bRightSide:!1,isEmpty:u}}function u(){return Number.isNaN(this.m_distance)}function c(e,r,i=-1,s=-1){if(e.isEmpty())return 3;const g=e.getGeometryType();if(t(g))return a(e,r,i,s);if(g===n.enumPolygon)return f(e,r,i,s);if(g===n.enumPolyline)return m(e,r,i,s);if(g===n.enumEnvelope){const t=new o;return e.queryEnvelope(t),t.contains(r)?t.containsExclusive(r)?1:2:0}return 3}function a(t,n,o,i){if(o>=0||i>=0)return r("");if(t.isDegenerate(0))return t.getStartXY().equals(n)?2:3;if(!t.isCurve()){const r=e.orientationRobust(n,t.getStartXY(),t.getEndXY());return r<0?1:r>0?0:2}const s=t.getClosestCoordinate(n,!1),g=t.getTangent(s),u=t.getCoord2D(s),c=e.orientationRobust(n,u,u.add(g));return c<0?1:c>0?0:2}function f(e,t,n,s){(n>=0||s>=0)&&r("");const g=new o;e.queryEnvelope(g);const u=i(e,t,0);return 0===u?0:1===u?1:2}function m(t,n,o,i){(o<0&&i>=0||o>=0&&i<0)&&r("");const s=t.querySegmentIterator();if(o<0){let t=Number.MAX_VALUE,r=0;for(;s.nextPath();)for(;s.hasNextSegment();){const g=s.nextSegment(),u=g.getClosestCoordinate(n,!1),c=g.getCoord2D(u),a=e.sqrDistance(c,n);a<t?(r=1,o=s.getStartPointIndex(),i=s.getPathIndex(),t=a):a===t&&r++}if(0===r)return 3;if(1===r){s.resetToVertex(o,i);return c(s.nextSegment(),n)}}const g=h(n,s,o,i);if(-1!==g.i1&&-1===g.i2)return g.bRight1?1:0;if(-1!==g.i1&&-1!==g.i2){if(g.bRight1===g.bRight2)return g.bRight1?1:0;{s.resetToVertex(g.i1,-1);const e=s.nextSegment().getTangent(1);s.resetToVertex(g.i2,-1);const t=s.nextSegment().getTangent(0);return e.crossProduct(t)>=0?1:0}}s.resetToVertex(o,i);return c(s.nextSegment(),n)}function x(e,t,n){for(e.resetToVertex(t,n);e.hasNextSegment();){if(!e.nextSegment().isDegenerate(0))return e.getStartPointIndex()}for(e.resetToVertex(t,n);e.hasPreviousSegment();){if(!e.previousSegment().isDegenerate(0))return e.getStartPointIndex()}return-1}function S(e,t){for(e.resetToVertex(t,-1),e.nextSegment();e.hasNextSegment();){if(!e.nextSegment().isDegenerate(0))return e.getStartPointIndex()}return-1}function d(e,t){for(e.resetToVertex(t,-1);e.hasPreviousSegment();){if(!e.previousSegment().isDegenerate(0))return e.getStartPointIndex()}return-1}function h(t,n,r,o){const i={i1:-1,i2:-1,bRight1:!1,bRight2:!1};if(i.i1=x(n,r,o),-1!==i.i1){n.resetToVertex(i.i1,-1);const r=n.nextSegment(),o=r.getClosestCoordinate(t,!1),s=r.getCoord2D(o),g=e.sqrDistance(s,t);{const e=s.clone();e.subThis(r.getStartXY());const n=t.clone();n.subThis(r.getStartXY()),i.bRight1=e.crossProduct(n)<0}if(i.i2=S(n,i.i1),-1!==i.i2){n.resetToVertex(i.i2,-1);const r=n.nextSegment(),o=r.getClosestCoordinate(t,!1),s=r.getCoord2D(o);if(e.sqrDistance(s,t)>g)i.i2=-1;else{const e=s.clone();e.subThis(r.getStartXY());const n=t.clone();n.subThis(r.getStartXY()),i.bRight2=e.crossProduct(n)<0}}if(-1===i.i2&&(i.i2=d(n,i.i1),-1!==i.i2)){n.resetToVertex(i.i2,-1);const r=n.nextSegment(),o=r.getClosestCoordinate(t,!1),s=r.getCoord2D(o);if(e.sqrDistance(s,t)>g)i.i2=-1;else{const e=s.clone();e.subThis(r.getStartXY());const n=t.clone();n.subThis(r.getStartXY()),i.bRight2=e.crossProduct(n)<0;const o=i.i1;i.i1=i.i2,i.i2=o;const g=i.bRight1;i.bRight1=i.bRight2,i.bRight2=g}}}return i}export{g as a,c,s as m};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{
|
|
5
|
+
import{b as e}from"./ProjectionTransformation.js";import{getSpatialReference as r,fromGeometry as t,fromSpatialReference as o}from"../geometry/operators/support/apiConverter.js";const s=new e;function a(e){const a=r(e);return s.accelerateGeometry(t(e),o(a),1)}function n(e,r){return s.execute(t(e),t(r),o(e.spatialReference))}const c=s.supportsCurves(),p=Object.freeze(Object.defineProperty({__proto__:null,accelerateGeometry:a,execute:n,supportsCurves:c},Symbol.toStringTag,{value:"Module"}));export{a,p as d,n as e,c as s};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{d as e}from"./Geometry.js";import{D as r}from"./Distance2DCalculator-
|
|
5
|
+
import{d as e}from"./Geometry.js";import{D as r}from"./Distance2DCalculator-Coa0qAFt.js";import{convertFromSpatialReferenceUnit as t}from"../core/unitUtils.js";import{fromGeometry as o,getSpatialReference as u}from"../geometry/operators/support/apiConverter.js";class s{getOperatorType(){return 10100}supportsCurves(){return!0}accelerateGeometry(e,r,t){return!1}canAccelerateGeometry(e){return!1}execute(e,r,t){return this.executeEx(e,r,t,null,null,Number.NaN)}executeEx(t,o,u,s,n,a){if(t.isEmpty()||o.isEmpty())return Number.NaN;e(t),e(o);const c=t,i=o;Number.isNaN(a)&&(a=Number.POSITIVE_INFINITY);const m=new r(a,u).calculate(c,i,s,n);return Number.isFinite(m)?m:Number.NaN}}const n=new s;function a(e,r,s={}){const{unit:a}=s;let c=n.execute(o(e),o(r),null);if(c&&a){const r=u(e);c=t(c,r,a)}return c}const c=n.supportsCurves(),i=Object.freeze(Object.defineProperty({__proto__:null,execute:a,supportsCurves:c},Symbol.toStringTag,{value:"Module"}));export{i as d,a as e,c as s};
|
package/chunks/lyr3DWorker.js
CHANGED
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{c as r,g as e}from"./_commonjsHelpers.js";var t,n={exports:{}};function o(){return t||(t=1,e=n,o="undefined"!=typeof document?document.currentScript?.src:void 0,a=function(e={}){var t,n,a,i,s=e,l=new Promise(((r,e)=>{t=r,n=e})),u=Object.assign({},s),d="./this.program",c=(r,e)=>{throw e},f="";function h(r){return s.locateFile?s.locateFile(r,f):f+r}"undefined"!=typeof document&&document.currentScript&&(f=document.currentScript.src),o&&(f=o),f=f.startsWith("blob:")?"":f.substr(0,f.replace(/[?#].*/,"").lastIndexOf("/")+1),a=r=>fetch(r,{credentials:"same-origin"}).then((r=>r.ok?r.arrayBuffer():Promise.reject(new Error(r.status+" : "+r.url))));var m=s.print||console.log.bind(console),p=s.printErr||console.error.bind(console);Object.assign(s,u),u=null,s.arguments&&s.arguments,s.thisProgram&&(d=s.thisProgram);var v,w,y,g,E,_,b,k,F,P=s.wasmBinary,A=!1;function S(){var r=v.buffer;s.HEAP8=w=new Int8Array(r),s.HEAP16=g=new Int16Array(r),s.HEAPU8=y=new Uint8Array(r),s.HEAPU16=E=new Uint16Array(r),s.HEAP32=_=new Int32Array(r),s.HEAPU32=b=new Uint32Array(r),s.HEAPF32=k=new Float32Array(r),s.HEAPF64=F=new Float64Array(r)}var D=[],$=[],C=[];function T(){if(s.preRun)for("function"==typeof s.preRun&&(s.preRun=[s.preRun]);s.preRun.length;)x(s.preRun.shift());tr(D)}function j(){s.noFSInit||jr.initialized||jr.init(),jr.ignorePermissions=!1,tr($)}function M(){if(s.postRun)for("function"==typeof s.postRun&&(s.postRun=[s.postRun]);s.postRun.length;)N(s.postRun.shift());tr(C)}function x(r){D.unshift(r)}function R(r){$.unshift(r)}function N(r){C.unshift(r)}var z=0,W=null;function O(r){return r}function U(r){z++,s.monitorRunDependencies?.(z)}function B(r){if(z--,s.monitorRunDependencies?.(z),0==z&&W){var e=W;W=null,e()}}function L(r){s.onAbort?.(r),p(r="Aborted("+r+")"),A=!0,r+=". Build with -sASSERTIONS for more info.";var e=new WebAssembly.RuntimeError(r);throw n(e),e}var I,H,V,q="data:application/octet-stream;base64,",X=r=>r.startsWith(q);function G(){var r="lyr3DWorker.wasm";return X(r)?r:h(r)}function K(r){if(r==I&&P)return new Uint8Array(P);throw"both async and sync fetching of the wasm failed"}function Y(r){return P?Promise.resolve().then((()=>K(r))):a(r).then((r=>new Uint8Array(r)),(()=>K(r)))}function J(r,e,t){return Y(r).then((r=>WebAssembly.instantiate(r,e))).then(t,(r=>{p(`failed to asynchronously prepare wasm: ${r}`),L(r)}))}function Q(r,e,t,n){return r||"function"!=typeof WebAssembly.instantiateStreaming||X(e)||"function"!=typeof fetch?J(e,t,n):fetch(e,{credentials:"same-origin"}).then((r=>WebAssembly.instantiateStreaming(r,t).then(n,(function(r){return p(`wasm streaming compile failed: ${r}`),p("falling back to ArrayBuffer instantiation"),J(e,t,n)}))))}function Z(){return{a:nn}}function rr(){function r(r,e){return on=r.exports,v=on._,S(),ye=on.ba,R(on.$),B(),on}function e(e){r(e.instance)}U();var t=Z();if(s.instantiateWasm)try{return s.instantiateWasm(t,r)}catch(o){p(`Module.instantiateWasm callback failed with error: ${o}`),n(o)}return I??=G(),Q(P,I,t,e).catch(n),{}}class er{name="ExitStatus";constructor(r){this.message=`Program terminated with exit(${r})`,this.status=r}}var tr=r=>{for(;r.length>0;)r.shift()(s)},nr=s.noExitRuntime||!0,or=r=>dn(r),ar=()=>cn();class ir{constructor(r){this.excPtr=r,this.ptr=r-24}set_type(r){b[this.ptr+4>>2]=r}get_type(){return b[this.ptr+4>>2]}set_destructor(r){b[this.ptr+8>>2]=r}get_destructor(){return b[this.ptr+8>>2]}set_caught(r){r=r?1:0,w[this.ptr+12]=r}get_caught(){return 0!=w[this.ptr+12]}set_rethrown(r){r=r?1:0,w[this.ptr+13]=r}get_rethrown(){return 0!=w[this.ptr+13]}init(r,e){this.set_adjusted_ptr(0),this.set_type(r),this.set_destructor(e)}set_adjusted_ptr(r){b[this.ptr+16>>2]=r}get_adjusted_ptr(){return b[this.ptr+16>>2]}}var sr=(r,e,t)=>{throw new ir(r).init(e,t),r},lr=()=>{var r=_[+xr.varargs>>2];return xr.varargs+=4,r},ur=lr,dr={isAbs:r=>"/"===r.charAt(0),splitPath:r=>/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(r).slice(1),normalizeArray:(r,e)=>{for(var t=0,n=r.length-1;n>=0;n--){var o=r[n];"."===o?r.splice(n,1):".."===o?(r.splice(n,1),t++):t&&(r.splice(n,1),t--)}if(e)for(;t;t--)r.unshift("..");return r},normalize:r=>{var e=dr.isAbs(r),t="/"===r.substr(-1);return(r=dr.normalizeArray(r.split("/").filter((r=>!!r)),!e).join("/"))||e||(r="."),r&&t&&(r+="/"),(e?"/":"")+r},dirname:r=>{var e=dr.splitPath(r),t=e[0],n=e[1];return t||n?(n&&(n=n.substr(0,n.length-1)),t+n):"."},basename:r=>{if("/"===r)return"/";var e=(r=(r=dr.normalize(r)).replace(/\/$/,"")).lastIndexOf("/");return-1===e?r:r.substr(e+1)},join:(...r)=>dr.normalize(r.join("/")),join2:(r,e)=>dr.normalize(r+"/"+e)},cr=()=>{if("object"==typeof crypto&&"function"==typeof crypto.getRandomValues)return r=>crypto.getRandomValues(r);L("initRandomDevice")},fr=r=>(fr=cr())(r),hr={resolve:(...r)=>{for(var e="",t=!1,n=r.length-1;n>=-1&&!t;n--){var o=n>=0?r[n]:jr.cwd();if("string"!=typeof o)throw new TypeError("Arguments to path.resolve must be strings");if(!o)return"";e=o+"/"+e,t=dr.isAbs(o)}return(t?"/":"")+(e=dr.normalizeArray(e.split("/").filter((r=>!!r)),!t).join("/"))||"."},relative:(r,e)=>{function t(r){for(var e=0;e<r.length&&""===r[e];e++);for(var t=r.length-1;t>=0&&""===r[t];t--);return e>t?[]:r.slice(e,t-e+1)}r=hr.resolve(r).substr(1),e=hr.resolve(e).substr(1);for(var n=t(r.split("/")),o=t(e.split("/")),a=Math.min(n.length,o.length),i=a,s=0;s<a;s++)if(n[s]!==o[s]){i=s;break}var l=[];for(s=i;s<n.length;s++)l.push("..");return(l=l.concat(o.slice(i))).join("/")}},mr="undefined"!=typeof TextDecoder?new TextDecoder:void 0,pr=(r,e=0,t=NaN)=>{for(var n=e+t,o=e;r[o]&&!(o>=n);)++o;if(o-e>16&&r.buffer&&mr)return mr.decode(r.subarray(e,o));for(var a="";e<o;){var i=r[e++];if(128&i){var s=63&r[e++];if(192!=(224&i)){var l=63&r[e++];if((i=224==(240&i)?(15&i)<<12|s<<6|l:(7&i)<<18|s<<12|l<<6|63&r[e++])<65536)a+=String.fromCharCode(i);else{var u=i-65536;a+=String.fromCharCode(55296|u>>10,56320|1023&u)}}else a+=String.fromCharCode((31&i)<<6|s)}else a+=String.fromCharCode(i)}return a},vr=[],wr=r=>{for(var e=0,t=0;t<r.length;++t){var n=r.charCodeAt(t);n<=127?e++:n<=2047?e+=2:n>=55296&&n<=57343?(e+=4,++t):e+=3}return e},yr=(r,e,t,n)=>{if(!(n>0))return 0;for(var o=t,a=t+n-1,i=0;i<r.length;++i){var s=r.charCodeAt(i);if(s>=55296&&s<=57343&&(s=65536+((1023&s)<<10)|1023&r.charCodeAt(++i)),s<=127){if(t>=a)break;e[t++]=s}else if(s<=2047){if(t+1>=a)break;e[t++]=192|s>>6,e[t++]=128|63&s}else if(s<=65535){if(t+2>=a)break;e[t++]=224|s>>12,e[t++]=128|s>>6&63,e[t++]=128|63&s}else{if(t+3>=a)break;e[t++]=240|s>>18,e[t++]=128|s>>12&63,e[t++]=128|s>>6&63,e[t++]=128|63&s}}return e[t]=0,t-o};function gr(r,e,t){var n=wr(r)+1,o=new Array(n),a=yr(r,o,0,o.length);return o.length=a,o}var Er=()=>{if(!vr.length){var r=null;if("undefined"!=typeof window&&"function"==typeof window.prompt&&null!==(r=window.prompt("Input: "))&&(r+="\n"),!r)return null;vr=gr(r)}return vr.shift()},_r={ttys:[],init(){},shutdown(){},register(r,e){_r.ttys[r]={input:[],output:[],ops:e},jr.registerDevice(r,_r.stream_ops)},stream_ops:{open(r){var e=_r.ttys[r.node.rdev];if(!e)throw new jr.ErrnoError(43);r.tty=e,r.seekable=!1},close(r){r.tty.ops.fsync(r.tty)},fsync(r){r.tty.ops.fsync(r.tty)},read(r,e,t,n,o){if(!r.tty||!r.tty.ops.get_char)throw new jr.ErrnoError(60);for(var a=0,i=0;i<n;i++){var s;try{s=r.tty.ops.get_char(r.tty)}catch(l){throw new jr.ErrnoError(29)}if(void 0===s&&0===a)throw new jr.ErrnoError(6);if(null==s)break;a++,e[t+i]=s}return a&&(r.node.timestamp=Date.now()),a},write(r,e,t,n,o){if(!r.tty||!r.tty.ops.put_char)throw new jr.ErrnoError(60);try{for(var a=0;a<n;a++)r.tty.ops.put_char(r.tty,e[t+a])}catch(i){throw new jr.ErrnoError(29)}return n&&(r.node.timestamp=Date.now()),a}},default_tty_ops:{get_char:r=>Er(),put_char(r,e){null===e||10===e?(m(pr(r.output)),r.output=[]):0!=e&&r.output.push(e)},fsync(r){r.output&&r.output.length>0&&(m(pr(r.output)),r.output=[])},ioctl_tcgets:r=>({c_iflag:25856,c_oflag:5,c_cflag:191,c_lflag:35387,c_cc:[3,28,127,21,4,0,1,0,17,19,26,0,18,15,23,22,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]}),ioctl_tcsets:(r,e,t)=>0,ioctl_tiocgwinsz:r=>[24,80]},default_tty1_ops:{put_char(r,e){null===e||10===e?(p(pr(r.output)),r.output=[]):0!=e&&r.output.push(e)},fsync(r){r.output&&r.output.length>0&&(p(pr(r.output)),r.output=[])}}},br=(r,e)=>Math.ceil(r/e)*e,kr=r=>{L()},Fr={ops_table:null,mount:r=>Fr.createNode(null,"/",16895,0),createNode(r,e,t,n){if(jr.isBlkdev(t)||jr.isFIFO(t))throw new jr.ErrnoError(63);Fr.ops_table||={dir:{node:{getattr:Fr.node_ops.getattr,setattr:Fr.node_ops.setattr,lookup:Fr.node_ops.lookup,mknod:Fr.node_ops.mknod,rename:Fr.node_ops.rename,unlink:Fr.node_ops.unlink,rmdir:Fr.node_ops.rmdir,readdir:Fr.node_ops.readdir,symlink:Fr.node_ops.symlink},stream:{llseek:Fr.stream_ops.llseek}},file:{node:{getattr:Fr.node_ops.getattr,setattr:Fr.node_ops.setattr},stream:{llseek:Fr.stream_ops.llseek,read:Fr.stream_ops.read,write:Fr.stream_ops.write,allocate:Fr.stream_ops.allocate,mmap:Fr.stream_ops.mmap,msync:Fr.stream_ops.msync}},link:{node:{getattr:Fr.node_ops.getattr,setattr:Fr.node_ops.setattr,readlink:Fr.node_ops.readlink},stream:{}},chrdev:{node:{getattr:Fr.node_ops.getattr,setattr:Fr.node_ops.setattr},stream:jr.chrdev_stream_ops}};var o=jr.createNode(r,e,t,n);return jr.isDir(o.mode)?(o.node_ops=Fr.ops_table.dir.node,o.stream_ops=Fr.ops_table.dir.stream,o.contents={}):jr.isFile(o.mode)?(o.node_ops=Fr.ops_table.file.node,o.stream_ops=Fr.ops_table.file.stream,o.usedBytes=0,o.contents=null):jr.isLink(o.mode)?(o.node_ops=Fr.ops_table.link.node,o.stream_ops=Fr.ops_table.link.stream):jr.isChrdev(o.mode)&&(o.node_ops=Fr.ops_table.chrdev.node,o.stream_ops=Fr.ops_table.chrdev.stream),o.timestamp=Date.now(),r&&(r.contents[e]=o,r.timestamp=o.timestamp),o},getFileDataAsTypedArray:r=>r.contents?r.contents.subarray?r.contents.subarray(0,r.usedBytes):new Uint8Array(r.contents):new Uint8Array(0),expandFileStorage(r,e){var t=r.contents?r.contents.length:0;if(!(t>=e)){var n=1048576;e=Math.max(e,t*(t<n?2:1.125)>>>0),0!=t&&(e=Math.max(e,256));var o=r.contents;r.contents=new Uint8Array(e),r.usedBytes>0&&r.contents.set(o.subarray(0,r.usedBytes),0)}},resizeFileStorage(r,e){if(r.usedBytes!=e)if(0==e)r.contents=null,r.usedBytes=0;else{var t=r.contents;r.contents=new Uint8Array(e),t&&r.contents.set(t.subarray(0,Math.min(e,r.usedBytes))),r.usedBytes=e}},node_ops:{getattr(r){var e={};return e.dev=jr.isChrdev(r.mode)?r.id:1,e.ino=r.id,e.mode=r.mode,e.nlink=1,e.uid=0,e.gid=0,e.rdev=r.rdev,jr.isDir(r.mode)?e.size=4096:jr.isFile(r.mode)?e.size=r.usedBytes:jr.isLink(r.mode)?e.size=r.link.length:e.size=0,e.atime=new Date(r.timestamp),e.mtime=new Date(r.timestamp),e.ctime=new Date(r.timestamp),e.blksize=4096,e.blocks=Math.ceil(e.size/e.blksize),e},setattr(r,e){void 0!==e.mode&&(r.mode=e.mode),void 0!==e.timestamp&&(r.timestamp=e.timestamp),void 0!==e.size&&Fr.resizeFileStorage(r,e.size)},lookup(r,e){throw Fr.doesNotExistError},mknod:(r,e,t,n)=>Fr.createNode(r,e,t,n),rename(r,e,t){if(jr.isDir(r.mode)){var n;try{n=jr.lookupNode(e,t)}catch(a){}if(n)for(var o in n.contents)throw new jr.ErrnoError(55)}delete r.parent.contents[r.name],r.parent.timestamp=Date.now(),r.name=t,e.contents[t]=r,e.timestamp=r.parent.timestamp},unlink(r,e){delete r.contents[e],r.timestamp=Date.now()},rmdir(r,e){var t=jr.lookupNode(r,e);for(var n in t.contents)throw new jr.ErrnoError(55);delete r.contents[e],r.timestamp=Date.now()},readdir(r){var e=[".",".."];for(var t of Object.keys(r.contents))e.push(t);return e},symlink(r,e,t){var n=Fr.createNode(r,e,41471,0);return n.link=t,n},readlink(r){if(!jr.isLink(r.mode))throw new jr.ErrnoError(28);return r.link}},stream_ops:{read(r,e,t,n,o){var a=r.node.contents;if(o>=r.node.usedBytes)return 0;var i=Math.min(r.node.usedBytes-o,n);if(i>8&&a.subarray)e.set(a.subarray(o,o+i),t);else for(var s=0;s<i;s++)e[t+s]=a[o+s];return i},write(r,e,t,n,o,a){if(e.buffer===w.buffer&&(a=!1),!n)return 0;var i=r.node;if(i.timestamp=Date.now(),e.subarray&&(!i.contents||i.contents.subarray)){if(a)return i.contents=e.subarray(t,t+n),i.usedBytes=n,n;if(0===i.usedBytes&&0===o)return i.contents=e.slice(t,t+n),i.usedBytes=n,n;if(o+n<=i.usedBytes)return i.contents.set(e.subarray(t,t+n),o),n}if(Fr.expandFileStorage(i,o+n),i.contents.subarray&&e.subarray)i.contents.set(e.subarray(t,t+n),o);else for(var s=0;s<n;s++)i.contents[o+s]=e[t+s];return i.usedBytes=Math.max(i.usedBytes,o+n),n},llseek(r,e,t){var n=e;if(1===t?n+=r.position:2===t&&jr.isFile(r.node.mode)&&(n+=r.node.usedBytes),n<0)throw new jr.ErrnoError(28);return n},allocate(r,e,t){Fr.expandFileStorage(r.node,e+t),r.node.usedBytes=Math.max(r.node.usedBytes,e+t)},mmap(r,e,t,n,o){if(!jr.isFile(r.node.mode))throw new jr.ErrnoError(43);var a,i,s=r.node.contents;if(2&o||!s||s.buffer!==w.buffer){if(i=!0,!(a=kr()))throw new jr.ErrnoError(48);s&&((t>0||t+e<s.length)&&(s=s.subarray?s.subarray(t,t+e):Array.prototype.slice.call(s,t,t+e)),w.set(s,a))}else i=!1,a=s.byteOffset;return{ptr:a,allocated:i}},msync:(r,e,t,n,o)=>(Fr.stream_ops.write(r,e,0,n,t,!1),0)}},Pr=(r,e,t,n)=>{var o=O(`al ${r}`);a(r).then((r=>{e(new Uint8Array(r)),o&&B()}),(e=>{if(!t)throw`Loading data file "${r}" failed.`;t()})),o&&U()},Ar=(r,e,t,n,o,a)=>{jr.createDataFile(r,e,t,n,o,a)},Sr=s.preloadPlugins||[],Dr=(r,e,t,n)=>{"undefined"!=typeof Browser&&Browser.init();var o=!1;return Sr.forEach((a=>{o||a.canHandle(e)&&(a.handle(r,e,t,n),o=!0)})),o},$r=(r,e,t,n,o,a,i,s,l,u)=>{var d=e?hr.resolve(dr.join2(r,e)):r;function c(t){function c(t){u?.(),s||Ar(r,e,t,n,o,l),a?.(),B()}Dr(t,d,c,(()=>{i?.(),B()}))||c(t)}U(),"string"==typeof t?Pr(t,c,i):c(t)},Cr=r=>{var e={r:0,"r+":2,w:577,"w+":578,a:1089,"a+":1090}[r];if(void 0===e)throw new Error(`Unknown file open mode: ${r}`);return e},Tr=(r,e)=>{var t=0;return r&&(t|=365),e&&(t|=146),t},jr={root:null,mounts:[],devices:{},streams:[],nextInode:1,nameTable:null,currentPath:"/",initialized:!1,ignorePermissions:!0,ErrnoError:class{name="ErrnoError";constructor(r){this.errno=r}},filesystems:null,syncFSRequests:0,readFiles:{},FSStream:class{shared={};get object(){return this.node}set object(r){this.node=r}get isRead(){return 1!=(2097155&this.flags)}get isWrite(){return!!(2097155&this.flags)}get isAppend(){return 1024&this.flags}get flags(){return this.shared.flags}set flags(r){this.shared.flags=r}get position(){return this.shared.position}set position(r){this.shared.position=r}},FSNode:class{node_ops={};stream_ops={};readMode=365;writeMode=146;mounted=null;constructor(r,e,t,n){r||(r=this),this.parent=r,this.mount=r.mount,this.id=jr.nextInode++,this.name=e,this.mode=t,this.rdev=n}get read(){return(this.mode&this.readMode)===this.readMode}set read(r){r?this.mode|=this.readMode:this.mode&=~this.readMode}get write(){return(this.mode&this.writeMode)===this.writeMode}set write(r){r?this.mode|=this.writeMode:this.mode&=~this.writeMode}get isFolder(){return jr.isDir(this.mode)}get isDevice(){return jr.isChrdev(this.mode)}},lookupPath(r,e={}){if(!(r=hr.resolve(r)))return{path:"",node:null};var t={follow_mount:!0,recurse_count:0};if((e=Object.assign(t,e)).recurse_count>8)throw new jr.ErrnoError(32);for(var n=r.split("/").filter((r=>!!r)),o=jr.root,a="/",i=0;i<n.length;i++){var s=i===n.length-1;if(s&&e.parent)break;if(o=jr.lookupNode(o,n[i]),a=dr.join2(a,n[i]),jr.isMountpoint(o)&&(!s||s&&e.follow_mount)&&(o=o.mounted.root),!s||e.follow)for(var l=0;jr.isLink(o.mode);){var u=jr.readlink(a);if(a=hr.resolve(dr.dirname(a),u),o=jr.lookupPath(a,{recurse_count:e.recurse_count+1}).node,l++>40)throw new jr.ErrnoError(32)}}return{path:a,node:o}},getPath(r){for(var e;;){if(jr.isRoot(r)){var t=r.mount.mountpoint;return e?"/"!==t[t.length-1]?`${t}/${e}`:t+e:t}e=e?`${r.name}/${e}`:r.name,r=r.parent}},hashName(r,e){for(var t=0,n=0;n<e.length;n++)t=(t<<5)-t+e.charCodeAt(n)|0;return(r+t>>>0)%jr.nameTable.length},hashAddNode(r){var e=jr.hashName(r.parent.id,r.name);r.name_next=jr.nameTable[e],jr.nameTable[e]=r},hashRemoveNode(r){var e=jr.hashName(r.parent.id,r.name);if(jr.nameTable[e]===r)jr.nameTable[e]=r.name_next;else for(var t=jr.nameTable[e];t;){if(t.name_next===r){t.name_next=r.name_next;break}t=t.name_next}},lookupNode(r,e){var t=jr.mayLookup(r);if(t)throw new jr.ErrnoError(t);for(var n=jr.hashName(r.id,e),o=jr.nameTable[n];o;o=o.name_next){var a=o.name;if(o.parent.id===r.id&&a===e)return o}return jr.lookup(r,e)},createNode(r,e,t,n){var o=new jr.FSNode(r,e,t,n);return jr.hashAddNode(o),o},destroyNode(r){jr.hashRemoveNode(r)},isRoot:r=>r===r.parent,isMountpoint:r=>!!r.mounted,isFile:r=>32768==(61440&r),isDir:r=>16384==(61440&r),isLink:r=>40960==(61440&r),isChrdev:r=>8192==(61440&r),isBlkdev:r=>24576==(61440&r),isFIFO:r=>4096==(61440&r),isSocket:r=>!(49152&~r),flagsToPermissionString(r){var e=["r","w","rw"][3&r];return 512&r&&(e+="w"),e},nodePermissions:(r,e)=>jr.ignorePermissions||(!e.includes("r")||292&r.mode)&&(!e.includes("w")||146&r.mode)&&(!e.includes("x")||73&r.mode)?0:2,mayLookup(r){if(!jr.isDir(r.mode))return 54;var e=jr.nodePermissions(r,"x");return e||(r.node_ops.lookup?0:2)},mayCreate(r,e){try{return jr.lookupNode(r,e),20}catch(t){}return jr.nodePermissions(r,"wx")},mayDelete(r,e,t){var n;try{n=jr.lookupNode(r,e)}catch(a){return a.errno}var o=jr.nodePermissions(r,"wx");if(o)return o;if(t){if(!jr.isDir(n.mode))return 54;if(jr.isRoot(n)||jr.getPath(n)===jr.cwd())return 10}else if(jr.isDir(n.mode))return 31;return 0},mayOpen:(r,e)=>r?jr.isLink(r.mode)?32:jr.isDir(r.mode)&&("r"!==jr.flagsToPermissionString(e)||512&e)?31:jr.nodePermissions(r,jr.flagsToPermissionString(e)):44,MAX_OPEN_FDS:4096,nextfd(){for(var r=0;r<=jr.MAX_OPEN_FDS;r++)if(!jr.streams[r])return r;throw new jr.ErrnoError(33)},getStreamChecked(r){var e=jr.getStream(r);if(!e)throw new jr.ErrnoError(8);return e},getStream:r=>jr.streams[r],createStream:(r,e=-1)=>(r=Object.assign(new jr.FSStream,r),-1==e&&(e=jr.nextfd()),r.fd=e,jr.streams[e]=r,r),closeStream(r){jr.streams[r]=null},dupStream(r,e=-1){var t=jr.createStream(r,e);return t.stream_ops?.dup?.(t),t},chrdev_stream_ops:{open(r){var e=jr.getDevice(r.node.rdev);r.stream_ops=e.stream_ops,r.stream_ops.open?.(r)},llseek(){throw new jr.ErrnoError(70)}},major:r=>r>>8,minor:r=>255&r,makedev:(r,e)=>r<<8|e,registerDevice(r,e){jr.devices[r]={stream_ops:e}},getDevice:r=>jr.devices[r],getMounts(r){for(var e=[],t=[r];t.length;){var n=t.pop();e.push(n),t.push(...n.mounts)}return e},syncfs(r,e){"function"==typeof r&&(e=r,r=!1),jr.syncFSRequests++,jr.syncFSRequests>1&&p(`warning: ${jr.syncFSRequests} FS.syncfs operations in flight at once, probably just doing extra work`);var t=jr.getMounts(jr.root.mount),n=0;function o(r){return jr.syncFSRequests--,e(r)}function a(r){if(r)return a.errored?void 0:(a.errored=!0,o(r));++n>=t.length&&o(null)}t.forEach((e=>{if(!e.type.syncfs)return a(null);e.type.syncfs(e,r,a)}))},mount(r,e,t){var n,o="/"===t,a=!t;if(o&&jr.root)throw new jr.ErrnoError(10);if(!o&&!a){var i=jr.lookupPath(t,{follow_mount:!1});if(t=i.path,n=i.node,jr.isMountpoint(n))throw new jr.ErrnoError(10);if(!jr.isDir(n.mode))throw new jr.ErrnoError(54)}var s={type:r,opts:e,mountpoint:t,mounts:[]},l=r.mount(s);return l.mount=s,s.root=l,o?jr.root=l:n&&(n.mounted=s,n.mount&&n.mount.mounts.push(s)),l},unmount(r){var e=jr.lookupPath(r,{follow_mount:!1});if(!jr.isMountpoint(e.node))throw new jr.ErrnoError(28);var t=e.node,n=t.mounted,o=jr.getMounts(n);Object.keys(jr.nameTable).forEach((r=>{for(var e=jr.nameTable[r];e;){var t=e.name_next;o.includes(e.mount)&&jr.destroyNode(e),e=t}})),t.mounted=null;var a=t.mount.mounts.indexOf(n);t.mount.mounts.splice(a,1)},lookup:(r,e)=>r.node_ops.lookup(r,e),mknod(r,e,t){var n=jr.lookupPath(r,{parent:!0}).node,o=dr.basename(r);if(!o||"."===o||".."===o)throw new jr.ErrnoError(28);var a=jr.mayCreate(n,o);if(a)throw new jr.ErrnoError(a);if(!n.node_ops.mknod)throw new jr.ErrnoError(63);return n.node_ops.mknod(n,o,e,t)},statfs(r){var e={bsize:4096,frsize:4096,blocks:1e6,bfree:5e5,bavail:5e5,files:jr.nextInode,ffree:jr.nextInode-1,fsid:42,flags:2,namelen:255},t=jr.lookupPath(r,{follow:!0}).node;return t?.node_ops.statfs&&Object.assign(e,t.node_ops.statfs(t.mount.opts.root)),e},create:(r,e=438)=>(e&=4095,e|=32768,jr.mknod(r,e,0)),mkdir:(r,e=511)=>(e&=1023,e|=16384,jr.mknod(r,e,0)),mkdirTree(r,e){for(var t=r.split("/"),n="",o=0;o<t.length;++o)if(t[o]){n+="/"+t[o];try{jr.mkdir(n,e)}catch(a){if(20!=a.errno)throw a}}},mkdev:(r,e,t)=>(void 0===t&&(t=e,e=438),e|=8192,jr.mknod(r,e,t)),symlink(r,e){if(!hr.resolve(r))throw new jr.ErrnoError(44);var t=jr.lookupPath(e,{parent:!0}).node;if(!t)throw new jr.ErrnoError(44);var n=dr.basename(e),o=jr.mayCreate(t,n);if(o)throw new jr.ErrnoError(o);if(!t.node_ops.symlink)throw new jr.ErrnoError(63);return t.node_ops.symlink(t,n,r)},rename(r,e){var t,n,o=dr.dirname(r),a=dr.dirname(e),i=dr.basename(r),s=dr.basename(e);if(t=jr.lookupPath(r,{parent:!0}).node,n=jr.lookupPath(e,{parent:!0}).node,!t||!n)throw new jr.ErrnoError(44);if(t.mount!==n.mount)throw new jr.ErrnoError(75);var l,u=jr.lookupNode(t,i),d=hr.relative(r,a);if("."!==d.charAt(0))throw new jr.ErrnoError(28);if("."!==(d=hr.relative(e,o)).charAt(0))throw new jr.ErrnoError(55);try{l=jr.lookupNode(n,s)}catch(h){}if(u!==l){var c=jr.isDir(u.mode),f=jr.mayDelete(t,i,c);if(f)throw new jr.ErrnoError(f);if(f=l?jr.mayDelete(n,s,c):jr.mayCreate(n,s))throw new jr.ErrnoError(f);if(!t.node_ops.rename)throw new jr.ErrnoError(63);if(jr.isMountpoint(u)||l&&jr.isMountpoint(l))throw new jr.ErrnoError(10);if(n!==t&&(f=jr.nodePermissions(t,"w")))throw new jr.ErrnoError(f);jr.hashRemoveNode(u);try{t.node_ops.rename(u,n,s),u.parent=n}catch(h){throw h}finally{jr.hashAddNode(u)}}},rmdir(r){var e=jr.lookupPath(r,{parent:!0}).node,t=dr.basename(r),n=jr.lookupNode(e,t),o=jr.mayDelete(e,t,!0);if(o)throw new jr.ErrnoError(o);if(!e.node_ops.rmdir)throw new jr.ErrnoError(63);if(jr.isMountpoint(n))throw new jr.ErrnoError(10);e.node_ops.rmdir(e,t),jr.destroyNode(n)},readdir(r){var e=jr.lookupPath(r,{follow:!0}).node;if(!e.node_ops.readdir)throw new jr.ErrnoError(54);return e.node_ops.readdir(e)},unlink(r){var e=jr.lookupPath(r,{parent:!0}).node;if(!e)throw new jr.ErrnoError(44);var t=dr.basename(r),n=jr.lookupNode(e,t),o=jr.mayDelete(e,t,!1);if(o)throw new jr.ErrnoError(o);if(!e.node_ops.unlink)throw new jr.ErrnoError(63);if(jr.isMountpoint(n))throw new jr.ErrnoError(10);e.node_ops.unlink(e,t),jr.destroyNode(n)},readlink(r){var e=jr.lookupPath(r).node;if(!e)throw new jr.ErrnoError(44);if(!e.node_ops.readlink)throw new jr.ErrnoError(28);return e.node_ops.readlink(e)},stat(r,e){var t=jr.lookupPath(r,{follow:!e}).node;if(!t)throw new jr.ErrnoError(44);if(!t.node_ops.getattr)throw new jr.ErrnoError(63);return t.node_ops.getattr(t)},lstat:r=>jr.stat(r,!0),chmod(r,e,t){var n;if(!(n="string"==typeof r?jr.lookupPath(r,{follow:!t}).node:r).node_ops.setattr)throw new jr.ErrnoError(63);n.node_ops.setattr(n,{mode:4095&e|-4096&n.mode,timestamp:Date.now()})},lchmod(r,e){jr.chmod(r,e,!0)},fchmod(r,e){var t=jr.getStreamChecked(r);jr.chmod(t.node,e)},chown(r,e,t,n){var o;if(!(o="string"==typeof r?jr.lookupPath(r,{follow:!n}).node:r).node_ops.setattr)throw new jr.ErrnoError(63);o.node_ops.setattr(o,{timestamp:Date.now()})},lchown(r,e,t){jr.chown(r,e,t,!0)},fchown(r,e,t){var n=jr.getStreamChecked(r);jr.chown(n.node,e,t)},truncate(r,e){if(e<0)throw new jr.ErrnoError(28);var t;if(!(t="string"==typeof r?jr.lookupPath(r,{follow:!0}).node:r).node_ops.setattr)throw new jr.ErrnoError(63);if(jr.isDir(t.mode))throw new jr.ErrnoError(31);if(!jr.isFile(t.mode))throw new jr.ErrnoError(28);var n=jr.nodePermissions(t,"w");if(n)throw new jr.ErrnoError(n);t.node_ops.setattr(t,{size:e,timestamp:Date.now()})},ftruncate(r,e){var t=jr.getStreamChecked(r);if(!(2097155&t.flags))throw new jr.ErrnoError(28);jr.truncate(t.node,e)},utime(r,e,t){var n=jr.lookupPath(r,{follow:!0}).node;n.node_ops.setattr(n,{timestamp:Math.max(e,t)})},open(r,e,t=438){if(""===r)throw new jr.ErrnoError(44);var n;if(t=64&(e="string"==typeof e?Cr(e):e)?4095&t|32768:0,"object"==typeof r)n=r;else{r=dr.normalize(r);try{n=jr.lookupPath(r,{follow:!(131072&e)}).node}catch(l){}}var o=!1;if(64&e)if(n){if(128&e)throw new jr.ErrnoError(20)}else n=jr.mknod(r,t,0),o=!0;if(!n)throw new jr.ErrnoError(44);if(jr.isChrdev(n.mode)&&(e&=-513),65536&e&&!jr.isDir(n.mode))throw new jr.ErrnoError(54);if(!o){var a=jr.mayOpen(n,e);if(a)throw new jr.ErrnoError(a)}512&e&&!o&&jr.truncate(n,0),e&=-131713;var i=jr.createStream({node:n,path:jr.getPath(n),flags:e,seekable:!0,position:0,stream_ops:n.stream_ops,ungotten:[],error:!1});return i.stream_ops.open&&i.stream_ops.open(i),!s.logReadFiles||1&e||r in jr.readFiles||(jr.readFiles[r]=1),i},close(r){if(jr.isClosed(r))throw new jr.ErrnoError(8);r.getdents&&(r.getdents=null);try{r.stream_ops.close&&r.stream_ops.close(r)}catch(e){throw e}finally{jr.closeStream(r.fd)}r.fd=null},isClosed:r=>null===r.fd,llseek(r,e,t){if(jr.isClosed(r))throw new jr.ErrnoError(8);if(!r.seekable||!r.stream_ops.llseek)throw new jr.ErrnoError(70);if(0!=t&&1!=t&&2!=t)throw new jr.ErrnoError(28);return r.position=r.stream_ops.llseek(r,e,t),r.ungotten=[],r.position},read(r,e,t,n,o){if(n<0||o<0)throw new jr.ErrnoError(28);if(jr.isClosed(r))throw new jr.ErrnoError(8);if(1==(2097155&r.flags))throw new jr.ErrnoError(8);if(jr.isDir(r.node.mode))throw new jr.ErrnoError(31);if(!r.stream_ops.read)throw new jr.ErrnoError(28);var a=void 0!==o;if(a){if(!r.seekable)throw new jr.ErrnoError(70)}else o=r.position;var i=r.stream_ops.read(r,e,t,n,o);return a||(r.position+=i),i},write(r,e,t,n,o,a){if(n<0||o<0)throw new jr.ErrnoError(28);if(jr.isClosed(r))throw new jr.ErrnoError(8);if(!(2097155&r.flags))throw new jr.ErrnoError(8);if(jr.isDir(r.node.mode))throw new jr.ErrnoError(31);if(!r.stream_ops.write)throw new jr.ErrnoError(28);r.seekable&&1024&r.flags&&jr.llseek(r,0,2);var i=void 0!==o;if(i){if(!r.seekable)throw new jr.ErrnoError(70)}else o=r.position;var s=r.stream_ops.write(r,e,t,n,o,a);return i||(r.position+=s),s},allocate(r,e,t){if(jr.isClosed(r))throw new jr.ErrnoError(8);if(e<0||t<=0)throw new jr.ErrnoError(28);if(!(2097155&r.flags))throw new jr.ErrnoError(8);if(!jr.isFile(r.node.mode)&&!jr.isDir(r.node.mode))throw new jr.ErrnoError(43);if(!r.stream_ops.allocate)throw new jr.ErrnoError(138);r.stream_ops.allocate(r,e,t)},mmap(r,e,t,n,o){if(2&n&&!(2&o)&&2!=(2097155&r.flags))throw new jr.ErrnoError(2);if(1==(2097155&r.flags))throw new jr.ErrnoError(2);if(!r.stream_ops.mmap)throw new jr.ErrnoError(43);if(!e)throw new jr.ErrnoError(28);return r.stream_ops.mmap(r,e,t,n,o)},msync:(r,e,t,n,o)=>r.stream_ops.msync?r.stream_ops.msync(r,e,t,n,o):0,ioctl(r,e,t){if(!r.stream_ops.ioctl)throw new jr.ErrnoError(59);return r.stream_ops.ioctl(r,e,t)},readFile(r,e={}){if(e.flags=e.flags||0,e.encoding=e.encoding||"binary","utf8"!==e.encoding&&"binary"!==e.encoding)throw new Error(`Invalid encoding type "${e.encoding}"`);var t,n=jr.open(r,e.flags),o=jr.stat(r).size,a=new Uint8Array(o);return jr.read(n,a,0,o,0),"utf8"===e.encoding?t=pr(a):"binary"===e.encoding&&(t=a),jr.close(n),t},writeFile(r,e,t={}){t.flags=t.flags||577;var n=jr.open(r,t.flags,t.mode);if("string"==typeof e){var o=new Uint8Array(wr(e)+1),a=yr(e,o,0,o.length);jr.write(n,o,0,a,void 0,t.canOwn)}else{if(!ArrayBuffer.isView(e))throw new Error("Unsupported data type");jr.write(n,e,0,e.byteLength,void 0,t.canOwn)}jr.close(n)},cwd:()=>jr.currentPath,chdir(r){var e=jr.lookupPath(r,{follow:!0});if(null===e.node)throw new jr.ErrnoError(44);if(!jr.isDir(e.node.mode))throw new jr.ErrnoError(54);var t=jr.nodePermissions(e.node,"x");if(t)throw new jr.ErrnoError(t);jr.currentPath=e.path},createDefaultDirectories(){jr.mkdir("/tmp"),jr.mkdir("/home"),jr.mkdir("/home/web_user")},createDefaultDevices(){jr.mkdir("/dev"),jr.registerDevice(jr.makedev(1,3),{read:()=>0,write:(r,e,t,n,o)=>n,llseek:()=>0}),jr.mkdev("/dev/null",jr.makedev(1,3)),_r.register(jr.makedev(5,0),_r.default_tty_ops),_r.register(jr.makedev(6,0),_r.default_tty1_ops),jr.mkdev("/dev/tty",jr.makedev(5,0)),jr.mkdev("/dev/tty1",jr.makedev(6,0));var r=new Uint8Array(1024),e=0,t=()=>(0===e&&(e=fr(r).byteLength),r[--e]);jr.createDevice("/dev","random",t),jr.createDevice("/dev","urandom",t),jr.mkdir("/dev/shm"),jr.mkdir("/dev/shm/tmp")},createSpecialDirectories(){jr.mkdir("/proc");var r=jr.mkdir("/proc/self");jr.mkdir("/proc/self/fd"),jr.mount({mount(){var e=jr.createNode(r,"fd",16895,73);return e.node_ops={lookup(r,e){var t=+e,n=jr.getStreamChecked(t),o={parent:null,mount:{mountpoint:"fake"},node_ops:{readlink:()=>n.path}};return o.parent=o,o}},e}},{},"/proc/self/fd")},createStandardStreams(r,e,t){r?jr.createDevice("/dev","stdin",r):jr.symlink("/dev/tty","/dev/stdin"),e?jr.createDevice("/dev","stdout",null,e):jr.symlink("/dev/tty","/dev/stdout"),t?jr.createDevice("/dev","stderr",null,t):jr.symlink("/dev/tty1","/dev/stderr"),jr.open("/dev/stdin",0),jr.open("/dev/stdout",1),jr.open("/dev/stderr",1)},staticInit(){jr.nameTable=new Array(4096),jr.mount(Fr,{},"/"),jr.createDefaultDirectories(),jr.createDefaultDevices(),jr.createSpecialDirectories(),jr.filesystems={MEMFS:Fr}},init(r,e,t){jr.initialized=!0,r??=s.stdin,e??=s.stdout,t??=s.stderr,jr.createStandardStreams(r,e,t)},quit(){jr.initialized=!1;for(var r=0;r<jr.streams.length;r++){var e=jr.streams[r];e&&jr.close(e)}},findObject(r,e){var t=jr.analyzePath(r,e);return t.exists?t.object:null},analyzePath(r,e){try{r=(n=jr.lookupPath(r,{follow:!e})).path}catch(o){}var t={isRoot:!1,exists:!1,error:0,name:null,path:null,object:null,parentExists:!1,parentPath:null,parentObject:null};try{var n=jr.lookupPath(r,{parent:!0});t.parentExists=!0,t.parentPath=n.path,t.parentObject=n.node,t.name=dr.basename(r),n=jr.lookupPath(r,{follow:!e}),t.exists=!0,t.path=n.path,t.object=n.node,t.name=n.node.name,t.isRoot="/"===n.path}catch(o){t.error=o.errno}return t},createPath(r,e,t,n){r="string"==typeof r?r:jr.getPath(r);for(var o=e.split("/").reverse();o.length;){var a=o.pop();if(a){var i=dr.join2(r,a);try{jr.mkdir(i)}catch(s){}r=i}}return i},createFile(r,e,t,n,o){var a=dr.join2("string"==typeof r?r:jr.getPath(r),e),i=Tr(n,o);return jr.create(a,i)},createDataFile(r,e,t,n,o,a){var i=e;r&&(r="string"==typeof r?r:jr.getPath(r),i=e?dr.join2(r,e):r);var s=Tr(n,o),l=jr.create(i,s);if(t){if("string"==typeof t){for(var u=new Array(t.length),d=0,c=t.length;d<c;++d)u[d]=t.charCodeAt(d);t=u}jr.chmod(l,146|s);var f=jr.open(l,577);jr.write(f,t,0,t.length,0,a),jr.close(f),jr.chmod(l,s)}},createDevice(r,e,t,n){var o=dr.join2("string"==typeof r?r:jr.getPath(r),e),a=Tr(!!t,!!n);jr.createDevice.major??=64;var i=jr.makedev(jr.createDevice.major++,0);return jr.registerDevice(i,{open(r){r.seekable=!1},close(r){n?.buffer?.length&&n(10)},read(r,e,n,o,a){for(var i=0,s=0;s<o;s++){var l;try{l=t()}catch(u){throw new jr.ErrnoError(29)}if(void 0===l&&0===i)throw new jr.ErrnoError(6);if(null==l)break;i++,e[n+s]=l}return i&&(r.node.timestamp=Date.now()),i},write(r,e,t,o,a){for(var i=0;i<o;i++)try{n(e[t+i])}catch(s){throw new jr.ErrnoError(29)}return o&&(r.node.timestamp=Date.now()),i}}),jr.mkdev(o,a,i)},forceLoadFile(r){if(r.isDevice||r.isFolder||r.link||r.contents)return!0;if("undefined"!=typeof XMLHttpRequest)throw new Error("Lazy loading should have been performed (contents set) in createLazyFile, but it was not. Lazy loading only works in web workers. Use --embed-file or --preload-file in emcc on the main thread.");try{r.contents=i(r.url),r.usedBytes=r.contents.length}catch(e){throw new jr.ErrnoError(29)}},createLazyFile(r,e,t,n,o){if("undefined"!=typeof XMLHttpRequest)throw"Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc";var a={isDevice:!1,url:t},i=jr.createFile(r,e,a,n,o);a.contents?i.contents=a.contents:a.url&&(i.contents=null,i.url=a.url),Object.defineProperties(i,{usedBytes:{get:function(){return this.contents.length}}});var s={};function l(r,e,t,n,o){var a=r.node.contents;if(o>=a.length)return 0;var i=Math.min(a.length-o,n);if(a.slice)for(var s=0;s<i;s++)e[t+s]=a[o+s];else for(s=0;s<i;s++)e[t+s]=a.get(o+s);return i}return Object.keys(i.stream_ops).forEach((r=>{var e=i.stream_ops[r];s[r]=(...r)=>(jr.forceLoadFile(i),e(...r))})),s.read=(r,e,t,n,o)=>(jr.forceLoadFile(i),l(r,e,t,n,o)),s.mmap=(r,e,t,n,o)=>{jr.forceLoadFile(i);var a=kr();if(!a)throw new jr.ErrnoError(48);return l(r,w,a,e,t),{ptr:a,allocated:!0}},i.stream_ops=s,i}},Mr=(r,e)=>r?pr(y,r,e):"",xr={DEFAULT_POLLMASK:5,calculateAt(r,e,t){if(dr.isAbs(e))return e;var n;if(n=-100===r?jr.cwd():xr.getStreamFromFD(r).path,0==e.length){if(!t)throw new jr.ErrnoError(44);return n}return dr.join2(n,e)},doStat(r,e,t){var n=r(e);_[t>>2]=n.dev,_[t+4>>2]=n.mode,b[t+8>>2]=n.nlink,_[t+12>>2]=n.uid,_[t+16>>2]=n.gid,_[t+20>>2]=n.rdev,V=[n.size>>>0,(H=n.size,+Math.abs(H)>=1?H>0?+Math.floor(H/4294967296)>>>0:~~+Math.ceil((H-+(~~H>>>0))/4294967296)>>>0:0)],_[t+24>>2]=V[0],_[t+28>>2]=V[1],_[t+32>>2]=4096,_[t+36>>2]=n.blocks;var o=n.atime.getTime(),a=n.mtime.getTime(),i=n.ctime.getTime();return V=[Math.floor(o/1e3)>>>0,(H=Math.floor(o/1e3),+Math.abs(H)>=1?H>0?+Math.floor(H/4294967296)>>>0:~~+Math.ceil((H-+(~~H>>>0))/4294967296)>>>0:0)],_[t+40>>2]=V[0],_[t+44>>2]=V[1],b[t+48>>2]=o%1e3*1e3*1e3,V=[Math.floor(a/1e3)>>>0,(H=Math.floor(a/1e3),+Math.abs(H)>=1?H>0?+Math.floor(H/4294967296)>>>0:~~+Math.ceil((H-+(~~H>>>0))/4294967296)>>>0:0)],_[t+56>>2]=V[0],_[t+60>>2]=V[1],b[t+64>>2]=a%1e3*1e3*1e3,V=[Math.floor(i/1e3)>>>0,(H=Math.floor(i/1e3),+Math.abs(H)>=1?H>0?+Math.floor(H/4294967296)>>>0:~~+Math.ceil((H-+(~~H>>>0))/4294967296)>>>0:0)],_[t+72>>2]=V[0],_[t+76>>2]=V[1],b[t+80>>2]=i%1e3*1e3*1e3,V=[n.ino>>>0,(H=n.ino,+Math.abs(H)>=1?H>0?+Math.floor(H/4294967296)>>>0:~~+Math.ceil((H-+(~~H>>>0))/4294967296)>>>0:0)],_[t+88>>2]=V[0],_[t+92>>2]=V[1],0},doMsync(r,e,t,n,o){if(!jr.isFile(e.node.mode))throw new jr.ErrnoError(43);if(2&n)return 0;var a=y.slice(r,r+t);jr.msync(e,a,o,t,n)},getStreamFromFD:r=>jr.getStreamChecked(r),varargs:void 0,getStr:r=>Mr(r)};function Rr(r,e,t){xr.varargs=t;try{var n=xr.getStreamFromFD(r);switch(e){case 0:if((o=lr())<0)return-28;for(;jr.streams[o];)o++;return jr.dupStream(n,o).fd;case 1:case 2:case 13:case 14:return 0;case 3:return n.flags;case 4:var o=lr();return n.flags|=o,0;case 12:return o=ur(),g[o+0>>1]=2,0}return-28}catch(a){if(void 0===jr||"ErrnoError"!==a.name)throw a;return-a.errno}}function Nr(r,e,t){xr.varargs=t;try{var n=xr.getStreamFromFD(r);switch(e){case 21509:case 21510:case 21511:case 21512:case 21524:case 21515:return n.tty?0:-59;case 21505:if(!n.tty)return-59;if(n.tty.ops.ioctl_tcgets){var o=n.tty.ops.ioctl_tcgets(n),a=ur();_[a>>2]=o.c_iflag||0,_[a+4>>2]=o.c_oflag||0,_[a+8>>2]=o.c_cflag||0,_[a+12>>2]=o.c_lflag||0;for(var i=0;i<32;i++)w[a+i+17]=o.c_cc[i]||0;return 0}return 0;case 21506:case 21507:case 21508:if(!n.tty)return-59;if(n.tty.ops.ioctl_tcsets){a=ur();var s=_[a>>2],l=_[a+4>>2],u=_[a+8>>2],d=_[a+12>>2],c=[];for(i=0;i<32;i++)c.push(w[a+i+17]);return n.tty.ops.ioctl_tcsets(n.tty,e,{c_iflag:s,c_oflag:l,c_cflag:u,c_lflag:d,c_cc:c})}return 0;case 21519:return n.tty?(a=ur(),_[a>>2]=0,0):-59;case 21520:return n.tty?-28:-59;case 21531:return a=ur(),jr.ioctl(n,e,a);case 21523:if(!n.tty)return-59;if(n.tty.ops.ioctl_tiocgwinsz){var f=n.tty.ops.ioctl_tiocgwinsz(n.tty);a=ur(),g[a>>1]=f[0],g[a+2>>1]=f[1]}return 0;default:return-28}}catch(h){if(void 0===jr||"ErrnoError"!==h.name)throw h;return-h.errno}}function zr(r,e,t,n){xr.varargs=n;try{e=xr.getStr(e),e=xr.calculateAt(r,e);var o=n?lr():0;return jr.open(e,t,o).fd}catch(a){if(void 0===jr||"ErrnoError"!==a.name)throw a;return-a.errno}}var Wr=()=>L(""),Or={},Ur=r=>{for(;r.length;){var e=r.pop();r.pop()(e)}};function Br(r){return this.fromWireType(b[r>>2])}var Lr,Ir,Hr,Vr={},qr={},Xr={},Gr=r=>{throw new Lr(r)},Kr=(r,e,t)=>{function n(e){var n=t(e);n.length!==r.length&&Gr("Mismatched type converter count");for(var o=0;o<r.length;++o)te(r[o],n[o])}r.forEach((r=>Xr[r]=e));var o=new Array(e.length),a=[],i=0;e.forEach(((r,e)=>{qr.hasOwnProperty(r)?o[e]=qr[r]:(a.push(r),Vr.hasOwnProperty(r)||(Vr[r]=[]),Vr[r].push((()=>{o[e]=qr[r],++i===a.length&&n(o)})))})),0===a.length&&n(o)},Yr=r=>{var e=Or[r];delete Or[r];var t=e.rawConstructor,n=e.rawDestructor,o=e.fields,a=o.map((r=>r.getterReturnType)).concat(o.map((r=>r.setterArgumentType)));Kr([r],a,(r=>{var a={};return o.forEach(((e,t)=>{var n=e.fieldName,i=r[t],s=e.getter,l=e.getterContext,u=r[t+o.length],d=e.setter,c=e.setterContext;a[n]={read:r=>i.fromWireType(s(l,r)),write:(r,e)=>{var t=[];d(c,r,u.toWireType(t,e)),Ur(t)}}})),[{name:e.name,fromWireType:r=>{var e={};for(var t in a)e[t]=a[t].read(r);return n(r),e},toWireType:(r,e)=>{for(var o in a)if(!(o in e))throw new TypeError(`Missing field: "${o}"`);var i=t();for(o in a)a[o].write(i,e[o]);return null!==r&&r.push(n,i),i},argPackAdvance:ne,readValueFromPointer:Br,destructorFunction:n}]}))},Jr=(r,e,t,n,o)=>{},Qr=()=>{for(var r=new Array(256),e=0;e<256;++e)r[e]=String.fromCharCode(e);Ir=r},Zr=r=>{for(var e="",t=r;y[t];)e+=Ir[y[t++]];return e},re=r=>{throw new Hr(r)};function ee(r,e,t={}){var n=e.name;if(r||re(`type "${n}" must have a positive integer typeid pointer`),qr.hasOwnProperty(r)){if(t.ignoreDuplicateRegistrations)return;re(`Cannot register type '${n}' twice`)}if(qr[r]=e,delete Xr[r],Vr.hasOwnProperty(r)){var o=Vr[r];delete Vr[r],o.forEach((r=>r()))}}function te(r,e,t={}){return ee(r,e,t)}var ne=8,oe=(r,e,t,n)=>{te(r,{name:e=Zr(e),fromWireType:function(r){return!!r},toWireType:function(r,e){return e?t:n},argPackAdvance:ne,readValueFromPointer:function(r){return this.fromWireType(y[r])},destructorFunction:null})},ae=[],ie=[],se=r=>{r>9&&0==--ie[r+1]&&(ie[r]=void 0,ae.push(r))},le=()=>ie.length/2-5-ae.length,ue=()=>{ie.push(0,1,void 0,1,null,1,!0,1,!1,1),s.count_emval_handles=le},de={toValue:r=>(r||re("Cannot use deleted val. handle = "+r),ie[r]),toHandle:r=>{switch(r){case void 0:return 2;case null:return 4;case!0:return 6;case!1:return 8;default:{const e=ae.pop()||ie.length;return ie[e]=r,ie[e+1]=1,e}}}},ce={name:"emscripten::val",fromWireType:r=>{var e=de.toValue(r);return se(r),e},toWireType:(r,e)=>de.toHandle(e),argPackAdvance:ne,readValueFromPointer:Br,destructorFunction:null},fe=r=>te(r,ce),he=(r,e)=>{switch(e){case 4:return function(r){return this.fromWireType(k[r>>2])};case 8:return function(r){return this.fromWireType(F[r>>3])};default:throw new TypeError(`invalid float width (${e}): ${r}`)}},me=(r,e,t)=>{te(r,{name:e=Zr(e),fromWireType:r=>r,toWireType:(r,e)=>e,argPackAdvance:ne,readValueFromPointer:he(e,t),destructorFunction:null})},pe=(r,e)=>Object.defineProperty(e,"name",{value:r});function ve(r){for(var e=1;e<r.length;++e)if(null!==r[e]&&void 0===r[e].destructorFunction)return!0;return!1}function we(r,e,t,n,o,a){var i=e.length;i<2&&re("argTypes array size mismatch! Must at least get return value and 'this' types!"),e[1];var s=ve(e),l="void"!==e[0].name,u=i-2,d=new Array(u),c=[],f=[];return pe(r,(function(...r){var t;f.length=0,c.length=1,c[0]=o;for(var a=0;a<u;++a)d[a]=e[a+2].toWireType(f,r[a]),c.push(d[a]);function i(r){if(s)Ur(f);else for(var n=2;n<e.length;n++){var o=1===n?t:d[n-2];null!==e[n].destructorFunction&&e[n].destructorFunction(o)}if(l)return e[0].fromWireType(r)}return i(n(...c))}))}var ye,ge,Ee=(r,e,t)=>{if(void 0===r[e].overloadTable){var n=r[e];r[e]=function(...n){return r[e].overloadTable.hasOwnProperty(n.length)||re(`Function '${t}' called with an invalid number of arguments (${n.length}) - expects one of (${r[e].overloadTable})!`),r[e].overloadTable[n.length].apply(this,n)},r[e].overloadTable=[],r[e].overloadTable[n.argCount]=n}},_e=(r,e,t)=>{s.hasOwnProperty(r)?((void 0===t||void 0!==s[r].overloadTable&&void 0!==s[r].overloadTable[t])&&re(`Cannot register public name '${r}' twice`),Ee(s,r,r),s[r].overloadTable.hasOwnProperty(t)&&re(`Cannot register multiple overloads of a function with the same number of arguments (${t})!`),s[r].overloadTable[t]=e):(s[r]=e,s[r].argCount=t)},be=(r,e)=>{for(var t=[],n=0;n<r;n++)t.push(b[e+4*n>>2]);return t},ke=(r,e,t)=>{s.hasOwnProperty(r)||Gr("Replacing nonexistent public symbol"),void 0!==s[r].overloadTable&&void 0!==t?s[r].overloadTable[t]=e:(s[r]=e,s[r].argCount=t)},Fe=(r,e,t)=>(r=r.replace(/p/g,"i"),(0,s["dynCall_"+r])(e,...t)),Pe=[],Ae=r=>{var e=Pe[r];return e||(r>=Pe.length&&(Pe.length=r+1),Pe[r]=e=ye.get(r)),e},Se=(r,e,t=[])=>r.includes("j")?Fe(r,e,t):Ae(e)(...t),De=(r,e)=>(...t)=>Se(r,e,t),$e=(r,e)=>{function t(){return r.includes("j")?De(r,e):Ae(e)}r=Zr(r);var n=t();return"function"!=typeof n&&re(`unknown function pointer with signature ${r}: ${e}`),n},Ce=(r,e)=>{var t=pe(e,(function(r){this.name=e,this.message=r;var t=new Error(r).stack;void 0!==t&&(this.stack=this.toString()+"\n"+t.replace(/^Error(:[^\n]*)?\n/,""))}));return t.prototype=Object.create(r.prototype),t.prototype.constructor=t,t.prototype.toString=function(){return void 0===this.message?this.name:`${this.name}: ${this.message}`},t},Te=r=>{var e=an(r),t=Zr(e);return ln(e),t},je=(r,e)=>{var t=[],n={};function o(r){n[r]||qr[r]||(Xr[r]?Xr[r].forEach(o):(t.push(r),n[r]=!0))}throw e.forEach(o),new ge(`${r}: `+t.map(Te).join([", "]))},Me=r=>{const e=(r=r.trim()).indexOf("(");return-1!==e?r.substr(0,e):r},xe=(r,e,t,n,o,a,i,s)=>{var l=be(e,t);r=Zr(r),r=Me(r),o=$e(n,o),_e(r,(function(){je(`Cannot call ${r} due to unbound types`,l)}),e-1),Kr([],l,(t=>{var n=[t[0],null].concat(t.slice(1));return ke(r,we(r,n,null,o,a),e-1),[]}))},Re=(r,e,t)=>{switch(e){case 1:return t?r=>w[r]:r=>y[r];case 2:return t?r=>g[r>>1]:r=>E[r>>1];case 4:return t?r=>_[r>>2]:r=>b[r>>2];default:throw new TypeError(`invalid integer width (${e}): ${r}`)}},Ne=(r,e,t,n,o)=>{e=Zr(e);var a=r=>r;if(0===n){var i=32-8*t;a=r=>r<<i>>>i}var s=e.includes("unsigned"),l=(r,e)=>{};te(r,{name:e,fromWireType:a,toWireType:s?function(r,e){return l(e,this.name),e>>>0}:function(r,e){return l(e,this.name),e},argPackAdvance:ne,readValueFromPointer:Re(e,t,0!==n),destructorFunction:null})},ze=(r,e,t)=>{var n=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array][e];function o(r){var e=b[r>>2],t=b[r+4>>2];return new n(w.buffer,t,e)}te(r,{name:t=Zr(t),fromWireType:o,argPackAdvance:ne,readValueFromPointer:o},{ignoreDuplicateRegistrations:!0})},We=(r,e,t)=>yr(r,y,e,t),Oe=(r,e)=>{var t="std::string"===(e=Zr(e));te(r,{name:e,fromWireType(r){var e,n=b[r>>2],o=r+4;if(t)for(var a=o,i=0;i<=n;++i){var s=o+i;if(i==n||0==y[s]){var l=Mr(a,s-a);void 0===e?e=l:(e+=String.fromCharCode(0),e+=l),a=s+1}}else{var u=new Array(n);for(i=0;i<n;++i)u[i]=String.fromCharCode(y[o+i]);e=u.join("")}return ln(r),e},toWireType(r,e){var n;e instanceof ArrayBuffer&&(e=new Uint8Array(e));var o="string"==typeof e;o||e instanceof Uint8Array||e instanceof Uint8ClampedArray||e instanceof Int8Array||re("Cannot pass non-string to std::string"),n=t&&o?wr(e):e.length;var a=sn(4+n+1),i=a+4;if(b[a>>2]=n,t&&o)We(e,i,n+1);else if(o)for(var s=0;s<n;++s){var l=e.charCodeAt(s);l>255&&(ln(i),re("String has UTF-16 code units that do not fit in 8 bits")),y[i+s]=l}else for(s=0;s<n;++s)y[i+s]=e[s];return null!==r&&r.push(ln,a),a},argPackAdvance:ne,readValueFromPointer:Br,destructorFunction(r){ln(r)}})},Ue="undefined"!=typeof TextDecoder?new TextDecoder("utf-16le"):void 0,Be=(r,e)=>{for(var t=r,n=t>>1,o=n+e/2;!(n>=o)&&E[n];)++n;if((t=n<<1)-r>32&&Ue)return Ue.decode(y.subarray(r,t));for(var a="",i=0;!(i>=e/2);++i){var s=g[r+2*i>>1];if(0==s)break;a+=String.fromCharCode(s)}return a},Le=(r,e,t)=>{if(t??=2147483647,t<2)return 0;for(var n=e,o=(t-=2)<2*r.length?t/2:r.length,a=0;a<o;++a){var i=r.charCodeAt(a);g[e>>1]=i,e+=2}return g[e>>1]=0,e-n},Ie=r=>2*r.length,He=(r,e)=>{for(var t=0,n="";!(t>=e/4);){var o=_[r+4*t>>2];if(0==o)break;if(++t,o>=65536){var a=o-65536;n+=String.fromCharCode(55296|a>>10,56320|1023&a)}else n+=String.fromCharCode(o)}return n},Ve=(r,e,t)=>{if(t??=2147483647,t<4)return 0;for(var n=e,o=n+t-4,a=0;a<r.length;++a){var i=r.charCodeAt(a);if(i>=55296&&i<=57343&&(i=65536+((1023&i)<<10)|1023&r.charCodeAt(++a)),_[e>>2]=i,(e+=4)+4>o)break}return _[e>>2]=0,e-n},qe=r=>{for(var e=0,t=0;t<r.length;++t){var n=r.charCodeAt(t);n>=55296&&n<=57343&&++t,e+=4}return e},Xe=(r,e,t)=>{var n,o,a,i;t=Zr(t),2===e?(n=Be,o=Le,i=Ie,a=r=>E[r>>1]):4===e&&(n=He,o=Ve,i=qe,a=r=>b[r>>2]),te(r,{name:t,fromWireType:r=>{for(var t,o=b[r>>2],i=r+4,s=0;s<=o;++s){var l=r+4+s*e;if(s==o||0==a(l)){var u=n(i,l-i);void 0===t?t=u:(t+=String.fromCharCode(0),t+=u),i=l+e}}return ln(r),t},toWireType:(r,n)=>{"string"!=typeof n&&re(`Cannot pass non-string to C++ string type ${t}`);var a=i(n),s=sn(4+a+e);return b[s>>2]=a/e,o(n,s+4,a+e),null!==r&&r.push(ln,s),s},argPackAdvance:ne,readValueFromPointer:Br,destructorFunction(r){ln(r)}})},Ge=(r,e,t,n,o,a)=>{Or[r]={name:Zr(e),rawConstructor:$e(t,n),rawDestructor:$e(o,a),fields:[]}},Ke=(r,e,t,n,o,a,i,s,l,u)=>{Or[r].fields.push({fieldName:Zr(e),getterReturnType:t,getter:$e(n,o),getterContext:a,setterArgumentType:i,setter:$e(s,l),setterContext:u})},Ye=(r,e)=>{te(r,{isVoid:!0,name:e=Zr(e),argPackAdvance:0,fromWireType:()=>{},toWireType:(r,e)=>{}})},Je=r=>{do{var e=b[r>>2],t=b[(r+=4)>>2],n=b[(r+=4)>>2];r+=4;var o=Mr(e);jr.createPath("/",dr.dirname(o),!0,!0),jr.createDataFile(o,null,w.subarray(n,n+t),!0,!0,!0)}while(b[r>>2])},Qe=(r,e,t)=>y.copyWithin(r,e,e+t),Ze=()=>{throw 1/0},rt=(r,e)=>{var t=qr[r];return void 0===t&&re(`${e} has unknown type ${Te(r)}`),t},et=(r,e,t)=>{var n=[],o=r.toWireType(n,t);return n.length&&(b[e>>2]=de.toHandle(n)),o},tt=(r,e,t)=>(r=de.toValue(r),e=rt(e,"emval::as"),et(e,t,r)),nt={},ot=r=>{var e=nt[r];return void 0===e?Zr(r):e},at=[],it=(r,e,t,n,o)=>(r=at[r])(e=de.toValue(e),e[t=ot(t)],n,o),st=()=>{if("object"==typeof globalThis)return globalThis;function e(r){r.$$$embind_global$$$=r;var e="object"==typeof $$$embind_global$$$&&r.$$$embind_global$$$==r;return e||delete r.$$$embind_global$$$,e}if("object"==typeof $$$embind_global$$$)return $$$embind_global$$$;if("object"==typeof r&&e(r)?$$$embind_global$$$=r:"object"==typeof self&&e(self)&&($$$embind_global$$$=self),"object"==typeof $$$embind_global$$$)return $$$embind_global$$$;throw Error("unable to get global object.")},lt=r=>0===r?de.toHandle(st()):(r=ot(r),de.toHandle(st()[r])),ut=r=>{var e=at.length;return at.push(r),e},dt=(r,e)=>{for(var t=new Array(r),n=0;n<r;++n)t[n]=rt(b[e+4*n>>2],"parameter "+n);return t},ct=Reflect.construct,ft=(r,e,t)=>{var n=dt(r,e),o=n.shift();r--;var a=new Array(r),i=(e,i,s,l)=>{for(var u=0,d=0;d<r;++d)a[d]=n[d].readValueFromPointer(l+u),u+=n[d].argPackAdvance;var c=1===t?ct(i,a):i.apply(e,a);return et(o,s,c)},s=`methodCaller<(${n.map((r=>r.name)).join(", ")}) => ${o.name}>`;return ut(pe(s,i))},ht=(r,e)=>(r=de.toValue(r),e=de.toValue(e),de.toHandle(r[e])),mt=r=>{r>9&&(ie[r+1]+=1)},pt=()=>de.toHandle([]),vt=r=>de.toHandle(ot(r)),wt=r=>{var e=de.toValue(r);Ur(e),se(r)},yt=(r,e,t)=>{r=de.toValue(r),e=de.toValue(e),t=de.toValue(t),r[e]=t},gt=(r,e)=>{var t=(r=rt(r,"_emval_take_value")).readValueFromPointer(e);return de.toHandle(t)},Et=(r,e,t,n)=>{var o=(new Date).getFullYear(),a=new Date(o,0,1),i=new Date(o,6,1),s=a.getTimezoneOffset(),l=i.getTimezoneOffset(),u=Math.max(s,l);b[r>>2]=60*u,_[e>>2]=Number(s!=l);var d=r=>{var e=r>=0?"-":"+",t=Math.abs(r);return`UTC${e}${String(Math.floor(t/60)).padStart(2,"0")}${String(t%60).padStart(2,"0")}`},c=d(s),f=d(l);l<s?(We(c,t,17),We(f,n,17)):(We(c,n,17),We(f,t,17))},_t=()=>2147483648,bt=r=>{var e=(r-v.buffer.byteLength+65535)/65536|0;try{return v.grow(e),S(),1}catch(t){}},kt=r=>{var e=y.length;r>>>=0;var t=_t();if(r>t)return!1;for(var n=1;n<=4;n*=2){var o=e*(1+.2/n);o=Math.min(o,r+100663296);var a=Math.min(t,br(Math.max(r,o),65536));if(bt(a))return!0}return!1},Ft={},Pt=()=>d||"./this.program",At=()=>{if(!At.strings){var r={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:("object"==typeof navigator&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",_:Pt()};for(var e in Ft)void 0===Ft[e]?delete r[e]:r[e]=Ft[e];var t=[];for(var e in r)t.push(`${e}=${r[e]}`);At.strings=t}return At.strings},St=(r,e)=>{for(var t=0;t<r.length;++t)w[e++]=r.charCodeAt(t);w[e]=0},Dt=(r,e)=>{var t=0;return At().forEach(((n,o)=>{var a=e+t;b[r+4*o>>2]=a,St(n,a),t+=n.length+1})),0},$t=(r,e)=>{var t=At();b[r>>2]=t.length;var n=0;return t.forEach((r=>n+=r.length+1)),b[e>>2]=n,0},Ct=0,Tt=()=>nr||Ct>0,jt=r=>{Tt()||(s.onExit?.(r),A=!0),c(r,new er(r))},Mt=(r,e)=>{jt(r)};function xt(r){try{var e=xr.getStreamFromFD(r);return jr.close(e),0}catch(t){if(void 0===jr||"ErrnoError"!==t.name)throw t;return t.errno}}var Rt=(r,e,t,n)=>{for(var o=0,a=0;a<t;a++){var i=b[e>>2],s=b[e+4>>2];e+=8;var l=jr.read(r,w,i,s,n);if(l<0)return-1;if(o+=l,l<s)break}return o};function Nt(r,e,t,n){try{var o=xr.getStreamFromFD(r),a=Rt(o,e,t);return b[n>>2]=a,0}catch(i){if(void 0===jr||"ErrnoError"!==i.name)throw i;return i.errno}}var zt=(r,e)=>e+2097152>>>0<4194305-!!r?(r>>>0)+4294967296*e:NaN;function Wt(r,e,t,n,o){var a=zt(e,t);try{if(isNaN(a))return 61;var i=xr.getStreamFromFD(r);return jr.llseek(i,a,n),V=[i.position>>>0,(H=i.position,+Math.abs(H)>=1?H>0?+Math.floor(H/4294967296)>>>0:~~+Math.ceil((H-+(~~H>>>0))/4294967296)>>>0:0)],_[o>>2]=V[0],_[o+4>>2]=V[1],i.getdents&&0===a&&0===n&&(i.getdents=null),0}catch(s){if(void 0===jr||"ErrnoError"!==s.name)throw s;return s.errno}}var Ot=(r,e,t,n)=>{for(var o=0,a=0;a<t;a++){var i=b[e>>2],s=b[e+4>>2];e+=8;var l=jr.write(r,w,i,s,n);if(l<0)return-1;if(o+=l,l<s)break}return o};function Ut(r,e,t,n){try{var o=xr.getStreamFromFD(r),a=Ot(o,e,t);return b[n>>2]=a,0}catch(i){if(void 0===jr||"ErrnoError"!==i.name)throw i;return i.errno}}var Bt,Lt=(r,e)=>{r<128?e.push(r):e.push(r%128|128,r>>7)},It=r=>{for(var e={i:"i32",j:"i64",f:"f32",d:"f64",e:"externref",p:"i32"},t={parameters:[],results:"v"==r[0]?[]:[e[r[0]]]},n=1;n<r.length;++n)t.parameters.push(e[r[n]]);return t},Ht=(r,e)=>{var t=r.slice(0,1),n=r.slice(1),o={i:127,p:127,j:126,f:125,d:124,e:111};e.push(96),Lt(n.length,e);for(var a=0;a<n.length;++a)e.push(o[n[a]]);"v"==t?e.push(0):e.push(1,o[t])},Vt=(r,e)=>{if("function"==typeof WebAssembly.Function)return new WebAssembly.Function(It(e),r);var t=[1];Ht(e,t);var n=[0,97,115,109,1,0,0,0,1];Lt(t.length,n),n.push(...t),n.push(2,7,1,1,101,1,102,0,0,7,5,1,1,102,0,0);var o=new WebAssembly.Module(new Uint8Array(n));return new WebAssembly.Instance(o,{e:{f:r}}).exports.f},qt=(r,e)=>{if(Bt)for(var t=r;t<r+e;t++){var n=Ae(t);n&&Bt.set(n,t)}},Xt=r=>(Bt||(Bt=new WeakMap,qt(0,ye.length)),Bt.get(r)||0),Gt=[],Kt=()=>{if(Gt.length)return Gt.pop();try{ye.grow(1)}catch(p){if(!(p instanceof RangeError))throw p;throw"Unable to grow wasm table. Set ALLOW_TABLE_GROWTH."}return ye.length-1},Yt=(r,e)=>{ye.set(r,e),Pe[r]=ye.get(r)},Jt=(r,e)=>{var t=Xt(r);if(t)return t;var n=Kt();try{Yt(n,r)}catch(p){if(!(p instanceof TypeError))throw p;var o=Vt(r,e);Yt(n,o)}return Bt.set(r,n),n},Qt=jr.createPath,Zt=r=>jr.unlink(r),rn=jr.createLazyFile,en=jr.createDevice;jr.createPreloadedFile=$r,jr.staticInit(),s.FS_createPath=jr.createPath,s.FS_createDataFile=jr.createDataFile,s.FS_createPreloadedFile=jr.createPreloadedFile,s.FS_unlink=jr.unlink,s.FS_createLazyFile=jr.createLazyFile,s.FS_createDevice=jr.createDevice,Fr.doesNotExistError=new jr.ErrnoError(44),Fr.doesNotExistError.stack="<generic error, no stack>",Lr=s.InternalError=class extends Error{constructor(r){super(r),this.name="InternalError"}},Qr(),Hr=s.BindingError=class extends Error{constructor(r){super(r),this.name="BindingError"}},ue(),ge=s.UnboundTypeError=Ce(Error,"UnboundTypeError");var tn,nn={i:sr,w:Rr,M:Nr,N:zr,P:Wr,V:Yr,F:Jr,T:oe,S:fe,y:me,q:xe,c:Ne,b:ze,x:Oe,p:Xe,W:Ge,k:Ke,U:Ye,R:Je,O:Qe,G:Ze,Y:tt,z:it,a:se,Z:lt,A:ft,m:ht,g:mt,B:pt,h:vt,r:wt,X:yt,l:gt,I:Et,H:kt,J:Dt,K:$t,Q:Mt,u:xt,L:Nt,E:Wt,v:Ut,n:fn,j:pn,o:wn,s:yn,D:En,t:vn,d:hn,C:_n,e:gn,f:mn},on=rr(),an=r=>(an=on.aa)(r),sn=s._malloc=r=>(sn=s._malloc=on.ca)(r),ln=s._free=r=>(ln=s._free=on.da)(r),un=(r,e)=>(un=on.ea)(r,e),dn=r=>(dn=on.fa)(r),cn=()=>(cn=on.ga)();function fn(r,e){var t=ar();try{return Ae(r)(e)}catch(n){if(or(t),n!==n+0)throw n;un(1,0)}}function hn(r,e){var t=ar();try{Ae(r)(e)}catch(n){if(or(t),n!==n+0)throw n;un(1,0)}}function mn(r,e,t,n){var o=ar();try{Ae(r)(e,t,n)}catch(a){if(or(o),a!==a+0)throw a;un(1,0)}}function pn(r,e,t){var n=ar();try{return Ae(r)(e,t)}catch(o){if(or(n),o!==o+0)throw o;un(1,0)}}function vn(r){var e=ar();try{Ae(r)()}catch(t){if(or(e),t!==t+0)throw t;un(1,0)}}function wn(r,e,t,n){var o=ar();try{return Ae(r)(e,t,n)}catch(a){if(or(o),a!==a+0)throw a;un(1,0)}}function yn(r,e,t,n,o){var a=ar();try{return Ae(r)(e,t,n,o)}catch(i){if(or(a),i!==i+0)throw i;un(1,0)}}function gn(r,e,t){var n=ar();try{Ae(r)(e,t)}catch(o){if(or(n),o!==o+0)throw o;un(1,0)}}function En(r,e,t,n,o,a,i,s,l,u){var d=ar();try{return Ae(r)(e,t,n,o,a,i,s,l,u)}catch(c){if(or(d),c!==c+0)throw c;un(1,0)}}function _n(r,e,t,n){var o=ar();try{Ae(r)(e,t,n)}catch(a){if(or(o),a!==a+0)throw a;un(1,0)}}function bn(){function r(){tn||(tn=!0,s.calledRun=!0,A||(j(),t(s),s.onRuntimeInitialized?.(),M()))}z>0||(T(),z>0||(s.setStatus?(s.setStatus("Running..."),setTimeout((()=>{setTimeout((()=>s.setStatus("")),1),r()}),1)):r()))}if(s.dynCall_viji=(r,e,t,n,o)=>(s.dynCall_viji=on.ha)(r,e,t,n,o),s.dynCall_ji=(r,e)=>(s.dynCall_ji=on.ia)(r,e),s.dynCall_jiji=(r,e,t,n,o)=>(s.dynCall_jiji=on.ja)(r,e,t,n,o),s.dynCall_viijii=(r,e,t,n,o,a,i)=>(s.dynCall_viijii=on.ka)(r,e,t,n,o,a,i),s.dynCall_iiiiij=(r,e,t,n,o,a,i)=>(s.dynCall_iiiiij=on.la)(r,e,t,n,o,a,i),s.dynCall_iiiiijj=(r,e,t,n,o,a,i,l,u)=>(s.dynCall_iiiiijj=on.ma)(r,e,t,n,o,a,i,l,u),s.dynCall_iiiiiijj=(r,e,t,n,o,a,i,l,u,d)=>(s.dynCall_iiiiiijj=on.na)(r,e,t,n,o,a,i,l,u,d),s.___emscripten_embedded_file_data=1277776,s.addRunDependency=U,s.removeRunDependency=B,s.addFunction=Jt,s.UTF8ToString=Mr,s.FS_createPreloadedFile=$r,s.FS_unlink=Zt,s.FS_createPath=Qt,s.FS_createDevice=en,s.FS_createDataFile=Ar,s.FS_createLazyFile=rn,W=function r(){tn||bn(),tn||(W=r)},s.preInit)for("function"==typeof s.preInit&&(s.preInit=[s.preInit]);s.preInit.length>0;)s.preInit.pop()();return bn(),l},e.exports=a),n.exports;var e,o,a}const a=e(o()),i=Object.freeze(Object.defineProperty({__proto__:null,default:a},Symbol.toStringTag,{value:"Module"}));export{i as l};
|
|
5
|
+
import{c as r,g as e}from"./_commonjsHelpers.js";var t,n={exports:{}};function o(){return t||(t=1,e=n,o="undefined"!=typeof document?document.currentScript?.src:void 0,a=function(e={}){var t,n,a,i,s=e,l=new Promise(((r,e)=>{t=r,n=e})),u=Object.assign({},s),d="./this.program",c=(r,e)=>{throw e},f="";function h(r){return s.locateFile?s.locateFile(r,f):f+r}"undefined"!=typeof document&&document.currentScript&&(f=document.currentScript.src),o&&(f=o),f=f.startsWith("blob:")?"":f.substr(0,f.replace(/[?#].*/,"").lastIndexOf("/")+1),a=r=>fetch(r,{credentials:"same-origin"}).then((r=>r.ok?r.arrayBuffer():Promise.reject(new Error(r.status+" : "+r.url))));var m=s.print||console.log.bind(console),p=s.printErr||console.error.bind(console);Object.assign(s,u),u=null,s.arguments&&s.arguments,s.thisProgram&&(d=s.thisProgram);var v,w,y,g,E,_,b,k,F,P=s.wasmBinary,A=!1;function S(){var r=v.buffer;s.HEAP8=w=new Int8Array(r),s.HEAP16=g=new Int16Array(r),s.HEAPU8=y=new Uint8Array(r),s.HEAPU16=E=new Uint16Array(r),s.HEAP32=_=new Int32Array(r),s.HEAPU32=b=new Uint32Array(r),s.HEAPF32=k=new Float32Array(r),s.HEAPF64=F=new Float64Array(r)}var D=[],$=[],C=[];function T(){if(s.preRun)for("function"==typeof s.preRun&&(s.preRun=[s.preRun]);s.preRun.length;)x(s.preRun.shift());tr(D)}function j(){s.noFSInit||jr.initialized||jr.init(),jr.ignorePermissions=!1,tr($)}function M(){if(s.postRun)for("function"==typeof s.postRun&&(s.postRun=[s.postRun]);s.postRun.length;)N(s.postRun.shift());tr(C)}function x(r){D.unshift(r)}function R(r){$.unshift(r)}function N(r){C.unshift(r)}var z=0,W=null;function O(r){return r}function U(r){z++,s.monitorRunDependencies?.(z)}function B(r){if(z--,s.monitorRunDependencies?.(z),0==z&&W){var e=W;W=null,e()}}function L(r){s.onAbort?.(r),p(r="Aborted("+r+")"),A=!0,r+=". Build with -sASSERTIONS for more info.";var e=new WebAssembly.RuntimeError(r);throw n(e),e}var I,H,V,q="data:application/octet-stream;base64,",X=r=>r.startsWith(q);function G(){var r="lyr3DWorker.wasm";return X(r)?r:h(r)}function K(r){if(r==I&&P)return new Uint8Array(P);throw"both async and sync fetching of the wasm failed"}function Y(r){return P?Promise.resolve().then((()=>K(r))):a(r).then((r=>new Uint8Array(r)),(()=>K(r)))}function J(r,e,t){return Y(r).then((r=>WebAssembly.instantiate(r,e))).then(t,(r=>{p(`failed to asynchronously prepare wasm: ${r}`),L(r)}))}function Q(r,e,t,n){return r||"function"!=typeof WebAssembly.instantiateStreaming||X(e)||"function"!=typeof fetch?J(e,t,n):fetch(e,{credentials:"same-origin"}).then((r=>WebAssembly.instantiateStreaming(r,t).then(n,(function(r){return p(`wasm streaming compile failed: ${r}`),p("falling back to ArrayBuffer instantiation"),J(e,t,n)}))))}function Z(){return{a:nn}}function rr(){function r(r,e){return on=r.exports,v=on._,S(),ye=on.ba,R(on.$),B(),on}function e(e){r(e.instance)}U();var t=Z();if(s.instantiateWasm)try{return s.instantiateWasm(t,r)}catch(o){p(`Module.instantiateWasm callback failed with error: ${o}`),n(o)}return I??=G(),Q(P,I,t,e).catch(n),{}}class er{name="ExitStatus";constructor(r){this.message=`Program terminated with exit(${r})`,this.status=r}}var tr=r=>{for(;r.length>0;)r.shift()(s)},nr=s.noExitRuntime||!0,or=r=>dn(r),ar=()=>cn();class ir{constructor(r){this.excPtr=r,this.ptr=r-24}set_type(r){b[this.ptr+4>>2]=r}get_type(){return b[this.ptr+4>>2]}set_destructor(r){b[this.ptr+8>>2]=r}get_destructor(){return b[this.ptr+8>>2]}set_caught(r){r=r?1:0,w[this.ptr+12]=r}get_caught(){return 0!=w[this.ptr+12]}set_rethrown(r){r=r?1:0,w[this.ptr+13]=r}get_rethrown(){return 0!=w[this.ptr+13]}init(r,e){this.set_adjusted_ptr(0),this.set_type(r),this.set_destructor(e)}set_adjusted_ptr(r){b[this.ptr+16>>2]=r}get_adjusted_ptr(){return b[this.ptr+16>>2]}}var sr=(r,e,t)=>{throw new ir(r).init(e,t),r},lr=()=>{var r=_[+xr.varargs>>2];return xr.varargs+=4,r},ur=lr,dr={isAbs:r=>"/"===r.charAt(0),splitPath:r=>/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(r).slice(1),normalizeArray:(r,e)=>{for(var t=0,n=r.length-1;n>=0;n--){var o=r[n];"."===o?r.splice(n,1):".."===o?(r.splice(n,1),t++):t&&(r.splice(n,1),t--)}if(e)for(;t;t--)r.unshift("..");return r},normalize:r=>{var e=dr.isAbs(r),t="/"===r.substr(-1);return(r=dr.normalizeArray(r.split("/").filter((r=>!!r)),!e).join("/"))||e||(r="."),r&&t&&(r+="/"),(e?"/":"")+r},dirname:r=>{var e=dr.splitPath(r),t=e[0],n=e[1];return t||n?(n&&(n=n.substr(0,n.length-1)),t+n):"."},basename:r=>{if("/"===r)return"/";var e=(r=(r=dr.normalize(r)).replace(/\/$/,"")).lastIndexOf("/");return-1===e?r:r.substr(e+1)},join:(...r)=>dr.normalize(r.join("/")),join2:(r,e)=>dr.normalize(r+"/"+e)},cr=()=>{if("object"==typeof crypto&&"function"==typeof crypto.getRandomValues)return r=>crypto.getRandomValues(r);L("initRandomDevice")},fr=r=>(fr=cr())(r),hr={resolve:(...r)=>{for(var e="",t=!1,n=r.length-1;n>=-1&&!t;n--){var o=n>=0?r[n]:jr.cwd();if("string"!=typeof o)throw new TypeError("Arguments to path.resolve must be strings");if(!o)return"";e=o+"/"+e,t=dr.isAbs(o)}return(t?"/":"")+(e=dr.normalizeArray(e.split("/").filter((r=>!!r)),!t).join("/"))||"."},relative:(r,e)=>{function t(r){for(var e=0;e<r.length&&""===r[e];e++);for(var t=r.length-1;t>=0&&""===r[t];t--);return e>t?[]:r.slice(e,t-e+1)}r=hr.resolve(r).substr(1),e=hr.resolve(e).substr(1);for(var n=t(r.split("/")),o=t(e.split("/")),a=Math.min(n.length,o.length),i=a,s=0;s<a;s++)if(n[s]!==o[s]){i=s;break}var l=[];for(s=i;s<n.length;s++)l.push("..");return(l=l.concat(o.slice(i))).join("/")}},mr="undefined"!=typeof TextDecoder?new TextDecoder:void 0,pr=(r,e=0,t=NaN)=>{for(var n=e+t,o=e;r[o]&&!(o>=n);)++o;if(o-e>16&&r.buffer&&mr)return mr.decode(r.subarray(e,o));for(var a="";e<o;){var i=r[e++];if(128&i){var s=63&r[e++];if(192!=(224&i)){var l=63&r[e++];if((i=224==(240&i)?(15&i)<<12|s<<6|l:(7&i)<<18|s<<12|l<<6|63&r[e++])<65536)a+=String.fromCharCode(i);else{var u=i-65536;a+=String.fromCharCode(55296|u>>10,56320|1023&u)}}else a+=String.fromCharCode((31&i)<<6|s)}else a+=String.fromCharCode(i)}return a},vr=[],wr=r=>{for(var e=0,t=0;t<r.length;++t){var n=r.charCodeAt(t);n<=127?e++:n<=2047?e+=2:n>=55296&&n<=57343?(e+=4,++t):e+=3}return e},yr=(r,e,t,n)=>{if(!(n>0))return 0;for(var o=t,a=t+n-1,i=0;i<r.length;++i){var s=r.charCodeAt(i);if(s>=55296&&s<=57343&&(s=65536+((1023&s)<<10)|1023&r.charCodeAt(++i)),s<=127){if(t>=a)break;e[t++]=s}else if(s<=2047){if(t+1>=a)break;e[t++]=192|s>>6,e[t++]=128|63&s}else if(s<=65535){if(t+2>=a)break;e[t++]=224|s>>12,e[t++]=128|s>>6&63,e[t++]=128|63&s}else{if(t+3>=a)break;e[t++]=240|s>>18,e[t++]=128|s>>12&63,e[t++]=128|s>>6&63,e[t++]=128|63&s}}return e[t]=0,t-o};function gr(r,e,t){var n=wr(r)+1,o=new Array(n),a=yr(r,o,0,o.length);return o.length=a,o}var Er=()=>{if(!vr.length){var r=null;if("undefined"!=typeof window&&"function"==typeof window.prompt&&null!==(r=window.prompt("Input: "))&&(r+="\n"),!r)return null;vr=gr(r)}return vr.shift()},_r={ttys:[],init(){},shutdown(){},register(r,e){_r.ttys[r]={input:[],output:[],ops:e},jr.registerDevice(r,_r.stream_ops)},stream_ops:{open(r){var e=_r.ttys[r.node.rdev];if(!e)throw new jr.ErrnoError(43);r.tty=e,r.seekable=!1},close(r){r.tty.ops.fsync(r.tty)},fsync(r){r.tty.ops.fsync(r.tty)},read(r,e,t,n,o){if(!r.tty||!r.tty.ops.get_char)throw new jr.ErrnoError(60);for(var a=0,i=0;i<n;i++){var s;try{s=r.tty.ops.get_char(r.tty)}catch(l){throw new jr.ErrnoError(29)}if(void 0===s&&0===a)throw new jr.ErrnoError(6);if(null==s)break;a++,e[t+i]=s}return a&&(r.node.timestamp=Date.now()),a},write(r,e,t,n,o){if(!r.tty||!r.tty.ops.put_char)throw new jr.ErrnoError(60);try{for(var a=0;a<n;a++)r.tty.ops.put_char(r.tty,e[t+a])}catch(i){throw new jr.ErrnoError(29)}return n&&(r.node.timestamp=Date.now()),a}},default_tty_ops:{get_char:r=>Er(),put_char(r,e){null===e||10===e?(m(pr(r.output)),r.output=[]):0!=e&&r.output.push(e)},fsync(r){r.output&&r.output.length>0&&(m(pr(r.output)),r.output=[])},ioctl_tcgets:r=>({c_iflag:25856,c_oflag:5,c_cflag:191,c_lflag:35387,c_cc:[3,28,127,21,4,0,1,0,17,19,26,0,18,15,23,22,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]}),ioctl_tcsets:(r,e,t)=>0,ioctl_tiocgwinsz:r=>[24,80]},default_tty1_ops:{put_char(r,e){null===e||10===e?(p(pr(r.output)),r.output=[]):0!=e&&r.output.push(e)},fsync(r){r.output&&r.output.length>0&&(p(pr(r.output)),r.output=[])}}},br=(r,e)=>Math.ceil(r/e)*e,kr=r=>{L()},Fr={ops_table:null,mount:r=>Fr.createNode(null,"/",16895,0),createNode(r,e,t,n){if(jr.isBlkdev(t)||jr.isFIFO(t))throw new jr.ErrnoError(63);Fr.ops_table||={dir:{node:{getattr:Fr.node_ops.getattr,setattr:Fr.node_ops.setattr,lookup:Fr.node_ops.lookup,mknod:Fr.node_ops.mknod,rename:Fr.node_ops.rename,unlink:Fr.node_ops.unlink,rmdir:Fr.node_ops.rmdir,readdir:Fr.node_ops.readdir,symlink:Fr.node_ops.symlink},stream:{llseek:Fr.stream_ops.llseek}},file:{node:{getattr:Fr.node_ops.getattr,setattr:Fr.node_ops.setattr},stream:{llseek:Fr.stream_ops.llseek,read:Fr.stream_ops.read,write:Fr.stream_ops.write,allocate:Fr.stream_ops.allocate,mmap:Fr.stream_ops.mmap,msync:Fr.stream_ops.msync}},link:{node:{getattr:Fr.node_ops.getattr,setattr:Fr.node_ops.setattr,readlink:Fr.node_ops.readlink},stream:{}},chrdev:{node:{getattr:Fr.node_ops.getattr,setattr:Fr.node_ops.setattr},stream:jr.chrdev_stream_ops}};var o=jr.createNode(r,e,t,n);return jr.isDir(o.mode)?(o.node_ops=Fr.ops_table.dir.node,o.stream_ops=Fr.ops_table.dir.stream,o.contents={}):jr.isFile(o.mode)?(o.node_ops=Fr.ops_table.file.node,o.stream_ops=Fr.ops_table.file.stream,o.usedBytes=0,o.contents=null):jr.isLink(o.mode)?(o.node_ops=Fr.ops_table.link.node,o.stream_ops=Fr.ops_table.link.stream):jr.isChrdev(o.mode)&&(o.node_ops=Fr.ops_table.chrdev.node,o.stream_ops=Fr.ops_table.chrdev.stream),o.timestamp=Date.now(),r&&(r.contents[e]=o,r.timestamp=o.timestamp),o},getFileDataAsTypedArray:r=>r.contents?r.contents.subarray?r.contents.subarray(0,r.usedBytes):new Uint8Array(r.contents):new Uint8Array(0),expandFileStorage(r,e){var t=r.contents?r.contents.length:0;if(!(t>=e)){var n=1048576;e=Math.max(e,t*(t<n?2:1.125)>>>0),0!=t&&(e=Math.max(e,256));var o=r.contents;r.contents=new Uint8Array(e),r.usedBytes>0&&r.contents.set(o.subarray(0,r.usedBytes),0)}},resizeFileStorage(r,e){if(r.usedBytes!=e)if(0==e)r.contents=null,r.usedBytes=0;else{var t=r.contents;r.contents=new Uint8Array(e),t&&r.contents.set(t.subarray(0,Math.min(e,r.usedBytes))),r.usedBytes=e}},node_ops:{getattr(r){var e={};return e.dev=jr.isChrdev(r.mode)?r.id:1,e.ino=r.id,e.mode=r.mode,e.nlink=1,e.uid=0,e.gid=0,e.rdev=r.rdev,jr.isDir(r.mode)?e.size=4096:jr.isFile(r.mode)?e.size=r.usedBytes:jr.isLink(r.mode)?e.size=r.link.length:e.size=0,e.atime=new Date(r.timestamp),e.mtime=new Date(r.timestamp),e.ctime=new Date(r.timestamp),e.blksize=4096,e.blocks=Math.ceil(e.size/e.blksize),e},setattr(r,e){void 0!==e.mode&&(r.mode=e.mode),void 0!==e.timestamp&&(r.timestamp=e.timestamp),void 0!==e.size&&Fr.resizeFileStorage(r,e.size)},lookup(r,e){throw Fr.doesNotExistError},mknod:(r,e,t,n)=>Fr.createNode(r,e,t,n),rename(r,e,t){if(jr.isDir(r.mode)){var n;try{n=jr.lookupNode(e,t)}catch(a){}if(n)for(var o in n.contents)throw new jr.ErrnoError(55)}delete r.parent.contents[r.name],r.parent.timestamp=Date.now(),r.name=t,e.contents[t]=r,e.timestamp=r.parent.timestamp},unlink(r,e){delete r.contents[e],r.timestamp=Date.now()},rmdir(r,e){var t=jr.lookupNode(r,e);for(var n in t.contents)throw new jr.ErrnoError(55);delete r.contents[e],r.timestamp=Date.now()},readdir(r){var e=[".",".."];for(var t of Object.keys(r.contents))e.push(t);return e},symlink(r,e,t){var n=Fr.createNode(r,e,41471,0);return n.link=t,n},readlink(r){if(!jr.isLink(r.mode))throw new jr.ErrnoError(28);return r.link}},stream_ops:{read(r,e,t,n,o){var a=r.node.contents;if(o>=r.node.usedBytes)return 0;var i=Math.min(r.node.usedBytes-o,n);if(i>8&&a.subarray)e.set(a.subarray(o,o+i),t);else for(var s=0;s<i;s++)e[t+s]=a[o+s];return i},write(r,e,t,n,o,a){if(e.buffer===w.buffer&&(a=!1),!n)return 0;var i=r.node;if(i.timestamp=Date.now(),e.subarray&&(!i.contents||i.contents.subarray)){if(a)return i.contents=e.subarray(t,t+n),i.usedBytes=n,n;if(0===i.usedBytes&&0===o)return i.contents=e.slice(t,t+n),i.usedBytes=n,n;if(o+n<=i.usedBytes)return i.contents.set(e.subarray(t,t+n),o),n}if(Fr.expandFileStorage(i,o+n),i.contents.subarray&&e.subarray)i.contents.set(e.subarray(t,t+n),o);else for(var s=0;s<n;s++)i.contents[o+s]=e[t+s];return i.usedBytes=Math.max(i.usedBytes,o+n),n},llseek(r,e,t){var n=e;if(1===t?n+=r.position:2===t&&jr.isFile(r.node.mode)&&(n+=r.node.usedBytes),n<0)throw new jr.ErrnoError(28);return n},allocate(r,e,t){Fr.expandFileStorage(r.node,e+t),r.node.usedBytes=Math.max(r.node.usedBytes,e+t)},mmap(r,e,t,n,o){if(!jr.isFile(r.node.mode))throw new jr.ErrnoError(43);var a,i,s=r.node.contents;if(2&o||!s||s.buffer!==w.buffer){if(i=!0,!(a=kr()))throw new jr.ErrnoError(48);s&&((t>0||t+e<s.length)&&(s=s.subarray?s.subarray(t,t+e):Array.prototype.slice.call(s,t,t+e)),w.set(s,a))}else i=!1,a=s.byteOffset;return{ptr:a,allocated:i}},msync:(r,e,t,n,o)=>(Fr.stream_ops.write(r,e,0,n,t,!1),0)}},Pr=(r,e,t,n)=>{var o=O(`al ${r}`);a(r).then((r=>{e(new Uint8Array(r)),o&&B()}),(e=>{if(!t)throw`Loading data file "${r}" failed.`;t()})),o&&U()},Ar=(r,e,t,n,o,a)=>{jr.createDataFile(r,e,t,n,o,a)},Sr=s.preloadPlugins||[],Dr=(r,e,t,n)=>{"undefined"!=typeof Browser&&Browser.init();var o=!1;return Sr.forEach((a=>{o||a.canHandle(e)&&(a.handle(r,e,t,n),o=!0)})),o},$r=(r,e,t,n,o,a,i,s,l,u)=>{var d=e?hr.resolve(dr.join2(r,e)):r;function c(t){function c(t){u?.(),s||Ar(r,e,t,n,o,l),a?.(),B()}Dr(t,d,c,(()=>{i?.(),B()}))||c(t)}U(),"string"==typeof t?Pr(t,c,i):c(t)},Cr=r=>{var e={r:0,"r+":2,w:577,"w+":578,a:1089,"a+":1090}[r];if(void 0===e)throw new Error(`Unknown file open mode: ${r}`);return e},Tr=(r,e)=>{var t=0;return r&&(t|=365),e&&(t|=146),t},jr={root:null,mounts:[],devices:{},streams:[],nextInode:1,nameTable:null,currentPath:"/",initialized:!1,ignorePermissions:!0,ErrnoError:class{name="ErrnoError";constructor(r){this.errno=r}},filesystems:null,syncFSRequests:0,readFiles:{},FSStream:class{shared={};get object(){return this.node}set object(r){this.node=r}get isRead(){return 1!=(2097155&this.flags)}get isWrite(){return!!(2097155&this.flags)}get isAppend(){return 1024&this.flags}get flags(){return this.shared.flags}set flags(r){this.shared.flags=r}get position(){return this.shared.position}set position(r){this.shared.position=r}},FSNode:class{node_ops={};stream_ops={};readMode=365;writeMode=146;mounted=null;constructor(r,e,t,n){r||(r=this),this.parent=r,this.mount=r.mount,this.id=jr.nextInode++,this.name=e,this.mode=t,this.rdev=n}get read(){return(this.mode&this.readMode)===this.readMode}set read(r){r?this.mode|=this.readMode:this.mode&=~this.readMode}get write(){return(this.mode&this.writeMode)===this.writeMode}set write(r){r?this.mode|=this.writeMode:this.mode&=~this.writeMode}get isFolder(){return jr.isDir(this.mode)}get isDevice(){return jr.isChrdev(this.mode)}},lookupPath(r,e={}){if(!(r=hr.resolve(r)))return{path:"",node:null};var t={follow_mount:!0,recurse_count:0};if((e=Object.assign(t,e)).recurse_count>8)throw new jr.ErrnoError(32);for(var n=r.split("/").filter((r=>!!r)),o=jr.root,a="/",i=0;i<n.length;i++){var s=i===n.length-1;if(s&&e.parent)break;if(o=jr.lookupNode(o,n[i]),a=dr.join2(a,n[i]),jr.isMountpoint(o)&&(!s||s&&e.follow_mount)&&(o=o.mounted.root),!s||e.follow)for(var l=0;jr.isLink(o.mode);){var u=jr.readlink(a);if(a=hr.resolve(dr.dirname(a),u),o=jr.lookupPath(a,{recurse_count:e.recurse_count+1}).node,l++>40)throw new jr.ErrnoError(32)}}return{path:a,node:o}},getPath(r){for(var e;;){if(jr.isRoot(r)){var t=r.mount.mountpoint;return e?"/"!==t[t.length-1]?`${t}/${e}`:t+e:t}e=e?`${r.name}/${e}`:r.name,r=r.parent}},hashName(r,e){for(var t=0,n=0;n<e.length;n++)t=(t<<5)-t+e.charCodeAt(n)|0;return(r+t>>>0)%jr.nameTable.length},hashAddNode(r){var e=jr.hashName(r.parent.id,r.name);r.name_next=jr.nameTable[e],jr.nameTable[e]=r},hashRemoveNode(r){var e=jr.hashName(r.parent.id,r.name);if(jr.nameTable[e]===r)jr.nameTable[e]=r.name_next;else for(var t=jr.nameTable[e];t;){if(t.name_next===r){t.name_next=r.name_next;break}t=t.name_next}},lookupNode(r,e){var t=jr.mayLookup(r);if(t)throw new jr.ErrnoError(t);for(var n=jr.hashName(r.id,e),o=jr.nameTable[n];o;o=o.name_next){var a=o.name;if(o.parent.id===r.id&&a===e)return o}return jr.lookup(r,e)},createNode(r,e,t,n){var o=new jr.FSNode(r,e,t,n);return jr.hashAddNode(o),o},destroyNode(r){jr.hashRemoveNode(r)},isRoot:r=>r===r.parent,isMountpoint:r=>!!r.mounted,isFile:r=>32768==(61440&r),isDir:r=>16384==(61440&r),isLink:r=>40960==(61440&r),isChrdev:r=>8192==(61440&r),isBlkdev:r=>24576==(61440&r),isFIFO:r=>4096==(61440&r),isSocket:r=>!(49152&~r),flagsToPermissionString(r){var e=["r","w","rw"][3&r];return 512&r&&(e+="w"),e},nodePermissions:(r,e)=>jr.ignorePermissions||(!e.includes("r")||292&r.mode)&&(!e.includes("w")||146&r.mode)&&(!e.includes("x")||73&r.mode)?0:2,mayLookup(r){if(!jr.isDir(r.mode))return 54;var e=jr.nodePermissions(r,"x");return e||(r.node_ops.lookup?0:2)},mayCreate(r,e){try{return jr.lookupNode(r,e),20}catch(t){}return jr.nodePermissions(r,"wx")},mayDelete(r,e,t){var n;try{n=jr.lookupNode(r,e)}catch(a){return a.errno}var o=jr.nodePermissions(r,"wx");if(o)return o;if(t){if(!jr.isDir(n.mode))return 54;if(jr.isRoot(n)||jr.getPath(n)===jr.cwd())return 10}else if(jr.isDir(n.mode))return 31;return 0},mayOpen:(r,e)=>r?jr.isLink(r.mode)?32:jr.isDir(r.mode)&&("r"!==jr.flagsToPermissionString(e)||512&e)?31:jr.nodePermissions(r,jr.flagsToPermissionString(e)):44,MAX_OPEN_FDS:4096,nextfd(){for(var r=0;r<=jr.MAX_OPEN_FDS;r++)if(!jr.streams[r])return r;throw new jr.ErrnoError(33)},getStreamChecked(r){var e=jr.getStream(r);if(!e)throw new jr.ErrnoError(8);return e},getStream:r=>jr.streams[r],createStream:(r,e=-1)=>(r=Object.assign(new jr.FSStream,r),-1==e&&(e=jr.nextfd()),r.fd=e,jr.streams[e]=r,r),closeStream(r){jr.streams[r]=null},dupStream(r,e=-1){var t=jr.createStream(r,e);return t.stream_ops?.dup?.(t),t},chrdev_stream_ops:{open(r){var e=jr.getDevice(r.node.rdev);r.stream_ops=e.stream_ops,r.stream_ops.open?.(r)},llseek(){throw new jr.ErrnoError(70)}},major:r=>r>>8,minor:r=>255&r,makedev:(r,e)=>r<<8|e,registerDevice(r,e){jr.devices[r]={stream_ops:e}},getDevice:r=>jr.devices[r],getMounts(r){for(var e=[],t=[r];t.length;){var n=t.pop();e.push(n),t.push(...n.mounts)}return e},syncfs(r,e){"function"==typeof r&&(e=r,r=!1),jr.syncFSRequests++,jr.syncFSRequests>1&&p(`warning: ${jr.syncFSRequests} FS.syncfs operations in flight at once, probably just doing extra work`);var t=jr.getMounts(jr.root.mount),n=0;function o(r){return jr.syncFSRequests--,e(r)}function a(r){if(r)return a.errored?void 0:(a.errored=!0,o(r));++n>=t.length&&o(null)}t.forEach((e=>{if(!e.type.syncfs)return a(null);e.type.syncfs(e,r,a)}))},mount(r,e,t){var n,o="/"===t,a=!t;if(o&&jr.root)throw new jr.ErrnoError(10);if(!o&&!a){var i=jr.lookupPath(t,{follow_mount:!1});if(t=i.path,n=i.node,jr.isMountpoint(n))throw new jr.ErrnoError(10);if(!jr.isDir(n.mode))throw new jr.ErrnoError(54)}var s={type:r,opts:e,mountpoint:t,mounts:[]},l=r.mount(s);return l.mount=s,s.root=l,o?jr.root=l:n&&(n.mounted=s,n.mount&&n.mount.mounts.push(s)),l},unmount(r){var e=jr.lookupPath(r,{follow_mount:!1});if(!jr.isMountpoint(e.node))throw new jr.ErrnoError(28);var t=e.node,n=t.mounted,o=jr.getMounts(n);Object.keys(jr.nameTable).forEach((r=>{for(var e=jr.nameTable[r];e;){var t=e.name_next;o.includes(e.mount)&&jr.destroyNode(e),e=t}})),t.mounted=null;var a=t.mount.mounts.indexOf(n);t.mount.mounts.splice(a,1)},lookup:(r,e)=>r.node_ops.lookup(r,e),mknod(r,e,t){var n=jr.lookupPath(r,{parent:!0}).node,o=dr.basename(r);if(!o||"."===o||".."===o)throw new jr.ErrnoError(28);var a=jr.mayCreate(n,o);if(a)throw new jr.ErrnoError(a);if(!n.node_ops.mknod)throw new jr.ErrnoError(63);return n.node_ops.mknod(n,o,e,t)},statfs(r){var e={bsize:4096,frsize:4096,blocks:1e6,bfree:5e5,bavail:5e5,files:jr.nextInode,ffree:jr.nextInode-1,fsid:42,flags:2,namelen:255},t=jr.lookupPath(r,{follow:!0}).node;return t?.node_ops.statfs&&Object.assign(e,t.node_ops.statfs(t.mount.opts.root)),e},create:(r,e=438)=>(e&=4095,e|=32768,jr.mknod(r,e,0)),mkdir:(r,e=511)=>(e&=1023,e|=16384,jr.mknod(r,e,0)),mkdirTree(r,e){for(var t=r.split("/"),n="",o=0;o<t.length;++o)if(t[o]){n+="/"+t[o];try{jr.mkdir(n,e)}catch(a){if(20!=a.errno)throw a}}},mkdev:(r,e,t)=>(void 0===t&&(t=e,e=438),e|=8192,jr.mknod(r,e,t)),symlink(r,e){if(!hr.resolve(r))throw new jr.ErrnoError(44);var t=jr.lookupPath(e,{parent:!0}).node;if(!t)throw new jr.ErrnoError(44);var n=dr.basename(e),o=jr.mayCreate(t,n);if(o)throw new jr.ErrnoError(o);if(!t.node_ops.symlink)throw new jr.ErrnoError(63);return t.node_ops.symlink(t,n,r)},rename(r,e){var t,n,o=dr.dirname(r),a=dr.dirname(e),i=dr.basename(r),s=dr.basename(e);if(t=jr.lookupPath(r,{parent:!0}).node,n=jr.lookupPath(e,{parent:!0}).node,!t||!n)throw new jr.ErrnoError(44);if(t.mount!==n.mount)throw new jr.ErrnoError(75);var l,u=jr.lookupNode(t,i),d=hr.relative(r,a);if("."!==d.charAt(0))throw new jr.ErrnoError(28);if("."!==(d=hr.relative(e,o)).charAt(0))throw new jr.ErrnoError(55);try{l=jr.lookupNode(n,s)}catch(h){}if(u!==l){var c=jr.isDir(u.mode),f=jr.mayDelete(t,i,c);if(f)throw new jr.ErrnoError(f);if(f=l?jr.mayDelete(n,s,c):jr.mayCreate(n,s))throw new jr.ErrnoError(f);if(!t.node_ops.rename)throw new jr.ErrnoError(63);if(jr.isMountpoint(u)||l&&jr.isMountpoint(l))throw new jr.ErrnoError(10);if(n!==t&&(f=jr.nodePermissions(t,"w")))throw new jr.ErrnoError(f);jr.hashRemoveNode(u);try{t.node_ops.rename(u,n,s),u.parent=n}catch(h){throw h}finally{jr.hashAddNode(u)}}},rmdir(r){var e=jr.lookupPath(r,{parent:!0}).node,t=dr.basename(r),n=jr.lookupNode(e,t),o=jr.mayDelete(e,t,!0);if(o)throw new jr.ErrnoError(o);if(!e.node_ops.rmdir)throw new jr.ErrnoError(63);if(jr.isMountpoint(n))throw new jr.ErrnoError(10);e.node_ops.rmdir(e,t),jr.destroyNode(n)},readdir(r){var e=jr.lookupPath(r,{follow:!0}).node;if(!e.node_ops.readdir)throw new jr.ErrnoError(54);return e.node_ops.readdir(e)},unlink(r){var e=jr.lookupPath(r,{parent:!0}).node;if(!e)throw new jr.ErrnoError(44);var t=dr.basename(r),n=jr.lookupNode(e,t),o=jr.mayDelete(e,t,!1);if(o)throw new jr.ErrnoError(o);if(!e.node_ops.unlink)throw new jr.ErrnoError(63);if(jr.isMountpoint(n))throw new jr.ErrnoError(10);e.node_ops.unlink(e,t),jr.destroyNode(n)},readlink(r){var e=jr.lookupPath(r).node;if(!e)throw new jr.ErrnoError(44);if(!e.node_ops.readlink)throw new jr.ErrnoError(28);return e.node_ops.readlink(e)},stat(r,e){var t=jr.lookupPath(r,{follow:!e}).node;if(!t)throw new jr.ErrnoError(44);if(!t.node_ops.getattr)throw new jr.ErrnoError(63);return t.node_ops.getattr(t)},lstat:r=>jr.stat(r,!0),chmod(r,e,t){var n;if(!(n="string"==typeof r?jr.lookupPath(r,{follow:!t}).node:r).node_ops.setattr)throw new jr.ErrnoError(63);n.node_ops.setattr(n,{mode:4095&e|-4096&n.mode,timestamp:Date.now()})},lchmod(r,e){jr.chmod(r,e,!0)},fchmod(r,e){var t=jr.getStreamChecked(r);jr.chmod(t.node,e)},chown(r,e,t,n){var o;if(!(o="string"==typeof r?jr.lookupPath(r,{follow:!n}).node:r).node_ops.setattr)throw new jr.ErrnoError(63);o.node_ops.setattr(o,{timestamp:Date.now()})},lchown(r,e,t){jr.chown(r,e,t,!0)},fchown(r,e,t){var n=jr.getStreamChecked(r);jr.chown(n.node,e,t)},truncate(r,e){if(e<0)throw new jr.ErrnoError(28);var t;if(!(t="string"==typeof r?jr.lookupPath(r,{follow:!0}).node:r).node_ops.setattr)throw new jr.ErrnoError(63);if(jr.isDir(t.mode))throw new jr.ErrnoError(31);if(!jr.isFile(t.mode))throw new jr.ErrnoError(28);var n=jr.nodePermissions(t,"w");if(n)throw new jr.ErrnoError(n);t.node_ops.setattr(t,{size:e,timestamp:Date.now()})},ftruncate(r,e){var t=jr.getStreamChecked(r);if(!(2097155&t.flags))throw new jr.ErrnoError(28);jr.truncate(t.node,e)},utime(r,e,t){var n=jr.lookupPath(r,{follow:!0}).node;n.node_ops.setattr(n,{timestamp:Math.max(e,t)})},open(r,e,t=438){if(""===r)throw new jr.ErrnoError(44);var n;if(t=64&(e="string"==typeof e?Cr(e):e)?4095&t|32768:0,"object"==typeof r)n=r;else{r=dr.normalize(r);try{n=jr.lookupPath(r,{follow:!(131072&e)}).node}catch(l){}}var o=!1;if(64&e)if(n){if(128&e)throw new jr.ErrnoError(20)}else n=jr.mknod(r,t,0),o=!0;if(!n)throw new jr.ErrnoError(44);if(jr.isChrdev(n.mode)&&(e&=-513),65536&e&&!jr.isDir(n.mode))throw new jr.ErrnoError(54);if(!o){var a=jr.mayOpen(n,e);if(a)throw new jr.ErrnoError(a)}512&e&&!o&&jr.truncate(n,0),e&=-131713;var i=jr.createStream({node:n,path:jr.getPath(n),flags:e,seekable:!0,position:0,stream_ops:n.stream_ops,ungotten:[],error:!1});return i.stream_ops.open&&i.stream_ops.open(i),!s.logReadFiles||1&e||r in jr.readFiles||(jr.readFiles[r]=1),i},close(r){if(jr.isClosed(r))throw new jr.ErrnoError(8);r.getdents&&(r.getdents=null);try{r.stream_ops.close&&r.stream_ops.close(r)}catch(e){throw e}finally{jr.closeStream(r.fd)}r.fd=null},isClosed:r=>null===r.fd,llseek(r,e,t){if(jr.isClosed(r))throw new jr.ErrnoError(8);if(!r.seekable||!r.stream_ops.llseek)throw new jr.ErrnoError(70);if(0!=t&&1!=t&&2!=t)throw new jr.ErrnoError(28);return r.position=r.stream_ops.llseek(r,e,t),r.ungotten=[],r.position},read(r,e,t,n,o){if(n<0||o<0)throw new jr.ErrnoError(28);if(jr.isClosed(r))throw new jr.ErrnoError(8);if(1==(2097155&r.flags))throw new jr.ErrnoError(8);if(jr.isDir(r.node.mode))throw new jr.ErrnoError(31);if(!r.stream_ops.read)throw new jr.ErrnoError(28);var a=void 0!==o;if(a){if(!r.seekable)throw new jr.ErrnoError(70)}else o=r.position;var i=r.stream_ops.read(r,e,t,n,o);return a||(r.position+=i),i},write(r,e,t,n,o,a){if(n<0||o<0)throw new jr.ErrnoError(28);if(jr.isClosed(r))throw new jr.ErrnoError(8);if(!(2097155&r.flags))throw new jr.ErrnoError(8);if(jr.isDir(r.node.mode))throw new jr.ErrnoError(31);if(!r.stream_ops.write)throw new jr.ErrnoError(28);r.seekable&&1024&r.flags&&jr.llseek(r,0,2);var i=void 0!==o;if(i){if(!r.seekable)throw new jr.ErrnoError(70)}else o=r.position;var s=r.stream_ops.write(r,e,t,n,o,a);return i||(r.position+=s),s},allocate(r,e,t){if(jr.isClosed(r))throw new jr.ErrnoError(8);if(e<0||t<=0)throw new jr.ErrnoError(28);if(!(2097155&r.flags))throw new jr.ErrnoError(8);if(!jr.isFile(r.node.mode)&&!jr.isDir(r.node.mode))throw new jr.ErrnoError(43);if(!r.stream_ops.allocate)throw new jr.ErrnoError(138);r.stream_ops.allocate(r,e,t)},mmap(r,e,t,n,o){if(2&n&&!(2&o)&&2!=(2097155&r.flags))throw new jr.ErrnoError(2);if(1==(2097155&r.flags))throw new jr.ErrnoError(2);if(!r.stream_ops.mmap)throw new jr.ErrnoError(43);if(!e)throw new jr.ErrnoError(28);return r.stream_ops.mmap(r,e,t,n,o)},msync:(r,e,t,n,o)=>r.stream_ops.msync?r.stream_ops.msync(r,e,t,n,o):0,ioctl(r,e,t){if(!r.stream_ops.ioctl)throw new jr.ErrnoError(59);return r.stream_ops.ioctl(r,e,t)},readFile(r,e={}){if(e.flags=e.flags||0,e.encoding=e.encoding||"binary","utf8"!==e.encoding&&"binary"!==e.encoding)throw new Error(`Invalid encoding type "${e.encoding}"`);var t,n=jr.open(r,e.flags),o=jr.stat(r).size,a=new Uint8Array(o);return jr.read(n,a,0,o,0),"utf8"===e.encoding?t=pr(a):"binary"===e.encoding&&(t=a),jr.close(n),t},writeFile(r,e,t={}){t.flags=t.flags||577;var n=jr.open(r,t.flags,t.mode);if("string"==typeof e){var o=new Uint8Array(wr(e)+1),a=yr(e,o,0,o.length);jr.write(n,o,0,a,void 0,t.canOwn)}else{if(!ArrayBuffer.isView(e))throw new Error("Unsupported data type");jr.write(n,e,0,e.byteLength,void 0,t.canOwn)}jr.close(n)},cwd:()=>jr.currentPath,chdir(r){var e=jr.lookupPath(r,{follow:!0});if(null===e.node)throw new jr.ErrnoError(44);if(!jr.isDir(e.node.mode))throw new jr.ErrnoError(54);var t=jr.nodePermissions(e.node,"x");if(t)throw new jr.ErrnoError(t);jr.currentPath=e.path},createDefaultDirectories(){jr.mkdir("/tmp"),jr.mkdir("/home"),jr.mkdir("/home/web_user")},createDefaultDevices(){jr.mkdir("/dev"),jr.registerDevice(jr.makedev(1,3),{read:()=>0,write:(r,e,t,n,o)=>n,llseek:()=>0}),jr.mkdev("/dev/null",jr.makedev(1,3)),_r.register(jr.makedev(5,0),_r.default_tty_ops),_r.register(jr.makedev(6,0),_r.default_tty1_ops),jr.mkdev("/dev/tty",jr.makedev(5,0)),jr.mkdev("/dev/tty1",jr.makedev(6,0));var r=new Uint8Array(1024),e=0,t=()=>(0===e&&(e=fr(r).byteLength),r[--e]);jr.createDevice("/dev","random",t),jr.createDevice("/dev","urandom",t),jr.mkdir("/dev/shm"),jr.mkdir("/dev/shm/tmp")},createSpecialDirectories(){jr.mkdir("/proc");var r=jr.mkdir("/proc/self");jr.mkdir("/proc/self/fd"),jr.mount({mount(){var e=jr.createNode(r,"fd",16895,73);return e.node_ops={lookup(r,e){var t=+e,n=jr.getStreamChecked(t),o={parent:null,mount:{mountpoint:"fake"},node_ops:{readlink:()=>n.path}};return o.parent=o,o}},e}},{},"/proc/self/fd")},createStandardStreams(r,e,t){r?jr.createDevice("/dev","stdin",r):jr.symlink("/dev/tty","/dev/stdin"),e?jr.createDevice("/dev","stdout",null,e):jr.symlink("/dev/tty","/dev/stdout"),t?jr.createDevice("/dev","stderr",null,t):jr.symlink("/dev/tty1","/dev/stderr"),jr.open("/dev/stdin",0),jr.open("/dev/stdout",1),jr.open("/dev/stderr",1)},staticInit(){jr.nameTable=new Array(4096),jr.mount(Fr,{},"/"),jr.createDefaultDirectories(),jr.createDefaultDevices(),jr.createSpecialDirectories(),jr.filesystems={MEMFS:Fr}},init(r,e,t){jr.initialized=!0,r??=s.stdin,e??=s.stdout,t??=s.stderr,jr.createStandardStreams(r,e,t)},quit(){jr.initialized=!1;for(var r=0;r<jr.streams.length;r++){var e=jr.streams[r];e&&jr.close(e)}},findObject(r,e){var t=jr.analyzePath(r,e);return t.exists?t.object:null},analyzePath(r,e){try{r=(n=jr.lookupPath(r,{follow:!e})).path}catch(o){}var t={isRoot:!1,exists:!1,error:0,name:null,path:null,object:null,parentExists:!1,parentPath:null,parentObject:null};try{var n=jr.lookupPath(r,{parent:!0});t.parentExists=!0,t.parentPath=n.path,t.parentObject=n.node,t.name=dr.basename(r),n=jr.lookupPath(r,{follow:!e}),t.exists=!0,t.path=n.path,t.object=n.node,t.name=n.node.name,t.isRoot="/"===n.path}catch(o){t.error=o.errno}return t},createPath(r,e,t,n){r="string"==typeof r?r:jr.getPath(r);for(var o=e.split("/").reverse();o.length;){var a=o.pop();if(a){var i=dr.join2(r,a);try{jr.mkdir(i)}catch(s){}r=i}}return i},createFile(r,e,t,n,o){var a=dr.join2("string"==typeof r?r:jr.getPath(r),e),i=Tr(n,o);return jr.create(a,i)},createDataFile(r,e,t,n,o,a){var i=e;r&&(r="string"==typeof r?r:jr.getPath(r),i=e?dr.join2(r,e):r);var s=Tr(n,o),l=jr.create(i,s);if(t){if("string"==typeof t){for(var u=new Array(t.length),d=0,c=t.length;d<c;++d)u[d]=t.charCodeAt(d);t=u}jr.chmod(l,146|s);var f=jr.open(l,577);jr.write(f,t,0,t.length,0,a),jr.close(f),jr.chmod(l,s)}},createDevice(r,e,t,n){var o=dr.join2("string"==typeof r?r:jr.getPath(r),e),a=Tr(!!t,!!n);jr.createDevice.major??=64;var i=jr.makedev(jr.createDevice.major++,0);return jr.registerDevice(i,{open(r){r.seekable=!1},close(r){n?.buffer?.length&&n(10)},read(r,e,n,o,a){for(var i=0,s=0;s<o;s++){var l;try{l=t()}catch(u){throw new jr.ErrnoError(29)}if(void 0===l&&0===i)throw new jr.ErrnoError(6);if(null==l)break;i++,e[n+s]=l}return i&&(r.node.timestamp=Date.now()),i},write(r,e,t,o,a){for(var i=0;i<o;i++)try{n(e[t+i])}catch(s){throw new jr.ErrnoError(29)}return o&&(r.node.timestamp=Date.now()),i}}),jr.mkdev(o,a,i)},forceLoadFile(r){if(r.isDevice||r.isFolder||r.link||r.contents)return!0;if("undefined"!=typeof XMLHttpRequest)throw new Error("Lazy loading should have been performed (contents set) in createLazyFile, but it was not. Lazy loading only works in web workers. Use --embed-file or --preload-file in emcc on the main thread.");try{r.contents=i(r.url),r.usedBytes=r.contents.length}catch(e){throw new jr.ErrnoError(29)}},createLazyFile(r,e,t,n,o){if("undefined"!=typeof XMLHttpRequest)throw"Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc";var a={isDevice:!1,url:t},i=jr.createFile(r,e,a,n,o);a.contents?i.contents=a.contents:a.url&&(i.contents=null,i.url=a.url),Object.defineProperties(i,{usedBytes:{get:function(){return this.contents.length}}});var s={};function l(r,e,t,n,o){var a=r.node.contents;if(o>=a.length)return 0;var i=Math.min(a.length-o,n);if(a.slice)for(var s=0;s<i;s++)e[t+s]=a[o+s];else for(s=0;s<i;s++)e[t+s]=a.get(o+s);return i}return Object.keys(i.stream_ops).forEach((r=>{var e=i.stream_ops[r];s[r]=(...r)=>(jr.forceLoadFile(i),e(...r))})),s.read=(r,e,t,n,o)=>(jr.forceLoadFile(i),l(r,e,t,n,o)),s.mmap=(r,e,t,n,o)=>{jr.forceLoadFile(i);var a=kr();if(!a)throw new jr.ErrnoError(48);return l(r,w,a,e,t),{ptr:a,allocated:!0}},i.stream_ops=s,i}},Mr=(r,e)=>r?pr(y,r,e):"",xr={DEFAULT_POLLMASK:5,calculateAt(r,e,t){if(dr.isAbs(e))return e;var n;if(n=-100===r?jr.cwd():xr.getStreamFromFD(r).path,0==e.length){if(!t)throw new jr.ErrnoError(44);return n}return dr.join2(n,e)},doStat(r,e,t){var n=r(e);_[t>>2]=n.dev,_[t+4>>2]=n.mode,b[t+8>>2]=n.nlink,_[t+12>>2]=n.uid,_[t+16>>2]=n.gid,_[t+20>>2]=n.rdev,V=[n.size>>>0,(H=n.size,+Math.abs(H)>=1?H>0?+Math.floor(H/4294967296)>>>0:~~+Math.ceil((H-+(~~H>>>0))/4294967296)>>>0:0)],_[t+24>>2]=V[0],_[t+28>>2]=V[1],_[t+32>>2]=4096,_[t+36>>2]=n.blocks;var o=n.atime.getTime(),a=n.mtime.getTime(),i=n.ctime.getTime();return V=[Math.floor(o/1e3)>>>0,(H=Math.floor(o/1e3),+Math.abs(H)>=1?H>0?+Math.floor(H/4294967296)>>>0:~~+Math.ceil((H-+(~~H>>>0))/4294967296)>>>0:0)],_[t+40>>2]=V[0],_[t+44>>2]=V[1],b[t+48>>2]=o%1e3*1e3*1e3,V=[Math.floor(a/1e3)>>>0,(H=Math.floor(a/1e3),+Math.abs(H)>=1?H>0?+Math.floor(H/4294967296)>>>0:~~+Math.ceil((H-+(~~H>>>0))/4294967296)>>>0:0)],_[t+56>>2]=V[0],_[t+60>>2]=V[1],b[t+64>>2]=a%1e3*1e3*1e3,V=[Math.floor(i/1e3)>>>0,(H=Math.floor(i/1e3),+Math.abs(H)>=1?H>0?+Math.floor(H/4294967296)>>>0:~~+Math.ceil((H-+(~~H>>>0))/4294967296)>>>0:0)],_[t+72>>2]=V[0],_[t+76>>2]=V[1],b[t+80>>2]=i%1e3*1e3*1e3,V=[n.ino>>>0,(H=n.ino,+Math.abs(H)>=1?H>0?+Math.floor(H/4294967296)>>>0:~~+Math.ceil((H-+(~~H>>>0))/4294967296)>>>0:0)],_[t+88>>2]=V[0],_[t+92>>2]=V[1],0},doMsync(r,e,t,n,o){if(!jr.isFile(e.node.mode))throw new jr.ErrnoError(43);if(2&n)return 0;var a=y.slice(r,r+t);jr.msync(e,a,o,t,n)},getStreamFromFD:r=>jr.getStreamChecked(r),varargs:void 0,getStr:r=>Mr(r)};function Rr(r,e,t){xr.varargs=t;try{var n=xr.getStreamFromFD(r);switch(e){case 0:if((o=lr())<0)return-28;for(;jr.streams[o];)o++;return jr.dupStream(n,o).fd;case 1:case 2:case 13:case 14:return 0;case 3:return n.flags;case 4:var o=lr();return n.flags|=o,0;case 12:return o=ur(),g[o+0>>1]=2,0}return-28}catch(a){if(void 0===jr||"ErrnoError"!==a.name)throw a;return-a.errno}}function Nr(r,e,t){xr.varargs=t;try{var n=xr.getStreamFromFD(r);switch(e){case 21509:case 21510:case 21511:case 21512:case 21524:case 21515:return n.tty?0:-59;case 21505:if(!n.tty)return-59;if(n.tty.ops.ioctl_tcgets){var o=n.tty.ops.ioctl_tcgets(n),a=ur();_[a>>2]=o.c_iflag||0,_[a+4>>2]=o.c_oflag||0,_[a+8>>2]=o.c_cflag||0,_[a+12>>2]=o.c_lflag||0;for(var i=0;i<32;i++)w[a+i+17]=o.c_cc[i]||0;return 0}return 0;case 21506:case 21507:case 21508:if(!n.tty)return-59;if(n.tty.ops.ioctl_tcsets){a=ur();var s=_[a>>2],l=_[a+4>>2],u=_[a+8>>2],d=_[a+12>>2],c=[];for(i=0;i<32;i++)c.push(w[a+i+17]);return n.tty.ops.ioctl_tcsets(n.tty,e,{c_iflag:s,c_oflag:l,c_cflag:u,c_lflag:d,c_cc:c})}return 0;case 21519:return n.tty?(a=ur(),_[a>>2]=0,0):-59;case 21520:return n.tty?-28:-59;case 21531:return a=ur(),jr.ioctl(n,e,a);case 21523:if(!n.tty)return-59;if(n.tty.ops.ioctl_tiocgwinsz){var f=n.tty.ops.ioctl_tiocgwinsz(n.tty);a=ur(),g[a>>1]=f[0],g[a+2>>1]=f[1]}return 0;default:return-28}}catch(h){if(void 0===jr||"ErrnoError"!==h.name)throw h;return-h.errno}}function zr(r,e,t,n){xr.varargs=n;try{e=xr.getStr(e),e=xr.calculateAt(r,e);var o=n?lr():0;return jr.open(e,t,o).fd}catch(a){if(void 0===jr||"ErrnoError"!==a.name)throw a;return-a.errno}}var Wr=()=>L(""),Or={},Ur=r=>{for(;r.length;){var e=r.pop();r.pop()(e)}};function Br(r){return this.fromWireType(b[r>>2])}var Lr,Ir,Hr,Vr={},qr={},Xr={},Gr=r=>{throw new Lr(r)},Kr=(r,e,t)=>{function n(e){var n=t(e);n.length!==r.length&&Gr("Mismatched type converter count");for(var o=0;o<r.length;++o)te(r[o],n[o])}r.forEach((r=>Xr[r]=e));var o=new Array(e.length),a=[],i=0;e.forEach(((r,e)=>{qr.hasOwnProperty(r)?o[e]=qr[r]:(a.push(r),Vr.hasOwnProperty(r)||(Vr[r]=[]),Vr[r].push((()=>{o[e]=qr[r],++i===a.length&&n(o)})))})),0===a.length&&n(o)},Yr=r=>{var e=Or[r];delete Or[r];var t=e.rawConstructor,n=e.rawDestructor,o=e.fields,a=o.map((r=>r.getterReturnType)).concat(o.map((r=>r.setterArgumentType)));Kr([r],a,(r=>{var a={};return o.forEach(((e,t)=>{var n=e.fieldName,i=r[t],s=e.getter,l=e.getterContext,u=r[t+o.length],d=e.setter,c=e.setterContext;a[n]={read:r=>i.fromWireType(s(l,r)),write:(r,e)=>{var t=[];d(c,r,u.toWireType(t,e)),Ur(t)}}})),[{name:e.name,fromWireType:r=>{var e={};for(var t in a)e[t]=a[t].read(r);return n(r),e},toWireType:(r,e)=>{for(var o in a)if(!(o in e))throw new TypeError(`Missing field: "${o}"`);var i=t();for(o in a)a[o].write(i,e[o]);return null!==r&&r.push(n,i),i},argPackAdvance:ne,readValueFromPointer:Br,destructorFunction:n}]}))},Jr=(r,e,t,n,o)=>{},Qr=()=>{for(var r=new Array(256),e=0;e<256;++e)r[e]=String.fromCharCode(e);Ir=r},Zr=r=>{for(var e="",t=r;y[t];)e+=Ir[y[t++]];return e},re=r=>{throw new Hr(r)};function ee(r,e,t={}){var n=e.name;if(r||re(`type "${n}" must have a positive integer typeid pointer`),qr.hasOwnProperty(r)){if(t.ignoreDuplicateRegistrations)return;re(`Cannot register type '${n}' twice`)}if(qr[r]=e,delete Xr[r],Vr.hasOwnProperty(r)){var o=Vr[r];delete Vr[r],o.forEach((r=>r()))}}function te(r,e,t={}){return ee(r,e,t)}var ne=8,oe=(r,e,t,n)=>{te(r,{name:e=Zr(e),fromWireType:function(r){return!!r},toWireType:function(r,e){return e?t:n},argPackAdvance:ne,readValueFromPointer:function(r){return this.fromWireType(y[r])},destructorFunction:null})},ae=[],ie=[],se=r=>{r>9&&0==--ie[r+1]&&(ie[r]=void 0,ae.push(r))},le=()=>ie.length/2-5-ae.length,ue=()=>{ie.push(0,1,void 0,1,null,1,!0,1,!1,1),s.count_emval_handles=le},de={toValue:r=>(r||re("Cannot use deleted val. handle = "+r),ie[r]),toHandle:r=>{switch(r){case void 0:return 2;case null:return 4;case!0:return 6;case!1:return 8;default:{const e=ae.pop()||ie.length;return ie[e]=r,ie[e+1]=1,e}}}},ce={name:"emscripten::val",fromWireType:r=>{var e=de.toValue(r);return se(r),e},toWireType:(r,e)=>de.toHandle(e),argPackAdvance:ne,readValueFromPointer:Br,destructorFunction:null},fe=r=>te(r,ce),he=(r,e)=>{switch(e){case 4:return function(r){return this.fromWireType(k[r>>2])};case 8:return function(r){return this.fromWireType(F[r>>3])};default:throw new TypeError(`invalid float width (${e}): ${r}`)}},me=(r,e,t)=>{te(r,{name:e=Zr(e),fromWireType:r=>r,toWireType:(r,e)=>e,argPackAdvance:ne,readValueFromPointer:he(e,t),destructorFunction:null})},pe=(r,e)=>Object.defineProperty(e,"name",{value:r});function ve(r){for(var e=1;e<r.length;++e)if(null!==r[e]&&void 0===r[e].destructorFunction)return!0;return!1}function we(r,e,t,n,o,a){var i=e.length;i<2&&re("argTypes array size mismatch! Must at least get return value and 'this' types!"),e[1];var s=ve(e),l="void"!==e[0].name,u=i-2,d=new Array(u),c=[],f=[];return pe(r,(function(...r){var t;f.length=0,c.length=1,c[0]=o;for(var a=0;a<u;++a)d[a]=e[a+2].toWireType(f,r[a]),c.push(d[a]);function i(r){if(s)Ur(f);else for(var n=2;n<e.length;n++){var o=1===n?t:d[n-2];null!==e[n].destructorFunction&&e[n].destructorFunction(o)}if(l)return e[0].fromWireType(r)}return i(n(...c))}))}var ye,ge,Ee=(r,e,t)=>{if(void 0===r[e].overloadTable){var n=r[e];r[e]=function(...n){return r[e].overloadTable.hasOwnProperty(n.length)||re(`Function '${t}' called with an invalid number of arguments (${n.length}) - expects one of (${r[e].overloadTable})!`),r[e].overloadTable[n.length].apply(this,n)},r[e].overloadTable=[],r[e].overloadTable[n.argCount]=n}},_e=(r,e,t)=>{s.hasOwnProperty(r)?((void 0===t||void 0!==s[r].overloadTable&&void 0!==s[r].overloadTable[t])&&re(`Cannot register public name '${r}' twice`),Ee(s,r,r),s[r].overloadTable.hasOwnProperty(t)&&re(`Cannot register multiple overloads of a function with the same number of arguments (${t})!`),s[r].overloadTable[t]=e):(s[r]=e,s[r].argCount=t)},be=(r,e)=>{for(var t=[],n=0;n<r;n++)t.push(b[e+4*n>>2]);return t},ke=(r,e,t)=>{s.hasOwnProperty(r)||Gr("Replacing nonexistent public symbol"),void 0!==s[r].overloadTable&&void 0!==t?s[r].overloadTable[t]=e:(s[r]=e,s[r].argCount=t)},Fe=(r,e,t)=>(r=r.replace(/p/g,"i"),(0,s["dynCall_"+r])(e,...t)),Pe=[],Ae=r=>{var e=Pe[r];return e||(r>=Pe.length&&(Pe.length=r+1),Pe[r]=e=ye.get(r)),e},Se=(r,e,t=[])=>r.includes("j")?Fe(r,e,t):Ae(e)(...t),De=(r,e)=>(...t)=>Se(r,e,t),$e=(r,e)=>{function t(){return r.includes("j")?De(r,e):Ae(e)}r=Zr(r);var n=t();return"function"!=typeof n&&re(`unknown function pointer with signature ${r}: ${e}`),n},Ce=(r,e)=>{var t=pe(e,(function(r){this.name=e,this.message=r;var t=new Error(r).stack;void 0!==t&&(this.stack=this.toString()+"\n"+t.replace(/^Error(:[^\n]*)?\n/,""))}));return t.prototype=Object.create(r.prototype),t.prototype.constructor=t,t.prototype.toString=function(){return void 0===this.message?this.name:`${this.name}: ${this.message}`},t},Te=r=>{var e=an(r),t=Zr(e);return ln(e),t},je=(r,e)=>{var t=[],n={};function o(r){n[r]||qr[r]||(Xr[r]?Xr[r].forEach(o):(t.push(r),n[r]=!0))}throw e.forEach(o),new ge(`${r}: `+t.map(Te).join([", "]))},Me=r=>{const e=(r=r.trim()).indexOf("(");return-1!==e?r.substr(0,e):r},xe=(r,e,t,n,o,a,i,s)=>{var l=be(e,t);r=Zr(r),r=Me(r),o=$e(n,o),_e(r,(function(){je(`Cannot call ${r} due to unbound types`,l)}),e-1),Kr([],l,(t=>{var n=[t[0],null].concat(t.slice(1));return ke(r,we(r,n,null,o,a),e-1),[]}))},Re=(r,e,t)=>{switch(e){case 1:return t?r=>w[r]:r=>y[r];case 2:return t?r=>g[r>>1]:r=>E[r>>1];case 4:return t?r=>_[r>>2]:r=>b[r>>2];default:throw new TypeError(`invalid integer width (${e}): ${r}`)}},Ne=(r,e,t,n,o)=>{e=Zr(e);var a=r=>r;if(0===n){var i=32-8*t;a=r=>r<<i>>>i}var s=e.includes("unsigned"),l=(r,e)=>{};te(r,{name:e,fromWireType:a,toWireType:s?function(r,e){return l(e,this.name),e>>>0}:function(r,e){return l(e,this.name),e},argPackAdvance:ne,readValueFromPointer:Re(e,t,0!==n),destructorFunction:null})},ze=(r,e,t)=>{var n=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array][e];function o(r){var e=b[r>>2],t=b[r+4>>2];return new n(w.buffer,t,e)}te(r,{name:t=Zr(t),fromWireType:o,argPackAdvance:ne,readValueFromPointer:o},{ignoreDuplicateRegistrations:!0})},We=(r,e,t)=>yr(r,y,e,t),Oe=(r,e)=>{var t="std::string"===(e=Zr(e));te(r,{name:e,fromWireType(r){var e,n=b[r>>2],o=r+4;if(t)for(var a=o,i=0;i<=n;++i){var s=o+i;if(i==n||0==y[s]){var l=Mr(a,s-a);void 0===e?e=l:(e+=String.fromCharCode(0),e+=l),a=s+1}}else{var u=new Array(n);for(i=0;i<n;++i)u[i]=String.fromCharCode(y[o+i]);e=u.join("")}return ln(r),e},toWireType(r,e){var n;e instanceof ArrayBuffer&&(e=new Uint8Array(e));var o="string"==typeof e;o||e instanceof Uint8Array||e instanceof Uint8ClampedArray||e instanceof Int8Array||re("Cannot pass non-string to std::string"),n=t&&o?wr(e):e.length;var a=sn(4+n+1),i=a+4;if(b[a>>2]=n,t&&o)We(e,i,n+1);else if(o)for(var s=0;s<n;++s){var l=e.charCodeAt(s);l>255&&(ln(i),re("String has UTF-16 code units that do not fit in 8 bits")),y[i+s]=l}else for(s=0;s<n;++s)y[i+s]=e[s];return null!==r&&r.push(ln,a),a},argPackAdvance:ne,readValueFromPointer:Br,destructorFunction(r){ln(r)}})},Ue="undefined"!=typeof TextDecoder?new TextDecoder("utf-16le"):void 0,Be=(r,e)=>{for(var t=r,n=t>>1,o=n+e/2;!(n>=o)&&E[n];)++n;if((t=n<<1)-r>32&&Ue)return Ue.decode(y.subarray(r,t));for(var a="",i=0;!(i>=e/2);++i){var s=g[r+2*i>>1];if(0==s)break;a+=String.fromCharCode(s)}return a},Le=(r,e,t)=>{if(t??=2147483647,t<2)return 0;for(var n=e,o=(t-=2)<2*r.length?t/2:r.length,a=0;a<o;++a){var i=r.charCodeAt(a);g[e>>1]=i,e+=2}return g[e>>1]=0,e-n},Ie=r=>2*r.length,He=(r,e)=>{for(var t=0,n="";!(t>=e/4);){var o=_[r+4*t>>2];if(0==o)break;if(++t,o>=65536){var a=o-65536;n+=String.fromCharCode(55296|a>>10,56320|1023&a)}else n+=String.fromCharCode(o)}return n},Ve=(r,e,t)=>{if(t??=2147483647,t<4)return 0;for(var n=e,o=n+t-4,a=0;a<r.length;++a){var i=r.charCodeAt(a);if(i>=55296&&i<=57343&&(i=65536+((1023&i)<<10)|1023&r.charCodeAt(++a)),_[e>>2]=i,(e+=4)+4>o)break}return _[e>>2]=0,e-n},qe=r=>{for(var e=0,t=0;t<r.length;++t){var n=r.charCodeAt(t);n>=55296&&n<=57343&&++t,e+=4}return e},Xe=(r,e,t)=>{var n,o,a,i;t=Zr(t),2===e?(n=Be,o=Le,i=Ie,a=r=>E[r>>1]):4===e&&(n=He,o=Ve,i=qe,a=r=>b[r>>2]),te(r,{name:t,fromWireType:r=>{for(var t,o=b[r>>2],i=r+4,s=0;s<=o;++s){var l=r+4+s*e;if(s==o||0==a(l)){var u=n(i,l-i);void 0===t?t=u:(t+=String.fromCharCode(0),t+=u),i=l+e}}return ln(r),t},toWireType:(r,n)=>{"string"!=typeof n&&re(`Cannot pass non-string to C++ string type ${t}`);var a=i(n),s=sn(4+a+e);return b[s>>2]=a/e,o(n,s+4,a+e),null!==r&&r.push(ln,s),s},argPackAdvance:ne,readValueFromPointer:Br,destructorFunction(r){ln(r)}})},Ge=(r,e,t,n,o,a)=>{Or[r]={name:Zr(e),rawConstructor:$e(t,n),rawDestructor:$e(o,a),fields:[]}},Ke=(r,e,t,n,o,a,i,s,l,u)=>{Or[r].fields.push({fieldName:Zr(e),getterReturnType:t,getter:$e(n,o),getterContext:a,setterArgumentType:i,setter:$e(s,l),setterContext:u})},Ye=(r,e)=>{te(r,{isVoid:!0,name:e=Zr(e),argPackAdvance:0,fromWireType:()=>{},toWireType:(r,e)=>{}})},Je=r=>{do{var e=b[r>>2],t=b[(r+=4)>>2],n=b[(r+=4)>>2];r+=4;var o=Mr(e);jr.createPath("/",dr.dirname(o),!0,!0),jr.createDataFile(o,null,w.subarray(n,n+t),!0,!0,!0)}while(b[r>>2])},Qe=(r,e,t)=>y.copyWithin(r,e,e+t),Ze=()=>{throw 1/0},rt=(r,e)=>{var t=qr[r];return void 0===t&&re(`${e} has unknown type ${Te(r)}`),t},et=(r,e,t)=>{var n=[],o=r.toWireType(n,t);return n.length&&(b[e>>2]=de.toHandle(n)),o},tt=(r,e,t)=>(r=de.toValue(r),e=rt(e,"emval::as"),et(e,t,r)),nt={},ot=r=>{var e=nt[r];return void 0===e?Zr(r):e},at=[],it=(r,e,t,n,o)=>(r=at[r])(e=de.toValue(e),e[t=ot(t)],n,o),st=()=>{if("object"==typeof globalThis)return globalThis;function e(r){r.$$$embind_global$$$=r;var e="object"==typeof $$$embind_global$$$&&r.$$$embind_global$$$==r;return e||delete r.$$$embind_global$$$,e}if("object"==typeof $$$embind_global$$$)return $$$embind_global$$$;if("object"==typeof r&&e(r)?$$$embind_global$$$=r:"object"==typeof self&&e(self)&&($$$embind_global$$$=self),"object"==typeof $$$embind_global$$$)return $$$embind_global$$$;throw Error("unable to get global object.")},lt=r=>0===r?de.toHandle(st()):(r=ot(r),de.toHandle(st()[r])),ut=r=>{var e=at.length;return at.push(r),e},dt=(r,e)=>{for(var t=new Array(r),n=0;n<r;++n)t[n]=rt(b[e+4*n>>2],"parameter "+n);return t},ct=Reflect.construct,ft=(r,e,t)=>{var n=dt(r,e),o=n.shift();r--;var a=new Array(r),i=(e,i,s,l)=>{for(var u=0,d=0;d<r;++d)a[d]=n[d].readValueFromPointer(l+u),u+=n[d].argPackAdvance;var c=1===t?ct(i,a):i.apply(e,a);return et(o,s,c)},s=`methodCaller<(${n.map((r=>r.name)).join(", ")}) => ${o.name}>`;return ut(pe(s,i))},ht=(r,e)=>(r=de.toValue(r),e=de.toValue(e),de.toHandle(r[e])),mt=r=>{r>9&&(ie[r+1]+=1)},pt=()=>de.toHandle([]),vt=r=>de.toHandle(ot(r)),wt=r=>{var e=de.toValue(r);Ur(e),se(r)},yt=(r,e,t)=>{r=de.toValue(r),e=de.toValue(e),t=de.toValue(t),r[e]=t},gt=(r,e)=>{var t=(r=rt(r,"_emval_take_value")).readValueFromPointer(e);return de.toHandle(t)},Et=(r,e,t,n)=>{var o=(new Date).getFullYear(),a=new Date(o,0,1),i=new Date(o,6,1),s=a.getTimezoneOffset(),l=i.getTimezoneOffset(),u=Math.max(s,l);b[r>>2]=60*u,_[e>>2]=Number(s!=l);var d=r=>{var e=r>=0?"-":"+",t=Math.abs(r);return`UTC${e}${String(Math.floor(t/60)).padStart(2,"0")}${String(t%60).padStart(2,"0")}`},c=d(s),f=d(l);l<s?(We(c,t,17),We(f,n,17)):(We(c,n,17),We(f,t,17))},_t=()=>2147483648,bt=r=>{var e=(r-v.buffer.byteLength+65535)/65536|0;try{return v.grow(e),S(),1}catch(t){}},kt=r=>{var e=y.length;r>>>=0;var t=_t();if(r>t)return!1;for(var n=1;n<=4;n*=2){var o=e*(1+.2/n);o=Math.min(o,r+100663296);var a=Math.min(t,br(Math.max(r,o),65536));if(bt(a))return!0}return!1},Ft={},Pt=()=>d||"./this.program",At=()=>{if(!At.strings){var r={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:("object"==typeof navigator&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",_:Pt()};for(var e in Ft)void 0===Ft[e]?delete r[e]:r[e]=Ft[e];var t=[];for(var e in r)t.push(`${e}=${r[e]}`);At.strings=t}return At.strings},St=(r,e)=>{for(var t=0;t<r.length;++t)w[e++]=r.charCodeAt(t);w[e]=0},Dt=(r,e)=>{var t=0;return At().forEach(((n,o)=>{var a=e+t;b[r+4*o>>2]=a,St(n,a),t+=n.length+1})),0},$t=(r,e)=>{var t=At();b[r>>2]=t.length;var n=0;return t.forEach((r=>n+=r.length+1)),b[e>>2]=n,0},Ct=0,Tt=()=>nr||Ct>0,jt=r=>{Tt()||(s.onExit?.(r),A=!0),c(r,new er(r))},Mt=(r,e)=>{jt(r)};function xt(r){try{var e=xr.getStreamFromFD(r);return jr.close(e),0}catch(t){if(void 0===jr||"ErrnoError"!==t.name)throw t;return t.errno}}var Rt=(r,e,t,n)=>{for(var o=0,a=0;a<t;a++){var i=b[e>>2],s=b[e+4>>2];e+=8;var l=jr.read(r,w,i,s,n);if(l<0)return-1;if(o+=l,l<s)break}return o};function Nt(r,e,t,n){try{var o=xr.getStreamFromFD(r),a=Rt(o,e,t);return b[n>>2]=a,0}catch(i){if(void 0===jr||"ErrnoError"!==i.name)throw i;return i.errno}}var zt=(r,e)=>e+2097152>>>0<4194305-!!r?(r>>>0)+4294967296*e:NaN;function Wt(r,e,t,n,o){var a=zt(e,t);try{if(isNaN(a))return 61;var i=xr.getStreamFromFD(r);return jr.llseek(i,a,n),V=[i.position>>>0,(H=i.position,+Math.abs(H)>=1?H>0?+Math.floor(H/4294967296)>>>0:~~+Math.ceil((H-+(~~H>>>0))/4294967296)>>>0:0)],_[o>>2]=V[0],_[o+4>>2]=V[1],i.getdents&&0===a&&0===n&&(i.getdents=null),0}catch(s){if(void 0===jr||"ErrnoError"!==s.name)throw s;return s.errno}}var Ot=(r,e,t,n)=>{for(var o=0,a=0;a<t;a++){var i=b[e>>2],s=b[e+4>>2];e+=8;var l=jr.write(r,w,i,s,n);if(l<0)return-1;if(o+=l,l<s)break}return o};function Ut(r,e,t,n){try{var o=xr.getStreamFromFD(r),a=Ot(o,e,t);return b[n>>2]=a,0}catch(i){if(void 0===jr||"ErrnoError"!==i.name)throw i;return i.errno}}var Bt,Lt=(r,e)=>{r<128?e.push(r):e.push(r%128|128,r>>7)},It=r=>{for(var e={i:"i32",j:"i64",f:"f32",d:"f64",e:"externref",p:"i32"},t={parameters:[],results:"v"==r[0]?[]:[e[r[0]]]},n=1;n<r.length;++n)t.parameters.push(e[r[n]]);return t},Ht=(r,e)=>{var t=r.slice(0,1),n=r.slice(1),o={i:127,p:127,j:126,f:125,d:124,e:111};e.push(96),Lt(n.length,e);for(var a=0;a<n.length;++a)e.push(o[n[a]]);"v"==t?e.push(0):e.push(1,o[t])},Vt=(r,e)=>{if("function"==typeof WebAssembly.Function)return new WebAssembly.Function(It(e),r);var t=[1];Ht(e,t);var n=[0,97,115,109,1,0,0,0,1];Lt(t.length,n),n.push(...t),n.push(2,7,1,1,101,1,102,0,0,7,5,1,1,102,0,0);var o=new WebAssembly.Module(new Uint8Array(n));return new WebAssembly.Instance(o,{e:{f:r}}).exports.f},qt=(r,e)=>{if(Bt)for(var t=r;t<r+e;t++){var n=Ae(t);n&&Bt.set(n,t)}},Xt=r=>(Bt||(Bt=new WeakMap,qt(0,ye.length)),Bt.get(r)||0),Gt=[],Kt=()=>{if(Gt.length)return Gt.pop();try{ye.grow(1)}catch(p){if(!(p instanceof RangeError))throw p;throw"Unable to grow wasm table. Set ALLOW_TABLE_GROWTH."}return ye.length-1},Yt=(r,e)=>{ye.set(r,e),Pe[r]=ye.get(r)},Jt=(r,e)=>{var t=Xt(r);if(t)return t;var n=Kt();try{Yt(n,r)}catch(p){if(!(p instanceof TypeError))throw p;var o=Vt(r,e);Yt(n,o)}return Bt.set(r,n),n},Qt=jr.createPath,Zt=r=>jr.unlink(r),rn=jr.createLazyFile,en=jr.createDevice;jr.createPreloadedFile=$r,jr.staticInit(),s.FS_createPath=jr.createPath,s.FS_createDataFile=jr.createDataFile,s.FS_createPreloadedFile=jr.createPreloadedFile,s.FS_unlink=jr.unlink,s.FS_createLazyFile=jr.createLazyFile,s.FS_createDevice=jr.createDevice,Fr.doesNotExistError=new jr.ErrnoError(44),Fr.doesNotExistError.stack="<generic error, no stack>",Lr=s.InternalError=class extends Error{constructor(r){super(r),this.name="InternalError"}},Qr(),Hr=s.BindingError=class extends Error{constructor(r){super(r),this.name="BindingError"}},ue(),ge=s.UnboundTypeError=Ce(Error,"UnboundTypeError");var tn,nn={i:sr,w:Rr,M:Nr,N:zr,P:Wr,V:Yr,F:Jr,T:oe,S:fe,y:me,q:xe,c:Ne,b:ze,x:Oe,p:Xe,W:Ge,k:Ke,U:Ye,R:Je,O:Qe,G:Ze,Y:tt,z:it,a:se,Z:lt,A:ft,m:ht,g:mt,B:pt,h:vt,r:wt,X:yt,l:gt,I:Et,H:kt,J:Dt,K:$t,Q:Mt,u:xt,L:Nt,E:Wt,v:Ut,n:fn,j:pn,o:wn,s:yn,D:En,t:vn,d:hn,C:_n,e:gn,f:mn},on=rr(),an=r=>(an=on.aa)(r),sn=s._malloc=r=>(sn=s._malloc=on.ca)(r),ln=s._free=r=>(ln=s._free=on.da)(r),un=(r,e)=>(un=on.ea)(r,e),dn=r=>(dn=on.fa)(r),cn=()=>(cn=on.ga)();function fn(r,e){var t=ar();try{return Ae(r)(e)}catch(n){if(or(t),n!==n+0)throw n;un(1,0)}}function hn(r,e){var t=ar();try{Ae(r)(e)}catch(n){if(or(t),n!==n+0)throw n;un(1,0)}}function mn(r,e,t,n){var o=ar();try{Ae(r)(e,t,n)}catch(a){if(or(o),a!==a+0)throw a;un(1,0)}}function pn(r,e,t){var n=ar();try{return Ae(r)(e,t)}catch(o){if(or(n),o!==o+0)throw o;un(1,0)}}function vn(r){var e=ar();try{Ae(r)()}catch(t){if(or(e),t!==t+0)throw t;un(1,0)}}function wn(r,e,t,n){var o=ar();try{return Ae(r)(e,t,n)}catch(a){if(or(o),a!==a+0)throw a;un(1,0)}}function yn(r,e,t,n,o){var a=ar();try{return Ae(r)(e,t,n,o)}catch(i){if(or(a),i!==i+0)throw i;un(1,0)}}function gn(r,e,t){var n=ar();try{Ae(r)(e,t)}catch(o){if(or(n),o!==o+0)throw o;un(1,0)}}function En(r,e,t,n,o,a,i,s,l,u){var d=ar();try{return Ae(r)(e,t,n,o,a,i,s,l,u)}catch(c){if(or(d),c!==c+0)throw c;un(1,0)}}function _n(r,e,t,n){var o=ar();try{Ae(r)(e,t,n)}catch(a){if(or(o),a!==a+0)throw a;un(1,0)}}function bn(){function r(){tn||(tn=!0,s.calledRun=!0,A||(j(),t(s),s.onRuntimeInitialized?.(),M()))}z>0||(T(),z>0||(s.setStatus?(s.setStatus("Running..."),setTimeout((()=>{setTimeout((()=>s.setStatus("")),1),r()}),1)):r()))}if(s.dynCall_viji=(r,e,t,n,o)=>(s.dynCall_viji=on.ha)(r,e,t,n,o),s.dynCall_ji=(r,e)=>(s.dynCall_ji=on.ia)(r,e),s.dynCall_jiji=(r,e,t,n,o)=>(s.dynCall_jiji=on.ja)(r,e,t,n,o),s.dynCall_viijii=(r,e,t,n,o,a,i)=>(s.dynCall_viijii=on.ka)(r,e,t,n,o,a,i),s.dynCall_iiiiij=(r,e,t,n,o,a,i)=>(s.dynCall_iiiiij=on.la)(r,e,t,n,o,a,i),s.dynCall_iiiiijj=(r,e,t,n,o,a,i,l,u)=>(s.dynCall_iiiiijj=on.ma)(r,e,t,n,o,a,i,l,u),s.dynCall_iiiiiijj=(r,e,t,n,o,a,i,l,u,d)=>(s.dynCall_iiiiiijj=on.na)(r,e,t,n,o,a,i,l,u,d),s.___emscripten_embedded_file_data=1536624,s.addRunDependency=U,s.removeRunDependency=B,s.addFunction=Jt,s.UTF8ToString=Mr,s.FS_createPreloadedFile=$r,s.FS_unlink=Zt,s.FS_createPath=Qt,s.FS_createDevice=en,s.FS_createDataFile=Ar,s.FS_createLazyFile=rn,W=function r(){tn||bn(),tn||(W=r)},s.preInit)for("function"==typeof s.preInit&&(s.preInit=[s.preInit]);s.preInit.length>0;)s.preInit.pop()();return bn(),l},e.exports=a),n.exports;var e,o,a}const a=e(o()),i=Object.freeze(Object.defineProperty({__proto__:null,default:a},Symbol.toStringTag,{value:"Module"}));export{i as l};
|
package/core/Accessor.js
CHANGED
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{deprecatedFunction as e}from"./deprecate.js";import
|
|
5
|
+
import{deprecatedFunction as e}from"./deprecate.js";import t from"./Handles.js";import r from"./Logger.js";import{destroyMaybe as s}from"./maybe.js";import{beforeDestroySymbol as o}from"./accessorSupport/beforeDestroy.js";import{get as i}from"./accessorSupport/get.js";import{Lifecycle as c}from"./accessorSupport/interfaces.js";import{getPropertiesMetadata as a}from"./accessorSupport/metadata.js";import n from"./accessorSupport/Properties.js";import{set as _}from"./accessorSupport/set.js";import{getAccessorInterceptor as p}from"./accessorSupport/testSupport.js";import{removeTarget as h,watch as l}from"./accessorSupport/watch.js";import{property as u}from"./accessorSupport/decorators/property.js";import{subclass as d}from"./accessorSupport/decorators/subclass.js";var f,m;function y(e){if(null==e)return{value:e};if(Array.isArray(e))return{type:[e[0]],value:null};switch(typeof e){case"object":return e.constructor?.__accessorMetadata__||e instanceof Date?{type:e.constructor,value:e}:e;case"boolean":return{type:Boolean,value:e};case"string":return{type:String,value:e};case"number":return{type:Number,value:e};case"function":return{type:e,value:null};default:return}}const v=Symbol("Accessor-Handles"),b=Symbol("Accessor-Initialized");class g{static{f=v,m=b}static createSubclass(e={}){if(Array.isArray(e))throw new Error("Multi-inheritance unsupported since 4.16");const{properties:t,declaredClass:r,constructor:s}=e;delete e.declaredClass,delete e.properties,delete e.constructor;const o=this;class i extends o{constructor(...e){super(...e),this.inherited=null,s&&s.apply(this,e)}}a(i.prototype);for(const c in e){const t=e[c];i.prototype[c]="function"==typeof t?function(...e){const r=this.inherited;let s;this.inherited=function(...e){if(o.prototype[c])return o.prototype[c].apply(this,e)};try{s=t.apply(this,e)}catch(i){throw this.inherited=r,i}return this.inherited=r,s}:e[c]}for(const c in t){const e=y(t[c]);u(e)(i.prototype,c)}return d(r)(i)}static freeze(e){return e instanceof g?e.__accessor__.mutable=!1:Object.freeze(e),e}static isFrozen(e){return e instanceof g?!e.__accessor__.mutable:Object.isFrozen(e)}constructor(...e){if(this[f]=null,this[m]=!1,this.constructor===g)throw new Error("[accessor] cannot instantiate Accessor. This can be fixed by creating a subclass of Accessor");const t=new n(this);Object.defineProperty(this,"__accessor__",{enumerable:!1,value:t}),e.length>0&&(t.ctorArgs=this.normalizeCtorArgs?.apply(this,e)??e[0]),p()?.onInstanceConstruct(this)}postscript(){const e=this.__accessor__,t=e.ctorArgs;e.initialize(),t&&(this.set(t),e.ctorArgs=null),e.constructed(),this.initialize(),this[b]=!0}initialize(){}[o](){this[v]=s(this[v])}destroy(){this.destroyed||(h(this),this.__accessor__.destroy(),p()?.onInstanceDestroy(this))}[Symbol.dispose](){this.destroy()}get constructed(){return this.__accessor__&&this.__accessor__.initialized||!1}get initialized(){return this[b]}get destroyed(){return this.__accessor__?.lifecycle===c.DESTROYED||!1}commitProperty(e){i(this,e)}hasOwnProperty(e){return this.__accessor__?this.__accessor__.has(e):Object.prototype.hasOwnProperty.call(this,e)}keys(){return this.__accessor__?this.__accessor__.keys():[]}set(e,t){return _(this,e,t),this}watch(t,s,o){return e(r.getLogger(this),"`watch` is deprecated in favor of reactiveUtils.watch",{replacement:"reactiveUtils.watch",version:"4.32",see:"https://developers.arcgis.com/javascript/latest/api-reference/esri-core-reactiveUtils.html#watch",warnOnce:!0}),l(this,t,s,o)}addHandles(e,r){if(this.destroyed){const t=Array.isArray(e)?e:[e];for(const e of t)e.remove();return}(this[v]??=new t).add(e,r)}removeHandles(e){this[v]?.remove(e)}removeAllHandles(){this[v]?.removeAll()}removeHandlesReference(e){this[v]?.removeReference(e)}hasHandles(e){return!0===this[v]?.has(e)}_override(e,t){void 0===t?this.__accessor__.clearOverride(e):this.__accessor__.override(e,t)}_clearOverride(e){return this.__accessor__.clearOverride(e)}_overrideIfSome(e,t){null==t?this.__accessor__.clearOverride(e):this.__accessor__.override(e,t)}_isOverridden(e){return this.__accessor__.isOverridden(e)}notifyChange(e){this.__accessor__.notifyChange(e)}_get(e){return this.__accessor__.internalGet(e)}_set(e,t){return this.__accessor__.internalSet(e,t),this}}export{g as default};
|
package/core/Collection.js
CHANGED
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as e}from"../chunks/tslib.es6.js";import t from"./ArrayPool.js";import s from"./Evented.js";import{makeHandle as i}from"./handleUtils.js";import{clone as r}from"./lang.js";import n from"./ObjectPool.js";import{ObservableChangesType as h}from"./ObservableChangesType.js";import{schedule as o}from"./scheduling.js";import{ensureType as l,ensureOneOfType as a}from"./accessorSupport/ensureType.js";import{trackAccess as c}from"./accessorSupport/tracking.js";import{property as f}from"./accessorSupport/decorators/property.js";import{shared as _}from"./accessorSupport/decorators/shared.js";import{subclass as u}from"./accessorSupport/decorators/subclass.js";import{SimpleObservable as m}from"./accessorSupport/tracking/SimpleObservable.js";var g;class d{constructor(){this.target=null,this.cancellable=!1,this.defaultPrevented=!1,this.item=void 0,this.type=void 0}preventDefault(){this.cancellable&&(this.defaultPrevented=!0)}reset(e){this.defaultPrevented=!1,this.item=e}}class p{constructor(e,t,s,i,r){this.target=e,this.added=t,this.removed=s,this.start=i,this.deleteCount=r}}const b=new n(d,void 0,(e=>{e.item=null,e.target=null,e.defaultPrevented=!1,e.cancellable=!1}));function v(e){e&&"object"==typeof e&&"destroy"in e&&"function"==typeof e.destroy&&e.destroy()}function y(e){return e?e instanceof R?e.toArray():e.length?Array.prototype.slice.apply(e):[]:[]}function E(e){if(e?.length)return e[0]}function A(e,t,s,i){const r=Math.min(e.length-s,t.length-i);let n=0;for(;n<r&&e[s+n]===t[i+n];)n++;return n}function C(e,t,s,i){t&&t.forEach(((t,r,n)=>{e.push(t),C(e,s.call(i,t,r,n),s,i)}))}const O=new Set,M=new Set,D=new Set,x=new Map;let j=0,R=g=class extends s.EventedAccessor{static isCollection(e){return null!=e&&e instanceof g}constructor(e){super(e),this._chgListeners=[],this._notifications=null,this._updating=!1,this._timer=null,this._observable=new m,this.length=0,this._items=[],Object.defineProperty(this,"uid",{value:j++})}normalizeCtorArgs(e){return e?Array.isArray(e)||e instanceof g?{items:e}:e:{}}destroy(){this._removeAllRaw(),this._timer&&this._timer.remove(),this._emitter.destroy(),this._notifications=null}*[Symbol.iterator](){yield*this.items}get items(){return c(this._observable),this._items}set items(e){this._emitBeforeChanges(h.ADD)||(this._splice(0,this.length,y(e)),this._emitAfterChanges(h.ADD))}hasEventListener(e){return!this.destroyed&&("change"===e?this._chgListeners.length>0:this._emitter.hasEventListener(e))}on(e,t){if(this.destroyed)return i();if("change"===e){const e=this._chgListeners,s={removed:!1,callback:t};return e.push(s),this._notifications&&this._notifications.push({listeners:e.slice(),items:this._items.slice(),changes:[]}),i((()=>{s.removed=!0,e.splice(e.indexOf(s),1)}))}return this._emitter.on(e,t)}once(e,t){const s="deref"in t?()=>t.deref():()=>t,i=this.on(e,(e=>{s()?.call(null,e),i.remove()}));return i}add(e,t){if(c(this._observable),this._emitBeforeChanges(h.ADD))return this;const s=this.getNextIndex(t??null);return this._splice(s,0,[e]),this._emitAfterChanges(h.ADD),this}addMany(e,t=this._items.length){if(c(this._observable),!e?.length)return this;if(this._emitBeforeChanges(h.ADD))return this;const s=this.getNextIndex(t);return this._splice(s,0,y(e)),this._emitAfterChanges(h.ADD),this}at(e){if(c(this._observable),(e=Math.trunc(e)||0)<0&&(e+=this.length),!(e<0||e>=this.length))return this._items[e]}removeAll(){if(c(this._observable),!this.length||this._emitBeforeChanges(h.REMOVE))return[];const e=this._removeAllRaw();return this._emitAfterChanges(h.REMOVE),e}_removeAllRaw(){return 0===this.length?[]:this._splice(0,this.length)||[]}clone(){return c(this._observable),this._createNewInstance({items:this._items.map(r)})}concat(...e){c(this._observable);const t=e.map(y);return this._createNewInstance({items:this._items.concat(...t)})}drain(e,t){if(c(this._observable),!this.length||this._emitBeforeChanges(h.REMOVE))return;const s=this._splice(0,this.length),i=s.length;for(let r=0;r<i;r++)e.call(t,s[r],r,s);this._emitAfterChanges(h.REMOVE)}destroyAll(){this.drain(v)}destroyMany(e){const t=this.removeMany(e);return t.forEach(v),t}every(e,t){return c(this._observable),this._items.every(e,t)}filter(e,t){c(this._observable);const s=2===arguments.length?this._items.filter(e,t):this._items.filter(e);return this._createNewInstance({items:s})}find(e,t){return c(this._observable),this._items.find(e,t)}findIndex(e,t){return c(this._observable),this._items.findIndex(e,t)}flatten(e,t){c(this._observable);const s=[];return C(s,this,e,t),new g(s)}forEach(e,t){return c(this._observable),this._items.forEach(e,t)}getItemAt(e){return c(this._observable),this._items[e]}getNextIndex(e){c(this._observable);const t=this.length;return(e=e??t)<0?e=0:e>t&&(e=t),e}includes(e,t=0){return c(this._observable),this._items.includes(e,t)}indexOf(e,t=0){return c(this._observable),this._items.indexOf(e,t)}join(e=","){return c(this._observable),this._items.join(e)}lastIndexOf(e,t=this.length-1){return c(this._observable),this._items.lastIndexOf(e,t)}map(e,t){c(this._observable);const s=this._items.map(e,t);return new g({items:s})}reorder(e,t=this.length-1){c(this._observable);const s=this.indexOf(e);if(-1!==s){if(t<0?t=0:t>=this.length&&(t=this.length-1),s!==t){if(this._emitBeforeChanges(h.MOVE))return e;this._splice(s,1),this._splice(t,0,[e]),this._emitAfterChanges(h.MOVE)}return e}}pop(){if(c(this._observable),!this.length||this._emitBeforeChanges(h.REMOVE))return;const e=E(this._splice(this.length-1,1));return this._emitAfterChanges(h.REMOVE),e}push(...e){return c(this._observable),this._emitBeforeChanges(h.ADD)||(this._splice(this.length,0,e),this._emitAfterChanges(h.ADD)),this.length}reduce(e,t){c(this._observable);const s=this._items;return 2===arguments.length?s.reduce(e,t):s.reduce(e)}reduceRight(e,t){c(this._observable);const s=this._items;return 2===arguments.length?s.reduceRight(e,t):s.reduceRight(e)}remove(e){return c(this._observable),this.removeAt(this.indexOf(e))}removeAt(e){if(c(this._observable),e<0||e>=this.length||this._emitBeforeChanges(h.REMOVE))return;const t=E(this._splice(e,1));return this._emitAfterChanges(h.REMOVE),t}removeMany(e){if(c(this._observable),!e?.length||this._emitBeforeChanges(h.REMOVE))return[];const t=e instanceof g?e.toArray():e,s=this._items,i=[],r=t.length;for(let n=0;n<r;n++){const e=t[n],r=s.indexOf(e);if(r>-1){const e=1+A(t,s,n+1,r+1),h=this._splice(r,e);h&&h.length>0&&i.push.apply(i,h),n+=e-1}}return this._emitAfterChanges(h.REMOVE),i}reverse(){if(c(this._observable),this._emitBeforeChanges(h.MOVE))return this;const e=this._splice(0,this.length);return e&&(e.reverse(),this._splice(0,0,e)),this._emitAfterChanges(h.MOVE),this}shift(){if(c(this._observable),!this.length||this._emitBeforeChanges(h.REMOVE))return;const e=E(this._splice(0,1));return this._emitAfterChanges(h.REMOVE),e}slice(e=0,t=this.length){return c(this._observable),this._createNewInstance({items:this._items.slice(e,t)})}some(e,t){return c(this._observable),this._items.some(e,t)}sort(e){if(c(this._observable),!this.length||this._emitBeforeChanges(h.MOVE)||!this._requiresSort(e))return this;const t=this._splice(0,this.length);return arguments.length?t.sort(e):t.sort(),this._splice(0,0,t),this._emitAfterChanges(h.MOVE),this}_requiresSort(e=(e,t)=>e===t?0:e<t?-1:1){const t=this.length-1;for(let s=0;s<t;s++){if(e(this.items[s],this.items[s+1])>0)return!0}return!1}splice(e,t,...s){c(this._observable);const i=(t?h.REMOVE:0)|(s.length?h.ADD:0);if(this._emitBeforeChanges(i))return[];const r=this._splice(e,t,s)||[];return this._emitAfterChanges(i),r}toArray(){return c(this._observable),this._items.slice()}toJSON(){return c(this._observable),this.toArray()}toLocaleString(){return c(this._observable),this._items.toLocaleString()}toString(){return c(this._observable),this._items.toString()}unshift(...e){return c(this._observable),!e.length||this._emitBeforeChanges(h.ADD)||(this._splice(0,0,e),this._emitAfterChanges(h.ADD)),this.length}_createNewInstance(e){return new this.constructor(e)}_splice(e,t,s){const i=this._items,r=this.itemType;let n,h;if(!this._notifications&&this.hasEventListener("change")&&(this._notifications=[{listeners:this._chgListeners.slice(),items:this._items.slice(),changes:[]}],this._timer&&this._timer.remove(),this._updating=!0,this._timer=o((()=>this._dispatchChange()))),e<0&&(e+=this.length),t){if(h=i.splice(e,t),this.hasEventListener("before-remove")){const t=b.acquire();t.target=this,t.cancellable=!0;for(let s=0,r=h.length;s<r;s++)n=h[s],t.reset(n),this.emit("before-remove",t),t.defaultPrevented&&(h.splice(s,1),i.splice(e,0,n),e+=1,s-=1,r-=1);b.release(t)}if(this.length=this._items.length,this.hasEventListener("after-remove")){const e=b.acquire();e.target=this,e.cancellable=!1;const t=h.length;for(let s=0;s<t;s++)e.reset(h[s]),this.emit("after-remove",e);b.release(e)}}if(s?.length){if(r){const e=[];for(const t of s){const s=r.ensureType(t);null==s&&null!=t||e.push(s)}s=e}const t=this.hasEventListener("before-add"),n=this.hasEventListener("after-add"),h=e===this.length;if(t||n){const r=b.acquire();r.target=this,r.cancellable=!0;const o=b.acquire();o.target=this,o.cancellable=!1;for(const l of s)t?(r.reset(l),this.emit("before-add",r),r.defaultPrevented||(h?i.push(l):i.splice(e++,0,l),this._set("length",i.length),n&&(o.reset(l),this.emit("after-add",o)))):(h?i.push(l):i.splice(e++,0,l),this._set("length",i.length),o.reset(l),this.emit("after-add",o));b.release(o),b.release(r)}else{if(h)for(const e of s)i.push(e);else i.splice(e,0,...s);this._set("length",i.length)}}if((s?.length||h?.length)&&this._notifyChangeEvent(s,h),this.hasEventListener("after-splice")){const i=new p(this,s,h,e,t);this.emit("after-splice",i)}return h}_emitBeforeChanges(e){let t=!1;if(this.hasEventListener("before-changes")){const s=b.acquire();s.target=this,s.cancellable=!0,s.type=e,this.emit("before-changes",s),t=s.defaultPrevented,b.release(s)}return t}_emitAfterChanges(e){if(this.hasEventListener("after-changes")){const t=b.acquire();t.target=this,t.cancellable=!1,t.type=e,this.emit("after-changes",t),b.release(t)}this._observable.notify()}_notifyChangeEvent(e,t){this.hasEventListener("change")&&this._notifications&&this._notifications[this._notifications.length-1].changes.push({added:e,removed:t})}get updating(){return this._updating}_dispatchChange(){if(this._timer&&(this._timer.remove(),this._timer=null),this._updating=!1,!this._notifications)return;const e=this._notifications;this._notifications=null;for(const s of e){const e=s.changes;O.clear(),M.clear(),D.clear();for(const{added:t,removed:s}of e){if(t)if(0===D.size&&0===M.size)for(const e of t)O.add(e);else for(const e of t)M.has(e)?(D.add(e),M.delete(e)):D.has(e)||O.add(e);if(s)if(0===D.size&&0===O.size)for(const e of s)M.add(e);else for(const e of s)O.has(e)?O.delete(e):(D.delete(e),M.add(e))}const i=t.acquire();O.forEach((e=>{i.push(e)}));const r=t.acquire();M.forEach((e=>{r.push(e)}));const n=this._items,h=s.items,o=t.acquire();if(D.forEach((e=>{h.indexOf(e)!==n.indexOf(e)&&o.push(e)})),s.listeners&&(i.length||r.length||o.length)){const e={target:this,added:i,removed:r,moved:o},t=s.listeners.length;for(let i=0;i<t;i++){const t=s.listeners[i];t.removed||t.callback.call(this,e)}}t.release(i),t.release(r),t.release(o)}O.clear(),M.clear(),D.clear()}};R.ofType=t=>{if(!t)return g;if(x.has(t))return x.get(t);let s=null;if("function"==typeof t)s=t.prototype.declaredClass;else if(t.base)s=t.base.prototype.declaredClass;else for(const e in t.typeMap){const i=t.typeMap[e].prototype.declaredClass;s?s+=` | ${i}`:s=i}let i=class extends g{};return e([_({Type:t,ensureType:"function"==typeof t?l(t):a(t)})],i.prototype,"itemType",void 0),i=e([u(`esri.core.Collection<${s}>`)],i),x.set(t,i),i},e([f()],R.prototype,"_updating",void 0),e([f()],R.prototype,"length",void 0),e([f()],R.prototype,"items",null),e([f({readOnly:!0})],R.prototype,"updating",null),R=g=e([u("esri.core.Collection")],R);const V=R;export{V as default};
|
|
5
|
+
import{_ as e}from"../chunks/tslib.es6.js";import t from"./ArrayPool.js";import s from"./Evented.js";import{makeHandle as i}from"./handleUtils.js";import{clone as r}from"./lang.js";import n from"./ObjectPool.js";import{ObservableChangesType as h}from"./ObservableChangesType.js";import{schedule as o}from"./scheduling.js";import{ensureType as l,ensureOneOfType as a}from"./accessorSupport/ensureType.js";import{trackAccess as c}from"./accessorSupport/tracking.js";import{property as f}from"./accessorSupport/decorators/property.js";import{shared as _}from"./accessorSupport/decorators/shared.js";import{subclass as u}from"./accessorSupport/decorators/subclass.js";import{SimpleObservable as m}from"./accessorSupport/tracking/SimpleObservable.js";var g;class d{constructor(){this.target=null,this.cancellable=!1,this.defaultPrevented=!1,this.item=void 0,this.type=void 0}preventDefault(){this.cancellable&&(this.defaultPrevented=!0)}reset(e){this.defaultPrevented=!1,this.item=e}}class p{constructor(e,t,s,i,r){this.target=e,this.added=t,this.removed=s,this.start=i,this.deleteCount=r}}const b=new n(d,void 0,(e=>{e.item=null,e.target=null,e.defaultPrevented=!1,e.cancellable=!1}));function v(e){e&&"object"==typeof e&&"destroy"in e&&"function"==typeof e.destroy&&e.destroy()}function y(e){return e?e instanceof R?e.toArray():e.length?Array.prototype.slice.apply(e):[]:[]}function E(e){if(e?.length)return e[0]}function A(e,t,s,i){const r=Math.min(e.length-s,t.length-i);let n=0;for(;n<r&&e[s+n]===t[i+n];)n++;return n}function C(e,t,s,i){t&&t.forEach(((t,r,n)=>{e.push(t),C(e,s.call(i,t,r,n),s,i)}))}const O=new Set,M=new Set,D=new Set,x=new Map;let j=0,R=class extends s.EventedAccessor{static{g=this}static{this.ofType=t=>{if(!t)return g;if(x.has(t))return x.get(t);let s=null;if("function"==typeof t)s=t.prototype.declaredClass;else if(t.base)s=t.base.prototype.declaredClass;else for(const e in t.typeMap){const i=t.typeMap[e].prototype.declaredClass;s?s+=` | ${i}`:s=i}let i=class extends g{};return e([_({Type:t,ensureType:"function"==typeof t?l(t):a(t)})],i.prototype,"itemType",void 0),i=e([u(`esri.core.Collection<${s}>`)],i),x.set(t,i),i}}static isCollection(e){return null!=e&&e instanceof g}constructor(e){super(e),this._chgListeners=[],this._notifications=null,this._updating=!1,this._timer=null,this._observable=new m,this.length=0,this._items=[],Object.defineProperty(this,"uid",{value:j++})}normalizeCtorArgs(e){return e?Array.isArray(e)||e instanceof g?{items:e}:e:{}}destroy(){this._removeAllRaw(),this._timer&&this._timer.remove(),this._emitter.destroy(),this._notifications=null}*[Symbol.iterator](){yield*this.items}get items(){return c(this._observable),this._items}set items(e){this._emitBeforeChanges(h.ADD)||(this._splice(0,this.length,y(e)),this._emitAfterChanges(h.ADD))}hasEventListener(e){return!this.destroyed&&("change"===e?this._chgListeners.length>0:this._emitter.hasEventListener(e))}on(e,t){if(this.destroyed)return i();if("change"===e){const e=this._chgListeners,s={removed:!1,callback:t};return e.push(s),this._notifications&&this._notifications.push({listeners:e.slice(),items:this._items.slice(),changes:[]}),i((()=>{s.removed=!0,e.splice(e.indexOf(s),1)}))}return this._emitter.on(e,t)}once(e,t){const s="deref"in t?()=>t.deref():()=>t,i=this.on(e,(e=>{s()?.call(null,e),i.remove()}));return i}add(e,t){if(c(this._observable),this._emitBeforeChanges(h.ADD))return this;const s=this.getNextIndex(t??null);return this._splice(s,0,[e]),this._emitAfterChanges(h.ADD),this}addMany(e,t=this._items.length){if(c(this._observable),!e?.length)return this;if(this._emitBeforeChanges(h.ADD))return this;const s=this.getNextIndex(t);return this._splice(s,0,y(e)),this._emitAfterChanges(h.ADD),this}at(e){if(c(this._observable),(e=Math.trunc(e)||0)<0&&(e+=this.length),!(e<0||e>=this.length))return this._items[e]}removeAll(){if(c(this._observable),!this.length||this._emitBeforeChanges(h.REMOVE))return[];const e=this._removeAllRaw();return this._emitAfterChanges(h.REMOVE),e}_removeAllRaw(){return 0===this.length?[]:this._splice(0,this.length)||[]}clone(){return c(this._observable),this._createNewInstance({items:this._items.map(r)})}concat(...e){c(this._observable);const t=e.map(y);return this._createNewInstance({items:this._items.concat(...t)})}drain(e,t){if(c(this._observable),!this.length||this._emitBeforeChanges(h.REMOVE))return;const s=this._splice(0,this.length),i=s.length;for(let r=0;r<i;r++)e.call(t,s[r],r,s);this._emitAfterChanges(h.REMOVE)}destroyAll(){this.drain(v)}destroyMany(e){const t=this.removeMany(e);return t.forEach(v),t}every(e,t){return c(this._observable),this._items.every(e,t)}filter(e,t){c(this._observable);const s=2===arguments.length?this._items.filter(e,t):this._items.filter(e);return this._createNewInstance({items:s})}find(e,t){return c(this._observable),this._items.find(e,t)}findIndex(e,t){return c(this._observable),this._items.findIndex(e,t)}flatten(e,t){c(this._observable);const s=[];return C(s,this,e,t),new g(s)}forEach(e,t){return c(this._observable),this._items.forEach(e,t)}getItemAt(e){return c(this._observable),this._items[e]}getNextIndex(e){c(this._observable);const t=this.length;return(e=e??t)<0?e=0:e>t&&(e=t),e}includes(e,t=0){return c(this._observable),this._items.includes(e,t)}indexOf(e,t=0){return c(this._observable),this._items.indexOf(e,t)}join(e=","){return c(this._observable),this._items.join(e)}lastIndexOf(e,t=this.length-1){return c(this._observable),this._items.lastIndexOf(e,t)}map(e,t){c(this._observable);const s=this._items.map(e,t);return new g({items:s})}reorder(e,t=this.length-1){c(this._observable);const s=this.indexOf(e);if(-1!==s){if(t<0?t=0:t>=this.length&&(t=this.length-1),s!==t){if(this._emitBeforeChanges(h.MOVE))return e;this._splice(s,1),this._splice(t,0,[e]),this._emitAfterChanges(h.MOVE)}return e}}pop(){if(c(this._observable),!this.length||this._emitBeforeChanges(h.REMOVE))return;const e=E(this._splice(this.length-1,1));return this._emitAfterChanges(h.REMOVE),e}push(...e){return c(this._observable),this._emitBeforeChanges(h.ADD)||(this._splice(this.length,0,e),this._emitAfterChanges(h.ADD)),this.length}reduce(e,t){c(this._observable);const s=this._items;return 2===arguments.length?s.reduce(e,t):s.reduce(e)}reduceRight(e,t){c(this._observable);const s=this._items;return 2===arguments.length?s.reduceRight(e,t):s.reduceRight(e)}remove(e){return c(this._observable),this.removeAt(this.indexOf(e))}removeAt(e){if(c(this._observable),e<0||e>=this.length||this._emitBeforeChanges(h.REMOVE))return;const t=E(this._splice(e,1));return this._emitAfterChanges(h.REMOVE),t}removeMany(e){if(c(this._observable),!e?.length||this._emitBeforeChanges(h.REMOVE))return[];const t=e instanceof g?e.toArray():e,s=this._items,i=[],r=t.length;for(let n=0;n<r;n++){const e=t[n],r=s.indexOf(e);if(r>-1){const e=1+A(t,s,n+1,r+1),h=this._splice(r,e);h&&h.length>0&&i.push.apply(i,h),n+=e-1}}return this._emitAfterChanges(h.REMOVE),i}reverse(){if(c(this._observable),this._emitBeforeChanges(h.MOVE))return this;const e=this._splice(0,this.length);return e&&(e.reverse(),this._splice(0,0,e)),this._emitAfterChanges(h.MOVE),this}shift(){if(c(this._observable),!this.length||this._emitBeforeChanges(h.REMOVE))return;const e=E(this._splice(0,1));return this._emitAfterChanges(h.REMOVE),e}slice(e=0,t=this.length){return c(this._observable),this._createNewInstance({items:this._items.slice(e,t)})}some(e,t){return c(this._observable),this._items.some(e,t)}sort(e){if(c(this._observable),!this.length||this._emitBeforeChanges(h.MOVE)||!this._requiresSort(e))return this;const t=this._splice(0,this.length);return arguments.length?t.sort(e):t.sort(),this._splice(0,0,t),this._emitAfterChanges(h.MOVE),this}_requiresSort(e=(e,t)=>e===t?0:e<t?-1:1){const t=this.length-1;for(let s=0;s<t;s++){if(e(this.items[s],this.items[s+1])>0)return!0}return!1}splice(e,t,...s){c(this._observable);const i=(t?h.REMOVE:0)|(s.length?h.ADD:0);if(this._emitBeforeChanges(i))return[];const r=this._splice(e,t,s)||[];return this._emitAfterChanges(i),r}toArray(){return c(this._observable),this._items.slice()}toJSON(){return c(this._observable),this.toArray()}toLocaleString(){return c(this._observable),this._items.toLocaleString()}toString(){return c(this._observable),this._items.toString()}unshift(...e){return c(this._observable),!e.length||this._emitBeforeChanges(h.ADD)||(this._splice(0,0,e),this._emitAfterChanges(h.ADD)),this.length}_createNewInstance(e){return new this.constructor(e)}_splice(e,t,s){const i=this._items,r=this.itemType;let n,h;if(!this._notifications&&this.hasEventListener("change")&&(this._notifications=[{listeners:this._chgListeners.slice(),items:this._items.slice(),changes:[]}],this._timer&&this._timer.remove(),this._updating=!0,this._timer=o((()=>this._dispatchChange()))),e<0&&(e+=this.length),t){if(h=i.splice(e,t),this.hasEventListener("before-remove")){const t=b.acquire();t.target=this,t.cancellable=!0;for(let s=0,r=h.length;s<r;s++)n=h[s],t.reset(n),this.emit("before-remove",t),t.defaultPrevented&&(h.splice(s,1),i.splice(e,0,n),e+=1,s-=1,r-=1);b.release(t)}if(this.length=this._items.length,this.hasEventListener("after-remove")){const e=b.acquire();e.target=this,e.cancellable=!1;const t=h.length;for(let s=0;s<t;s++)e.reset(h[s]),this.emit("after-remove",e);b.release(e)}}if(s?.length){if(r){const e=[];for(const t of s){const s=r.ensureType(t);null==s&&null!=t||e.push(s)}s=e}const t=this.hasEventListener("before-add"),n=this.hasEventListener("after-add"),h=e===this.length;if(t||n){const r=b.acquire();r.target=this,r.cancellable=!0;const o=b.acquire();o.target=this,o.cancellable=!1;for(const l of s)t?(r.reset(l),this.emit("before-add",r),r.defaultPrevented||(h?i.push(l):i.splice(e++,0,l),this._set("length",i.length),n&&(o.reset(l),this.emit("after-add",o)))):(h?i.push(l):i.splice(e++,0,l),this._set("length",i.length),o.reset(l),this.emit("after-add",o));b.release(o),b.release(r)}else{if(h)for(const e of s)i.push(e);else i.splice(e,0,...s);this._set("length",i.length)}}if((s?.length||h?.length)&&this._notifyChangeEvent(s,h),this.hasEventListener("after-splice")){const i=new p(this,s,h,e,t);this.emit("after-splice",i)}return h}_emitBeforeChanges(e){let t=!1;if(this.hasEventListener("before-changes")){const s=b.acquire();s.target=this,s.cancellable=!0,s.type=e,this.emit("before-changes",s),t=s.defaultPrevented,b.release(s)}return t}_emitAfterChanges(e){if(this.hasEventListener("after-changes")){const t=b.acquire();t.target=this,t.cancellable=!1,t.type=e,this.emit("after-changes",t),b.release(t)}this._observable.notify()}_notifyChangeEvent(e,t){this.hasEventListener("change")&&this._notifications&&this._notifications[this._notifications.length-1].changes.push({added:e,removed:t})}get updating(){return this._updating}_dispatchChange(){if(this._timer&&(this._timer.remove(),this._timer=null),this._updating=!1,!this._notifications)return;const e=this._notifications;this._notifications=null;for(const s of e){const e=s.changes;O.clear(),M.clear(),D.clear();for(const{added:t,removed:s}of e){if(t)if(0===D.size&&0===M.size)for(const e of t)O.add(e);else for(const e of t)M.has(e)?(D.add(e),M.delete(e)):D.has(e)||O.add(e);if(s)if(0===D.size&&0===O.size)for(const e of s)M.add(e);else for(const e of s)O.has(e)?O.delete(e):(D.delete(e),M.add(e))}const i=t.acquire();O.forEach((e=>{i.push(e)}));const r=t.acquire();M.forEach((e=>{r.push(e)}));const n=this._items,h=s.items,o=t.acquire();if(D.forEach((e=>{h.indexOf(e)!==n.indexOf(e)&&o.push(e)})),s.listeners&&(i.length||r.length||o.length)){const e={target:this,added:i,removed:r,moved:o},t=s.listeners.length;for(let i=0;i<t;i++){const t=s.listeners[i];t.removed||t.callback.call(this,e)}}t.release(i),t.release(r),t.release(o)}O.clear(),M.clear(),D.clear()}};e([f()],R.prototype,"_updating",void 0),e([f()],R.prototype,"length",void 0),e([f()],R.prototype,"items",null),e([f({readOnly:!0})],R.prototype,"updating",null),R=g=e([u("esri.core.Collection")],R);const V=R;export{V as default};
|
package/core/Logger.js
CHANGED
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import e from"../config.js";import"./has.js";import{numericHash as t}from"./string.js";const r={info:0,warn:1,error:2,none:3};class
|
|
5
|
+
import e from"../config.js";import"./has.js";import{numericHash as t}from"./string.js";const r={info:0,warn:1,error:2,none:3};class i{constructor(e){this.level=null,this._module="",this._parent=null,this.writer=null,this._loggedMessages={error:new Map,warn:new Map,info:new Map},null!=e.level&&(this.level=e.level),null!=e.writer&&(this.writer=e.writer),this._module=e.module,i._loggers.set(this.module,this);const t=this.module.lastIndexOf(".");-1!==t&&(this._parent=i.getLogger(this.module.slice(0,t)))}get module(){return this._module}get parent(){return this._parent}error(...e){this._log("error","always",...e)}warn(...e){this._log("warn","always",...e)}info(...e){this._log("info","always",...e)}errorOnce(...e){this._log("error","once",...e)}warnOnce(...e){this._log("warn","once",...e)}infoOnce(...e){this._log("info","once",...e)}errorOncePerTick(...e){this._log("error","oncePerTick",...e)}warnOncePerTick(...e){this._log("warn","oncePerTick",...e)}infoOncePerTick(...e){this._log("info","oncePerTick",...e)}get test(){}static get test(){}static getLogger(e){return e="string"!=typeof e?e.declaredClass:e,i._loggers.get(e)||new i({module:e})}static{this._loggers=new Map}static{this._tickCounter=0}static{this._tickCounterScheduled=!1}static{this._throttlingDisabled=!1}_log(t,r,...n){if(!this._matchLevel(t))return;if("always"!==r&&!i._throttlingDisabled){const e=o(n),s=this._loggedMessages[t].get(e);if("once"===r&&null!=s||"oncePerTick"===r&&s&&s>=i._tickCounter)return;this._loggedMessages[t].set(e,i._tickCounter),i._scheduleTickCounterIncrement()}for(const i of e.log.interceptors)if(i(t,this.module,...n))return;this._inheritedWriter()(t,this.module,...n)}_parentWithMember(e,t){let r=this;for(;null!=r;){const t=r[e];if(null!=t)return t;r=r.parent}return t}_inheritedWriter(){return this._parentWithMember("writer",n)}_matchLevel(t){const i=e.log.level||"warn";return r[this._parentWithMember("level",i)]<=r[t]}static _scheduleTickCounterIncrement(){i._tickCounterScheduled||(i._tickCounterScheduled=!0,Promise.resolve().then((()=>{i._tickCounter++,i._tickCounterScheduled=!1})))}}function n(e,t,...r){console[e](`[${t}]`,...r)}function o(...e){const r=(e,t)=>"object"!=typeof t||Array.isArray(t)?t:"[Object]";return t(JSON.stringify(e,r))}export{i as default};
|
package/core/ObjectPool.js
CHANGED
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
function t(t){return t?.release&&"function"==typeof t.release}function i(t){return t?.acquire&&"function"==typeof t.acquire}class e{constructor(t,i,e,
|
|
5
|
+
function t(t){return t?.release&&"function"==typeof t.release}function i(t){return t?.acquire&&"function"==typeof t.acquire}class e{constructor(t,i,e,s=1,o=0){this._ctor=t,this._acquireFunction=i,this._releaseFunction=e,this.allocationSize=s,this._pool=new Array(o),this._initialSize=o;for(let n=0;n<o;n++)this._pool[n]=new this._ctor;this.allocationSize=Math.max(s,1)}destroy(){this.prune(0)}acquire(...t){let s;if(e.test.disabled)s=new this._ctor;else{if(0===this._pool.length){const t=this.allocationSize;for(let i=0;i<t;i++)this._pool[i]=new this._ctor}s=this._pool.pop()}return this._acquireFunction?this._acquireFunction(s,...t):i(s)&&s.acquire(...t),s}release(i){i&&!e.test.disabled&&(this._releaseFunction?this._releaseFunction(i):t(i)&&i.release(),this._pool.push(i))}prune(t=this._initialSize){if(!(t>=this._pool.length)){for(let i=t;i<this._pool.length;++i){const t=this._pool[i];this._dispose(t)}this._pool.length=t}}_dispose(t){t.dispose&&"function"==typeof t.dispose&&t.dispose()}static{this.test={disabled:!1}}}export{e as default};
|
package/core/RandomLCG.js
CHANGED
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
class t{constructor(t=1){this._seed=t}set seed(e){this._seed=e??Math.random()*t._m}getInt(){return this._seed=(t._a*this._seed+t._c)%t._m,this._seed}getFloat(){return this.getInt()/(t._m-1)}getIntRange(t,e){return Math.round(this.getFloatRange(t,e))}getFloatRange(e,s){const
|
|
5
|
+
class t{static{this._m=2147483647}static{this._a=48271}static{this._c=0}constructor(t=1){this._seed=t}set seed(e){this._seed=e??Math.random()*t._m}getInt(){return this._seed=(t._a*this._seed+t._c)%t._m,this._seed}getFloat(){return this.getInt()/(t._m-1)}getIntRange(t,e){return Math.round(this.getFloatRange(t,e))}getFloatRange(e,s){const a=s-e;return e+this.getInt()/t._m*a}}export{t as default};
|
package/core/XHRAdapter.js
CHANGED
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import t from"../request.js";import{isTimeoutError as e}from"../support/requestUtils.js";class s extends EventTarget{constructor(){super(...arguments),this._readyState=0,this._responseType="",this.timeout=0,this._withCredentials=!1,this.onabort=null,this.onerror=null,this.onload=null,this.onloadend=null,this.onloadstart=null,this.onprogress=null,this.ontimeout=null,this.onreadystatechange=null,this.UNSENT=0,this.OPENED=1,this.HEADERS_RECEIVED=2,this.LOADING=3,this.DONE=4,this._abortController=null,this._error=null,this._options={},this._response=null,this._sendFlag=!1,this._url=""}get readyState(){return this._readyState}get response(){return""===this.responseType||"text"===this.responseType?this.responseText:this.readyState!==this.DONE||this._error||!this._response?null:this._response.data}get responseText(){return""!==this.responseType&&"text"!==this.responseType&&this._throwDOMException(),this.readyState!==this.DONE?"":this._response?this._response.data:null!=this._error?.raw?"string"==typeof this._error.raw?this._error.raw:JSON.stringify(this._error.raw):""}get responseType(){return this._responseType}set responseType(t){("document"!==t||globalThis instanceof Window)&&(this.readyState!==this.LOADING&&this.readyState!==this.DONE||this._throwDOMException(),this._responseType=t)}get responseURL(){return(this._response||this._error)?.url??""}get responseXML(){return""!==this.responseType&&"document"!==this.responseType&&this._throwDOMException(),this.readyState!==this.DONE?null:this._response?.data??null}get status(){return(this._response||this._error)?.httpStatus??0}get statusText(){return""}get upload(){return console.warn("upload not implemented"),null}get withCredentials(){return this._withCredentials}set withCredentials(t){this.readyState!==this.UNSENT&&this.readyState!==this.OPENED&&this._throwDOMException(),this._withCredentials=t}abort(){this.readyState===this.OPENED&&this._sendFlag||this.readyState===this.HEADERS_RECEIVED||this.readyState===this.LOADING?(this._sendFlag=!1,this._error=null,this._response=null,this._abortController?.abort(),this._updateReadyState(this.DONE),this._dispatchProgressEvent("abort"),this._dispatchProgressEvent("loadend")):this.readyState===this.DONE&&this._updateReadyState(this.UNSENT)}getAllResponseHeaders(){let t="";const e=(this._response||this._error)?.getAllHeaders?.();if(e)for(const[s,r]of e)t+=`${s}: ${r}\r\n`;return t}getResponseHeader(t){return(this._response||this._error)?.getHeader?.(t)??null}open(t,e){switch(this._sendFlag=!1,this._options={},t){case"GET":this._options.method="auto";break;case"POST":this._options.method="post";break;case"HEAD":this._options.method="head";break;case"DELETE":this._options.method="delete";break;case"PUT":this._options.method="put"}this._url=e,this._error=null,this._response=null,this._abortController=new AbortController,this._updateReadyState(this.OPENED)}overrideMimeType(t){throw new Error("overrideMimeType not implemented")}send(s){(this.readyState!==this.OPENED||this._sendFlag)&&this._throwDOMException(),this._sendFlag=!0,this._updateReadyState(this.LOADING),this._dispatchProgressEvent("loadstart");const r=this._options;s instanceof URLSearchParams?r.body=s.toString():r.body=s,r.responseType=""===this.responseType?"text":"arraybuffer"===this.responseType?"array-buffer":this.responseType,r.signal=this._abortController?.signal,this.timeout&&(r.timeout=this.timeout),this.withCredentials&&(r.withCredentials=!0),t(this._url,r).then((t=>{this._response=t,this._updateReadyState(this.DONE),this._dispatchProgressEvent("load")})).catch((t=>{this._sendFlag&&(this._error=t.details,this._updateReadyState(this.DONE),e(t)?this._dispatchProgressEvent("timeout"):"AbortError"===t.name?this._dispatchProgressEvent("abort"):this._dispatchProgressEvent("error"))})).finally((()=>{this._sendFlag&&this._dispatchProgressEvent("loadend")}))}setRequestHeader(t,e){(this.readyState!==this.OPENED||this._sendFlag)&&this._throwDOMException(),this._options.headers??={},this._options.headers[t]=e}_dispatchProgressEvent(t){const e=new ProgressEvent(t,{loaded:0,total:0});this.dispatchEvent(e),this[`on${t}`]?.(e)}_throwDOMException(){throw new DOMException("","InvalidStateError")}_updateReadyState(t){if(this._readyState!==t&&(this._readyState=t,t!==this.UNSENT)){const t=new Event("readystatechange");this.dispatchEvent(t),this.onreadystatechange?.(t)}}}
|
|
5
|
+
import t from"../request.js";import{isTimeoutError as e}from"../support/requestUtils.js";class s extends EventTarget{constructor(){super(...arguments),this._readyState=0,this._responseType="",this.timeout=0,this._withCredentials=!1,this.onabort=null,this.onerror=null,this.onload=null,this.onloadend=null,this.onloadstart=null,this.onprogress=null,this.ontimeout=null,this.onreadystatechange=null,this.UNSENT=0,this.OPENED=1,this.HEADERS_RECEIVED=2,this.LOADING=3,this.DONE=4,this._abortController=null,this._error=null,this._options={},this._response=null,this._sendFlag=!1,this._url=""}get readyState(){return this._readyState}get response(){return""===this.responseType||"text"===this.responseType?this.responseText:this.readyState!==this.DONE||this._error||!this._response?null:this._response.data}get responseText(){return""!==this.responseType&&"text"!==this.responseType&&this._throwDOMException(),this.readyState!==this.DONE?"":this._response?this._response.data:null!=this._error?.raw?"string"==typeof this._error.raw?this._error.raw:JSON.stringify(this._error.raw):""}get responseType(){return this._responseType}set responseType(t){("document"!==t||globalThis instanceof Window)&&(this.readyState!==this.LOADING&&this.readyState!==this.DONE||this._throwDOMException(),this._responseType=t)}get responseURL(){return(this._response||this._error)?.url??""}get responseXML(){return""!==this.responseType&&"document"!==this.responseType&&this._throwDOMException(),this.readyState!==this.DONE?null:this._response?.data??null}get status(){return(this._response||this._error)?.httpStatus??0}get statusText(){return""}get upload(){return console.warn("upload not implemented"),null}get withCredentials(){return this._withCredentials}set withCredentials(t){this.readyState!==this.UNSENT&&this.readyState!==this.OPENED&&this._throwDOMException(),this._withCredentials=t}static{this.UNSENT=0}static{this.OPENED=1}static{this.HEADERS_RECEIVED=2}static{this.LOADING=3}static{this.DONE=4}abort(){this.readyState===this.OPENED&&this._sendFlag||this.readyState===this.HEADERS_RECEIVED||this.readyState===this.LOADING?(this._sendFlag=!1,this._error=null,this._response=null,this._abortController?.abort(),this._updateReadyState(this.DONE),this._dispatchProgressEvent("abort"),this._dispatchProgressEvent("loadend")):this.readyState===this.DONE&&this._updateReadyState(this.UNSENT)}getAllResponseHeaders(){let t="";const e=(this._response||this._error)?.getAllHeaders?.();if(e)for(const[s,r]of e)t+=`${s}: ${r}\r\n`;return t}getResponseHeader(t){return(this._response||this._error)?.getHeader?.(t)??null}open(t,e){switch(this._sendFlag=!1,this._options={},t){case"GET":this._options.method="auto";break;case"POST":this._options.method="post";break;case"HEAD":this._options.method="head";break;case"DELETE":this._options.method="delete";break;case"PUT":this._options.method="put"}this._url=e,this._error=null,this._response=null,this._abortController=new AbortController,this._updateReadyState(this.OPENED)}overrideMimeType(t){throw new Error("overrideMimeType not implemented")}send(s){(this.readyState!==this.OPENED||this._sendFlag)&&this._throwDOMException(),this._sendFlag=!0,this._updateReadyState(this.LOADING),this._dispatchProgressEvent("loadstart");const r=this._options;s instanceof URLSearchParams?r.body=s.toString():r.body=s,r.responseType=""===this.responseType?"text":"arraybuffer"===this.responseType?"array-buffer":this.responseType,r.signal=this._abortController?.signal,this.timeout&&(r.timeout=this.timeout),this.withCredentials&&(r.withCredentials=!0),t(this._url,r).then((t=>{this._response=t,this._updateReadyState(this.DONE),this._dispatchProgressEvent("load")})).catch((t=>{this._sendFlag&&(this._error=t.details,this._updateReadyState(this.DONE),e(t)?this._dispatchProgressEvent("timeout"):"AbortError"===t.name?this._dispatchProgressEvent("abort"):this._dispatchProgressEvent("error"))})).finally((()=>{this._sendFlag&&this._dispatchProgressEvent("loadend")}))}setRequestHeader(t,e){(this.readyState!==this.OPENED||this._sendFlag)&&this._throwDOMException(),this._options.headers??={},this._options.headers[t]=e}_dispatchProgressEvent(t){const e=new ProgressEvent(t,{loaded:0,total:0});this.dispatchEvent(e),this[`on${t}`]?.(e)}_throwDOMException(){throw new DOMException("","InvalidStateError")}_updateReadyState(t){if(this._readyState!==t&&(this._readyState=t,t!==this.UNSENT)){const t=new Event("readystatechange");this.dispatchEvent(t),this.onreadystatechange?.(t)}}}export{s as XHRAdapter};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import e from"../ArrayPool.js";import{makeHandle as t}from"../handleUtils.js";import{equals as r,equalsShallow as l}from"../lang.js";import{ReentrantObjectPool as o}from"../ReentrantObjectPool.js";import{schedule as i}from"../scheduling.js";import{someSet as n}from"../SetUtils.js";import{generateUID as s}from"../uid.js";import{valueOf as c}from"./get.js";import{Lifecycle as u}from"./interfaces.js";import{reactionDeferred as a,reaction as d}from"./trackingUtils.js";import{parse as f}from"./utils.js";var h;!function(e){e[e.Untracked=0]="Untracked",e[e.Tracked=1]="Tracked"}(h||(h={}));class m{constructor(){this.uid=s(),this.removed=!1,this.type=null,this.oldValue=null,this.callback=null,this.getValue=null,this.target=null,this.path=null,this.equals=null}static acquireUntracked(e,t,l,o,i){return this.pool.acquire(h.Untracked,e,t,l,o,i,r)}static acquireTracked(e,t,r,l){return this.pool.acquire(h.Tracked,e,t,r,null,null,l)}notify(e,t){this.type===h.Untracked?this.callback.call(this.target,e,t,this.path,this.target):this.callback.call(null,e,t,void 0,void 0)}acquire(e,t,r,l,o,i,n){this.uid=s(),this.removed=!1,this.type=e,this.oldValue=t,this.callback=r,this.getValue=l,this.target=o,this.path=i,this.equals=n}release(){this.target=this.path=this.oldValue=this.callback=this.getValue=null,this.uid=s(),this.removed=!0}}
|
|
5
|
+
import e from"../ArrayPool.js";import{makeHandle as t}from"../handleUtils.js";import{equals as r,equalsShallow as l}from"../lang.js";import{ReentrantObjectPool as o}from"../ReentrantObjectPool.js";import{schedule as i}from"../scheduling.js";import{someSet as n}from"../SetUtils.js";import{generateUID as s}from"../uid.js";import{valueOf as c}from"./get.js";import{Lifecycle as u}from"./interfaces.js";import{reactionDeferred as a,reaction as d}from"./trackingUtils.js";import{parse as f}from"./utils.js";var h;!function(e){e[e.Untracked=0]="Untracked",e[e.Tracked=1]="Tracked"}(h||(h={}));class m{constructor(){this.uid=s(),this.removed=!1,this.type=null,this.oldValue=null,this.callback=null,this.getValue=null,this.target=null,this.path=null,this.equals=null}static{this.pool=new o(m)}static acquireUntracked(e,t,l,o,i){return this.pool.acquire(h.Untracked,e,t,l,o,i,r)}static acquireTracked(e,t,r,l){return this.pool.acquire(h.Tracked,e,t,r,null,null,l)}notify(e,t){this.type===h.Untracked?this.callback.call(this.target,e,t,this.path,this.target):this.callback.call(null,e,t,void 0,void 0)}acquire(e,t,r,l,o,i,n){this.uid=s(),this.removed=!1,this.type=e,this.oldValue=t,this.callback=r,this.getValue=l,this.target=o,this.path=i,this.equals=n}release(){this.target=this.path=this.oldValue=this.callback=this.getValue=null,this.uid=s(),this.removed=!0}}const p=new e,v=new Set;let k;function _(e){v.delete(e),v.add(e),k||(k=i(q))}function g(e){if(e.removed)return;const t=e.oldValue,r=e.getValue();e.equals(t,r)||(e.oldValue=r,e.notify(r,t))}function j(e){for(const t of v.values())t.target===e&&(t.removed=!0)}function q(){let e=10;for(;k&&e--;){k=null;const e=V(),t=p.acquire();for(const r of e){const e=r.uid;g(r),e===r.uid&&r.removed&&t.push(r)}for(const r of v)r.removed&&(t.push(r),v.delete(r));for(const r of t)m.pool.release(r);p.release(t),p.release(e),y.forEach((e=>e()))}}function V(){const e=p.acquire();e.length=v.size;let t=0;for(const r of v)e[t]=r,++t;return v.clear(),e}const y=new Set;function U(e){return y.add(e),t((()=>y.delete(e)))}function T(e,r,l){let o=f(e,r,l,((e,r,l)=>{let i,n,s=a((()=>c(e,r)),((t,s)=>{e.__accessor__?.lifecycle===u.DESTROYED||i&&i.uid!==n?o.remove():(i||(i=m.acquireUntracked(t,l,s,e,r),n=i.uid),_(i))}));return t((()=>{s.remove(),i&&(i.uid!==n||i.removed||(i.removed=!0,_(i)),i=null),o=s=null}))}));return o}function E(e,t,l){const o=f(e,t,l,((e,t,l)=>{let i=!1;return d((()=>c(e,t)),((n,s)=>{e.__accessor__.lifecycle!==u.DESTROYED?i||(i=!0,r(s,n)||l.call(e,n,s,t,e),i=!1):o.remove()}))}));return o}function b(e,r,l,o=!1){return e.__accessor__&&e.__accessor__.lifecycle!==u.DESTROYED?o?E(e,r,l):T(e,r,l):t()}function D(e,r,l){let o,i,n=a(e,((e,t)=>{o&&o.uid!==i?n.remove():(o||(o=m.acquireTracked(e,r,t,l),i=o.uid),_(o))}));return t((()=>{n.remove(),o&&(o.uid!==i||o.removed||(o.removed=!0,_(o)),o=null),n=null}))}function S(e,t,r){let l=!1;return d(e,((e,o)=>{l||(l=!0,r(o,e)||t(e,o),l=!1)}))}function w(e,t,r=!1,o=l){return r?S(e,t,o):D(e,t,o)}function O(e){return n(v,(t=>t.oldValue===e))}export{U as afterDispatch,q as dispatch,O as isValueInUse,j as removeTarget,b as watch,w as watchTracked};
|
package/core/pbf.js
CHANGED
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import has from"./has.js";import{estimateNumberArrayMemory as t}from"./memoryEstimations.js";import e from"./ObjectPool.js";var i;!function(t){t[t.varint=0]="varint",t[t.fixed64=1]="fixed64",t[t.delimited=2]="delimited",t[t.fixed32=5]="fixed32",t[t.unknown=99]="unknown"}(i||(i={}));const s=4294967296,r=new TextDecoder("utf-8"),n=has("safari")||has("ios")?6:has("ff")?12:32;class a{constructor(t,e,s=0,r=(t?t.byteLength:0)){this._tag=0,this._dataType=i.unknown,this._init(t,e,s,r)}_init(t,e,i,s){this._data=t,this._dataView=e,this._pos=i,this._end=s}get usedMemory(){return 64+t(this._data)}asUnsafe(){return this}clone(){return new a(this._data,this._dataView,this._pos,this._end)}pos(){return this._pos}move(t){this._pos=t}nextTag(t){for(;;){if(this._pos===this._end)return!1;const e=this._decodeVarint();if(this._tag=e>>3,this._dataType=7&e,!t||t===this._tag)break;this.skip()}return!0}next(){if(this._pos===this._end)return!1;const t=this._decodeVarint();return this._tag=t>>3,this._dataType=7&t,!0}empty(){return this._pos>=this._end}tag(){return this._tag}getInt32(){return this._decodeVarint()}getInt64(){return this._decodeVarint()}getUInt32(){let t=4294967295;if(t=(127&this._data[this._pos])>>>0,this._data[this._pos++]<128)return t;if(t=(t|(127&this._data[this._pos])<<7)>>>0,this._data[this._pos++]<128)return t;if(t=(t|(127&this._data[this._pos])<<14)>>>0,this._data[this._pos++]<128)return t;if(t=(t|(127&this._data[this._pos])<<21)>>>0,this._data[this._pos++]<128)return t;if(t=(t|(15&this._data[this._pos])<<28)>>>0,this._data[this._pos++]<128)return t;throw new Error("Varint overflow")}getUInt64(){return this._decodeVarint()}getSInt32(){const t=this.getUInt32();return t>>>1^-(1&t)}getSInt64(){return this._decodeSVarint()}getBool(){const t=0!==this._data[this._pos];return this._skip(1),t}getEnum(){return this._decodeVarint()}getFixed64(){const t=this._dataView,e=this._pos,i=t.getUint32(e,!0)+t.getUint32(e+4,!0)*s;return this._skip(8),i}getSFixed64(){const t=this._dataView,e=this._pos,i=t.getUint32(e,!0)+t.getInt32(e+4,!0)*s;return this._skip(8),i}getDouble(){const t=this._dataView.getFloat64(this._pos,!0);return this._skip(8),t}getFixed32(){const t=this._dataView.getUint32(this._pos,!0);return this._skip(4),t}getSFixed32(){const t=this._dataView.getInt32(this._pos,!0);return this._skip(4),t}getFloat(){const t=this._dataView.getFloat32(this._pos,!0);return this._skip(4),t}getString(){const t=this._getLength(),e=this._pos,i=this._toString(this._data,e,e+t);return this._skip(t),i}getBytes(){const t=this._getLength(),e=this._pos,i=this._toBytes(this._data,e,e+t);return this._skip(t),i}getLength(){return this._getLengthUnsafe()}processMessageWithArgs(t,e,i,s){const r=this.getMessage(),n=t(r,e,i,s);return r.release(),n}processMessage(t){const e=this.getMessage(),i=t(e);return e.release(),i}getMessage(){const t=this._getLength(),e=a.pool.acquire();return e._init(this._data,this._dataView,this._pos,this._pos+t),this._skip(t),e}release(){a.pool.release(this)}dataType(){return this._dataType}skip(){switch(this._dataType){case i.varint:this._decodeVarint();break;case i.fixed64:this._skip(8);break;case i.delimited:this._skip(this._getLength());break;case i.fixed32:this._skip(4);break;default:throw new Error("Invalid data type!")}}skipLen(t){this._skip(t)}_skip(t){if(this._pos+t>this._end)throw new Error("Attempt to skip past the end of buffer!");this._pos+=t}_decodeVarint(){const t=this._data;let e=this._pos,i=0,s=0;if(this._end-e>=10)do{if(s=t[e++],i|=127&s,!(128&s))break;if(s=t[e++],i|=(127&s)<<7,!(128&s))break;if(s=t[e++],i|=(127&s)<<14,!(128&s))break;if(s=t[e++],i|=(127&s)<<21,!(128&s))break;if(s=t[e++],i+=268435456*(127&s),!(128&s))break;if(s=t[e++],i+=34359738368*(127&s),!(128&s))break;if(s=t[e++],i+=4398046511104*(127&s),!(128&s))break;if(s=t[e++],i+=562949953421312*(127&s),!(128&s))break;if(s=t[e++],i+=72057594037927940*(127&s),!(128&s))break;if(s=t[e++],i+=0x8000000000000000*(127&s),!(128&s))break;throw new Error("Varint too long!")}while(0);else{let r=1;for(;e!==this._end&&(s=t[e],128&s);)++e,i+=(127&s)*r,r*=128;if(e===this._end)throw new Error("Varint overrun!");++e,i+=s*r}return this._pos=e,i}_decodeSVarint(){const t=this._data;let e,i=0,s=0;const r=1&t[this._pos];if(s=t[this._pos++],i|=127&s,!(128&s))return r?-(i+1)/2:i/2;if(s=t[this._pos++],i|=(127&s)<<7,!(128&s))return r?-(i+1)/2:i/2;if(s=t[this._pos++],i|=(127&s)<<14,!(128&s))return r?-(i+1)/2:i/2;if(s=t[this._pos++],i|=(127&s)<<21,!(128&s))return r?-(i+1)/2:i/2;if(s=t[this._pos++],i+=268435456*(127&s),!(128&s))return r?-(i+1)/2:i/2;if(s=t[this._pos++],i+=34359738368*(127&s),!(128&s))return r?-(i+1)/2:i/2;if(s=t[this._pos++],i+=4398046511104*(127&s),!(128&s))return r?-(i+1)/2:i/2;if(e=BigInt(i),s=t[this._pos++],e+=0x2000000000000n*BigInt(127&s),!(128&s))return Number(r?-(e+1n)/2n:e/2n);if(s=t[this._pos++],e+=0x100000000000000n*BigInt(127&s),!(128&s))return Number(r?-(e+1n)/2n:e/2n);if(s=t[this._pos++],e+=0x8000000000000000n*BigInt(127&s),!(128&s))return Number(r?-(e+1n)/2n:e/2n);throw new Error("Varint too long!")}_getLength(){if(this._dataType!==i.delimited)throw new Error("Not a delimited data type!");return this._decodeVarint()}_getLengthUnsafe(){return this.getUInt32()}_toString(t,e,i){if((i=Math.min(this._end,i))-e>n){const s=t.subarray(e,i);return r.decode(s)}let s="",a="";for(let r=e;r<i;++r){const e=t[r];128&e?a+="%"+e.toString(16):(s+=decodeURIComponent(a)+String.fromCharCode(e),a="")}return a.length&&(s+=decodeURIComponent(a)),s}_toBytes(t,e,i){return i=Math.min(this._end,i),new Uint8Array(t.buffer,e,i-e)}
|
|
5
|
+
import has from"./has.js";import{estimateNumberArrayMemory as t}from"./memoryEstimations.js";import e from"./ObjectPool.js";var i;!function(t){t[t.varint=0]="varint",t[t.fixed64=1]="fixed64",t[t.delimited=2]="delimited",t[t.fixed32=5]="fixed32",t[t.unknown=99]="unknown"}(i||(i={}));const s=4294967296,r=new TextDecoder("utf-8"),n=has("safari")||has("ios")?6:has("ff")?12:32;class a{constructor(t,e,s=0,r=(t?t.byteLength:0)){this._tag=0,this._dataType=i.unknown,this._init(t,e,s,r)}_init(t,e,i,s){this._data=t,this._dataView=e,this._pos=i,this._end=s}get usedMemory(){return 64+t(this._data)}asUnsafe(){return this}clone(){return new a(this._data,this._dataView,this._pos,this._end)}pos(){return this._pos}move(t){this._pos=t}nextTag(t){for(;;){if(this._pos===this._end)return!1;const e=this._decodeVarint();if(this._tag=e>>3,this._dataType=7&e,!t||t===this._tag)break;this.skip()}return!0}next(){if(this._pos===this._end)return!1;const t=this._decodeVarint();return this._tag=t>>3,this._dataType=7&t,!0}empty(){return this._pos>=this._end}tag(){return this._tag}getInt32(){return this._decodeVarint()}getInt64(){return this._decodeVarint()}getUInt32(){let t=4294967295;if(t=(127&this._data[this._pos])>>>0,this._data[this._pos++]<128)return t;if(t=(t|(127&this._data[this._pos])<<7)>>>0,this._data[this._pos++]<128)return t;if(t=(t|(127&this._data[this._pos])<<14)>>>0,this._data[this._pos++]<128)return t;if(t=(t|(127&this._data[this._pos])<<21)>>>0,this._data[this._pos++]<128)return t;if(t=(t|(15&this._data[this._pos])<<28)>>>0,this._data[this._pos++]<128)return t;throw new Error("Varint overflow")}getUInt64(){return this._decodeVarint()}getSInt32(){const t=this.getUInt32();return t>>>1^-(1&t)}getSInt64(){return this._decodeSVarint()}getBool(){const t=0!==this._data[this._pos];return this._skip(1),t}getEnum(){return this._decodeVarint()}getFixed64(){const t=this._dataView,e=this._pos,i=t.getUint32(e,!0)+t.getUint32(e+4,!0)*s;return this._skip(8),i}getSFixed64(){const t=this._dataView,e=this._pos,i=t.getUint32(e,!0)+t.getInt32(e+4,!0)*s;return this._skip(8),i}getDouble(){const t=this._dataView.getFloat64(this._pos,!0);return this._skip(8),t}getFixed32(){const t=this._dataView.getUint32(this._pos,!0);return this._skip(4),t}getSFixed32(){const t=this._dataView.getInt32(this._pos,!0);return this._skip(4),t}getFloat(){const t=this._dataView.getFloat32(this._pos,!0);return this._skip(4),t}getString(){const t=this._getLength(),e=this._pos,i=this._toString(this._data,e,e+t);return this._skip(t),i}getBytes(){const t=this._getLength(),e=this._pos,i=this._toBytes(this._data,e,e+t);return this._skip(t),i}getLength(){return this._getLengthUnsafe()}processMessageWithArgs(t,e,i,s){const r=this.getMessage(),n=t(r,e,i,s);return r.release(),n}processMessage(t){const e=this.getMessage(),i=t(e);return e.release(),i}getMessage(){const t=this._getLength(),e=a.pool.acquire();return e._init(this._data,this._dataView,this._pos,this._pos+t),this._skip(t),e}release(){a.pool.release(this)}dataType(){return this._dataType}skip(){switch(this._dataType){case i.varint:this._decodeVarint();break;case i.fixed64:this._skip(8);break;case i.delimited:this._skip(this._getLength());break;case i.fixed32:this._skip(4);break;default:throw new Error("Invalid data type!")}}skipLen(t){this._skip(t)}_skip(t){if(this._pos+t>this._end)throw new Error("Attempt to skip past the end of buffer!");this._pos+=t}_decodeVarint(){const t=this._data;let e=this._pos,i=0,s=0;if(this._end-e>=10)do{if(s=t[e++],i|=127&s,!(128&s))break;if(s=t[e++],i|=(127&s)<<7,!(128&s))break;if(s=t[e++],i|=(127&s)<<14,!(128&s))break;if(s=t[e++],i|=(127&s)<<21,!(128&s))break;if(s=t[e++],i+=268435456*(127&s),!(128&s))break;if(s=t[e++],i+=34359738368*(127&s),!(128&s))break;if(s=t[e++],i+=4398046511104*(127&s),!(128&s))break;if(s=t[e++],i+=562949953421312*(127&s),!(128&s))break;if(s=t[e++],i+=72057594037927940*(127&s),!(128&s))break;if(s=t[e++],i+=0x8000000000000000*(127&s),!(128&s))break;throw new Error("Varint too long!")}while(0);else{let r=1;for(;e!==this._end&&(s=t[e],128&s);)++e,i+=(127&s)*r,r*=128;if(e===this._end)throw new Error("Varint overrun!");++e,i+=s*r}return this._pos=e,i}_decodeSVarint(){const t=this._data;let e,i=0,s=0;const r=1&t[this._pos];if(s=t[this._pos++],i|=127&s,!(128&s))return r?-(i+1)/2:i/2;if(s=t[this._pos++],i|=(127&s)<<7,!(128&s))return r?-(i+1)/2:i/2;if(s=t[this._pos++],i|=(127&s)<<14,!(128&s))return r?-(i+1)/2:i/2;if(s=t[this._pos++],i|=(127&s)<<21,!(128&s))return r?-(i+1)/2:i/2;if(s=t[this._pos++],i+=268435456*(127&s),!(128&s))return r?-(i+1)/2:i/2;if(s=t[this._pos++],i+=34359738368*(127&s),!(128&s))return r?-(i+1)/2:i/2;if(s=t[this._pos++],i+=4398046511104*(127&s),!(128&s))return r?-(i+1)/2:i/2;if(e=BigInt(i),s=t[this._pos++],e+=0x2000000000000n*BigInt(127&s),!(128&s))return Number(r?-(e+1n)/2n:e/2n);if(s=t[this._pos++],e+=0x100000000000000n*BigInt(127&s),!(128&s))return Number(r?-(e+1n)/2n:e/2n);if(s=t[this._pos++],e+=0x8000000000000000n*BigInt(127&s),!(128&s))return Number(r?-(e+1n)/2n:e/2n);throw new Error("Varint too long!")}_getLength(){if(this._dataType!==i.delimited)throw new Error("Not a delimited data type!");return this._decodeVarint()}_getLengthUnsafe(){return this.getUInt32()}_toString(t,e,i){if((i=Math.min(this._end,i))-e>n){const s=t.subarray(e,i);return r.decode(s)}let s="",a="";for(let r=e;r<i;++r){const e=t[r];128&e?a+="%"+e.toString(16):(s+=decodeURIComponent(a)+String.fromCharCode(e),a="")}return a.length&&(s+=decodeURIComponent(a)),s}_toBytes(t,e,i){return i=Math.min(this._end,i),new Uint8Array(t.buffer,e,i-e)}static{this.pool=new e(a,void 0,(t=>{t._data=null,t._dataView=null}))}}export{a as default};
|