@arcgis/core 4.30.0-next.20240321 → 4.30.0-next.20240322

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 (83) hide show
  1. package/arcade/Dictionary.js +1 -1
  2. package/arcade/Feature.js +1 -1
  3. package/arcade/featureset/actions/Adapted.js +1 -1
  4. package/arcade/featureset/support/shared.js +1 -1
  5. package/arcade/featureset/support/sqlUtils.js +1 -1
  6. package/arcade/parser.js +1 -1
  7. package/arcade/validation/arcadeValidator.js +1 -1
  8. package/arcade/validation/languageKeywords.js +1 -1
  9. package/assets/esri/core/workers/RemoteClient.js +1 -1
  10. package/assets/esri/core/workers/chunks/{4e4ad7ac43a72a2f88a1.js → 0005267c754235ae6784.js} +1 -1
  11. package/assets/esri/core/workers/chunks/07fd6804c7eaa8d2ac3f.js +1 -0
  12. package/assets/esri/core/workers/chunks/{ff4151d794ec73064fac.js → 10b4fbdc0f8be85737f0.js} +1 -1
  13. package/assets/esri/core/workers/chunks/{8fc69ac4cce6d4dd5513.js → 18a9b472007d4f2b7bbb.js} +1 -1
  14. package/assets/esri/core/workers/chunks/{f484d2a3deb3c60d7038.js → 1ad1cdde4db5ab793623.js} +1 -1
  15. package/assets/esri/core/workers/chunks/36dfc55dc536b1831918.js +1 -0
  16. package/assets/esri/core/workers/chunks/{cee492b97e841a6d4678.js → 5b41ec1bd24314f6f153.js} +1 -1
  17. package/assets/esri/core/workers/chunks/{d518a0adc3d88700235c.js → 65680926c761bf53fd14.js} +1 -1
  18. package/assets/esri/core/workers/chunks/{9c78ccff1c7f8ae90b06.js → 671892e733d8976e48bb.js} +1 -1
  19. package/assets/esri/core/workers/chunks/{4be6d5660ec1c8ac7606.js → 70188e0aa47da1aa1a7f.js} +1 -1
  20. package/assets/esri/core/workers/chunks/7c212395100080cf122e.js +1 -0
  21. package/assets/esri/core/workers/chunks/8c07e1000522c3251ac0.js +1 -0
  22. package/assets/esri/core/workers/chunks/9d240e70a24520b2a810.js +1 -0
  23. package/assets/esri/core/workers/chunks/{ee1345b212cde1ff4755.js → a7ac2c5e701f44a67aa3.js} +1 -1
  24. package/assets/esri/core/workers/chunks/{5a747af5273646ab848c.js → c38c6cae22627fbf6f3b.js} +1 -1
  25. package/assets/esri/core/workers/chunks/c4d2ff515fc70b07cb5f.js +1 -0
  26. package/assets/esri/core/workers/chunks/{96fd6fd8cbb3a2ee088e.js → caa03837b9c173ea493f.js} +1 -1
  27. package/assets/esri/core/workers/chunks/{dd5a078b7919f749ba3e.js → d90ee005599c44bfb6ad.js} +1 -1
  28. package/assets/esri/core/workers/chunks/dc3a6ab23a13ec5deed7.js +1 -0
  29. package/assets/esri/core/workers/chunks/{eb3e82ed1653ecf348da.js → e1a2f7282d889e251809.js} +1 -1
  30. package/assets/esri/core/workers/chunks/{52274afa07468bc555aa.js → ec52127b5ada8410acf3.js} +13 -13
  31. package/assets/esri/core/workers/chunks/f8693321bbd8a93666c7.js +1 -0
  32. package/assets/esri/core/workers/chunks/{fe7dfb8546d0fc40843c.js → fec0d24e8841ba1994f0.js} +1 -1
  33. package/chunks/LineSeries.js +1 -1
  34. package/chunks/Theme.js +1 -1
  35. package/chunks/index.js +5 -0
  36. package/chunks/languageUtils.js +1 -1
  37. package/core/number.js +1 -1
  38. package/core/workers/loaderConfig.js +1 -1
  39. package/layers/mixins/ArcGISImageService.js +1 -1
  40. package/layers/support/rasterDatasets/WCSRaster.js +1 -1
  41. package/package.json +1 -1
  42. package/rest/knowledgeGraphService.js +1 -1
  43. package/support/revision.js +1 -1
  44. package/symbols/cim/cimAnalyzer.js +1 -1
  45. package/undoredo/support/DataEditingContext.js +5 -0
  46. package/views/2d/constraints/ZoomConstraint.js +1 -1
  47. package/views/2d/engine/webgl/shaderGraph/techniques/markers/ComputedMarkerParams.js +1 -1
  48. package/views/2d/layers/features/schema/processor/symbols/ComplexSymbolSchema.js +1 -1
  49. package/views/2d/layers/features/schema/processor/symbols/SymbolSchema.js +1 -1
  50. package/views/2d/layers/features/schema/processor/symbols/utils.js +5 -0
  51. package/views/3d/layers/i3s/I3SIntersectionHandler.js +1 -1
  52. package/views/3d/layers/i3s/LayerElevationProvider.js +1 -1
  53. package/views/3d/layers/support/Tiles3DIntersectionHandler.js +1 -1
  54. package/views/3d/state/helpers/SceneIntersectionHelper.js +1 -1
  55. package/views/3d/terrain/TerrainRenderer.js +1 -1
  56. package/views/3d/webgl-engine/collections/Component/ComponentIntersectionData.js +1 -1
  57. package/views/3d/webgl-engine/collections/Component/ComponentObjectCollection.js +1 -1
  58. package/views/3d/webgl-engine/collections/Component/IntersectionGeometry.js +1 -1
  59. package/views/3d/webgl-engine/lib/IntersectorInterfaces.js +1 -1
  60. package/views/3d/webgl-engine/lib/PathGeometryData.js +1 -1
  61. package/views/3d/webgl-engine/lib/RayIntersections.js +1 -1
  62. package/views/3d/webgl-engine/lib/edgeRendering/EdgeView.js +1 -1
  63. package/views/3d/webgl-engine/materials/PathMaterial.js +1 -1
  64. package/widgets/BasemapLayerList.js +1 -1
  65. package/widgets/LayerList.js +1 -1
  66. package/widgets/TableList.js +1 -1
  67. package/arcade/lib/arcade-parser.js +0 -5
  68. package/arcade/lib/assert.js +0 -5
  69. package/arcade/lib/character.js +0 -5
  70. package/arcade/lib/comment-handler.js +0 -5
  71. package/arcade/lib/error-handler.js +0 -5
  72. package/arcade/lib/parser.js +0 -5
  73. package/arcade/lib/scanner.js +0 -5
  74. package/arcade/lib/tokenizer.js +0 -5
  75. package/arcade/lib/types.js +0 -5
  76. package/assets/esri/core/workers/chunks/12b95408753cea053a40.js +0 -1
  77. package/assets/esri/core/workers/chunks/16397420fb6067b47b25.js +0 -1
  78. package/assets/esri/core/workers/chunks/1fdbeb110fae52b96bb3.js +0 -1
  79. package/assets/esri/core/workers/chunks/689a122c77b39e5c73eb.js +0 -1
  80. package/assets/esri/core/workers/chunks/7b07f3bc68a54974cd03.js +0 -1
  81. package/assets/esri/core/workers/chunks/ad95daa3f4ad7030bf24.js +0 -1
  82. package/assets/esri/core/workers/chunks/c2573c1cb7c714435acc.js +0 -1
  83. package/assets/esri/core/workers/chunks/df38774f63984be0a478.js +0 -1
