@arcgis/core 4.30.0-next.20240312 → 4.30.0-next.20240314

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.
Files changed (106) hide show
  1. package/arcade/functions/knowledgegraph.js +1 -1
  2. package/arcade/functions/maths.js +1 -1
  3. package/assets/esri/core/workers/RemoteClient.js +1 -1
  4. package/assets/esri/core/workers/chunks/{182f94904b6eb611b886.js → 052005514ce006ce0027.js} +1 -1
  5. package/assets/esri/core/workers/chunks/129ea550bf7ad7ad24f9.js +1 -0
  6. package/assets/esri/core/workers/chunks/14b9001a3233075dd1b7.js +1 -0
  7. package/assets/esri/core/workers/chunks/{c3d619f978136f740a42.js → 1f5b7880ccf47ef9229d.js} +5 -5
  8. package/assets/esri/core/workers/chunks/{523903a812624d0d6d06.js → 2427699e34e1895ed024.js} +1 -1
  9. package/assets/esri/core/workers/chunks/2d0a01d0957b3e4512f6.js +1 -0
  10. package/assets/esri/core/workers/chunks/{86fe8077986a991f0462.js → 500f39a5f74fa289df25.js} +1 -1
  11. package/assets/esri/core/workers/chunks/{cccf63c65070c6a47b16.js → 5dc63f28bc608c56d3e6.js} +1 -1
  12. package/assets/esri/core/workers/chunks/{a1a557cbfb0aa915f81b.js → 95d7b168991ddb3a96ca.js} +1 -1
  13. package/assets/esri/core/workers/chunks/a658dd87b1b59e9cf2a3.js +1 -0
  14. package/assets/esri/core/workers/chunks/c76e155332aa0491de3d.js +1 -0
  15. package/assets/esri/core/workers/chunks/dd5a078b7919f749ba3e.js +1 -0
  16. package/assets/esri/core/workers/chunks/f7cfdba77cb614fd3725.js +1 -0
  17. package/assets/esri/core/workers/chunks/f9427ac73435d1726d6c.js +1 -0
  18. package/assets/esri/core/workers/chunks/ff4151d794ec73064fac.js +1 -0
  19. package/chunks/terrainUtilsPlanar.js +1 -1
  20. package/chunks/terrainUtilsSpherical.js +1 -1
  21. package/core/arrayUtils.js +1 -1
  22. package/interfaces.d.ts +4 -4
  23. package/layers/graphics/data/QueryEngine.js +1 -1
  24. package/layers/mixins/SceneService.js +1 -1
  25. package/layers/support/ExportImageServiceParameters.js +1 -1
  26. package/layers/support/LayerContingentValuesCache.js +1 -1
  27. package/layers/support/PixelBlock.js +1 -1
  28. package/layers/support/Tilemap.js +1 -1
  29. package/layers/support/rasterDatasets/BaseRaster.js +1 -1
  30. package/layers/support/rasterDatasets/CloudRaster.js +1 -1
  31. package/layers/support/rasterDatasets/FunctionRaster.js +1 -1
  32. package/layers/support/rasterDatasets/ImageServerRaster.js +1 -1
  33. package/layers/support/rasterDatasets/MRFRaster.js +1 -1
  34. package/layers/support/rasterDatasets/TIFFRaster.js +1 -1
  35. package/layers/support/rasterDatasets/WCSRaster.js +1 -1
  36. package/layers/support/rasterFunctions/ExtractBandFunction.js +1 -1
  37. package/package.json +1 -1
  38. package/request.js +1 -1
  39. package/rest/geoprocessor/utils.js +1 -1
  40. package/rest/symbolService.js +1 -1
  41. package/support/revision.js +1 -1
  42. package/undoredo/support/ApplySet.js +5 -0
  43. package/undoredo/support/ApplySetItem.js +5 -0
  44. package/views/2d/engine/webgl/shaderGraph/GraphShaderModule.js +1 -1
  45. package/views/2d/layers/features/FeatureContainer.js +1 -1
  46. package/views/3d/interactive/SnappingVisualizer3D.js +1 -1
  47. package/views/3d/layers/MediaLayerView3D.js +1 -1
  48. package/views/3d/layers/TiledLayerView3D.js +1 -1
  49. package/views/3d/state/ConstraintsManager.js +1 -1
  50. package/views/3d/state/ViewState.js +1 -1
  51. package/views/3d/support/LaserlinePathData.js +1 -1
  52. package/views/3d/terrain/ExtentHelper.js +1 -1
  53. package/views/3d/terrain/TileRenderer.js +1 -1
  54. package/views/3d/terrain/TilingScheme.js +1 -1
  55. package/views/3d/terrain/terrainUtils.js +1 -1
  56. package/views/3d/webgl-engine/lib/MagnifierHelper.js +1 -1
  57. package/views/3d/webgl-engine/lib/Object3DStateSet.js +1 -1
  58. package/views/3d/webgl-engine/lib/Octree.js +1 -1
  59. package/views/3d/webgl-engine/lib/RayIntersections.js +1 -1
  60. package/views/3d/webgl-engine/lib/ShadowMap.js +1 -1
  61. package/views/3d/webgl-engine/lib/TextRenderParameters.js +1 -1
  62. package/views/3d/webgl-engine/lib/depthRangeUtils.js +1 -1
  63. package/views/3d/webgl-engine/lib/edgeRendering/EdgeView.js +1 -1
  64. package/views/3d/webgl-engine/lib/edgeRendering/EdgeWorkerHandle.js +1 -1
  65. package/views/3d/webgl-engine/materials/HUDMaterial.js +1 -1
  66. package/views/3d/webgl-engine/materials/PathMaterial.js +1 -1
  67. package/views/3d/webgl-engine/materials/PatternMaterial.js +1 -1
  68. package/views/3d/webgl-engine/parts/RenderView.js +1 -1
  69. package/views/3d/webgl-engine/shaders/DefaultMaterialTechnique.js +1 -1
  70. package/views/draw/DrawAction.js +1 -1
  71. package/views/draw/support/Box.js +1 -1
  72. package/views/draw/support/GraphicMover.js +1 -1
  73. package/views/draw/support/Reshape.js +1 -1
  74. package/views/input/ViewEvents.js +1 -1
  75. package/views/input/gamepad/GamepadSource.js +1 -1
  76. package/views/input/recognizers/DoubleTapDrag.js +1 -1
  77. package/views/input/recognizers/PointerClickHoldAndDrag.js +1 -1
  78. package/views/input/recognizers/SingleAndDoubleClick.js +1 -1
  79. package/views/interactive/ToolViewManagerManipulatorState.js +1 -1
  80. package/views/interactive/snapping/FeatureSnappingSourceInfo.js +1 -1
  81. package/views/interactive/snapping/LineSnapper.js +1 -1
  82. package/views/interactive/snapping/ParallelLineSnapper.js +1 -1
  83. package/views/interactive/snapping/RightAngleSnapper.js +1 -1
  84. package/views/interactive/snapping/SnappingManager.js +1 -1
  85. package/views/interactive/snapping/SnappingVisualizer.js +1 -1
  86. package/views/interactive/snapping/featureSources/featureServiceSource/FeatureServiceSnappingSourceWorkerHandle.js +1 -1
  87. package/views/interactive/snapping/featureSources/featureServiceSource/FeatureServiceTileStore.js +1 -1
  88. package/views/interactive/snapping/featureSources/featureServiceSource/PendingFeatureTile.js +1 -1
  89. package/views/interactive/snapping/featureSources/sceneLayerSource/SceneLayerSnappingSourceWorker.js +1 -1
  90. package/views/interactive/snapping/featureSources/snappingCandidateElevationAlignment.js +1 -1
  91. package/views/interactive/tooltip/components/TooltipEditableField.js +1 -1
  92. package/views/webgl/ContextState.js +1 -1
  93. package/views/webgl/RenderingContext.js +1 -1
  94. package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
  95. package/widgets/OrientedImageryViewer/utils.js +1 -1
  96. package/widgets/UtilityNetworkTrace/UtilityNetworkTraceViewModel.js +1 -1
  97. package/widgets/UtilityNetworkTrace/support/ResultAreaHandler.js +1 -1
  98. package/assets/esri/core/workers/chunks/0272af5adbbd4482f50d.js +0 -1
  99. package/assets/esri/core/workers/chunks/16f1ede633a712a555a6.js +0 -1
  100. package/assets/esri/core/workers/chunks/52fa794d75ab8841e808.js +0 -1
  101. package/assets/esri/core/workers/chunks/771b95d28e1c9a14df64.js +0 -1
  102. package/assets/esri/core/workers/chunks/79f36c3a2026c2f35fb0.js +0 -1
  103. package/assets/esri/core/workers/chunks/899b4539e516f44c51af.js +0 -1
  104. package/assets/esri/core/workers/chunks/a1978ae86e466020dd28.js +0 -1
  105. package/assets/esri/core/workers/chunks/bbedc4ff3d0aadbde16a.js +0 -1
  106. package/assets/esri/core/workers/chunks/bf041907bac8fae05c2b.js +0 -1
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.30/esri/copyright.txt for details.
4
4
  */
