@arcgis/core 5.1.0-next.72 → 5.1.0-next.73

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 (104) hide show
  1. package/assets/esri/core/workers/RemoteClient.js +1 -1
  2. package/assets/esri/core/workers/chunks/{b801631b58e6fc6cec8a.js → 0ae360bf253adee46737.js} +1 -1
  3. package/assets/esri/core/workers/chunks/{b495f14d90abe8d1a558.js → 12e575a6d2b008b8fc2b.js} +1 -1
  4. package/assets/esri/core/workers/chunks/{61ef14e42bc09b787d89.js → 13e60f19f436b8d683ae.js} +1 -1
  5. package/assets/esri/core/workers/chunks/{7e6ccf9f3e756186e93e.js → 29e76256e3e867e80520.js} +1 -1
  6. package/assets/esri/core/workers/chunks/{bea70be8e38b8c83ccd2.js → 30f04dc001eaf838d64c.js} +1 -1
  7. package/assets/esri/core/workers/chunks/{628f56c09838eb9c573b.js → 422824e407b550170c8c.js} +1 -1
  8. package/assets/esri/core/workers/chunks/{68b47a5a50e0b5fffca2.js → 5c663d5f98bdfa29151b.js} +1 -1
  9. package/assets/esri/core/workers/chunks/{ae0a572cbbdd9815ee2e.js → 62b3e933f548ce354b99.js} +1 -1
  10. package/assets/esri/core/workers/chunks/{6f9ea461c268c421f9c9.js → 7951d93f5f15aa76f49c.js} +1 -1
  11. package/assets/esri/core/workers/chunks/{b79058f5bda6fcac22f8.js → 80ace1c7203c5059525d.js} +1 -1
  12. package/assets/esri/core/workers/chunks/{b92794def31592a6a25f.js → 8d75f6f27c1c17c33992.js} +1 -1
  13. package/assets/esri/core/workers/chunks/95d82c619dcbec2e1050.js +1 -0
  14. package/assets/esri/core/workers/chunks/9eb4ae556950e1d0124d.js +2 -0
  15. package/assets/esri/core/workers/chunks/{02876e434dc91c42b2f4.js → a78bc340a794fd332667.js} +1 -1
  16. package/assets/esri/core/workers/chunks/{1edd39c7c4acdc591d10.js → a809b811121099a87a98.js} +1 -1
  17. package/assets/esri/core/workers/chunks/abdf146b35e179b5b245.js +1 -0
  18. package/assets/esri/core/workers/chunks/{d2aa75816e84b1e7fd25.js → afc0baf86ece710ef867.js} +1 -1
  19. package/assets/esri/core/workers/chunks/b6cadb8a579241adcb86.js +1 -0
  20. package/assets/esri/core/workers/chunks/{3cd9bd20e75ba4d5b294.js → b9848bdbaf3d9ac93d54.js} +1 -1
  21. package/assets/esri/core/workers/chunks/{b475f5492c6e3fd4cca8.js → bef27a25fbc4a6e19ec0.js} +1 -1
  22. package/assets/esri/core/workers/chunks/{a65d576e90179a2b5400.js → c5507480344176fad241.js} +1 -1
  23. package/assets/esri/core/workers/chunks/c70df6ed190f9ebcf6aa.js +1 -0
  24. package/assets/esri/core/workers/chunks/cd7159600ce132e32d04.js +1 -0
  25. package/assets/esri/core/workers/chunks/{dec6d41d614105e6fd93.js → cfe246adb5e6cb6f0cfc.js} +1 -1
  26. package/assets/esri/core/workers/chunks/{91a0227a64a944af3286.js → d17fcfc502f0e0fa6523.js} +2 -2
  27. package/assets/esri/core/workers/chunks/d65b1234867f7d773d50.js +2 -0
  28. package/assets/esri/core/workers/chunks/{aa1a3a849aba84cf585b.js → e1bc9ad767e08dc18bbc.js} +1 -1
  29. package/assets/esri/core/workers/chunks/e25a684eb9f025bdcc01.js +1 -0
  30. package/assets/esri/core/workers/chunks/e272411e2c9378aa8496.js +1312 -0
  31. package/assets/esri/core/workers/chunks/{0d96e39380fd84cea9ba.js → f207b3be0714cc50030a.js} +1 -1
  32. package/assets/esri/core/workers/chunks/f53805c7a84203305b2c.js +1 -0
  33. package/assets/esri/core/workers/chunks/{c1838822b096d5f36a8b.js → f5c57ff48ca505ed701d.js} +1 -1
  34. package/chunks/GlobalIllumination.glsl.js +186 -116
  35. package/chunks/GlobalIlluminationBlur.glsl.js +81 -61
  36. package/chunks/GlobalIlluminationUpscale.glsl.js +66 -0
  37. package/config.js +1 -1
  38. package/form/elements/FieldElement.d.ts +3 -2
  39. package/form/elements/inputs/Input.d.ts +1 -1
  40. package/form/elements/inputs/MultipleChoiceInput.d.ts +65 -0
  41. package/form/elements/inputs/MultipleChoiceInput.js +2 -0
  42. package/form/elements/inputs/inputUtils.js +1 -1
  43. package/form/elements/inputs/multipleChoice/Choice.d.ts +30 -0
  44. package/form/elements/inputs/multipleChoice/Choice.js +2 -0
  45. package/form/elements/inputs/multipleChoice/OtherChoice.d.ts +28 -0
  46. package/form/elements/inputs/multipleChoice/OtherChoice.js +2 -0
  47. package/form/elements/inputs.d.ts +11 -2
  48. package/form/elements/inputs.js +1 -1
  49. package/form/support/formUtils.js +1 -1
  50. package/interfaces.d.ts +28 -0
  51. package/kernel.js +1 -1
  52. package/layers/Lyr3DWasmPerSceneView.js +1 -1
  53. package/package.json +2 -2
  54. package/support/revision.js +1 -1
  55. package/third-party-notices.txt +7 -29
  56. package/views/2d/engine/webgl/shaders/sources/shaderRepository.js +1 -1
  57. package/views/3d/environment/EnvironmentManager.js +1 -1
  58. package/views/3d/layers/I3SMeshView3D.js +1 -1
  59. package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
  60. package/views/3d/support/orientedBoundingBox.js +1 -1
  61. package/views/3d/terrain/TerrainRenderer.js +1 -1
  62. package/views/3d/webgl-engine/collections/Component/Material/ComponentMaterial.js +1 -1
  63. package/views/3d/webgl-engine/core/shaderLibrary/shading/GlobalIlluminationWeights.glsl.js +21 -0
  64. package/views/3d/webgl-engine/core/shaderLibrary/shading/ReadGlobalIllumination.glsl.js +11 -7
  65. package/views/3d/webgl-engine/effects/globalIllumination/GlobalIllumination.glsl.js +2 -0
  66. package/views/3d/webgl-engine/effects/globalIllumination/GlobalIllumination.js +1 -1
  67. package/views/3d/webgl-engine/effects/globalIllumination/GlobalIlluminationBlur.glsl.js +2 -0
  68. package/views/3d/webgl-engine/effects/globalIllumination/GlobalIlluminationBlurTechnique.js +1 -1
  69. package/views/3d/webgl-engine/effects/globalIllumination/GlobalIlluminationTechnique.js +1 -1
  70. package/views/3d/webgl-engine/effects/globalIllumination/GlobalIlluminationUpscale.glsl.js +2 -0
  71. package/views/3d/webgl-engine/effects/globalIllumination/GlobalIlluminationUpscaleTechnique.js +2 -0
  72. package/views/3d/webgl-engine/effects/glow/GlowRenderNode.js +1 -1
  73. package/views/3d/webgl-engine/lib/BindParameters.js +1 -1
  74. package/views/3d/webgl-engine/lib/RenderFeature.js +1 -1
  75. package/views/3d/webgl-engine/lib/Renderer.js +1 -1
  76. package/views/3d/webgl-engine/materials/DefaultMaterial.js +1 -1
  77. package/views/interactive/sketch/SketchOptions.d.ts +3 -1
  78. package/views/interactive/sketch/SketchTooltipOptions.d.ts +6 -0
  79. package/views/support/Scheduler.js +1 -1
  80. package/widgets/BatchAttributeForm/BatchAttributeFormViewModel.js +1 -1
  81. package/widgets/BatchAttributeForm/batchAttributeFormUtils.js +1 -1
  82. package/widgets/BatchAttributeForm/inputs/SingleFeatureInputAdapter.js +2 -0
  83. package/widgets/BatchAttributeForm/inputs/TextElementInput.d.ts +28 -4
  84. package/widgets/BatchAttributeForm/inputs/TextElementInput.js +1 -1
  85. package/widgets/BatchAttributeForm/templates/AttachmentElementTemplate.js +2 -0
  86. package/widgets/BatchAttributeForm/templates/support/createBatchFormTemplate.js +1 -1
  87. package/widgets/BatchAttributeForm/templates/support/hashElementTemplate.js +1 -1
  88. package/widgets/BatchAttributeForm/templates/support/templateUtils.js +1 -1
  89. package/widgets/Search/support/layerSearchUtils.js +1 -1
  90. package/widgets/support/widgetUtils.js +1 -1
  91. package/assets/esri/core/workers/chunks/85edbb072a2ce6c1bb30.js +0 -2
  92. package/assets/esri/core/workers/chunks/943cf0653a2b7de16a4f.js +0 -1
  93. package/assets/esri/core/workers/chunks/a37fc886227365f7ecd5.js +0 -1
  94. package/assets/esri/core/workers/chunks/d0c3ab70f390cd579fed.js +0 -1
  95. package/assets/esri/core/workers/chunks/d4a9eb4470cc6a1f67fc.js +0 -2
  96. package/assets/esri/core/workers/chunks/dca595fdd5e1a571e441.js +0 -1
  97. package/assets/esri/core/workers/chunks/de583214195eff13cb00.js +0 -1140
  98. package/assets/esri/core/workers/chunks/df8143b72ef94806c992.js +0 -1
  99. package/assets/esri/core/workers/chunks/ef013a77950c1902de11.js +0 -1
  100. package/views/3d/webgl-engine/core/shaderLibrary/shading/EncodingColor.glsl.js +0 -7
  101. package/views/3d/webgl-engine/shaders/GlobalIllumination.glsl.js +0 -2
  102. package/views/3d/webgl-engine/shaders/GlobalIlluminationBlur.glsl.js +0 -2
  103. /package/assets/esri/core/workers/chunks/{85edbb072a2ce6c1bb30.js.LICENSE.txt → 9eb4ae556950e1d0124d.js.LICENSE.txt} +0 -0
  104. /package/assets/esri/core/workers/chunks/{d4a9eb4470cc6a1f67fc.js.LICENSE.txt → d65b1234867f7d773d50.js.LICENSE.txt} +0 -0
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{removeUnordered as e,filterInPlace as t}from"../../core/arrayUtils.js";import s from"../../core/Handles.js";import"../../core/has.js";import r from"../../core/Logger.js";import{removeMaybe as i}from"../../core/maybe.js";import{recordPerformance as a}from"../../core/performance.js";import n from"../../core/PerformanceSampler.js";import{isAborted as u,createAbortError as _,when as h,isPromiseLike as o,ignoreAbortErrors as E}from"../../core/promiseUtils.js";import{watch as d,initial as T,when as c}from"../../core/reactiveUtils.js";import{signal as m}from"../../core/signal.js";import{Milliseconds as l}from"../../core/time.js";import R from"./debugFlags.js";import{PromiseQueue as g}from"./PromiseQueue.js";import{Yield as I}from"./Yield.js";function A(){return new C}const p={RESOURCE_CONTROLLER_IMMEDIATE:"immediate",RESOURCE_CONTROLLER:"schedule",SLIDE:"slide",STREAM_DATA_LOADER:"stream loader",ELEVATION_QUERY:"elevation query",TERRAIN_SURFACE:"terrain",SURFACE_GEOMETRY_UPDATES:"surface geometry updates",LOD_RENDERER:"LoD renderer",GRAPHICS_CORE:"Graphics3D",I3S:"I3S",TILES3D:"3DTiles",POINT_CLOUD_LAYER:"point cloud",FEATURE_TILE_FETCHER:"feature fetcher",STREAM_CONTROLLER:"stream controller",OCCLUSION_QUERY:"occlusion query",OVERLAY:"overlay",OVERLAY_RENDERER:"overlay renderer",STAGE:"stage",GRAPHICS_DECONFLICTOR:"graphics deconflictor",FILTER_VISIBILITY:"graphics filter visibility",SCALE_VISIBILITY:"graphics scale visibility",FRUSTUM_VISIBILITY:"graphics frustum visibility",POINT_OF_INTEREST_FREQUENT:"POI frequent",POINT_OF_INTEREST_INFREQUENT:"POI infrequent",LABELER:"labeler",FEATURE_QUERY_ENGINE:"feature query",FEATURE_TILE_TREE:"feature tile tree",FEATURE_TILE_TREE_ACTIVE:"fast feature tile tree",ELEVATION_ALIGNMENT:"elevation alignment",ELEVATION_ALIGNMENT_SCENE:"elevation alignment scene",TEXT_TEXTURE_ATLAS:"text texture atlas",TEXTURE_UNLOAD:"texture unload",LINE_OF_SIGHT_TOOL:"line of sight tool",LINE_OF_SIGHT_TOOL_INTERACTIVE:"interactive line of sight tool",VOLUME_MEASUREMENT:"volume measurement",ELEVATION_PROFILE:"elevation profile",SNAPPING:"snapping",SHADOW_ACCUMULATOR:"shadow accumulator",CLOUDS_GENERATOR:"clouds generator",FLOW_GENERATOR:"flow generator",GAUSSIAN_SPLAT_SORTING:"gaussian splat sorting",GAUSSIAN_SPLAT_TEXTURE_ATLAS:"gaussian splat texture atlas",MAPVIEW_FETCH_QUEUE:"mapview fetch queue",MAPVIEW_LAYERVIEW_UPDATE:"mapview layerview update",MAPVIEW_VECTOR_TILE_PARSING_QUEUE:"mapview vector tile parsing queue",NONE:0,TEST_PRIO:1},f=0,L=new Map([[p.RESOURCE_CONTROLLER_IMMEDIATE,f],[p.RESOURCE_CONTROLLER,4],[p.SLIDE,f],[p.STREAM_DATA_LOADER,f],[p.ELEVATION_QUERY,f],[p.TERRAIN_SURFACE,1],[p.SURFACE_GEOMETRY_UPDATES,1],[p.LOD_RENDERER,2],[p.GRAPHICS_CORE,2],[p.I3S,2],[p.TILES3D,2],[p.POINT_CLOUD_LAYER,2],[p.FEATURE_TILE_FETCHER,2],[p.STREAM_CONTROLLER,2],[p.CLOUDS_GENERATOR,2],[p.OCCLUSION_QUERY,2],[p.OVERLAY,4],[p.OVERLAY_RENDERER,4],[p.STAGE,4],[p.GRAPHICS_DECONFLICTOR,4],[p.FILTER_VISIBILITY,4],[p.SCALE_VISIBILITY,4],[p.FRUSTUM_VISIBILITY,4],[p.POINT_OF_INTEREST_FREQUENT,6],[p.POINT_OF_INTEREST_INFREQUENT,30],[p.LABELER,8],[p.FEATURE_QUERY_ENGINE,8],[p.FEATURE_TILE_TREE,16],[p.FEATURE_TILE_TREE_ACTIVE,f],[p.ELEVATION_ALIGNMENT,12],[p.ELEVATION_ALIGNMENT_SCENE,14],[p.TEXT_TEXTURE_ATLAS,12],[p.TEXTURE_UNLOAD,12],[p.LINE_OF_SIGHT_TOOL,16],[p.LINE_OF_SIGHT_TOOL_INTERACTIVE,f],[p.VOLUME_MEASUREMENT,4],[p.SNAPPING,f],[p.SHADOW_ACCUMULATOR,30],[p.FLOW_GENERATOR,12],[p.GAUSSIAN_SPLAT_SORTING,2],[p.GAUSSIAN_SPLAT_TEXTURE_ATLAS,12],[p.MAPVIEW_FETCH_QUEUE,f],[p.MAPVIEW_LAYERVIEW_UPDATE,2],[p.MAPVIEW_VECTOR_TILE_PARSING_QUEUE,f]]);function O(e){return L.has(e)?L.get(e):"number"==typeof e?e:1}const S=l(6.5),N=l(1),U=l(30),b=l(1e3/30),P=l(100),k=.9;class C{get updating(){return this._updating.value}_updatingChanged(){this._updating.value=this._tasks.some(e=>e.needsUpdate)}constructor(){this._updating=m(!0),this._microTaskQueued=!1,this._frameNumber=0,this.performanceInfo={total:new n("total"),tasks:new Map},this._frameTaskTimes=new Map,this._budget=new F,this.state=1,this._tasks=new Array,this._runQueue=new Array,this._load=0,this._forceTask=!1,this._debug=!1,this._debugHandle=d(()=>R.SCHEDULER_LOG_SLOW_TASKS,e=>this._debug=e,T);for(const e of Object.keys(p))this.performanceInfo.tasks.set(p[e],new n(String(p[e])))}destroy(){this._tasks.forEach(e=>e.remove()),this._tasks.length=0,this._runQueue.length=0,i(this._debugHandle),this._microTaskQueued=!1,this._updatingChanged()}taskRunningChanged(e){this._updatingChanged(),e&&this._budget.remaining>0&&!this._microTaskQueued&&(this._microTaskQueued=!0,queueMicrotask(()=>{this._microTaskQueued&&(this._microTaskQueued=!1,this._budget.remaining>0&&this._schedule()&&this._runFrame())}))}registerTask(e,t){const s=new y(this,e,t);return this._tasks.push(s),this._updatingChanged(),this.performanceInfo.tasks.has(e)||this.performanceInfo.tasks.set(e,new n(e)),s}get load(){return this._load}frame(e){if(this._startFrameTaskTimes(),this._updateBudget(e)){const e=this._budget.now();this._runFrame();const t=this._budget.now();this._recordFrameTaskTimes(t-e);const s=2===this.state?"Idle":1===this.state?"Interacting":"Animating";return a(`${s} Frame Tasks`,e,t,"Maps SDK","Scheduling"),!0}return this._recordFrameTaskTimes(0),!1}_updateBudget(e){this._test&&(this._test.usedBudget=0),++this._frameNumber;let t=S,s=e.frameDuration,r=N;switch(this.state){case 2:t=l(0),s=l(Math.max(P,e.frameDuration)),r=U;break;case 1:s=l(Math.max(b,e.frameDuration))}return s=l(s-e.elapsedFrameTime-t),2!==this.state&&s<N&&!this._forceTask?(this._forceTask=!0,!1):(s=l(Math.max(s,r)),this._budget.reset(s),this._updateLoad(),this._schedule())}_runFrame(){this._forceTask=!1,this._microTaskQueued=!1,this._run(),this._test&&(this._test.usedBudget=this._budget.elapsed)}stopFrame(){this._budget.reset(l(0)),this._budget.madeProgress()}removeTask(t){e(this._tasks,t),e(this._runQueue,t),this._updatingChanged()}_updateTask(e){this._tasks.forEach(t=>{t.name===e&&t.setPriority(e)})}_getState(e){if(this._runQueue.some(t=>t.name===e))return"s";let t="i";return this._tasks.forEach(s=>{s.name===e&&s.needsUpdate&&(s.schedulePriority<=1?t="r":"r"!==t&&(t="w"))}),t}_getRuntime(e){let t=0;return this._tasks.forEach(s=>{s.name===e&&(t+=s.runtime)}),t}_resetRuntimes(){this._tasks.forEach(e=>e.runtime=0)}_getRunning(){const e=new Map;if(this._tasks.forEach(t=>{t.needsUpdate&&e.set(t.name,(e.get(t.name)||0)+1)}),0===e.size)return null;let t="";return e.forEach((e,s)=>{t+=e>1?` ${e}x ${s}`:` ${s}`}),t}_updateLoad(){const e=this._tasks.reduce((e,t)=>t.needsUpdate?++e:e,0);this._load=this._load*k+e*(1-k)}_schedule(){for(t(this._runQueue,e=>!!e.needsUpdate||(e.schedulePriority=e.basePriority,!1)),this._tasks.forEach(e=>{e.basePriority===f&&e.needsUpdate&&!this._runQueue.includes(e)&&e.blockFrame!==this._frameNumber&&this._runQueue.unshift(e)});0===this._runQueue.length;){let e=!1,t=0;if(this._tasks.forEach(s=>{if(s.needsUpdate&&0!==s.schedulePriority&&s.basePriority!==f&&s.blockFrame!==this._frameNumber)if(e=!0,t=Math.max(t,s.basePriority),1===s.schedulePriority)s.schedulePriority=0,this._runQueue.push(s);else--s.schedulePriority}),!e)return this._updatingChanged(),!1}return this._updatingChanged(),!0}_run(){do{for(;this._runQueue.length>0;){const t=this._budget.now(),s=this._runQueue.pop();this._budget.resetProgress();try{s.task.runTask(this._budget)===I&&(s.blockFrame=this._frameNumber)}catch(e){r.getLogger("esri.views.support.Scheduler").error(`Exception in task "${s.name}"`,e),s.blockFrame=this._frameNumber}!this._budget.hasProgressed&&s.blockFrame!==this._frameNumber&&s.needsUpdate&&(s.name,p.I3S,s.blockFrame=this._frameNumber),s.schedulePriority=s.basePriority;const i=this._budget.now(),n=i-t;if(a(`${s.name}`,t,i,"Maps SDK","Scheduling"),s.runtime+=n,this._frameTaskTimes.set(s.priority,this._frameTaskTimes.get(s.priority)+n),this._budget.remaining<=0)return void this._updatingChanged()}}while(this._schedule());this._updatingChanged()}_startFrameTaskTimes(){for(const e of Object.keys(p))this._frameTaskTimes.set(p[e],0)}_recordFrameTaskTimes(e){this._frameTaskTimes.forEach((e,t)=>this.performanceInfo.tasks.get(t).push(e)),this.performanceInfo.total.push(e)}get test(){return this._test}}class y{get task(){return this._task.value}get readyToRun(){return this._queue.readyToRun}get updating(){return this._queue.updating}constructor(e,t,r){this._scheduler=e,this.name=t,this.blockFrame=0,this.runtime=0,this._queue=new g,this._handles=new s,this._basePriority=O(t),this.schedulePriority=this._basePriority,this._task=m(null!=r?r:this._queue),this._handles.add(c(()=>this.task.readyToRun,t=>e.taskRunningChanged(t)))}remove(){this.processQueue(w),this._scheduler.removeTask(this),this.schedule=G.schedule,this.reschedule=G.reschedule,this.scheduleGenerator=G.scheduleGenerator,this._handles.destroy()}get basePriority(){return this._basePriority}setPriority(e){if(this.name===e)return;this.name=e;const t=O(e);this._basePriority!==f&&0===this.schedulePriority||(this.schedulePriority=t),this._basePriority=t}get priority(){return this.name}set priority(e){this.setPriority(e)}get needsUpdate(){return this.readyToRun||!this.task.destroyed&&this.task.readyToRun}schedule(e,t,s){return this._queue.push(e,t,s)}reschedule(e,t,s){return this._queue.unshift(e,t,s)}scheduleGenerator(e,t,s){return this._queue.pushGenerator(e,t,s)}processQueue(e){return this._queue.runTask(e)}}class F{constructor(){this._begin=performance?.now()??0,this._budget=0,this._done=!1,this._progressed=!1,this._enabled=!0}run(e){return!this.done&&(!0===e()&&this.madeProgress(),!0)}get done(){return this._done}get budget(){return this._budget}madeProgress(){return this._progressed=!0,this._done=this.elapsed>=this._budget&&this._enabled,this._done}get enabled(){return this._enabled}set enabled(e){this._enabled=e}reset(e){this._begin=this.now(),this._budget=e,this.resetProgress()}get remaining(){return Math.max(this._budget-this.elapsed,0)}now(){return performance.now()}get elapsed(){return this.now()-this._begin}resetProgress(){this._progressed=!1,this._done=!1}get hasProgressed(){return this._progressed}}const w=new F;function M(e){const t=new F;return t.reset(e),t}w.enabled=!1;class D{remove(){}processQueue(){}schedule(e,t,s){try{if(u(t)){const e=_();return s?Promise.resolve(s(e)):Promise.reject(e)}return h(e(w))}catch(r){return Promise.reject(r)}}reschedule(e,t,s){return this.schedule(e,t,s)}async scheduleGenerator(e,t,s){if(u(t)){const e=_();if(s)return s(e);throw e}const r=e(w);for(;;){const e=r.next(w),i=o(e)?await e:e;if(u(t)){const e=_();if(s){const t=s(e),i=r.return(null);return o(i)&&await E(i),t}const t=r.throw(e);throw o(t)&&await E(t),e}if(i.done)return i.value}}}const G=new D;export{G as ImmediateTask,p as TaskPriority,O as getTaskPriority,M as makeBudget,A as newScheduler,w as noBudget,L as taskPriorities};
2
+ import{removeUnordered as e,filterInPlace as t}from"../../core/arrayUtils.js";import s from"../../core/Handles.js";import"../../core/has.js";import r from"../../core/Logger.js";import{removeMaybe as i}from"../../core/maybe.js";import{recordPerformance as a}from"../../core/performance.js";import n from"../../core/PerformanceSampler.js";import{isAborted as u,createAbortError as _,when as h,isPromiseLike as o,ignoreAbortErrors as E}from"../../core/promiseUtils.js";import{watch as d,initial as T,when as c}from"../../core/reactiveUtils.js";import{signal as m}from"../../core/signal.js";import{Milliseconds as l}from"../../core/time.js";import R from"./debugFlags.js";import{PromiseQueue as g}from"./PromiseQueue.js";import{Yield as I}from"./Yield.js";function A(){return new C}const p={RESOURCE_CONTROLLER_IMMEDIATE:"immediate",RESOURCE_CONTROLLER:"schedule",SLIDE:"slide",STREAM_DATA_LOADER:"stream loader",ELEVATION_QUERY:"elevation query",TERRAIN_SURFACE:"terrain",SURFACE_GEOMETRY_UPDATES:"surface geometry updates",LOD_RENDERER:"LoD renderer",GRAPHICS_CORE:"Graphics3D",I3S:"I3S",LYR3D:"Lyr3D",TILES3D:"3DTiles",POINT_CLOUD_LAYER:"point cloud",FEATURE_TILE_FETCHER:"feature fetcher",STREAM_CONTROLLER:"stream controller",OCCLUSION_QUERY:"occlusion query",OVERLAY:"overlay",OVERLAY_RENDERER:"overlay renderer",STAGE:"stage",GRAPHICS_DECONFLICTOR:"graphics deconflictor",FILTER_VISIBILITY:"graphics filter visibility",SCALE_VISIBILITY:"graphics scale visibility",FRUSTUM_VISIBILITY:"graphics frustum visibility",POINT_OF_INTEREST_FREQUENT:"POI frequent",POINT_OF_INTEREST_INFREQUENT:"POI infrequent",LABELER:"labeler",FEATURE_QUERY_ENGINE:"feature query",FEATURE_TILE_TREE:"feature tile tree",FEATURE_TILE_TREE_ACTIVE:"fast feature tile tree",ELEVATION_ALIGNMENT:"elevation alignment",ELEVATION_ALIGNMENT_SCENE:"elevation alignment scene",TEXT_TEXTURE_ATLAS:"text texture atlas",TEXTURE_UNLOAD:"texture unload",LINE_OF_SIGHT_TOOL:"line of sight tool",LINE_OF_SIGHT_TOOL_INTERACTIVE:"interactive line of sight tool",VOLUME_MEASUREMENT:"volume measurement",ELEVATION_PROFILE:"elevation profile",SNAPPING:"snapping",SHADOW_ACCUMULATOR:"shadow accumulator",CLOUDS_GENERATOR:"clouds generator",FLOW_GENERATOR:"flow generator",GAUSSIAN_SPLAT_SORTING:"gaussian splat sorting",GAUSSIAN_SPLAT_TEXTURE_ATLAS:"gaussian splat texture atlas",MAPVIEW_FETCH_QUEUE:"mapview fetch queue",MAPVIEW_LAYERVIEW_UPDATE:"mapview layerview update",MAPVIEW_VECTOR_TILE_PARSING_QUEUE:"mapview vector tile parsing queue",NONE:0,TEST_PRIO:1},L=0,f=new Map([[p.RESOURCE_CONTROLLER_IMMEDIATE,L],[p.RESOURCE_CONTROLLER,4],[p.SLIDE,L],[p.STREAM_DATA_LOADER,L],[p.ELEVATION_QUERY,L],[p.TERRAIN_SURFACE,1],[p.SURFACE_GEOMETRY_UPDATES,1],[p.LOD_RENDERER,2],[p.GRAPHICS_CORE,2],[p.I3S,2],[p.LYR3D,2],[p.TILES3D,2],[p.POINT_CLOUD_LAYER,2],[p.FEATURE_TILE_FETCHER,2],[p.STREAM_CONTROLLER,2],[p.CLOUDS_GENERATOR,2],[p.OCCLUSION_QUERY,2],[p.OVERLAY,4],[p.OVERLAY_RENDERER,4],[p.STAGE,4],[p.GRAPHICS_DECONFLICTOR,4],[p.FILTER_VISIBILITY,4],[p.SCALE_VISIBILITY,4],[p.FRUSTUM_VISIBILITY,4],[p.POINT_OF_INTEREST_FREQUENT,6],[p.POINT_OF_INTEREST_INFREQUENT,30],[p.LABELER,8],[p.FEATURE_QUERY_ENGINE,8],[p.FEATURE_TILE_TREE,16],[p.FEATURE_TILE_TREE_ACTIVE,L],[p.ELEVATION_ALIGNMENT,12],[p.ELEVATION_ALIGNMENT_SCENE,14],[p.TEXT_TEXTURE_ATLAS,12],[p.TEXTURE_UNLOAD,12],[p.LINE_OF_SIGHT_TOOL,16],[p.LINE_OF_SIGHT_TOOL_INTERACTIVE,L],[p.VOLUME_MEASUREMENT,4],[p.SNAPPING,L],[p.SHADOW_ACCUMULATOR,30],[p.FLOW_GENERATOR,12],[p.GAUSSIAN_SPLAT_SORTING,2],[p.GAUSSIAN_SPLAT_TEXTURE_ATLAS,12],[p.MAPVIEW_FETCH_QUEUE,L],[p.MAPVIEW_LAYERVIEW_UPDATE,2],[p.MAPVIEW_VECTOR_TILE_PARSING_QUEUE,L]]);function O(e){return f.has(e)?f.get(e):"number"==typeof e?e:1}const S=l(6.5),N=l(1),U=l(30),b=l(1e3/30),P=l(100),k=.9;class C{get updating(){return this._updating.value}_updatingChanged(){this._updating.value=this._tasks.some(e=>e.needsUpdate)}constructor(){this._updating=m(!0),this._microTaskQueued=!1,this._frameNumber=0,this.performanceInfo={total:new n("total"),tasks:new Map},this._frameTaskTimes=new Map,this._budget=new F,this.state=1,this._tasks=new Array,this._runQueue=new Array,this._load=0,this._forceTask=!1,this._debug=!1,this._debugHandle=d(()=>R.SCHEDULER_LOG_SLOW_TASKS,e=>this._debug=e,T);for(const e of Object.keys(p))this.performanceInfo.tasks.set(p[e],new n(String(p[e])))}destroy(){this._tasks.forEach(e=>e.remove()),this._tasks.length=0,this._runQueue.length=0,i(this._debugHandle),this._microTaskQueued=!1,this._updatingChanged()}taskRunningChanged(e){this._updatingChanged(),e&&this._budget.remaining>0&&!this._microTaskQueued&&(this._microTaskQueued=!0,queueMicrotask(()=>{this._microTaskQueued&&(this._microTaskQueued=!1,this._budget.remaining>0&&this._schedule()&&this._runFrame())}))}registerTask(e,t){const s=new y(this,e,t);return this._tasks.push(s),this._updatingChanged(),this.performanceInfo.tasks.has(e)||this.performanceInfo.tasks.set(e,new n(e)),s}get load(){return this._load}frame(e){if(this._startFrameTaskTimes(),this._updateBudget(e)){const e=this._budget.now();this._runFrame();const t=this._budget.now();this._recordFrameTaskTimes(t-e);const s=2===this.state?"Idle":1===this.state?"Interacting":"Animating";return a(`${s} Frame Tasks`,e,t,"Maps SDK","Scheduling"),!0}return this._recordFrameTaskTimes(0),!1}_updateBudget(e){this._test&&(this._test.usedBudget=0),++this._frameNumber;let t=S,s=e.frameDuration,r=N;switch(this.state){case 2:t=l(0),s=l(Math.max(P,e.frameDuration)),r=U;break;case 1:s=l(Math.max(b,e.frameDuration))}return s=l(s-e.elapsedFrameTime-t),2!==this.state&&s<N&&!this._forceTask?(this._forceTask=!0,!1):(s=l(Math.max(s,r)),this._budget.reset(s),this._updateLoad(),this._schedule())}_runFrame(){this._forceTask=!1,this._microTaskQueued=!1,this._run(),this._test&&(this._test.usedBudget=this._budget.elapsed)}stopFrame(){this._budget.reset(l(0)),this._budget.madeProgress()}removeTask(t){e(this._tasks,t),e(this._runQueue,t),this._updatingChanged()}_updateTask(e){this._tasks.forEach(t=>{t.name===e&&t.setPriority(e)})}_getState(e){if(this._runQueue.some(t=>t.name===e))return"s";let t="i";return this._tasks.forEach(s=>{s.name===e&&s.needsUpdate&&(s.schedulePriority<=1?t="r":"r"!==t&&(t="w"))}),t}_getRuntime(e){let t=0;return this._tasks.forEach(s=>{s.name===e&&(t+=s.runtime)}),t}_resetRuntimes(){this._tasks.forEach(e=>e.runtime=0)}_getRunning(){const e=new Map;if(this._tasks.forEach(t=>{t.needsUpdate&&e.set(t.name,(e.get(t.name)||0)+1)}),0===e.size)return null;let t="";return e.forEach((e,s)=>{t+=e>1?` ${e}x ${s}`:` ${s}`}),t}_updateLoad(){const e=this._tasks.reduce((e,t)=>t.needsUpdate?++e:e,0);this._load=this._load*k+e*(1-k)}_schedule(){for(t(this._runQueue,e=>!!e.needsUpdate||(e.schedulePriority=e.basePriority,!1)),this._tasks.forEach(e=>{e.basePriority===L&&e.needsUpdate&&!this._runQueue.includes(e)&&e.blockFrame!==this._frameNumber&&this._runQueue.unshift(e)});0===this._runQueue.length;){let e=!1,t=0;if(this._tasks.forEach(s=>{if(s.needsUpdate&&0!==s.schedulePriority&&s.basePriority!==L&&s.blockFrame!==this._frameNumber)if(e=!0,t=Math.max(t,s.basePriority),1===s.schedulePriority)s.schedulePriority=0,this._runQueue.push(s);else--s.schedulePriority}),!e)return this._updatingChanged(),!1}return this._updatingChanged(),!0}_run(){do{for(;this._runQueue.length>0;){const t=this._budget.now(),s=this._runQueue.pop();this._budget.resetProgress();try{s.task.runTask(this._budget)===I&&(s.blockFrame=this._frameNumber)}catch(e){r.getLogger("esri.views.support.Scheduler").error(`Exception in task "${s.name}"`,e),s.blockFrame=this._frameNumber}!this._budget.hasProgressed&&s.blockFrame!==this._frameNumber&&s.needsUpdate&&(s.name,p.I3S,s.blockFrame=this._frameNumber),s.schedulePriority=s.basePriority;const i=this._budget.now(),n=i-t;if(a(`${s.name}`,t,i,"Maps SDK","Scheduling"),s.runtime+=n,this._frameTaskTimes.set(s.priority,this._frameTaskTimes.get(s.priority)+n),this._budget.remaining<=0)return void this._updatingChanged()}}while(this._schedule());this._updatingChanged()}_startFrameTaskTimes(){for(const e of Object.keys(p))this._frameTaskTimes.set(p[e],0)}_recordFrameTaskTimes(e){this._frameTaskTimes.forEach((e,t)=>this.performanceInfo.tasks.get(t).push(e)),this.performanceInfo.total.push(e)}get test(){return this._test}}class y{get task(){return this._task.value}get readyToRun(){return this._queue.readyToRun}get updating(){return this._queue.updating}constructor(e,t,r){this._scheduler=e,this.name=t,this.blockFrame=0,this.runtime=0,this._queue=new g,this._handles=new s,this._basePriority=O(t),this.schedulePriority=this._basePriority,this._task=m(null!=r?r:this._queue),this._handles.add(c(()=>this.task.readyToRun,t=>e.taskRunningChanged(t)))}remove(){this.processQueue(w),this._scheduler.removeTask(this),this.schedule=G.schedule,this.reschedule=G.reschedule,this.scheduleGenerator=G.scheduleGenerator,this._handles.destroy()}get basePriority(){return this._basePriority}setPriority(e){if(this.name===e)return;this.name=e;const t=O(e);this._basePriority!==L&&0===this.schedulePriority||(this.schedulePriority=t),this._basePriority=t}get priority(){return this.name}set priority(e){this.setPriority(e)}get needsUpdate(){return this.readyToRun||!this.task.destroyed&&this.task.readyToRun}schedule(e,t,s){return this._queue.push(e,t,s)}reschedule(e,t,s){return this._queue.unshift(e,t,s)}scheduleGenerator(e,t,s){return this._queue.pushGenerator(e,t,s)}processQueue(e){return this._queue.runTask(e)}}class F{constructor(){this._begin=performance?.now()??0,this._budget=0,this._done=!1,this._progressed=!1,this._enabled=!0}run(e){return!this.done&&(!0===e()&&this.madeProgress(),!0)}get done(){return this._done}get budget(){return this._budget}madeProgress(){return this._progressed=!0,this._done=this.elapsed>=this._budget&&this._enabled,this._done}get enabled(){return this._enabled}set enabled(e){this._enabled=e}reset(e){this._begin=this.now(),this._budget=e,this.resetProgress()}get remaining(){return Math.max(this._budget-this.elapsed,0)}now(){return performance.now()}get elapsed(){return this.now()-this._begin}resetProgress(){this._progressed=!1,this._done=!1}get hasProgressed(){return this._progressed}}const w=new F;function D(e){const t=new F;return t.reset(e),t}w.enabled=!1;class M{remove(){}processQueue(){}schedule(e,t,s){try{if(u(t)){const e=_();return s?Promise.resolve(s(e)):Promise.reject(e)}return h(e(w))}catch(r){return Promise.reject(r)}}reschedule(e,t,s){return this.schedule(e,t,s)}async scheduleGenerator(e,t,s){if(u(t)){const e=_();if(s)return s(e);throw e}const r=e(w);for(;;){const e=r.next(w),i=o(e)?await e:e;if(u(t)){const e=_();if(s){const t=s(e),i=r.return(null);return o(i)&&await E(i),t}const t=r.throw(e);throw o(t)&&await E(t),e}if(i.done)return i.value}}}const G=new M;export{G as ImmediateTask,p as TaskPriority,O as getTaskPriority,D as makeBudget,A as newScheduler,w as noBudget,f as taskPriorities};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import{createTask as t}from"../../core/asyncUtils.js";import s from"../../core/Collection.js";import r from"../../core/Error.js";import{EventedAccessor as i}from"../../core/Evented.js";import a from"../../core/Logger.js";import{abortMaybe as o,destroyMaybe as n}from"../../core/maybe.js";import{throwIfAborted as p,isAbortError as l}from"../../core/promiseUtils.js";import u from"../../core/ReactiveMap.js";import{on as h,sync as m,watch as d,whenOnce as c}from"../../core/reactiveUtils.js";import{property as f,subclass as y}from"../../core/accessorSupport/decorators.js";import{UpdatingHandles as v}from"../../core/support/UpdatingHandles.js";import g from"../../geometry/SpatialReference.js";import{system as F}from"../../time/constants.js";import{createReactiveGraphic as _}from"./batchAttributeFormUtils.js";import{ArcadeExecutorProvider as x}from"./expressions/ArcadeExecutorProvider.js";import{ExpressionsManager as w}from"./expressions/ExpressionsManager.js";import{ExpressionsModel as I}from"./expressions/ExpressionsModel.js";import b from"./inputs/BatchFormInputs.js";import{createBatchFormInputsFromBatchFormTemplate as M}from"./inputs/support/createBatchFormInputs.js";import{isGroupInput as A,isFieldInput as E}from"./inputs/support/inputUtils.js";import k from"./templates/BatchFormTemplate.js";import{getLayerContingentValuesMetaData as T}from"./templates/support/contingentValuesUtils.js";import{createBatchFormTemplate as C}from"./templates/support/createBatchFormTemplate.js";import{isExcludedFromSharedForm as V,isGroupElementTemplate as j}from"./templates/support/templateUtils.js";function H(e,t){return e?.find(e=>e.layer===t)}let L=class extends i{constructor(e){super(e),this.activeFeatureIndex=-1,this.disabled=!1,this.editType="NA",this.features=new s,this._hasAsyncArcadeExpressions=!1,this.maximumFeatureCount=2e3,this.maximumFeatureCountWithComplexForms=50,this.map=null,this.readOnly=!1,this.spatialReference=null,this.submitHasBeenAttempted=!1,this.timeZone=null,this.userHasChangedValues=!1,this.layerInfos=null,this._arcadeExecutorProvider=new x,this._activeFormInputsByElementId=new Map,this._emptyForm=new b({inputs:[]}),this._emptyFormTemplate=new k({elements:[]}),this._featureFormMap=new Map,this._prepareTask=null,this._reactiveGraphicLookup=new u,this._updatingHandles=new v,this._layerTemplateMap=new u,this._layerContingentValuesMap=new u,this._workingFeatures=new s,this._expressionsManager=new w({arcadeContext:{editType:"NA",spatialReference:null,map:null,timeZone:F}}),this.sharedForm=this._emptyForm,this.sharedFormTemplate=this._emptyFormTemplate}initialize(){this.addHandles([h(()=>this.features,"after-changes",()=>{this.notifyChange("layers"),this._prepare()},m),d(()=>[this.features,this.map,this.timeZone,this.editType],()=>this._prepare(),m),d(()=>this.activeForm,()=>this._activeFormInputsByElementId.clear(),m)]),this._prepare()}destroy(){this._prepareTask=o(this._prepareTask),this._workingFeatures.destroyAll(),n(this._expressionsManager),this._updatingHandles.destroy(),this._reactiveGraphicLookup=new u,this._emptyForm.destroy(),this._emptyFormTemplate.destroy()}get _effectiveTimeZone(){return this.timeZone??"system"}get activeFeature(){const e=this.activeFeatureIndex;return e<0?null:this.features.at(e)}get activeForm(){if("batch"===this.mode)return this.sharedForm;const e=this._workingFeatures.at(this.activeFeatureIndex);if(!e)return this._emptyForm;const t=this._featureFormMap.get(e);if(t)return t;const s=this._makeBatchFormInputsForFeature(e);return s!==this._emptyForm&&this._featureFormMap.set(e,s),s}get calculating(){return this._expressionsManager.calculating}get expressionEvaluationFailed(){return this._expressionsManager.expressionEvaluationFailed}get hasNonActiveInvalidFeatures(){if("batch"===this.mode)return!1;const{activeFeature:e}=this;return this.invalidFeatures.some(t=>t!==e)}get hasAsyncArcadeExpressions(){return this._hasAsyncArcadeExpressions}get hasTooManyFeatures(){return this._workingFeatures.length>this.maximumFeatureCount}get hasTooManyComplexFeatures(){return this._workingFeatures.length>this.maximumFeatureCountWithComplexForms&&this.hasAsyncArcadeExpressions}get invalidFeatures(){return this.sharedForm.invalidFeatures}get hasVisibleInputs(){return this.visibleInputs.length>0}get hasLayersWithContingentValues(){for(const e of this.layers){const t=this._layerContingentValuesMap.get(e);if(t&&t.size>0)return!0}return!1}get visibleInputs(){return this.activeForm.inputs.filter(e=>e.visible)}get noVisibleElementsReason(){if(this.hasVisibleInputs)return null;if(0===this.activeForm.inputs.length)return"noElements";const e=new Set;for(const t of this.activeForm.inputs)switch(t.visibilityCode){case"hidden:not-in-all-layers":case"hidden:no-domain-in-common":e.add("noElementsInCommon");break;case"hidden:field-definition":case"hidden:group-visibility-expression:all-features":case"hidden:visibility-expression:all-features":e.add("allElementsHidden");break;case"hidden:group-visibility-expression:some-features":case"hidden:visibility-expression:some-features":return"elementsHiddenInSome"}return e.has("allElementsHidden")?"allElementsHidden":"noElementsInCommon"}get status(){const e=this._prepareTask;return null==e?"not-loaded":e.finished?null!=e.error?"failed":"loaded":"loading"}get submittable(){return this.valid,!0}get updating(){return this._updatingHandles.updating||this.calculating}get valid(){return this.sharedForm.valid}get layers(){const e=new Set;return this.features.forEach(t=>{const s=t.sourceLayer??t.layer;e.add(s)}),Array.from(e)}get mode(){return this.activeFeatureIndex>-1?"single":"batch"}submit(){this.submitHasBeenAttempted=!0,this.emit("submit",{name:"submit",results:this._makeSubmitResults(),valid:this.valid})}findFieldInput(e){if(null==e)return;const t=this._activeFormInputsByElementId;if(t.has(e))return t.get(e);const s=this.activeForm.allFieldInputs.find(t=>t.template.elementId===e);return void 0!==s?(t.set(e,s),s):void 0}getFirstVisibleInvalidFieldInput(){if(this.hasVisibleInputs&&!this.activeForm.valid)for(const e of this.visibleInputs){if(A(e)){const t=e.inputs.find(e=>E(e)&&!e.valid);if(t)return{input:t,groupInput:e}}if(E(e)&&!e.valid)return{input:e}}}getFieldInputValue(e){return this.findFieldInput(e)?.value}getValues(e){const t=this._reactiveGraphicLookup.get(e);if(!t)throw new r("feature-not-found","The given feature is not present in the BatchAttributeForm");return{...t.attributes}}notifyGeometriesChanged(e){const t=[];for(const s of e){const e=this._reactiveGraphicLookup.get(s);e&&(t.push(e),e.geometry=s.geometry)}this._expressionsManager.runGeometryDependentExpressions(t)}async setFieldInputValue(e,t){const s=new Set(this.invalidFeatures);await e.setValueFromUser(t),this.userHasChangedValues=!0,this._trackValidityChange(s),this.emit("value-change",{features:e.features.toArray().map(e=>e.source),fieldName:e.fieldName,name:"value-change",value:t})}async setValue(e,t){const s=this.findFieldInput(e);if(null==s)throw new r("no-FieldInput-found",`Cannot set the value of FieldInput with ID: ${e} because none was found in the active form`);await this.setFieldInputValue(s,t)}userChangesHaveMadeFeatureInvalid(e){return!!this._reactiveGraphicLookup.get(e)?.userChangesHaveMadeInvalid}async _trackValidityChange(e){await c(()=>!1===this.calculating);const t=this.invalidFeatures;for(const s of t)!1===e.has(s)&&this._reactiveGraphicLookup.has(s)&&(this._reactiveGraphicLookup.get(s).userChangesHaveMadeInvalid=!0)}validate(){return!1}_makeBatchFormInputsForFeature(e){const t=this._layerTemplateMap.get(e.layer);return t?M(t,new s([e]),this._expressionsManager):this._emptyForm}_makeSubmitResults(){const e=new Map;for(const[t,s]of this._reactiveGraphicLookup)e.set(t,{feature:t,values:{...s.attributes},invalidFields:[]});for(const t of this.sharedForm.allFieldInputs)for(const s of t.invalidFeatures)e.get(s)?.invalidFields.push(t.fieldName);return Array.from(e.values())}_prepare(){this._hasAsyncArcadeExpressions=!1,this._prepareTask=o(this._prepareTask),this._updateWorkingFeatures(),n(this._expressionsManager),this.userHasChangedValues=!1,this._expressionsManager=new w({arcadeContext:{editType:this.editType,spatialReference:this.spatialReference??g.WebMercator,map:this.map,timeZone:this._effectiveTimeZone}});const{layers:e}=this;if(0===e.length)return;const s=t(async t=>{try{p(t);const s=new Map;for(const r of e){const e=await T(r);if(p(t),e){const t=e.fieldGroups.flatMap(e=>e.fields);this._layerContingentValuesMap.set(r,new Set(t))}else this._layerContingentValuesMap.set(r,new Set);const i=H(this.layerInfos,r),a=await C(r,{arcadeExecutorProvider:this._arcadeExecutorProvider,formTimeZone:this._effectiveTimeZone},i?.formTemplate);p(t),this._layerTemplateMap.set(r,a);const o=a.getExpressionExecutorsForLayer(r);if(this._expressionsManager.layerExpressionsModelMap.set(r,new I({preserveFieldValuesWhenHidden:a.preserveFieldValuesWhenHidden,executorMap:o})),!this._hasAsyncArcadeExpressions)for(const t of o.keys()){const e=o.get(t);if(this._hasAsyncArcadeExpressions=!0===(e.editableExpression?.isAsync||e.requiredExpression?.isAsync||e.valueExpression?.isAsync||e.visibilityExpression?.isAsync),this._hasAsyncArcadeExpressions)break}for(const t of a.elements){if(V(t))continue;const e=t.clone();j(e)&&(e.elements=e.elements.filter(e=>!V(e)));const{elementId:r}=e;s.has(r)?s.get(r).foldIn(e):s.set(r,e)}}if(this.hasTooManyComplexFeatures)throw new r("too-many-features-with-complex-forms","There are too many features to load into the form with the configured complexity");if(this.hasTooManyFeatures)throw new r("too-many-features","There are too many features to load into the form.");const i=new k({elements:Array.from(s.values())});this.sharedFormTemplate=i,this.sharedForm=M(i,this._workingFeatures,this._expressionsManager),await this._expressionsManager.runAllExpressions(this._workingFeatures.toArray())}catch(s){throw l(s)||a.getLogger(this).error("Failed preparing form",s),s}});this._updatingHandles.consumePromise(s.promise),this._prepareTask=s}_updateWorkingFeatures(){this._workingFeatures.destroyAll();const{features:e}=this;if(this._reactiveGraphicLookup=new u,0!==e.length){this._workingFeatures.addMany(e.map(_));for(const e of this._workingFeatures)this._reactiveGraphicLookup.set(e.source,e)}}};e([f()],L.prototype,"_effectiveTimeZone",null),e([f({readOnly:!0})],L.prototype,"activeFeature",null),e([f()],L.prototype,"activeFeatureIndex",void 0),e([f({readOnly:!0})],L.prototype,"activeForm",null),e([f()],L.prototype,"disabled",void 0),e([f()],L.prototype,"calculating",null),e([f()],L.prototype,"editType",void 0),e([f()],L.prototype,"features",void 0),e([f()],L.prototype,"expressionEvaluationFailed",null),e([f()],L.prototype,"hasNonActiveInvalidFeatures",null),e([f()],L.prototype,"hasAsyncArcadeExpressions",null),e([f()],L.prototype,"_hasAsyncArcadeExpressions",void 0),e([f()],L.prototype,"invalidFeatures",null),e([f()],L.prototype,"hasVisibleInputs",null),e([f()],L.prototype,"hasLayersWithContingentValues",null),e([f()],L.prototype,"maximumFeatureCount",void 0),e([f()],L.prototype,"maximumFeatureCountWithComplexForms",void 0),e([f()],L.prototype,"visibleInputs",null),e([f()],L.prototype,"map",void 0),e([f()],L.prototype,"noVisibleElementsReason",null),e([f()],L.prototype,"readOnly",void 0),e([f()],L.prototype,"spatialReference",void 0),e([f()],L.prototype,"submitHasBeenAttempted",void 0),e([f()],L.prototype,"timeZone",void 0),e([f()],L.prototype,"updating",null),e([f()],L.prototype,"valid",null),e([f()],L.prototype,"layers",null),e([f()],L.prototype,"mode",null),e([f()],L.prototype,"sharedForm",void 0),e([f()],L.prototype,"sharedFormTemplate",void 0),e([f()],L.prototype,"userHasChangedValues",void 0),e([f()],L.prototype,"layerInfos",void 0),e([f()],L.prototype,"_arcadeExecutorProvider",void 0),e([f()],L.prototype,"_prepareTask",void 0),e([f()],L.prototype,"_reactiveGraphicLookup",void 0),e([f()],L.prototype,"_layerTemplateMap",void 0),e([f()],L.prototype,"_layerContingentValuesMap",void 0),e([f()],L.prototype,"_workingFeatures",void 0),e([f()],L.prototype,"_expressionsManager",void 0),L=e([y("esri.widgets.BatchAttributeForm.BatchAttributeFormViewModel")],L);const B=L;export{B as default};
2
+ import{__decorate as e}from"tslib";import{createTask as t}from"../../core/asyncUtils.js";import s from"../../core/Collection.js";import i from"../../core/Error.js";import{EventedAccessor as r}from"../../core/Evented.js";import a from"../../core/Logger.js";import{getOrCreateMapValue as o}from"../../core/MapUtils.js";import{abortMaybe as n,destroyMaybe as p}from"../../core/maybe.js";import{throwIfAborted as l,isAbortError as u}from"../../core/promiseUtils.js";import h from"../../core/ReactiveMap.js";import{on as m,sync as c,watch as d,whenOnce as f}from"../../core/reactiveUtils.js";import{property as y,subclass as v}from"../../core/accessorSupport/decorators.js";import{UpdatingHandles as g}from"../../core/support/UpdatingHandles.js";import F from"../../geometry/SpatialReference.js";import{getGraphicLayer as _}from"../../graphic/graphicOriginUtils.js";import{system as x}from"../../time/constants.js";import{createReactiveGraphic as w,isAttributeFormSupportedLayerWithAttachments as I,layerSupportsQueryAttachments as b,queryAttachmentsForElements as A}from"./batchAttributeFormUtils.js";import{ArcadeExecutorProvider as M}from"./expressions/ArcadeExecutorProvider.js";import{ExpressionsManager as E}from"./expressions/ExpressionsManager.js";import{ExpressionsModel as k}from"./expressions/ExpressionsModel.js";import C from"./inputs/BatchFormInputs.js";import{createBatchFormInputsFromBatchFormTemplate as T}from"./inputs/support/createBatchFormInputs.js";import{isGroupInput as V,isFieldInput as j}from"./inputs/support/inputUtils.js";import H from"./templates/BatchFormTemplate.js";import{getLayerContingentValuesMetaData as L}from"./templates/support/contingentValuesUtils.js";import{createBatchFormTemplate as B}from"./templates/support/createBatchFormTemplate.js";import{isExcludedFromSharedForm as G,isGroupElementTemplate as R}from"./templates/support/templateUtils.js";function U(e,t){return e?.find(e=>e.layer===t)}let Z=class extends r{constructor(e){super(e),this._attachmentCache=new h,this.activeFeatureIndex=-1,this.disabled=!1,this.editType="NA",this.features=new s,this._hasAsyncArcadeExpressions=!1,this.maximumFeatureCount=2e3,this.maximumFeatureCountWithComplexForms=50,this.map=null,this.readOnly=!1,this.spatialReference=null,this.submitHasBeenAttempted=!1,this.timeZone=null,this.userHasChangedValues=!1,this.layerInfos=null,this._arcadeExecutorProvider=new M,this._activeFormInputsByElementId=new Map,this._emptyForm=new C({inputs:[]}),this._emptyFormTemplate=new H({elements:[]}),this._featureFormMap=new Map,this._prepareTask=null,this._reactiveGraphicLookup=new h,this._updatingHandles=new g,this._layerTemplateMap=new h,this._layerContingentValuesMap=new h,this._workingFeatures=new s,this._expressionsManager=new E({arcadeContext:{editType:"NA",spatialReference:null,map:null,timeZone:x}}),this.sharedForm=this._emptyForm,this.sharedFormTemplate=this._emptyFormTemplate}initialize(){this.addHandles([m(()=>this.features,"after-changes",()=>{this.notifyChange("layers"),this._prepare()},c),d(()=>[this.features,this.map,this.timeZone,this.editType],()=>this._prepare(),c),d(()=>this.activeForm,()=>this._activeFormInputsByElementId.clear(),c),d(()=>[this.activeFeature,this.activeLayer,this.activeForm],()=>{this._syncAttachments()},c)]),this._prepare()}destroy(){this._prepareTask=n(this._prepareTask),this._workingFeatures.destroyAll(),p(this._expressionsManager),this._updatingHandles.destroy(),this._reactiveGraphicLookup=new h,this._emptyForm.destroy(),this._emptyFormTemplate.destroy()}get _effectiveTimeZone(){return this.timeZone??"system"}get activeFeature(){const e=this.activeFeatureIndex;return e<0?null:this.features.at(e)}get activeForm(){if("batch"===this.mode)return this.sharedForm;const e=this._workingFeatures.at(this.activeFeatureIndex);if(!e)return this._emptyForm;const t=this._featureFormMap.get(e);if(t)return t;const s=this._makeBatchFormInputsForFeature(e);return s!==this._emptyForm&&this._featureFormMap.set(e,s),s}get activeLayer(){const{activeFeature:e}=this;if(!e)return null;return _(e)??null}get calculating(){return this._expressionsManager.calculating}get expressionEvaluationFailed(){return this._expressionsManager.expressionEvaluationFailed}get hasNonActiveInvalidFeatures(){if("batch"===this.mode)return!1;const{activeFeature:e}=this;return this.invalidFeatures.some(t=>t!==e)}get hasAsyncArcadeExpressions(){return this._hasAsyncArcadeExpressions}get hasTooManyFeatures(){return this._workingFeatures.length>this.maximumFeatureCount}get hasTooManyComplexFeatures(){return this._workingFeatures.length>this.maximumFeatureCountWithComplexForms&&this.hasAsyncArcadeExpressions}get invalidFeatures(){return this.sharedForm.invalidFeatures}get hasVisibleInputs(){return this.visibleInputs.length>0}get hasLayersWithContingentValues(){for(const e of this.layers){const t=this._layerContingentValuesMap.get(e);if(t&&t.size>0)return!0}return!1}get visibleInputs(){return this.activeForm.inputs.filter(e=>e.visible)}get noVisibleElementsReason(){if(this.hasVisibleInputs)return null;if(0===this.activeForm.inputs.length)return"noElements";const e=new Set;for(const t of this.activeForm.inputs)switch(t.visibilityCode){case"hidden:not-in-all-layers":case"hidden:no-domain-in-common":e.add("noElementsInCommon");break;case"hidden:field-definition":case"hidden:group-visibility-expression:all-features":case"hidden:visibility-expression:all-features":e.add("allElementsHidden");break;case"hidden:group-visibility-expression:some-features":case"hidden:visibility-expression:some-features":return"elementsHiddenInSome"}return e.has("allElementsHidden")?"allElementsHidden":"noElementsInCommon"}get status(){const e=this._prepareTask;return null==e?"not-loaded":e.finished?null!=e.error?"failed":"loaded":"loading"}get submittable(){return this.valid,!0}get updating(){return this._updatingHandles.updating||this.calculating}get valid(){return this.sharedForm.valid}get layers(){const e=new Set;return this.features.forEach(t=>{const s=_(t);s&&e.add(s)}),Array.from(e)}get mode(){return this.activeFeatureIndex>-1?"single":"batch"}submit(){this.submitHasBeenAttempted=!0,this.emit("submit",{name:"submit",results:this._makeSubmitResults(),valid:this.valid})}findFieldInput(e){if(null==e)return;const t=this._activeFormInputsByElementId;if(t.has(e))return t.get(e);const s=this.activeForm.allFieldInputs.find(t=>t.template.elementId===e);return void 0!==s?(t.set(e,s),s):void 0}getFirstVisibleInvalidFieldInput(){if(this.hasVisibleInputs&&!this.activeForm.valid)for(const e of this.visibleInputs){if(V(e)){const t=e.inputs.find(e=>j(e)&&!e.valid);if(t)return{input:t,groupInput:e}}if(j(e)&&!e.valid)return{input:e}}}getFieldInputValue(e){return this.findFieldInput(e)?.value}getValues(e){const t=this._reactiveGraphicLookup.get(e);if(!t)throw new i("feature-not-found","The given feature is not present in the BatchAttributeForm");return{...t.attributes}}notifyGeometriesChanged(e){const t=[];for(const s of e){const e=this._reactiveGraphicLookup.get(s);e&&(t.push(e),e.geometry=s.geometry)}this._expressionsManager.runGeometryDependentExpressions(t)}async setFieldInputValue(e,t){const s=new Set(this.invalidFeatures);await e.setValueFromUser(t),this.userHasChangedValues=!0,this._trackValidityChange(s),this.emit("value-change",{features:e.features.toArray().map(e=>e.source),fieldName:e.fieldName,name:"value-change",value:t})}async setValue(e,t){const s=this.findFieldInput(e);if(null==s)throw new i("no-FieldInput-found",`Cannot set the value of FieldInput with ID: ${e} because none was found in the active form`);await this.setFieldInputValue(s,t)}userChangesHaveMadeFeatureInvalid(e){return!!this._reactiveGraphicLookup.get(e)?.userChangesHaveMadeInvalid}async _trackValidityChange(e){await f(()=>!1===this.calculating);const t=this.invalidFeatures;for(const s of t)!1===e.has(s)&&this._reactiveGraphicLookup.has(s)&&(this._reactiveGraphicLookup.get(s).userChangesHaveMadeInvalid=!0)}validate(){return!1}_makeBatchFormInputsForFeature(e){const t=this._layerTemplateMap.get(e.layer);return t?T(t,new s([e]),this._expressionsManager):this._emptyForm}_makeSubmitResults(){const e=new Map;for(const[t,s]of this._reactiveGraphicLookup)e.set(t,{feature:t,values:{...s.attributes},invalidFields:[]});for(const t of this.sharedForm.allFieldInputs)for(const s of t.invalidFeatures)e.get(s)?.invalidFields.push(t.fieldName);return Array.from(e.values())}_prepare(){this._hasAsyncArcadeExpressions=!1,this._prepareTask=n(this._prepareTask),this._updateWorkingFeatures(),p(this._expressionsManager),this.userHasChangedValues=!1,this._expressionsManager=new E({arcadeContext:{editType:this.editType,spatialReference:this.spatialReference??F.WebMercator,map:this.map,timeZone:this._effectiveTimeZone}});const{layers:e}=this;if(0===e.length)return;const s=t(async t=>{try{l(t);const s=new Map;for(const i of e){const e=await L(i);if(l(t),e){const t=e.fieldGroups.flatMap(e=>e.fields);this._layerContingentValuesMap.set(i,new Set(t))}else this._layerContingentValuesMap.set(i,new Set);const r=U(this.layerInfos,i),a=await B(i,{arcadeExecutorProvider:this._arcadeExecutorProvider,formTimeZone:this._effectiveTimeZone},r?.formTemplate);l(t),this._layerTemplateMap.set(i,a);const o=a.getExpressionExecutorsForLayer(i);if(this._expressionsManager.layerExpressionsModelMap.set(i,new k({preserveFieldValuesWhenHidden:a.preserveFieldValuesWhenHidden,executorMap:o})),!this._hasAsyncArcadeExpressions)for(const t of o.keys()){const e=o.get(t);if(this._hasAsyncArcadeExpressions=!0===(e.editableExpression?.isAsync||e.requiredExpression?.isAsync||e.valueExpression?.isAsync||e.visibilityExpression?.isAsync),this._hasAsyncArcadeExpressions)break}for(const t of a.elements){if(G(t))continue;const e=t.clone();R(e)&&(e.elements=e.elements.filter(e=>!G(e)));const{elementId:i}=e;s.has(i)?s.get(i).foldIn(e):s.set(i,e)}}if(this.hasTooManyComplexFeatures)throw new i("too-many-features-with-complex-forms","There are too many features to load into the form with the configured complexity");if(this.hasTooManyFeatures)throw new i("too-many-features","There are too many features to load into the form.");const r=new H({elements:Array.from(s.values())});this.sharedFormTemplate=r,this.sharedForm=T(r,this._workingFeatures,this._expressionsManager),await this._expressionsManager.runAllExpressions(this._workingFeatures.toArray())}catch(s){throw u(s)||a.getLogger(this).error("Failed preparing form",s),s}});this._updatingHandles.consumePromise(s.promise),this._prepareTask=s}_updateWorkingFeatures(){this._workingFeatures.destroyAll();const{features:e}=this;if(this._reactiveGraphicLookup=new h,0!==e.length){this._workingFeatures.addMany(e.map(w));for(const e of this._workingFeatures)this._reactiveGraphicLookup.set(e.source,e)}}async _syncAttachments(){const{activeFeature:e,activeLayer:t,activeForm:s}=this;if(!(e&&s&&I(t)&&b(t)))return;const i=e.getObjectId();if(null==i)return;const r=this._attachmentCache.get(t);if(r){if(r.get(i))return}const a=[];if(!a.length)return;const n=await A(t,i,a);o(this._attachmentCache,t,()=>new h).set(i,n)}};e([y()],Z.prototype,"_effectiveTimeZone",null),e([y()],Z.prototype,"_attachmentCache",void 0),e([y({readOnly:!0})],Z.prototype,"activeFeature",null),e([y()],Z.prototype,"activeFeatureIndex",void 0),e([y({readOnly:!0})],Z.prototype,"activeForm",null),e([y({readOnly:!0})],Z.prototype,"activeLayer",null),e([y()],Z.prototype,"disabled",void 0),e([y()],Z.prototype,"calculating",null),e([y()],Z.prototype,"editType",void 0),e([y()],Z.prototype,"features",void 0),e([y()],Z.prototype,"expressionEvaluationFailed",null),e([y()],Z.prototype,"hasNonActiveInvalidFeatures",null),e([y()],Z.prototype,"hasAsyncArcadeExpressions",null),e([y()],Z.prototype,"_hasAsyncArcadeExpressions",void 0),e([y()],Z.prototype,"invalidFeatures",null),e([y()],Z.prototype,"hasVisibleInputs",null),e([y()],Z.prototype,"hasLayersWithContingentValues",null),e([y()],Z.prototype,"maximumFeatureCount",void 0),e([y()],Z.prototype,"maximumFeatureCountWithComplexForms",void 0),e([y()],Z.prototype,"visibleInputs",null),e([y()],Z.prototype,"map",void 0),e([y()],Z.prototype,"noVisibleElementsReason",null),e([y()],Z.prototype,"readOnly",void 0),e([y()],Z.prototype,"spatialReference",void 0),e([y()],Z.prototype,"submitHasBeenAttempted",void 0),e([y()],Z.prototype,"timeZone",void 0),e([y()],Z.prototype,"updating",null),e([y()],Z.prototype,"valid",null),e([y()],Z.prototype,"layers",null),e([y()],Z.prototype,"mode",null),e([y()],Z.prototype,"sharedForm",void 0),e([y()],Z.prototype,"sharedFormTemplate",void 0),e([y()],Z.prototype,"userHasChangedValues",void 0),e([y()],Z.prototype,"layerInfos",void 0),e([y()],Z.prototype,"_arcadeExecutorProvider",void 0),e([y()],Z.prototype,"_prepareTask",void 0),e([y()],Z.prototype,"_reactiveGraphicLookup",void 0),e([y()],Z.prototype,"_layerTemplateMap",void 0),e([y()],Z.prototype,"_layerContingentValuesMap",void 0),e([y()],Z.prototype,"_workingFeatures",void 0),e([y()],Z.prototype,"_expressionsManager",void 0),Z=e([v("esri.widgets.BatchAttributeForm.BatchAttributeFormViewModel")],Z);const S=Z;export{S as default};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{substitute as e}from"../../intl.js";import{ReactiveGraphic as i}from"./ReactiveGraphic.js";import{getIntlOptionsForField as n}from"../support/dateUtils.js";import{getRangeErrorMessage as t,shouldUseScientificNotation as r,scientificNumberFormatOptions as o,numberFormatOptions as a}from"../support/forms/formUtils.js";const l=(e,i)=>null!=e&&e.input?.type===i;function s(e){return new i({source:e})}function d(i,l,s,d){const{dataType:u,minLength:p}=i,c=s?.validationErrors;if(!c||!l)return null;if("batch-attribute-form-validation::features-have-different-errors"===l)return c.invalidBatchFormType;if("input-validation-error::cannot-be-empty"===l)return c.cannotBeNull;if("domain-validation-error::value-out-of-range"===l||"numeric-range-validation-error::out-of-range"===l){const{field:l,range:s}=i,p={type:"date",intlOptions:{timeZone:"date"===l.type&&d?d:void 0,...n(l)}},f=t(s,c);return e(f,s,{format:{max:"date"===u?p:null!=s.max&&r(s.max)?o:a,min:"date"===u?p:null!=s.min&&r(s.min)?o:a}})}return"domain-validation-error::invalid-coded-value"===l?c.invalidCodedValue:"type-validation-error::invalid-type"===l?c.invalidType:"length-validation-error::too-short"===l?e(c.tooShort,{min:p}):null}function u(e,i,n){const t=n?.validationErrors;if(!t)return null;let r=null;for(const o of e.invalidHiddenInputs)switch(o.effectiveVisibilityCode){case"hidden:visibility-expression:all-features":case"hidden:group-visibility-expression:all-features":case"hidden:field-definition":return"single"===i?t.nonVisibleError_changeValues:t.nonVisibleError_checkIndividualFeatures;case"hidden:no-domain-in-common":case"hidden:visibility-expression:some-features":case"hidden:group-visibility-expression:some-features":case"hidden:not-in-all-layers":r=t.nonVisibleError_checkIndividualFeatures;break;case"visible":continue;default:o.effectiveVisibilityCode}return r}function p(e){return null!=e&&"object"==typeof e&&"type"in e&&("feature"===e.type||"geojson"===e.type||"knowledge-graph-sublayer"===e.type||"oriented-imagery"===e.type||"scene"===e.type||"subtype-sublayer"===e.type)}export{s as createReactiveGraphic,u as getHiddenFieldsValidationErrorMessage,d as getVisibleFieldInputValidationErrorMessage,p as isAttributeFormSupportedLayerUnion,l as isElementTemplateWithInputType};
2
+ import{substitute as e}from"../../intl.js";import t from"../../rest/support/AttachmentQuery.js";import{ReactiveGraphic as i}from"./ReactiveGraphic.js";import{getIntlOptionsForField as n}from"../support/dateUtils.js";import{isEmptyValue as r,getRangeErrorMessage as o,shouldUseScientificNotation as a,scientificNumberFormatOptions as s,numberFormatOptions as l}from"../support/forms/formUtils.js";const d=(e,t)=>null!=e&&e.input?.type===t;function u(e){return new i({source:e})}function c(t,i,r,d){const{dataType:u,minLength:c}=t,f=r?.validationErrors;if(!f||!i)return null;if("batch-attribute-form-validation::features-have-different-errors"===i)return f.invalidBatchFormType;if("input-validation-error::cannot-be-empty"===i)return f.cannotBeNull;if("domain-validation-error::value-out-of-range"===i||"numeric-range-validation-error::out-of-range"===i){const{field:i,range:r}=t,c={type:"date",intlOptions:{timeZone:"date"===i.type&&d?d:void 0,...n(i)}},p=o(r,f);return e(p,r,{format:{max:"date"===u?c:null!=r.max&&a(r.max)?s:l,min:"date"===u?c:null!=r.min&&a(r.min)?s:l}})}return"domain-validation-error::invalid-coded-value"===i?f.invalidCodedValue:"type-validation-error::invalid-type"===i?f.invalidType:"length-validation-error::too-short"===i?e(f.tooShort,{min:c}):null}function f(e,t,i){const n=i?.validationErrors;if(!n)return null;let r=null;for(const o of e.invalidHiddenInputs)switch(o.effectiveVisibilityCode){case"hidden:visibility-expression:all-features":case"hidden:group-visibility-expression:all-features":case"hidden:field-definition":return"single"===t?n.nonVisibleError_changeValues:n.nonVisibleError_checkIndividualFeatures;case"hidden:no-domain-in-common":case"hidden:visibility-expression:some-features":case"hidden:group-visibility-expression:some-features":case"hidden:not-in-all-layers":r=n.nonVisibleError_checkIndividualFeatures;break;case"visible":continue;default:o.effectiveVisibilityCode}return r}function p(e){return null!=e&&"object"==typeof e&&"type"in e&&("feature"===e.type||"geojson"===e.type||"knowledge-graph-sublayer"===e.type||"oriented-imagery"===e.type||"scene"===e.type||"subtype-sublayer"===e.type)}function m(e){return!!p(e)||!!(null!=e&&"object"==typeof e&&"type"in e&&e.type&&"id"in e&&e.id&&"fields"in e&&e.fields&&"fieldsIndex"in e&&e.fieldsIndex&&"objectIdField"in e&&e.objectIdField&&"capabilities"in e&&"getField"in e&&e.getField)}function y(e){return m(e)&&"queryAttachments"in e}function h(e){if(!y(e))return!1;const t=e?.effectiveCapabilities??e?.capabilities;return!(!t?.data?.supportsAttachment||!t.operations.supportsQueryAttachments)}async function v(e,i,n){const o=new Set;let a=!1;for(const t of n){if(r(t.attachmentKeyword)){a=!0;break}o.add(t.attachmentKeyword)}const s=o.size&&!a?Array.from(o):void 0,l=new t({objectIds:[i],where:"1=1",returnMetadata:!0,keywords:s});e.capabilities?.query?.supportsCacheHint&&(l.cacheHint=!0);return(await e.queryAttachments(l))[i]??[]}function b(e,t,i,n){const r=e.get(t)?.get(i)??[];if(!n?.length)return r;const o=new Set(n.map(e=>e.toLowerCase()));return r.filter(e=>o.has(e.keywords.toLowerCase()))}export{u as createReactiveGraphic,b as getAttachmentsForKeywords,f as getHiddenFieldsValidationErrorMessage,c as getVisibleFieldInputValidationErrorMessage,m as isAttributeFormSupportedLayer,p as isAttributeFormSupportedLayerUnion,y as isAttributeFormSupportedLayerWithAttachments,d as isElementTemplateWithInputType,h as layerSupportsQueryAttachments,v as queryAttachmentsForElements};
@@ -0,0 +1,2 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
+ import{__decorate as t}from"tslib";import e from"../../../core/Accessor.js";import r from"../../../core/Logger.js";import{property as o,subclass as s}from"../../../core/accessorSupport/decorators.js";let n=class extends e{constructor(t){super(t),this.input=null}get feature(){const{input:t}=this,{features:e}=t;if(1===e.length)return e.at(0);r.getLogger(t).warn("Invalid number of features")}get layer(){const{input:t}=this,{layers:e}=t;if(1===e.length)return e.at(0);r.getLogger(t).warn("Invalid number of layers")}};t([o()],n.prototype,"input",void 0),t([o()],n.prototype,"feature",null),t([o()],n.prototype,"layer",null),n=t([s("esri.widgets.BatchAttributeForm.inputs.SingleFeatureInputAdapter")],n);const u=n;export{u as default};
@@ -1,9 +1,11 @@
1
+ import type Graphic from "../../../Graphic.js";
1
2
  import type GroupInput from "./GroupInput.js";