@@ -1,5 +0,0 @@
1
- /*
2
- All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
- See https://js.arcgis.com/4.30/esri/copyright.txt for details.
4
- */
5
- import{CommentHandler as t}from"./comment-handler.js";import{ErrorHandler as e,formatErrorDescription as r}from"./error-handler.js";import{Scanner as i}from"./scanner.js";import{operatorPrecedence as n,TokenType as s,ParsingErrorCodes as a,ParsingError as o,Syntax as h,rokenNames as c,Keywords as p,updateOperators as l,unaryOperators as u,logicalOperators as m,assignmentOperators as d,isEmptyStatement as x}from"./types.js";var k,w;function g(t,e=0){let r=t.start-t.lineStart,i=t.lineNumber;return r<0&&(r+=e,i--),{index:t.start,line:i,column:r}}function y(t){return[{index:t.range[0],...t.loc.start},{index:t.range[1],...t.loc.end}]}function T(t){return n[t]??0}!function(t){t[t.None=0]="None",t[t.Function=1]="Function",t[t.IfClause=2]="IfClause",t[t.ForLoop=4]="ForLoop",t[t.WhileLoop=8]="WhileLoop"}(k||(k={})),function(t){t[t.AsObject=0]="AsObject",t[t.Automatic=1]="Automatic"}(w||(w={}));class f{constructor(r,n={},a){this.delegate=a,this.hasLineTerminator=!1,this.options={tokens:"boolean"==typeof n.tokens&&n.tokens,comments:"boolean"==typeof n.comments&&n.comments,tolerant:"boolean"==typeof n.tolerant&&n.tolerant},this.options.comments&&(this.commentHandler=new t),this.errorHandler=new e(this.options.tolerant),this.scanner=new i(r,this.errorHandler),this.context={isAssignmentTarget:!1,blockContext:k.None,curlyParsingType:w.AsObject},this.rawToken={type:s.EOF,value:"",lineNumber:this.scanner.lineNumber,lineStart:0,start:0,end:0},this.tokens=[],this.startMarker={index:0,line:this.scanner.lineNumber,column:0},this.endMarker={index:0,line:this.scanner.lineNumber,column:0},this.readNextRawToken(),this.endMarker={index:this.scanner.index,line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart}}throwIfInvalidType(t,e,{validTypes:r,invalidTypes:i}){r?.some((e=>t.type===e))||i?.some((e=>t.type===e))&&this.throwError(a.InvalidExpression,e)}throwError(t,e,r=this.endMarker){const{index:i,line:n,column:s}=e,a=r.index-i-1;this.errorHandler.throwError({code:t,index:i,line:n,column:s+1,len:a})}tolerateError(t,e){throw new Error("######################################### !!!")}unexpectedTokenError(t={}){const{rawToken:e}=t;let i,{code:n,data:h}=t;if(e){if(!n)switch(e.type){case s.EOF:n=a.UnexpectedEndOfScript;break;case s.Identifier:n=a.UnexpectedIdentifier;break;case s.NumericLiteral:n=a.UnexpectedNumber;break;case s.StringLiteral:n=a.UnexpectedString;break;case s.Template:n=a.UnexpectedTemplate}i=e.value.toString()}else i="ILLEGAL";n=n??a.UnexpectedToken,h||(h={value:i});const c=r(n,h);if(e){const t=e.start,r=e.lineNumber,i=e.start-e.lineStart+1;return new o({code:n,index:t,line:r,column:i,len:e.end-e.start-1,data:h,description:c})}const{index:p,line:l}=this.endMarker;return new o({code:n,index:p,line:l,column:this.endMarker.column+1,data:h,description:c})}throwUnexpectedToken(t={}){throw t.rawToken=t.rawToken??this.rawToken,this.unexpectedTokenError(t)}collectComments(t){const{commentHandler:e}=this;e&&t.length&&t.forEach((t=>{const r={type:t.multiLine?h.BlockComment:h.LineComment,value:this.getSourceValue(t),range:t.range,loc:t.loc};e.collectComment(r)}))}peekAhead(t){const e=()=>(this.scanner.scanComments(),this.scanner.lex()),r=this.scanner.saveState(),i=t.call(this,e);return this.scanner.restoreState(r),i}getSourceValue(t){return this.scanner.source.slice(t.start,t.end)}convertToToken(t){return{type:c[t.type],value:this.getSourceValue(t),range:[t.start,t.end],loc:{start:{line:this.startMarker.line,column:this.startMarker.column},end:{line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart}}}}readNextRawToken(){this.endMarker.index=this.scanner.index,this.endMarker.line=this.scanner.lineNumber,this.endMarker.column=this.scanner.index-this.scanner.lineStart;const t=this.rawToken;this.collectComments(this.scanner.scanComments()),this.scanner.index!==this.startMarker.index&&(this.startMarker.index=this.scanner.index,this.startMarker.line=this.scanner.lineNumber,this.startMarker.column=this.scanner.index-this.scanner.lineStart),this.rawToken=this.scanner.lex(),this.hasLineTerminator=t.lineNumber!==this.rawToken.lineNumber,this.options.tokens&&this.rawToken.type!==s.EOF&&this.tokens.push(this.convertToToken(this.rawToken))}captureStartMarker(){return{index:this.startMarker.index,line:this.startMarker.line,column:this.startMarker.column}}getItemLocation(t){return{range:[t.index,this.endMarker.index],loc:{start:{line:t.line,column:t.column},end:{line:this.endMarker.line,column:this.endMarker.column}}}}finalize(t){return(this.delegate||this.commentHandler)&&(this.commentHandler?.attachComments(t),this.delegate?.(t)),t}expectPunctuator(t){const e=this.rawToken;this.matchPunctuator(t)?this.readNextRawToken():this.throwUnexpectedToken({rawToken:e,code:a.PunctuatorExpected,data:{value:t}})}expectKeyword(t){this.rawToken.type!==s.Keyword||this.rawToken.value.toLowerCase()!==t?this.throwUnexpectedToken({rawToken:this.rawToken}):this.readNextRawToken()}expectContextualKeyword(t){this.rawToken.type!==s.Identifier||this.rawToken.value.toLowerCase()!==t?this.throwUnexpectedToken({rawToken:this.rawToken}):this.readNextRawToken()}matchKeyword(t){return this.rawToken.type===s.Keyword&&this.rawToken.value.toLowerCase()===t}matchContextualKeyword(t){return this.rawToken.type===s.Identifier&&this.rawToken.value===t}matchPunctuator(t){return this.rawToken.type===s.Punctuator&&this.rawToken.value===t}getMatchingPunctuator(t){if("string"==typeof t&&(t=t.split("")),this.rawToken.type===s.Punctuator&&t?.length)return t.find(this.matchPunctuator,this)}isolateCoverGrammar(t){const e=this.context.isAssignmentTarget;this.context.isAssignmentTarget=!0;const r=t.call(this);return this.context.isAssignmentTarget=e,r}inheritCoverGrammar(t){const e=this.context.isAssignmentTarget;this.context.isAssignmentTarget=!0;const r=t.call(this);return this.context.isAssignmentTarget=this.context.isAssignmentTarget&&e,r}withBlockContext(t,e){const r=this.context.blockContext;this.context.blockContext=this.context.blockContext|t;const i=this.context.curlyParsingType;this.context.curlyParsingType=w.Automatic;const n=e.call(this);return this.context.blockContext=r,this.context.curlyParsingType=i,n}consumeSemicolon(){if(this.matchPunctuator(";"))this.readNextRawToken();else if(!this.hasLineTerminator)return this.rawToken.type===s.EOF||this.matchPunctuator("}")?(this.endMarker.index=this.startMarker.index,this.endMarker.line=this.startMarker.line,void(this.endMarker.column=this.startMarker.column)):void this.throwUnexpectedToken({rawToken:this.rawToken})}parsePrimaryExpression(){const t=this.captureStartMarker(),e=this.rawToken;switch(e.type){case s.Identifier:return this.readNextRawToken(),this.finalize({type:h.Identifier,name:e.value,...this.getItemLocation(t)});case s.NumericLiteral:case s.StringLiteral:return this.context.isAssignmentTarget=!1,this.readNextRawToken(),this.finalize({type:h.Literal,value:e.value,raw:this.getSourceValue(e),isString:"string"==typeof e.value,...this.getItemLocation(t)});case s.BooleanLiteral:return this.context.isAssignmentTarget=!1,this.readNextRawToken(),this.finalize({type:h.Literal,value:e.value.toLowerCase()===p.True,raw:this.getSourceValue(e),isString:!1,...this.getItemLocation(t)});case s.NullLiteral:return this.context.isAssignmentTarget=!1,this.readNextRawToken(),this.finalize({type:h.Literal,value:null,raw:this.getSourceValue(e),isString:!1,...this.getItemLocation(t)});case s.Template:return this.parseTemplateLiteral();case s.Punctuator:switch(e.value){case"(":return this.inheritCoverGrammar(this.parseGroupExpression);case"[":return this.inheritCoverGrammar(this.parseArrayInitializer);case"{":return this.inheritCoverGrammar(this.parseObjectExpression);default:return this.throwUnexpectedToken({rawToken:this.rawToken})}case s.Keyword:return this.context.isAssignmentTarget=!1,this.throwUnexpectedToken({rawToken:this.rawToken});default:return this.throwUnexpectedToken({rawToken:this.rawToken})}}parseArrayInitializer(){const t=this.captureStartMarker();this.expectPunctuator("[");const e=[];for(;!this.matchPunctuator("]");){const t=this.captureStartMarker();this.matchPunctuator(",")?(this.readNextRawToken(),this.throwError(a.InvalidExpression,t)):(e.push(this.inheritCoverGrammar(this.parseAssignmentExpression)),this.matchPunctuator("]")||this.expectPunctuator(","))}return this.expectPunctuator("]"),this.finalize({type:h.ArrayExpression,elements:e,...this.getItemLocation(t)})}parseObjectPropertyKey(){const t=this.captureStartMarker(),e=this.rawToken;switch(e.type){case s.StringLiteral:return this.readNextRawToken(),this.finalize({type:h.Literal,value:e.value,raw:this.getSourceValue(e),isString:!0,...this.getItemLocation(t)});case s.Identifier:case s.BooleanLiteral:case s.NullLiteral:case s.Keyword:return this.readNextRawToken(),this.finalize({type:h.Identifier,name:e.value,...this.getItemLocation(t)});default:this.throwError(a.KeyMustBeString,t)}}parseObjectProperty(){const t=this.rawToken,e=this.captureStartMarker(),r=this.parseObjectPropertyKey();let i=!1,n=null;return this.matchPunctuator(":")?(this.readNextRawToken(),n=this.inheritCoverGrammar(this.parseAssignmentExpression)):t.type===s.Identifier?(i=!0,n=this.finalize({type:h.Identifier,name:t.value,...this.getItemLocation(e)})):this.throwUnexpectedToken({rawToken:this.rawToken}),this.finalize({type:h.Property,kind:"init",key:r,value:n,shorthand:i,...this.getItemLocation(e)})}parseObjectExpression(){const t=this.captureStartMarker();this.expectPunctuator("{");const e=[];for(;!this.matchPunctuator("}");)e.push(this.parseObjectProperty()),this.matchPunctuator("}")||this.expectPunctuator(",");return this.expectPunctuator("}"),this.finalize({type:h.ObjectExpression,properties:e,...this.getItemLocation(t)})}parseTemplateElement(t=!1){const e=this.rawToken;e.type!==s.Template&&this.throwUnexpectedToken({rawToken:e}),t&&!e.head&&this.throwUnexpectedToken({code:a.InvalidTemplateHead,rawToken:e});const r=this.captureStartMarker();this.readNextRawToken();const{value:i,cooked:n,tail:o}=e,c=this.finalize({type:h.TemplateElement,value:{raw:i,cooked:n},tail:o,...this.getItemLocation(r)});return c.loc.start.column++,c.loc.end.column=c.loc.end.column-(o?1:2),c}parseTemplateLiteral(){const t=this.captureStartMarker(),e=[],r=[];let i=this.parseTemplateElement(!0);for(r.push(i);!i.tail;)e.push(this.parseExpression()),i=this.parseTemplateElement(),r.push(i);return this.finalize({type:h.TemplateLiteral,quasis:r,expressions:e,...this.getItemLocation(t)})}parseGroupExpression(){this.expectPunctuator("(");const t=this.inheritCoverGrammar(this.parseAssignmentExpression);return this.expectPunctuator(")"),t}parseArguments(){this.expectPunctuator("(");const t=[];if(!this.matchPunctuator(")"))for(;;){const e=this.isolateCoverGrammar(this.parseAssignmentExpression);if(t.push(e),this.matchPunctuator(")"))break;if(this.expectPunctuator(","),this.matchPunctuator(")"))break}return this.expectPunctuator(")"),t}parseMemberName(){const t=this.rawToken,e=this.captureStartMarker();return this.readNextRawToken(),t.type!==s.NullLiteral&&t.type!==s.Identifier&&t.type!==s.Keyword&&t.type!==s.BooleanLiteral&&this.throwUnexpectedToken({rawToken:t}),this.finalize({type:h.Identifier,name:t.value,...this.getItemLocation(e)})}parseLeftHandSideExpression(){const t=this.captureStartMarker();let e=this.inheritCoverGrammar(this.parsePrimaryExpression);const r=this.captureStartMarker();let i;for(;i=this.getMatchingPunctuator("([.");)switch(i){case"(":{this.context.isAssignmentTarget=!1,e.type!==h.Identifier&&e.type!==h.MemberExpression&&this.throwError(a.IdentiferExpected,t,r);const i=this.parseArguments();e=this.finalize({type:h.CallExpression,callee:e,arguments:i,...this.getItemLocation(t)});continue}case"[":{this.context.isAssignmentTarget=!0,this.expectPunctuator("[");const r=this.isolateCoverGrammar(this.parseExpression);this.expectPunctuator("]"),e=this.finalize({type:h.MemberExpression,computed:!0,object:e,property:r,...this.getItemLocation(t)});continue}case".":{this.context.isAssignmentTarget=!0,this.expectPunctuator(".");const r=this.parseMemberName();e=this.finalize({type:h.MemberExpression,computed:!1,object:e,property:r,...this.getItemLocation(t)});continue}}return e}parseUpdateExpression(){const t=this.captureStartMarker();let e=this.getMatchingPunctuator(l);if(e){this.readNextRawToken();const r=this.captureStartMarker(),i=this.inheritCoverGrammar(this.parseUnaryExpression);return i.type!==h.Identifier&&i.type!==h.MemberExpression&&i.type!==h.CallExpression&&this.throwError(a.InvalidExpression,r),this.context.isAssignmentTarget||this.tolerateError(a.InvalidLeftHandSideInAssignment,t),this.context.isAssignmentTarget=!1,this.finalize({type:h.UpdateExpression,operator:e,argument:i,prefix:!0,...this.getItemLocation(t)})}const r=this.captureStartMarker(),i=this.inheritCoverGrammar(this.parseLeftHandSideExpression),n=this.captureStartMarker();return this.hasLineTerminator?i:(e=this.getMatchingPunctuator(l),e?(i.type!==h.Identifier&&i.type!==h.MemberExpression&&this.throwError(a.InvalidExpression,r,n),this.context.isAssignmentTarget||this.tolerateError(a.InvalidLeftHandSideInAssignment,t),this.readNextRawToken(),this.context.isAssignmentTarget=!1,this.finalize({type:h.UpdateExpression,operator:e,argument:i,prefix:!1,...this.getItemLocation(t)})):i)}parseUnaryExpression(){const t=this.getMatchingPunctuator(u);if(t){const e=this.captureStartMarker();this.readNextRawToken();const r=this.inheritCoverGrammar(this.parseUnaryExpression);return this.context.isAssignmentTarget=!1,this.finalize({type:h.UnaryExpression,operator:t,argument:r,prefix:!0,...this.getItemLocation(e)})}return this.parseUpdateExpression()}parseBinaryExpression(){const t=this.rawToken;let e=this.inheritCoverGrammar(this.parseUnaryExpression);if(this.rawToken.type!==s.Punctuator)return e;const r=this.rawToken.value;let i=T(r);if(0===i)return e;this.readNextRawToken(),this.context.isAssignmentTarget=!1;const n=[t,this.rawToken];let a=e,o=this.inheritCoverGrammar(this.parseUnaryExpression);const h=[a,r,o],c=[i];for(;this.rawToken.type===s.Punctuator&&(i=T(this.rawToken.value))>0;){for(;h.length>2&&i<=c[c.length-1];){o=h.pop();const t=h.pop();c.pop(),a=h.pop(),n.pop();const e=n[n.length-1],r=g(e,e.lineStart);h.push(this.finalize(this.createBinaryOrLogicalExpression(r,t,a,o)))}h.push(this.rawToken.value),c.push(i),n.push(this.rawToken),this.readNextRawToken(),h.push(this.inheritCoverGrammar(this.parseUnaryExpression))}let p=h.length-1;e=h[p];let l=n.pop();for(;p>1;){const t=n.pop();if(!t)break;const r=l?.lineStart,i=g(t,r),s=h[p-1];e=this.finalize(this.createBinaryOrLogicalExpression(i,s,h[p-2],e)),p-=2,l=t}return e}createBinaryOrLogicalExpression(t,e,r,i){const n=m.includes(e)?h.LogicalExpression:h.BinaryExpression;return n===h.BinaryExpression||(r.type!==h.AssignmentExpression&&r.type!==h.UpdateExpression||this.throwError(a.InvalidExpression,...y(r)),i.type!==h.AssignmentExpression&&i.type!==h.UpdateExpression||this.throwError(a.InvalidExpression,...y(r))),{type:n,operator:e,left:r,right:i,...this.getItemLocation(t)}}parseAssignmentExpression(){const t=this.captureStartMarker(),e=this.inheritCoverGrammar(this.parseBinaryExpression),r=this.captureStartMarker(),i=this.getMatchingPunctuator(d);if(!i)return e;e.type!==h.Identifier&&e.type!==h.MemberExpression&&this.throwError(a.InvalidExpression,t,r),this.context.isAssignmentTarget||this.tolerateError(a.InvalidLeftHandSideInAssignment,t),this.matchPunctuator("=")||(this.context.isAssignmentTarget=!1),this.readNextRawToken();const n=this.isolateCoverGrammar(this.parseAssignmentExpression);return this.finalize({type:h.AssignmentExpression,left:e,operator:i,right:n,...this.getItemLocation(t)})}parseExpression(){return this.isolateCoverGrammar(this.parseAssignmentExpression)}parseStatements(t){const e=[];for(;this.rawToken.type!==s.EOF&&!this.matchPunctuator(t);){const t=this.parseStatementListItem();x(t)||e.push(t)}return e}parseStatementListItem(){return this.context.isAssignmentTarget=!0,this.matchKeyword(p.Function)?this.parseFunctionDeclaration():this.matchKeyword(p.Export)?this.parseExportDeclaration():this.matchKeyword(p.Import)?this.parseImportDeclaration():this.parseStatement()}parseBlock(){const t=this.captureStartMarker();this.expectPunctuator("{");const e=this.parseStatements("}");return this.expectPunctuator("}"),this.finalize({type:h.BlockStatement,body:e,...this.getItemLocation(t)})}parseObjectStatement(){const t=this.captureStartMarker(),e=this.parseObjectExpression();return this.finalize({type:h.ExpressionStatement,expression:e,...this.getItemLocation(t)})}parseBlockOrObjectStatement(){if(this.context.curlyParsingType===w.AsObject)return this.parseObjectStatement();return this.peekAhead((t=>{let e=t();return(e.type===s.Identifier||e.type===s.StringLiteral)&&(e=t(),e.type===s.Punctuator&&":"===e.value)}))?this.parseObjectStatement():this.parseBlock()}parseIdentifier(){const t=this.rawToken;if(t.type!==s.Identifier)return null;const e=this.captureStartMarker();return this.readNextRawToken(),this.finalize({type:h.Identifier,name:t.value,...this.getItemLocation(e)})}parseVariableDeclarator(){const t=this.captureStartMarker(),e=this.parseIdentifier();e||this.throwUnexpectedToken({code:a.IdentiferExpected});let r=null;if(this.matchPunctuator("=")){this.readNextRawToken();const t=this.rawToken;try{r=this.isolateCoverGrammar(this.parseAssignmentExpression)}catch(i){this.throwUnexpectedToken({rawToken:t,code:a.InvalidVariableAssignment})}}return this.finalize({type:h.VariableDeclarator,id:e,init:r,...this.getItemLocation(t)})}parseVariableDeclarationList(){const t=[this.parseVariableDeclarator()];for(;this.matchPunctuator(",");)this.readNextRawToken(),t.push(this.parseVariableDeclarator());return t}parseVariableDeclaration(){const t=this.captureStartMarker();this.expectKeyword(p.Var);const e=this.parseVariableDeclarationList();return this.consumeSemicolon(),this.finalize({type:h.VariableDeclaration,declarations:e,kind:"var",...this.getItemLocation(t)})}parseEmptyStatement(){const t=this.captureStartMarker();return this.expectPunctuator(";"),this.finalize({type:h.EmptyStatement,...this.getItemLocation(t)})}parseExpressionStatement(){const t=this.captureStartMarker(),e=this.parseExpression();return this.consumeSemicolon(),this.finalize({type:h.ExpressionStatement,expression:e,...this.getItemLocation(t)})}parseIfClause(){return this.withBlockContext(k.IfClause,this.parseStatement)}parseIfStatement(){const t=this.captureStartMarker();this.expectKeyword(p.If),this.expectPunctuator("(");const e=this.captureStartMarker(),r=this.parseExpression(),i=this.captureStartMarker();this.expectPunctuator(")"),r.type!==h.AssignmentExpression&&r.type!==h.UpdateExpression||this.throwError(a.InvalidExpression,e,i);const n=this.parseIfClause();let s=null;return this.matchKeyword(p.Else)&&(this.readNextRawToken(),s=this.parseIfClause()),this.finalize({type:h.IfStatement,test:r,consequent:n,alternate:s,...this.getItemLocation(t)})}parseWhileStatement(){const t=this.captureStartMarker();this.expectKeyword(p.While),this.expectPunctuator("(");const e=this.captureStartMarker(),r=this.parseExpression(),i=this.captureStartMarker();this.expectPunctuator(")"),r.type!==h.AssignmentExpression&&r.type!==h.UpdateExpression||this.throwError(a.InvalidExpression,e,i);const n=this.withBlockContext(k.WhileLoop,this.parseStatement);return this.finalize({type:h.WhileStatement,test:r,body:n,...this.getItemLocation(t)})}parseForStatement(){let t=null,e=null,r=null,i=null,n=null;const s=this.captureStartMarker();if(this.expectKeyword(p.For),this.expectPunctuator("("),this.matchPunctuator(";"))this.readNextRawToken();else if(this.matchKeyword(p.Var)){const e=this.captureStartMarker();this.readNextRawToken();const r=this.parseVariableDeclarationList();if(1===r.length&&this.matchKeyword(p.In)){r[0].init&&this.throwError(a.ForInOfLoopInitializer,e),i=this.finalize({type:h.VariableDeclaration,declarations:r,kind:"var",...this.getItemLocation(e)}),this.readNextRawToken(),n=this.parseExpression()}else this.matchKeyword(p.In)&&this.throwError(a.InvalidLeftHandSideInForIn,e),t=this.finalize({type:h.VariableDeclaration,declarations:r,kind:"var",...this.getItemLocation(e)}),this.expectPunctuator(";")}else{const e=this.context.isAssignmentTarget,r=this.captureStartMarker();t=this.inheritCoverGrammar(this.parseAssignmentExpression),this.matchKeyword(p.In)?(this.context.isAssignmentTarget||this.tolerateError(a.InvalidLeftHandSideInForIn,r),t.type!==h.Identifier&&this.throwError(a.InvalidLeftHandSideInForIn,r),this.readNextRawToken(),i=t,n=this.parseExpression(),t=null):(this.context.isAssignmentTarget=e,this.expectPunctuator(";"))}i||(this.matchPunctuator(";")||(e=this.isolateCoverGrammar(this.parseExpression)),this.expectPunctuator(";"),this.matchPunctuator(")")||(r=this.isolateCoverGrammar(this.parseExpression))),this.expectPunctuator(")");const o=this.withBlockContext(k.ForLoop,(()=>this.isolateCoverGrammar(this.parseStatement)));return i&&n?this.finalize({type:h.ForInStatement,left:i,right:n,body:o,...this.getItemLocation(s)}):this.finalize({type:h.ForStatement,init:t,test:e,update:r,body:o,...this.getItemLocation(s)})}parseContinueStatement(){const t=this.captureStartMarker();return this.expectKeyword(p.Continue),this.consumeSemicolon(),this.finalize({type:h.ContinueStatement,...this.getItemLocation(t)})}parseBreakStatement(){const t=this.captureStartMarker();return this.expectKeyword(p.Break),this.consumeSemicolon(),this.finalize({type:h.BreakStatement,...this.getItemLocation(t)})}parseReturnStatement(){const t=this.captureStartMarker();this.expectKeyword(p.Return);const e=!this.matchPunctuator(";")&&!this.matchPunctuator("}")&&!this.hasLineTerminator&&this.rawToken.type!==s.EOF||this.rawToken.type===s.StringLiteral||this.rawToken.type===s.Template?this.parseExpression():null;return this.consumeSemicolon(),this.finalize({type:h.ReturnStatement,argument:e,...this.getItemLocation(t)})}parseStatement(){switch(this.rawToken.type){case s.BooleanLiteral:case s.NullLiteral:case s.NumericLiteral:case s.StringLiteral:case s.Template:case s.Identifier:return this.parseExpressionStatement();case s.Punctuator:return"{"===this.rawToken.value?this.parseBlockOrObjectStatement():"("===this.rawToken.value?this.parseExpressionStatement():";"===this.rawToken.value?this.parseEmptyStatement():this.parseExpressionStatement();case s.Keyword:switch(this.rawToken.value.toLowerCase()){case p.Break:return this.parseBreakStatement();case p.Continue:return this.parseContinueStatement();case p.For:return this.parseForStatement();case p.Function:return this.parseFunctionDeclaration();case p.If:return this.parseIfStatement();case p.Return:return this.parseReturnStatement();case p.Var:return this.parseVariableDeclaration();case p.While:return this.parseWhileStatement();default:return this.parseExpressionStatement()}default:return this.throwUnexpectedToken({rawToken:this.rawToken})}}parseFormalParameters(){const t=[];if(this.expectPunctuator("("),!this.matchPunctuator(")"))for(;this.rawToken.type!==s.EOF;){const e=this.parseIdentifier();if(e||this.throwUnexpectedToken({rawToken:this.rawToken,code:a.IdentiferExpected}),t.push(e),this.matchPunctuator(")"))break;if(this.expectPunctuator(","),this.matchPunctuator(")"))break}return this.expectPunctuator(")"),t}parseFunctionDeclaration(){(this.context.blockContext&k.Function)===k.Function&&this.throwUnexpectedToken({code:a.NoFunctionInsideFunction}),(this.context.blockContext&k.WhileLoop)!==k.WhileLoop&&(this.context.blockContext&k.IfClause)!==k.IfClause||this.throwUnexpectedToken({code:a.NoFunctionInsideBlock});const t=this.captureStartMarker();this.expectKeyword(p.Function);const e=this.parseIdentifier();e||this.throwUnexpectedToken({code:a.InvalidFunctionIdentifier});const r=this.parseFormalParameters(),i=this.context.blockContext;this.context.blockContext=this.context.blockContext|k.Function;const n=this.parseBlock();return this.context.blockContext=i,this.finalize({type:h.FunctionDeclaration,id:e,params:r,body:n,...this.getItemLocation(t)})}parseScript(){const t=this.captureStartMarker(),e=this.parseStatements(),r=this.finalize({type:h.Program,body:e,...this.getItemLocation(t)});return this.options.tokens&&(r.tokens=this.tokens),this.options.tolerant&&(r.errors=this.errorHandler.errors),r}parseExportDeclaration(){this.context.blockContext!==k.None&&this.throwUnexpectedToken({code:a.ModuleExportRootOnly});let t=null;const e=this.captureStartMarker();return this.expectKeyword(p.Export),this.matchKeyword(p.Var)?t=this.parseVariableDeclaration():this.matchKeyword("function")?t=this.parseFunctionDeclaration():this.throwUnexpectedToken({code:a.InvalidExpression}),this.finalize({type:h.ExportNamedDeclaration,declaration:t,specifiers:[],source:null,...this.getItemLocation(e)})}parseModuleSpecifier(){const t=this.captureStartMarker(),e=this.rawToken;if(e.type===s.StringLiteral)return this.readNextRawToken(),this.finalize({type:h.Literal,value:e.value,raw:this.getSourceValue(e),isString:!0,...this.getItemLocation(t)});this.throwError(a.InvalidModuleUri,t)}parseDefaultSpecifier(){const t=this.captureStartMarker(),e=this.parseIdentifier();return e||this.throwUnexpectedToken({code:a.IdentiferExpected}),this.finalize({type:h.ImportDefaultSpecifier,local:e,...this.getItemLocation(t)})}parseImportDeclaration(){this.context.blockContext!==k.None&&this.throwUnexpectedToken({code:a.ModuleImportRootOnly});const t=this.captureStartMarker();this.expectKeyword(p.Import);const e=this.parseDefaultSpecifier();this.expectContextualKeyword(p.From);const r=this.parseModuleSpecifier();return this.finalize({type:h.ImportDeclaration,specifiers:[e],source:r,...this.getItemLocation(t)})}}export{f as Parser,T as binaryOperatorPrecedence};
@@ -1,5 +0,0 @@
1
- /*
2
- All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
- See https://js.arcgis.com/4.30/esri/copyright.txt for details.
4
- */
5
- import{assert as e}from"./assert.js";import{Character as t}from"./character.js";import{updateOperators as i,unaryOperators as s,logicalOperators as n,assignmentOperators as r,binaryOperators as h,ParsingErrorCodes as c,Keywords as o,TokenType as a}from"./types.js";function d(e){return"0123456789abcdef".indexOf(e.toLowerCase())}function l(e){return"01234567".indexOf(e)}const u=[[],[],[]];i.forEach((e=>u[e.length-1].push(e))),s.forEach((e=>u[e.length-1].push(e))),n.forEach((e=>u[e.length-1].push(e))),r.forEach((e=>u[e.length-1].push(e))),h.forEach((e=>u[e.length-1].push(e)));class x{constructor(e,t){this.source=e,this.errorHandler=t,this._length=e.length,this.index=0,this.lineNumber=1,this.lineStart=0,this.curlyStack=[]}saveState(){return{index:this.index,lineNumber:this.lineNumber,lineStart:this.lineStart,curlyStack:this.curlyStack.slice()}}restoreState(e){this.index=e.index,this.lineNumber=e.lineNumber,this.lineStart=e.lineStart,this.curlyStack=e.curlyStack}eof(){return this.index>=this._length}throwUnexpectedToken(e=c.UnexpectedToken){this.errorHandler.throwError({code:e,index:this.index,line:this.lineNumber,column:this.index-this.lineStart+1})}tolerateUnexpectedToken(e=c.UnexpectedToken){this.errorHandler.tolerateError({code:e,index:this.index,line:this.lineNumber,column:this.index-this.lineStart+1})}skipSingleLineComment(e){const i=[],s=this.index-e,n={start:{line:this.lineNumber,column:this.index-this.lineStart-e},end:{line:0,column:0}};for(;!this.eof();){const r=this.source.charCodeAt(this.index);if(++this.index,t.isLineTerminator(r)){if(n){n.end={line:this.lineNumber,column:this.index-this.lineStart-1};const t={multiLine:!1,start:s+e,end:this.index-1,range:[s,this.index-1],loc:n};i.push(t)}return 13===r&&10===this.source.charCodeAt(this.index)&&++this.index,++this.lineNumber,this.lineStart=this.index,i}}if(n){n.end={line:this.lineNumber,column:this.index-this.lineStart};const t={multiLine:!1,start:s+e,end:this.index,range:[s,this.index],loc:n};i.push(t)}return i}skipMultiLineComment(){const e=[],i=this.index-2,s={start:{line:this.lineNumber,column:this.index-this.lineStart-2},end:{line:0,column:0}};for(;!this.eof();){const n=this.source.charCodeAt(this.index);if(t.isLineTerminator(n))13===n&&10===this.source.charCodeAt(this.index+1)&&++this.index,++this.lineNumber,++this.index,this.lineStart=this.index;else if(42===n){if(47===this.source.charCodeAt(this.index+1)){if(this.index+=2,s){s.end={line:this.lineNumber,column:this.index-this.lineStart};const t={multiLine:!0,start:i+2,end:this.index-2,range:[i,this.index],loc:s};e.push(t)}return e}++this.index}else++this.index}if(s){s.end={line:this.lineNumber,column:this.index-this.lineStart};const t={multiLine:!0,start:i+2,end:this.index,range:[i,this.index],loc:s};e.push(t)}return this.tolerateUnexpectedToken(),e}scanComments(){let e=[];for(;!this.eof();){let i=this.source.charCodeAt(this.index);if(t.isWhiteSpace(i))++this.index;else if(t.isLineTerminator(i))++this.index,13===i&&10===this.source.charCodeAt(this.index)&&++this.index,++this.lineNumber,this.lineStart=this.index;else{if(47!==i)break;if(i=this.source.charCodeAt(this.index+1),47===i){this.index+=2;const t=this.skipSingleLineComment(2);e=[...e,...t]}else{if(42!==i)break;{this.index+=2;const t=this.skipMultiLineComment();e=[...e,...t]}}}}return e}isKeyword(e){switch((e=e.toLowerCase()).length){case 2:return e===o.If||e===o.In;case 3:return e===o.Var||e===o.For;case 4:return e===o.Else;case 5:return e===o.Break||e===o.While;case 6:return e===o.Return||e===o.Import||e===o.Export;case 8:return e===o.Function||e===o.Continue;default:return!1}}codePointAt(e){let t=this.source.charCodeAt(e);if(t>=55296&&t<=56319){const i=this.source.charCodeAt(e+1);if(i>=56320&&i<=57343){t=1024*(t-55296)+i-56320+65536}}return t}scanHexEscape(e){const i="u"===e?4:2;let s=0;for(let n=0;n<i;++n){if(this.eof()||!t.isHexDigit(this.source.charCodeAt(this.index)))return null;s=16*s+d(this.source[this.index++])}return String.fromCharCode(s)}scanUnicodeCodePointEscape(){let e=this.source[this.index],i=0;for("}"===e&&this.throwUnexpectedToken();!this.eof()&&(e=this.source[this.index++],t.isHexDigit(e.charCodeAt(0)));)i=16*i+d(e);return(i>1114111||"}"!==e)&&this.throwUnexpectedToken(),t.fromCodePoint(i)}getIdentifier(){const e=this.index++;for(;!this.eof();){const i=this.source.charCodeAt(this.index);if(92===i)return this.index=e,this.getComplexIdentifier();if(i>=55296&&i<57343)return this.index=e,this.getComplexIdentifier();if(!t.isIdentifierPart(i))break;++this.index}return this.source.slice(e,this.index)}getComplexIdentifier(){let e,i=this.codePointAt(this.index),s=t.fromCodePoint(i);for(this.index+=s.length,92===i&&(117!==this.source.charCodeAt(this.index)&&this.throwUnexpectedToken(),++this.index,"{"===this.source[this.index]?(++this.index,e=this.scanUnicodeCodePointEscape()):(e=this.scanHexEscape("u"),null!==e&&"\\"!==e&&t.isIdentifierStart(e.charCodeAt(0))||this.throwUnexpectedToken()),s=e);!this.eof()&&(i=this.codePointAt(this.index),t.isIdentifierPart(i));)e=t.fromCodePoint(i),s+=e,this.index+=e.length,92===i&&(s=s.substring(0,s.length-1),117!==this.source.charCodeAt(this.index)&&this.throwUnexpectedToken(),++this.index,"{"===this.source[this.index]?(++this.index,e=this.scanUnicodeCodePointEscape()):(e=this.scanHexEscape("u"),null!==e&&"\\"!==e&&t.isIdentifierPart(e.charCodeAt(0))||this.throwUnexpectedToken()),s+=e);return s}octalToDecimal(e){let i="0"!==e,s=l(e);return!this.eof()&&t.isOctalDigit(this.source.charCodeAt(this.index))&&(i=!0,s=8*s+l(this.source[this.index++]),"0123".includes(e)&&!this.eof()&&t.isOctalDigit(this.source.charCodeAt(this.index))&&(s=8*s+l(this.source[this.index++]))),{code:s,octal:i}}scanIdentifier(){let e;const t=this.index,i=92===this.source.charCodeAt(t)?this.getComplexIdentifier():this.getIdentifier();if(e=1===i.length?a.Identifier:this.isKeyword(i)?a.Keyword:i.toLowerCase()===o.Null?a.NullLiteral:i.toLowerCase()===o.True||i.toLowerCase()===o.False?a.BooleanLiteral:a.Identifier,e!==a.Identifier&&t+i.length!==this.index){const e=this.index;this.index=t,this.tolerateUnexpectedToken(c.InvalidEscapedReservedWord),this.index=e}return{type:e,value:i,lineNumber:this.lineNumber,lineStart:this.lineStart,start:t,end:this.index}}scanPunctuator(){const e=this.index;let t=this.source[this.index];switch(t){case"(":case"{":"{"===t&&this.curlyStack.push("{"),++this.index;break;case".":case")":case";":case",":case"[":case"]":case":":case"?":case"~":++this.index;break;case"}":++this.index,this.curlyStack.pop();break;default:for(let e=u.length;e>0;e--)if(t=this.source.substring(this.index,this.index+e),u[e-1].includes(t)){this.index+=e;break}}return this.index===e&&this.throwUnexpectedToken(),{type:a.Punctuator,value:t,lineNumber:this.lineNumber,lineStart:this.lineStart,start:e,end:this.index}}scanHexLiteral(e){let i="";for(;!this.eof()&&t.isHexDigit(this.source.charCodeAt(this.index));)i+=this.source[this.index++];return 0===i.length&&this.throwUnexpectedToken(),t.isIdentifierStart(this.source.charCodeAt(this.index))&&this.throwUnexpectedToken(),{type:a.NumericLiteral,value:parseInt("0x"+i,16),lineNumber:this.lineNumber,lineStart:this.lineStart,start:e,end:this.index}}scanBinaryLiteral(e){let i="";for(;!this.eof();){const e=this.source[this.index];if("0"!==e&&"1"!==e)break;i+=this.source[this.index++]}if(0===i.length&&this.throwUnexpectedToken(),!this.eof()){const e=this.source.charCodeAt(this.index);(t.isIdentifierStart(e)||t.isDecimalDigit(e))&&this.throwUnexpectedToken()}return{type:a.NumericLiteral,value:parseInt(i,2),lineNumber:this.lineNumber,lineStart:this.lineStart,start:e,end:this.index}}scanOctalLiteral(e,i){let s="",n=!1;for(t.isOctalDigit(e.charCodeAt(0))?(n=!0,s="0"+this.source[this.index++]):++this.index;!this.eof()&&t.isOctalDigit(this.source.charCodeAt(this.index));)s+=this.source[this.index++];return n||0!==s.length||this.throwUnexpectedToken(),(t.isIdentifierStart(this.source.charCodeAt(this.index))||t.isDecimalDigit(this.source.charCodeAt(this.index)))&&this.throwUnexpectedToken(),{type:a.NumericLiteral,value:parseInt(s,8),lineNumber:this.lineNumber,lineStart:this.lineStart,start:i,end:this.index}}scanNumericLiteral(){const i=this.index;let s=this.source[i];e(t.isDecimalDigit(s.charCodeAt(0))||"."===s,"Numeric literal must start with a decimal digit or a decimal point");let n="";if("."!==s){if(n=this.source[this.index++],s=this.source[this.index],"0"===n){if("x"===s||"X"===s)return++this.index,this.scanHexLiteral(i);if("b"===s||"B"===s)return++this.index,this.scanBinaryLiteral(i);if("o"===s||"O"===s)return this.scanOctalLiteral(s,i)}for(;t.isDecimalDigit(this.source.charCodeAt(this.index));)n+=this.source[this.index++];s=this.source[this.index]}if("."===s){for(n+=this.source[this.index++];t.isDecimalDigit(this.source.charCodeAt(this.index));)n+=this.source[this.index++];s=this.source[this.index]}if("e"===s||"E"===s)if(n+=this.source[this.index++],s=this.source[this.index],"+"!==s&&"-"!==s||(n+=this.source[this.index++]),t.isDecimalDigit(this.source.charCodeAt(this.index)))for(;t.isDecimalDigit(this.source.charCodeAt(this.index));)n+=this.source[this.index++];else this.throwUnexpectedToken();return t.isIdentifierStart(this.source.charCodeAt(this.index))&&this.throwUnexpectedToken(),{type:a.NumericLiteral,value:parseFloat(n),lineNumber:this.lineNumber,lineStart:this.lineStart,start:i,end:this.index}}scanStringLiteral(){const i=this.index;let s=this.source[i];e("'"===s||'"'===s,"String literal must starts with a quote"),++this.index;let n=!1,r="";for(;!this.eof();){let e=this.source[this.index++];if(e===s){s="";break}if("\\"===e)if(e=this.source[this.index++],e&&t.isLineTerminator(e.charCodeAt(0)))++this.lineNumber,"\r"===e&&"\n"===this.source[this.index]&&++this.index,this.lineStart=this.index;else switch(e){case"u":if("{"===this.source[this.index])++this.index,r+=this.scanUnicodeCodePointEscape();else{const t=this.scanHexEscape(e);null===t&&this.throwUnexpectedToken(),r+=t}break;case"x":{const t=this.scanHexEscape(e);null===t&&this.throwUnexpectedToken(c.InvalidHexEscapeSequence),r+=t;break}case"n":r+="\n";break;case"r":r+="\r";break;case"t":r+="\t";break;case"b":r+="\b";break;case"f":r+="\f";break;case"v":r+="\v";break;case"8":case"9":r+=e,this.tolerateUnexpectedToken();break;default:if(e&&t.isOctalDigit(e.charCodeAt(0))){const t=this.octalToDecimal(e);n=t.octal||n,r+=String.fromCharCode(t.code)}else r+=e}else{if(t.isLineTerminator(e.charCodeAt(0)))break;r+=e}}return""!==s&&(this.index=i,this.throwUnexpectedToken()),{type:a.StringLiteral,value:r,lineNumber:this.lineNumber,lineStart:this.lineStart,start:i,end:this.index}}scanTemplate(){let e="",i=!1;const s=this.index,n="`"===this.source[s];let r=!1,h=2;for(++this.index;!this.eof();){let s=this.source[this.index++];if("`"===s){h=1,r=!0,i=!0;break}if("$"!==s)if("\\"!==s)t.isLineTerminator(s.charCodeAt(0))?(++this.lineNumber,"\r"===s&&"\n"===this.source[this.index]&&++this.index,this.lineStart=this.index,e+="\n"):e+=s;else if(s=this.source[this.index++],t.isLineTerminator(s.charCodeAt(0)))++this.lineNumber,"\r"===s&&"\n"===this.source[this.index]&&++this.index,this.lineStart=this.index;else switch(s){case"n":e+="\n";break;case"r":e+="\r";break;case"t":e+="\t";break;case"u":if("{"===this.source[this.index])++this.index,e+=this.scanUnicodeCodePointEscape();else{const t=this.index,i=this.scanHexEscape(s);null!==i?e+=i:(this.index=t,e+=s)}break;case"x":{const t=this.scanHexEscape(s);null===t&&this.throwUnexpectedToken(c.InvalidHexEscapeSequence),e+=t;break}case"b":e+="\b";break;case"f":e+="\f";break;case"v":e+="\v";break;default:"0"===s?(t.isDecimalDigit(this.source.charCodeAt(this.index))&&this.throwUnexpectedToken(c.TemplateOctalLiteral),e+="\0"):t.isOctalDigit(s.charCodeAt(0))?this.throwUnexpectedToken(c.TemplateOctalLiteral):e+=s}else{if("{"===this.source[this.index]){this.curlyStack.push("${"),++this.index,i=!0;break}e+=s}}return i||this.throwUnexpectedToken(),n||this.curlyStack.pop(),{type:a.Template,value:this.source.slice(s+1,this.index-h),cooked:e,head:n,tail:r,lineNumber:this.lineNumber,lineStart:this.lineStart,start:s,end:this.index}}lex(){if(this.eof())return{type:a.EOF,value:"",lineNumber:this.lineNumber,lineStart:this.lineStart,start:this.index,end:this.index};const e=this.source.charCodeAt(this.index);return t.isIdentifierStart(e)?this.scanIdentifier():40===e||41===e||59===e?this.scanPunctuator():39===e||34===e?this.scanStringLiteral():46===e?t.isDecimalDigit(this.source.charCodeAt(this.index+1))?this.scanNumericLiteral():this.scanPunctuator():t.isDecimalDigit(e)?this.scanNumericLiteral():96===e||125===e&&"${"===this.curlyStack[this.curlyStack.length-1]?this.scanTemplate():e>=55296&&e<57343&&t.isIdentifierStart(this.codePointAt(this.index))?this.scanIdentifier():this.scanPunctuator()}}export{x as Scanner};
@@ -1,5 +0,0 @@
1
- /*
2
- All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
- See https://js.arcgis.com/4.30/esri/copyright.txt for details.
4
- */
5
- import{ErrorHandler as e}from"./error-handler.js";import{Scanner as r}from"./scanner.js";import{Syntax as n,rokenNames as t}from"./types.js";class s{constructor(n,t){this.errorHandler=new e,this.errorHandler.tolerant=!!t&&("boolean"==typeof t.tolerant&&t.tolerant),this.scanner=new r(n,this.errorHandler),this.trackComments=!!t&&("boolean"==typeof t.comment&&t.comment),this.buffer=[]}errors(){return this.errorHandler.errors}getNextToken(){if(0===this.buffer.length){const e=this.scanner.scanComments();if(this.trackComments&&e&&e.forEach((e=>{const r=this.scanner.source.slice(e.start,e.end),t={type:e.multiLine?n.BlockComment:n.LineComment,value:r,range:e.range,loc:e.loc};this.buffer.push(t)})),!this.scanner.eof()){const e={line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart},r=this.scanner.lex(),n={line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart},s={type:t[r.type],value:this.scanner.source.slice(r.start,r.end),range:[r.start,r.end],loc:{start:e,end:n}};this.buffer.push(s)}}return this.buffer.shift()}}export{s as Tokenizer};
@@ -1,5 +0,0 @@
1
- /*
2
- All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
- See https://js.arcgis.com/4.30/esri/copyright.txt for details.
4
- */
5
- var e,t;!function(e){e.Break="break",e.Continue="continue",e.Else="else",e.False="false",e.For="for",e.From="from",e.Function="function",e.If="if",e.Import="import",e.Export="export",e.In="in",e.Null="null",e.Return="return",e.True="true",e.Var="var",e.While="while"}(e||(e={})),function(e){e.AssignmentExpression="AssignmentExpression",e.ArrayExpression="ArrayExpression",e.BlockComment="BlockComment",e.BlockStatement="BlockStatement",e.BinaryExpression="BinaryExpression",e.BreakStatement="BreakStatement",e.CallExpression="CallExpression",e.ContinueStatement="ContinueStatement",e.EmptyStatement="EmptyStatement",e.ExpressionStatement="ExpressionStatement",e.ExportNamedDeclaration="ExportNamedDeclaration",e.ExportSpecifier="ExportSpecifier",e.ForStatement="ForStatement",e.ForInStatement="ForInStatement",e.FunctionDeclaration="FunctionDeclaration",e.Identifier="Identifier",e.IfStatement="IfStatement",e.ImportDeclaration="ImportDeclaration",e.ImportDefaultSpecifier="ImportDefaultSpecifier",e.LineComment="LineComment",e.Literal="Literal",e.LogicalExpression="LogicalExpression",e.MemberExpression="MemberExpression",e.ObjectExpression="ObjectExpression",e.Program="Program",e.Property="Property",e.ReturnStatement="ReturnStatement",e.TemplateElement="TemplateElement",e.TemplateLiteral="TemplateLiteral",e.UnaryExpression="UnaryExpression",e.UpdateExpression="UpdateExpression",e.VariableDeclaration="VariableDeclaration",e.VariableDeclarator="VariableDeclarator",e.WhileStatement="WhileStatement"}(t||(t={}));const n=["++","--"],r=["-","+","!","~"],i=["=","/=","*=","%=","+=","-="],a=["||","&&"],o=["|","&",">>","<<",">>>","^","==","!=","<","<=",">",">=","+","-","*","/","%"],c={"||":1,"&&":2,"|":3,"^":4,"&":5,"==":6,"!=":6,"<":7,">":7,"<=":7,">=":7,"<<":8,">>":8,">>>":8,"+":9,"-":9,"*":10,"/":10,"%":10};var l;!function(e){e[e.Unknown=0]="Unknown",e[e.BooleanLiteral=1]="BooleanLiteral",e[e.EOF=2]="EOF",e[e.Identifier=3]="Identifier",e[e.Keyword=4]="Keyword",e[e.NullLiteral=5]="NullLiteral",e[e.NumericLiteral=6]="NumericLiteral",e[e.Punctuator=7]="Punctuator",e[e.StringLiteral=8]="StringLiteral",e[e.Template=10]="Template"}(l||(l={}));const s=["Unknown","Boolean","<end>","Identifier","Keyword","Null","Numeric","Punctuator","String","RegularExpression","Template"];var p;!function(e){e.InvalidModuleUri="InvalidModuleUri",e.ForInOfLoopInitializer="ForInOfLoopInitializer",e.IdentiferExpected="IdentiferExpected",e.InvalidEscapedReservedWord="InvalidEscapedReservedWord",e.InvalidExpression="InvalidExpression",e.InvalidFunctionIdentifier="InvalidFunctionIdentifier",e.InvalidHexEscapeSequence="InvalidHexEscapeSequence",e.InvalidLeftHandSideInAssignment="InvalidLeftHandSideInAssignment",e.InvalidLeftHandSideInForIn="InvalidLeftHandSideInForIn",e.InvalidTemplateHead="InvalidTemplateHead",e.InvalidVariableAssignment="InvalidVariableAssignment",e.KeyMustBeString="KeyMustBeString",e.NoFunctionInsideBlock="NoFunctionInsideBlock",e.NoFunctionInsideFunction="NoFunctionInsideFunction",e.ModuleExportRootOnly="ModuleExportRootOnly",e.ModuleImportRootOnly="ModuleImportRootOnly",e.PunctuatorExpected="PunctuatorExpected",e.TemplateOctalLiteral="TemplateOctalLiteral",e.UnexpectedBoolean="UnexpectedBoolean",e.UnexpectedEndOfScript="UnexpectedEndOfScript",e.UnexpectedIdentifier="UnexpectedIdentifier",e.UnexpectedKeyword="UnexpectedKeyword",e.UnexpectedNull="UnexpectedNull",e.UnexpectedNumber="UnexpectedNumber",e.UnexpectedPunctuator="UnexpectedPunctuator",e.UnexpectedString="UnexpectedString",e.UnexpectedTemplate="UnexpectedTemplate",e.UnexpectedToken="UnexpectedToken"}(p||(p={}));const d={[p.InvalidModuleUri]:"Module uri must be a text literal.",[p.ForInOfLoopInitializer]:"for-in loop variable declaration may not have an initializer.",[p.IdentiferExpected]:"'${value}' is an invalid identifier.",[p.InvalidEscapedReservedWord]:"Keyword cannot contain escaped characters.",[p.InvalidExpression]:"Invalid expression.",[p.InvalidFunctionIdentifier]:"'${value}' is an invalid function identifier.",[p.InvalidHexEscapeSequence]:"Invalid hexadecimal escape sequence.",[p.InvalidLeftHandSideInAssignment]:"Invalid left-hand side in assignment.",[p.InvalidLeftHandSideInForIn]:"Invalid left-hand side in for-in.",[p.InvalidTemplateHead]:"Invalid template structure.",[p.InvalidVariableAssignment]:"Invalid variable assignment.",[p.KeyMustBeString]:"Object property keys must be a word starting with a letter.",[p.NoFunctionInsideBlock]:"Functions cannot be declared inside of code blocks.",[p.NoFunctionInsideFunction]:"Functions cannot be declared inside another function.",[p.ModuleExportRootOnly]:"Module exports cannot be declared inside of code blocks.",[p.ModuleImportRootOnly]:"Module import cannot be declared inside of code blocks.",[p.PunctuatorExpected]:"'${value}' expected.",[p.TemplateOctalLiteral]:"Octal literals are not allowed in template literals.",[p.UnexpectedBoolean]:"Unexpected boolean literal.",[p.UnexpectedEndOfScript]:"Unexpected end of Arcade expression.",[p.UnexpectedIdentifier]:"Unexpected identifier.",[p.UnexpectedKeyword]:"Unexpected keyword.",[p.UnexpectedNull]:"Unexpected null literal.",[p.UnexpectedNumber]:"Unexpected number.",[p.UnexpectedPunctuator]:"Unexpected ponctuator.",[p.UnexpectedString]:"Unexpected text literal.",[p.UnexpectedTemplate]:"Unexpected quasi '${value}'.",[p.UnexpectedToken]:"Unexpected token '${value}'."};class u extends Error{constructor({code:e,index:t,line:n,column:r,len:i=0,description:a,data:o}){super(`${a??e}`),this.declaredRootClass="esri.arcade.lib.parsingerror",this.name="ParsingError",this.code=e,this.index=t,this.line=n,this.column=r,this.len=i,this.data=o,this.description=a,this.range={start:{line:n,column:r-1},end:{line:n,column:r+i}},Error.captureStackTrace?.(this,u)}}function m(e){return e?.type===t.Program}function x(e){switch(e?.type){case t.BlockStatement:case t.BreakStatement:case t.ContinueStatement:case t.EmptyStatement:case t.ExpressionStatement:case t.ForInStatement:case t.ForStatement:case t.FunctionDeclaration:case t.IfStatement:case t.ReturnStatement:case t.VariableDeclaration:return!0;default:return!1}}function f(e){return e?.type===t.BlockStatement}function I(e){return e?.type===t.BlockComment}function E(e){return e?.type===t.BreakStatement}function y(e){return e?.type===t.ContinueStatement}function S(e){return e?.type===t.EmptyStatement}function U(e){return e?.type===t.ExpressionStatement}function v(e){return e?.type===t.ForInStatement}function F(e){return e?.type===t.ForStatement}function b(e){return e?.type===t.FunctionDeclaration}function L(e){return e?.type===t.IfStatement}function g(e){return e?.type===t.ReturnStatement}function k(e){return e?.type===t.VariableDeclaration}function B(e){switch(e?.type){case t.ArrayExpression:case t.AssignmentExpression:case t.BinaryExpression:case t.CallExpression:case t.Identifier:case t.Literal:case t.LogicalExpression:case t.MemberExpression:case t.ObjectExpression:case t.TemplateLiteral:case t.UpdateExpression:case t.UnaryExpression:return!0;default:return!1}}function h(e){return e?.type===t.ArrayExpression}function T(e){return e?.type===t.AssignmentExpression}function O(e){return e?.type===t.BinaryExpression}function N(e){return e?.type===t.CallExpression}function M(e){return e?.type===t.Identifier}function w(e){return e?.type===t.Literal}function D(e){return e?.type===t.LogicalExpression}function P(e){return e?.type===t.ObjectExpression}function R(e){return e?.type===t.TemplateLiteral}function A(e){return e?.type===t.MemberExpression}function C(e){return e?.type===t.UnaryExpression}function H(e){return e?.type===t.UpdateExpression}function V(e){return e?.type===t.VariableDeclarator}function K(e){return e?.type===t.Property}function W(e){return e?.type===t.TemplateElement}export{e as Keywords,u as ParsingError,p as ParsingErrorCodes,t as Syntax,l as TokenType,i as assignmentOperators,o as binaryOperators,h as isArrayExpression,T as isAssignmentExpression,O as isBinaryExpression,I as isBlockComment,f as isBlockStatement,E as isBreakStatement,N as isCallExpression,y as isContinueStatement,S as isEmptyStatement,B as isExpression,U as isExpressionStatement,v as isForInStatement,F as isForStatement,b as isFunctionDeclaration,M as isIdentifier,L as isIfStatement,w as isLiteral,D as isLogicalExpression,A as isMemberExpression,P as isObjectExpression,m as isProgram,K as isProperty,g as isReturnStatement,x as isStatement,W as isTemplateElement,R as isTemplateLiteral,C as isUnaryExpression,H as isUpdateExpression,k as isVariableDeclaration,V as isVariableDeclarator,a as logicalOperators,c as operatorPrecedence,d as parsingErrorMessages,s as rokenNames,r as unaryOperators,n as updateOperators};
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[8612],{60945:(e,t,s)=>{s.d(t,{A:()=>m});var r,i=s(90237),n=s(25482),o=s(88930),a=s(10107),l=(s(44208),s(53966),s(87811),s(36005)),h=s(40608),u=s(43937),d=s(56400);let c=r=class extends n.oY{static get allTime(){return p}static get empty(){return g}constructor(e){super(e),this.end=null,this.start=null}readEnd(e,t){return null!=t.end?new Date(t.end):null}writeEnd(e,t){t.end=e?.getTime()??null}get isAllTime(){return this.equals(r.allTime)}get isEmpty(){return this.equals(r.empty)}readStart(e,t){return null!=t.start?new Date(t.start):null}writeStart(e,t){t.start=e?.getTime()??null}clone(){return new r({end:this.end,start:this.start})}equals(e){if(!e)return!1;const t=this.start?.getTime()??this.start,s=this.end?.getTime()??this.end,r=e.start?.getTime()??e.start,i=e.end?.getTime()??e.end;return t===r&&s===i}expandTo(e,t=d.qU){if(this.isEmpty||this.isAllTime)return this.clone();let s=this.start;s&&(s=(0,o.lL)(s,e,t));let i=this.end;if(i){const s=(0,o.lL)(i,e,t);i=i.getTime()===s.getTime()?s:(0,o.S1)(s,1,e,t)}return new r({start:s,end:i})}intersection(e){if(!e)return this.clone();if(this.isEmpty||e.isEmpty)return r.empty;if(this.isAllTime)return e.clone();if(e.isAllTime)return this.clone();const t=this.start?.getTime()??-1/0,s=this.end?.getTime()??1/0,i=e.start?.getTime()??-1/0,n=e.end?.getTime()??1/0;let o,a;return i>=t&&i<=s?o=i:t>=i&&t<=n&&(o=t),s>=i&&s<=n?a=s:n>=t&&n<=s&&(a=n),null==o||null==a||isNaN(o)||isNaN(a)?r.empty:new r({start:o===-1/0?null:new Date(o),end:a===1/0?null:new Date(a)})}offset(e,t,s=d.qU){if(this.isEmpty||this.isAllTime)return this.clone();const i=new r,{start:n,end:a}=this;return null!=n&&(i.start=(0,o.S1)(n,e,t,s)),null!=a&&(i.end=(0,o.S1)(a,e,t,s)),i}union(e){if(!e||e.isEmpty)return this.clone();if(this.isEmpty)return e.clone();if(this.isAllTime||e.isAllTime)return p.clone();const t=null!=this.start&&null!=e.start?new Date(Math.min(this.start.getTime(),e.start.getTime())):null,s=null!=this.end&&null!=e.end?new Date(Math.max(this.end.getTime(),e.end.getTime())):null;return new r({start:t,end:s})}};(0,i._)([(0,a.MZ)({type:Date,json:{write:{allowNull:!0}}})],c.prototype,"end",void 0),(0,i._)([(0,l.w)("end")],c.prototype,"readEnd",null),(0,i._)([(0,u.K)("end")],c.prototype,"writeEnd",null),(0,i._)([(0,a.MZ)({readOnly:!0,json:{read:!1}})],c.prototype,"isAllTime",null),(0,i._)([(0,a.MZ)({readOnly:!0,json:{read:!1}})],c.prototype,"isEmpty",null),(0,i._)([(0,a.MZ)({type:Date,json:{write:{allowNull:!0}}})],c.prototype,"start",void 0),(0,i._)([(0,l.w)("start")],c.prototype,"readStart",null),(0,i._)([(0,u.K)("start")],c.prototype,"writeStart",null),c=r=(0,i._)([(0,h.$)("esri.TimeExtent")],c);const p=new c,g=new c({start:void 0,end:void 0}),m=c},4902:(e,t,s)=>{s.d(t,{PH:()=>a,sA:()=>o});var r=s(90237),i=s(40608);let n=0;const o=e=>{let t=class extends e{constructor(...e){super(...e),Object.defineProperty(this,"uid",{writable:!1,configurable:!1,value:Date.now().toString(16)+"-object-"+n++})}};return t=(0,r._)([(0,i.$)("esri.core.Identifiable")],t),t},a=e=>{let t=class extends e{constructor(...e){super(...e),Object.defineProperty(this,"uid",{writable:!1,configurable:!1,value:n++})}};return t=(0,r._)([(0,i.$)("esri.core.Identifiable.NumericIdentifiable")],t),t};let l=class extends(o(class{})){};l=(0,r._)([(0,i.$)("esri.core.Identifiable")],l)},55359:(e,t,s)=>{s.d(t,{q:()=>i});var r=s(57219);class i{constructor(e,t){this._storage=new r.F,this.id="",this.name="",this.size=0,this._storage.maxSize=e,this._storage.register(this),t&&this._storage.registerRemoveFunc("",t)}destroy(){this._storage.deregister(this),this._storage.destroy()}put(e,t,s=1){this._storage.put(this,e,t,s,1)}pop(e){return this._storage.pop(this,e)}get(e){return this._storage.get(this,e)}clear(){this._storage.clearAll()}get maxSize(){return this._storage.maxSize}set maxSize(e){this._storage.maxSize=e}resetHitRate(){}}},57219:(e,t,s)=>{s.d(t,{F:()=>a,Mn:()=>o});var r,i,n=s(3694);(i=r||(r={}))[i.ALL=0]="ALL",i[i.SOME=1]="SOME";class o{constructor(e,t,s){this.name=e,this._storage=t,this.id=l+++":",this.size=0,this.maxSize=-1,this._removeFunc=!1,this._hit=0,this._miss=0,this._storage.register(this),s&&(this._storage.registerRemoveFunc(this.id,s),this._removeFunc=!0)}destroy(){this._storage.clear(this),this._removeFunc&&this._storage.deregisterRemoveFunc(this.id),this._storage.deregister(this),this._storage=null}get hitRate(){return this._hit/(this._hit+this._miss)}get storageSize(){return this._storage.size}getSize(e){return this._storage.getSize(this,e)}resetHitRate(){this._hit=this._miss=0}put(e,t,s,r=0){this._storage.put(this,e,t,s,r)}pop(e){const t=this._storage.pop(this,e);return void 0===t?++this._miss:++this._hit,t}get(e){const t=this._storage.get(this,e);return void 0===t?++this._miss:++this._hit,t}peek(e){return this._storage.peek(this,e)}updateSize(e,t,s){this._storage.updateSize(this,e,t,s)}clear(){this._storage.clear(this)}clearAll(){this._storage.clearAll()}get performanceInfo(){return this._storage.performanceInfo}resetStats(){this._storage.resetStats()}}class a{get size(){return this._size}constructor(e=10485760){this._maxSize=e,this._db=new Map,this._size=0,this._hit=0,this._miss=0,this._removeFuncs=new n.A,this._users=new n.A}destroy(){this.clearAll(),this._removeFuncs.clear(),this._users.clear(),this._db=null}register(e){this._users.push(e)}deregister(e){this._users.removeUnordered(e)}registerRemoveFunc(e,t){this._removeFuncs.push([e,t])}deregisterRemoveFunc(e){this._removeFuncs.filterInPlace((t=>t[0]!==e))}get maxSize(){return this._maxSize}set maxSize(e){this._maxSize=Math.max(e,-1),this._checkSize()}getSize(e,t){const s=this._db.get(e.id+t);return s?.size??0}put(e,t,s,i,n){t=e.id+t;const o=this._db.get(t);if(o&&(this._size-=o.size,e.size-=o.size,this._db.delete(t),o.entry!==s&&this._notifyRemove(t,o.entry,o.size,r.ALL)),i>this._maxSize)return void this._notifyRemove(t,s,i,r.ALL);if(void 0===s)return void console.warn("Refusing to cache undefined entry ");if(!i||i<0)return console.warn(`Refusing to cache entry with size ${i} for key ${t}`),void this._notifyRemove(t,s,0,r.ALL);const a=1+Math.max(n,-4)- -3;this._db.set(t,new h(s,i,a)),this._size+=i,e.size+=i,this._checkSize()}updateSize(e,t,s,i){t=e.id+t;const n=this._db.get(t);if(n&&n.entry===s){for(this._size-=n.size,e.size-=n.size;i>this._maxSize;){const e=this._notifyRemove(t,s,i,r.SOME);if(!(null!=e&&e>0))return void this._db.delete(t);i=e}n.size=i,this._size+=i,e.size+=i,this._checkSize()}}pop(e,t){t=e.id+t;const s=this._db.get(t);if(s)return this._size-=s.size,e.size-=s.size,this._db.delete(t),++this._hit,s.entry;++this._miss}get(e,t){t=e.id+t;const s=this._db.get(t);if(void 0!==s)return this._db.delete(t),s.lives=s.lifetime,this._db.set(t,s),++this._hit,s.entry;++this._miss}peek(e,t){const s=this._db.get(e.id+t);return s?++this._hit:++this._miss,s?.entry}get performanceInfo(){const e={Size:Math.round(this._size/1048576)+"/"+Math.round(this._maxSize/1048576)+"MB","Hit rate":Math.round(100*this._getHitRate())+"%",Entries:this._db.size.toString()},t={},s=new Array;this._db.forEach(((e,r)=>{const i=e.lifetime;s[i]=(s[i]||0)+e.size,this._users.forAll((s=>{const{id:i,name:n}=s;if(r.startsWith(i)){const s=t[n]||0;t[n]=s+e.size}}))}));const r={};this._users.forAll((e=>{const s=e.name;if("hitRate"in e&&"number"==typeof e.hitRate&&!isNaN(e.hitRate)&&e.hitRate>0){const i=t[s]||0;t[s]=i,r[s]=Math.round(100*e.hitRate)+"%"}else r[s]="0%"}));const i=Object.keys(t);i.sort(((e,s)=>t[s]-t[e])),i.forEach((s=>e[s]=Math.round(t[s]/2**20)+"MB / "+r[s]));for(let t=s.length-1;t>=0;--t){const r=s[t];r&&(e["Priority "+(t+-3-1)]=Math.round(r/this._size*100)+"%")}return e}resetStats(){this._hit=this._miss=0,this._users.forAll((e=>e.resetHitRate()))}clear(e){const t=e.id;this._db.forEach(((e,s)=>{s.startsWith(t)&&(this._size-=e.size,this._db.delete(s),this._notifyRemove(s,e.entry,e.size,r.ALL))})),e.size=0}clearAll(){this._db.forEach(((e,t)=>this._notifyRemove(t,e.entry,e.size,r.ALL))),this._users.forAll((e=>e.size=0)),this._size=0,this._db.clear()}_getHitRate(){return this._hit/(this._hit+this._miss)}_notifyRemove(e,t,s,r){let i;return this._removeFuncs.some((n=>{if(e.startsWith(n[0])){const e=n[1](t,r,s);return"number"==typeof e&&(i=e),!0}return!1})),i}_checkSize(){this._users.forAll((e=>this._checkSizeLimits(e))),this._checkSizeLimits()}_checkSizeLimits(e){const t=e??this;if(t.maxSize<0||t.size<=t.maxSize)return;const s=e?.id;let r=!0;for(;r;){r=!1;for(const[i,n]of this._db)if(0===n.lifetime&&(!s||i.startsWith(s))){if(this._purgeItem(i,n,e),t.size<=.9*t.maxSize)return;r||=this._db.has(i)}}for(const[r,i]of this._db)if((!s||r.startsWith(s))&&(this._purgeItem(r,i,e),t.size<=.9*t.maxSize))return}_purgeItem(e,t,s=this._users.find((t=>e.startsWith(t.id)))){if(this._db.delete(e),t.lives<=1){this._size-=t.size,s&&(s.size-=t.size);const i=this._notifyRemove(e,t.entry,t.size,r.SOME);null!=i&&i>0&&(this._size+=i,s&&(s.size+=i),t.lives=t.lifetime,t.size=i,this._db.set(e,t))}else--t.lives,this._db.set(e,t)}}let l=0;class h{constructor(e,t,s){this.entry=e,this.size=t,this.lifetime=s,this.lives=s}}},9775:(e,t,s)=>{s.d(t,{A:()=>n});var r=s(62788),i=s(95488);class n{constructor(e=(e=>e.values().next().value)){this._peeker=e,this._observable=new i.I,this._items=new Set}get length(){return(0,r.gc)(this._observable),this._items.size}clear(){0!==this.length&&(this._items.clear(),this._observable.notify())}last(){if(0===this.length)return;let e;for(e of this._items);return e}peek(){if(0!==this.length)return this._peeker(this._items)}push(e){this.contains(e)||(this._items.add(e),this._observable.notify())}contains(e){return(0,r.gc)(this._observable),this._items.has(e)}pop(){if(0===this.length)return;const e=this.peek();return this._items.delete(e),this._observable.notify(),e}popLast(){if(0===this.length)return;const e=this.last();return this._items.delete(e),this._observable.notify(),e}remove(e){this.contains(e)&&(this._items.delete(e),this._observable.notify())}filter(e){const t=this.length;return this._items.forEach((t=>{e(t)||this._items.delete(t)})),t!==this._items.size&&this._observable.notify(),this}*[Symbol.iterator](){(0,r.gc)(this._observable),yield*this._items}}},36708:(e,t,s)=>{s.d(t,{C_:()=>c,OH:()=>m,Vh:()=>f,on:()=>d,pc:()=>y,wB:()=>l,z7:()=>h}),s(60999),s(5503);var r=s(37955),i=s(36563),n=s(97768),o=s(74887),a=s(14012);function l(e,t,s={}){return u(e,t,s,p)}function h(e,t,s={}){return u(e,t,s,g)}function u(e,t,s={},r){let i=null;const o=s.once?(e,s)=>{r(e)&&((0,n.xt)(i),t(e,s))}:(e,s)=>{r(e)&&t(e,s)};if(i=(0,a.Cn)(e,o,s.sync,s.equals),s.initial){const t=e();o(t,t)}return i}function d(e,t,s,o={}){let a=null,h=null,u=null;function d(){a&&h&&(h.remove(),o.onListenerRemove?.(a),a=null,h=null)}function c(e){o.once&&o.once&&(0,n.xt)(u),s(e)}const p=l(e,((e,s)=>{d(),(0,r.wb)(e)&&(a=e,h=(0,r.on)(e,t,c),o.onListenerAdd?.(e))}),{sync:o.sync,initial:!0});return u=(0,i.hA)((()=>{p.remove(),d()})),u}function c(e,t){return function(e,t,s){if((0,o.G4)(s))return Promise.reject((0,o.NK)());const r=e();if(t?.(r))return Promise.resolve(r);let a=null;function l(){a=(0,n.xt)(a)}return new Promise(((r,n)=>{a=(0,i.vE)([(0,o.u7)(s,(()=>{l(),n((0,o.NK)())})),u(e,(e=>{l(),r(e)}),{sync:!1,once:!0},t??p)])}))}(e,g,t)}function p(e){return!0}function g(e){return!!e}s(80559);const m={sync:!0},f={initial:!0},y={sync:!0,initial:!0}},10382:(e,t,s)=>{s.d(t,{A:()=>h});var r=s(36563),i=s(74887),n=s(9775),o=s(72457),a=s(52268),l=s(61322);class h{constructor(){this._inUseClients=new Array,this._clients=new Array,this._clientPromises=new Array,this._ongoingJobsQueue=new n.A}destroy(){this.close()}get closed(){return!this._clients?.length}open(e,t){return new Promise(((s,r)=>{let n=!0;const o=e=>{(0,i.Te)(t.signal),n&&(n=!1,e())};this._clients.length=e.length,this._clientPromises.length=e.length,this._inUseClients.length=e.length;for(let n=0;n<e.length;++n){const a=e[n];(0,i.$X)(a)?this._clientPromises[n]=a.then((e=>(this._clients[n]=new l.default(e,t,this._ongoingJobsQueue),o(s),this._clients[n])),(()=>(o(r),null))):(this._clients[n]=new l.default(a,t,this._ongoingJobsQueue),this._clientPromises[n]=Promise.resolve(this._clients[n]),o(s))}}))}broadcast(e,t,s){const r=new Array(this._clientPromises.length);for(let i=0;i<this._clientPromises.length;++i){const n=this._clientPromises[i];r[i]=n.then((r=>r?.invoke(e,t,s)))}return r}close(){let e;for(;e=this._ongoingJobsQueue.pop();)e.resolver.reject((0,i.NK)(`Worker closing, aborting job calling '${e.methodName}'`));for(const e of this._clientPromises)e.then((e=>e?.close()));this._clients.length=0,this._clientPromises.length=0,this._inUseClients.length=0,(0,o.h)(this)}invoke(e,t,s){return this.apply(e,[t],s)}apply(e,t,s){const r=(0,i.Tw)();this._ongoingJobsQueue.push({methodName:e,data:t,invokeOptions:s,resolver:r});for(let e=0;e<this._clientPromises.length;e++){const t=this._clients[e];t?t.jobAdded():this._clientPromises[e].then((e=>e?.jobAdded()))}return r.promise}createInvokeProxy(e){return(0,a.L)(this,e)}on(e,t){return Promise.all(this._clientPromises).then((()=>(0,r.vE)(this._clients.map((s=>s.on(e,t))))))}openPorts(){return new Promise((e=>{const t=new Array(this._clientPromises.length);let s=t.length;for(let r=0;r<this._clientPromises.length;++r)this._clientPromises[r].then((i=>{i&&(t[r]=i.openPort()),0==--s&&e(t)}))}))}get test(){return{numClients:this._clients.length}}}},72457:(e,t,s)=>{s.d(t,{h:()=>n,k:()=>i});const r=new FinalizationRegistry((e=>{e.close()}));function i(e,t){r.register(e,t,t)}function n(e){r.unregister(e)}},29953:(e,t,s)=>{s.d(t,{ho:()=>F});var r=s(49186),i=s(44208),n=s(74887),o=s(10382),a=s(72457),l=s(61322),h=s(53966),u=s(97768),d=s(78888),c=s(84952);const p={async request(e,t){const s=e.options,r=s.responseType;s.signal=t?.signal,s.responseType="native"===r||"native-request-init"===r?"native-request-init":r&&["blob","json","text"].includes(r)&&(0,c.sC)(e.url)?.after?r:"array-buffer";const i=await(0,d.A)(e.url,s),n={data:i.data,httpStatus:i.httpStatus,ssl:i.ssl};switch(i.requestOptions?.responseType){case"native-request-init":return delete n.data.signal,n;case"blob":n.data=await n.data.arrayBuffer();break;case"json":n.data=(new TextEncoder).encode(JSON.stringify(n.data)).buffer;break;case"text":n.data=(new TextEncoder).encode(n.data).buffer}return{result:n,transferList:[n.data]}}};var g=s(8341),m=s(2741),f=s(92602),y=(s(47566),s(70333));const _={};var v=s(26390);class b{constructor(){const e=document.createDocumentFragment();["addEventListener","dispatchEvent","removeEventListener"].forEach((t=>{this[t]=(...s)=>e[t](...s)}))}}class w{constructor(){this._dispatcher=new b,this._workerPostMessage({type:g.Go.HANDSHAKE})}terminate(){}get onmessage(){return this._onmessageHandler}set onmessage(e){this._onmessageHandler&&this.removeEventListener("message",this._onmessageHandler),this._onmessageHandler=e,e&&this.addEventListener("message",e)}get onmessageerror(){return this._onmessageerrorHandler}set onmessageerror(e){this._onmessageerrorHandler&&this.removeEventListener("messageerror",this._onmessageerrorHandler),this._onmessageerrorHandler=e,e&&this.addEventListener("messageerror",e)}get onerror(){return this._onerrorHandler}set onerror(e){this._onerrorHandler&&this.removeEventListener("error",this._onerrorHandler),this._onerrorHandler=e,e&&this.addEventListener("error",e)}postMessage(e){(0,v.d)((()=>{this._workerMessageHandler(new MessageEvent("message",{data:e}))}))}dispatchEvent(e){return this._dispatcher.dispatchEvent(e)}addEventListener(e,t,s){this._dispatcher.addEventListener(e,t,s)}removeEventListener(e,t,s){this._dispatcher.removeEventListener(e,t,s)}_workerPostMessage(e){(0,v.d)((()=>{this.dispatchEvent(new MessageEvent("message",{data:e}))}))}async _workerMessageHandler(e){const t=(0,g.VI)(e);if(t&&t.type===g.Go.OPEN){const{modulePath:e,jobId:s}=t;let r=await l.default.loadWorker(e);r||(r=await import(e));const i=l.default.connect(r);this._workerPostMessage({type:g.Go.OPENED,jobId:s,data:i})}}}var k=s(73444),A=s(18357);const S=()=>h.A.getLogger("esri.core.workers.workerFactory"),{HANDSHAKE:M}=g.Go;let P,E;const I="Failed to create Worker. Fallback to execute module in main thread";async function z(e){return new Promise((t=>{function s(i){const n=(0,g.VI)(i);n&&n.type===M&&(e.removeEventListener("message",s),e.removeEventListener("error",r),t(e))}function r(t){t.preventDefault(),e.removeEventListener("message",s),e.removeEventListener("error",r),S().warn("Failed to create Worker. Fallback to execute module in main thread",t),(e=new w).addEventListener("message",s),e.addEventListener("error",r)}e.addEventListener("message",s),e.addEventListener("error",r)}))}let L=0;const{ABORT:T,INVOKE:O,OPEN:R,OPENED:x,RESPONSE:U}=g.Go;class N{static async create(e){const t=await async function(){if(!(0,i.A)("esri-workers"))return z(new w);if(!P&&!E)try{const e='let globalId=0;const outgoing=new Map,configuration=JSON.parse("{CONFIGURATION}");self.esriConfig=configuration.esriConfig;const workerPath=self.esriConfig.workers.workerPath,HANDSHAKE=0,OPEN=1,OPENED=2,RESPONSE=3,INVOKE=4,ABORT=5;function createAbortError(){const e=new Error("Aborted");return e.name="AbortError",e}function receiveMessage(e){return e&&e.data?"string"==typeof e.data?JSON.parse(e.data):e.data:null}function invokeStaticMessage(e,o,r){const t=r&&r.signal,n=globalId++;return new Promise(((r,s)=>{if(t){if(t.aborted)return s(createAbortError());t.addEventListener("abort",(()=>{outgoing.get(n)&&(outgoing.delete(n),self.postMessage({type:ABORT,jobId:n}),s(createAbortError()))}))}outgoing.set(n,{resolve:r,reject:s}),self.postMessage({type:INVOKE,jobId:n,methodName:e,abortable:null!=t,data:o})}))}let workerRevisionChecked=!1;function checkWorkerRevision(e){if(!workerRevisionChecked&&e.kernelInfo){workerRevisionChecked=!0;const{revision:o,fullVersion:r}=configuration.kernelInfo,{revision:t,fullVersion:n,version:s}=e.kernelInfo;esriConfig.assetsPath!==esriConfig.defaultAssetsPath&&o!==t&&console.warn(`Version mismatch detected between ArcGIS Maps SDK for JavaScript modules and assets. For more information visit https://bit.ly/3QnsuSo.\\nModules version: ${r}\\nAssets version: ${n??s}\\nAssets path: ${esriConfig.assetsPath}`)}}function messageHandler(e){const o=receiveMessage(e);if(!o)return;const r=o.jobId;switch(o.type){case OPEN:let n;function t(e){const o=n.connect(e);self.postMessage({type:OPENED,jobId:r,data:o},[o])}"function"==typeof define&&define.amd?require([workerPath],(e=>{n=e.default||e,checkWorkerRevision(n),n.loadWorker(o.modulePath).then((e=>e||new Promise((e=>{require([o.modulePath],e)})))).then(t)})):"System"in self&&"function"==typeof System.import?System.import(workerPath).then((e=>(n=e.default,checkWorkerRevision(n),n.loadWorker(o.modulePath)))).then((e=>e||System.import(o.modulePath))).then(t):esriConfig.workers.useDynamicImport?import(workerPath).then((e=>{n=e.default||e,checkWorkerRevision(n),n.loadWorker(o.modulePath).then((e=>e||import(o.modulePath))).then(t)})):(self.RemoteClient||importScripts(workerPath),n=self.RemoteClient.default||self.RemoteClient,checkWorkerRevision(n),n.loadWorker(o.modulePath).then(t));break;case RESPONSE:if(outgoing.has(r)){const s=outgoing.get(r);outgoing.delete(r),o.error?s.reject(JSON.parse(o.error)):s.resolve(o.data)}}}self.dojoConfig=configuration.loaderConfig,esriConfig.workers.loaderUrl&&(self.importScripts(esriConfig.workers.loaderUrl),"function"==typeof require&&"function"==typeof require.config&&require.config(configuration.loaderConfig)),self.addEventListener("message",messageHandler),self.postMessage({type:0});'.split('"{CONFIGURATION}"').join(`'${function(){let e;if(null!=f.A.default){const t={...f.A};delete t.default,e=JSON.parse(JSON.stringify(t))}else e=JSON.parse(JSON.stringify(f.A));e.assetsPath=(0,c.s2)(e.assetsPath),e.defaultAssetsPath=e.defaultAssetsPath?(0,c.s2)(e.defaultAssetsPath):void 0,e.request.interceptors=[],e.log.interceptors=[],e.locale=(0,k.JK)(),e.has={"esri-csp-restrictions":(0,i.A)("esri-csp-restrictions"),"esri-2d-debug":!1,"esri-2d-update-debug":(0,i.A)("esri-2d-update-debug"),"esri-2d-log-updating":(0,i.A)("esri-2d-log-updating"),"featurelayer-pbf":(0,i.A)("featurelayer-pbf"),"featurelayer-fast-triangulation-enabled":(0,i.A)("featurelayer-fast-triangulation-enabled"),"featurelayer-simplify-thresholds":(0,i.A)("featurelayer-simplify-thresholds"),"featurelayer-simplify-payload-size-factors":(0,i.A)("featurelayer-simplify-payload-size-factors"),"featurelayer-simplify-mobile-factor":(0,i.A)("featurelayer-simplify-mobile-factor"),"featurelayer-query-max-depth":(0,i.A)("featurelayer-query-max-depth"),"featurelayer-query-pausing-enabled":(0,i.A)("featurelayer-query-pausing-enabled"),"featurelayer-snapshot-enabled":(0,i.A)("featurelayer-snapshot-enabled"),"esri-atomics":(0,i.A)("esri-atomics"),"esri-shared-array-buffer":(0,i.A)("esri-shared-array-buffer"),"esri-tiles-debug":(0,i.A)("esri-tiles-debug"),"esri-workers-arraybuffer-transfer":(0,i.A)("esri-workers-arraybuffer-transfer"),"feature-polyline-generalization-factor":(0,i.A)("feature-polyline-generalization-factor"),"host-webworker":1},e.workers.loaderUrl&&(e.workers.loaderUrl=(0,c.s2)(e.workers.loaderUrl)),e.workers.workerPath?e.workers.workerPath=(0,c.s2)(e.workers.workerPath):e.workers.workerPath=(0,c.s2)((0,m.s)("esri/core/workers/RemoteClient.js")),e.workers.useDynamicImport=!1;const t=f.A.workers.loaderConfig,s=function(e){const t={async:e.async,isDebug:e.isDebug,locale:e.locale,baseUrl:e.baseUrl,has:{...e.has},map:{...e.map},packages:e.packages?.concat()||[],paths:{...e.paths}};return e.hasOwnProperty("async")||(t.async=!0),e.hasOwnProperty("isDebug")||(t.isDebug=!1),e.baseUrl||(t.baseUrl=_.baseUrl),t}({baseUrl:t?.baseUrl,locale:(0,k.JK)(),has:{"csp-restrictions":1,"dojo-test-sniff":0,"host-webworker":1,...t?.has},map:{...t?.map},paths:{...t?.paths},packages:t?.packages||[]}),r={buildDate:A.$,fullVersion:y.ol,revision:A.u};return JSON.stringify({esriConfig:e,loaderConfig:s,kernelInfo:r})}()}'`);P=URL.createObjectURL(new Blob([e],{type:"text/javascript"}))}catch(e){E=e||{}}let e;if(P)try{e=new Worker(P,{name:"esri-worker-"+L++})}catch(t){S().warn(I,E),e=new w}else S().warn(I,E),e=new w;return z(e)}();return new N(t,e)}constructor(e,t){this._outJobs=new Map,this._inJobs=new Map,this.worker=e,this.id=t,e.addEventListener("message",this._onMessage.bind(this)),e.addEventListener("error",(e=>{e.preventDefault(),h.A.getLogger("esri.core.workers.WorkerOwner").error(e)}))}terminate(){this.worker.terminate()}async open(e,t={}){const{signal:s}=t,r=(0,g.Jc)();return new Promise(((t,i)=>{const o={resolve:t,reject:i,abortHandle:(0,n.NY)(s,(()=>{this._outJobs.delete(r),this._post({type:T,jobId:r})}))};this._outJobs.set(r,o),this._post({type:R,jobId:r,modulePath:e})}))}_onMessage(e){const t=(0,g.VI)(e);if(t)switch(t.type){case x:this._onOpenedMessage(t);break;case U:this._onResponseMessage(t);break;case T:this._onAbortMessage(t);break;case O:this._onInvokeMessage(t)}}_onAbortMessage(e){const t=this._inJobs,s=e.jobId,r=t.get(s);r&&(r.controller&&r.controller.abort(),t.delete(s))}_onInvokeMessage(e){const{methodName:t,jobId:s,data:r,abortable:i}=e,o=i?new AbortController:null,a=this._inJobs,l=p[t];let h;try{if("function"!=typeof l)throw new TypeError(`${t} is not a function`);h=l.call(null,r,{signal:o?o.signal:null})}catch(e){return void this._post({type:U,jobId:s,error:(0,g.mF)(e)})}(0,n.$X)(h)?(a.set(s,{controller:o,promise:h}),h.then((e=>{a.has(s)&&(a.delete(s),this._post({type:U,jobId:s},e))}),(e=>{a.has(s)&&(a.delete(s),e||(e={message:"Error encountered at method"+t}),(0,n.zf)(e)||this._post({type:U,jobId:s,error:(0,g.mF)(e||{message:`Error encountered at method ${t}`})}))}))):this._post({type:U,jobId:s},h)}_onOpenedMessage(e){const{jobId:t,data:s}=e,r=this._outJobs.get(t);r&&(this._outJobs.delete(t),(0,u.xt)(r.abortHandle),r.resolve(s))}_onResponseMessage(e){const{jobId:t,error:s,data:i}=e,n=this._outJobs.get(t);n&&(this._outJobs.delete(t),(0,u.xt)(n.abortHandle),s?n.reject(r.A.fromJSON(JSON.parse(s))):n.resolve(i))}_post(e,t,s){return(0,g.u1)(this.worker,e,t,s)}}const H=(0,i.A)("host-browser")?Math.min(navigator.hardwareConcurrency-1,(0,i.A)("workers-pool-size")):0;let C=(0,i.A)("esri-mobile")?Math.min(H,3):H;C||(C=(0,i.A)("safari")&&(0,i.A)("mac")?7:2);let D=0;const j=[];async function V(e,t){const s=new o.A,{registryTarget:r,...i}=t;return await s.open(e,i),r&&(0,a.k)(r,s),s}async function F(e,t={}){if("string"!=typeof e)throw new r.A("workers:undefined-module","modulePath is missing");let s=t.strategy||"distributed";if((0,i.A)("host-webworker")&&!(0,i.A)("esri-workers")&&(s="local"),"local"===s){let s=await l.default.loadWorker(e);s||(s=await import(e)),(0,n.Te)(t.signal);const r=t.client||s;return V([l.default.connect(s,t.schedule)],{...t,client:r})}if(await async function(){if($)return $;Z=new AbortController;const e=[];for(let t=0;t<C;t++){const s=N.create(t).then((e=>(j[t]=e,e)));e.push(s)}return $=Promise.all(e),$}(),(0,n.Te)(t.signal),"dedicated"===s){const s=D++%C;return V([await j[s].open(e,t)],t)}if(t.maxNumWorkers&&t.maxNumWorkers>0){const s=Math.min(t.maxNumWorkers,C);if(s<C){const r=new Array(s);for(let i=0;i<s;++i){const s=D++%C;r[i]=j[s].open(e,t)}return V(r,t)}}return V(j.map((s=>s.open(e,t))),t)}let Z,$=null},76620:(e,t,s)=>{s.d(t,{A:()=>v});var r,i=s(90237),n=s(4576),o=s(66552),a=s(25482),l=s(83047),h=s(67076),u=s(10107),d=(s(44208),s(53966),s(36005)),c=s(40608),p=s(43937);const g=(0,o.O)()({orthometric:"gravity-related-height",gravity_related_height:"gravity-related-height",ellipsoidal:"ellipsoidal"}),m=g.jsonValues.slice();(0,n.Xy)(m,"orthometric");const f=(0,o.O)()({meter:"meters",foot:"feet","us-foot":"us-feet","clarke-foot":"clarke-feet","clarke-yard":"clarke-yards","clarke-link":"clarke-links","sears-yard":"sears-yards","sears-foot":"sears-feet","sears-chain":"sears-chains","benoit-1895-b-chain":"benoit-1895-b-chains","indian-yard":"indian-yards","indian-1937-yard":"indian-1937-yards","gold-coast-foot":"gold-coast-feet","sears-1922-truncated-chain":"sears-1922-truncated-chains","50-kilometers":"50-kilometers","150-kilometers":"150-kilometers"});let y=r=class extends a.oY{constructor(e){super(e),this.heightModel="gravity-related-height",this.heightUnit="meters",this.vertCRS=null}writeHeightModel(e,t,s){return g.write(e,t,s)}readHeightModel(e,t,s){return g.read(e)||(s?.messages&&s.messages.push(function(e,t){return new h.A("height-model:unsupported",`Height model of value '${e}' is not supported`,t)}(e,{context:s})),null)}readHeightUnit(e,t,s){return f.read(e)||(s?.messages&&s.messages.push(_(e,{context:s})),null)}readHeightUnitService(e,t,s){return(0,l.LA)(e)||f.read(e)||(s?.messages&&s.messages.push(_(e,{context:s})),null)}readVertCRS(e,t){return t.vertCRS||t.ellipsoid||t.geoid}clone(){return new r({heightModel:this.heightModel,heightUnit:this.heightUnit,vertCRS:this.vertCRS})}equals(e){return!!e&&(this===e||this.heightModel===e.heightModel&&this.heightUnit===e.heightUnit&&this.vertCRS===e.vertCRS)}static deriveUnitFromSR(e,t){const s=(0,l.k1)(t);return new r({heightModel:e.heightModel,heightUnit:s??void 0,vertCRS:e.vertCRS})}write(e,t){return t={origin:"web-scene",...t},super.write(e,t)}static fromJSON(e){if(!e)return null;const t=new r;return t.read(e,{origin:"web-scene"}),t}};function _(e,t){return new h.A("height-unit:unsupported",`Height unit of value '${e}' is not supported`,t)}(0,i._)([(0,u.MZ)({type:g.apiValues,constructOnly:!0,json:{origins:{"web-scene":{type:m,default:"ellipsoidal"}}}})],y.prototype,"heightModel",void 0),(0,i._)([(0,p.K)("web-scene","heightModel")],y.prototype,"writeHeightModel",null),(0,i._)([(0,d.w)(["web-scene","service"],"heightModel")],y.prototype,"readHeightModel",null),(0,i._)([(0,u.MZ)({type:f.apiValues,constructOnly:!0,json:{origins:{"web-scene":{type:f.jsonValues,write:f.write}}}})],y.prototype,"heightUnit",void 0),(0,i._)([(0,d.w)("web-scene","heightUnit")],y.prototype,"readHeightUnit",null),(0,i._)([(0,d.w)("service","heightUnit")],y.prototype,"readHeightUnitService",null),(0,i._)([(0,u.MZ)({type:String,constructOnly:!0,json:{origins:{"web-scene":{write:!0}}}})],y.prototype,"vertCRS",void 0),(0,i._)([(0,d.w)("service","vertCRS",["vertCRS","ellipsoid","geoid"])],y.prototype,"readVertCRS",null),y=r=(0,i._)([(0,c.$)("esri.geometry.HeightModelInfo")],y);const v=y},5111:(e,t,s)=>{s.r(t),s.d(t,{default:()=>L});var r=s(90237),i=s(78888),n=s(49186),o=s(97768),a=s(92071),l=s(74887),h=s(84952),u=s(10107),d=(s(44208),s(53966)),c=(s(87811),s(36005)),p=s(40608),g=s(76620),m=s(4146),f=s(89186),y=s(18768),_=s(16131),v=s(8303),b=s(55785);class w{constructor(e,t,s,r){this._hasNoDataValues=null,this._minValue=null,this._maxValue=null,"pixelData"in e?(this.values=e.pixelData,this.width=e.width,this.height=e.height,this.noDataValue=e.noDataValue):(this.values=e,this.width=t,this.height=s,this.noDataValue=r)}get hasNoDataValues(){if(null==this._hasNoDataValues){const e=this.noDataValue;this._hasNoDataValues=this.values.includes(e)}return this._hasNoDataValues}get minValue(){return this._ensureBounds(),this._minValue}get maxValue(){return this._ensureBounds(),this._maxValue}_ensureBounds(){if(null!=this._minValue)return;const{noDataValue:e,values:t}=this;let s=1/0,r=-1/0,i=!0;for(const n of t)n===e?this._hasNoDataValues=!0:(s=n<s?n:s,r=n>r?n:r,i=!1);i?(this._minValue=0,this._maxValue=0):(this._minValue=s,this._maxValue=r>-3e38?r:0)}}var k=s(4576),A=s(36563),S=s(29953);class M{constructor(e,t,s,r,i={}){this._mainMethod=t,this._transferLists=s,this._listeners=[],this._promise=(0,S.ho)(e,{...i,schedule:r}).then((e=>{if(void 0===this._thread){this._thread=e,this._promise=null,i.hasInitialize&&this.broadcast({},"initialize");for(const e of this._listeners)this._connectListener(e)}else e.close()})),this._promise.catch((t=>d.A.getLogger("esri.core.workers.WorkerHandle").error(`Failed to initialize ${e} worker: ${t}`)))}on(e,t){const s={removed:!1,eventName:e,callback:t,threadHandle:null};return this._listeners.push(s),this._connectListener(s),(0,A.hA)((()=>{s.removed=!0,(0,k.TF)(this._listeners,s),this._thread&&null!=s.threadHandle&&s.threadHandle.remove()}))}destroy(){this._thread&&(this._thread.close(),this._thread=null),this._promise=null,this._listeners.length=0,this._transferLists={}}invoke(e,t){return this.invokeMethod(this._mainMethod,e,t)}invokeMethod(e,t,s){if(this._thread){const r=this._transferLists[e],i=r?r(t):[];return this._thread.invoke(e,t,{transferList:i,signal:s})}return this._promise?this._promise.then((()=>((0,l.Te)(s),this.invokeMethod(e,t,s)))):Promise.reject(null)}broadcast(e,t){return this._thread?Promise.all(this._thread.broadcast(t,e)).then((()=>{})):this._promise?this._promise.then((()=>this.broadcast(e,t))):Promise.reject()}get promise(){return this._promise}_connectListener(e){this._thread&&this._thread.on(e.eventName,e.callback).then((t=>{e.removed||(e.threadHandle=t)}))}}class P extends M{constructor(e=null){super("LercWorker","_decode",{_decode:e=>[e.buffer]},e,{strategy:"dedicated"}),this.schedule=e,this.ref=0}decode(e,t,s){return e&&0!==e.byteLength?this.invoke({buffer:e,options:t},s):Promise.resolve(null)}release(){--this.ref<=0&&(E.forEach(((e,t)=>{e===this&&E.delete(t)})),this.destroy())}}const E=new Map;let I=class extends((0,f.f)((0,y.b)((0,_.q)((0,v.A)((0,a.P)(m.A)))))){constructor(...e){super(...e),this.capabilities={operations:{supportsTileMap:!1}},this.copyright=null,this.heightModelInfo=null,this.path=null,this.minScale=void 0,this.maxScale=void 0,this.opacity=1,this.operationalLayerType="ArcGISTiledElevationServiceLayer",this.sourceJSON=null,this.type="elevation",this.url=null,this.version=null,this._lercDecoder=function(e=null){let t=E.get(e);return t||(null!=e?(t=new P((t=>e.immediate.schedule(t))),E.set(e,t)):(t=new P,E.set(null,t))),++t.ref,t}()}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}destroy(){this._lercDecoder=(0,o.Gz)(this._lercDecoder)}readCapabilities(e,t){const s=t.capabilities&&t.capabilities.split(",").map((e=>e.toLowerCase().trim()));return s?{operations:{supportsTileMap:s.includes("tilemap")}}:{operations:{supportsTileMap:!1}}}readVersion(e,t){let s=t.currentVersion;return s||(s=9.3),s}load(e){const t=null!=e?e.signal:null;return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["Image Service"],supportsData:!1,validateItem:e=>{if(e.typeKeywords)for(let t=0;t<e.typeKeywords.length;t++)if("elevation 3d layer"===e.typeKeywords[t].toLowerCase())return!0;throw new n.A("portal:invalid-layer-item-type","Invalid layer item type '${type}', expected '${expectedType}' ",{type:"Image Service",expectedType:"Image Service Elevation 3D Layer"})}},e).catch(l.QP).then((()=>this._fetchImageService(t)))),Promise.resolve(this)}fetchTile(e,t,s,r){const n=null!=(r=r||{signal:null}).signal?r.signal:r.signal=(new AbortController).signal,o={responseType:"array-buffer",signal:n},a={noDataValue:r.noDataValue,returnFileInfo:!0};return this.load().then((()=>this._fetchTileAvailability(e,t,s,r))).then((()=>(0,i.A)(this.getTileUrl(e,t,s),o))).then((e=>this._lercDecoder.decode(e.data,a,n))).then((e=>new w(e)))}getTileUrl(e,t,s){const r=!this.capabilities.operations.supportsTileMap&&this.supportsBlankTile,i=(0,h.x0)({...this.parsedUrl.query,blankTile:!r&&null});return`${this.parsedUrl.path}/tile/${e}/${t}/${s}${i?"?"+i:""}`}async queryElevation(e,t){const{ElevationQuery:r}=await s.e(3492).then(s.bind(s,63492));return(0,l.Te)(t),(new r).query(this,e,t)}async createElevationSampler(e,t){const{ElevationQuery:r}=await s.e(3492).then(s.bind(s,63492));return(0,l.Te)(t),(new r).createSampler(this,e,t)}_fetchTileAvailability(e,t,s,r){return this.tilemapCache?this.tilemapCache.fetchAvailability(e,t,s,r):Promise.resolve("unknown")}async _fetchImageService(e){if(this.sourceJSON)return this.sourceJSON;const t={query:{f:"json",...this.parsedUrl.query},responseType:"json",signal:e},s=await(0,i.A)(this.parsedUrl.path,t);s.ssl&&(this.url=this.url?.replace(/^http:/i,"https:")),this.sourceJSON=s.data,this.read(s.data,{origin:"service",url:this.parsedUrl})}get hasOverriddenFetchTile(){return!this.fetchTile[z]}};(0,r._)([(0,u.MZ)({readOnly:!0})],I.prototype,"capabilities",void 0),(0,r._)([(0,c.w)("service","capabilities",["capabilities"])],I.prototype,"readCapabilities",null),(0,r._)([(0,u.MZ)({json:{read:{source:"copyrightText"}}})],I.prototype,"copyright",void 0),(0,r._)([(0,u.MZ)({readOnly:!0,type:g.A})],I.prototype,"heightModelInfo",void 0),(0,r._)([(0,u.MZ)({type:String,json:{origins:{"web-scene":{read:!0,write:!0}},read:!1}})],I.prototype,"path",void 0),(0,r._)([(0,u.MZ)({type:["show","hide"]})],I.prototype,"listMode",void 0),(0,r._)([(0,u.MZ)({json:{read:!1,write:!1,origins:{service:{read:!1,write:!1},"portal-item":{read:!1,write:!1},"web-document":{read:!1,write:!1}}},readOnly:!0})],I.prototype,"minScale",void 0),(0,r._)([(0,u.MZ)({json:{read:!1,write:!1,origins:{service:{read:!1,write:!1},"portal-item":{read:!1,write:!1},"web-document":{read:!1,write:!1}}},readOnly:!0})],I.prototype,"maxScale",void 0),(0,r._)([(0,u.MZ)({json:{read:!1,write:!1,origins:{"web-document":{read:!1,write:!1}}}})],I.prototype,"opacity",void 0),(0,r._)([(0,u.MZ)({type:["ArcGISTiledElevationServiceLayer"]})],I.prototype,"operationalLayerType",void 0),(0,r._)([(0,u.MZ)()],I.prototype,"sourceJSON",void 0),(0,r._)([(0,u.MZ)({json:{read:!1},value:"elevation",readOnly:!0})],I.prototype,"type",void 0),(0,r._)([(0,u.MZ)(b.OZ)],I.prototype,"url",void 0),(0,r._)([(0,u.MZ)()],I.prototype,"version",void 0),(0,r._)([(0,c.w)("version",["currentVersion"])],I.prototype,"readVersion",null),I=(0,r._)([(0,p.$)("esri.layers.ElevationLayer")],I);const z=Symbol("default-fetch-tile");I.prototype.fetchTile[z]=!0;const L=I},4146:(e,t,s)=>{s.d(t,{A:()=>v});var r=s(90237),i=(s(59456),s(78888)),n=s(49186),o=s(65529),a=s(4902),l=s(92474),h=s(53966),u=s(74887),d=s(84952),c=s(10107),p=(s(44208),s(87811),s(40608)),g=s(92602),m=s(5443),f=s(16930);let y=0,_=class extends(o.A.EventedMixin((0,a.sA)(l.A))){constructor(){super(...arguments),this.attributionDataUrl=null,this.fullExtent=new m.A(-180,-90,180,90,f.A.WGS84),this.id=Date.now().toString(16)+"-layer-"+y++,this.legendEnabled=!0,this.listMode="show",this.opacity=1,this.parent=null,this.persistenceEnabled=!1,this.popupEnabled=!0,this.attributionVisible=!0,this.spatialReference=f.A.WGS84,this.title=null,this.type=null,this.url=null,this.visible=!0}static async fromArcGISServerUrl(e){const t="string"==typeof e?{url:e}:e;return(await s.e(7982).then(s.bind(s,27982))).fromUrl(t)}static fromPortalItem(e){return async function(e){const t="portalItem"in e?e:{portalItem:e},{fromItem:r}=await s.e(5613).then(s.bind(s,45613));try{return await r(t)}catch(e){const s=t?.portalItem,r=s?.id||"unset",i=s?.portal?.url||g.A.portalUrl;throw h.A.getLogger("esri.layers.support.fromPortalItem").error("#fromPortalItem()","Failed to create layer from portal item (portal: '"+i+"', id: '"+r+"')",e),e}}(e)}initialize(){this.when().catch((e=>{(0,u.zf)(e)||h.A.getLogger(this).error("#load()",`Failed to load layer (title: '${this.title??"no title"}', id: '${this.id??"no id"}')`,{error:e})}))}destroy(){const e=this.parent;if(e){const t=this;"layers"in e&&e.layers.includes(t)?e.layers.remove(t):"tables"in e&&e.tables.includes(t)?e.tables.remove(t):"baseLayers"in e&&e.baseLayers.includes(t)?e.baseLayers.remove(t):"referenceLayers"in e&&e.referenceLayers.includes(t)&&e.referenceLayers.remove(t),this._set("parent",null)}}get hasAttributionData(){return null!=this.attributionDataUrl}get parsedUrl(){return(0,d.An)(this.url)}async fetchAttributionData(){const e=this.attributionDataUrl;if(this.hasAttributionData&&e)return(await(0,i.A)(e,{query:{f:"json"},responseType:"json"})).data;throw new n.A("layer:no-attribution-data","Layer does not have attribution data")}};(0,r._)([(0,c.MZ)({type:String})],_.prototype,"attributionDataUrl",void 0),(0,r._)([(0,c.MZ)({type:m.A})],_.prototype,"fullExtent",void 0),(0,r._)([(0,c.MZ)({readOnly:!0})],_.prototype,"hasAttributionData",null),(0,r._)([(0,c.MZ)({type:String,clonable:!1})],_.prototype,"id",void 0),(0,r._)([(0,c.MZ)({type:Boolean,nonNullable:!0})],_.prototype,"legendEnabled",void 0),(0,r._)([(0,c.MZ)({type:["show","hide","hide-children"]})],_.prototype,"listMode",void 0),(0,r._)([(0,c.MZ)({type:Number,range:{min:0,max:1},nonNullable:!0})],_.prototype,"opacity",void 0),(0,r._)([(0,c.MZ)({clonable:!1})],_.prototype,"parent",void 0),(0,r._)([(0,c.MZ)({readOnly:!0})],_.prototype,"parsedUrl",null),(0,r._)([(0,c.MZ)({type:Boolean,readOnly:!0})],_.prototype,"persistenceEnabled",void 0),(0,r._)([(0,c.MZ)({type:Boolean})],_.prototype,"popupEnabled",void 0),(0,r._)([(0,c.MZ)({type:Boolean})],_.prototype,"attributionVisible",void 0),(0,r._)([(0,c.MZ)({type:f.A})],_.prototype,"spatialReference",void 0),(0,r._)([(0,c.MZ)({type:String})],_.prototype,"title",void 0),(0,r._)([(0,c.MZ)({readOnly:!0,json:{read:!1}})],_.prototype,"type",void 0),(0,r._)([(0,c.MZ)()],_.prototype,"url",void 0),(0,r._)([(0,c.MZ)({type:Boolean,nonNullable:!0})],_.prototype,"visible",void 0),_=(0,r._)([(0,p.$)("esri.layers.Layer")],_);const v=_},8303:(e,t,s)=>{s.d(t,{A:()=>k});var r=s(90237),i=s(92602),n=s(70333),o=s(78888),a=s(60999),l=s(49186),h=s(53966),u=s(97768),d=s(74887),c=s(84952),p=s(10107),g=(s(44208),s(87811),s(36005)),m=s(40608),f=s(43937),y=s(83531),_=s(20655),v=s(80812),b=s(41318),w=s(10407);const k=e=>{let t=class extends e{constructor(){super(...arguments),this.resourceReferences={portalItem:null,paths:[]},this.userHasEditingPrivileges=!0,this.userHasFullEditingPrivileges=!1,this.userHasUpdateItemPrivileges=!1}destroy(){this.portalItem=(0,u.pR)(this.portalItem),this.resourceReferences.portalItem=null,this.resourceReferences.paths.length=0}set portalItem(e){e!==this._get("portalItem")&&(this.removeOrigin("portal-item"),this._set("portalItem",e))}readPortalItem(e,t,s){if(t.itemId)return new v.default({id:t.itemId,portal:s?.portal})}writePortalItem(e,t){e?.id&&(t.itemId=e.id)}async loadFromPortal(e,t){if(this.portalItem?.id)try{const{load:r}=await Promise.all([s.e(5356),s.e(8823)]).then(s.bind(s,41204));return(0,d.Te)(t),await r({instance:this,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData,layerModuleTypeMap:e.layerModuleTypeMap},t)}catch(e){throw(0,d.zf)(e)||h.A.getLogger(this).warn(`Failed to load layer (${this.title}, ${this.id}) portal item (${this.portalItem.id})\n ${e}`),e}}async finishLoadEditablePortalLayer(e){this._set("userHasEditingPrivileges",await this._fetchUserHasEditingPrivileges(e).catch((e=>((0,d.QP)(e),!0))))}async setUserPrivileges(e,t){if(!i.A.userPrivilegesApplied)return this.finishLoadEditablePortalLayer(t);if(this.url)try{const{features:{edit:s,fullEdit:r},content:{updateItem:i}}=await this._fetchUserPrivileges(e,t);this._set("userHasEditingPrivileges",s),this._set("userHasFullEditingPrivileges",r),this._set("userHasUpdateItemPrivileges",i)}catch(e){(0,d.QP)(e)}}async _fetchUserPrivileges(e,t){let s=this.portalItem;if(!e||!s||!s.loaded||s.sourceUrl)return this._fetchFallbackUserPrivileges(t);const r=e===s.id;if(r&&s.portal.user)return(0,w.It)(s);let i,o;if(r)i=s.portal.url;else try{i=await(0,y.wI)(this.url,t)}catch(e){(0,d.QP)(e)}if(!i||!(0,c.b8)(i,s.portal.url))return this._fetchFallbackUserPrivileges(t);try{const e=null!=t?t.signal:null;o=await(n.id?.getCredential(`${i}/sharing`,{prompt:!1,signal:e}))}catch(e){(0,d.QP)(e)}const a=!0,l=!1,h=!1;if(!o)return{features:{edit:a,fullEdit:l},content:{updateItem:h}};try{if(r?await s.reload():(s=new v.default({id:e,portal:{url:i}}),await s.load(t)),s.portal.user)return(0,w.It)(s)}catch(e){(0,d.QP)(e)}return{features:{edit:a,fullEdit:l},content:{updateItem:h}}}async _fetchFallbackUserPrivileges(e){let t=!0;try{t=await this._fetchUserHasEditingPrivileges(e)}catch(e){(0,d.QP)(e)}return{features:{edit:t,fullEdit:!1},content:{updateItem:!1}}}async _fetchUserHasEditingPrivileges(e){const t=this.url?n.id?.findCredential(this.url):null;if(!t)return!0;const s=A.credential===t?A.user:await this._fetchEditingUser(e);return A.credential=t,A.user=s,null==s?.privileges||s.privileges.includes("features:user:edit")}async _fetchEditingUser(e){const t=this.portalItem?.portal?.user;if(t)return t;const s=n.id.findServerInfo(this.url??"");if(!s?.owningSystemUrl)return null;const r=`${s.owningSystemUrl}/sharing/rest`,i=_.A.getDefault();if(i&&i.loaded&&(0,c.S8)(i.restUrl)===(0,c.S8)(r))return i.user;const l=`${r}/community/self`,h=null!=e?e.signal:null,u=await(0,a.Ke)((0,o.A)(l,{authMode:"no-prompt",query:{f:"json"},signal:h}));return u.ok?b.A.fromJSON(u.value.data):null}read(e,t){t&&(t.layer=this),super.read(e,t)}write(e,t){const s=t?.portal,r=this.portalItem?.id&&(this.portalItem.portal||_.A.getDefault());return s&&r&&!(0,c.ut)(r.restUrl,s.restUrl)?(t.messages&&t.messages.push(new l.A("layer:cross-portal",`The layer '${this.title} (${this.id})' cannot be persisted because it refers to an item on a different portal than the one being saved to. To save, set layer.portalItem to null or save to the same portal as the item associated with the layer`,{layer:this})),null):super.write(e,{...t,layer:this})}};return(0,r._)([(0,p.MZ)({type:v.default})],t.prototype,"portalItem",null),(0,r._)([(0,g.w)("web-document","portalItem",["itemId"])],t.prototype,"readPortalItem",null),(0,r._)([(0,f.K)("web-document","portalItem",{itemId:{type:String}})],t.prototype,"writePortalItem",null),(0,r._)([(0,p.MZ)({clonable:!1})],t.prototype,"resourceReferences",void 0),(0,r._)([(0,p.MZ)({type:Boolean,readOnly:!0})],t.prototype,"userHasEditingPrivileges",void 0),(0,r._)([(0,p.MZ)({type:Boolean,readOnly:!0})],t.prototype,"userHasFullEditingPrivileges",void 0),(0,r._)([(0,p.MZ)({type:Boolean,readOnly:!0})],t.prototype,"userHasUpdateItemPrivileges",void 0),t=(0,r._)([(0,m.$)("esri.layers.mixins.PortalLayer")],t),t},A={credential:null,user:null}}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[833],{70668:(e,t,r)=>{r.d(t,{A:()=>p});var i=r(90237),n=r(69540),o=r(25482),s=r(88930),a=r(10107),l=(r(44208),r(53966),r(87811),r(93223)),u=r(40608),c=r(73133);let d=class extends((0,n.O)(o.oY)){constructor(e){super(e),this.unit="milliseconds",this.value=0}toMilliseconds(){return(0,s.t)(this.value,this.unit,"milliseconds")}};(0,i._)([(0,l.e)(c.j,{nonNullable:!0})],d.prototype,"unit",void 0),(0,i._)([(0,a.MZ)({type:Number,json:{write:!0},nonNullable:!0})],d.prototype,"value",void 0),d=(0,i._)([(0,u.$)("esri.TimeInterval")],d);const p=d},9775:(e,t,r)=>{r.d(t,{A:()=>o});var i=r(62788),n=r(95488);class o{constructor(e=(e=>e.values().next().value)){this._peeker=e,this._observable=new n.I,this._items=new Set}get length(){return(0,i.gc)(this._observable),this._items.size}clear(){0!==this.length&&(this._items.clear(),this._observable.notify())}last(){if(0===this.length)return;let e;for(e of this._items);return e}peek(){if(0!==this.length)return this._peeker(this._items)}push(e){this.contains(e)||(this._items.add(e),this._observable.notify())}contains(e){return(0,i.gc)(this._observable),this._items.has(e)}pop(){if(0===this.length)return;const e=this.peek();return this._items.delete(e),this._observable.notify(),e}popLast(){if(0===this.length)return;const e=this.last();return this._items.delete(e),this._observable.notify(),e}remove(e){this.contains(e)&&(this._items.delete(e),this._observable.notify())}filter(e){const t=this.length;return this._items.forEach((t=>{e(t)||this._items.delete(t)})),t!==this._items.size&&this._observable.notify(),this}*[Symbol.iterator](){(0,i.gc)(this._observable),yield*this._items}}},10382:(e,t,r)=>{r.d(t,{A:()=>u});var i=r(36563),n=r(74887),o=r(9775),s=r(72457),a=r(52268),l=r(61322);class u{constructor(){this._inUseClients=new Array,this._clients=new Array,this._clientPromises=new Array,this._ongoingJobsQueue=new o.A}destroy(){this.close()}get closed(){return!this._clients?.length}open(e,t){return new Promise(((r,i)=>{let o=!0;const s=e=>{(0,n.Te)(t.signal),o&&(o=!1,e())};this._clients.length=e.length,this._clientPromises.length=e.length,this._inUseClients.length=e.length;for(let o=0;o<e.length;++o){const a=e[o];(0,n.$X)(a)?this._clientPromises[o]=a.then((e=>(this._clients[o]=new l.default(e,t,this._ongoingJobsQueue),s(r),this._clients[o])),(()=>(s(i),null))):(this._clients[o]=new l.default(a,t,this._ongoingJobsQueue),this._clientPromises[o]=Promise.resolve(this._clients[o]),s(r))}}))}broadcast(e,t,r){const i=new Array(this._clientPromises.length);for(let n=0;n<this._clientPromises.length;++n){const o=this._clientPromises[n];i[n]=o.then((i=>i?.invoke(e,t,r)))}return i}close(){let e;for(;e=this._ongoingJobsQueue.pop();)e.resolver.reject((0,n.NK)(`Worker closing, aborting job calling '${e.methodName}'`));for(const e of this._clientPromises)e.then((e=>e?.close()));this._clients.length=0,this._clientPromises.length=0,this._inUseClients.length=0,(0,s.h)(this)}invoke(e,t,r){return this.apply(e,[t],r)}apply(e,t,r){const i=(0,n.Tw)();this._ongoingJobsQueue.push({methodName:e,data:t,invokeOptions:r,resolver:i});for(let e=0;e<this._clientPromises.length;e++){const t=this._clients[e];t?t.jobAdded():this._clientPromises[e].then((e=>e?.jobAdded()))}return i.promise}createInvokeProxy(e){return(0,a.L)(this,e)}on(e,t){return Promise.all(this._clientPromises).then((()=>(0,i.vE)(this._clients.map((r=>r.on(e,t))))))}openPorts(){return new Promise((e=>{const t=new Array(this._clientPromises.length);let r=t.length;for(let i=0;i<this._clientPromises.length;++i)this._clientPromises[i].then((n=>{n&&(t[i]=n.openPort()),0==--r&&e(t)}))}))}get test(){return{numClients:this._clients.length}}}},72457:(e,t,r)=>{r.d(t,{h:()=>o,k:()=>n});const i=new FinalizationRegistry((e=>{e.close()}));function n(e,t){i.register(e,t,t)}function o(e){i.unregister(e)}},29953:(e,t,r)=>{r.d(t,{ho:()=>O});var i=r(49186),n=r(44208),o=r(74887),s=r(10382),a=r(72457),l=r(61322),u=r(53966),c=r(97768),d=r(78888),p=r(84952);const m={async request(e,t){const r=e.options,i=r.responseType;r.signal=t?.signal,r.responseType="native"===i||"native-request-init"===i?"native-request-init":i&&["blob","json","text"].includes(i)&&(0,p.sC)(e.url)?.after?i:"array-buffer";const n=await(0,d.A)(e.url,r),o={data:n.data,httpStatus:n.httpStatus,ssl:n.ssl};switch(n.requestOptions?.responseType){case"native-request-init":return delete o.data.signal,o;case"blob":o.data=await o.data.arrayBuffer();break;case"json":o.data=(new TextEncoder).encode(JSON.stringify(o.data)).buffer;break;case"text":o.data=(new TextEncoder).encode(o.data).buffer}return{result:o,transferList:[o.data]}}};var h=r(8341),g=r(2741),y=r(92602),M=(r(47566),r(70333));const f={};var w=r(26390);class I{constructor(){const e=document.createDocumentFragment();["addEventListener","dispatchEvent","removeEventListener"].forEach((t=>{this[t]=(...r)=>e[t](...r)}))}}class A{constructor(){this._dispatcher=new I,this._workerPostMessage({type:h.Go.HANDSHAKE})}terminate(){}get onmessage(){return this._onmessageHandler}set onmessage(e){this._onmessageHandler&&this.removeEventListener("message",this._onmessageHandler),this._onmessageHandler=e,e&&this.addEventListener("message",e)}get onmessageerror(){return this._onmessageerrorHandler}set onmessageerror(e){this._onmessageerrorHandler&&this.removeEventListener("messageerror",this._onmessageerrorHandler),this._onmessageerrorHandler=e,e&&this.addEventListener("messageerror",e)}get onerror(){return this._onerrorHandler}set onerror(e){this._onerrorHandler&&this.removeEventListener("error",this._onerrorHandler),this._onerrorHandler=e,e&&this.addEventListener("error",e)}postMessage(e){(0,w.d)((()=>{this._workerMessageHandler(new MessageEvent("message",{data:e}))}))}dispatchEvent(e){return this._dispatcher.dispatchEvent(e)}addEventListener(e,t,r){this._dispatcher.addEventListener(e,t,r)}removeEventListener(e,t,r){this._dispatcher.removeEventListener(e,t,r)}_workerPostMessage(e){(0,w.d)((()=>{this.dispatchEvent(new MessageEvent("message",{data:e}))}))}async _workerMessageHandler(e){const t=(0,h.VI)(e);if(t&&t.type===h.Go.OPEN){const{modulePath:e,jobId:r}=t;let i=await l.default.loadWorker(e);i||(i=await import(e));const n=l.default.connect(i);this._workerPostMessage({type:h.Go.OPENED,jobId:r,data:n})}}}var v=r(73444),b=r(18357);const D=()=>u.A.getLogger("esri.core.workers.workerFactory"),{HANDSHAKE:T}=h.Go;let S,N;const j="Failed to create Worker. Fallback to execute module in main thread";async function _(e){return new Promise((t=>{function r(n){const o=(0,h.VI)(n);o&&o.type===T&&(e.removeEventListener("message",r),e.removeEventListener("error",i),t(e))}function i(t){t.preventDefault(),e.removeEventListener("message",r),e.removeEventListener("error",i),D().warn("Failed to create Worker. Fallback to execute module in main thread",t),(e=new A).addEventListener("message",r),e.addEventListener("error",i)}e.addEventListener("message",r),e.addEventListener("error",i)}))}let C=0;const{ABORT:x,INVOKE:L,OPEN:Z,OPENED:k,RESPONSE:U}=h.Go;class z{static async create(e){const t=await async function(){if(!(0,n.A)("esri-workers"))return _(new A);if(!S&&!N)try{const e='let globalId=0;const outgoing=new Map,configuration=JSON.parse("{CONFIGURATION}");self.esriConfig=configuration.esriConfig;const workerPath=self.esriConfig.workers.workerPath,HANDSHAKE=0,OPEN=1,OPENED=2,RESPONSE=3,INVOKE=4,ABORT=5;function createAbortError(){const e=new Error("Aborted");return e.name="AbortError",e}function receiveMessage(e){return e&&e.data?"string"==typeof e.data?JSON.parse(e.data):e.data:null}function invokeStaticMessage(e,o,r){const t=r&&r.signal,n=globalId++;return new Promise(((r,s)=>{if(t){if(t.aborted)return s(createAbortError());t.addEventListener("abort",(()=>{outgoing.get(n)&&(outgoing.delete(n),self.postMessage({type:ABORT,jobId:n}),s(createAbortError()))}))}outgoing.set(n,{resolve:r,reject:s}),self.postMessage({type:INVOKE,jobId:n,methodName:e,abortable:null!=t,data:o})}))}let workerRevisionChecked=!1;function checkWorkerRevision(e){if(!workerRevisionChecked&&e.kernelInfo){workerRevisionChecked=!0;const{revision:o,fullVersion:r}=configuration.kernelInfo,{revision:t,fullVersion:n,version:s}=e.kernelInfo;esriConfig.assetsPath!==esriConfig.defaultAssetsPath&&o!==t&&console.warn(`Version mismatch detected between ArcGIS Maps SDK for JavaScript modules and assets. For more information visit https://bit.ly/3QnsuSo.\\nModules version: ${r}\\nAssets version: ${n??s}\\nAssets path: ${esriConfig.assetsPath}`)}}function messageHandler(e){const o=receiveMessage(e);if(!o)return;const r=o.jobId;switch(o.type){case OPEN:let n;function t(e){const o=n.connect(e);self.postMessage({type:OPENED,jobId:r,data:o},[o])}"function"==typeof define&&define.amd?require([workerPath],(e=>{n=e.default||e,checkWorkerRevision(n),n.loadWorker(o.modulePath).then((e=>e||new Promise((e=>{require([o.modulePath],e)})))).then(t)})):"System"in self&&"function"==typeof System.import?System.import(workerPath).then((e=>(n=e.default,checkWorkerRevision(n),n.loadWorker(o.modulePath)))).then((e=>e||System.import(o.modulePath))).then(t):esriConfig.workers.useDynamicImport?import(workerPath).then((e=>{n=e.default||e,checkWorkerRevision(n),n.loadWorker(o.modulePath).then((e=>e||import(o.modulePath))).then(t)})):(self.RemoteClient||importScripts(workerPath),n=self.RemoteClient.default||self.RemoteClient,checkWorkerRevision(n),n.loadWorker(o.modulePath).then(t));break;case RESPONSE:if(outgoing.has(r)){const s=outgoing.get(r);outgoing.delete(r),o.error?s.reject(JSON.parse(o.error)):s.resolve(o.data)}}}self.dojoConfig=configuration.loaderConfig,esriConfig.workers.loaderUrl&&(self.importScripts(esriConfig.workers.loaderUrl),"function"==typeof require&&"function"==typeof require.config&&require.config(configuration.loaderConfig)),self.addEventListener("message",messageHandler),self.postMessage({type:0});'.split('"{CONFIGURATION}"').join(`'${function(){let e;if(null!=y.A.default){const t={...y.A};delete t.default,e=JSON.parse(JSON.stringify(t))}else e=JSON.parse(JSON.stringify(y.A));e.assetsPath=(0,p.s2)(e.assetsPath),e.defaultAssetsPath=e.defaultAssetsPath?(0,p.s2)(e.defaultAssetsPath):void 0,e.request.interceptors=[],e.log.interceptors=[],e.locale=(0,v.JK)(),e.has={"esri-csp-restrictions":(0,n.A)("esri-csp-restrictions"),"esri-2d-debug":!1,"esri-2d-update-debug":(0,n.A)("esri-2d-update-debug"),"esri-2d-log-updating":(0,n.A)("esri-2d-log-updating"),"featurelayer-pbf":(0,n.A)("featurelayer-pbf"),"featurelayer-fast-triangulation-enabled":(0,n.A)("featurelayer-fast-triangulation-enabled"),"featurelayer-simplify-thresholds":(0,n.A)("featurelayer-simplify-thresholds"),"featurelayer-simplify-payload-size-factors":(0,n.A)("featurelayer-simplify-payload-size-factors"),"featurelayer-simplify-mobile-factor":(0,n.A)("featurelayer-simplify-mobile-factor"),"featurelayer-query-max-depth":(0,n.A)("featurelayer-query-max-depth"),"featurelayer-query-pausing-enabled":(0,n.A)("featurelayer-query-pausing-enabled"),"featurelayer-snapshot-enabled":(0,n.A)("featurelayer-snapshot-enabled"),"esri-atomics":(0,n.A)("esri-atomics"),"esri-shared-array-buffer":(0,n.A)("esri-shared-array-buffer"),"esri-tiles-debug":(0,n.A)("esri-tiles-debug"),"esri-workers-arraybuffer-transfer":(0,n.A)("esri-workers-arraybuffer-transfer"),"feature-polyline-generalization-factor":(0,n.A)("feature-polyline-generalization-factor"),"host-webworker":1},e.workers.loaderUrl&&(e.workers.loaderUrl=(0,p.s2)(e.workers.loaderUrl)),e.workers.workerPath?e.workers.workerPath=(0,p.s2)(e.workers.workerPath):e.workers.workerPath=(0,p.s2)((0,g.s)("esri/core/workers/RemoteClient.js")),e.workers.useDynamicImport=!1;const t=y.A.workers.loaderConfig,r=function(e){const t={async:e.async,isDebug:e.isDebug,locale:e.locale,baseUrl:e.baseUrl,has:{...e.has},map:{...e.map},packages:e.packages?.concat()||[],paths:{...e.paths}};return e.hasOwnProperty("async")||(t.async=!0),e.hasOwnProperty("isDebug")||(t.isDebug=!1),e.baseUrl||(t.baseUrl=f.baseUrl),t}({baseUrl:t?.baseUrl,locale:(0,v.JK)(),has:{"csp-restrictions":1,"dojo-test-sniff":0,"host-webworker":1,...t?.has},map:{...t?.map},paths:{...t?.paths},packages:t?.packages||[]}),i={buildDate:b.$,fullVersion:M.ol,revision:b.u};return JSON.stringify({esriConfig:e,loaderConfig:r,kernelInfo:i})}()}'`);S=URL.createObjectURL(new Blob([e],{type:"text/javascript"}))}catch(e){N=e||{}}let e;if(S)try{e=new Worker(S,{name:"esri-worker-"+C++})}catch(t){D().warn(j,N),e=new A}else D().warn(j,N),e=new A;return _(e)}();return new z(t,e)}constructor(e,t){this._outJobs=new Map,this._inJobs=new Map,this.worker=e,this.id=t,e.addEventListener("message",this._onMessage.bind(this)),e.addEventListener("error",(e=>{e.preventDefault(),u.A.getLogger("esri.core.workers.WorkerOwner").error(e)}))}terminate(){this.worker.terminate()}async open(e,t={}){const{signal:r}=t,i=(0,h.Jc)();return new Promise(((t,n)=>{const s={resolve:t,reject:n,abortHandle:(0,o.NY)(r,(()=>{this._outJobs.delete(i),this._post({type:x,jobId:i})}))};this._outJobs.set(i,s),this._post({type:Z,jobId:i,modulePath:e})}))}_onMessage(e){const t=(0,h.VI)(e);if(t)switch(t.type){case k:this._onOpenedMessage(t);break;case U:this._onResponseMessage(t);break;case x:this._onAbortMessage(t);break;case L:this._onInvokeMessage(t)}}_onAbortMessage(e){const t=this._inJobs,r=e.jobId,i=t.get(r);i&&(i.controller&&i.controller.abort(),t.delete(r))}_onInvokeMessage(e){const{methodName:t,jobId:r,data:i,abortable:n}=e,s=n?new AbortController:null,a=this._inJobs,l=m[t];let u;try{if("function"!=typeof l)throw new TypeError(`${t} is not a function`);u=l.call(null,i,{signal:s?s.signal:null})}catch(e){return void this._post({type:U,jobId:r,error:(0,h.mF)(e)})}(0,o.$X)(u)?(a.set(r,{controller:s,promise:u}),u.then((e=>{a.has(r)&&(a.delete(r),this._post({type:U,jobId:r},e))}),(e=>{a.has(r)&&(a.delete(r),e||(e={message:"Error encountered at method"+t}),(0,o.zf)(e)||this._post({type:U,jobId:r,error:(0,h.mF)(e||{message:`Error encountered at method ${t}`})}))}))):this._post({type:U,jobId:r},u)}_onOpenedMessage(e){const{jobId:t,data:r}=e,i=this._outJobs.get(t);i&&(this._outJobs.delete(t),(0,c.xt)(i.abortHandle),i.resolve(r))}_onResponseMessage(e){const{jobId:t,error:r,data:n}=e,o=this._outJobs.get(t);o&&(this._outJobs.delete(t),(0,c.xt)(o.abortHandle),r?o.reject(i.A.fromJSON(JSON.parse(r))):o.resolve(n))}_post(e,t,r){return(0,h.u1)(this.worker,e,t,r)}}const R=(0,n.A)("host-browser")?Math.min(navigator.hardwareConcurrency-1,(0,n.A)("workers-pool-size")):0;let B=(0,n.A)("esri-mobile")?Math.min(R,3):R;B||(B=(0,n.A)("safari")&&(0,n.A)("mac")?7:2);let E=0;const P=[];async function H(e,t){const r=new s.A,{registryTarget:i,...n}=t;return await r.open(e,n),i&&(0,a.k)(i,r),r}async function O(e,t={}){if("string"!=typeof e)throw new i.A("workers:undefined-module","modulePath is missing");let r=t.strategy||"distributed";if((0,n.A)("host-webworker")&&!(0,n.A)("esri-workers")&&(r="local"),"local"===r){let r=await l.default.loadWorker(e);r||(r=await import(e)),(0,o.Te)(t.signal);const i=t.client||r;return H([l.default.connect(r,t.schedule)],{...t,client:i})}if(await async function(){if(V)return V;F=new AbortController;const e=[];for(let t=0;t<B;t++){const r=z.create(t).then((e=>(P[t]=e,e)));e.push(r)}return V=Promise.all(e),V}(),(0,o.Te)(t.signal),"dedicated"===r){const r=E++%B;return H([await P[r].open(e,t)],t)}if(t.maxNumWorkers&&t.maxNumWorkers>0){const r=Math.min(t.maxNumWorkers,B);if(r<B){const i=new Array(r);for(let n=0;n<r;++n){const r=E++%B;i[n]=P[r].open(e,t)}return H(i,t)}}return H(P.map((r=>r.open(e,t))),t)}let F,V=null},70328:(e,t,r)=>{r.d(t,{BI:()=>y,Ej:()=>c,Hq:()=>u,Ie:()=>h,Jt:()=>g,Ne:()=>d,RF:()=>a,aI:()=>f,fA:()=>o,hZ:()=>m,iT:()=>l,is:()=>M,qv:()=>w,vI:()=>p,v_:()=>I,vt:()=>n,w1:()=>s});var i=r(5443);function n(e=I){return[e[0],e[1],e[2],e[3],e[4],e[5]]}function o(e,t,r,i,o,s,a=n()){return a[0]=e,a[1]=t,a[2]=r,a[3]=i,a[4]=o,a[5]=s,a}function s(e,t){const r=isFinite(e[2])||isFinite(e[5]);return new i.A(r?{xmin:e[0],xmax:e[3],ymin:e[1],ymax:e[4],zmin:e[2],zmax:e[5],spatialReference:t}:{xmin:e[0],xmax:e[3],ymin:e[1],ymax:e[4],spatialReference:t})}function a(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[2]=Math.min(e[2],t[2]),e[3]=Math.max(e[3],t[3]),e[4]=Math.max(e[4],t[4]),e[5]=Math.max(e[5],t[5])}function l(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[2]=Math.min(e[2],t[2]),e[3]=Math.max(e[3],t[0]),e[4]=Math.max(e[4],t[1]),e[5]=Math.max(e[5],t[2])}function u(e,t,r=0,i=t.length/3){let n=e[0],o=e[1],s=e[2],a=e[3],l=e[4],u=e[5];for(let e=0;e<i;e++)n=Math.min(n,t[r+3*e]),o=Math.min(o,t[r+3*e+1]),s=Math.min(s,t[r+3*e+2]),a=Math.max(a,t[r+3*e]),l=Math.max(l,t[r+3*e+1]),u=Math.max(u,t[r+3*e+2]);e[0]=n,e[1]=o,e[2]=s,e[3]=a,e[4]=l,e[5]=u}function c(e,t=[0,0,0]){return t[0]=function(e){return e[0]>=e[3]?0:e[3]-e[0]}(e),t[1]=function(e){return e[1]>=e[4]?0:e[4]-e[1]}(e),t[2]=function(e){return e[2]>=e[5]?0:e[5]-e[2]}(e),t}function d(e,t,r=e){return r[0]=t[0],r[1]=t[1],r[2]=t[2],r!==e&&(r[3]=e[3],r[4]=e[4],r[5]=e[5]),r}function p(e,t,r=e){return r[3]=t[0],r[4]=t[1],r[5]=t[2],r!==e&&(r[0]=e[0],r[1]=e[1],r[2]=e[2]),e}function m(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e}function h(e){return e?m(e,w):n(w)}function g(e,t){return e[0]=t[0],e[1]=t[1],e[2]=Number.NEGATIVE_INFINITY,e[3]=t[2],e[4]=t[3],e[5]=Number.POSITIVE_INFINITY,e}function y(e,t,r,i,n){return e[0]=t,e[1]=r,e[2]=Number.NEGATIVE_INFINITY,e[3]=i,e[4]=n,e[5]=Number.POSITIVE_INFINITY,e}function M(e){return 6===e.length}function f(e,t,r){if(null==e||null==t)return e===t;if(!M(e)||!M(t))return!1;if(r){for(let i=0;i<e.length;i++)if(!r(e[i],t[i]))return!1}else for(let r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}r(19419);const w=[1/0,1/0,1/0,-1/0,-1/0,-1/0],I=[0,0,0,0,0,0];n()},18768:(e,t,r)=>{r.d(t,{b:()=>l});var i=r(90237),n=r(53966),o=r(10107),s=(r(44208),r(87811),r(40608)),a=r(60694);const l=e=>{let t=class extends e{get title(){if(this._get("title")&&"defaults"!==this.originOf("title"))return this._get("title");if(this.url){const e=(0,a.qg)(this.url);if(null!=e&&e.title)return e.title}return this._get("title")||""}set title(e){this._set("title",e)}set url(e){this._set("url",(0,a.Jf)(e,n.A.getLogger(this)))}};return(0,i._)([(0,o.MZ)()],t.prototype,"title",null),(0,i._)([(0,o.MZ)({type:String})],t.prototype,"url",null),t=(0,i._)([(0,s.$)("esri.layers.mixins.ArcGISService")],t),t}},69208:(e,t,r)=>{r.d(t,{d:()=>s});var i=r(90237),n=r(10107),o=(r(44208),r(53966),r(87811),r(40608));const s=e=>{let t=class extends e{constructor(){super(...arguments),this.customParameters=null}};return(0,i._)([(0,n.MZ)({type:Object,json:{write:{overridePolicy:e=>({enabled:!!(e&&Object.keys(e).length>0)})}}})],t.prototype,"customParameters",void 0),t=(0,i._)([(0,o.$)("esri.layers.mixins.CustomParametersMixin")],t),t}},8303:(e,t,r)=>{r.d(t,{A:()=>v});var i=r(90237),n=r(92602),o=r(70333),s=r(78888),a=r(60999),l=r(49186),u=r(53966),c=r(97768),d=r(74887),p=r(84952),m=r(10107),h=(r(44208),r(87811),r(36005)),g=r(40608),y=r(43937),M=r(83531),f=r(20655),w=r(80812),I=r(41318),A=r(10407);const v=e=>{let t=class extends e{constructor(){super(...arguments),this.resourceReferences={portalItem:null,paths:[]},this.userHasEditingPrivileges=!0,this.userHasFullEditingPrivileges=!1,this.userHasUpdateItemPrivileges=!1}destroy(){this.portalItem=(0,c.pR)(this.portalItem),this.resourceReferences.portalItem=null,this.resourceReferences.paths.length=0}set portalItem(e){e!==this._get("portalItem")&&(this.removeOrigin("portal-item"),this._set("portalItem",e))}readPortalItem(e,t,r){if(t.itemId)return new w.default({id:t.itemId,portal:r?.portal})}writePortalItem(e,t){e?.id&&(t.itemId=e.id)}async loadFromPortal(e,t){if(this.portalItem?.id)try{const{load:i}=await Promise.all([r.e(5356),r.e(8823)]).then(r.bind(r,41204));return(0,d.Te)(t),await i({instance:this,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData,layerModuleTypeMap:e.layerModuleTypeMap},t)}catch(e){throw(0,d.zf)(e)||u.A.getLogger(this).warn(`Failed to load layer (${this.title}, ${this.id}) portal item (${this.portalItem.id})\n ${e}`),e}}async finishLoadEditablePortalLayer(e){this._set("userHasEditingPrivileges",await this._fetchUserHasEditingPrivileges(e).catch((e=>((0,d.QP)(e),!0))))}async setUserPrivileges(e,t){if(!n.A.userPrivilegesApplied)return this.finishLoadEditablePortalLayer(t);if(this.url)try{const{features:{edit:r,fullEdit:i},content:{updateItem:n}}=await this._fetchUserPrivileges(e,t);this._set("userHasEditingPrivileges",r),this._set("userHasFullEditingPrivileges",i),this._set("userHasUpdateItemPrivileges",n)}catch(e){(0,d.QP)(e)}}async _fetchUserPrivileges(e,t){let r=this.portalItem;if(!e||!r||!r.loaded||r.sourceUrl)return this._fetchFallbackUserPrivileges(t);const i=e===r.id;if(i&&r.portal.user)return(0,A.It)(r);let n,s;if(i)n=r.portal.url;else try{n=await(0,M.wI)(this.url,t)}catch(e){(0,d.QP)(e)}if(!n||!(0,p.b8)(n,r.portal.url))return this._fetchFallbackUserPrivileges(t);try{const e=null!=t?t.signal:null;s=await(o.id?.getCredential(`${n}/sharing`,{prompt:!1,signal:e}))}catch(e){(0,d.QP)(e)}const a=!0,l=!1,u=!1;if(!s)return{features:{edit:a,fullEdit:l},content:{updateItem:u}};try{if(i?await r.reload():(r=new w.default({id:e,portal:{url:n}}),await r.load(t)),r.portal.user)return(0,A.It)(r)}catch(e){(0,d.QP)(e)}return{features:{edit:a,fullEdit:l},content:{updateItem:u}}}async _fetchFallbackUserPrivileges(e){let t=!0;try{t=await this._fetchUserHasEditingPrivileges(e)}catch(e){(0,d.QP)(e)}return{features:{edit:t,fullEdit:!1},content:{updateItem:!1}}}async _fetchUserHasEditingPrivileges(e){const t=this.url?o.id?.findCredential(this.url):null;if(!t)return!0;const r=b.credential===t?b.user:await this._fetchEditingUser(e);return b.credential=t,b.user=r,null==r?.privileges||r.privileges.includes("features:user:edit")}async _fetchEditingUser(e){const t=this.portalItem?.portal?.user;if(t)return t;const r=o.id.findServerInfo(this.url??"");if(!r?.owningSystemUrl)return null;const i=`${r.owningSystemUrl}/sharing/rest`,n=f.A.getDefault();if(n&&n.loaded&&(0,p.S8)(n.restUrl)===(0,p.S8)(i))return n.user;const l=`${i}/community/self`,u=null!=e?e.signal:null,c=await(0,a.Ke)((0,s.A)(l,{authMode:"no-prompt",query:{f:"json"},signal:u}));return c.ok?I.A.fromJSON(c.value.data):null}read(e,t){t&&(t.layer=this),super.read(e,t)}write(e,t){const r=t?.portal,i=this.portalItem?.id&&(this.portalItem.portal||f.A.getDefault());return r&&i&&!(0,p.ut)(i.restUrl,r.restUrl)?(t.messages&&t.messages.push(new l.A("layer:cross-portal",`The layer '${this.title} (${this.id})' cannot be persisted because it refers to an item on a different portal than the one being saved to. To save, set layer.portalItem to null or save to the same portal as the item associated with the layer`,{layer:this})),null):super.write(e,{...t,layer:this})}};return(0,i._)([(0,m.MZ)({type:w.default})],t.prototype,"portalItem",null),(0,i._)([(0,h.w)("web-document","portalItem",["itemId"])],t.prototype,"readPortalItem",null),(0,i._)([(0,y.K)("web-document","portalItem",{itemId:{type:String}})],t.prototype,"writePortalItem",null),(0,i._)([(0,m.MZ)({clonable:!1})],t.prototype,"resourceReferences",void 0),(0,i._)([(0,m.MZ)({type:Boolean,readOnly:!0})],t.prototype,"userHasEditingPrivileges",void 0),(0,i._)([(0,m.MZ)({type:Boolean,readOnly:!0})],t.prototype,"userHasFullEditingPrivileges",void 0),(0,i._)([(0,m.MZ)({type:Boolean,readOnly:!0})],t.prototype,"userHasUpdateItemPrivileges",void 0),t=(0,i._)([(0,g.$)("esri.layers.mixins.PortalLayer")],t),t},b={credential:null,user:null}},82935:(e,t,r)=>{r.d(t,{e:()=>p});var i=r(90237),n=r(60945),o=r(70668),s=r(10107),a=(r(44208),r(53966),r(87811),r(36005)),l=r(40608),u=r(30524),c=r(96184),d=r(73133);const p=e=>{let t=class extends e{constructor(){super(...arguments),this.timeExtent=null,this.timeOffset=null,this.useViewTime=!0}readOffset(e,t){const r=t.timeInfo.exportOptions;if(!r)return null;const i=r.timeOffset,n=d.j.fromJSON(r.timeOffsetUnits);return i&&n?new o.A({value:i,unit:n}):null}set timeInfo(e){(0,u.sv)(e,this.fieldsIndex),this._set("timeInfo",e)}};return(0,i._)([(0,s.MZ)({type:n.A,json:{write:!1}})],t.prototype,"timeExtent",void 0),(0,i._)([(0,s.MZ)({type:o.A})],t.prototype,"timeOffset",void 0),(0,i._)([(0,a.w)("service","timeOffset",["timeInfo.exportOptions"])],t.prototype,"readOffset",null),(0,i._)([(0,s.MZ)({value:null,type:c.A,json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],t.prototype,"timeInfo",null),(0,i._)([(0,s.MZ)({type:Boolean,json:{read:{source:"timeAnimation"},write:{target:"timeAnimation"},origins:{"web-scene":{read:!1,write:!1}}}})],t.prototype,"useViewTime",void 0),t=(0,i._)([(0,l.$)("esri.layers.mixins.TemporalLayer")],t),t}},45617:(e,t,r)=>{r.d(t,{A:()=>d});var i,n=r(90237),o=r(25482),s=r(4718),a=r(10107),l=r(56507),u=r(40608);let c=i=class extends o.oY{constructor(e){super(e),this.variableName=null,this.dimensionName=null,this.values=[],this.isSlice=!1}clone(){return new i({variableName:this.variableName,dimensionName:this.dimensionName,values:(0,s.o8)(this.values),isSlice:this.isSlice})}};(0,n._)([(0,a.MZ)({type:String,json:{write:!0}})],c.prototype,"variableName",void 0),(0,n._)([(0,a.MZ)({type:String,json:{write:!0}})],c.prototype,"dimensionName",void 0),(0,n._)([(0,a.MZ)({type:l.gK.array(l.gK.oneOf([l.gK.native(Number),l.gK.array(l.gK.native(Number))])),json:{write:!0}})],c.prototype,"values",void 0),(0,n._)([(0,a.MZ)({type:Boolean,json:{write:!0}})],c.prototype,"isSlice",void 0),c=i=(0,n._)([(0,u.$)("esri.layers.support.DimensionalDefinition")],c);const d=c},20437:(e,t,r)=>{r.d(t,{A:()=>y});var i,n=r(90237),o=r(66552),s=r(25482),a=r(10107),l=r(56507),u=(r(87811),r(44208),r(93223)),c=r(36005),d=r(40608),p=r(72088),m=r(98453);const h=new o.J({binary:"binary",coordinate:"coordinate",countOrAmount:"count-or-amount",dateAndTime:"date-and-time",description:"description",locationOrPlaceName:"location-or-place-name",measurement:"measurement",nameOrTitle:"name-or-title",none:"none",orderedOrRanked:"ordered-or-ranked",percentageOrRatio:"percentage-or-ratio",typeOrCategory:"type-or-category",uniqueIdentifier:"unique-identifier"});let g=i=class extends s.oY{constructor(e){super(e),this.alias=null,this.defaultValue=void 0,this.description=null,this.domain=null,this.editable=!0,this.length=void 0,this.name=null,this.nullable=!0,this.type=null,this.valueType=null,this.visible=!0}readDescription(e,{description:t}){let r=null;try{r=t?JSON.parse(t):null}catch(e){}return r?.value??null}readValueType(e,{description:t}){let r=null;try{r=t?JSON.parse(t):null}catch(e){}return r?h.fromJSON(r.fieldValueType):null}clone(){return new i({alias:this.alias,defaultValue:this.defaultValue,description:this.description,domain:this.domain?.clone()??null,editable:this.editable,length:this.length,name:this.name,nullable:this.nullable,type:this.type,valueType:this.valueType,visible:this.visible})}};(0,n._)([(0,a.MZ)({type:String,json:{write:!0}})],g.prototype,"alias",void 0),(0,n._)([(0,a.MZ)({type:[String,Number],json:{write:{allowNull:!0}}})],g.prototype,"defaultValue",void 0),(0,n._)([(0,a.MZ)()],g.prototype,"description",void 0),(0,n._)([(0,c.w)("description")],g.prototype,"readDescription",null),(0,n._)([(0,a.MZ)({types:p.gK,json:{read:{reader:p.rS},write:!0}})],g.prototype,"domain",void 0),(0,n._)([(0,a.MZ)({type:Boolean,json:{write:!0}})],g.prototype,"editable",void 0),(0,n._)([(0,a.MZ)({type:l.jz,json:{write:{overridePolicy:e=>({enabled:Number.isFinite(e)})}}})],g.prototype,"length",void 0),(0,n._)([(0,a.MZ)({type:String,json:{write:!0}})],g.prototype,"name",void 0),(0,n._)([(0,a.MZ)({type:Boolean,json:{write:!0}})],g.prototype,"nullable",void 0),(0,n._)([(0,u.e)(m.m)],g.prototype,"type",void 0),(0,n._)([(0,a.MZ)()],g.prototype,"valueType",void 0),(0,n._)([(0,c.w)("valueType",["description"])],g.prototype,"readValueType",null),(0,n._)([(0,a.MZ)({type:Boolean,json:{read:!1}})],g.prototype,"visible",void 0),g=i=(0,n._)([(0,d.$)("esri.layers.support.Field")],g);const y=g},85675:(e,t,r)=>{r.d(t,{A:()=>v});var i,n=r(90237),o=r(51447),s=r(66552),a=r(25482),l=r(4718),u=r(53966),c=r(10107),d=r(79901),p=r(36005),m=r(40608),h=r(43937),g=r(56507),y=r(86738),M=r(45617),f=r(22796);const w=(0,s.O)()({MT_FIRST:"first",MT_LAST:"last",MT_MIN:"min",MT_MAX:"max",MT_MEAN:"mean",MT_BLEND:"blend",MT_SUM:"sum"}),I=(0,s.O)()({esriMosaicNone:"none",esriMosaicCenter:"center",esriMosaicNadir:"nadir",esriMosaicViewpoint:"viewpoint",esriMosaicAttribute:"attribute",esriMosaicLockRaster:"lock-raster",esriMosaicNorthwest:"northwest",esriMosaicSeamline:"seamline"});let A=i=class extends a.oY{constructor(e){super(e),this.ascending=!0,this.itemRasterFunction=null,this.lockRasterIds=null,this.method=null,this.multidimensionalDefinition=null,this.objectIds=null,this.operation=null,this.sortField=null,this.sortValue=null,this.viewpoint=null,this.where=null}readAscending(e,t){return null!=t.ascending?t.ascending:null==t.sortAscending||t.sortAscending}get itemRenderingRule(){return(0,o.Lx)(u.A.getLogger(this),"itemRenderingRule",{replacement:"itemRasterFunction",version:"4.27",warnOnce:!0}),this._get("itemRasterFunction")}set itemRenderingRule(e){(0,o.Lx)(u.A.getLogger(this),"itemRenderingRule",{replacement:"itemRasterFunction",version:"4.27",warnOnce:!0}),this._set("itemRasterFunction",e)}readMethod(e,t){return function(e){let t;switch(e?e.toLowerCase().replace("esrimosaic",""):""){case"byattribute":case"attribute":t="esriMosaicAttribute";break;case"lockraster":t="esriMosaicLockRaster";break;case"center":t="esriMosaicCenter";break;case"northwest":t="esriMosaicNorthwest";break;case"nadir":t="esriMosaicNadir";break;case"viewpoint":t="esriMosaicViewpoint";break;case"seamline":t="esriMosaicSeamline";break;default:t="esriMosaicNone"}return I.fromJSON(t)}(t.mosaicMethod||t.defaultMosaicMethod)}writeMultidimensionalDefinition(e,t,r){null!=e&&(e=e.filter((({variableName:e,dimensionName:t})=>e&&"*"!==e||t))).length&&(t[r]=e.map((e=>e.toJSON())))}readOperation(e,t){const r=t.mosaicOperation,i=t.mosaicOperator?.toLowerCase(),n=r||(i?w.toJSON(i):null);return w.fromJSON(n)||"first"}castSortValue(e){return null==e||"string"==typeof e||"number"==typeof e?e:`${e}`}clone(){return new i({ascending:this.ascending,itemRasterFunction:(0,l.o8)(this.itemRasterFunction),lockRasterIds:(0,l.o8)(this.lockRasterIds),method:this.method,multidimensionalDefinition:(0,l.o8)(this.multidimensionalDefinition),objectIds:(0,l.o8)(this.objectIds),operation:this.operation,sortField:this.sortField,sortValue:this.sortValue,viewpoint:(0,l.o8)(this.viewpoint),where:this.where})}};(0,n._)([(0,c.MZ)({type:Boolean,json:{write:!0}})],A.prototype,"ascending",void 0),(0,n._)([(0,p.w)("ascending",["ascending","sortAscending"])],A.prototype,"readAscending",null),(0,n._)([(0,c.MZ)({type:f.A,json:{name:"itemRenderingRule",write:!0}})],A.prototype,"itemRasterFunction",void 0),(0,n._)([(0,c.MZ)({type:f.A})],A.prototype,"itemRenderingRule",null),(0,n._)([(0,c.MZ)({type:[g.jz],json:{write:{overridePolicy(){return{enabled:"lock-raster"===this.method}}}}})],A.prototype,"lockRasterIds",void 0),(0,n._)([(0,c.MZ)({type:String,json:{type:I.jsonValues,write:{target:"mosaicMethod",writer:I.write}}})],A.prototype,"method",void 0),(0,n._)([(0,p.w)("method",["mosaicMethod","defaultMosaicMethod"])],A.prototype,"readMethod",null),(0,n._)([(0,c.MZ)({type:[M.A],json:{write:!0}})],A.prototype,"multidimensionalDefinition",void 0),(0,n._)([(0,h.K)("multidimensionalDefinition")],A.prototype,"writeMultidimensionalDefinition",null),(0,n._)([(0,c.MZ)({type:[g.jz],json:{name:"fids",write:!0}})],A.prototype,"objectIds",void 0),(0,n._)([(0,c.MZ)({json:{type:w.jsonValues,read:{reader:w.read},write:{target:"mosaicOperation",writer:w.write}}})],A.prototype,"operation",void 0),(0,n._)([(0,p.w)("operation",["mosaicOperation","mosaicOperator"])],A.prototype,"readOperation",null),(0,n._)([(0,c.MZ)({type:String,json:{write:{overridePolicy(){return{enabled:"attribute"===this.method}}}}})],A.prototype,"sortField",void 0),(0,n._)([(0,c.MZ)({type:[String,Number],json:{write:{allowNull:!0,overridePolicy(){return{enabled:"attribute"===this.method,allowNull:!0}}}}})],A.prototype,"sortValue",void 0),(0,n._)([(0,d.w)("sortValue")],A.prototype,"castSortValue",null),(0,n._)([(0,c.MZ)({type:y.A,json:{write:!0}})],A.prototype,"viewpoint",void 0),(0,n._)([(0,c.MZ)({type:String,json:{write:!0}})],A.prototype,"where",void 0),A=i=(0,n._)([(0,m.$)("esri.layers.support.MosaicRule")],A);const v=A},43577:(e,t,r)=>{r.d(t,{A:()=>h});var i,n=r(90237),o=(r(59456),r(25482)),s=r(10107),a=(r(44208),r(53966),r(87811),r(40608)),l=r(5443),u=r(39829),c=r(65864),d=r(45617);const p={base:r(91075).A,key:"type",typeMap:{extent:l.A,polygon:u.A}};let m=i=class extends o.oY{constructor(e){super(e),this.areaOfInterest=null,this.subsetDefinitions=null}get dimensions(){const{subsetDefinitions:e}=this;if(null==e||0===e.length)return[];const t=new Map;e.forEach((e=>{if(!e.dimensionName)return;let r,i;if(Array.isArray(e.values[0])){const t=e.values;r=t[0][0],i=t[e.values.length-1][1]}else{const t=e.values;r=t[0],i=t[e.values.length-1]}if(t.has(e.dimensionName)){const n=t.get(e.dimensionName);n[0]=Math.min(r,n[0]),n[1]=Math.max(i,n[1])}else t.set(e.dimensionName,[r,i])}));const r=[];for(const e of t)r.push({name:e[0],extent:e[1]});return r}get variables(){const{subsetDefinitions:e}=this;if(null==e||0===e.length)return[];const t=new Set;return e.forEach((e=>{e.variableName&&t.add(e.variableName)})),[...t]}clone(){const e=this.subsetDefinitions?.map((e=>e.clone())),t=this.areaOfInterest?this.areaOfInterest.clone():this.areaOfInterest;return new i({areaOfInterest:t,subsetDefinitions:e})}};(0,n._)([(0,s.MZ)({types:p,json:{read:c.rS,write:!0}})],m.prototype,"areaOfInterest",void 0),(0,n._)([(0,s.MZ)({readOnly:!0})],m.prototype,"dimensions",null),(0,n._)([(0,s.MZ)({readOnly:!0})],m.prototype,"variables",null),(0,n._)([(0,s.MZ)({type:[d.A],json:{write:!0}})],m.prototype,"subsetDefinitions",void 0),m=i=(0,n._)([(0,a.$)("esri.layers.support.MultidimensionalSubset")],m);const h=m},22796:(e,t,r)=>{r.d(t,{A:()=>L});var i=r(90237),n=r(25482),o=r(4718),s=r(10107),a=(r(44208),r(53966),r(93223)),l=r(36005),u=r(40608),c=r(43937),d=r(66552),p=r(56507),m=(r(87811),r(13868));let h=class extends n.oY{constructor(){super(...arguments),this.pixelType="unknown"}};(0,i._)([(0,s.MZ)({type:String,json:{write:!0}})],h.prototype,"name",void 0),(0,i._)([(0,s.MZ)({type:String,json:{write:!0}})],h.prototype,"description",void 0),(0,i._)([(0,s.MZ)({type:p.jz,json:{type:p.jz,write:!0,name:"_object_id"}})],h.prototype,"id",void 0),(0,i._)([(0,s.MZ)({type:String,json:{type:m.e8.jsonValues,read:m.e8.read,write:m.e8.write}})],h.prototype,"pixelType",void 0),(0,i._)([(0,s.MZ)({type:String,json:{write:!0}})],h.prototype,"type",void 0),h=(0,i._)([(0,u.$)("esri.layers.support.RasterFunctionInfo")],h);const g=h;let y=class extends n.oY{constructor(){super(...arguments),this.isDataset=!1,this.isPublic=!1,this.type="RasterFunctionVariable"}};(0,i._)([(0,s.MZ)({type:String,json:{write:!0}})],y.prototype,"name",void 0),(0,i._)([(0,s.MZ)({type:Number,json:{type:p.jz,write:!0,name:"_object_id"}})],y.prototype,"id",void 0),(0,i._)([(0,s.MZ)({type:Boolean,json:{write:!0}})],y.prototype,"isDataset",void 0),(0,i._)([(0,s.MZ)({type:Boolean,json:{write:!0}})],y.prototype,"isPublic",void 0),(0,i._)([(0,s.MZ)({json:{write:!0}})],y.prototype,"value",void 0),(0,i._)([(0,s.MZ)({type:String,json:{write:!0}})],y.prototype,"type",void 0),y=(0,i._)([(0,u.$)("esri.layers.support.RasterFunctionVariable")],y);const M={key:"type",base:null,typeMap:{RasterFunctionVariable:y}};let f=class extends n.oY{};(0,i._)([(0,s.MZ)({types:M,json:{types:M,name:"MatchVariable"}})],f.prototype,"matchVariable",void 0),(0,i._)([(0,s.MZ)({types:M,json:{types:M,name:"UnionDimension"}})],f.prototype,"unionDimension",void 0),(0,i._)([(0,s.MZ)({type:Number,json:{type:p.jz,write:!0,name:"_object_id"}})],f.prototype,"id",void 0),(0,i._)([(0,s.MZ)({type:String,json:{write:!0}})],f.prototype,"type",void 0),f=(0,i._)([(0,u.$)("esri.layers.support.RasterFunctionProperties")],f);const w=f,I=new d.J({0:"mosaic",1:"item",2:"item-group"},{useNumericKeys:!0});let A=class extends n.oY{constructor(){super(...arguments),this.functionType="mosaic",this.type="RasterFunctionTemplate"}};(0,i._)([(0,s.MZ)({type:[String],json:{write:!0}})],A.prototype,"aliases",void 0),(0,i._)([(0,s.MZ)({type:Object,json:{write:!0}})],A.prototype,"arguments",void 0),(0,i._)([(0,s.MZ)({type:String,json:{write:!0}})],A.prototype,"description",void 0),(0,i._)([(0,s.MZ)({type:g,json:{write:!0,name:"function"}})],A.prototype,"functionInfo",void 0),(0,i._)([(0,s.MZ)({type:I.apiValues,json:{type:[0,1,2],read:I.read,write:I.write}})],A.prototype,"functionType",void 0),(0,i._)([(0,s.MZ)({type:String,json:{write:!0}})],A.prototype,"group",void 0),(0,i._)([(0,s.MZ)({type:String,json:{write:!0}})],A.prototype,"help",void 0),(0,i._)([(0,s.MZ)({type:Number,json:{type:p.jz,write:!0,name:"_object_id"}})],A.prototype,"id",void 0),(0,i._)([(0,s.MZ)({type:String,json:{write:!0}})],A.prototype,"name",void 0),(0,i._)([(0,s.MZ)({type:String,json:{write:!0,name:"definition"}})],A.prototype,"queryDefinition",void 0),(0,i._)([(0,s.MZ)({type:String,json:{write:!0}})],A.prototype,"tag",void 0),(0,i._)([(0,s.MZ)({type:w,json:{write:!0}})],A.prototype,"properties",void 0),(0,i._)([(0,s.MZ)({type:String,json:{write:!0}})],A.prototype,"thumbnail",void 0),(0,i._)([(0,s.MZ)({type:String,json:{write:!0}})],A.prototype,"thumbnailEx",void 0),(0,i._)([(0,s.MZ)({json:{type:["RasterFunctionTemplate"],write:!0}})],A.prototype,"type",void 0),A=(0,i._)([(0,u.$)("esri.layers.support.RasterFunctionTemplate")],A);const v=A;var b;const D=new Set(["raster","raster2","dem","fillraster"]),T=new Set(["rasters"]),S=e=>e?.rasterFunction?x.fromJSON(e):e,N=e=>e&&e instanceof x?e.toJSON():e,j=e=>e?.functionName&&!e.declaredClass,_=e=>j(e)?new x(e):e,C={types:{key:"type",base:null,typeMap:{RasterFunctionTemplate:v}},json:{write:!0,name:"rasterFunctionDefinition"}};let x=b=class extends n.oY{constructor(e){super(e),this.functionName=null,this.outputPixelType="unknown",this.variableName=null,this.functionDefinition=null}set functionArguments(e){if(e){const t=Object.keys(e);if(t.some((t=>D.has(t.toLowerCase())&&j(e[t])))||t.some((t=>T.has(t.toLowerCase())&&Array.isArray(e[t])&&e[t].some((e=>j(e)))))){e=(0,o.o8)(e);for(const r of t)D.has(r.toLowerCase())?e[r]=_(e[r]):T.has(r.toLowerCase())&&Array.isArray(e[r])&&(e[r]=e[r].map((e=>_(e))))}}this._set("functionArguments",e)}readFunctionArguments(e){return(e=>{if(null==e)return null;e=(0,o.o8)(e);const t={};for(const r of Object.keys(e))D.has(r.toLowerCase())?t[r]=S(e[r]):T.has(r.toLowerCase())&&Array.isArray(e[r])?t[r]=e[r].map(S):t[r]=e[r];return t})(e)}writeFunctionArguments(e,t,r){const i={};for(const t of Object.keys(e))D.has(t.toLowerCase())?i[t]=N(e[t]):T.has(t.toLowerCase())&&Array.isArray(e[t])?i[t]=e[t].map(N):i[t]=N(e[t]);t[r]=i}readFunctionName(e,t){const r=t.rasterFunctionInfos;return t.name||(r?.length&&"None"!==r[0].name?r[0].name:t.rasterFunctionDefinition?t.rasterFunctionDefinition.name:t.rasterFunction)}get rasterFunctionDefinition(){return this.functionDefinition?.toJSON()}set rasterFunctionDefinition(e){this.functionDefinition=e?v.fromJSON(e):null}get hasClipFunction(){return this.rasterFunctionDefinition?JSON.stringify(this.rasterFunctionDefinition).includes('"type":"ClipFunction"'):JSON.stringify(this).includes('"rasterFunction":"Clip"')}clone(){return new b({functionName:this.functionName,functionArguments:(0,o.o8)(this.functionArguments),outputPixelType:this.outputPixelType,variableName:this.variableName,rasterFunctionDefinition:(0,o.o8)(this.rasterFunctionDefinition)})}};(0,i._)([(0,s.MZ)({json:{type:Object,name:"rasterFunctionArguments"}})],x.prototype,"functionArguments",null),(0,i._)([(0,l.w)("functionArguments")],x.prototype,"readFunctionArguments",null),(0,i._)([(0,c.K)("functionArguments")],x.prototype,"writeFunctionArguments",null),(0,i._)([(0,s.MZ)({json:{type:String,write:{target:"rasterFunction"}}})],x.prototype,"functionName",void 0),(0,i._)([(0,l.w)("functionName",["rasterFunction","rasterFunctionInfos","rasterFunctionDefinition"])],x.prototype,"readFunctionName",null),(0,i._)([(0,a.e)({C128:"c128",C64:"c64",F32:"f32",F64:"f64",S16:"s16",S32:"s32",S8:"s8",U1:"u1",U16:"u16",U2:"u2",U32:"u32",U4:"u4",U8:"u8",UNKNOWN:"unknown"},{ignoreUnknown:!1}),(0,s.MZ)({json:{default:"unknown"}})],x.prototype,"outputPixelType",void 0),(0,i._)([(0,s.MZ)({type:String,json:{read:!0,write:!0}})],x.prototype,"variableName",void 0),(0,i._)([(0,s.MZ)()],x.prototype,"rasterFunctionDefinition",null),(0,i._)([(0,s.MZ)(C)],x.prototype,"functionDefinition",void 0),(0,i._)([(0,s.MZ)()],x.prototype,"hasClipFunction",null),x=b=(0,i._)([(0,u.$)("esri.layers.support.RasterFunction")],x);const L=x},69409:(e,t,r)=>{r.d(t,{A:()=>s});var i=r(49186),n=r(29953),o=r(14140);class s{constructor(){this._workerThread=null,this._destroyed=!1}async initialize(){const e=await(0,n.ho)("RasterWorker");this._destroyed?e.close():this._workerThread=e}destroy(){this._destroyed=!0,this._workerThread&&(this._workerThread.close(),this._workerThread=null)}async convertVectorFieldData(e,t){if(!this._workerThread)throw new i.A("raster-jobhandler:no-connection","no available worker connection");const r=await this._workerThread.invoke("convertVectorFieldData",{pixelBlock:e.pixelBlock.toJSON(),type:e.dataType},t);return r?new o.A(r):null}computeStatisticsHistograms(e,t){if(!this._workerThread)throw new i.A("raster-jobhandler:no-connection","no available worker connection");return this._workerThread.invoke("computeStatisticsHistograms",{pixelBlock:e.pixelBlock.toJSON()},t)}async decode(e,t){if(!this._workerThread)throw new i.A("raster-jobhandler:no-connection","no available worker connection");const r=await this._workerThread.invoke("decode",e,t);return r?new o.A(r):null}async symbolize(e,t){if(!this._workerThread)throw new i.A("raster-jobhandler:no-connection","no available worker connection");const r={extent:e.extent?.toJSON(),pixelBlock:e.pixelBlock?.toJSON(),simpleStretchParams:e.simpleStretchParams,bandIds:e.bandIds},n=await this._workerThread.invoke("symbolize",r,t);return n?new o.A(n):null}async updateSymbolizer(e,t){if(!this._workerThread)throw new i.A("raster-jobhandler:no-connection","no available worker connection");const r=e?.rendererJSON?.histograms;await Promise.all(this._workerThread.broadcast("updateSymbolizer",{symbolizerJSON:e.toJSON(),histograms:r},t))}async updateRasterFunction(e,t){if(!this._workerThread)throw new i.A("raster-jobhandler:no-connection","no available worker connection");await Promise.all(this._workerThread.broadcast("updateRasterFunction",{rasterFunctionJSON:e.toJSON()},t))}async process(e,t){if(!this._workerThread)throw new i.A("raster-jobhandler:no-connection","no available worker connection");const r=await this._workerThread.invoke("process",{extent:e.extent?.toJSON(),primaryPixelSizes:e.primaryPixelSizes?.map((e=>null!=e?e.toJSON():null)),primaryPixelBlocks:e.primaryPixelBlocks.map((e=>null!=e?e.toJSON():null)),primaryRasterIds:e.primaryRasterIds},t);return r?new o.A(r):null}async stretch(e,t){if(!this._workerThread)throw new i.A("raster-jobhandler:no-connection","no available worker connection");if(!e?.pixelBlock)return null;const r={srcPixelBlock:e.pixelBlock.toJSON(),stretchParams:e.stretchParams},n=await this._workerThread.invoke("stretch",r,t);return n?new o.A(n):null}async split(e,t){if(!this._workerThread)throw new i.A("raster-jobhandler:no-connection","no available worker connection");if(!e?.pixelBlock)return null;const r={srcPixelBlock:e.pixelBlock.toJSON(),tileSize:e.tileSize,maximumPyramidLevel:e.maximumPyramidLevel,useBilinear:e.useBilinear},n=await this._workerThread.invoke("split",r,t);return n&&n.forEach(((e,t)=>{n.set(t,e?o.A.fromJSON(e):null)})),n}async clipTile(e,t){if(!this._workerThread)throw new i.A("raster-jobhandler:no-connection","no available worker connection");if(!e?.pixelBlock)return null;const r={...e,pixelBlock:e.pixelBlock.toJSON()},n=await this._workerThread.invoke("clipTile",r,t);return n?o.A.fromJSON(n):null}async estimateStatisticsHistograms(e,t){if(!this._workerThread)throw new i.A("raster-jobhandler:no-connection","no available worker connection");if(!e?.pixelBlock)return null;const r={srcPixelBlock:e.pixelBlock.toJSON()};return await this._workerThread.invoke("estimateStatisticsHistograms",r,t)}async mosaicAndTransform(e,t){if(!this._workerThread)throw new i.A("raster-jobhandler:no-connection","no available worker connection");if(!e?.srcPixelBlocks?.length)return{pixelBlock:null};const r={...e,srcPixelBlocks:e.srcPixelBlocks.map((e=>null!=e?e.toJSON():null))},n=await this._workerThread.invoke("mosaicAndTransform",r,t);return{pixelBlock:n.pixelBlock?new o.A(n.pixelBlock):null,localNorthDirections:n.localNorthDirections}}async createFlowMesh(e,t){if(!this._workerThread)throw new i.A("raster-jobhandler:no-connection","no available worker connection");const r={buffer:e.flowData.data.buffer,maskBuffer:e.flowData.mask.buffer,width:e.flowData.width,height:e.flowData.height},{meshType:n,simulationSettings:o}=e,s=await this._workerThread.invoke("createFlowMesh",{meshType:n,flowData:r,simulationSettings:o},{...t,transferList:[r.buffer,r.maskBuffer]});return{vertexData:new Float32Array(s.vertexBuffer),indexData:new Uint32Array(s.indexBuffer)}}getProjectionOffsetGrid(e,t){if(!this._workerThread)throw new i.A("raster-jobhandler:no-connection","no available worker connection");const r=null!=e.datumTransformation?e.datumTransformation.steps.map((e=>({wkid:e.wkid,wkt:e.wkt,isInverse:e.isInverse}))):null,n=null!=e.rasterTransform?e.rasterTransform.toJSON():null,o={projectedExtent:e.projectedExtent.toJSON(),srcBufferExtent:e.srcBufferExtent.toJSON(),pixelSize:e.pixelSize,hasWrapAround:e.hasWrapAround,spacing:e.spacing,datumTransformationSteps:r,rasterTransform:n,isAdaptive:e.isAdaptive,includeGCSGrid:e.includeGCSGrid};return this._workerThread.invoke("getProjectionOffsetGrid",o,t)}}},96184:(e,t,r)=>{r.d(t,{A:()=>g});var i=r(90237),n=r(60945),o=r(70668),s=r(69540),a=r(25482),l=r(10107),u=(r(44208),r(53966),r(87811),r(36005)),c=r(40608),d=r(43937),p=r(56400);function m(e,t){return o.A.fromJSON({value:e,unit:t})}let h=class extends((0,s.O)(a.oY)){constructor(e){super(e),this.cumulative=!1,this.endField=null,this.fullTimeExtent=null,this.hasLiveData=!1,this.interval=null,this.startField=null,this.timeZone=null,this.trackIdField=null,this.useTime=!0}readFullTimeExtent(e,t){if(!t.timeExtent||!Array.isArray(t.timeExtent)||2!==t.timeExtent.length)return null;const r=new Date(t.timeExtent[0]),i=new Date(t.timeExtent[1]);return new n.A({start:r,end:i})}writeFullTimeExtent(e,t){null!=e?.start&&null!=e.end?t.timeExtent=[e.start.getTime(),e.end.getTime()]:t.timeExtent=null}readInterval(e,t){return t.timeInterval&&t.timeIntervalUnits?m(t.timeInterval,t.timeIntervalUnits):t.defaultTimeInterval&&t.defaultTimeIntervalUnits?m(t.defaultTimeInterval,t.defaultTimeIntervalUnits):null}writeInterval(e,t){t.timeInterval=e?.toJSON().value??null,t.timeIntervalUnits=e?.toJSON().unit??null}};(0,i._)([(0,l.MZ)({type:Boolean,json:{name:"exportOptions.timeDataCumulative",write:!0}})],h.prototype,"cumulative",void 0),(0,i._)([(0,l.MZ)({type:String,json:{name:"endTimeField",write:{enabled:!0,allowNull:!0}}})],h.prototype,"endField",void 0),(0,i._)([(0,l.MZ)({type:n.A,json:{write:{enabled:!0,allowNull:!0}}})],h.prototype,"fullTimeExtent",void 0),(0,i._)([(0,u.w)("fullTimeExtent",["timeExtent"])],h.prototype,"readFullTimeExtent",null),(0,i._)([(0,d.K)("fullTimeExtent")],h.prototype,"writeFullTimeExtent",null),(0,i._)([(0,l.MZ)({type:Boolean,json:{write:!0}})],h.prototype,"hasLiveData",void 0),(0,i._)([(0,l.MZ)({type:o.A,json:{write:{enabled:!0,allowNull:!0}}})],h.prototype,"interval",void 0),(0,i._)([(0,u.w)("interval",["timeInterval","timeIntervalUnits","defaultTimeInterval","defaultTimeIntervalUnits"])],h.prototype,"readInterval",null),(0,i._)([(0,d.K)("interval")],h.prototype,"writeInterval",null),(0,i._)([(0,l.MZ)({type:String,json:{name:"startTimeField",write:{enabled:!0,allowNull:!0}}})],h.prototype,"startField",void 0),(0,i._)([(0,l.MZ)((0,p.P6)("timeReference",!0))],h.prototype,"timeZone",void 0),(0,i._)([(0,l.MZ)({type:String,json:{write:{enabled:!0,allowNull:!0}}})],h.prototype,"trackIdField",void 0),(0,i._)([(0,l.MZ)({type:Boolean,json:{name:"exportOptions.useTime",write:!0}})],h.prototype,"useTime",void 0),h=(0,i._)([(0,c.$)("esri.layers.support.TimeInfo")],h);const g=h},72088:(e,t,r)=>{r.d(t,{rS:()=>D,gK:()=>b}),r(44208);var i,n=r(90237),o=r(4718),s=r(10107),a=(r(53966),r(93223)),l=r(40608),u=r(25482);r(87811);let c=i=class extends u.oY{constructor(e){super(e),this.name=null,this.code=null}clone(){return new i({name:this.name,code:this.code})}};(0,n._)([(0,s.MZ)({type:String,json:{write:!0}})],c.prototype,"name",void 0),(0,n._)([(0,s.MZ)({type:[String,Number],json:{write:!0}})],c.prototype,"code",void 0),c=i=(0,n._)([(0,l.$)("esri.layers.support.CodedValue")],c);const d=new(r(66552).J)({inherited:"inherited",codedValue:"coded-value",range:"range"});let p=class extends u.oY{constructor(e){super(e),this.name=null,this.type=null}};(0,n._)([(0,s.MZ)({type:String,json:{write:!0}})],p.prototype,"name",void 0),(0,n._)([(0,a.e)(d)],p.prototype,"type",void 0),p=(0,n._)([(0,l.$)("esri.layers.support.Domain")],p);const m=p;var h;let g=h=class extends m{constructor(e){super(e),this.codedValues=null,this.type="coded-value"}getName(e){let t=null;if(this.codedValues){const r=String(e);this.codedValues.some((e=>(String(e.code)===r&&(t=e.name),!!t)))}return t}clone(){return new h({codedValues:(0,o.o8)(this.codedValues),name:this.name})}};(0,n._)([(0,s.MZ)({type:[c],json:{write:!0}})],g.prototype,"codedValues",void 0),(0,n._)([(0,a.e)({codedValue:"coded-value"})],g.prototype,"type",void 0),g=h=(0,n._)([(0,l.$)("esri.layers.support.CodedValueDomain")],g);const y=g;var M;r(49186);let f=M=class extends m{constructor(e){super(e),this.type="inherited"}clone(){return new M}};(0,n._)([(0,a.e)({inherited:"inherited"})],f.prototype,"type",void 0),f=M=(0,n._)([(0,l.$)("esri.layers.support.InheritedDomain")],f);const w=f;var I;let A=I=class extends m{constructor(e){super(e),this.maxValue=null,this.minValue=null,this.type="range"}clone(){return new I({maxValue:this.maxValue,minValue:this.minValue,name:this.name})}};(0,n._)([(0,s.MZ)({json:{type:[Number],read:{source:"range",reader:(e,t)=>t.range?.[1]},write:{enabled:!1,overridePolicy(){return{enabled:null!=this.maxValue&&null==this.minValue}},target:"range",writer(e,t,r){t[r]=[this.minValue||0,e]}}}})],A.prototype,"maxValue",void 0),(0,n._)([(0,s.MZ)({json:{type:[Number],read:{source:"range",reader:(e,t)=>t.range?.[0]},write:{target:"range",writer(e,t,r){t[r]=[e,this.maxValue||0]}}}})],A.prototype,"minValue",void 0),(0,n._)([(0,a.e)({range:"range"})],A.prototype,"type",void 0),A=I=(0,n._)([(0,l.$)("esri.layers.support.RangeDomain")],A);const v=A,b={key:"type",base:m,typeMap:{range:A,"coded-value":y,inherited:w}};function D(e){if(!e?.type)return null;switch(e.type){case"range":return v.fromJSON(e);case"codedValue":return y.fromJSON(e);case"inherited":return w.fromJSON(e)}return null}},98453:(e,t,r)=>{r.d(t,{m:()=>i});const i=new(r(66552).J)({esriFieldTypeSmallInteger:"small-integer",esriFieldTypeInteger:"integer",esriFieldTypeSingle:"single",esriFieldTypeDouble:"double",esriFieldTypeLong:"long",esriFieldTypeString:"string",esriFieldTypeDate:"date",esriFieldTypeOID:"oid",esriFieldTypeGeometry:"geometry",esriFieldTypeBlob:"blob",esriFieldTypeRaster:"raster",esriFieldTypeGUID:"guid",esriFieldTypeGlobalID:"global-id",esriFieldTypeXML:"xml",esriFieldTypeBigInteger:"big-integer",esriFieldTypeDateOnly:"date-only",esriFieldTypeTimeOnly:"time-only",esriFieldTypeTimestampOffset:"timestamp-offset"})},77301:(e,t,r)=>{r.d(t,{DY:()=>y,NG:()=>I,QW:()=>s,Rp:()=>m,ct:()=>h,fy:()=>g,sx:()=>p,xx:()=>a,z2:()=>M});var i=r(4576),n=r(45617);function o(e,t,r){const i=t.shift();if(0===r.length){const e=[];r.push({sliceId:-1,multidimensionalDefinition:e})}const n=r.length;for(let t=0;t<n;t++){const t=r.shift().multidimensionalDefinition;i.values?.forEach((n=>{r.push({sliceId:-1,multidimensionalDefinition:[...t,{variableName:e,dimensionName:i.name,values:[n]}]})}))}t.length&&o(e,t,r)}function s(e,t){const r=[];let i=0;return(t?e.variables.filter((e=>e.name.toLowerCase()===t.toLowerCase())):[...e.variables].sort(((e,t)=>e.name>t.name?1:-1))).forEach((e=>{const t=[],n=[...e.dimensions].sort(((e,t)=>e.name>t.name?-1:1));o(e.name,n,t),t.forEach((e=>{r.push({...e,sliceId:i++})}))})),r}function a(e,t,r){let i=e;if(t&&(t=[...t].sort(((e,t)=>e.dimensionName<t.dimensionName?-1:1))).forEach((({dimensionName:e,values:t,isSlice:r})=>{t.length&&(i=i.filter((i=>{const n=i.multidimensionalDefinition.find((t=>t.dimensionName===e));if(null==n)return!1;const o=n.values[0];return"number"==typeof o?"number"==typeof t[0]?t.includes(o):t.some((e=>e[0]<=o&&e[1]>=o)):"number"==typeof t[0]?t.some((e=>o[0]<=e&&o[1]>=e)):r?t.some((e=>e[0]===o[0]&&e[0]===o[1])):t.some((e=>e[0]>=o[0]&&e[0]<=o[1]||e[1]>=o[0]&&e[1]<=o[1]||e[0]<o[0]&&e[1]>o[1]))})))})),i.length&&null!=r?.start&&null!=r.end){const e=r.start.getTime(),t=r.end.getTime(),n=i[0].multidimensionalDefinition.findIndex((e=>"StdTime"===e.dimensionName));n>-1&&(i=i.filter((r=>{const i=r.multidimensionalDefinition[n].values[0];return e<=i&&t>=i})))}return i.map((e=>e.sliceId))}function l(e,t){return Array.isArray(e)?t[0]===t[1]?e[0]===t[0]||e[1]===t[0]:e[0]>=t[0]&&e[0]<=t[1]&&e[1]>=t[0]&&e[1]<=t[1]:e>=t[0]&&e<=t[1]}function u(e,t){return e[0]<=t[0]&&e[1]>=t[0]||e[0]<=t[1]&&e[1]>=t[1]||e[0]>=t[0]&&e[1]<=t[1]}function c(e){return 1===e.length?[e[0],e[0]]:[e[0],e[e.length-1]]}function d(e,t,r){if(!t?.subsetDefinitions?.length)return e;let i;if(r){const{variables:n}=t;if(n.length&&!n.includes(r))return null;const o=t.subsetDefinitions.find((t=>t.dimensionName===e.name&&t.variableName===r));if(!o?.values?.length)return e;i=c(o.values)}else{const r=t.dimensions.find((({name:t})=>t===e.name));i=r?.extent}const n=i;if(!n?.length)return e;const o=e.values.filter((e=>l(e,n)));return{...e,extent:[...n],values:o}}function p(e,t,r){if(!t?.subsetDefinitions?.length)return!1;const{variables:i}=t;if(i.length&&e.some((({variableName:e})=>e&&!i.includes(e))))return!0;for(let i=0;i<e.length;i++){const n=e[i],o=t.subsetDefinitions.find((e=>(""===n.variableName||e.variableName===n.variableName)&&e.dimensionName===n.dimensionName));if(o?.values.length){const e=c(o.values);if(n.isSlice||2!==n.values.length||Array.isArray(n.values[0])||n.values[0]===n.values[1]||!r){if(n.values.some((t=>!l(t,e))))return!0}else if(!u(n.values,e))return!0}}return!1}function m(e,t){if(null==e)return{isOutside:!1};const{geometry:r,timeExtent:i,multidimensionalDefinition:o}=t;let s=null;if(null!=i&&(s=function(e,t){const r=e.dimensions.find((({name:e})=>"StdTime"===e));if(null==r||null==t.start&&null==t.end)return t;t=t.clone();const{start:i,end:o}=t.toJSON(),s=i===o?[i]:null!=i&&null!=o?[i,o]:[i??o];return 2===s.length&&r?.extent.length&&(s[0]=Math.max(s[0],r.extent[0]),s[1]=Math.min(s[1],r.extent[1]??r.extent[0]),s[1]<s[0])||p([new n.A({variableName:"",dimensionName:"StdTime",isSlice:1===s.length,values:s})],e,!0)?null:(t.start=new Date(s[0]),t.end=new Date(s[1]??s[0]),t)}(e,i),null==s))return{isOutside:!0};const{areaOfInterest:a}=e;if(a&&r){const e="point"===r.type?r:"extent"===r.type?r.center:"polygon"===r.type?r.centroid:null;if(e&&!a.contains(e))return{isOutside:!0}}return null!=o&&o.length&&p(o,e,!0)?{isOutside:!0}:{isOutside:!1,intersection:{geometry:r,timeExtent:s,multidimensionalDefinition:o}}}function h(e,t={}){const{multidimensionalInfo:r,keyProperties:i}=e;if(null==r)return null;const{variableName:n,multidimensionalSubset:o,multidimensionalDefinition:s}=t,a=null!=s?s[0]?.variableName:null,l=n||a||i?.DefaultVariable;let{variables:u}=r;return o?.variables?.length&&(u=u.filter((({name:e})=>o.variables.includes(e)))),l?u.find((({name:e})=>e===l))??u[0]:u[0]}function g(e,t={}){const r=h(e,t);if(!r)return null;const i=[],{dimensions:o,name:s}=r;if(0===o.length)return[new n.A({variableName:s,dimensionName:"",values:[],isSlice:!0})];for(let e=0;e<o.length;e++){const r=d(o[e],t.multidimensionalSubset,s);if(!r)return null;const{values:a,extent:l}=r;let u=a?.[0]??l[0];"stdz"===r.name.toLowerCase()&&!r.hasRanges&&Math.abs(l[1])<=Math.abs(l[0])&&(u=a?.length?a[a.length-1]:l[1]),i.push(new n.A({variableName:s,dimensionName:r.name,values:[u],isSlice:!t.useRangeForRangedDimensionInfo||!!r.hasRanges}))}return i}function y(e){return!!e?.length&&e.some((e=>{if(null==e.values)return!0;const t=e.values.length;return 0===t||t>1||!e.isSlice&&Array.isArray(e.values[0])}))}function M(e,t){if(null==t||null==e)return null;let r=t.variables.map((e=>({...e})));return e?.variables?.length&&(r=r.filter((({name:t})=>e.variables.includes(t))),r.forEach((t=>{t.dimensions=t.dimensions.map((r=>d(r,e,t.name))).filter(i.Ru)}))),r}function f(e,t){const{values:r}=t;if(r?.length){const t=Array.isArray(r[0]),i=Array.isArray(e);return t!==i?-1:t&&i?r.findIndex((t=>t[0]===e[0]&&t[1]===e[1])):r.indexOf(e)}const{extent:i}=t;if(Array.isArray(e)||e<i[0]||e>i[1])return-1;const n=t.interval||1;if("ISO8601"!==t.unit)return Math.round((e-i[0])/n);const o=i[0];let s=-1;switch(t.intervalUnit?.toLowerCase()||"seconds"){case"seconds":s=Math.round((e-o)/1e3/n);break;case"minutes":s=Math.round((e-o)/6e4/n);break;case"hours":s=Math.round((e-o)/36e5/n);break;case"days":s=Math.round((e-o)/864e5/n);break;case"months":{const t=new Date(e).getUTCFullYear()-new Date(o).getUTCFullYear(),r=new Date(o).getUTCMonth(),i=new Date(e).getUTCMonth();s=0===t?i-r:i+11-r+12*(t-1)}break;case"years":s=Math.round((new Date(e).getUTCFullYear()-new Date(o).getUTCFullYear())/n);break;case"decades":s=Math.round((new Date(e).getUTCFullYear()-new Date(o).getUTCFullYear())/10/n)}return s}function w(e){let t=e.values?.length;if(t)return t;const{extent:r,unit:i}=e,n=e.interval||1,o=r?r[1]-r[0]:0;if("ISO8601"!==i)return Math.round(o/n);switch(e.intervalUnit?.toLowerCase()??"seconds"){case"seconds":t=Math.round(o/1e3/n);break;case"minutes":t=Math.round(o/6e4/n);break;case"hours":t=Math.round(o/36e5/n);break;case"days":t=Math.round(o/864e5/n);break;case"months":{const e=new Date(r[1]).getUTCFullYear()-new Date(r[0]).getUTCFullYear(),i=new Date(r[0]).getUTCMonth(),n=new Date(r[1]).getUTCMonth();t=0===e?n-i+1:n+11-i+12*(e-1)+1}break;case"years":t=Math.round((new Date(r[1]).getUTCFullYear()-new Date(r[0]).getUTCFullYear())/n);break;case"decades":t=Math.round((new Date(r[1]).getUTCFullYear()-new Date(r[0]).getUTCFullYear())/10/n);break;default:t=0}return t}function I(e,t){let r=0;const i=e[0].variableName,n=[...t.variables].sort(((e,t)=>e.name>t.name?1:-1));for(let t=0;t<n.length;t++){const o=n[t],s=[...o.dimensions].sort(((e,t)=>e.name>t.name?-1:1));if(o.name!==i){r+=s.map((e=>w(e))).reduce(((e,t)=>e*t));continue}const a=s.map((e=>w(e))),l=s.length;for(let t=0;t<l;t++){const i=e.find((e=>e.dimensionName===s[t].name));if(null==i)return null;const n=f(i.values[0],s[t]);if(-1===n)return null;a.shift(),r+=t===l-1?n:n*a.reduce(((e,t)=>e*t))}break}return r}},13868:(e,t,r)=>{r.d(t,{SZ:()=>n,e8:()=>s,hm:()=>o});var i=r(66552);const n=(0,i.O)()({RSP_NearestNeighbor:"nearest",RSP_BilinearInterpolation:"bilinear",RSP_CubicConvolution:"cubic",RSP_Majority:"majority"}),o=(0,i.O)()({esriNoDataMatchAny:"any",esriNoDataMatchAll:"all"}),s=(0,i.O)()({U1:"u1",U2:"u2",U4:"u4",U8:"u8",S8:"s8",U16:"u16",S16:"s16",U32:"u32",S32:"s32",F32:"f32",F64:"f64",C64:"c64",C128:"c128",UNKNOWN:"unknown"})},73133:(e,t,r)=>{r.d(t,{j:()=>i});const i=(0,r(66552).O)()({esriTimeUnitsMilliseconds:"milliseconds",esriTimeUnitsSeconds:"seconds",esriTimeUnitsMinutes:"minutes",esriTimeUnitsHours:"hours",esriTimeUnitsDays:"days",esriTimeUnitsWeeks:"weeks",esriTimeUnitsMonths:"months",esriTimeUnitsYears:"years",esriTimeUnitsDecades:"decades",esriTimeUnitsCenturies:"centuries",esriTimeUnitsUnknown:void 0})},68729:(e,t,r)=>{r.d(t,{Gj:()=>p,LF:()=>h,uy:()=>d});var i=r(67076),n=r(86162),o=r(67730),s=r(80498),a=r(46981),l=r(36280),u=r(93618),c=r(89968);const d={key:"type",base:null,typeMap:{"unique-value":u.A,"class-breaks":n.A,"raster-colormap":s.A,"raster-stretch":l.A,"vector-field":c.A,"raster-shaded-relief":a.A,flow:o.A}},p={...d,typeMap:{...d.typeMap}};delete p.typeMap["vector-field"],delete p.typeMap.flow;const m={uniqueValue:u.A,classBreaks:n.A,rasterStretch:l.A,rasterColormap:s.A,vectorField:c.A,rasterShadedRelief:a.A,flowRenderer:o.A};function h(e,t){if(!e)return null;if("classBreaks"===e.type&&e.classificationMethod){const t=e.authoringInfo||{classificationMethod:""};t.classificationMethod=e.classificationMethod,e.authoringInfo=t}"vectorField"===e.type&&e.visualVariables&&!Array.isArray(e.visualVariables)&&(e.visualVariables=[e.visualVariables]);const r=(n=e)&&m[n.type]||null;var n;if(r){const i=new r;return i.read(e,t),i}return t?.messages&&e&&t.messages.push(new i.A("renderer:unsupported","Renderers of type '"+(e.type||"unknown")+"' are not supported",{definition:e,context:t})),null}},67730:(e,t,r)=>{r.d(t,{A:()=>M});var i,n=r(90237),o=r(68197),s=r(66552),a=r(25482),l=r(90629),u=r(10107),c=(r(44208),r(53966),r(87811),r(93223)),d=r(40608),p=r(17719),m=r(30943),h=r(86768);const g=new s.J({flow_from:"flow-from",flow_to:"flow-to"});let y=i=class extends((0,p.h)(a.oY)){constructor(e){super(e),this.density=.8,this.color=new o.A([255,255,255,1]),this.maxPathLength=200,this.trailWidth=1.5,this.flowSpeed=10,this.trailLength=100,this.smoothing=0,this.flowRepresentation="flow-from",this.type="flow",this.authoringInfo=null,this.legendOptions=null,this.trailCap="butt",this.background="none"}clone(){const{density:e,maxPathLength:t,trailWidth:r,flowSpeed:n,trailLength:o,smoothing:s,flowRepresentation:a,trailCap:l,background:u}=this,c=this.color.clone(),d=(this.visualVariables||[]).map((e=>e.clone())),p=this.authoringInfo?.clone(),m=this.legendOptions?.clone();return new i({density:e,color:c,maxPathLength:t,trailWidth:r,flowSpeed:n,trailLength:o,trailCap:l,background:u,smoothing:s,flowRepresentation:a,visualVariables:d,authoringInfo:p,legendOptions:m})}getSymbol(e,t){}async getSymbolAsync(e,t){}getSymbols(){return[]}};(0,n._)([(0,u.MZ)({type:Number,json:{write:!0}})],y.prototype,"density",void 0),(0,n._)([(0,u.MZ)({type:o.A,json:{write:{allowNull:!0}}})],y.prototype,"color",void 0),(0,n._)([(0,u.MZ)({type:Number,cast:l.cr,json:{write:!0}})],y.prototype,"maxPathLength",void 0),(0,n._)([(0,u.MZ)({type:Number,cast:l.cr,json:{write:!0}})],y.prototype,"trailWidth",void 0),(0,n._)([(0,u.MZ)({type:Number,json:{write:!0}})],y.prototype,"flowSpeed",void 0),(0,n._)([(0,u.MZ)({type:Number,json:{write:!0}})],y.prototype,"trailLength",void 0),(0,n._)([(0,u.MZ)({type:Number,cast:l.cr,json:{write:!1}})],y.prototype,"smoothing",void 0),(0,n._)([(0,u.MZ)({type:g.apiValues,json:{type:g.jsonValues,read:{reader:g.read},write:{writer:g.write}}})],y.prototype,"flowRepresentation",void 0),(0,n._)([(0,c.e)({flowRenderer:"flow"})],y.prototype,"type",void 0),(0,n._)([(0,u.MZ)({type:m.A,json:{write:!0}})],y.prototype,"authoringInfo",void 0),(0,n._)([(0,u.MZ)({type:h.q,json:{write:!0}})],y.prototype,"legendOptions",void 0),(0,n._)([(0,u.MZ)({type:String,json:{write:!0}})],y.prototype,"trailCap",void 0),(0,n._)([(0,u.MZ)({type:String,json:{write:!0}})],y.prototype,"background",void 0),y=i=(0,n._)([(0,d.$)("esri.renderers.FlowRenderer")],y);const M=y},80498:(e,t,r)=>{r.d(t,{A:()=>g});var i=r(90237),n=r(25482),o=r(10107),s=(r(44208),r(53966),r(87811),r(93223)),a=r(40608),l=r(68197),u=r(56507);let c=class extends n.oY{constructor(){super(...arguments),this.value=null,this.label=null,this.color=null}};(0,i._)([(0,o.MZ)({type:Number,json:{write:!0}})],c.prototype,"value",void 0),(0,i._)([(0,o.MZ)({type:String,json:{write:!0}})],c.prototype,"label",void 0),(0,i._)([(0,o.MZ)({type:l.A,json:{type:[u.jz],write:!0}})],c.prototype,"color",void 0),c=(0,i._)([(0,a.$)("esri.renderers.support.ColormapInfo")],c);const d=c;var p,m=r(67369);let h=p=class extends n.oY{constructor(e){super(e),this.colormapInfos=null,this.type="raster-colormap"}static createFromColormap(e,t){if(!e)return null;const r=5===e[0].length,i=[...e].sort(((e,t)=>e[0]-t[0])).map((e=>d.fromJSON({value:e[0],color:r?e.slice(1,5):e.slice(1,4).concat([255]),label:t?t[e[0]]??"":e[0]})));return new p({colormapInfos:i})}static createFromColorramp(e){const t=(0,m.R8)(e);return p.createFromColormap(t)}clone(){return new p({colormapInfos:this.colormapInfos.map((e=>e.toJSON()))})}extractColormap(){return this.colormapInfos.map((({value:e,color:t})=>[e,t.r,t.g,t.b,t.a>1?t.a:255*t.a&255])).sort(((e,t)=>e[0]-t[0]))}};(0,i._)([(0,o.MZ)({type:[d],json:{write:!0}})],h.prototype,"colormapInfos",void 0),(0,i._)([(0,s.e)({rasterColormap:"raster-colormap"})],h.prototype,"type",void 0),h=p=(0,i._)([(0,a.$)("esri.renderers.RasterColormapRenderer")],h);const g=h},46981:(e,t,r)=>{r.d(t,{A:()=>m});var i,n=r(90237),o=r(25482),s=r(4718),a=r(10107),l=(r(44208),r(53966),r(93223)),u=r(36005),c=r(40608),d=r(95349);let p=i=class extends o.oY{constructor(e){super(e),this.altitude=45,this.azimuth=315,this.colorRamp=null,this.hillshadeType="traditional",this.pixelSizePower=.664,this.pixelSizeFactor=.024,this.scalingType="none",this.type="raster-shaded-relief",this.zFactor=1}readColorRamp(e){return(0,d.r)(e)}clone(){return new i({hillshadeType:this.hillshadeType,altitude:this.altitude,azimuth:this.azimuth,zFactor:this.zFactor,scalingType:this.scalingType,pixelSizeFactor:this.pixelSizeFactor,pixelSizePower:this.pixelSizePower,colorRamp:(0,s.o8)(this.colorRamp)})}};(0,n._)([(0,a.MZ)({type:Number,json:{write:!0}})],p.prototype,"altitude",void 0),(0,n._)([(0,a.MZ)({type:Number,json:{write:!0}})],p.prototype,"azimuth",void 0),(0,n._)([(0,a.MZ)({types:d.g,json:{write:!0}})],p.prototype,"colorRamp",void 0),(0,n._)([(0,u.w)("colorRamp")],p.prototype,"readColorRamp",null),(0,n._)([(0,a.MZ)({type:["traditional","multi-directional"],json:{write:!0}})],p.prototype,"hillshadeType",void 0),(0,n._)([(0,a.MZ)({type:Number,json:{write:!0}})],p.prototype,"pixelSizePower",void 0),(0,n._)([(0,a.MZ)({type:Number,json:{write:!0}})],p.prototype,"pixelSizeFactor",void 0),(0,n._)([(0,a.MZ)({type:["none","adjusted"],json:{write:!0}})],p.prototype,"scalingType",void 0),(0,n._)([(0,l.e)({rasterShadedRelief:"raster-shaded-relief"})],p.prototype,"type",void 0),(0,n._)([(0,a.MZ)({type:Number,json:{write:!0}})],p.prototype,"zFactor",void 0),p=i=(0,n._)([(0,c.$)("esri.renderers.RasterShadedReliefRenderer")],p);const m=p},36280:(e,t,r)=>{r.d(t,{A:()=>g});var i,n=r(90237),o=r(25482),s=r(4718),a=r(10107),l=(r(44208),r(53966),r(93223)),u=r(36005),c=r(40608),d=r(43937),p=r(70274),m=r(95349);let h=i=class extends o.oY{constructor(e){super(e),this.colorRamp=null,this.computeGamma=!1,this.dynamicRangeAdjustment=!1,this.gamma=[],this.maxPercent=null,this.minPercent=null,this.numberOfStandardDeviations=null,this.outputMax=null,this.outputMin=null,this.sigmoidStrengthLevel=null,this.statistics=[],this.histograms=null,this.useGamma=!1,this.stretchType="none",this.type="raster-stretch"}readColorRamp(e){if(e)return(0,m.r)(e)}writeStatistics(e,t,r){e?.length&&(Array.isArray(e[0])||(e=e.map((e=>[e.min,e.max,e.avg,e.stddev]))),t[r]=e)}readStretchType(e,t){let r=t.stretchType;return"number"==typeof r&&(r=p.x[r]),p.u.read(r)}clone(){return new i({stretchType:this.stretchType,outputMin:this.outputMin,outputMax:this.outputMax,useGamma:this.useGamma,computeGamma:this.computeGamma,statistics:(0,s.o8)(this.statistics),gamma:(0,s.o8)(this.gamma),sigmoidStrengthLevel:this.sigmoidStrengthLevel,numberOfStandardDeviations:this.numberOfStandardDeviations,minPercent:this.minPercent,maxPercent:this.maxPercent,colorRamp:(0,s.o8)(this.colorRamp),histograms:(0,s.o8)(this.histograms),dynamicRangeAdjustment:this.dynamicRangeAdjustment})}};(0,n._)([(0,a.MZ)({types:m.g,json:{write:!0}})],h.prototype,"colorRamp",void 0),(0,n._)([(0,u.w)("colorRamp")],h.prototype,"readColorRamp",null),(0,n._)([(0,a.MZ)({type:Boolean,json:{write:!0}})],h.prototype,"computeGamma",void 0),(0,n._)([(0,a.MZ)({type:Boolean,json:{write:{target:"dra"},read:{source:"dra"}}})],h.prototype,"dynamicRangeAdjustment",void 0),(0,n._)([(0,a.MZ)({type:[Number],json:{write:!0}})],h.prototype,"gamma",void 0),(0,n._)([(0,a.MZ)({type:Number,json:{write:!0}})],h.prototype,"maxPercent",void 0),(0,n._)([(0,a.MZ)({type:Number,json:{write:!0}})],h.prototype,"minPercent",void 0),(0,n._)([(0,a.MZ)({type:Number,json:{write:!0}})],h.prototype,"numberOfStandardDeviations",void 0),(0,n._)([(0,a.MZ)({type:Number,json:{read:{source:"max"},write:{target:"max"}}})],h.prototype,"outputMax",void 0),(0,n._)([(0,a.MZ)({type:Number,json:{read:{source:"min"},write:{target:"min"}}})],h.prototype,"outputMin",void 0),(0,n._)([(0,a.MZ)({type:Number,json:{write:!0}})],h.prototype,"sigmoidStrengthLevel",void 0),(0,n._)([(0,a.MZ)({json:{type:[[Number]],write:!0}})],h.prototype,"statistics",void 0),(0,n._)([(0,a.MZ)()],h.prototype,"histograms",void 0),(0,n._)([(0,d.K)("statistics")],h.prototype,"writeStatistics",null),(0,n._)([(0,a.MZ)({type:Boolean,json:{write:!0}})],h.prototype,"useGamma",void 0),(0,n._)([(0,a.MZ)({type:p.u.apiValues,json:{type:p.u.jsonValues,write:p.u.write}})],h.prototype,"stretchType",void 0),(0,n._)([(0,u.w)("stretchType",["stretchType"])],h.prototype,"readStretchType",null),(0,n._)([(0,l.e)({rasterStretch:"raster-stretch"})],h.prototype,"type",void 0),h=i=(0,n._)([(0,c.$)("esri.renderers.RasterStretchRenderer")],h);const g=h},89968:(e,t,r)=>{r.d(t,{A:()=>B});var i=r(90237),n=r(68197),o=(r(59456),r(52106)),s=r(61147),a=r(66552),l=r(25482),u=r(4718),c=r(10107),d=(r(44208),r(53966),r(93223)),p=r(36005),m=r(40608),h=r(17136),g=r(14636),y=r(86162),M=r(17719),f=r(88542),w=r(23461),I=r(496),A=r(29266),v=r(31593),b=r(53930),D=r(60999),T=r(51850);r(76369),r(93397),r(2741),r(78888);var S=r(55359);function N(e){for(const t of e)if("number"==typeof t)return t;return null}function j(e,t,r){for(let i=0;i<3;i++){const n=e[i];switch(n){case"symbol-value":{const e=r[i];return null!=e?e/t[i]:1}case"proportional":break;default:if(n&&t[i])return n/t[i]}}return 1}function _(e,t,r,i){switch(e){case"proportional":return r*i;case"symbol-value":return null!=t?t:r;default:return e}}async function C(e,t){if(e&&t)return(0,s.wk)(e)?async function(e,t){const i=e.symbolLayers;i&&await(0,D.jJ)(i,(async e=>async function(e,t){switch(e.type){case"extrude":!function(e,t){e.size="number"==typeof t[2]?t[2]:0}(e,t);break;case"icon":case"line":case"text":!function(e,t){const r=N(t);null!=r&&(e.size=r)}(e,t);break;case"path":!function(e,t){const r=j(t,T.Un,[e.width,void 0,e.height]);e.width=_(t[0],e.width,1,r),e.height=_(t[2],e.height,1,r)}(e,t);break;case"object":await async function(e,t){const{resourceSize:i,symbolSize:n}=await async function(e){const{computeObjectLayerResourceSize:t}=await r.e(5404).then(r.bind(r,95404)),i=await t(e,10),{width:n,height:o,depth:s}=e,a=[n,s,o];let l=1;for(let e=0;e<3;e++){const t=a[e];if(null!=t){l=t/i[e];break}}for(let e=0;e<3;e++)null==a[e]&&(a[e]=i[e]*l);return{resourceSize:i,symbolSize:a}}(e),o=j(t,i,n);e.width=_(t[0],n[0],i[0],o),e.depth=_(t[1],n[1],i[1],o),e.height=_(t[2],n[2],i[2],o)}(e,t)}}(e,t)))}(e,t):void((0,s.$y)(e)&&function(e,t){const r=N(t);if(null!=r)switch(e.type){case"simple-marker":e.size=r;break;case"picture-marker":{const t=e.width/e.height;t>1?(e.width=r,e.height=r*t):(e.width=r*t,e.height=r);break}case"simple-line":e.width=r;break;case"text":e.font.size=r}}(e,t))}new Map([["dash",[4,3]],["dashdot",[4,3,1,3]],["dot",[1,3]],["longdash",[8,3]],["longdashdot",[8,3,1,3]],["longdashdotdot",[8,3,1,3,1,3]],["shortdash",[4,1]],["shortdashdot",[4,1,1,1]],["shortdashdotdot",[4,1,1,1,1,1]],["shortdot",[1,1]],["solid",[]]]),new S.q(1e3),new n.A([128,128,128]),r(78504),new n.A("white");var x,L=r(86738),Z=r(58592);const k=new Set(["esriMetersPerSecond","esriKilometersPerHour","esriKnots","esriFeetPerSecond","esriMilesPerHour"]),U=new a.J({beaufort_ft:"beaufort-ft",beaufort_km:"beaufort-km",beaufort_kn:"beaufort-kn",beaufort_m:"beaufort-m",beaufort_mi:"beaufort-mi",classified_arrow:"classified-arrow",ocean_current_kn:"ocean-current-kn",ocean_current_m:"ocean-current-m",simple_scalar:"simple-scalar",single_arrow:"single-arrow",wind_speed:"wind-barb"}),z=new a.J({flow_from:"flow-from",flow_to:"flow-to"});let R=x=class extends((0,M.h)(l.oY)){constructor(e){super(e),this.attributeField="Magnitude",this.flowRepresentation="flow-from",this.rotationType="arithmetic",this.style="single-arrow",this.symbolTileSize=50,this.type="vector-field"}readInputUnit(e,t){return k.has(e)?g.MD.fromJSON(e):null}readOutputUnit(e,t){return k.has(e)?g.MD.fromJSON(e):null}get styleRenderer(){const e=this.style,t=this.attributeField,r=this._createStyleRenderer(e);return r.field=t,r}get sizeVariables(){const e=[];if(this.visualVariables)for(const t of this.visualVariables)"size"===t.type&&e.push(t);if(0===e.length){const t=new I.A({field:"Magnitude",minSize:.2*this.symbolTileSize,maxSize:.8*this.symbolTileSize});this.visualVariables?this.visualVariables.push(t):this._set("visualVariables",[t]),e.push(t)}return e}get rotationVariables(){const e=[];if(this.visualVariables)for(const t of this.visualVariables)"rotation"===t.type&&e.push(t);if(0===e.length){const t=new w.A({field:"Direction",rotationType:this.rotationType});this.visualVariables?this.visualVariables.push(t):this._set("visualVariables",[t]),e.push(t)}return e}clone(){return new x({attributeField:this.attributeField,flowRepresentation:this.flowRepresentation,rotationType:this.rotationType,symbolTileSize:this.symbolTileSize,style:this.style,visualVariables:(0,u.o8)(this.visualVariables),inputUnit:this.inputUnit,outputUnit:this.outputUnit})}async getGraphicsFromPixelData(e,t=!1,r=[]){const i=new Array,n=(0,g.KL)(this.inputUnit,this.outputUnit),s=this.rotationVariables[0]?.rotationType||this.rotationType,a=t?(0,g.FI)(e.pixelBlock,"vector-uv",s,n):(0,g.Rn)(e.pixelBlock,"vector-magdir",n);if(null==a)return i;const l=e.extent,u=null!=a.mask&&a.mask.length>0;let c=0;const d=(l.xmax-l.xmin)/a.width,p=(l.ymax-l.ymin)/a.height;for(let e=0;e<a.height;e++)for(let t=0;t<a.width;t++,c++){let n=new L.A({x:l.xmin+t*d+d/2,y:l.ymax-e*p-p/2,spatialReference:l.spatialReference});n=(await(0,h.el)(n))[0];const s=r.some((e=>e.intersects(n)));if((!u||a.mask[c])&&!s){const e={Magnitude:a.pixels[0][c],Direction:a.pixels[1][c]},t=new o.A({geometry:{type:"point",x:n.x,y:n.y,spatialReference:l.spatialReference},attributes:e});t.symbol=this._getVisualVariablesAppliedSymbol(t),i.push(t)}}return i}getSymbol(e,t){}async getSymbolAsync(e,t){}getSymbols(){return[]}getClassBreakInfos(){return this.styleRenderer?.classBreakInfos}getDefaultSymbol(){return this.styleRenderer?.defaultSymbol}_getDefaultSymbol(e){return new b.A({path:"M14,32 14,18 9,23 16,3 22,23 17,18 17,32 z",outline:new v.A({width:0}),size:20,color:e||new n.A([0,92,230])})}_getVisualVariablesAppliedSymbol(e){if(!e)return;const t=this.styleRenderer?.getSymbol(e)?.clone(),r=this.sizeVariables,i=this.rotationVariables;if(r&&r.length&&this.sizeVariables.forEach((r=>C(t,(0,A.Yz)([r],e)))),i&&i.length){const r="flow-to"===this.flowRepresentation==("ocean-current-kn"===this.style||"ocean-current-m"===this.style)?0:180;e.attributes.Direction=e.attributes.Direction+r,this.rotationVariables.forEach((r=>function(e,t,r){if(e&&null!=t)if((0,s.wk)(e)){const i=e.symbolLayers;i&&i.forEach((e=>{if(e&&"object"===e.type)switch(r){case"tilt":e.tilt=(e.tilt??0)+t;break;case"roll":e.roll=(e.roll??0)+t;break;default:e.heading=(e.heading??0)+t}}))}else(0,s.$y)(e)&&("simple-marker"!==e.type&&"picture-marker"!==e.type&&"text"!==e.type||(e.angle+=t))}(t,(0,A.UT)(r,e),r.axis)))}return t}_createStyleRenderer(e){let t={defaultSymbol:this._getDefaultSymbol(),classBreakInfos:[]};switch(e){case"single-arrow":t=this._createSingleArrowRenderer();break;case"beaufort-kn":t=this._createBeaufortKnotsRenderer();break;case"beaufort-m":t=this._createBeaufortMeterRenderer();break;case"beaufort-ft":t=this._createBeaufortFeetRenderer();break;case"beaufort-mi":t=this._createBeaufortMilesRenderer();break;case"beaufort-km":t=this._createBeaufortKilometersRenderer();break;case"ocean-current-m":t=this._createCurrentMeterRenderer();break;case"ocean-current-kn":t=this._createCurrentKnotsRenderer();break;case"simple-scalar":t=this._createSimpleScalarRenderer();break;case"wind-barb":t=this._createWindBarbsRenderer();break;case"classified-arrow":t=this._createClassifiedArrowRenderer()}return new y.A(t)}_createSingleArrowRenderer(){return{defaultSymbol:this._getDefaultSymbol()}}_createBeaufortKnotsRenderer(){return{defaultSymbol:this._getDefaultSymbol(new n.A([214,47,39])),classBreakInfos:this._getClassBreaks([0,1,3,6,10,16,21,27,33,40,47,55,63],[[40,146,199],[89,162,186],[129,179,171],[160,194,155],[191,212,138],[218,230,119],[250,250,100],[252,213,83],[252,179,102],[250,141,52],[247,110,42],[240,71,29]])}}_createBeaufortMeterRenderer(){return{defaultSymbol:this._getDefaultSymbol(new n.A([214,47,39])),classBreakInfos:this._getClassBreaks([0,.2,1.8,3.3,5.4,8.5,11,14.1,17.2,20.8,24.4,28.6,32.7],[[69,117,181],[101,137,184],[132,158,186],[162,180,189],[192,204,190],[222,227,191],[255,255,191],[255,220,161],[250,185,132],[245,152,105],[237,117,81],[232,21,21]])}}_createBeaufortFeetRenderer(){const e=this._getDefaultSymbol(new n.A([214,47,39]));let t=[0,.2,1.8,3.3,5.4,8.5,11,14.1,17.2,20.8,24.4,28.6,32.7];return t=t.map((e=>3.28084*e)),{defaultSymbol:e,classBreakInfos:this._getClassBreaks(t,[[69,117,181],[101,137,184],[132,158,186],[162,180,189],[192,204,190],[222,227,191],[255,255,191],[255,220,161],[250,185,132],[245,152,105],[237,117,81],[232,21,21]])}}_createBeaufortMilesRenderer(){const e=this._getDefaultSymbol(new n.A([214,47,39]));let t=[0,.2,1.8,3.3,5.4,8.5,11,14.1,17.2,20.8,24.4,28.6,32.7];return t=t.map((e=>2.23694*e)),{defaultSymbol:e,classBreakInfos:this._getClassBreaks(t,[[69,117,181],[101,137,184],[132,158,186],[162,180,189],[192,204,190],[222,227,191],[255,255,191],[255,220,161],[250,185,132],[245,152,105],[237,117,81],[232,21,21]])}}_createBeaufortKilometersRenderer(){const e=this._getDefaultSymbol(new n.A([214,47,39]));let t=[0,.2,1.8,3.3,5.4,8.5,11,14.1,17.2,20.8,24.4,28.6,32.7];return t=t.map((e=>3.6*e)),{defaultSymbol:e,classBreakInfos:this._getClassBreaks(t,[[69,117,181],[101,137,184],[132,158,186],[162,180,189],[192,204,190],[222,227,191],[255,255,191],[255,220,161],[250,185,132],[245,152,105],[237,117,81],[232,21,21]])}}_createCurrentMeterRenderer(){return{defaultSymbol:this._getDefaultSymbol(new n.A([177,177,177])),classBreakInfos:this._getClassBreaks([0,.5,1,1.5,2],[[78,26,153],[179,27,26],[202,128,26],[177,177,177]])}}_createCurrentKnotsRenderer(){return{defaultSymbol:this._getDefaultSymbol(new n.A([177,177,177])),classBreakInfos:this._getClassBreaks([0,.25,.5,1,1.5,2,2.5,3,3.5,4],[[0,0,0],[0,37,100],[78,26,153],[151,0,100],[179,27,26],[177,78,26],[202,128,26],[177,179,52],[177,177,177]])}}_createClassifiedArrowRenderer(){const e=this._getDefaultSymbol(new n.A([56,168,0]));let t=[0,1e-6,3.5,7,10.5,14];if(this.sizeVariables?.length){const e=this.sizeVariables[0].minDataValue,r=this.sizeVariables[0].maxDataValue;if(e&&r){const i=(r-e)/5;t=Array.from(Array(6).keys()).map((t=>e+i*t))}}return{defaultSymbol:e,classBreakInfos:this._getClassBreaks(t,[[56,168,0],[139,309,0],[255,255,0],[255,128,0],[255,0,0]])}}_createSimpleScalarRenderer(){return{defaultSymbol:Z.A.fromJSON({imageData:"iVBORw0KGgoAAAANSUhEUgAAACsAAAArCAQAAABLVLlLAAAABGdBTUEAAYagMeiWXwAAAAJiS0dEAACqjSMyAAAACXBIWXMAAABIAAAASABGyWs+AAAC3ElEQVRIx9XXvW4cVRQH8N982btpsIREJECyiCXsxX4DKh6AliqGKCBBE2SlwlHgAbBD/AKmyEYUeQ1KahPZSZQvBCkQLTHZ7KGY8Xodz4w3a1NwbzVzz/znfJ//zbStVC5q3icKak9GAs2QIdDx3PtW/S011NW3p+M5Eomh11ipTIKe6+4LQzHaQ+G+63pIZNJJQXMpljwTwj1brpgx5w1zZlyx5Z4QnllEIm2xeeSUHBf0hV0bejo1Uh09G3aFvgXk7cCJFBc9EdaRVuHJJaOdKyTV2TVhYLMduNR0Q9gxL5GaaTDw8GzejrDRBpxWoGsySRW0dttKuattwNkIlFw2YXgzOdYq4Ox49PlM+JrKd5OusjTWhBuVxUfMX/KXXZ3WEmkuqa67wspR4BTbwtKr/5u4fFgStse/T7EifFPnnYl9zPq4vmUOPrRndgoHjDti1gOPqlyXoifcRNGQzUd31lDyfHmob1Gp35vSr+P6vilcQ5Egtyd8YF/ySg9NhPM+9M/IOaHwp5+PSZayXTvCogEUwlatC3J8LLwYtcWB8EuDXQVuCkV5/B4eNHb7wGBs87LBDS+xjdVSn09wq1G8dFM+9tSUhIGneLvUdniKxKpTYljCpu3j7rVWlHj/P23v4NPGUEyeCQnexe9lJjzEQqMjJs+EzNAX6B98dBZVRmroJx95x/A/6gln18EyfCUsl+qdXb/tjvfbw+mwforpUOBz4XLVoBwAn3aWnfeH246NyBXhrq7TTN5lNSP9RkU+puUJm3W2Tsdq0nZWM07srk7MwQrZSRysjjGWBLRJNsNbfj2JMR4AbxpU1XLAb9Mxfpsq5EjMuuiR8L0JiHOOBX3hiUvOmavN0nMueSzcceFk0BK4pMqLo7vDD1Z0qrtDx7Itt4Xwm9UqbMmk8S0Dtuzb2pvOU99Z1nLTOfleNmvfZfP2pYZmPfajwosKdDBNpacNpVGGsWX9CyDI8Xq/Sj6QAAAAJXRFWHRkYXRlOmNyZWF0ZQAyMDE0LTExLTEwVDAzOjE3OjU4LTA1OjAwF+tHyQAAACV0RVh0ZGF0ZTptb2RpZnkAMjAxNC0xMS0xMFQwMzoxNzo1OC0wNTowMGa2/3UAAAAASUVORK5CYII=",height:20,width:20,type:"esriPMS",angle:0})}}_createWindBarbsRenderer(){const e=Array.from(Array(31).keys()).map((e=>5*e)),t=[{range:"0-5",path:"M20 20 M5 20 A15 15 0 1 0 35 20 A15 15 0 1 0 5 20 M20 20 M10 20 A10 10 0 1 0 30 20 A10 10 0 1 0 10 20",imageData:"PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMzJweCIgd2lkdGg9IjMycHgiIHZpZXdCb3g9IjkgMCAyNiA0MSI+CiAgPHBhdGggZD0iTTIwIDIwIE01IDIwIEExNSAxNSAwIDEgMCAzNSAyMCBBMTUgMTUgMCAxIDAgNSAyMCBNMjAgMjAgTTEwIDIwIEExMCAxMCAwIDEgMCAzMCAyMCBBMTAgMTAgMCAxIDAgMTAgMjAiIHN0eWxlPSJzdHJva2U6cmdiKDAsMCwwKTtzdHJva2Utd2lkdGg6MS41Ii8+CiA8L3N2Zz4="},{range:"5-10",path:"M25 0 L25 40 M25 35 L17.5 37.5",imageData:"PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIHZpZXdCb3g9IjkgMCAyNyA0NiIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KICA8cGF0aCBkPSJNMjUgMCBMMjUgNDAgTTI1IDM1IEwxNy41IDM3LjUiIHN0eWxlPSJzdHJva2U6cmdiKDAsMCwwKTtzdHJva2Utd2lkdGg6MS41Ii8+CiA8L3N2Zz4="},{range:"10-15",path:"M25 0 L25 40 L10 45 L25 40",imageData:"PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIHZpZXdCb3g9IjkgMCAyNyA0NiIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KICA8cGF0aCBkPSJNMjUgMCBMMjUgNDAgTDEwIDQ1IEwyNSA0MCIgc3R5bGU9InN0cm9rZTpyZ2IoMCwwLDApO3N0cm9rZS13aWR0aDoxLjUiLz4KIDwvc3ZnPg=="},{range:"15-20",path:"M25 0 L25 40 L10 45 L25 40 M25 35 L17.5 37.5",imageData:"PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIHZpZXdCb3g9IjEyIDAgMTUgNDUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CiAgPHBhdGggZD0iTTI1IDAgTDI1IDQwIEwxMCA0NSBMMjUgNDAgTTI1IDM1IEwxNy41IDM3LjUiIHN0eWxlPSJzdHJva2U6cmdiKDAsMCwwKTtzdHJva2Utd2lkdGg6MS41Ii8+CiA8L3N2Zz4="},{range:"20-25",path:"M25 0 L25 40 L10 45 L25 40 M25 35 L10 40",imageData:"PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIHZpZXdCb3g9IjkgMCAyNiA0NiIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KICA8cGF0aCBkPSJNMjUgMCBMMjUgNDAgTDEwIDQ1IEwyNSA0MCBNMjUgMzUgTDEwIDQwIiBzdHlsZT0ic3Ryb2tlOnJnYigwLDAsMCk7c3Ryb2tlLXdpZHRoOjEuNSIvPgogPC9zdmc+"},{range:"25-30",path:"M25 0 L25 40 L10 45 L25 40 M25 35 L10 40 L25 35 M25 30 L17.5 32.5",imageData:"PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIHZpZXdCb3g9IjkgMCAyNiA0NiIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KICA8cGF0aCBkPSJNMjUgMCBMMjUgNDAgTDEwIDQ1IEwyNSA0MCBNMjUgMzUgTDEwIDQwIEwyNSAzNSBNMjUgMzAgTDE3LjUgMzIuNSIgc3R5bGU9InN0cm9rZTpyZ2IoMCwwLDApO3N0cm9rZS13aWR0aDoxLjUiLz4KIDwvc3ZnPg=="},{range:"30-35",path:"M25 0 L25 40 L10 45 L25 40 M25 35 L10 40 L25 35 M25 30 L10 35",imageData:"PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMHB4IiBoZWlnaHQ9IjIwcHgiIHZpZXdCb3g9IjkgMCAyNiA0NiI+CiAgPHBhdGggZD0iTTI1IDAgTDI1IDQwIEwxMCA0NSBMMjUgNDAgTTI1IDM1IEwxMCA0MCBMMjUgMzUgTTI1IDMwIEwxMCAzNSIgc3R5bGU9InN0cm9rZTpyZ2IoMCwwLDApO3N0cm9rZS13aWR0aDoxLjUiLz4KIDwvc3ZnPg=="},{range:"35-40",path:"M25 0 L25 40 L10 45 L25 40 M25 35 L10 40 L25 35 M25 30 L10 35 L25 30 M25 25 L17.5 27.5",imageData:"PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMHB4IiBoZWlnaHQ9IjIwcHgiIHZpZXdCb3g9IjkgMCAyNiA0NiI+CiAgPHBhdGggZD0iTTI1IDAgTDI1IDQwIEwxMCA0NSBMMjUgNDAgTTI1IDM1IEwxMCA0MCBMMjUgMzUgTTI1IDMwIEwxMCAzNSBMMjUgMzAgTTI1IDI1IEwxNy41IDI3LjUiIHN0eWxlPSJzdHJva2U6cmdiKDAsMCwwKTtzdHJva2Utd2lkdGg6MS41Ii8+CiA8L3N2Zz4="},{range:"40-45",path:"M25 0 L25 40 L10 45 L25 40 M25 35 L10 40 L25 35 M25 30 L10 35 L25 30 M25 25 L10 30",imageData:"PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMHB4IiBoZWlnaHQ9IjIwcHgiIHZpZXdCb3g9IjkgMCAyNiA0NiI+CiAgPHBhdGggZD0iTTI1IDAgTDI1IDQwIEwxMCA0NSBMMjUgNDAgTTI1IDM1IEwxMCA0MCBMMjUgMzUgTTI1IDMwIEwxMCAzNSBMMjUgMzAgTTI1IDI1IEwxMCAzMCIgc3R5bGU9InN0cm9rZTpyZ2IoMCwwLDApO3N0cm9rZS13aWR0aDoxLjUiLz4KIDwvc3ZnPg=="},{range:"45-50",path:"M25 0 L25 40 L10 45 L25 40 M25 35 L10 40 L25 35 M25 30 L10 35 L25 30 M25 25 L10 30 L25 25 M25 20 L17.5 22.5",imageData:"PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMHB4IiBoZWlnaHQ9IjIwcHgiIHZpZXdCb3g9IjkgMCAyNiA0NiI+CiAgPHBhdGggZD0iTTI1IDAgTDI1IDQwIEwxMCA0NSBMMjUgNDAgTTI1IDM1IEwxMCA0MCBMMjUgMzUgTTI1IDMwIEwxMCAzNSBMMjUgMzAgTTI1IDI1IEwxMCAzMCBMMjUgMjUgTTI1IDIwIEwxNy41IDIyLjUiIHN0eWxlPSJzdHJva2U6cmdiKDAsMCwwKTtzdHJva2Utd2lkdGg6MS41Ii8+CiA8L3N2Zz4="},{range:"50-55",path:"M25 0 L25 40 L10 40 L25 35",imageData:"PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMHB4IiBoZWlnaHQ9IjIwcHgiIHZpZXdCb3g9IjkgMCAyNiA0MSI+CiAgPHBhdGggZD0iTTI1IDAgTDI1IDQwIEwxMCA0MCBMMjUgMzUiIHN0eWxlPSJzdHJva2U6cmdiKDAsMCwwKTtzdHJva2Utd2lkdGg6MS41Ii8+CiA8L3N2Zz4="},{range:"55-60",path:"M25 0 L25 40 L10 40 L25 35 M25 30 L17.5 32.5",imageData:"PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMHB4IiBoZWlnaHQ9IjIwcHgiIHZpZXdCb3g9IjkgMCAyNiA0MSI+CiAgPHBhdGggZD0iTTI1IDAgTDI1IDQwIEwxMCA0MCBMMjUgMzUgTTI1IDMwIEwxNy41IDMyLjUiIHN0eWxlPSJzdHJva2U6cmdiKDAsMCwwKTtzdHJva2Utd2lkdGg6MS41Ii8+CiA8L3N2Zz4="},{range:"60-65",path:"M25 0 L25 40 L10 40 L25 35 M25 30 L10 35",imageData:"PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIzMnB4IiBoZWlnaHQ9IjMycHgiIHZpZXdCb3g9IjkgMCAyNiA0MSI+CiAgPHBhdGggZD0iTTI1IDAgTDI1IDQwIEwxMCA0MCBMMjUgMzUgTTI1IDMwIEwxMCAzNSIgc3R5bGU9InN0cm9rZTpyZ2IoMCwwLDApO3N0cm9rZS13aWR0aDoxLjUiLz4KIDwvc3ZnPg=="},{range:"65-70",path:"M25 0 L25 40 L10 40 L25 35 M25 30 L10 35 L25 30 M25 25 L17.5 27.5",imageData:"PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIzMnB4IiBoZWlnaHQ9IjMycHgiIHZpZXdCb3g9IjkgMCAyNiA0MSI+CiAgPHBhdGggZD0iTTI1IDAgTDI1IDQwIEwxMCA0MCBMMjUgMzUgTTI1IDMwIEwxMCAzNSBMMjUgMzAgTTI1IDI1IEwxNy41IDI3LjUiIHN0eWxlPSJzdHJva2U6cmdiKDAsMCwwKTtzdHJva2Utd2lkdGg6MS41Ii8+CiA8L3N2Zz4="},{range:"70-75",path:"M25 0 L25 40 L10 40 L25 35 M25 30 L10 35 L25 30 M25 25 L10 30",imageData:"PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIzMnB4IiBoZWlnaHQ9IjMycHgiIHZpZXdCb3g9IjkgMCAyNiA0MSI+CiAgPHBhdGggZD0iTTI1IDAgTDI1IDQwIEwxMCA0MCBMMjUgMzUgTTI1IDMwIEwxMCAzNSBMMjUgMzAgTTI1IDI1IEwxMCAzMCIgc3R5bGU9InN0cm9rZTpyZ2IoMCwwLDApO3N0cm9rZS13aWR0aDoxLjUiLz4KIDwvc3ZnPg=="},{range:"75-80",path:"M25 0 L25 40 L10 40 L25 35 M25 30 L10 35 L25 30 M25 25 L10 30 L25 25 M25 20 L17.5 22.5",imageData:"PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIzMnB4IiBoZWlnaHQ9IjMycHgiIHZpZXdCb3g9IjkgMCAyNiA0MSI+CiAgPHBhdGggZD0iTTI1IDAgTDI1IDQwIEwxMCA0MCBMMjUgMzUgTTI1IDMwIEwxMCAzNSBMMjUgMzAgTTI1IDI1IEwxMCAzMCBMMjUgMjUgTTI1IDIwIEwxNy41IDIyLjUiIHN0eWxlPSJzdHJva2U6cmdiKDAsMCwwKTtzdHJva2Utd2lkdGg6MS41Ii8+CiA8L3N2Zz4="},{range:"80-85",path:"M25 0 L25 40 L10 40 L25 35 M25 30 L10 35 L25 30 M25 25 L10 30 L25 25 M25 20 L10 25",imageData:"PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIzMnB4IiBoZWlnaHQ9IjMycHgiIHZpZXdCb3g9IjkgMCAyNiA0MSI+CiAgPHBhdGggZD0iTTI1IDAgTDI1IDQwIEwxMCA0MCBMMjUgMzUgTTI1IDMwIEwxMCAzNSBMMjUgMzAgTTI1IDI1IEwxMCAzMCBMMjUgMjUgTTI1IDIwIEwxMCAyNSIgc3R5bGU9InN0cm9rZTpyZ2IoMCwwLDApO3N0cm9rZS13aWR0aDoxLjUiLz4KIDwvc3ZnPg=="},{range:"85-90",path:"M25 0 L25 40 L10 40 L25 35 M25 30 L10 35 L25 30 M25 25 L10 30 L25 25 M25 20 L10 25 L25 20 M25 15 L17.5 17.5",imageData:"PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIzMnB4IiBoZWlnaHQ9IjMycHgiIHZpZXdCb3g9IjkgMCAyNiA0MSI+CiAgPHBhdGggZD0iTTI1IDAgTDI1IDQwIEwxMCA0MCBMMjUgMzUgTTI1IDMwIEwxMCAzNSBMMjUgMzAgTTI1IDI1IEwxMCAzMCBMMjUgMjUgTTI1IDIwIEwxMCAyNSBMMjUgMjAgTTI1IDE1IEwxNy41IDE3LjUiIHN0eWxlPSJzdHJva2U6cmdiKDAsMCwwKTtzdHJva2Utd2lkdGg6MS41Ii8+CiA8L3N2Zz4="},{range:"90-95",path:"M25 0 L25 40 L10 40 L25 35 M25 30 L10 35 L25 30 M25 25 L10 30 L25 25 M25 20 L10 25 L25 20 M25 15 L10 20",imageData:"PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIzMnB4IiBoZWlnaHQ9IjMycHgiIHZpZXdCb3g9IjkgMCAyNiA0MSI+CiAgPHBhdGggZD0iTTI1IDAgTDI1IDQwIEwxMCA0MCBMMjUgMzUgTTI1IDMwIEwxMCAzNSBMMjUgMzAgTTI1IDI1IEwxMCAzMCBMMjUgMjUgTTI1IDIwIEwxMCAyNSBMMjUgMjAgTTI1IDE1IEwxMCAyMCIgc3R5bGU9InN0cm9rZTpyZ2IoMCwwLDApO3N0cm9rZS13aWR0aDoxLjUiLz4KIDwvc3ZnPg=="},{range:"95-100",path:"M25 0 L25 40 L10 40 L25 35 M25 30 L10 35 L25 30 M25 25 L10 30 L25 25 M25 20 L10 25 L25 20 M25 15 L10 20 L25 15 M25 10 L17.5 12.5",imageData:"PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIzMnB4IiBoZWlnaHQ9IjMycHgiIHZpZXdCb3g9IjkgMCAyNiA0MSI+CiAgPHBhdGggZD0iTTI1IDAgTDI1IDQwIEwxMCA0MCBMMjUgMzUgTTI1IDMwIEwxMCAzNSBMMjUgMzAgTTI1IDI1IEwxMCAzMCBMMjUgMjUgTTI1IDIwIEwxMCAyNSBMMjUgMjAgTTI1IDE1IEwxMCAyMCBMMjUgMTUgTTI1IDEwIEwxNy41IDEyLjUiIHN0eWxlPSJzdHJva2U6cmdiKDAsMCwwKTtzdHJva2Utd2lkdGg6MS41Ii8+CiA8L3N2Zz4="},{range:"100-105",path:"M25 0 L25 40 L10 40 L25 35 L10 35 L25 30",imageData:"PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIzMnB4IiBoZWlnaHQ9IjMycHgiIHZpZXdCb3g9IjkgMCAyNiA0MSI+CiAgPHBhdGggZD0iTTI1IDAgTDI1IDQwIEwxMCA0MCBMMjUgMzUgTDEwIDM1IEwyNSAzMCIgc3R5bGU9InN0cm9rZTpyZ2IoMCwwLDApO3N0cm9rZS13aWR0aDoxLjUiLz4KIDwvc3ZnPg=="},{range:"105-110",path:"M25 0 L25 40 L10 40 L25 35 L10 35 L25 30 M25 25 L17.5 27.5",imageData:"PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMzJweCIgd2lkdGg9IjMycHgiIHZpZXdCb3g9IjkgMCAyNiA0MSI+CiAgPHBhdGggZD0iTTI1IDAgTDI1IDQwIEwxMCA0MCBMMjUgMzUgTDEwIDM1IEwyNSAzMCBNMjUgMjUgTDE3LjUgMjcuNSIgc3R5bGU9InN0cm9rZTpyZ2IoMCwwLDApO3N0cm9rZS13aWR0aDoxLjUiLz4KIDwvc3ZnPg=="},{range:"110-115",path:"M25 0 L25 40 L10 40 L25 35 L10 35 L25 30 M25 25 L10 30",imageData:"PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMzJweCIgd2lkdGg9IjMycHgiIHZpZXdCb3g9IjkgMCAyNiA0MSI+CiAgPHBhdGggZD0iTTI1IDAgTDI1IDQwIEwxMCA0MCBMMjUgMzUgTDEwIDM1IEwyNSAzMCBNMjUgMjUgTDEwIDMwIiBzdHlsZT0ic3Ryb2tlOnJnYigwLDAsMCk7c3Ryb2tlLXdpZHRoOjEuNSIvPgogPC9zdmc+"},{range:"115-120",path:"M25 0 L25 40 L10 40 L25 35 L10 35 L25 30 M25 25 L10 30 M25 25 M25 20 L17.5 22.5",imageData:"PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMzJweCIgd2lkdGg9IjMycHgiIHZpZXdCb3g9IjkgMCAyNiA0MSI+CiAgPHBhdGggZD0iTTI1IDAgTDI1IDQwIEwxMCA0MCBMMjUgMzUgTDEwIDM1IEwyNSAzMCBNMjUgMjUgTDEwIDMwIE0yNSAyNSBNMjUgMjAgTDE3LjUgMjIuNSIgc3R5bGU9InN0cm9rZTpyZ2IoMCwwLDApO3N0cm9rZS13aWR0aDoxLjUiLz4KIDwvc3ZnPg=="},{range:"120-125",path:"M25 0 L25 40 L10 40 L25 35 L10 35 L25 30 M25 25 L10 30 M25 25 M25 20 L10 25",imageData:"PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMzJweCIgd2lkdGg9IjMycHgiIHZpZXdCb3g9IjkgMCAyNiA0MSI+CiAgPHBhdGggZD0iTTI1IDAgTDI1IDQwIEwxMCA0MCBMMjUgMzUgTDEwIDM1IEwyNSAzMCBNMjUgMjUgTDEwIDMwIE0yNSAyNSBNMjUgMjAgTDEwIDI1IiBzdHlsZT0ic3Ryb2tlOnJnYigwLDAsMCk7c3Ryb2tlLXdpZHRoOjEuNSIvPgogPC9zdmc+"},{range:"125-130",path:"M25 0 L25 40 L10 40 L25 35 L10 35 L25 30 M25 25 L10 30 M25 25 M25 20 L10 25 M25 20 M25 15 L17.5 17.5",imageData:"PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMzJweCIgd2lkdGg9IjMycHgiIHZpZXdCb3g9IjkgMCAyNiA0MSI+CiAgPHBhdGggZD0iTTI1IDAgTDI1IDQwIEwxMCA0MCBMMjUgMzUgTDEwIDM1IEwyNSAzMCBNMjUgMjUgTDEwIDMwIE0yNSAyNSBNMjUgMjAgTDEwIDI1IE0yNSAyMCBNMjUgMTUgTDE3LjUgMTcuNSIgc3R5bGU9InN0cm9rZTpyZ2IoMCwwLDApO3N0cm9rZS13aWR0aDoxLjUiLz4KIDwvc3ZnPg=="},{range:"130-135",path:"M25 0 L25 40 L10 40 L25 35 L10 35 L25 30 M25 25 L10 30 M25 25 M25 20 L10 25 M25 20 M25 15 L10 20",imageData:"PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMzJweCIgd2lkdGg9IjMycHgiIHZpZXdCb3g9IjkgMCAyNiA0MSI+CiAgPHBhdGggZD0iTTI1IDAgTDI1IDQwIEwxMCA0MCBMMjUgMzUgTDEwIDM1IEwyNSAzMCBNMjUgMjUgTDEwIDMwIE0yNSAyNSBNMjUgMjAgTDEwIDI1IE0yNSAyMCBNMjUgMTUgTDEwIDIwIiBzdHlsZT0ic3Ryb2tlOnJnYigwLDAsMCk7c3Ryb2tlLXdpZHRoOjEuNSIvPgogPC9zdmc+"},{range:"135-140",path:"M25 0 L25 40 L10 40 L25 35 L10 35 L25 30 M25 25 L10 30 M25 25 M25 20 L10 25 M25 20 M25 15 L10 20 M25 15 M25 10 L17.5 12.5",imageData:"PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMzJweCIgd2lkdGg9IjMycHgiIHZpZXdCb3g9IjkgMCAyNiA0MSI+CiAgPHBhdGggZD0iTTI1IDAgTDI1IDQwIEwxMCA0MCBMMjUgMzUgTDEwIDM1IEwyNSAzMCBNMjUgMjUgTDEwIDMwIE0yNSAyNSBNMjUgMjAgTDEwIDI1IE0yNSAyMCBNMjUgMTUgTDEwIDIwIE0yNSAxNSBNMjUgMTAgTDE3LjUgMTIuNSIgc3R5bGU9InN0cm9rZTpyZ2IoMCwwLDApO3N0cm9rZS13aWR0aDoxLjUiLz4KIDwvc3ZnPg=="},{range:"140-145",path:"M25 0 L25 40 L10 40 L25 35 L10 35 L25 30 M25 25 L10 30 M25 25 M25 20 L10 25 M25 20 M25 15 L10 20 M25 15 M25 10 L17.5 12.5",imageData:"PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMzJweCIgd2lkdGg9IjMycHgiIHZpZXdCb3g9IjkgMCAyNiA0MSI+CiAgPHBhdGggZD0iTTI1IDAgTDI1IDQwIEwxMCA0MCBMMjUgMzUgTDEwIDM1IEwyNSAzMCBNMjUgMjUgTDEwIDMwIE0yNSAyNSBNMjUgMjAgTDEwIDI1IE0yNSAyMCBNMjUgMTUgTDEwIDIwIE0yNSAxNSBNMjUgMTAgTDEwIDE1IiBzdHlsZT0ic3Ryb2tlOnJnYigwLDAsMCk7c3Ryb2tlLXdpZHRoOjEuNSIvPgogPC9zdmc+"},{range:"145-150",path:"M25 0 L25 40 L10 40 L25 35 L10 35 L25 30 M25 25 L10 30 M25 25 M25 20 L10 25 M25 20 M25 15 L10 20 M25 15 M25 10 L17.5 12.5",imageData:"PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMzJweCIgd2lkdGg9IjMycHgiIHZpZXdCb3g9IjkgMCAyNiA0MSI+CiAgPHBhdGggZD0iTTI1IDAgTDI1IDQwIEwxMCA0MCBMMjUgMzUgTDEwIDM1IEwyNSAzMCBNMjUgMjUgTDEwIDMwIE0yNSAyNSBNMjUgMjAgTDEwIDI1IE0yNSAyMCBNMjUgMTUgTDEwIDIwIE0yNSAxNSBNMjUgMTAgTDEwIDE1IE0yNSAxMCBNMjUgNSBMMTcuNSA3LjUiIHN0eWxlPSJzdHJva2U6cmdiKDAsMCwwKTtzdHJva2Utd2lkdGg6MS41Ii8+CiA8L3N2Zz4="}],r=Z.A.fromJSON({imageData:"iVBORw0KGgoAAAANSUhEUgAAACgAAAApCAQAAADtq6NDAAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAAJiS0dEAP+Hj8y/AAAACXBIWXMAAA7DAAAOwwHHb6hkAAAEY0lEQVRIx5XXWWxWRRQH8N+d+31tUdGAVjGglYJABFEBY91jfDAg7piYaFTccA++uMQEFRcSXlATtxiXqMQt4G4iisYl0ai4sIQYtVFZ1KIFKdTS0l4f7vRCS5fPebozc+bM/2z/Mzcx0AgSiUxXnKfIdMn875FIhX53U2n/B/s+kKM4UINTjTBZImixxnrv+9a2iL6zEoUBXcoudrWj/OtHm3wt02lfU9Qao9OnHvIhgmww84MEl1qnxfNmGrqHxAizLdPpC6chGcAxKGGcL+30gOERf1BSpUqVslQSV8d5ReZFe8VQ9avufJn31cWwlJV7iafKStGOE/1qvfH9qUxxu8ydUdmuSKbGO8YUdT2inKLG69pM70tliktl5qIkCAJGmusDG7Vqsc0WjZa4UBlBiA5YZIcjYzB7qDtH5kaUJFLs7RGZTZ42W4PRRmtwvbdt1+wGiaS4drEtDttdZYIDNVuAclR3vA3+dI3qHqmVSy7U6Tv1MScCPvPR7nIpFlsdCy3FdTLPGhK92e2CUITjMJ9ocwKxnsZqc3O3JwMma3d6UVLnyVxB4aXemZqvPqLdpJhW3KVVbY4yYImPo6M5Urv50fj+0z/FG9YaEiENs8UtMfXUaTeTePNHlhXfA1UU+2lyD1Il3Gtt9+adfpNG7dNlpg2U/T3KYLZ2dUWFdTgp3/rQ4sK973qnInV5TIf40x3dhvrJPBiqyWUo4wAtLqhQYS71qK+QKOFRywmGK/kpikzV6WMKhh58vGWs4TIJNjiEYLIuP8Tt4/zmLyqk+AyrJSbF+Qq1DgqRUPMxyl+9q3IQhX/rMCJ6tEunriDs1oSyQZKlr9AkhT2ZIARbJfaJS1vtVbHB+Rgi0RK/y1q1BWsEEyLoz40xtGKcARPVWB1BTPO7f4LNtpkUl1aoMbViLyZo0GRjPD3BxnxjqXeLYlvhqYrzMMG3HoyJXa3JjfnGlbYYFlP7Jh3qKsKY4hQ7TY0nG+xwRL61n63mxHtqNHosigyMLmClNwvuecFnOZB88nNBDzNkzhxEZaKMBVoKapggMzvHHXBEpNSSFAvtcFRsVn0bW8LlMmcXs+c0Kne3gRR32+zg4uXwjC6zit6Wt4a8LXVfcp/MtQXHn2ynGbuCmb8GvvFeJLEE82ReU9/n6+dkq2x3buG9Wn94smcgAw631RPR7BTH+kbmHReZoEpOdEe7zWqZl40s0JWs9Hmv7hjBHqPDwsjGKVJnWWqjbdZp1KhJi0aPmxYZsIRhlttgeF+Jlke41QcOQKoqilSb6HJzSvNG3G/UoWnxwsmt+sVaYwd63dRbqdnMyCPVeyRPvpYgdavM22oGKoMUVRbJfOWMwidJ8Zzb1UvmWK/VVUXzHaTjjrVYh1897HT7xxYEVUaa5SWb/WO+YUWa9SrwvigzM8YlzlYv2GSdVCYxxlBtVnnFq5olwp5/BEk/OLsf5LUmG2+inRJdVvjZ97ZH9/zP34ug1O91pf4p+D+JYBpvrKxfbwAAACV0RVh0ZGF0ZTpjcmVhdGUAMjAxNC0xMS0xMFQwMzoxMjowOS0wNTowMB9ViV0AAAAldEVYdGRhdGU6bW9kaWZ5ADIwMTQtMTEtMTBUMDM6MTI6MDktMDU6MDBuCDHhAAAAAElFTkSuQmCC",height:20,width:20,type:"esriPMS",angle:0}),i=e.map(((i,n)=>{let o;if(n!==e.length-1)if(0===n)o={minValue:i,maxValue:e[n+1],symbol:r};else{const r=Z.A.fromJSON({type:"esriPMS",imageData:t[n].imageData,contentType:"image/svg+xml",height:32,width:32,angle:0});o={minValue:i,maxValue:e[n+1],symbol:r}}return new f.A(o)}));return{defaultSymbol:r,classBreakInfos:i}}_getClassBreaks(e,t){return t.map(((t,r)=>new f.A({minValue:e[r],maxValue:e[r+1],symbol:this._getDefaultSymbol(new n.A(t))})))}};(0,i._)([(0,c.MZ)({type:String,json:{write:!0}})],R.prototype,"attributeField",void 0),(0,i._)([(0,c.MZ)({type:z.apiValues,json:{type:z.jsonValues,read:{reader:z.read},write:{writer:z.write}}})],R.prototype,"flowRepresentation",void 0),(0,i._)([(0,c.MZ)({type:["geographic","arithmetic"],json:{write:!0}})],R.prototype,"rotationType",void 0),(0,i._)([(0,c.MZ)({type:U.apiValues,json:{type:U.jsonValues,read:{reader:U.read},write:{writer:U.write}}})],R.prototype,"style",void 0),(0,i._)([(0,c.MZ)({json:{write:!0}})],R.prototype,"symbolTileSize",void 0),(0,i._)([(0,c.MZ)({type:g.MD.apiValues,json:{type:g.MD.jsonValues,write:{writer:g.MD.write}}})],R.prototype,"inputUnit",void 0),(0,i._)([(0,p.w)("inputUnit")],R.prototype,"readInputUnit",null),(0,i._)([(0,c.MZ)({type:g.MD.apiValues,json:{type:g.MD.jsonValues,read:{reader:g.MD.read},write:{writer:g.MD.write}}})],R.prototype,"outputUnit",void 0),(0,i._)([(0,p.w)("outputUnit")],R.prototype,"readOutputUnit",null),(0,i._)([(0,d.e)({vectorField:"vector-field"})],R.prototype,"type",void 0),(0,i._)([(0,c.MZ)({type:y.A})],R.prototype,"styleRenderer",null),(0,i._)([(0,c.MZ)({type:I.A})],R.prototype,"sizeVariables",null),(0,i._)([(0,c.MZ)({type:w.A})],R.prototype,"rotationVariables",null),R=x=(0,i._)([(0,m.$)("esri.renderers.VectorFieldRenderer")],R);const B=R},12711:(e,t,r)=>{r.d(t,{$P:()=>N,PD:()=>f,ci:()=>v,fp:()=>w,m7:()=>A,w6:()=>I});var i=r(68197),n=(r(68729),r(83047),r(20437)),o=(r(67730),r(30943)),s=(r(88542),r(67369)),a=r(88178),l=r(94833),u=(r(9760),r(84892),r(1626)),c=r(36280),d=r(93618),p=r(80498),m=(r(46981),r(86162),r(89968));const h=.25,g=u.A.fromJSON({type:"multipart",colorRamps:[{fromColor:[0,0,255],toColor:[0,255,255]},{fromColor:[0,255,255],toColor:[255,255,0]},{fromColor:[255,255,0],toColor:[255,0,0]}]}),y=u.A.fromJSON(s.vj[0]),M=new Set(["scientific","standard-time","vector-uv","vector-magdir","vector-u","vector-v","vector-magnitude","vector-direction"]);function f(e,t){const{attributeTable:r,colormap:n}=e;if((0,a.rd)(e)){const t=function(e){if(!(0,a.rd)(e))return null;let t;if(null!=e.statistics&&e.statistics.length&&("vector-magdir"===e.dataType||"vector-uv"===e.dataType)){const{minMagnitude:r,maxMagnitude:i}=function(e,t){let r,i;if("vector-magdir"===e)r=t[0].min,i=t[0].max;else{const e=t[0].min,n=t[0].max,o=t[1].min,s=t[1].max;r=0,i=Math.max(Math.abs(e),Math.abs(o),Math.abs(n),Math.abs(s))}return{minMagnitude:r,maxMagnitude:i}}(e.dataType,e.statistics);t=[{type:"size",field:"Magnitude",minSize:10,maxSize:40,minDataValue:r,maxDataValue:i}]}const r=null!=e.multidimensionalInfo?T.get(e.multidimensionalInfo.variables[0].unit):null,i=new m.A({visualVariables:t,inputUnit:r,rotationType:"geographic"});return i.visualVariables=[...i.sizeVariables,...i.rotationVariables],i}(e);if(null!=t)return t}if(null!=n){const t=function(e){if(!(0,a.FA)(e))return null;let t;const{attributeTable:r,colormap:i}=e;if(null!=r){const e=D(r,"value"),i=b(r,null,!0);"string"===i.type&&(t={},r.features.forEach((r=>{const n=r.attributes;t[n[e.name]]=i?n[i.name]:n[e.name]})))}return p.A.createFromColormap(i,t)}(e);if(null!=t)return t}if(null!=r){const t=function(e,t,r,n){if(!(0,a.hu)(e,t))return null;const{attributeTable:u,statistics:c}=e,p=b(u,t),m=D(u,"red"),h=D(u,"green"),g=D(u,"blue"),M=new o.A,f=[],w=new Set,I=!!(m&&h&&g);if(null!=u)u.features.forEach((e=>{const t=e.attributes[p.name];if(!w.has(e.attributes[p.name])&&null!=t){w.add(t);const r=I&&("single"===m.type||"double"===m.type)&&("single"===h.type||"double"===h.type)&&("single"===g.type||"double"===g.type)&&!u.features.some((e=>e.attributes[m.name]>1||e.attributes[h.name]>1||e.attributes[g.name]>1)),n=r?255:1;f.push(new l.A({value:e.attributes[p.name],label:e.attributes[p.name]+"",symbol:{type:"simple-fill",style:"solid",outline:null,color:new i.A(I?[e.attributes[m.name]*n,e.attributes[h.name]*n,e.attributes[g.name]*n,1]:[0,0,0,0])}}))}}));else if(c?.[0])for(let e=c[0].min;e<=c[0].max;e++)f.push(new l.A({value:e,label:e.toString(),symbol:{type:"simple-fill",style:"solid",outline:null,color:new i.A([0,0,0,0])}}));if(f.sort(((e,t)=>e.value&&"string"==typeof e.value.valueOf()?0:e.value>t.value?1:-1)),!I){const e=(0,s.R8)(y,{numColors:f.length});f.forEach(((t,r)=>t.symbol.color=new i.A(e[r].slice(1,4)))),M.colorRamp=y}return new d.A({field:p.name,uniqueValueInfos:f,authoringInfo:M})}(e);if(null!=t)return t}return function(e,t){e=A(e,t?.variableName);const{bandCount:r}=e;let{bandIds:i,stretchType:n}=t||{};i?.some((e=>e>=r))&&(i=null);let o=e.statistics,s=e.histograms;r>1?(i=i?.length?i:v(e),o=null==o?null:i?.map((e=>o[e])),s=null==s?null:i?.map((e=>s[e]))):i=[0],null==n&&(n=function(e){let t="percent-clip";const{pixelType:r,dataType:i,histograms:n,statistics:o,multidimensionalInfo:s}=e,a=M.has(i)||"generic"===i&&null!=s;return"u8"!==r||"processed"!==i&&null!=n&&null!=o?"u8"===r||"elevation"===i||a?t="min-max":null!=n?t="percent-clip":null!=o&&(t="min-max"):t="none",t}(e));let a=!1;switch(n){case"none":a=!1;break;case"percent-clip":a=!s?.length;break;default:a=!o?.length}const{dataType:l}=e,u=1===i?.length&&M.has(l)?g:null,d=new c.A({stretchType:n,dynamicRangeAdjustment:a,colorRamp:u,outputMin:0,outputMax:255,gamma:1===i?.length?[1]:[1,1,1],useGamma:!1});return"percent-clip"===n?d.maxPercent=d.minPercent=h:"standard-deviation"===n&&(d.numberOfStandardDeviations=2),a||null==e.multidimensionalInfo&&!t?.includeStatisticsInStretch||("percent-clip"===n?d.histograms=s:"min-max"!==n&&"standard-deviation"!==n||(d.statistics=o)),d}(e,t)}function w(e,t=!1){const r=["raster-stretch"];return(0,a.FA)(e,t)&&r.push("raster-colormap"),(0,a.hu)(e)&&r.push("unique-value"),(0,a.xX)(e,t)&&r.push("class-breaks"),(0,a.iL)(e)&&r.push("raster-shaded-relief"),(0,a.rd)(e)&&r.push("vector-field"),(0,a.QJ)(e)&&r.push("flow"),r}function I(e,t,r){const i=["nearest","bilinear","cubic","majority"].find((e=>e===r?.toLowerCase()));return"Map"===t?i??"bilinear":"standard-time"===e.dataType?i??"nearest":"thematic"===e.dataType||e.attributeTable||e.colormap?"nearest"===i||"majority"===i?i:"nearest":i??"bilinear"}function A(e,t){const{multidimensionalInfo:r}=e;if(!t||!r)return e;const i=r.variables.find((e=>e.name===t));if(!i)return e;if(e=e.clone(),i){const{statistics:t,histograms:r}=i;t?.length&&(e.statistics=t.map((e=>({min:e.min,max:e.max,avg:e.avg,stddev:e.stddev})))),r?.length&&(e.histograms=r)}return e}function v(e){const t=e.bandCount;if(1===t)return null;if(2===t)return[0];const{bandInfos:r}=e;let i;if(r.length===t){const{red:e,green:t,blue:n,nir:o}=function(e){const t={};for(let r=0;r<e.length;r++){const i=e[r],n=i.name.toLowerCase();if("red"===n)t.red=r;else if("green"===n)t.green=r;else if("blue"===n)t.blue=r;else if("nearinfrared"===n||"nearinfrared_1"===n||"nir"===n)t.nir=r;else if(i.maxWavelength&&i.minWavelength){const e=i.minWavelength,n=i.maxWavelength;null==t.blue&&e>=410&&e<=480&&n>=480&&n<=540?t.blue=r:null==t.green&&e>=490&&e<=560&&n>=560&&n<=610?t.green=r:null==t.red&&e>=595&&e<=670&&n>=660&&n<=730?t.red=r:null==t.nir&&e>=700&&e<=860&&n>=800&&n<=950&&(t.nir=r)}}return t}(r);null!=e&&null!=t&&null!=n?i=[e,t,n]:null!=o&&null!=e&&null!=t&&(i=[o,e,t])}return!i&&t>=3&&(i=[0,1,2]),i}function b(e,t,r){let i;return null!=e?(i=t?e.fields.find((e=>t.toLowerCase()===e.name.toLowerCase())):function(e){let t;for(let r=0;r<e.length;r++){const i=e[r].name.toLowerCase();if("string"===e[r].type){if(i.startsWith("class")){t=e[r];break}null==t&&(i.endsWith("name")||i.endsWith("type"))&&(t=e[r])}}return t}(e.fields),i||(r||(i=e.fields.find((e=>"string"===e.type))),i||(i=D(e,"value")))):i=new n.A({name:"value"}),i}function D(e,t){return null==e?null:e.fields.find((e=>e.name.toLowerCase()===t))}const T=new Map([["m/s","meter-per-second"],["km/h","kilometer-per-hour"],["knots","knots"],["ft/s","feet-per-second"],["mph","mile-per-hour"]]);function S(e){return{color:e.symbolLayers[0].material?.color,type:"esriSFS",style:"esriSFSSolid"}}function N(e){if("uniqueValue"===e.type){const t=e.uniqueValueInfos,r=t?.[0].symbol;return r?.symbolLayers?.length&&(e.uniqueValueInfos=t?.map((e=>({value:e.value,label:e.label,symbol:e.symbol?S(e.symbol):null})))),e}if("classBreaks"===e.type){const t=e.classBreakInfos,r=t[0].symbol;return r?.symbolLayers?.length&&(e.classBreakInfos=t.map((e=>({classMinValue:e.classMinValue,classMaxValue:e.classMaxValue,label:e.label,symbol:e.symbol?S(e.symbol):null})))),e}return e}},82371:(e,t,r)=>{r.d(t,{E9:()=>m,Tw:()=>d,X6:()=>p});var i=r(78888),n=r(5443),o=r(86738),s=r(16930),a=r(87186),l=r(2272),u=r(22671);async function c(e,t,r){const c=(0,l.Dl)(e),{rasterFunction:d,sourceJSON:p}=t||{},m=d?JSON.stringify(d.rasterFunctionDefinition||d):null,h=(0,l.lF)({...c.query,renderingRule:m,f:"json"}),g=(0,l.jV)(h,r);e=c.path;const y=p||await(0,i.A)(e,g).then((e=>e.data)),M=y.hasRasterAttributeTable?(0,i.A)(`${e}/rasterAttributeTable`,g):null,f=y.hasColormap?(0,i.A)(`${e}/colormap`,g):null,w=y.hasHistograms?(0,i.A)(`${e}/histograms`,g):null,I=y.currentVersion>=10.3?(0,i.A)(`${e}/keyProperties`,g):null,A=y.hasMultidimensions?(0,i.A)(`${e}/multidimensionalInfo`,g):null,v=await Promise.allSettled([M,f,w,I,A]);let b=null;if(y.minValues&&y.minValues.length===y.bandCount){b=[];for(let e=0;e<y.minValues.length;e++)b.push({min:y.minValues[e],max:y.maxValues[e],avg:y.meanValues[e],stddev:y.stdvValues[e]})}const D=n.A.fromJSON(y.extent),T=Math.ceil(D.width/y.pixelSizeX-.1),S=Math.ceil(D.height/y.pixelSizeY-.1),N=s.A.fromJSON(y.spatialReference||y.extent.spatialReference),j="fulfilled"===v[0].status?v[0].value?.data:null,_=j?.features?.length?u.A.fromJSON(j):null,C="fulfilled"===v[1].status?v[1].value?.data.colormap:null,x=C?.length?C:null,L="fulfilled"===v[2].status?v[2].value?.data.histograms:null,Z=L?.[0]?.counts?.length?L:null,k="fulfilled"===v[3].status?v[3].value?.data??{}:{},U="fulfilled"===v[4].status?v[4].value?.data.multidimensionalInfo:null,z=U?.variables?.length?U:null;z&&z.variables.forEach((e=>{e.statistics?.length&&e.statistics.forEach((e=>{e.avg=e.mean,e.stddev=e.standardDeviation}))}));const{defaultVariable:R,serviceDataType:B}=y;R&&R!==k.DefaultVariable&&(k.DefaultVariable=R),B?.includes("esriImageServiceDataTypeVector")&&!B.includes(k.DataType)&&(k.DataType=B.replace("esriImageServiceDataType",""));let E=y.noDataValue;return y.noDataValues?.length&&y.noDataValues.some((e=>e!==E))&&(E=y.noDataValues),new a.A({width:T,height:S,bandCount:y.bandCount,extent:n.A.fromJSON(y.extent),spatialReference:N,pixelSize:new o.A({x:y.pixelSizeX,y:y.pixelSizeY,spatialReference:N}),pixelType:y.pixelType.toLowerCase(),statistics:b,attributeTable:_,colormap:x,histograms:Z,keyProperties:k,noDataValue:E,multidimensionalInfo:z})}function d(e,t,r){return c(e,{sourceJSON:t},r)}function p(e,t,r){return c(e,{rasterFunction:t},r)}function m(e,t){e.attributeTable||(t.hasRasterAttributeTable=!1),e.histograms||(t.hasHistograms=!1),e.colormap||(t.hasColormap=!1),e.multidimensionalInfo||(t.hasMultidimensions=!1)}},22671:(e,t,r)=>{r.d(t,{A:()=>w});var i,n=r(90237),o=r(59456),s=r(52106),a=r(66552),l=r(25482),u=r(4718),c=r(10107),d=(r(44208),r(53966),r(36005)),p=r(40608),m=r(43937),h=r(16930),g=r(65864),y=r(20437);const M=new a.J({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh","":null});let f=i=class extends l.oY{constructor(e){super(e),this.displayFieldName=null,this.exceededTransferLimit=!1,this.features=[],this.fields=null,this.geometryType=null,this.hasM=!1,this.hasZ=!1,this.queryGeometry=null,this.spatialReference=null}readFeatures(e,t){const r=h.A.fromJSON(t.spatialReference),i=[];for(let t=0;t<e.length;t++){const n=e[t],o=s.A.fromJSON(n),a=n.geometry?.spatialReference;null==o.geometry||a||(o.geometry.spatialReference=r);const l=n.aggregateGeometries,u=o.aggregateGeometries;if(l&&null!=u)for(const e in u){const t=u[e],i=l[e],n=i?.spatialReference;null==t||n||(t.spatialReference=r)}i.push(o)}return i}writeGeometryType(e,t,r,i){if(e)return void M.write(e,t,r,i);const{features:n}=this;if(n)for(const e of n)if(null!=e?.geometry)return void M.write(e.geometry.type,t,r,i)}readQueryGeometry(e,t){if(!e)return null;const r=!!e.spatialReference,i=(0,g.rS)(e);return i&&!r&&t.spatialReference&&(i.spatialReference=h.A.fromJSON(t.spatialReference)),i}writeSpatialReference(e,t){if(e)return void(t.spatialReference=e.toJSON());const{features:r}=this;if(r)for(const e of r)if(e&&null!=e.geometry&&e.geometry.spatialReference)return void(t.spatialReference=e.geometry.spatialReference.toJSON())}clone(){return new i(this.cloneProperties())}cloneProperties(){return(0,u.o8)({displayFieldName:this.displayFieldName,exceededTransferLimit:this.exceededTransferLimit,features:this.features,fields:this.fields,geometryType:this.geometryType,hasM:this.hasM,hasZ:this.hasZ,queryGeometry:this.queryGeometry,spatialReference:this.spatialReference,transform:this.transform})}toJSON(e){const t=this.write();if(t.features&&Array.isArray(e)&&e.length>0)for(let r=0;r<t.features.length;r++){const i=t.features[r];if(i.geometry){const t=e?.[r];i.geometry=t?.toJSON()||i.geometry}}return t}quantize(e){const{scale:[t,r],translate:[i,n]}=e,o=this.features,s=this._getQuantizationFunction(this.geometryType,(e=>Math.round((e-i)/t)),(e=>Math.round((n-e)/r)));for(let e=0,t=o.length;e<t;e++)s?.(o[e].geometry)||(o.splice(e,1),e--,t--);return this.transform=e,this}unquantize(){const{geometryType:e,features:t,transform:r}=this;if(!r)return this;const{translate:[i,n],scale:[o,s]}=r;let a=null,l=null;if(this.hasZ&&null!=r?.scale?.[2]){const{translate:[,,e],scale:[,,t]}=r;a=r=>r*t+e}if(this.hasM&&null!=r?.scale?.[3]){const{translate:[,,,e],scale:[,,,t]}=r;l=r=>null==r?r:r*t+e}const u=this._getHydrationFunction(e,(e=>e*o+i),(e=>n-e*s),a,l);for(const{geometry:e}of t)null!=e&&u&&u(e);return this.transform=null,this}_quantizePoints(e,t,r){let i,n;const o=[];for(let s=0,a=e.length;s<a;s++){const a=e[s];if(s>0){const e=t(a[0]),s=r(a[1]);e===i&&s===n||(o.push([e-i,s-n]),i=e,n=s)}else i=t(a[0]),n=r(a[1]),o.push([i,n])}return o.length>0?o:null}_getQuantizationFunction(e,t,r){return"point"===e?e=>(e.x=t(e.x),e.y=r(e.y),e):"polyline"===e||"polygon"===e?e=>{const i=(0,g.Bi)(e)?e.rings:e.paths,n=[];for(let e=0,o=i.length;e<o;e++){const o=i[e],s=this._quantizePoints(o,t,r);s&&n.push(s)}return n.length>0?((0,g.Bi)(e)?e.rings=n:e.paths=n,e):null}:"multipoint"===e?e=>{const i=this._quantizePoints(e.points,t,r);return i&&i.length>0?(e.points=i,e):null}:"extent"===e?e=>e:null}_getHydrationFunction(e,t,r,i,n){return"point"===e?e=>{e.x=t(e.x),e.y=r(e.y),i&&(e.z=i(e.z))}:"polyline"===e||"polygon"===e?e=>{const o=(0,g.Bi)(e)?e.rings:e.paths;let s,a;for(let e=0,i=o.length;e<i;e++){const i=o[e];for(let e=0,n=i.length;e<n;e++){const n=i[e];e>0?(s+=n[0],a+=n[1]):(s=n[0],a=n[1]),n[0]=t(s),n[1]=r(a)}}if(i&&n)for(let e=0,t=o.length;e<t;e++){const t=o[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=i(r[2]),r[3]=n(r[3])}}else if(i)for(let e=0,t=o.length;e<t;e++){const t=o[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=i(r[2])}}else if(n)for(let e=0,t=o.length;e<t;e++){const t=o[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=n(r[2])}}}:"extent"===e?e=>{e.xmin=t(e.xmin),e.ymin=r(e.ymin),e.xmax=t(e.xmax),e.ymax=r(e.ymax),i&&null!=e.zmax&&null!=e.zmin&&(e.zmax=i(e.zmax),e.zmin=i(e.zmin)),n&&null!=e.mmax&&null!=e.mmin&&(e.mmax=n(e.mmax),e.mmin=n(e.mmin))}:"multipoint"===e?e=>{const o=e.points;let s,a;for(let e=0,i=o.length;e<i;e++){const i=o[e];e>0?(s+=i[0],a+=i[1]):(s=i[0],a=i[1]),i[0]=t(s),i[1]=r(a)}if(i&&n)for(let e=0,t=o.length;e<t;e++){const t=o[e];t[2]=i(t[2]),t[3]=n(t[3])}else if(i)for(let e=0,t=o.length;e<t;e++){const t=o[e];t[2]=i(t[2])}else if(n)for(let e=0,t=o.length;e<t;e++){const t=o[e];t[2]=n(t[2])}}:null}};(0,n._)([(0,c.MZ)({type:String,json:{write:!0}})],f.prototype,"displayFieldName",void 0),(0,n._)([(0,c.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],f.prototype,"exceededTransferLimit",void 0),(0,n._)([(0,c.MZ)({type:[s.A],json:{write:!0}})],f.prototype,"features",void 0),(0,n._)([(0,d.w)("features")],f.prototype,"readFeatures",null),(0,n._)([(0,c.MZ)({type:[y.A],json:{write:!0}})],f.prototype,"fields",void 0),(0,n._)([(0,c.MZ)({type:["point","multipoint","polyline","polygon","extent","mesh"],json:{read:{reader:M.read}}})],f.prototype,"geometryType",void 0),(0,n._)([(0,m.K)("geometryType")],f.prototype,"writeGeometryType",null),(0,n._)([(0,c.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],f.prototype,"hasM",void 0),(0,n._)([(0,c.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],f.prototype,"hasZ",void 0),(0,n._)([(0,c.MZ)({types:o.yR,json:{write:!0}})],f.prototype,"queryGeometry",void 0),(0,n._)([(0,d.w)("queryGeometry")],f.prototype,"readQueryGeometry",null),(0,n._)([(0,c.MZ)({type:h.A,json:{write:!0}})],f.prototype,"spatialReference",void 0),(0,n._)([(0,m.K)("spatialReference")],f.prototype,"writeSpatialReference",null),(0,n._)([(0,c.MZ)({json:{write:!0}})],f.prototype,"transform",void 0),f=i=(0,n._)([(0,p.$)("esri.rest.support.FeatureSet")],f),f.prototype.toJSON.isDefaultToJSON=!0;const w=f},22048:(e,t,r)=>{r.d(t,{A:()=>w});var i,n=r(90237),o=r(59456),s=r(60945),a=r(51447),l=r(25482),u=r(4718),c=r(53966),d=r(10107),p=(r(44208),r(40608)),m=r(43937),h=r(65864),g=r(85675),y=r(22796),M=r(86738);let f=i=class extends l.oY{constructor(){super(...arguments),this.geometry=null,this.mosaicRule=null,this.rasterFunction=null,this.pixelSize=null,this.raster=void 0,this.timeExtent=null}writeGeometry(e,t,r){null!=e&&(t.geometryType=(0,h.$B)(e),t[r]=e.toJSON())}get renderingRule(){return(0,a.Lx)(c.A.getLogger(this),"renderingRule",{replacement:"rasterFunction",version:"4.27",warnOnce:!0}),this._get("rasterFunction")}set renderingRule(e){(0,a.Lx)(c.A.getLogger(this),"renderingRule",{replacement:"rasterFunction",version:"4.27",warnOnce:!0}),this._set("rasterFunction",e)}clone(){return new i((0,u.o8)({geometry:this.geometry,mosaicRule:this.mosaicRule,rasterFunction:this.rasterFunction,pixelSize:this.pixelSize,raster:this.raster,timeExtent:this.timeExtent}))}};(0,n._)([(0,d.MZ)({types:o.yR,json:{read:h.rS}})],f.prototype,"geometry",void 0),(0,n._)([(0,m.K)("geometry")],f.prototype,"writeGeometry",null),(0,n._)([(0,d.MZ)({type:g.A,json:{write:!0}})],f.prototype,"mosaicRule",void 0),(0,n._)([(0,d.MZ)({type:y.A})],f.prototype,"renderingRule",null),(0,n._)([(0,d.MZ)({type:y.A,json:{write:!0,name:"renderingRule"}})],f.prototype,"rasterFunction",void 0),(0,n._)([(0,d.MZ)({type:M.A,json:{write:!0}})],f.prototype,"pixelSize",void 0),(0,n._)([(0,d.MZ)({json:{write:!0}})],f.prototype,"raster",void 0),(0,n._)([(0,d.MZ)({type:s.A,json:{read:{source:"time"},write:{target:"time"}}})],f.prototype,"timeExtent",void 0),f=i=(0,n._)([(0,p.$)("esri.rest.support.ImageHistogramParameters")],f);const w=f},30291:(e,t,r)=>{r.d(t,{tn:()=>u});var i=r(13874),n=r(30524),o=r(28122),s=(r(84424),r(80737),r(96808),r(66159)),a=(r(67336),r(92094),r(23721),r(41227)),l=r(68780);function u({displayField:e,editFieldsInfo:t,fields:r,objectIdField:l,title:u},m){if(!r)return null;const g=function(e,t){const r=t?.visibleFieldNames;return function(e,t){const r=e;return t&&(e=e.filter((e=>!t.includes(e.type)))),e===r&&(e=e.slice()),e.sort(d),e}(e.fields??[],t?.ignoreFieldTypes||h).map((t=>new a.A({fieldName:t.name,isEditable:(0,n.R$)(t,e),label:t.alias,format:p(t),visible:c(t,{...e,visibleFieldNames:r})})))}({editFieldsInfo:t,fields:r,objectIdField:l},m);if(!g.length)return null;const y=function(e){const t=(0,n.mB)(e),{titleBase:r}=e;return t?`${r}: {${t.trim()}}`:r??""}({titleBase:u,fields:r,displayField:e}),M=[new s.A,new o.A];return new i.A({title:y,content:M,fieldInfos:g})}const c=(e,t)=>t.visibleFieldNames?t.visibleFieldNames.has(e.name):(0,n.Bz)(e,t);function d(e,t){return"oid"===e.type?-1:"oid"===t.type?1:m(e)?-1:m(t)?1:(e.alias||e.name).toLocaleLowerCase().localeCompare((t.alias||t.name).toLocaleLowerCase())}function p(e){switch(e.type){case"small-integer":case"integer":case"single":return new l.A({digitSeparator:!0,places:0});case"double":return new l.A({digitSeparator:!0,places:2});case"string":return(0,n.JL)(e.name)?new l.A({digitSeparator:!0,places:0}):null;default:return null}}function m(e){return"name"===(e.name&&e.name.toLowerCase())||"name"===(e.alias&&e.alias.toLowerCase())}const h=["geometry","blob","raster","guid","xml"]},92935:(e,t,r)=>{var i;r.d(t,{X:()=>i}),function(e){e[e.SAVE=0]="SAVE",e[e.SAVE_AS=1]="SAVE_AS"}(i||(i={}))}}]);