5
- import e from"../../config.js";import"../../geometry.js";import r from"../ArcadePortal.js";import t from"../Dictionary.js";import{ArcadeExecutionError as n,ExecutionErrorCodes as o}from"../executionError.js";import{H as a,j as i,c as s,w as p,K as l,o as c,N as f,b as u,k as m,m as g,n as h,v as d,p as w,a6 as y}from"../../chunks/languageUtils.js";import{getPortal as j}from"../portalUtils.js";import S from"../../geometry/Geometry.js";import{isLoaded as R,load as v,project as G}from"../../geometry/projection.js";import{webMercatorToGeographic as k,geographicToWebMercator as x}from"../../geometry/support/webMercatorUtils.js";import P from"../../portal/Portal.js";import b from"../../portal/PortalItem.js";import{project as I}from"../../rest/geometryService/project.js";import W from"../../rest/knowledgeGraph/Entity.js";import T from"../../rest/knowledgeGraph/GraphQueryStreaming.js";import D from"../../rest/knowledgeGraph/ObjectValue.js";import N from"../../rest/knowledgeGraph/Path.js";import q from"../../rest/knowledgeGraph/Relationship.js";import A from"../../rest/support/ProjectParameters.js";import U from"../../geometry/SpatialReference.js";let F=null;async function J(r){const t=e.geometryServiceUrl??"";if(!t){R()||await v();for(const e of r)e.container[e.indexer]=G(e.container[e.indexer],U.WGS84);return}const n=r.map((e=>e.container[e.indexer])),o=new A({geometries:n,outSpatialReference:U.WGS84}),a=await I(t,o);for(let e=0;e<a.length;e++){const t=r[e];t.container[t.indexer]=a[e]}}async function M(e,r){const t=new b({portal:e,id:r});return await t.load(),null===F&&(F=await import("../../rest/knowledgeGraphService.js")),await F.fetchKnowledgeGraph(t.url)}function Q(e,r,t,a,i){if(null===e)return null;if(s(e)||u(e))return e;if(m(e))return e.toJSDate();if(m(e))return e.toJSDate();if(g(e))return e.toStorageFormat();if(h(e))return e.toStorageString();if(d(e)){const n={};for(const o of e.keys())n[o]=Q(e.field(o),r,t,a,i),n[o]instanceof S&&i.push({container:n,indexer:o});return n}if(c(e)){const n=e.map((e=>Q(e,r,t,a,i)));for(let e=0;e<n.length;e++)n[e]instanceof S&&i.push({container:n,indexer:e});return n}if(w(e)){if(e.spatialReference.isWGS84)return e;if(e.spatialReference.isWebMercator&&r)return k(e);if(!r||!t)return e;throw new n(a,o.WrongSpatialReference,null)}}function E(e,r){if(!e)return e;if(e.spatialReference.isWGS84&&r.spatialReference.isWebMercator)return x(e);if(e.spatialReference.equals(r.spatialReference))return e;throw new n(r,o.WrongSpatialReference,null)}function K(e,r){if(!e)return null;const t={};for(const n in e)t[n]=V(e[n],r);return t}function V(e,r){return null===e?null:c(e)?e.map((e=>V(e,r))):e instanceof W?{graphTypeName:e.typeName,id:e.id,graphType:"entity",properties:K(e.properties,r)}:e instanceof D?{graphType:"object",properties:K(e.properties,r)}:e instanceof q?{graphTypeName:e.typeName,id:e.id,graphType:"relationship",originId:e.originId??null,destinationId:e.destinationId??null,properties:K(e.properties,r)}:e instanceof N?{graphType:"path",path:e.path?e.path.map((e=>V(e,r))):null}:w(e)?E(e,r):s(e)||u(e)||y(e)?e:null}function C(e){"async"===e.mode&&(e.functions.knowledgegraphbyportalitem=function(t,p){return e.standardFunctionAsync(t,p,((e,l,c)=>{if(a(c,2,2,t,p),null===c[0])throw new n(t,o.PortalRequired,p);if(c[0]instanceof r){const e=i(c[1]);let r=null;r=t.services?.portal?t.services.portal:P.getDefault();return M(j(c[0],r),e)}if(!1===s(c[0]))throw new n(t,o.InvalidParameter,p);const f=i(c[0]);return M(t.services?.portal??P.getDefault(),f)}))},e.signatures.push({name:"knowledgegraphbyportalitem",min:2,max:2}),e.functions.querygraph=function(r,i){return e.standardFunctionAsync(r,i,(async(e,u,m)=>{a(m,2,4,r,i);const g=m[0];if(!p(g))throw new n(r,o.InvalidParameter,i);const h=m[1];if(!s(h))throw new n(r,o.InvalidParameter,i);null===F&&(F=await import("../../rest/knowledgeGraphService.js"));let d=null;const w=l(m[2],null);if(!(w instanceof t||null===w))throw new n(r,o.InvalidParameter,i);if(w){let e=[];d=Q(w,!0,!1,r,e),e=e.filter((e=>!e.container[e.indexer].spatialReference.isWGS84)),e.length>0&&await J(e)}const y=new T({openCypherQuery:h,bindParameters:d});(g?.serviceDefinition?.currentVersion??11.3)>11.2&&(y.outputSpatialReference=r.spatialReference);const j=(await F.executeQueryStreaming(g,y)).resultRowsStream.getReader(),S=[];try{for(;;){const{done:e,value:t}=await j.read();if(e)break;if(c(t))for(const n of t)S.push(V(n,r));else{const e=[];for(const n of t)e.push(V(t[n],r));S.push(e)}}}catch(R){throw R}return t.convertJsonToArcade(S,f(r),!1,!0)}))},e.signatures.push({name:"querygraph",min:2,max:4}))}export{C as registerFunctions};
5
+ import e from"../../config.js";import"../../geometry.js";import r from"../ArcadePortal.js";import t from"../Dictionary.js";import{ArcadeExecutionError as n,ExecutionErrorCodes as o}from"../executionError.js";import{H as a,j as i,c as s,w as p,K as l,o as c,N as f,b as u,k as m,m as g,n as h,v as d,p as w,a6 as y}from"../../chunks/languageUtils.js";import{getPortal as j}from"../portalUtils.js";import S from"../../geometry/Geometry.js";import{isLoaded as R,load as v,project as G}from"../../geometry/projection.js";import{webMercatorToGeographic as k,geographicToWebMercator as x}from"../../geometry/support/webMercatorUtils.js";import P from"../../portal/Portal.js";import b from"../../portal/PortalItem.js";import{project as I}from"../../rest/geometryService/project.js";import W from"../../rest/knowledgeGraph/Entity.js";import T from"../../rest/knowledgeGraph/GraphQueryStreaming.js";import D from"../../rest/knowledgeGraph/ObjectValue.js";import N from"../../rest/knowledgeGraph/Path.js";import q from"../../rest/knowledgeGraph/Relationship.js";import A from"../../rest/support/ProjectParameters.js";import U from"../../geometry/SpatialReference.js";let F=null;async function J(r){const t=e.geometryServiceUrl??"";if(!t){R()||await v();for(const e of r)e.container[e.indexer]=G(e.container[e.indexer],U.WGS84);return}const n=r.map((e=>e.container[e.indexer])),o=new A({geometries:n,outSpatialReference:U.WGS84}),a=await I(t,o);for(let e=0;e<a.length;e++){const t=r[e];t.container[t.indexer]=a[e]}}async function M(e,r){const t=new b({portal:e,id:r});return await t.load(),null===F&&(F=await import("../../rest/knowledgeGraphService.js")),await F.fetchKnowledgeGraph(t.url)}function Q(e,r,t,a,i){if(null===e)return null;if(s(e)||u(e))return e;if(m(e))return e.toJSDate();if(m(e))return e.toJSDate();if(g(e))return e.toStorageFormat();if(h(e))return e.toStorageString();if(d(e)){const n={};for(const o of e.keys())n[o]=Q(e.field(o),r,t,a,i),n[o]instanceof S&&i.push({container:n,indexer:o});return n}if(c(e)){const n=e.map((e=>Q(e,r,t,a,i)));for(let e=0;e<n.length;e++)n[e]instanceof S&&i.push({container:n,indexer:e});return n}if(w(e)){if(e.spatialReference.isWGS84)return e;if(e.spatialReference.isWebMercator&&r)return k(e);if(!r||!t)return e;throw new n(a,o.WrongSpatialReference,null)}}function E(e,r){if(!e)return e;if(e.spatialReference.isWGS84&&r.spatialReference.isWebMercator)return x(e);if(e.spatialReference.equals(r.spatialReference))return e;throw new n(r,o.WrongSpatialReference,null)}function K(e,r){if(!e)return null;const t={};for(const n in e)t[n]=V(e[n],r);return t}function V(e,r){return null===e?null:c(e)?e.map((e=>V(e,r))):e instanceof W?{graphTypeName:e.typeName,id:e.id,graphType:"entity",properties:K(e.properties,r)}:e instanceof D?{graphType:"object",properties:K(e.properties,r)}:e instanceof q?{graphTypeName:e.typeName,id:e.id,graphType:"relationship",originId:e.originId??null,destinationId:e.destinationId??null,properties:K(e.properties,r)}:e instanceof N?{graphType:"path",path:e.path?e.path.map((e=>V(e,r))):null}:w(e)?E(e,r):s(e)||u(e)||y(e)?e:null}function C(e){"async"===e.mode&&(e.functions.knowledgegraphbyportalitem=function(t,p){return e.standardFunctionAsync(t,p,((e,l,c)=>{if(a(c,2,2,t,p),null===c[0])throw new n(t,o.PortalRequired,p);if(c[0]instanceof r){const e=i(c[1]);let r;r=t.services?.portal?t.services.portal:P.getDefault();return M(j(c[0],r),e)}if(!1===s(c[0]))throw new n(t,o.InvalidParameter,p);const f=i(c[0]);return M(t.services?.portal??P.getDefault(),f)}))},e.signatures.push({name:"knowledgegraphbyportalitem",min:2,max:2}),e.functions.querygraph=function(r,i){return e.standardFunctionAsync(r,i,(async(e,u,m)=>{a(m,2,4,r,i);const g=m[0];if(!p(g))throw new n(r,o.InvalidParameter,i);const h=m[1];if(!s(h))throw new n(r,o.InvalidParameter,i);null===F&&(F=await import("../../rest/knowledgeGraphService.js"));let d=null;const w=l(m[2],null);if(!(w instanceof t||null===w))throw new n(r,o.InvalidParameter,i);if(w){let e=[];d=Q(w,!0,!1,r,e),e=e.filter((e=>!e.container[e.indexer].spatialReference.isWGS84)),e.length>0&&await J(e)}const y=new T({openCypherQuery:h,bindParameters:d});(g?.serviceDefinition?.currentVersion??11.3)>11.2&&(y.outputSpatialReference=r.spatialReference);const j=(await F.executeQueryStreaming(g,y)).resultRowsStream.getReader(),S=[];try{for(;;){const{done:e,value:t}=await j.read();if(e)break;if(c(t))for(const n of t)S.push(V(n,r));else{const e=[];for(const n of t)e.push(V(t[n],r));S.push(e)}}}catch(R){throw R}return t.convertJsonToArcade(S,f(r),!1,!0)}))},e.signatures.push({name:"querygraph",min:2,max:4}))}export{C as registerFunctions};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.30/esri/copyright.txt for details.
4
4
  */