2
- import type SingleFeatureInput from "./SingleFeatureInput.js";
3
- import type { SingleFeatureInputProperties } from "./SingleFeatureInput.js";
3
+ import type InputBase from "./InputBase.js";
4
+ import type { AttributeFormSupportedLayerUnion } from "../types.js";
5
+ import type { InputBaseProperties } from "./InputBase.js";
4
6
 
5
7
  /** @since 5.0 */
6
- export interface TextElementInputProperties extends SingleFeatureInputProperties {}
8
+ export interface TextElementInputProperties extends InputBaseProperties {}
7
9
 
8
10
  /**
9
11
  * This is a read-only support class that represents a [text element](https://developers.arcgis.com/javascript/latest/references/core/form/elements/TextElement/) in a [BatchAttributeForm](https://developers.arcgis.com/javascript/latest/references/core/widgets/BatchAttributeForm/).
@@ -13,14 +15,36 @@ export interface TextElementInputProperties extends SingleFeatureInputProperties
13
15
  * @see [BatchAttributeFormViewModel](https://developers.arcgis.com/javascript/latest/references/core/widgets/BatchAttributeForm/BatchAttributeFormViewModel/)
14
16
  * @see [BatchFormInputs](https://developers.arcgis.com/javascript/latest/references/core/widgets/BatchAttributeForm/inputs/BatchFormInputs/)
15
17
  */
16
- export default class TextElementInput extends SingleFeatureInput<any> {
18
+ export default class TextElementInput extends InputBase<any> {
17
19
  constructor(properties: TextElementInputProperties);
20
+ /**
21
+ * The single feature associated with this text element.
22
+ *
23
+ * @since 5.0
24
+ * @see [BatchAttributeFormViewModel.features](https://developers.arcgis.com/javascript/latest/references/core/widgets/BatchAttributeForm/BatchAttributeFormViewModel/#features)
25
+ */
26
+ get feature(): Graphic | null | undefined;
18
27
  /**
19
28
  * The group containing the text element input.
20
29
  *
21
30
  * @since 5.0
22
31
  */
23
32
  get group(): GroupInput | null;
33
+ /**
34
+ * Identifies the single feature layer associated with this text element. The layer must support feature editing and field access.
35
+ *
36
+ * The following layer types are supported:
37
+ * - [FeatureLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/FeatureLayer/)
38
+ * - [GeoJSONLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/GeoJSONLayer/)
39
+ * - [SceneLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/SceneLayer/) (with `featureLayer` property)
40
+ * - [SubtypeSublayer](https://developers.arcgis.com/javascript/latest/references/core/layers/support/SubtypeSublayer/)
41
+ * - [OrientedImageryLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/OrientedImageryLayer/)
42
+ * - [KnowledgeGraphSublayer](https://developers.arcgis.com/javascript/latest/references/core/layers/knowledgeGraph/KnowledgeGraphSublayer/)
43
+ *
44
+ * @since 5.0
45
+ * @see [BatchAttributeFormViewModel.layers](https://developers.arcgis.com/javascript/latest/references/core/widgets/BatchAttributeForm/BatchAttributeFormViewModel/#layers)
46
+ */
47
+ get layer(): AttributeFormSupportedLayerUnion | null | undefined;
24
48
  /**
25
49
  * The processed text, compiled and with expressions replaced with values.
26
50
  *
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{__decorate as t}from"tslib";import{renderingSanitizer as e}from"../../../core/sanitizerUtils.js";import{property as s,subclass as r}from"../../../core/accessorSupport/decorators.js";import o from"./SingleFeatureInput.js";import{assembleStringFromParts as i}from"./support/textElementInputUtils.js";let p=class extends o{constructor(t){super(t),this.group=null,this.type="text"}get text(){const{expressionParts:t,literalParts:s}=this.template,r=this.feature;if(!r)return e.sanitize(s.join(" "));const o=[];for(let e=0;e<t.length;e++){const t=this._lookupEvaluatedExpression(r,"text",e);"success"===t?.status?o.push(`${t.result}`):o.push("")}return e.sanitize(i(s,o))}};t([s()],p.prototype,"group",void 0),t([s()],p.prototype,"text",null),t([s()],p.prototype,"type",void 0),p=t([r("esri.widgets.BatchAttributeForm.inputs.TextElementInput")],p);const u=p;export{u as default};
2
+ import{__decorate as t}from"tslib";import{renderingSanitizer as e}from"../../../core/sanitizerUtils.js";import{property as r,subclass as s}from"../../../core/accessorSupport/decorators.js";import o from"./InputBase.js";import i from"./SingleFeatureInputAdapter.js";import{assembleStringFromParts as p}from"./support/textElementInputUtils.js";let n=class extends o{constructor(t){super(t),this.group=null,this.single=new i({input:this}),this.type="text"}get feature(){return this.single.feature}get layer(){return this.single.layer}get text(){const{expressionParts:t,literalParts:r}=this.template,s=this.feature;if(!s)return e.sanitize(r.join(" "));const o=[];for(let e=0;e<t.length;e++){const t=this._lookupEvaluatedExpression(s,"text",e);"success"===t?.status?o.push(`${t.result}`):o.push("")}return e.sanitize(p(r,o))}};t([r()],n.prototype,"feature",null),t([r()],n.prototype,"group",void 0),t([r()],n.prototype,"layer",null),t([r()],n.prototype,"single",void 0),t([r()],n.prototype,"text",null),t([r()],n.prototype,"type",void 0),n=t([s("esri.widgets.BatchAttributeForm.inputs.TextElementInput")],n);const u=n;export{u as default};
@@ -0,0 +1,2 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
+ import{__decorate as t}from"tslib";import{property as e,subclass as o}from"../../../core/accessorSupport/decorators.js";import{ElementTemplateBase as i}from"./ElementTemplateBase.js";let p=class extends i{constructor(t){super(t),this.allowUserRename=!0,this.attachmentKeyword=null,this.displayFilename=!1,this.group=null,this.input=null,this.maxAttachmentCount=null,this.minAttachmentCount=null,this.type="attachment",this.useOriginalFilename=!0}};t([e()],p.prototype,"allowUserRename",void 0),t([e()],p.prototype,"attachmentKeyword",void 0),t([e()],p.prototype,"displayFilename",void 0),t([e({clonable:!1})],p.prototype,"group",void 0),t([e()],p.prototype,"input",void 0),t([e()],p.prototype,"maxAttachmentCount",void 0),t([e()],p.prototype,"minAttachmentCount",void 0),t([e()],p.prototype,"type",void 0),t([e()],p.prototype,"useOriginalFilename",void 0),p=t([o("esri.widgets.BatchAttributeForm.templates.AttachmentElementTemplate")],p);export{p as AttachmentElementTemplate};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import e from"../../../../core/Error.js";import t from"../../../../core/Logger.js";import{getEffectiveFieldAlias as r}from"../../../../editing/fieldUtils.js";import n from"../../../../form/ExpressionInfo.js";import{isFieldElement as o,isGroupElement as i,isTextElement as s}from"../../../../form/support/formUtils.js";import{getLowerCaseEditTrackingFields as a,isFieldVisibleByDefault as l}from"../../../../layers/support/fieldUtils.js";import{isSubtypeSublayer as m,isSubtypeGroupLayer as d}from"../../../../layers/support/layerUtils.js";import{unknown as p}from"../../../../time/constants.js";import{makeExpressionInfosMap as f,makeExecutorSetForFormElement as c}from"../../expressions/expressionUtils.js";import u from"../BatchFormTemplate.js";import{FieldElementTemplate as x}from"../FieldElementTemplate.js";import{GroupElementTemplate as w}from"../GroupElementTemplate.js";import{TextElementTemplate as y}from"../TextElementTemplate.js";import{compileTextElementMarkdownToHTML as b}from"./textElementTemplateUtils.js";const E="expression/dea57012-47ca4b55a000-8df62742ed0c",T=()=>t.getLogger("esri.widgets.BatchAttributeForm.templates.templateUtils");async function h(e,t,r=e.formTemplate){return r?.elements&&r.elements.length>0?I(r,e,t):v(e,t)}async function v(e,{arcadeExecutorProvider:t,formTimeZone:r}){const n=new Set(a(e)),o={arcadeExecutorProvider:t,formTimeZone:r,layer:e},i=[];for(const a of e.fields)U(a,e,n)&&i.push(P(a,o));const s=await Promise.all(i);return new u({elements:s,preserveFieldValuesWhenHidden:!0})}function g(e,t){for(const r of e??[])if("group"!==r.type){if("field"===r.type){if(!1===r.editable&&!r.editableExpression)return!0;if(t.subtypeField&&(m(t)||d(t))&&r.fieldName?.toLowerCase()===t.subtypeField.toLowerCase())return!0}}else if(g(r.elements??[],t))return!0;return!1}async function I(e,t,r){let o=null;g(e.elements??[],t)&&(o=new n({title:"",name:E,expression:"false"}));const i=f(o?[...e.expressionInfos??[],o]:e.expressionInfos),s={description:e.description,elements:new Array,title:e.title,preserveFieldValuesWhenHidden:e.preserveFieldValuesWhenHidden,supportsAttachmentElements:e.supportsAttachmentElements},{elements:a}=e;if(!a)return new u(s);const{arcadeExecutorProvider:l,formTimeZone:m}=r;for(const n of a){const e=await F(n,{arcadeExecutorProvider:l,expressionInfos:i,layer:t,formTimeZone:m});e&&s.elements.push(e)}return new u(s)}async function F(t,r){return o(t)?j(t,r):i(t)?L(t,r):s(t)?Z(t,r):(T().warn(new e("batch-attribute-form:unsupported-element-type",`Form elements of type ${t.type} are not supported`)),null)}async function j(t,{arcadeExecutorProvider:r,expressionInfos:n,layer:o,formTimeZone:i}){const{fieldsIndex:s}=o,{description:a,domain:l,fieldName:p,hint:f,input:u,label:w}=t;if(null==p||!s.has(p))return T().warn(new e("batch-attribute-form:invalid-form-element-field",`Field element with label '${w}' does not refer to a valid field`)),null;!1!==t.editable||t.editableExpression||((t=t.clone()).editableExpression=E),o.subtypeField&&(m(o)||d(o))&&t.fieldName?.toLowerCase()===o.subtypeField.toLowerCase()&&((t=t.clone()).editableExpression=E);const y=new x({description:a,domain:l,field:s.get(p),hint:f,input:u,formTimeZone:i,layerTimeZone:A(o),label:w}),b=await c({element:t,expressionInfos:n,provider:r});return y.addLayer(o,b),y}async function L(e,t){const{arcadeExecutorProvider:r,expressionInfos:n,layer:o}=t,{description:i,label:s,initialState:a}=e,l=[];for(const p of e.elements){const e=await F(p,t);e&&l.push(e)}const m=new w({description:i,elements:l,label:s,initialState:a??"expanded"}),d=await c({element:e,expressionInfos:n,provider:r});return m.addLayer(o,d),m}async function Z(e,{arcadeExecutorProvider:t,expressionInfos:r,layer:n}){const{description:o,label:i,text:s,textFormat:a}=e,{fieldsIndex:l}=n,m=s&&"markdown"===a?await b(s):s,d=new y({compiledText:m,description:o,fieldsIndex:l,label:i}),p=await c({element:e,expressionInfos:r,provider:t}),{expressionParts:f}=d;if(f.length){const e=await Promise.all(f.map(e=>{const n=r.get(e)?.expression??e;return t.getArcadeExecutor(n)}));p.textExpressions=e}return d.addLayer(n,p),d}async function P(e,{arcadeExecutorProvider:t,layer:n,formTimeZone:o}){const i=r(e,n)||e.name,s=new x({field:e,label:i,formTimeZone:o,layerTimeZone:A(n)}),a={},l=(d(n)||m(n))&&n.subtypeField&&n.subtypeField.toLowerCase()===e.name.toLowerCase();return!l&&e.editable&&n.userHasUpdateItemPrivileges&&(a.editableExpression=await t.getArcadeExecutor("true")),l&&(a.editableExpression=await t.getArcadeExecutor("false")),s.addLayer(n,a),s}function U(e,t,r){return!r.has(e.name.toLowerCase())&&l(e,t)}function A(e){return m(e)&&e.parent&&(e=e.parent),e&&"datesInUnknownTimezone"in e&&e.datesInUnknownTimezone?p:e&&"preferredTimeZone"in e&&e.preferredTimeZone?e.preferredTimeZone:null}export{h as createBatchFormTemplate,v as createBatchFormTemplateFromFields};
2
+ import e from"../../../../core/Error.js";import t from"../../../../core/Logger.js";import{getEffectiveFieldAlias as r}from"../../../../editing/fieldUtils.js";import n from"../../../../form/ExpressionInfo.js";import{isFieldElement as o,isGroupElement as i,isTextElement as s}from"../../../../form/support/formUtils.js";import{getLowerCaseEditTrackingFields as a,isFieldVisibleByDefault as l}from"../../../../layers/support/fieldUtils.js";import{isSubtypeSublayer as m,isSubtypeGroupLayer as d}from"../../../../layers/support/layerUtils.js";import{unknown as p}from"../../../../time/constants.js";import{makeExpressionInfosMap as f,makeExecutorSetForFormElement as c}from"../../expressions/expressionUtils.js";import u from"../BatchFormTemplate.js";import{FieldElementTemplate as x}from"../FieldElementTemplate.js";import{GroupElementTemplate as w}from"../GroupElementTemplate.js";import{TextElementTemplate as y}from"../TextElementTemplate.js";import{compileTextElementMarkdownToHTML as b}from"./textElementTemplateUtils.js";const E="expression/dea57012-47ca4b55a000-8df62742ed0c",T=()=>t.getLogger("esri.widgets.BatchAttributeForm.templates.templateUtils");async function h(e,t,r=e.formTemplate){return r?.elements&&r.elements.length>0?I(r,e,t):v(e,t)}async function v(e,{arcadeExecutorProvider:t,formTimeZone:r}){const n=new Set(a(e)),o={arcadeExecutorProvider:t,formTimeZone:r,layer:e},i=[];for(const a of e.fields)U(a,e,n)&&i.push(P(a,o));const s=await Promise.all(i);return new u({elements:s,preserveFieldValuesWhenHidden:!0})}function g(e,t){for(const r of e??[])if("group"!==r.type){if("field"===r.type){if(!1===r.editable&&!r.editableExpression)return!0;if(t.subtypeField&&(m(t)||d(t))&&r.fieldName?.toLowerCase()===t.subtypeField.toLowerCase())return!0}}else if(g(r.elements??[],t))return!0;return!1}async function I(e,t,r){let o=null;g(e.elements??[],t)&&(o=new n({title:"",name:E,expression:"false"}));const i=f(o?[...e.expressionInfos??[],o]:e.expressionInfos),s={description:e.description,elements:new Array,title:e.title,preserveFieldValuesWhenHidden:e.preserveFieldValuesWhenHidden,supportsAttachmentElements:e.supportsAttachmentElements},{elements:a}=e;if(!a)return new u(s);const{arcadeExecutorProvider:l,formTimeZone:m}=r;for(const n of a){const e=await F(n,{arcadeExecutorProvider:l,expressionInfos:i,layer:t,formTimeZone:m});e&&s.elements.push(e)}return e.supportsAttachmentElements,new u(s)}async function F(t,r){return o(t)?j(t,r):i(t)?L(t,r):s(t)?Z(t,r):(T().warn(new e("batch-attribute-form:unsupported-element-type",`Form elements of type ${t.type} are not supported`)),null)}async function j(t,{arcadeExecutorProvider:r,expressionInfos:n,layer:o,formTimeZone:i}){const{fieldsIndex:s}=o,{description:a,domain:l,fieldName:p,hint:f,input:u,label:w}=t;if(null==p||!s.has(p))return T().warn(new e("batch-attribute-form:invalid-form-element-field",`Field element with label '${w}' does not refer to a valid field`)),null;!1!==t.editable||t.editableExpression||((t=t.clone()).editableExpression=E),o.subtypeField&&(m(o)||d(o))&&t.fieldName?.toLowerCase()===o.subtypeField.toLowerCase()&&((t=t.clone()).editableExpression=E);const y=new x({description:a,domain:l,field:s.get(p),hint:f,input:u,formTimeZone:i,layerTimeZone:A(o),label:w}),b=await c({element:t,expressionInfos:n,provider:r});return y.addLayer(o,b),y}async function L(e,t){const{arcadeExecutorProvider:r,expressionInfos:n,layer:o}=t,{description:i,label:s,initialState:a}=e,l=[];for(const p of e.elements){const e=await F(p,t);e&&l.push(e)}const m=new w({description:i,elements:l,label:s,initialState:a??"expanded"}),d=await c({element:e,expressionInfos:n,provider:r});return m.addLayer(o,d),m}async function Z(e,{arcadeExecutorProvider:t,expressionInfos:r,layer:n}){const{description:o,label:i,text:s,textFormat:a}=e,{fieldsIndex:l}=n,m=s&&"markdown"===a?await b(s):s,d=new y({compiledText:m,description:o,fieldsIndex:l,label:i}),p=await c({element:e,expressionInfos:r,provider:t}),{expressionParts:f}=d;if(f.length){const e=await Promise.all(f.map(e=>{const n=r.get(e)?.expression??e;return t.getArcadeExecutor(n)}));p.textExpressions=e}return d.addLayer(n,p),d}async function P(e,{arcadeExecutorProvider:t,layer:n,formTimeZone:o}){const i=r(e,n)||e.name,s=new x({field:e,label:i,formTimeZone:o,layerTimeZone:A(n)}),a={},l=(d(n)||m(n))&&n.subtypeField&&n.subtypeField.toLowerCase()===e.name.toLowerCase();return!l&&e.editable&&n.userHasUpdateItemPrivileges&&(a.editableExpression=await t.getArcadeExecutor("true")),l&&(a.editableExpression=await t.getArcadeExecutor("false")),s.addLayer(n,a),s}function U(e,t,r){return!r.has(e.name.toLowerCase())&&l(e,t)}function A(e){return m(e)&&e.parent&&(e=e.parent),e&&"datesInUnknownTimezone"in e&&e.datesInUnknownTimezone?p:e&&"preferredTimeZone"in e&&e.preferredTimeZone?e.preferredTimeZone:null}export{h as createBatchFormTemplate,v as createBatchFormTemplateFromFields};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{numericHash as t}from"../../../../core/string.js";import{isBarcodeScannerInput as n,isComboBoxInput as e,isRadioButtonsInput as i,isDatePickerInput as r,isDateTimePickerInput as o,isDateTimeOffsetPickerInput as $,isSwitchInput as u,isTextAreaInput as f,isTextBoxInput as s,isTimePickerInput as c}from"../../../../form/elements/inputs/inputUtils.js";import{isFieldElementTemplate as l,isGroupElementTemplate as m,isTextElementTemplate as a,isExcludedFromSharedForm as p}from"./templateUtils.js";const g="",d="num:";function y(n){return l(n)?t(S(n)).toString():m(n)?t(V(n)).toString():a(n)?t(b(n)).toString():t(JSON.stringify(n)).toString()}function S(t){return`${x(t)}.${h(t.field)}.${j(t.domain)}.${t.hint??g}.${O(t.input)}.${t.layerTimeZone??""}`}function V(t){const n=x(t)+`.${t.initialState}`;let e=g;for(const i of t.elements)p(i)||(e+="."+y(i).toString());return`${n}${e}`}function b(t){const n=x(t),{compiledText:e}=t;return`${n}.${e??g}`}function x(t){return`${t.label??g}.${t.description??g}`}function O(t){if(!t)return g;const{type:l}=t;if(n(t))return l??g;if(e(t)||i(t)){const{showNoValueOption:n}=t;return`${l}.${n}.${t.noValueOptionLabel??g}`}if(r(t))return`${l}.${T(t)}`;if(o(t)){const n=t.min?.getTime(),e=t.max?.getTime(),{includeTime:i}=t;return`${l}.${n}.${e}.${i}`}if($(t)){const n=T(t),{includeTimeOffset:e,timeResolution:i}=t;return`${l}.${n}.${e}.${i}`}if(u(t)){const{offValue:n,onValue:e}=t;return`${l}.${J(n)}.${J(e)}`}if(f(t)||s(t)){return`${l}.${t.minLength?.toString()??g}.${t.maxLength?.toString()??g}`}if(c(t)){const n=T(t),{timeResolution:e}=t;return`${l}.${n}.${e}`}return JSON.stringify(t)}function T(t){return`${t.min??g}.${t.max??g}`}function h(t){const n=t.name,e=t.alias??g;return`${n}.${e===n?g:e}.${t.nullable}.${t.type}.${t.length??g}.${t.defaultValue??g}.${t.description??g}.${t.editable}.${t.visible}`}function j(t){return t?"coded-value"===t.type?N(t):"range"===t.type?L(t):JSON.stringify(t):g}function N(t){const{type:n}=t;return`${n}.${t.codedValues.map(({code:t,name:n})=>`${J(t)}.${n}`).sort().join(".")}`}function J(t){return"number"==typeof t?`${d}${t}`:t}function L(t){const{maxValue:n,minValue:e,type:i}=t;return`${i}.${e}.${n}`}export{y as hashElementTemplate};
2
+ import{numericHash as t}from"../../../../core/string.js";import{isBarcodeScannerInput as n,isComboBoxInput as e,isRadioButtonsInput as i,isDatePickerInput as r,isDateTimePickerInput as o,isDateTimeOffsetPickerInput as $,isSwitchInput as u,isTextAreaInput as a,isTextBoxInput as f,isTimePickerInput as l}from"../../../../form/elements/inputs/inputUtils.js";import{isFieldElementTemplate as m,isGroupElementTemplate as c,isTextElementTemplate as s,isAttachmentElementTemplate as p,isExcludedFromSharedForm as g}from"./templateUtils.js";const d="",y="num:";function S(n){return m(n)?t(O(n)).toString():c(n)?t(h(n)).toString():s(n)?t(V(n)).toString():p(n)?t(x(n)).toString():t(JSON.stringify(n)).toString()}function O(t){return`${b(t)}.${j(t.field)}.${w(t.domain)}.${t.hint??d}.${N(t.input)}.${t.layerTimeZone??""}`}function h(t){const n=b(t)+`.${t.initialState}`;let e=d;for(const i of t.elements)g(i)||(e+="."+S(i).toString());return`${n}${e}`}function V(t){const n=b(t),{compiledText:e}=t;return`${n}.${e??d}`}function x(t){return`${b(t)}.${t.allowUserRename}.${t.attachmentKeyword??d}.${t.displayFilename}.${T(t.input)}.${t.maxAttachmentCount??d}.${t.minAttachmentCount??d}.${t.useOriginalFilename}`}function b(t){return`${t.label??d}.${t.description??d}`}function N(t){if(!t)return d;const{type:m}=t;if(n(t))return m??d;if(e(t)||i(t)){const{showNoValueOption:n}=t;return`${m}.${n}.${t.noValueOptionLabel??d}`}if(r(t))return`${m}.${J(t)}`;if(o(t)){const n=t.min?.getTime(),e=t.max?.getTime(),{includeTime:i}=t;return`${m}.${n}.${e}.${i}`}if($(t)){const n=J(t),{includeTimeOffset:e,timeResolution:i}=t;return`${m}.${n}.${e}.${i}`}if(u(t)){const{offValue:n,onValue:e}=t;return`${m}.${R(n)}.${R(e)}`}if(a(t)||f(t)){return`${m}.${t.minLength?.toString()??d}.${t.maxLength?.toString()??d}`}if(l(t)){const n=J(t),{timeResolution:e}=t;return`${m}.${n}.${e}`}return JSON.stringify(t)}function T(t){return t?JSON.stringify(t.toJSON()):d}function J(t){return`${t.min??d}.${t.max??d}`}function j(t){const n=t.name,e=t.alias??d;return`${n}.${e===n?d:e}.${t.nullable}.${t.type}.${t.length??d}.${t.defaultValue??d}.${t.description??d}.${t.editable}.${t.visible}`}function w(t){return t?"coded-value"===t.type?L(t):"range"===t.type?U(t):JSON.stringify(t):d}function L(t){const{type:n}=t;return`${n}.${t.codedValues.map(({code:t,name:n})=>`${R(t)}.${n}`).sort().join(".")}`}function R(t){return"number"==typeof t?`${y}${t}`:t}function U(t){const{maxValue:n,minValue:e,type:i}=t;return`${i}.${e}.${n}`}export{S as hashElementTemplate};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- function t(t){return"field"===t.type}function n(t){return"group"===t.type}function e(t){return"text"===t.type}function r(t){return e(t)}export{r as isExcludedFromSharedForm,t as isFieldElementTemplate,n as isGroupElementTemplate,e as isTextElementTemplate};
2
+ function t(t){return"attachment"===t.type}function n(t){return"field"===t.type}function e(t){return"group"===t.type}function r(t){return"text"===t.type}function u(n){return r(n)||t(n)}export{t as isAttachmentElementTemplate,u as isExcludedFromSharedForm,n as isFieldElementTemplate,e as isGroupElementTemplate,r as isTextElementTemplate};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{substitute as e,formatDate as t}from"../../../intl.js";import r from"../../../core/Error.js";import{clone as i}from"../../../core/lang.js";import n from"../../../core/Logger.js";import{mappedFind as l}from"../../../core/maybe.js";import{getMetersPerUnitForSR as o}from"../../../core/units.js";import s from"../../../geometry/Polygon.js";import{createExtentFromPoint as u,scaleExtent as a}from"../../../geometry/support/geometryUtils.js";import c from"../../../rest/support/FullTextSearch.js";const d=/https?:\/\/services.*\.arcgis\.com/i,f=/(?:\{([^}]+)\})/g,m=()=>n.getLogger("esri.widgets.Search.support.layerSearchUtils");function p(e,t){const{exactMatch:i=!1,location:n,maxResults:l,spatialReference:s,source:u,sourceIndex:a,suggestResult:c,view:d}=e,{layer:f,filter:p,zoomScale:y}=u,b=d?.scale,L=g(u,d),R=t?.signal;return x(f).then(()=>{const e=f.popupTemplate;return e?e.getRequiredFields(f.fieldsIndex):null}).then(e=>{const{objectIdField:t,returnZ:g}=f,x=S(u);if(!I(f,x))throw m().error("invalid-field: displayField is invalid."),new r("getResults():invalid-field","displayField is invalid.");const C=e?.length?e:[x],E=u.outFields||C,M=h(E);E.includes(t)||M||E.push(t),f.floorInfo?.floorField&&E.push(f.floorInfo.floorField);if(!(M||j(f,E)))throw m().error("invalid-field: outField is invalid."),new r("getResults():invalid-field","outField is invalid.");const N=f.createQuery(),{orderByFields:O}=u;if(O&&(N.orderByFields=O),s){N.outSpatialReference=s;const e=1/o(s);e&&(N.maxAllowableOffset=e)}const k="mesh"===f.geometryType||"multipatch"===f.geometryType,D=f.capabilities?.data?.supportsZ&&!k;if(N.returnZ=D&&!1!==g,N.returnGeometry=!0,N.multipatchOption=k?"xyFootprint":null,E&&(N.outFields=E),n)N.geometry=n;else if(c.key)N.objectIds=[c.key];else{const e=u.searchFields||[x];if(!j(f,e))throw m().error("invalid-field: search field is invalid."),new r("getResults():invalid-field","search field is invalid.");T(f)&&(N.num=l),L&&(N.geometry=L);const t=c.text?.trim();if(!t)return[];const n=c.text,{prefix:o="",suffix:s=""}=u,a=q(`${o}${n}${s}`);$(f)&&v(f,e)&&!i&&n&&(N.fullText=w({text:n,searchFields:e}));const d=A({searchTerm:a,layer:f,searchFields:e,filter:p,exactMatch:i,query:N,type:"search"});if(N.where=d,!F(N))return[]}return f.queryFeatures(N,{signal:R}).then(async e=>{const t=await import("../../../geometry/operators/labelPointOperator.js");return Z(e,d,u,a,x,b,y,t)})})}function y(e,t){const{source:i,spatialReference:n,view:l,suggestTerm:o,maxSuggestions:s,sourceIndex:u,exactMatch:a}=e,{layer:c,filter:d}=i,p=t?.signal,y=g(i,l);return x(c).then(()=>{if(!T(c))return[];const e=S(i),t=i.searchFields||[e],l=[];i.suggestionTemplate?i.suggestionTemplate.replaceAll(f,(e,t)=>(l.push(t),e)):l.push(e);const g=h(l);l.includes(c.objectIdField)||g||l.push(c.objectIdField);const x=I(c,e),b=g||j(c,l),L=j(c,t);if(!x)throw m().error("invalid-field: displayField is invalid."),new r("getSuggestions():invalid-field","displayField is invalid.");if(!b)throw m().error("invalid-field: outField is invalid."),new r("getSuggestions():invalid-field","outField is invalid.");if(!L)throw m().error("invalid-field: search field is invalid."),new r("getSuggestions():invalid-field","search field is invalid.");const R=c.createQuery(),{orderByFields:C}=i;C&&(R.orderByFields=C),R.outSpatialReference=n,R.returnGeometry=!1,R.num=s,R.outFields=l,y&&(R.geometry=y);if(!o.trim())return[];const{prefix:E="",suffix:M=""}=i,N=q(`${E}${o}${M}`);$(c)&&v(c,t)&&!a&&o&&(R.fullText=w({text:o,searchFields:t}));const O=A({searchTerm:N,layer:c,searchFields:t,filter:d,exactMatch:a,query:R,type:"suggest"});return R.where=O,F(R)?c.queryFeatures(R,{signal:p}).then(t=>B(t,i,u,e)):[]})}function g(e,t){const{filter:r,withinViewEnabled:i}=e,n=t?.extent,l=r?.geometry;return l??(i&&n?n:void 0)}function h(e){return e&&e.includes("*")}async function x(e){e&&await e.load()}function F(e){return!(!e.fullText&&!e.where)}function v(e,t){const r=e?.indexes;if(!r||!t?.length)return!1;return r.filter(e=>"FullText"===e.indexType).some(e=>{const r=e.fields?.split(",").map(e=>e.trim().toLowerCase())||[];return t.every(e=>r.includes(e.toLowerCase()))})}function w({text:e,searchFields:t}){return e.trim().split(" ").filter(e=>!!e.trim()).map(e=>new c({onFields:t,searchTerm:e,searchType:"prefix"}))}function $(e){return e?.capabilities?.query?.supportsFullTextSearch??!1}function T(e){return e?.capabilities?.query?.supportsPagination??!1}function b(e){return e?.fieldsIndex?.fields?.find(e=>"string"===e.type)?.name??""}function S(e){return e.displayField||e.layer.displayField||b(e.layer)}function j(e,t){return!(!e||!t?.length)&&t.every(t=>I(e,t))}function I(e,t){return!!e.getField(t)}function L(e){for(let t=0;t<e.length;t++)if(e.charCodeAt(t)>255)return!0;return!1}function R({codedValues:e},t,r){return l(e??[],e=>{const i=e.name,n=r?i:i.toLowerCase();return(r?t:t.toLowerCase())===n?e.code.toString():null})??null}function q(e){return e.replaceAll("'","''")}function C(e,t){const r=t?.where;return r?`(${e}) AND (${r})`:e}function E({currentTerm:e,field:t,filter:r,exactMatch:i,url:n,type:l}){const o=t?.type,s=t?.name;if("string"===o||"date"===o||"global-id"===o){const t=d.test(n??""),o=t&&L(e)?"N":"";if(i&&"search"===l)return C(`${s} = ${o}'${e}'`,r);if(t){return C(`${s} LIKE ${o}${`'${e}%'`}`,r)}return C(`${`LOWER(${s})`} LIKE ${o}${`'${e.toLowerCase()}%'`}`,r)}if("oid"===o||"small-integer"===o||"integer"===o||"single"===o||"double"===o){const t=Number(e);return isNaN(t)?null:C(`${s} = ${t}`,r)}return C(`${s} = ${e}`,r)}function M(e,t){return e?` OR (${t})`:`(${t})`}function A({searchTerm:e,layer:t,searchFields:r,filter:i,exactMatch:n,query:l,type:o}){const{definitionExpression:s,url:u}=t;let a="";return!l.fullText&&e&&r&&r.forEach(r=>{const l=t.getField(r),s=t.getFieldDomain?.(r),c=("coded-value"===s?.type?R(s,e,n):null)||e||null;if(null!==c){const e=E({currentTerm:c,field:l,filter:i,exactMatch:n,url:u,type:o});e&&(a+=M(a,e))}}),s&&a?`(${s}) AND (${a})`:s||a}function N(e,t){let r=null;const{codedValues:i}=e;return i&&i.length&&i.some(e=>e.code===t&&(r=e.name,!0)),r}function O(e,t){return e[t]??e[Object.keys(e).find(e=>e.toLowerCase()===t.toLowerCase())]}function k(r,i,n){const l=r.sourceLayer,{attributes:o}=r,s=l.getFieldDomain?.(n,{feature:r});if(i)return e(i,o);if(n&&o){const e=l.getField(n),r=O(o,n);return null==r?"":"coded-value"===s?.type?N(s,r)??"":"date"===e?.type?t(new Date(r)):"number"==typeof r?r.toString():"string"!=typeof r?"":r.trim()}return""}function D(e,t,r,i){const n=e.sourceLayer,{attributes:l}=e,{objectIdField:o}=n,s=o?l[o]:null;return{text:k(e,t.suggestionTemplate,i),key:s,sourceIndex:r}}function B(e,t,r,i){return e.features.map(e=>D(e,t,r,i))}function P(e){return null!=e&&null!=e.minScale&&null!=e.maxScale}function V(e,t,r,n,l,o,c,d){const f=e.clone();f.layer=e.layer;const m=e.sourceLayer,p=m?.objectIdField,y=p?e.attributes[p]:null,g=k(e,r.searchTemplate,l);null!=o&&P(m)&&(m.minScale&&m.minScale<o?o=m.minScale:m.maxScale&&m.maxScale>o&&(o=m.maxScale));const h=f.geometry?u(d.execute(f.geometry),t??void 0,o??void 0):void 0,x="number"==typeof c&&h?a(i(h),t??void 0,c):h,F=e.clone();return F.layer=e.layer,null!=x&&(F.geometry=s.fromExtent(x)),{extent:x,target:F,feature:f,key:y,name:g,sourceIndex:n}}function Z(e,t,r,i,n,l,o,s){return e.features.map(e=>V(e,t,r,i,n,l,o,s))}export{w as createFullTextSearchInfos,p as getResults,y as getSuggestions};
2
+ import{substitute as e,formatDate as t}from"../../../intl.js";import r from"../../../core/Error.js";import{clone as i}from"../../../core/lang.js";import n from"../../../core/Logger.js";import{mappedFind as l}from"../../../core/maybe.js";import{getMetersPerUnitForSR as o}from"../../../core/units.js";import s from"../../../geometry/Polygon.js";import{createExtentFromPoint as u,scaleExtent as a}from"../../../geometry/support/geometryUtils.js";import c from"../../../rest/support/FullTextSearch.js";const d=/https?:\/\/services.*\.arcgis\.com/i,f=/(?:\{([^}]+)\})/g,m=()=>n.getLogger("esri.widgets.Search.support.layerSearchUtils");function p(e,t){const{exactMatch:i=!1,location:n,maxResults:l,spatialReference:s,source:u,sourceIndex:a,suggestResult:c,view:d}=e,{layer:f,filter:p,zoomScale:y}=u,b=d?.scale,L=g(u,d),R=t?.signal;return x(f).then(()=>{const e=f.popupTemplate;return e?e.getRequiredFields(f.fieldsIndex):null}).then(e=>{const{objectIdField:t,returnZ:g}=f,x=S(u);if(!I(f,x))throw m().error("invalid-field: displayField is invalid."),new r("getResults():invalid-field","displayField is invalid.");const C=e?.length?e:[x],E=u.outFields||C,M=h(E);E.includes(t)||M||E.push(t),f.floorInfo?.floorField&&E.push(f.floorInfo.floorField);if(!(M||j(f,E)))throw m().error("invalid-field: outField is invalid."),new r("getResults():invalid-field","outField is invalid.");const N=f.createQuery(),{orderByFields:O}=u;if(O&&(N.orderByFields=O),s){N.outSpatialReference=s;const e=1/o(s);e&&(N.maxAllowableOffset=e)}const k="mesh"===f.geometryType||"multipatch"===f.geometryType,D=f.capabilities?.data?.supportsZ&&!k;if(N.returnZ=D&&!1!==g,N.returnGeometry=!0,N.multipatchOption=k?"xyFootprint":null,E&&(N.outFields=E),n)N.geometry=n;else if(c.key)N.objectIds=[c.key];else{const e=u.searchFields||[x];if(!j(f,e))throw m().error("invalid-field: search field is invalid."),new r("getResults():invalid-field","search field is invalid.");T(f)&&(N.num=l),L&&(N.geometry=L);const t=c.text?.trim();if(!t)return[];const n=c.text,{prefix:o="",suffix:s=""}=u,a=q(`${o}${n}${s}`);$(f)&&v(f,e)&&!i&&n&&(N.fullText=w({text:n,searchFields:e}));const d=A({searchTerm:a,layer:f,searchFields:e,filter:p,exactMatch:i,query:N,type:"search"});if(N.where=d,!F(N))return[]}return f.queryFeatures(N,{signal:R}).then(async e=>{const t=await import("../../../geometry/operators/labelPointOperator.js");return Z(e,d,u,a,x,b,y,t)})})}function y(e,t){const{source:i,spatialReference:n,view:l,suggestTerm:o,maxSuggestions:s,sourceIndex:u,exactMatch:a}=e,{layer:c,filter:d}=i,p=t?.signal,y=g(i,l);return x(c).then(()=>{if(!T(c))return[];const e=S(i),t=i.searchFields||[e],l=[];i.suggestionTemplate?i.suggestionTemplate.replaceAll(f,(e,t)=>(l.push(t),e)):l.push(e);const g=h(l);l.includes(c.objectIdField)||g||l.push(c.objectIdField);const x=I(c,e),b=g||j(c,l),L=j(c,t);if(!x)throw m().error("invalid-field: displayField is invalid."),new r("getSuggestions():invalid-field","displayField is invalid.");if(!b)throw m().error("invalid-field: outField is invalid."),new r("getSuggestions():invalid-field","outField is invalid.");if(!L)throw m().error("invalid-field: search field is invalid."),new r("getSuggestions():invalid-field","search field is invalid.");const R=c.createQuery(),{orderByFields:C}=i;C&&(R.orderByFields=C),R.outSpatialReference=n,R.returnGeometry=!1,R.num=s,R.outFields=l,y&&(R.geometry=y);if(!o.trim())return[];const{prefix:E="",suffix:M=""}=i,N=q(`${E}${o}${M}`);$(c)&&v(c,t)&&!a&&o&&(R.fullText=w({text:o,searchFields:t}));const O=A({searchTerm:N,layer:c,searchFields:t,filter:d,exactMatch:a,query:R,type:"suggest"});return R.where=O,F(R)?c.queryFeatures(R,{signal:p}).then(t=>B(t,i,u,e)):[]})}function g(e,t){const{filter:r,withinViewEnabled:i}=e,n=t?.extent,l=r?.geometry;return l??(i&&n?n:void 0)}function h(e){return e&&e.includes("*")}async function x(e){e&&await e.load()}function F(e){return!(!e.fullText&&!e.where)}function v(e,t){const r=e?.indexes;if(!r||!t?.length)return!1;return r.filter(e=>"FullText"===e.indexType).some(e=>{const r=e.fields?.split(",").map(e=>e.trim().toLowerCase())||[];return t.every(e=>r.includes(e.toLowerCase()))})}function w({text:e,searchFields:t}){return e.trim().split(" ").filter(e=>!!e.trim()).map(e=>new c({onFields:t,searchTerm:e,searchType:"prefix"}))}function $(e){return e?.capabilities?.query?.supportsFullTextSearch??!1}function T(e){return e?.capabilities?.query?.supportsPagination??!1}function b(e){return e?.fieldsIndex?.fields?.find(e=>"string"===e.type)?.name??""}function S(e){return e.displayField||e.layer.displayField||b(e.layer)}function j(e,t){return!(!e||!t?.length)&&t.every(t=>I(e,t))}function I(e,t){return!!e.getField(t)}function L(e){for(let t=0;t<e.length;t++)if(e.charCodeAt(t)>255)return!0;return!1}function R({codedValues:e},t,r){return l(e??[],e=>{const i=e.name,n=r?i:i.toLowerCase();return(r?t:t.toLowerCase())===n?e.code.toString():null})??null}function q(e){return e.replaceAll("'","''")}function C(e,t){const r=t?.where;return r?`(${e}) AND (${r})`:e}function E({currentTerm:e,field:t,filter:r,exactMatch:i,url:n,type:l}){const o=t?.type,s=t?.name;if("string"===o||"date"===o||"global-id"===o){const t=d.test(n??""),o=t&&L(e)?"N":"";if(i&&"search"===l)return C(`${s} = ${o}'${e}'`,r);if(t){return C(`${s} LIKE ${o}${`'${e}%'`}`,r)}return C(`${`LOWER(${s})`} LIKE ${o}${`'${e.toLowerCase()}%'`}`,r)}if("oid"===o||"small-integer"===o||"integer"===o||"single"===o||"double"===o){const t=Number(e);return isNaN(t)?null:C(`${s} = ${t}`,r)}return C(`${s} = ${e}`,r)}function M(e,t){return e?` OR (${t})`:`(${t})`}function A({searchTerm:e,layer:t,searchFields:r,filter:i,exactMatch:n,query:l,type:o}){const{definitionExpression:s,url:u}=t;let a="";return!l.fullText&&e&&r&&r.forEach(r=>{const l=t.getField(r),s=t.getFieldDomain?.(r),c=("coded-value"===s?.type?R(s,e,n):null)||e||null;if(null!==c){const e=E({currentTerm:c,field:l,filter:i,exactMatch:n,url:u,type:o});e&&(a+=M(a,e))}}),s&&a?`(${s}) AND (${a})`:l.fullText&&s?s:a}function N(e,t){let r=null;const{codedValues:i}=e;return i&&i.length&&i.some(e=>e.code===t&&(r=e.name,!0)),r}function O(e,t){return e[t]??e[Object.keys(e).find(e=>e.toLowerCase()===t.toLowerCase())]}function k(r,i,n){const l=r.sourceLayer,{attributes:o}=r,s=l.getFieldDomain?.(n,{feature:r});if(i)return e(i,o);if(n&&o){const e=l.getField(n),r=O(o,n);return null==r?"":"coded-value"===s?.type?N(s,r)??"":"date"===e?.type?t(new Date(r)):"number"==typeof r?r.toString():"string"!=typeof r?"":r.trim()}return""}function D(e,t,r,i){const n=e.sourceLayer,{attributes:l}=e,{objectIdField:o}=n,s=o?l[o]:null;return{text:k(e,t.suggestionTemplate,i),key:s,sourceIndex:r}}function B(e,t,r,i){return e.features.map(e=>D(e,t,r,i))}function P(e){return null!=e&&null!=e.minScale&&null!=e.maxScale}function V(e,t,r,n,l,o,c,d){const f=e.clone();f.layer=e.layer;const m=e.sourceLayer,p=m?.objectIdField,y=p?e.attributes[p]:null,g=k(e,r.searchTemplate,l);null!=o&&P(m)&&(m.minScale&&m.minScale<o?o=m.minScale:m.maxScale&&m.maxScale>o&&(o=m.maxScale));const h=f.geometry?u(d.execute(f.geometry),t??void 0,o??void 0):void 0,x="number"==typeof c&&h?a(i(h),t??void 0,c):h,F=e.clone();return F.layer=e.layer,null!=x&&(F.geometry=s.fromExtent(x)),{extent:x,target:F,feature:f,key:y,name:g,sourceIndex:n}}function Z(e,t,r,i,n,l,o,s){return e.features.map(e=>V(e,t,r,i,n,l,o,s))}export{w as createFullTextSearchInfos,p as getResults,y as getSuggestions};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import e from"../../core/ArrayPool.js";import{handlesGroup as t,makeHandle as n}from"../../core/handleUtils.js";import"../../core/has.js";import"../../core/Logger.js";import{signalFromSignalOrOptions as o}from"../../core/promiseUtils.js";import{watch as i,syncAndInitial as r}from"../../core/reactiveUtils.js";import{waitAnimationFrame as s}from"../../core/scheduling.js";import{clearVNodeCache as c}from"./vnodeCache.js";var a,f,u=function(e){if("WebkitTransition"in e.style)a="webkitTransitionEnd",f="webkitAnimationEnd";else{if(!("transition"in e.style))throw new Error("Your browser is not supported!");a="transitionend",f="animationend"}},l=function(e){a||u(e)},d=function(e,t){return void 0===t&&(t=e+"-active"),function(n){l(n);var o=!1,i=function(r){o||(o=!0,n.removeEventListener(a,i),n.removeEventListener(f,i),n.classList.remove(e),n.classList.remove(t))};n.classList.add(e),n.addEventListener(a,i),n.addEventListener(f,i),requestAnimationFrame(function(){n.classList.add(t)})}},m=function(e,t){return void 0===t&&(t=e+"-active"),function(n,o){l(n);var i=!1,r=function(e){i||(i=!0,n.removeEventListener(a,r),n.removeEventListener(f,r),o())};n.classList.add(e),n.addEventListener(a,r),n.addEventListener(f,r),requestAnimationFrame(function(){n.classList.add(t)})}};function p(...t){const n=e.acquire();for(let e=0;e<t.length;e++){const o=t[e],i=typeof o;if("string"===i)n.push(o);else if(Array.isArray(o))n.push.apply(n,o);else if("object"===i)for(const e in o)o[e]&&n.push(e)}const o=n.join(" ");return e.release(n),o}const v=(()=>{const e=new Map,o=new ResizeObserver(t=>{c();for(const n of t)e.get(n.target)?.(n)}),s=(t,i,r)=>(e.set(t,i),o.observe(t,r),n(()=>{o.unobserve(t),e.delete(t)}));return(e,o,c)=>{let a=null;return t([i(()=>"function"==typeof e?e():e,e=>{a?.remove(),e&&(a=s(e,o,c))},r),n(()=>a?.remove())])}})();function y(e){const t=e?.closest("[dir]");return null!==t&&t instanceof HTMLElement&&"rtl"===t.dir||"rtl"===document.dir}function L(e,t){return("enter"===e?d:m)(t)}function E(e){const t="data-node-ref";this[e.getAttribute(t)]=null}function w(e){const t="data-node-ref";this[e.getAttribute(t)]=e}async function h(e,t){await s(o(t));const n="function"==typeof e?e():e;n&&("componentOnReady"in n&&"function"==typeof n.componentOnReady&&await n.componentOnReady(),"setFocus"in n&&"function"==typeof n.setFocus?await n.setFocus():n instanceof HTMLElement&&n.focus())}async function b(e,t){await s(o(t));const n="function"==typeof e?e():e;n&&("selectText"in n&&"function"==typeof n.selectText?await n.selectText():n instanceof HTMLInputElement&&n.select())}export{p as classes,L as cssTransition,E as discardNode,y as isRTL,v as onResize,b as selectText,h as setFocus,w as storeNode};
2
+ import t from"../../core/ArrayPool.js";import{handlesGroup as e,makeHandle as n}from"../../core/handleUtils.js";import"../../core/has.js";import"../../core/Logger.js";import{wrapAbortWithTimeout as o,signalFromSignalOrOptions as i,isAborted as r}from"../../core/promiseUtils.js";import{watch as s,syncAndInitial as c}from"../../core/reactiveUtils.js";import{waitAnimationFrame as a}from"../../core/scheduling.js";import{clearVNodeCache as u}from"./vnodeCache.js";var f,l,d=function(t){if("WebkitTransition"in t.style)f="webkitTransitionEnd",l="webkitAnimationEnd";else{if(!("transition"in t.style))throw new Error("Your browser is not supported!");f="transitionend",l="animationend"}},m=function(t){f||d(t)},v=function(t,e){return void 0===e&&(e=t+"-active"),function(n){m(n);var o=!1,i=function(r){o||(o=!0,n.removeEventListener(f,i),n.removeEventListener(l,i),n.classList.remove(t),n.classList.remove(e))};n.classList.add(t),n.addEventListener(f,i),n.addEventListener(l,i),requestAnimationFrame(function(){n.classList.add(e)})}},p=function(t,e){return void 0===e&&(e=t+"-active"),function(n,o){m(n);var i=!1,r=function(t){i||(i=!0,n.removeEventListener(f,r),n.removeEventListener(l,r),o())};n.classList.add(t),n.addEventListener(f,r),n.addEventListener(l,r),requestAnimationFrame(function(){n.classList.add(e)})}};const L=1e4;function w(...e){const n=t.acquire();for(let t=0;t<e.length;t++){const o=e[t],i=typeof o;if("string"===i)n.push(o);else if(Array.isArray(o))n.push.apply(n,o);else if("object"===i)for(const t in o)o[t]&&n.push(t)}const o=n.join(" ");return t.release(n),o}const y=(()=>{const t=new Map,o=new ResizeObserver(e=>{u();for(const n of e)t.get(n.target)?.(n)}),i=(e,i,r)=>(t.set(e,i),o.observe(e,r),n(()=>{o.unobserve(e),t.delete(e)}));return(t,o,r)=>{let a=null;return e([s(()=>"function"==typeof t?t():t,t=>{a?.remove(),t&&(a=i(t,o,r))},c),n(()=>a?.remove())])}})();function E(t){const e=t?.closest("[dir]");return null!==e&&e instanceof HTMLElement&&"rtl"===e.dir||"rtl"===document.dir}function h(t,e){return("enter"===t?v:p)(e)}function b(t){const e="data-node-ref";this[t.getAttribute(e)]=null}function j(t){const e="data-node-ref";this[t.getAttribute(e)]=t}async function g(t,e){const n=o(e,L),s=i(n),c=e?.waitForFocus??!0;await a(s);const u="function"==typeof t?t():t;if(!u)return;const f=async()=>{"setFocus"in u&&"function"==typeof u.setFocus?await u.setFocus():u instanceof HTMLElement&&u.focus()};if(c)for(;!A(u)&&!r(n);)await a(s),await f();else r(n)||A(u)||await f()}function A(t){return t.matches(":focus-within")||document.activeElement===t}async function T(t,e){await a(i(e));const n="function"==typeof t?t():t;n&&("selectText"in n&&"function"==typeof n.selectText?await n.selectText():n instanceof HTMLInputElement&&n.select())}export{w as classes,h as cssTransition,b as discardNode,E as isRTL,y as onResize,T as selectText,g as setFocus,j as storeNode};
@@ -1,2 +0,0 @@
1
- /*! For license information please see 85edbb072a2ce6c1bb30.js.LICENSE.txt */
2
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[8872],{11433(t,e,s){s.d(e,{C:()=>f,G:()=>g,c:()=>u,p:()=>h,t:()=>d});var i=s(58234),o=s(32352),n=s(41276),r=s(87993),a=s(22998);let c;const h=()=>{c?.forEach(({callbacks:t},e)=>{const s=Object.keys(e);t.forEach(t=>t(s))}),c=void 0},l=(t,e,s)=>{const o=t.manager;return o.V!==n.s6&&o.V!==s&&o.S(void 0,void 0),0===o.T.length&&queueMicrotask(()=>o.S(void 0,void 0)),o.V=s,o.T.push((t,o)=>(0,i.UF)(e,void 0,s===o?t:void 0)),s},d=(t=[(0,o.r)(),...(0,o.d)()],e,s)=>{const n=Array.isArray(t)?t:[t];let r=n.length+1;const a=t=>{r-=1,void 0!==t&&(r=Math.min(r,0)),0===r&&e(t)};n.forEach(t=>((t,e,s)=>{const o=Object.keys(t),n=o.length;void 0===c&&queueMicrotask(h),c??=new Map;let r=c.get(t);return void 0===r&&(r={callbacks:[],keyCount:n},c.set(t,r)),r.keyCount!==n&&(r.callbacks.forEach(t=>t(o)),r.callbacks=[],r.keyCount=n),r.callbacks.push(o=>{const r=t=>(0,i.UF)(e,null,t),a=o[n];void 0===a?r(void 0):t[a]===s?r(a):r(void 0)}),s})(t,e=>a(void 0===e?void 0:{key:e,host:t,isReactive:!1}),s));for(const t of n)if("manager"in t&&t.manager.component===t){l(t,e=>a(void 0===e?void 0:{key:e,host:t,isReactive:!0}),s);break}return s},u=((t="",e={},s=(0,o.r)())=>{const i={emit:i=>{""===t&&h();const o=new CustomEvent(t,{detail:i,cancelable:!0,bubbles:!0,composed:!0,...e});return s.el.dispatchEvent(o),o}};return""===t&&d(void 0,e=>t=e.key,i),i}).bind(null,"");var p;p=o.c;class f{constructor(t){this.#t=[],this.#e=[],this.#s=[],this.#i=[],this.#o=[],this.#n=[],this.#r=[],this.#a=[],this.#c=[],this.#h=!1,this.P=new r.c,this.connectedCalled=!1,this.loadedCalled=!1,this[p]=!0,this.#l=[];const e=this,s=t??(0,o.r)(new.target.name);e.#d=s,e.ready=e.P.promise,e.#u=y(e),e.component=s,e.#d.addController(e),void 0===e.#d.manager||((0,o.b)(e),queueMicrotask(()=>e.catchUpLifecycle()))}#t;#e;#s;#i;#o;#n;#r;#a;#c;#h;#d;catchUpLifecycle(){const{manager:t}=this.#d;!t.connectedCalled||this.connectedCalled||this.triggerConnected(),!t.#h||this.triggerLoad().then(()=>t.loadedCalled&&this.triggerLoaded()).catch((0,a.G3)(this.#d))}#u;get exports(){return this.#u}set exports(t){const e=this.#u;e!==t&&(this.#u=t,this.#l.forEach(i.UF),this.connectedCalled&&!1!==this.O&&this.#d.requestUpdate(this.O,e)),this.P.resolve(t)}setProvisionalExports(t,e=!0){this.#u=e?y(t):t,this.#l.forEach(i.UF)}#l;watchExports(t){const e=()=>t(this.#u);return this.#l.push(e),()=>{this.#l.splice(this.#l.indexOf(e),1)}}get use(){return(0,o.a)(this.#d),o.u}get useRef(){return(0,o.a)(this.#d),o.k}get useRefSync(){return(0,o.a)(this.#d),o.l}controllerRemoved(){this.#d.el.isConnected&&this.triggerDisconnected(),this.triggerDestroy()}onConnected(t){this.#t.push(t)}onDisconnected(t){this.#e.push(t)}onLoad(t){this.#s.push(t)}onLoaded(t){this.#i.push(t)}onUpdate(t){this.#o.push(t)}onUpdated(t){this.#n.push(t)}onDestroy(t){this.#r.push(t)}onLifecycle(t){this.#a.push(t),this.connectedCalled&&this.#d.el.isConnected&&this.#p(t)}triggerConnected(){const t=this;t.hostConnected&&(0,i.UF)(t.hostConnected,t),t.#t.forEach(i.UF),t.triggerLifecycle(),t.connectedCalled=!0}triggerDisconnected(){const t=this;t.hostDisconnected&&(0,i.UF)(t.hostDisconnected,t),t.#e.forEach(i.UF),t.#c.forEach(i.UF),t.#c=[]}async triggerLoad(){if(this.#h)return;this.#h=!0;const t=this;t.hostLoad&&await(0,i.ao)(t.hostLoad,t),this.#s.length>0&&await Promise.allSettled(this.#s.map(i.ao)),this.P.resolve(this.#u)}triggerLoaded(){this.loadedCalled||(this.hostLoaded&&(0,i.UF)(this.hostLoaded,this),this.#i.forEach(i.UF),this.loadedCalled=!0)}triggerUpdate(t){this.hostUpdate&&(0,i.UF)(this.hostUpdate,this,t),this.#o.forEach(m,t)}triggerUpdated(t){this.hostUpdated&&(0,i.UF)(this.hostUpdated,this,t),this.#n.forEach(m,t)}triggerDestroy(){this.hostDestroy&&(0,i.UF)(this.hostDestroy,this),this.#r.forEach(i.UF)}triggerLifecycle(){this.hostLifecycle&&this.#p(()=>this.hostLifecycle()),this.#a.forEach(this.#p,this)}#p(t){(0,o.a)(this.#d);const e=(0,i.UF)(t);(Array.isArray(e)?e:[e]).forEach(t=>{"function"==typeof t?this.#c.push(t):"object"==typeof t&&"function"==typeof t.remove&&this.#c.push(t.remove)})}}function m(t){(0,i.UF)(t,void 0,this)}const g=f,y=t=>{if("object"!=typeof t&&"function"!=typeof t||null===t)return t;const e=new Proxy(t,{get(t,s,i){if("exports"!==s&&"_exports"!==s||!(s in t)||t[s]!==e)return s in t||s in Promise.prototype||"symbol"==typeof s?"function"==typeof t?t[s]:Reflect.get(t,s,i):void 0}});return e}},32352(t,e,s){s.d(e,{a:()=>r,b:()=>h,c:()=>i,d:()=>l,e:()=>y,i:()=>o,j:()=>u,k:()=>f,l:()=>m,r:()=>a,s:()=>g,u:()=>p});const i=Symbol.for("controller"),o=t=>"function"==typeof t?.then;let n;const r=t=>{n!==t&&(n=t,queueMicrotask(()=>n===t?n=void 0:0))},a=t=>n;let c=[];const h=t=>{if(void 0===t)return void(c=[]);const e=c.indexOf(t);c=-1===e?[...c,t]:c.slice(0,e+1),queueMicrotask(()=>c=[])},l=()=>c;let d;const u=t=>{d!==t&&(d=t,queueMicrotask(()=>d===t?d=void 0:0))},p=async(t,e)=>{const s=m(t);if(void 0===s)return t;if(await s.ready,"function"==typeof e){const t=s.watchExports(s=>e(s,t))}return s.exports},f=async t=>{const e=m(t);return await e.ready,e},m=t=>{const e=a().manager.X(t);if(void 0!==e)return e;if((t=>"object"==typeof t&&null!==t&&(i in t||"hostConnected"in t||"hostDisconnected"in t||"hostUpdate"in t||"hostUpdated"in t))(t))return t;const s=(()=>{const t=d;return d=void 0,t})();return void 0!==s?s:void 0};let g=!1;const y=t=>{g=!0;try{return t()}finally{g=!1}}},83982(t,e,s){s.d(e,{C:()=>c,a:()=>l,b:()=>h,s:()=>d});var i=s(58234),o=s(11433),n=s(41276),r=s(87993),a=s(32352);class c extends o.G{constructor(t){super(t),this.destroyed=!1,this.R=!1,this.V=n.s6,this.T=[],this.#f=new WeakMap,this.#d=t,this.exports=void 0,this.hasDestroy=l in t&&"function"==typeof t.destroy,n.WF.prototype.addController.call(t,{hostConnected:()=>{if(this.destroyed){const e=t.el.localName;throw t.el.remove(),new Error(`The ${e} component has already been destroyed. It cannot be used again. If you meant to disconnect and reconnect a component without automatic destroy, set the ${l} prop.`)}void 0!==this.#m&&clearTimeout(this.#m),(0,o.p)();for(const e of t.M)"triggerConnected"in e?e.triggerConnected():(0,i.UF)(e.hostConnected,e)},hostDisconnected:()=>{for(const e of t.M)"triggerDisconnected"in e?e.triggerDisconnected():(0,i.UF)(e.hostDisconnected,e);this.hasDestroy&&!this.destroyed&&this.U()},hostUpdate:()=>{for(const e of t.M)"triggerUpdate"in e?e.triggerUpdate(this.Q):(0,i.UF)(e.hostUpdate,e,this.Q)},hostUpdated:()=>{for(const e of t.M)"triggerUpdated"in e?e.triggerUpdated(this.Q):(0,i.UF)(e.hostUpdated,e,this.Q);this.Q=void 0}}),queueMicrotask(()=>this.R=!0),(0,a.a)(t)}#m;#d;async destroy(){if(!this.destroyed){this.#d.el.isConnected&&(this.hasDestroy=!1,this.#d.el.remove()),this.#m=void 0,this.destroyed=!0;for(const t of this.#d.M)"triggerDestroy"in t?t.triggerDestroy():(0,i.UF)(t.hostDestroy,t);this.#d.M.splice(0)}}U(){if(void 0!==this.#m&&clearTimeout(this.#m),!this.#d.el.isConnected&&!this.#d.autoDestroyDisabled){const t=()=>{this.#d.destroy()};this.#m=(0,r.o)(t,h)}}S(t,e){const s=this.T;this.V=n.s6,this.T=[],s.forEach(s=>s(t,e))}#f;W(t,e){("object"==typeof e&&null!==e||"function"==typeof e)&&this.#f.set(e,t)}X(t){return"object"==typeof t&&null!==t||"function"==typeof t?this.#f.get(t):void 0}}let h=1e3;const l="autoDestroyDisabled";function d(t){h=t}},98824(t,e,s){s.d(e,{WF:()=>S,le:()=>T,s6:()=>x,CP:()=>k,zl:()=>L,Bq:()=>P,pf:()=>R});var i=s(11433),o=s(22343);o.W3,o.Ec;var n=s(87993);const r=t=>{let e=t;for(;e=e.parentNode??e.host;)if(e?.constructor?.lumina){const s=e;return s.manager?.loadedCalled||(s.J??s._offspring).push(t),(s.I??s._postLoad).promise}return!1},a={};function c(){}function h(t){for(const e of["Associated","Disabled","Reset","StateRestore"]){const s=`orm${e}Callback`;t.prototype["f"+s]=async function(...t){await this.componentOnReady(),(this.el??this).dispatchEvent(new CustomEvent(`luminaF${s}`,{detail:t}))}}}const l=Object.defineProperty,d=globalThis.HTMLElement??c;class u extends d{constructor(){super(),this.#g={},this.#y=[],this.I=new n.c,this.H=new n.c,this.J=[];const t=this,e=t.constructor;t._offspring=t.J,t._postLoad=t.I,e.C?.forEach(e=>{Object.hasOwn(t,e)&&(t.#g[e]=t[e],delete t[e])}),e.A?t.#$({a:e.A}):e.B.then(async s=>{await e.K.p,t.#$(await(s.default?.then(t=>"function"==typeof t?{a:t}:t)??s))}).catch(e=>{t.H.reject(e),setTimeout(()=>{throw e})})}static{this.lumina=!0}static F(){for(const t of this.C??[])l(this.prototype,t,{configurable:!0,enumerable:!0,get(){return this.#g[t]},set(e){this.#g[t]=e}});for(const t of this.E??[])l(this.prototype,t,{async value(...e){this.#A||await this.H.promise;const s=this.#A;return await s[t](...e)},configurable:!0});for(const t of this.D??[])l(this.prototype,t,{value(...e){return this.#A[t](...e)},configurable:!0})}static{h(this)}#A;#g;#y;get manager(){return this.#A?.manager}attributeChangedCallback(t,e,s){this.#A?.attributeChangedCallback(t,e,s),this.#A||this.#y.push(t)}connectedCallback(){this.#A?this.#A.connectedCallback?.():queueMicrotask(()=>this.G=r(this))}disconnectedCallback(){this.#A?.disconnectedCallback?.()}async componentOnReady(){return await this.H.promise,this}#$(t){const e=this.constructor,s=e.L,i=this.#g,o=Object.values(t).find(t=>t.L===s),n=`${s}--lazy`;let r=o;for(;r&&!Object.hasOwn(r,"lumina");)r=Object.getPrototypeOf(r);f(r),!e.A&&(e.A=o,customElements.define(n,o)),o.N=this;const a=document.createElement(n);o.N=void 0,this.#A=a,this.#g=a,this.#y.forEach(t=>a.attributeChangedCallback(t,null,this.getAttribute(t))),Object.entries(i).forEach(p,a);const c=this.isConnected;(c||this.G)&&(a.connectedCallback?.(),c||a.disconnectedCallback())}addController(){}requestUpdate(){this.#A?.requestUpdate()}}function p([t,e]){this[t]=e}const f=t=>{const e=t.prototype,s=Element.prototype;Object.hasOwn(e,"isConnected")||(e.setAttribute=function(t,e){s.setAttribute.call(this.el,t,e)},e.removeAttribute=function(t){s.removeAttribute.call(this.el,t)},e.hasAttribute=function(t){return s.hasAttribute.call(this.el,t)},l(e,"isConnected",{get(){return Reflect.get(s,"isConnected",this.el)}}))};var m=s(58234),g=s(48401),y=s(41276),$=s(32352),A=s(83982),v=s(33377),_=s(63179);const b=(0,_.u$)(class extends _.WL{constructor(t){if(super(t),t.type!==_.OA.ATTRIBUTE||"class"!==t.name||t.strings?.length>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(t){return" "+Object.keys(t).filter(e=>t[e]).join(" ")+" "}update(t,[e]){if(void 0===this.st){this.st=new Set,void 0!==t.strings&&(this.nt=new Set(t.strings.join(" ").split(/\s/).filter(t=>""!==t)));for(const t in e)e[t]&&!this.nt?.has(t)&&this.st.add(t);return this.render(e)}const s=t.element.classList;for(const t of this.st)t in e||(s.remove(t),this.st.delete(t));for(const t in e){const i=!!e[t];i===this.st.has(t)||this.nt?.has(t)||(i?(s.add(t),this.st.add(t)):(s.remove(t),this.st.delete(t)))}return v.c0}}),C="important",E=" !"+C,w=(0,_.u$)(class extends _.WL{constructor(t){if(super(t),t.type!==_.OA.ATTRIBUTE||"style"!==t.name||t.strings?.length>2)throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.")}render(t){return Object.keys(t).reduce((e,s)=>{const i=t[s];return null==i?e:e+`${s=s.includes("-")?s:s.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${i};`},"")}update(t,[e]){const{style:s}=t.element;if(void 0===this.ft)return this.ft=new Set(Object.keys(e)),this.render(e);for(const t of this.ft)null==e[t]&&(this.ft.delete(t),t.includes("-")?s.removeProperty(t):s[t]=null);for(const t in e){const i=e[t];if(null!=i){this.ft.add(t);const e="string"==typeof i&&i.endsWith(E);t.includes("-")||e?s.setProperty(t,e?i.slice(0,-11):i,e?C:""):s[t]=i}}return v.c0}});s(22804);var U=s(80966);class S extends y.WF{constructor(){super(),this.M=[],this.manager=new A.C(this);const t=this,e=t.constructor,s=e.N,i=e.K.o,o=S.prototype.shouldUpdate;t.#v=s?.H??new n.c,t.I=s?.I??new n.c,t.J=s?.J??[],t._offspring=t.J,t._postLoad=t.I,t.el=s??t,t.#_=t.enableUpdating,t.enableUpdating=c,t.shouldUpdate!==o&&(t.#b=t.shouldUpdate,t.shouldUpdate=o),i&&(t.#C=new Map,e.elementProperties.forEach((e,s)=>t.#C.set(s,i()))),y.S$&&t.el.setAttribute(e.K.hydratedAttribute,"")}static finalizeStyles(t){const e=super.finalizeStyles(t),s=this.shadowRootOptions===a;return void 0===this.K?.commonStyles||s?e:[this.K.commonStyles,...e]}static createProperty(t,e){const s="number"==typeof e?e:Array.isArray(e)?e[0]:0,i=Array.isArray(e)?e[1]:void 0,o=i?.hasChanged??y.Ec,n={attribute:!!(1&s&&"string"==typeof t)&&(0,g.j1)(t),reflect:!!(2&s),type:4&s?Boolean:8&s?Number:void 0,state:!!(16&s),readOnly:!!(32&s),noAccessor:!!(64&s),c:!1,...i,hasChanged(t,e){const s=o(t,e);return n.c=s,s}};super.createProperty(t,n)}static getPropertyDescriptor(t,e,s){const o=this.K,n=super.getPropertyDescriptor(t,e,s);return s.d=n,{...n,get(){return o.t?.(this.#C.get(t)),n.get?.call(this)},set(e){const o=this.manager;if(s.readOnly&&!$.s&&(o.R||o.connectedCalled))throw Error(`Cannot assign to read-only property "${t}" of ${this.el.localName}. Trying to assign "${e}"`);n.set.call(this,e??void 0),s.c&&this.#C?.get(t)?.notify(),o.T.length>0&&((0,i.p)(),o?.S(t,e))}}}static{this.lumina=!0}static{h(this)}#C;#b;#_;#v;#E;#w;get elementInternals(){return this.#w??=this.el.attachInternals(),this.#w}connectedCallback(){this.hasAttribute("defer-hydration")||this.#U(!0)}#U(t){const e=this.constructor.K.c?.(()=>this.requestUpdate());this.#E=e;const s=!this.manager.connectedCalled;t&&super.connectedCallback(),s?queueMicrotask(()=>this.#S().catch(t=>{this.#v.reject(t),setTimeout(()=>{throw t})})):e&&this.requestUpdate()}#T(t){try{this.#E.clear(),this.constructor.K.r(this.#E,()=>super.update(t))}catch(t){throw this.#E.clear(),t}}disconnectedCallback(){super.disconnectedCallback(),this.#E?.destroy(),this.#E=void 0}createRenderRoot(){const t=this.el.shadowRoot,e=this.constructor,s=e.shadowRootOptions,i=t??(s===a?this.el:this.el.attachShadow(s));if(t)return this.manager.connectedCalled||this.#U(!1),y.WF.prototype.createRenderRoot.call(this),t;if(this.isConnected){const t=i.getRootNode();t.adoptedStyleSheets=[...t.adoptedStyleSheets,...e.elementStyles.map(t=>"styleSheet"in t?t.styleSheet:t)]}return i}async#S(){const t=this.el.G??r(this.el);t&&await t;const e=[];for(const t of this.M)"triggerLoad"in t?e.push(t.triggerLoad()):e.push((0,m.ao)(t.hostLoad,t));await Promise.all(e),await(this.load?.()),this.manager.hasDestroy&&this.manager.onUpdate(t=>t.has(A.a)&&this.manager.U()),this.#_(!0),this.performUpdate(),this.I.resolve(),await 0;const s=this.J.filter(t=>!t.manager?.loadedCalled);s.length&&await Promise.allSettled(s.map(async t=>await t.componentOnReady())),this.J.length=0,this.el.setAttribute(this.constructor.K.hydratedAttribute,"");for(const t of this.M)"triggerLoaded"in t?t.triggerLoaded():(0,m.UF)(t.hostLoaded,t);this.loaded?.(),this.#v.resolve()}shouldUpdate(t){return this.manager.Q=t,this.#b?.(t)??!0}update(t){this.#E?this.#T(t):super.update(t)}listen(t,e,s){const i=e?.bind(this)??e;this.manager.onLifecycle(()=>(this.el.addEventListener(t,i,s),()=>this.el.removeEventListener(t,i,s)))}listenOn(t,e,s,i){const o=s?.bind(this)??s;this.manager.onLifecycle(()=>(t.addEventListener(e,o,i),()=>t.removeEventListener(e,o,i)))}async componentOnReady(){return await this.#v.promise,this}addController(t){this.M.push(t),!($.c in t)&&this.renderRoot&&this.el.isConnected&&t.hostConnected?.()}removeController(t){this.M.splice(this.M.indexOf(t),1),t.controllerRemoved?.()}}const T=t=>{let e;const s=t=>{e=new URL(t,globalThis.location?.href||void 0).href},i={...t,getAssetPath(t){const s=new URL(t,e);return s.origin!==globalThis.location?.origin?s.href:s.pathname},setAssetPath:s,customElement(t,e){e.K=i,e.L=t,y.S$?function(){try{customElements.define(t,e)}catch{}}():customElements.get(t)||customElements.define(t,e)}};return s(t.defaultAssetPath),i},k=t=>"object"==typeof t&&null!=t?b(t):t,L=t=>"object"==typeof t&&null!=t?w(t):t;class O extends _.WL{#k;#L;constructor(t){super(t);const e=this;this.#L=function(t){return e.#k.call(this,t)}}render(t){return"function"==typeof t?(this.#k=t,(0,U.K)(this.#L)):(0,U.K)(t)}}(0,_.u$)(O);const x=y.s6;function P(t,e,s){null==s?t.removeAttribute(e):t.setAttribute(e,s)}const R={toAttribute:t=>!0===t?"":!1===t?null:t}},42996(t,e,s){s.d(e,{Yt:()=>i,Zj:()=>c,eg:()=>a});const i=(t,e,s)=>(0,n(e).subscribe)(e=>{const i=e.some(e=>((t,e)=>{let s=t;for(;s;){if(s===e)return!0;if(!s.parentNode)return!1;s=s.parentNode instanceof ShadowRoot?s.parentNode.host:s.parentNode}return!1})(t,e.target));i&&s()}),o={},n=t=>{const e=t.join(","),s=o[e];if(void 0!==s)return s;const i=new Set,n=new MutationObserver(t=>i.forEach(e=>e(t)));globalThis.document&&n.observe(document.documentElement,{attributes:!0,attributeFilter:t,subtree:!0});const r={subscribe:t=>(i.add(t),()=>{i.delete(t),0===i.size&&(n.disconnect(),o[e]=void 0)})};return o[e]=r,r},r=(t,e)=>{let s=t;for(;s;){const t=s.closest?.(e);if(t)return t;const i=s.getRootNode?.();if(i===globalThis.document)return;s=i?.host}};function a(t){const e=r(t,".calcite-mode-dark, .calcite-mode-light, .calcite-mode-auto");return e?.classList.contains("calcite-mode-dark")||e?.classList.contains("calcite-mode-auto")&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}const c=(t,e,s)=>{const i=r(t,`[${e}]`);return i?.getAttribute(e)??s}},58234(t,e,s){s.d(e,{UF:()=>i,ao:()=>o});const i=(t,e,...s)=>{try{return t?.call(e,...s)}catch(e){console.error(e,t)}},o=async(t,e,...s)=>{try{const i=t?.call(e,...s);return await i}catch(e){console.error(e,t)}}},22998(t,e,s){s.d(e,{G3:()=>r,Rm:()=>n});const i=new Set;const o=t=>"string"==typeof t?t:"el"in t?t.el.localName:"localName"in t?t.localName:t.declaredClass,n=(t,e,s,n)=>{const r=o(e);if(n?.once){const e=`${t}${r}${s}`;if(i.has(e))return;i.add(e)}let a;if(n?.detail){a={};for(const[t,e]of Object.entries(n.detail))if("object"!=typeof e&&"function"!=typeof e||null===e)a[t]=e;else{const s=new WeakRef(e);Object.defineProperty(a,t,{get:()=>s.deref()})}console[t](`[${r}]: ${s}`,a)}else console[t](`[${r}]: ${s}`)},r=t=>{const e=`[${o(t)}] `;return t=>{const s=t instanceof Error&&t.message?t:new Error(String(t));s.message=`${e}${s.message}`,setTimeout(()=>{throw t})}}},87993(t,e,s){s.d(e,{c:()=>i,o:()=>o});class i{constructor(){this.promise=new Promise((t,e)=>{this.resolve=t,this.reject=e})}}const o=(t,e)=>{const s=e>n?r:e/a;let i=0;const o=setInterval(()=>{i+=s,i>=e&&(clearInterval(o),t())},s);return o},n=4e3,r=2e3,a=4},48401(t,e,s){s.d(e,{TK:()=>i,YF:()=>a,j1:()=>o});const i=t=>t.split("-").map(r).join(""),o=t=>t.replace(n,(t,e)=>`${0===e?"":"-"}${t.toLowerCase()}`),n=/[A-Z]+(?![a-z])|[A-Z]/gu,r=t=>t.charAt(0).toUpperCase()+t.slice(1),a=t=>t.charAt(0).toLowerCase()+t.slice(1);crypto},51391(t,e,s){s.d(e,{C:()=>a,D:()=>c,a:()=>p,b:()=>h,c:()=>g,g:()=>y,s:()=>$}),Object(function(){var t=new Error("Cannot find module '../cdn/main.css'");throw t.code="MODULE_NOT_FOUND",t}());var i=s(98824),o=s(41276);const n="calcite-mode-auto",r="calcite-mode-dark",a={autoMode:n,darkMode:r,lightMode:"calcite-mode-light",rtl:"calcite--rtl",calciteAnimate:"calcite-animate",calciteAnimateInUp:"calcite-animate__in-up",calciteAnimateInDown:"calcite-animate__in-down",calciteAnimateInRight:"calcite-animate__in-right",calciteAnimateInLeft:"calcite-animate__in-left"},c={filter:250,nextTick:0,resize:150,reposition:100},h=25;function l(){const{classList:t}=document.body,e=window.matchMedia("(prefers-color-scheme: dark)").matches,s=()=>t.contains(r)||t.contains(n)&&e?"dark":"light",i=t=>document.body.dispatchEvent(new CustomEvent("calciteModeChange",{bubbles:!0,detail:{mode:t}})),o=t=>{a!==t&&i(t),a=t};let a=s();i(a),window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",t=>o(t.matches?"dark":"light")),new MutationObserver(()=>o(s())).observe(document.body,{attributes:!0,attributeFilter:["class"]})}let d;const u={focusTrapStack:[],logLevel:"info"};function p(){return d||(d={...u,...globalThis.calciteConfig??{}}),d}const f="5.1.0-next.30";o.S$||("interactive"===document.readyState?l():document.addEventListener("DOMContentLoaded",l,{once:!0})),queueMicrotask(function(){const t=p();t&&t.version||(console.info(`Using Calcite Components ${f} [Date: 2026-04-07, Revision: cf2830e9d]`),Object.defineProperty(t,"version",{value:f,writable:!1}),globalThis.calciteConfig=t)});const m=(0,i.le)({defaultAssetPath:"https://cdn.jsdelivr.net/npm/@esri/calcite-components@5.1.0-next.30/dist/cdn/",hydratedAttribute:"calcite-hydrated"}),{customElement:g,getAssetPath:y,setAssetPath:$}=m},30168(t,e,s){s.d(e,{Qu:()=>n,qu:()=>o});var i=s(51391);let o=!1;const n=t=>{o=!0,(0,i.s)(t)}},22343(t,e,s){s.d(e,{mN:()=>w,AH:()=>c,W3:()=>b,Ec:()=>C});const i=globalThis,o=i.ShadowRoot&&(void 0===i.ShadyCSS||i.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,n=Symbol(),r=new WeakMap;class a{constructor(t,e,s){if(this._$cssResult$=!0,s!==n)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const e=this.t;if(o&&void 0===t){const s=void 0!==e&&1===e.length;s&&(t=r.get(e)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),s&&r.set(e,t))}return t}toString(){return this.cssText}}const c=(t,...e)=>{const s=1===t.length?t[0]:e.reduce((e,s,i)=>e+(t=>{if(!0===t._$cssResult$)return t.cssText;if("number"==typeof t)return t;throw Error("Value passed to 'css' function must be a 'css' function result: "+t+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(s)+t[i+1],t[0]);return new a(s,t,n)},h=(t,e)=>{if(o)t.adoptedStyleSheets=e.map(t=>t instanceof CSSStyleSheet?t:t.styleSheet);else for(const s of e){const e=document.createElement("style"),o=i.litNonce;void 0!==o&&e.setAttribute("nonce",o),e.textContent=s.cssText,t.appendChild(e)}},l=o?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const s of t.cssRules)e+=s.cssText;return(t=>new a("string"==typeof t?t:t+"",void 0,n))(e)})(t):t,{is:d,defineProperty:u,getOwnPropertyDescriptor:p,getOwnPropertyNames:f,getOwnPropertySymbols:m,getPrototypeOf:g}=Object,y=globalThis,$=y.trustedTypes,A=$?$.emptyScript:"",v=y.reactiveElementPolyfillSupport,_=(t,e)=>t,b={toAttribute(t,e){switch(e){case Boolean:t=t?A:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,e){let s=t;switch(e){case Boolean:s=null!==t;break;case Number:s=null===t?null:Number(t);break;case Object:case Array:try{s=JSON.parse(t)}catch(t){s=null}}return s}},C=(t,e)=>!d(t,e),E={attribute:!0,type:String,converter:b,reflect:!1,useDefault:!1,hasChanged:C};Symbol.metadata??=Symbol("metadata"),y.litPropertyMetadata??=new WeakMap;class w extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,e=E){if(e.state&&(e.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(t)&&((e=Object.create(e)).wrapped=!0),this.elementProperties.set(t,e),!e.noAccessor){const s=Symbol(),i=this.getPropertyDescriptor(t,s,e);void 0!==i&&u(this.prototype,t,i)}}static getPropertyDescriptor(t,e,s){const{get:i,set:o}=p(this.prototype,t)??{get(){return this[e]},set(t){this[e]=t}};return{get:i,set(e){const n=i?.call(this);o?.call(this,e),this.requestUpdate(t,n,s)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??E}static _$Ei(){if(this.hasOwnProperty(_("elementProperties")))return;const t=g(this);t.finalize(),void 0!==t.l&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(_("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(_("properties"))){const t=this.properties,e=[...f(t),...m(t)];for(const s of e)this.createProperty(s,t[s])}const t=this[Symbol.metadata];if(null!==t){const e=litPropertyMetadata.get(t);if(void 0!==e)for(const[t,s]of e)this.elementProperties.set(t,s)}this._$Eh=new Map;for(const[t,e]of this.elementProperties){const s=this._$Eu(t,e);void 0!==s&&this._$Eh.set(s,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const s=new Set(t.flat(1/0).reverse());for(const t of s)e.unshift(l(t))}else void 0!==t&&e.push(l(t));return e}static _$Eu(t,e){const s=e.attribute;return!1===s?void 0:"string"==typeof s?s:"string"==typeof t?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise(t=>this.enableUpdating=t),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach(t=>t(this))}addController(t){(this._$EO??=new Set).add(t),void 0!==this.renderRoot&&this.isConnected&&t.hostConnected?.()}removeController(t){this._$EO?.delete(t)}_$E_(){const t=new Map,e=this.constructor.elementProperties;for(const s of e.keys())this.hasOwnProperty(s)&&(t.set(s,this[s]),delete this[s]);t.size>0&&(this._$Ep=t)}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return h(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach(t=>t.hostConnected?.())}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach(t=>t.hostDisconnected?.())}attributeChangedCallback(t,e,s){this._$AK(t,s)}_$ET(t,e){const s=this.constructor.elementProperties.get(t),i=this.constructor._$Eu(t,s);if(void 0!==i&&!0===s.reflect){const o=(void 0!==s.converter?.toAttribute?s.converter:b).toAttribute(e,s.type);this._$Em=t,null==o?this.removeAttribute(i):this.setAttribute(i,o),this._$Em=null}}_$AK(t,e){const s=this.constructor,i=s._$Eh.get(t);if(void 0!==i&&this._$Em!==i){const t=s.getPropertyOptions(i),o="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==t.converter?.fromAttribute?t.converter:b;this._$Em=i;const n=o.fromAttribute(e,t.type);this[i]=n??this._$Ej?.get(i)??n,this._$Em=null}}requestUpdate(t,e,s,i=!1,o){if(void 0!==t){const n=this.constructor;if(!1===i&&(o=this[t]),s??=n.getPropertyOptions(t),!((s.hasChanged??C)(o,e)||s.useDefault&&s.reflect&&o===this._$Ej?.get(t)&&!this.hasAttribute(n._$Eu(t,s))))return;this.C(t,e,s)}!1===this.isUpdatePending&&(this._$ES=this._$EP())}C(t,e,{useDefault:s,reflect:i,wrapped:o},n){s&&!(this._$Ej??=new Map).has(t)&&(this._$Ej.set(t,n??e??this[t]),!0!==o||void 0!==n)||(this._$AL.has(t)||(this.hasUpdated||s||(e=void 0),this._$AL.set(t,e)),!0===i&&this._$Em!==t&&(this._$Eq??=new Set).add(t))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(t){Promise.reject(t)}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[t,e]of this._$Ep)this[t]=e;this._$Ep=void 0}const t=this.constructor.elementProperties;if(t.size>0)for(const[e,s]of t){const{wrapped:t}=s,i=this[e];!0!==t||this._$AL.has(e)||void 0===i||this.C(e,void 0,s,i)}}let t=!1;const e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),this._$EO?.forEach(t=>t.hostUpdate?.()),this.update(e)):this._$EM()}catch(e){throw t=!1,this._$EM(),e}t&&this._$AE(e)}willUpdate(t){}_$AE(t){this._$EO?.forEach(t=>t.hostUpdated?.()),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Eq&&=this._$Eq.forEach(t=>this._$ET(t,this[t])),this._$EM()}updated(t){}firstUpdated(t){}}w.elementStyles=[],w.shadowRootOptions={mode:"open"},w[_("elementProperties")]=new Map,w[_("finalized")]=new Map,v?.({ReactiveElement:w}),(y.reactiveElementVersions??=[]).push("2.1.2")},40171(t,e,s){s.d(e,{Rt:()=>n,mY:()=>a});var i=s(33377);const{I:o}=i.ge,n=t=>void 0===t.strings,r={},a=(t,e=r)=>t._$AH=e},63179(t,e,s){s.d(e,{OA:()=>i,WL:()=>n,u$:()=>o});const i={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},o=t=>(...e)=>({_$litDirective$:t,values:e});class n{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,s){this._$Ct=t,this._$AM=e,this._$Ci=s}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}}},33377(t,e,s){s.d(e,{JW:()=>U,XX:()=>q,c0:()=>T,ej:()=>S,ge:()=>z,qy:()=>w,s6:()=>k});const i=globalThis,o=t=>t,n=i.trustedTypes,r=n?n.createPolicy("lit-html",{createHTML:t=>t}):void 0,a="$lit$",c=`lit$${Math.random().toFixed(9).slice(2)}$`,h="?"+c,l=`<${h}>`,d=document,u=()=>d.createComment(""),p=t=>null===t||"object"!=typeof t&&"function"!=typeof t,f=Array.isArray,m=t=>f(t)||"function"==typeof t?.[Symbol.iterator],g="[ \t\n\f\r]",y=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,$=/-->/g,A=/>/g,v=RegExp(`>|${g}(?:([^\\s"'>=/]+)(${g}*=${g}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),_=/'/g,b=/"/g,C=/^(?:script|style|textarea|title)$/i,E=t=>(e,...s)=>({_$litType$:t,strings:e,values:s}),w=E(1),U=E(2),S=E(3),T=Symbol.for("lit-noChange"),k=Symbol.for("lit-nothing"),L=new WeakMap,O=d.createTreeWalker(d,129);function x(t,e){if(!f(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==r?r.createHTML(e):e}const P=(t,e)=>{const s=t.length-1,i=[];let o,n=2===e?"<svg>":3===e?"<math>":"",r=y;for(let e=0;e<s;e++){const s=t[e];let h,d,u=-1,p=0;for(;p<s.length&&(r.lastIndex=p,d=r.exec(s),null!==d);)p=r.lastIndex,r===y?"!--"===d[1]?r=$:void 0!==d[1]?r=A:void 0!==d[2]?(C.test(d[2])&&(o=RegExp("</"+d[2],"g")),r=v):void 0!==d[3]&&(r=v):r===v?">"===d[0]?(r=o??y,u=-1):void 0===d[1]?u=-2:(u=r.lastIndex-d[2].length,h=d[1],r=void 0===d[3]?v:'"'===d[3]?b:_):r===b||r===_?r=v:r===$||r===A?r=y:(r=v,o=void 0);const f=r===v&&t[e+1].startsWith("/>")?" ":"";n+=r===y?s+l:u>=0?(i.push(h),s.slice(0,u)+a+s.slice(u)+c+f):s+c+(-2===u?e:f)}return[x(t,n+(t[s]||"<?>")+(2===e?"</svg>":3===e?"</math>":"")),i]};class R{constructor({strings:t,_$litType$:e},s){let i;this.parts=[];let o=0,r=0;const l=t.length-1,d=this.parts,[p,f]=P(t,e);if(this.el=R.createElement(p,s),O.currentNode=this.el.content,2===e||3===e){const t=this.el.content.firstChild;t.replaceWith(...t.childNodes)}for(;null!==(i=O.nextNode())&&d.length<l;){if(1===i.nodeType){if(i.hasAttributes())for(const t of i.getAttributeNames())if(t.endsWith(a)){const e=f[r++],s=i.getAttribute(t).split(c),n=/([.?@])?(.*)/.exec(e);d.push({type:1,index:o,name:n[2],strings:s,ctor:"."===n[1]?H:"?"===n[1]?I:"@"===n[1]?F:j}),i.removeAttribute(t)}else t.startsWith(c)&&(d.push({type:6,index:o}),i.removeAttribute(t));if(C.test(i.tagName)){const t=i.textContent.split(c),e=t.length-1;if(e>0){i.textContent=n?n.emptyScript:"";for(let s=0;s<e;s++)i.append(t[s],u()),O.nextNode(),d.push({type:2,index:++o});i.append(t[e],u())}}}else if(8===i.nodeType)if(i.data===h)d.push({type:2,index:o});else{let t=-1;for(;-1!==(t=i.data.indexOf(c,t+1));)d.push({type:7,index:o}),t+=c.length-1}o++}}static createElement(t,e){const s=d.createElement("template");return s.innerHTML=t,s}}function M(t,e,s=t,i){if(e===T)return e;let o=void 0!==i?s._$Co?.[i]:s._$Cl;const n=p(e)?void 0:e._$litDirective$;return o?.constructor!==n&&(o?._$AO?.(!1),void 0===n?o=void 0:(o=new n(t),o._$AT(t,s,i)),void 0!==i?(s._$Co??=[])[i]=o:s._$Cl=o),void 0!==o&&(e=M(t,o._$AS(t,e.values),o,i)),e}class D{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){const{el:{content:e},parts:s}=this._$AD,i=(t?.creationScope??d).importNode(e,!0);O.currentNode=i;let o=O.nextNode(),n=0,r=0,a=s[0];for(;void 0!==a;){if(n===a.index){let e;2===a.type?e=new N(o,o.nextSibling,this,t):1===a.type?e=new a.ctor(o,a.name,a.strings,this,t):6===a.type&&(e=new W(o,this,t)),this._$AV.push(e),a=s[++r]}n!==a?.index&&(o=O.nextNode(),n++)}return O.currentNode=d,i}p(t){let e=0;for(const s of this._$AV)void 0!==s&&(void 0!==s.strings?(s._$AI(t,s,e),e+=s.strings.length-2):s._$AI(t[e])),e++}}class N{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,e,s,i){this.type=2,this._$AH=k,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=s,this.options=i,this._$Cv=i?.isConnected??!0}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return void 0!==e&&11===t?.nodeType&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=M(this,t,e),p(t)?t===k||null==t||""===t?(this._$AH!==k&&this._$AR(),this._$AH=k):t!==this._$AH&&t!==T&&this._(t):void 0!==t._$litType$?this.$(t):void 0!==t.nodeType?this.T(t):m(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==k&&p(this._$AH)?this._$AA.nextSibling.data=t:this.T(d.createTextNode(t)),this._$AH=t}$(t){const{values:e,_$litType$:s}=t,i="number"==typeof s?this._$AC(t):(void 0===s.el&&(s.el=R.createElement(x(s.h,s.h[0]),this.options)),s);if(this._$AH?._$AD===i)this._$AH.p(e);else{const t=new D(i,this),s=t.u(this.options);t.p(e),this.T(s),this._$AH=t}}_$AC(t){let e=L.get(t.strings);return void 0===e&&L.set(t.strings,e=new R(t)),e}k(t){f(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let s,i=0;for(const o of t)i===e.length?e.push(s=new N(this.O(u()),this.O(u()),this,this.options)):s=e[i],s._$AI(o),i++;i<e.length&&(this._$AR(s&&s._$AB.nextSibling,i),e.length=i)}_$AR(t=this._$AA.nextSibling,e){for(this._$AP?.(!1,!0,e);t!==this._$AB;){const e=o(t).nextSibling;o(t).remove(),t=e}}setConnected(t){void 0===this._$AM&&(this._$Cv=t,this._$AP?.(t))}}class j{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,s,i,o){this.type=1,this._$AH=k,this._$AN=void 0,this.element=t,this.name=e,this._$AM=i,this.options=o,s.length>2||""!==s[0]||""!==s[1]?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=k}_$AI(t,e=this,s,i){const o=this.strings;let n=!1;if(void 0===o)t=M(this,t,e,0),n=!p(t)||t!==this._$AH&&t!==T,n&&(this._$AH=t);else{const i=t;let r,a;for(t=o[0],r=0;r<o.length-1;r++)a=M(this,i[s+r],e,r),a===T&&(a=this._$AH[r]),n||=!p(a)||a!==this._$AH[r],a===k?t=k:t!==k&&(t+=(a??"")+o[r+1]),this._$AH[r]=a}n&&!i&&this.j(t)}j(t){t===k?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}}class H extends j{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===k?void 0:t}}class I extends j{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==k)}}class F extends j{constructor(t,e,s,i,o){super(t,e,s,i,o),this.type=5}_$AI(t,e=this){if((t=M(this,t,e,0)??k)===T)return;const s=this._$AH,i=t===k&&s!==k||t.capture!==s.capture||t.once!==s.once||t.passive!==s.passive,o=t!==k&&(s===k||i);i&&this.element.removeEventListener(this.name,this,s),o&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){"function"==typeof this._$AH?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t)}}class W{constructor(t,e,s){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=s}get _$AU(){return this._$AM._$AU}_$AI(t){M(this,t)}}const z={M:a,P:c,A:h,C:1,L:P,R:D,D:m,V:M,I:N,H:j,N:I,U:F,B:H,F:W},B=i.litHtmlPolyfillSupport;B?.(R,N),(i.litHtmlVersions??=[]).push("3.3.2");const q=(t,e,s)=>{const i=s?.renderBefore??e;let o=i._$litPart$;if(void 0===o){const t=s?.renderBefore??null;i._$litPart$=o=new N(e.insertBefore(u(),t),t,void 0,s??{})}return o._$AI(t),o}},22804(t,e,s){s.d(e,{V:()=>r});var i=s(33377),o=s(63179),n=s(40171);const r=(0,o.u$)(class extends o.WL{constructor(t){if(super(t),t.type!==o.OA.PROPERTY&&t.type!==o.OA.ATTRIBUTE&&t.type!==o.OA.BOOLEAN_ATTRIBUTE)throw Error("The `live` directive is not allowed on child or event bindings");if(!(0,n.Rt)(t))throw Error("`live` bindings can only contain a single expression")}render(t){return t}update(t,[e]){if(e===i.c0||e===i.s6)return e;const s=t.element,r=t.name;if(t.type===o.OA.PROPERTY){if(e===s[r])return i.c0}else if(t.type===o.OA.BOOLEAN_ATTRIBUTE){if(!!e===s.hasAttribute(r))return i.c0}else if(t.type===o.OA.ATTRIBUTE&&s.getAttribute(r)===e+"")return i.c0;return(0,n.mY)(t),e}})},80966(t,e,s){s.d(e,{_:()=>p,K:()=>g});var i=s(33377),o=s(40171),n=s(63179);const r=(t,e)=>{const s=t._$AN;if(void 0===s)return!1;for(const t of s)t._$AO?.(e,!1),r(t,e);return!0},a=t=>{let e,s;do{if(void 0===(e=t._$AM))break;s=e._$AN,s.delete(t),t=e}while(0===s?.size)},c=t=>{for(let e;e=t._$AM;t=e){let s=e._$AN;if(void 0===s)e._$AN=s=new Set;else if(s.has(t))break;s.add(t),d(e)}};function h(t){void 0!==this._$AN?(a(this),this._$AM=t,c(this)):this._$AM=t}function l(t,e=!1,s=0){const i=this._$AH,o=this._$AN;if(void 0!==o&&0!==o.size)if(e)if(Array.isArray(i))for(let t=s;t<i.length;t++)r(i[t],!1),a(i[t]);else null!=i&&(r(i,!1),a(i));else r(this,t)}const d=t=>{t.type==n.OA.CHILD&&(t._$AP??=l,t._$AQ??=h)};class u extends n.WL{constructor(){super(...arguments),this._$AN=void 0}_$AT(t,e,s){super._$AT(t,e,s),c(this),this.isConnected=t._$AU}_$AO(t,e=!0){t!==this.isConnected&&(this.isConnected=t,t?this.reconnected?.():this.disconnected?.()),e&&(r(this,t),a(this))}setValue(t){if((0,o.Rt)(this._$Ct))this._$Ct._$AI(t,this);else{const e=[...this._$Ct._$AH];e[this._$Ci]=t,this._$Ct._$AI(e,this,0)}}disconnected(){}reconnected(){}}const p=()=>new f;class f{}const m=new WeakMap,g=(0,n.u$)(class extends u{render(t){return i.s6}update(t,[e]){const s=e!==this.G;return s&&void 0!==this.G&&this.rt(void 0),(s||this.lt!==this.ct)&&(this.G=e,this.ht=t.options?.host,this.rt(this.ct=t.element)),i.s6}rt(t){if(this.isConnected||(t=void 0),"function"==typeof this.G){const e=this.ht??globalThis;let s=m.get(e);void 0===s&&(s=new WeakMap,m.set(e,s)),void 0!==s.get(this.G)&&this.G.call(this.ht,void 0),s.set(this.G,t),void 0!==t&&this.G.call(this.ht,t)}else this.G.value=t}get lt(){return"function"==typeof this.G?m.get(this.ht??globalThis)?.get(this.G):this.G?.value}disconnected(){this.lt===this.ct&&this.rt(void 0)}reconnected(){this.rt(this.ct)}})},41276(t,e,s){s.d(e,{WF:()=>r,AH:()=>i.AH,qy:()=>o.qy,S$:()=>c,Ec:()=>i.Ec,s6:()=>o.s6,JW:()=>o.JW});var i=s(22343),o=s(33377);const n=globalThis;class r extends i.mN{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){const t=super.createRenderRoot();return this.renderOptions.renderBefore??=t.firstChild,t}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=(0,o.XX)(e,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return o.c0}}r._$litElement$=!0,r.finalized=!0,n.litElementHydrateSupport?.({LitElement:r});const a=n.litElementPolyfillSupport;a?.({LitElement:r}),(n.litElementVersions??=[]).push("4.2.2");const c=!1}}]);