5
- import{H as n,b as t,k as r,n as u,m as e,a as o,o as i,c as a,T as s,g as f,B as c,h as N,q as l}from"../../chunks/languageUtils.js";import{parse as h}from"../../core/number.js";function m(n,t,r){return void 0===r||0==+r?Math[n](t):(t=+t,r=+r,isNaN(t)||"number"!=typeof r||r%1!=0?NaN:(t=t.toString().split("e"),+((t=(t=Math[n](+(t[0]+"e"+(t[1]?+t[1]-r:-r)))).toString().split("e"))[0]+"e"+(t[1]?+t[1]+r:r))))}function M(M,b){function p(n,t,r){const u=f(n);return isNaN(u)?u:isNaN(t)||isNaN(r)||t>r?NaN:u<t?t:u>r?r:u}M.number=function(f,c){return b(f,c,((N,l,m)=>{n(m,1,2,f,c);const M=m[0];if(t(M))return M;if(null===M)return 0;if(r(M)||u(M)||e(M))return M.toNumber();if(o(M))return Number(M);if(i(M))return NaN;if(""===M)return Number(M);if(void 0===M)return Number(M);if(a(M)){if(void 0!==m[1]){let n=s(m[1],"‰","");return n=s(n,"¤",""),h(M,{pattern:n})}return Number(M.trim())}return Number(M)}))},M.abs=function(t,r){return b(t,r,((u,e,o)=>(n(o,1,1,t,r),Math.abs(f(o[0])))))},M.acos=function(t,r){return b(t,r,((u,e,o)=>(n(o,1,1,t,r),Math.acos(f(o[0])))))},M.asin=function(t,r){return b(t,r,((u,e,o)=>(n(o,1,1,t,r),Math.asin(f(o[0])))))},M.atan=function(t,r){return b(t,r,((u,e,o)=>(n(o,1,1,t,r),Math.atan(f(o[0])))))},M.atan2=function(t,r){return b(t,r,((u,e,o)=>(n(o,2,2,t,r),Math.atan2(f(o[0]),f(o[1])))))},M.ceil=function(t,r){return b(t,r,((u,e,o)=>{if(n(o,1,2,t,r),2===o.length){let n=f(o[1]);return isNaN(n)&&(n=0),m("ceil",f(o[0]),-1*n)}return Math.ceil(f(o[0]))}))},M.round=function(t,r){return b(t,r,((u,e,o)=>{if(n(o,1,2,t,r),2===o.length){let n=f(o[1]);return isNaN(n)&&(n=0),m("round",f(o[0]),-1*n)}return Math.round(f(o[0]))}))},M.floor=function(t,r){return b(t,r,((u,e,o)=>{if(n(o,1,2,t,r),2===o.length){let n=f(o[1]);return isNaN(n)&&(n=0),m("floor",f(o[0]),-1*n)}return Math.floor(f(o[0]))}))},M.cos=function(t,r){return b(t,r,((u,e,o)=>(n(o,1,1,t,r),Math.cos(f(o[0])))))},M.isnan=function(t,r){return b(t,r,((u,e,o)=>(n(o,1,1,t,r),"number"==typeof o[0]&&isNaN(o[0]))))},M.exp=function(t,r){return b(t,r,((u,e,o)=>(n(o,1,1,t,r),Math.exp(f(o[0])))))},M.log=function(t,r){return b(t,r,((u,e,o)=>(n(o,1,1,t,r),Math.log(f(o[0])))))},M.pow=function(t,r){return b(t,r,((u,e,o)=>(n(o,2,2,t,r),f(o[0])**f(o[1]))))},M.random=function(t,r){return b(t,r,((u,e,o)=>(n(o,0,0,t,r),Math.random())))},M.sin=function(t,r){return b(t,r,((u,e,o)=>(n(o,1,1,t,r),Math.sin(f(o[0])))))},M.sqrt=function(t,r){return b(t,r,((u,e,o)=>(n(o,1,1,t,r),Math.sqrt(f(o[0])))))},M.tan=function(t,r){return b(t,r,((u,e,o)=>(n(o,1,1,t,r),Math.tan(f(o[0])))))},M.isempty=function(t,r){return b(t,r,((u,e,o)=>(n(o,1,1,t,r),null===o[0]||(""===o[0]||(void 0===o[0]||o[0]===c)))))},M.boolean=function(t,r){return b(t,r,((u,e,o)=>{n(o,1,1,t,r);const i=o[0];return N(i)}))},M.constrain=function(t,r){return b(t,r,((u,e,o)=>{n(o,3,3,t,r);const a=f(o[1]),s=f(o[2]);if(i(o[0])){const n=[];for(const t of o[0])n.push(p(t,a,s));return n}if(l(o[0])){const n=[];for(let t=0;t<o[0].length();t++)n.push(p(o[0].get(t),a,s));return n}return p(o[0],a,s)}))}}export{M as registerFunctions};
5
+ import{H as n,b as t,k as r,n as u,m as e,a as o,o as i,c as a,T as s,g as f,B as c,h as N,q as l}from"../../chunks/languageUtils.js";import{parse as h}from"../../core/number.js";function m(n,t,r){if(void 0===r||0==+r)return Math[n](t);if(t=+t,r=+r,isNaN(t)||"number"!=typeof r||r%1!=0)return NaN;let u=t.toString().split("e");return u=(t=Math[n](+(u[0]+"e"+(u[1]?+u[1]-r:-r)))).toString().split("e"),+(u[0]+"e"+(u[1]?+u[1]+r:r))}function M(M,b){function p(n,t,r){const u=f(n);return isNaN(u)?u:isNaN(t)||isNaN(r)||t>r?NaN:u<t?t:u>r?r:u}M.number=function(f,c){return b(f,c,((N,l,m)=>{n(m,1,2,f,c);const M=m[0];if(t(M))return M;if(null===M)return 0;if(r(M)||u(M)||e(M))return M.toNumber();if(o(M))return Number(M);if(i(M))return NaN;if(""===M)return Number(M);if(void 0===M)return Number(M);if(a(M)){if(void 0!==m[1]){let n=s(m[1],"‰","");return n=s(n,"¤",""),h(M,{pattern:n})}return Number(M.trim())}return Number(M)}))},M.abs=function(t,r){return b(t,r,((u,e,o)=>(n(o,1,1,t,r),Math.abs(f(o[0])))))},M.acos=function(t,r){return b(t,r,((u,e,o)=>(n(o,1,1,t,r),Math.acos(f(o[0])))))},M.asin=function(t,r){return b(t,r,((u,e,o)=>(n(o,1,1,t,r),Math.asin(f(o[0])))))},M.atan=function(t,r){return b(t,r,((u,e,o)=>(n(o,1,1,t,r),Math.atan(f(o[0])))))},M.atan2=function(t,r){return b(t,r,((u,e,o)=>(n(o,2,2,t,r),Math.atan2(f(o[0]),f(o[1])))))},M.ceil=function(t,r){return b(t,r,((u,e,o)=>{if(n(o,1,2,t,r),2===o.length){let n=f(o[1]);return isNaN(n)&&(n=0),m("ceil",f(o[0]),-1*n)}return Math.ceil(f(o[0]))}))},M.round=function(t,r){return b(t,r,((u,e,o)=>{if(n(o,1,2,t,r),2===o.length){let n=f(o[1]);return isNaN(n)&&(n=0),m("round",f(o[0]),-1*n)}return Math.round(f(o[0]))}))},M.floor=function(t,r){return b(t,r,((u,e,o)=>{if(n(o,1,2,t,r),2===o.length){let n=f(o[1]);return isNaN(n)&&(n=0),m("floor",f(o[0]),-1*n)}return Math.floor(f(o[0]))}))},M.cos=function(t,r){return b(t,r,((u,e,o)=>(n(o,1,1,t,r),Math.cos(f(o[0])))))},M.isnan=function(t,r){return b(t,r,((u,e,o)=>(n(o,1,1,t,r),"number"==typeof o[0]&&isNaN(o[0]))))},M.exp=function(t,r){return b(t,r,((u,e,o)=>(n(o,1,1,t,r),Math.exp(f(o[0])))))},M.log=function(t,r){return b(t,r,((u,e,o)=>(n(o,1,1,t,r),Math.log(f(o[0])))))},M.pow=function(t,r){return b(t,r,((u,e,o)=>(n(o,2,2,t,r),f(o[0])**f(o[1]))))},M.random=function(t,r){return b(t,r,((u,e,o)=>(n(o,0,0,t,r),Math.random())))},M.sin=function(t,r){return b(t,r,((u,e,o)=>(n(o,1,1,t,r),Math.sin(f(o[0])))))},M.sqrt=function(t,r){return b(t,r,((u,e,o)=>(n(o,1,1,t,r),Math.sqrt(f(o[0])))))},M.tan=function(t,r){return b(t,r,((u,e,o)=>(n(o,1,1,t,r),Math.tan(f(o[0])))))},M.isempty=function(t,r){return b(t,r,((u,e,o)=>(n(o,1,1,t,r),null===o[0]||(""===o[0]||(void 0===o[0]||o[0]===c)))))},M.boolean=function(t,r){return b(t,r,((u,e,o)=>{n(o,1,1,t,r);const i=o[0];return N(i)}))},M.constrain=function(t,r){return b(t,r,((u,e,o)=>{n(o,3,3,t,r);const a=f(o[1]),s=f(o[2]);if(i(o[0])){const n=[];for(const t of o[0])n.push(p(t,a,s));return n}if(l(o[0])){const n=[];for(let t=0;t<o[0].length();t++)n.push(p(o[0].get(t),a,s));return n}return p(o[0],a,s)}))}}export{M as registerFunctions};