@arcgis/map-components 5.1.0-next.75 → 5.1.0-next.77
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cdn/{KET53JUE.js → 6MK35EAT.js} +1 -1
- package/dist/cdn/{FM3AT2SL.js → AG7LUCV3.js} +1 -1
- package/dist/cdn/G7KHJU6J.js +2 -0
- package/dist/cdn/{ACAAYGKC.js → HL4M23YL.js} +1 -1
- package/dist/cdn/MNXYDKVS.js +2 -0
- package/dist/cdn/PP7ZT3L2.js +2 -0
- package/dist/cdn/QW4QGAIG.js +2 -0
- package/dist/cdn/SD7DMWPD.js +2 -0
- package/dist/cdn/{KGLUFWJ7.js → T66WG4I4.js} +1 -1
- package/dist/cdn/V2HLEYHF.js +3 -0
- package/dist/cdn/{3TVO5LIN.js → WO2BX7U2.js} +1 -1
- package/dist/cdn/XOTOQOK6.js +2 -0
- package/dist/cdn/index.js +1 -1
- package/dist/chunks/useArcgisViewReadyError.js +20 -19
- package/dist/chunks/video-utils.js +12 -0
- package/dist/components/arcgis-feature/customElement.js +75 -53
- package/dist/components/arcgis-feature-media/customElement.js +222 -211
- package/dist/components/arcgis-feature-relationship/customElement.js +69 -68
- package/dist/components/arcgis-features/customElement.d.ts +2 -2
- package/dist/components/arcgis-features/customElement.js +44 -44
- package/dist/components/arcgis-popup/customElement.d.ts +2 -2
- package/dist/components/arcgis-popup/customElement.js +105 -105
- package/dist/components/arcgis-video-player/customElement.js +22 -21
- package/dist/components/arcgis-video-player-action-bar/customElement.js +14 -17
- package/dist/docs/api.json +1 -1
- package/dist/docs/docs.json +1 -1
- package/dist/docs/web-types.json +1 -1
- package/dist/loader.js +1 -1
- package/package.json +4 -4
- package/dist/cdn/2IXIUNGH.js +0 -2
- package/dist/cdn/CQCKW6L4.js +0 -2
- package/dist/cdn/EXZFAJW4.js +0 -3
- package/dist/cdn/GHSQJ4UC.js +0 -2
- package/dist/cdn/QPMWCCXQ.js +0 -2
- package/dist/cdn/YCM6SOEX.js +0 -2
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import i from"./RJ6ZGPF4.js";import f from"./ULEVE3UM.js";import{a as L}from"./N7VR7H4O.js";import e from"./S5JVHVOR.js";import{a as F}from"./3AX3SJK2.js";import"./54VXNFQ4.js";import d from"./6UX4Z6VU.js";import c from"./6PKEUXSO.js";import{e as E,g as P}from"./X4K6UDSU.js";import"./HWEEHWOD.js";import a from"./BAJLAC4A.js";import{c as k}from"./L5MVC2NA.js";import{M as g,N as u,O as z,P as v,Q as D,U as A,a as M,b as h,x as b}from"./GRYRJF75.js";import"./3TTFCHAA.js";export default $arcgis.t(([B,{stripHTML:H},{watch:l},I,,,,$,,N])=>{var R=M`:host{display:contents;--arcgis-internal-popup-pointer-size: 12px;--arcgis-internal-popup-content-small-size: 280px;--arcgis-internal-popup-content-medium-size: 340px;--arcgis-internal-popup-content-large-size: 400px;--arcgis-internal-popup-content-x-large-size: 460px;--arcgis-internal-popup-content-min-size-y: 48px;--arcgis-internal-popup-pointer-size-half: calc(var(--arcgis-internal-popup-pointer-size) / 2);--arcgis-internal-popup-pointer-size-half-negative: calc(var(--arcgis-internal-popup-pointer-size-half) * -1)}.root{display:flex;position:absolute;flex-flow:column nowrap;z-index:401;pointer-events:none;border:none;overflow:visible;padding:0;width:auto;height:auto;background-color:transparent}.hidden{visibility:hidden}.root:popover-open{display:flex;position:fixed;flex-flow:column nowrap;margin:0}arcgis-features{flex:1;width:100%}.shadow{box-shadow:var(--calcite-shadow-sm)}.aligned-top-center{transform-origin:50% 100%}.aligned-bottom-center{transform-origin:50% -5%}.aligned-top-left,.aligned-bottom-left{transform-origin:100% 50%}.aligned-top-right,.aligned-bottom-right{transform-origin:-5% 50%}.aligned-top-center,.aligned-top-left,.aligned-top-right{animation:popup-intro-animation-down .2s ease-in-out}.aligned-bottom-center,.aligned-bottom-left,.aligned-bottom-right{animation:popup-intro-animation-up .2s ease-in-out}.main-container{display:flex;position:relative;z-index:1;background-color:var(--calcite-color-foreground-1);width:var(--arcgis-internal-popup-content-medium-size);min-height:var(--arcgis-internal-popup-content-min-size-y);max-height:var(--arcgis-internal-popup-content-medium-size);overflow:hidden;pointer-events:auto}.pointer{position:absolute;width:0;height:0}.pointer-direction{position:absolute;width:var(--arcgis-internal-popup-pointer-size);height:var(--arcgis-internal-popup-pointer-size);content:"";background-color:var(--calcite-color-foreground-1)}.aligned-top-center .pointer{top:100%;left:50%;margin:0 0 0 var(--arcgis-internal-popup-pointer-size-half-negative)}.aligned-bottom-center .pointer{bottom:100%;left:50%;margin:0 0 0 var(--arcgis-internal-popup-pointer-size-half-negative)}.aligned-top-left .pointer{right:var(--arcgis-internal-popup-pointer-size-half);bottom:var(--arcgis-internal-popup-pointer-size-half);transform:rotate(-45deg)}.aligned-bottom-left .pointer{top:var(--arcgis-internal-popup-pointer-size-half);right:var(--arcgis-internal-popup-pointer-size-half);transform:rotate(45deg)}.aligned-top-right .pointer{bottom:var(--arcgis-internal-popup-pointer-size-half);left:var(--arcgis-internal-popup-pointer-size-half);transform:rotate(45deg)}.aligned-bottom-right .pointer{top:var(--arcgis-internal-popup-pointer-size-half);left:var(--arcgis-internal-popup-pointer-size-half);transform:rotate(-45deg)}.aligned-top-center .pointer-direction,.aligned-bottom-center .pointer-direction{transform:scale(.75,2) rotate(45deg)}.aligned-top-left .pointer-direction,.aligned-bottom-left .pointer-direction,.aligned-top-right .pointer-direction,.aligned-bottom-right .pointer-direction{top:var(--arcgis-internal-popup-pointer-size-half-negative);left:var(--arcgis-internal-popup-pointer-size-half-negative);transform:scale(.75,2.5) rotate(45deg)}.aligned-top-center .pointer-direction{top:var(--arcgis-internal-popup-pointer-size-half-negative);left:0}.aligned-bottom-center .pointer-direction{bottom:var(--arcgis-internal-popup-pointer-size-half-negative);left:0}.is-xl-width-breakpoint .main-container{width:var(--arcgis-internal-popup-content-x-large-size)}.is-lg-width-breakpoint .main-container{width:var(--arcgis-internal-popup-content-large-size)}.is-md-width-breakpoint .main-container{width:var(--arcgis-internal-popup-content-medium-size)}.is-sm-width-breakpoint .main-container,.is-xs-width-breakpoint .main-container{width:var(--arcgis-internal-popup-content-small-size)}.is-xs-width-breakpoint.is-docked-top-center,.is-xs-width-breakpoint.is-docked-bottom-center{margin:0;width:auto}.is-xs-width-breakpoint.is-docked-top-center .main-container,.is-xs-width-breakpoint.is-docked-bottom-center .main-container{position:absolute;right:0;left:0;width:100%;max-height:75%}.is-xs-width-breakpoint.is-docked-bottom-center .main-container{bottom:0}.is-xs-width-breakpoint.is-docked-top-center .main-container{top:0}.is-xl-height-breakpoint .main-container{max-height:var(--arcgis-internal-popup-content-x-large-size)}.is-lg-height-breakpoint .main-container{max-height:var(--arcgis-internal-popup-content-large-size)}.is-sm-height-breakpoint .main-container,.is-xs-height-breakpoint .main-container{max-height:var(--arcgis-internal-popup-content-small-size)}.is-docked{flex-flow:row nowrap;inset:0;margin:var(--arcgis-layout-overlay-space-top, 0) var(--arcgis-layout-overlay-space-right, 0) var(--arcgis-layout-overlay-space-bottom, 0) var(--arcgis-layout-overlay-space-left, 0);padding:var(--calcite-spacing-lg) var(--calcite-spacing-lg) var(--calcite-spacing-xxxl) var(--calcite-spacing-lg);animation:docking-animation .25s ease-out}.is-docked-top-left,.is-docked-top-center,.is-docked-top-right,.is-docked-top-start,.is-docked-top-end{align-items:flex-start}.is-docked-bottom-left,.is-docked-bottom-center,.is-docked-bottom-right,.is-docked-bottom-start,.is-docked-bottom-end{align-items:flex-end}.is-docked-top-left,.is-docked-bottom-left,.is-docked-top-start,.is-docked-bottom-start{justify-content:flex-start}.is-docked-top-center,.is-docked-bottom-center{justify-content:center}.is-docked-top-right,.is-docked-bottom-right,.is-docked-top-end,.is-docked-bottom-end{justify-content:flex-end}.is-docked-top-left.is-rtl,.is-docked-top-right.is-rtl,.is-docked-bottom-left.is-rtl,.is-docked-bottom-right.is-rtl{flex-direction:row-reverse}.is-docked-top-left .main-container,.is-docked-top-right .main-container,.is-docked-bottom-left .main-container,.is-docked-bottom-right .main-container,.is-docked-top-start .main-container,.is-docked-top-end .main-container,.is-docked-bottom-start .main-container,.is-docked-bottom-end .main-container{max-height:80%}.is-docked-top-center .main-container,.is-docked-bottom-center .main-container{max-height:40%}@media(prefers-reduced-motion){.aligned-top-center,.aligned-top-left,.aligned-top-right,.aligned-bottom-center,.aligned-bottom-left,.aligned-bottom-right{animation:none}}@media(prefers-reduced-motion){.is-docked{animation:none}}@keyframes docking-animation{0%{opacity:0}25%{opacity:0}to{opacity:1}}@keyframes popup-intro-animation-down{0%{transform:translateY(calc(var(--calcite-spacing-xs) * -1));opacity:0}to{transform:translate(0);opacity:1}}@keyframes popup-intro-animation-up{0%{transform:translateY(var(--calcite-spacing-xs));opacity:0}to{transform:translate(0);opacity:1}}`;function w(_){return _&&Number.parseInt(_.replaceAll(/[^-\d.]/gu,""),10)||0}var j=$(B),O={buttonEnabled:!0,position:"auto",breakpoint:{width:544}},C=class extends z{constructor(){super(...arguments),this._direction=E(),this._featuresComponent=g(),this._dockAction=new I({id:"popup-dock-action"}),this._mainContainerNode=g(),this._pointerNode=g(),this.messages=F(),this.viewModel=j(this),this._containerNode=g(),this._popupResizeObserver=new ResizeObserver(()=>this._positionContainer()),this._positionContainer=()=>{this.positionStyle=this._calculatePositionStyle()},this.screenLocation=N(this),this.actions=this.viewModel.actions,this.active=this.viewModel.active,this.alignment="auto",this.autoCloseEnabled=!1,this.autoDestroyDisabled=!1,this.collapsed=!1,this.content=this.viewModel.content,this.defaultPopupTemplateEnabled=this.viewModel.defaultPopupTemplateEnabled,this.dockEnabled=!1,this.featureCount=this.viewModel.featureCount,this.featureMenuOpen=!1,this.features=this.viewModel.features,this.goToOverride=this.viewModel.goToOverride,this.heading=this.viewModel.heading,this.headingLevel=2,this.hideActionBar=!1,this.hideCloseButton=!1,this.hideCollapseButton=!1,this.hideFeatureMenuHeading=!1,this.hideFeatureNavigation=!1,this.hideFeatureListLayerTitle=!1,this.hideHeading=!1,this.hideSpinner=!1,this.highlightDisabled=this.viewModel.highlightEnabled,this.includeDefaultActionsDisabled=this.viewModel.includeDefaultActions,this.initialDisplayMode=this.viewModel.initialDisplayMode,this.location=this.viewModel.location,this.open=this.viewModel.open,this.promises=this.viewModel.promises,this.selectedFeature=this.viewModel.selectedFeature,this.selectedFeatureIndex=this.viewModel.selectedFeatureIndex,this.state=this.viewModel.state,this.topLayerDisabled=!1,this.updateLocationEnabled=this.viewModel.updateLocationEnabled,this.view=this.viewModel.view,this.arcgisPropertyChange=P()("active","collapsed","currentAlignment","dockEnabled","featureCount","featureMenuOpen","features","promises","selectedDrillInFeature","selectedFeature","selectedFeatureComponent","selectedFeatureIndex","state","open"),this.arcgisReady=b(),this.arcgisClose=b(),this.arcgisTriggerAction=b()}static{this.properties={screenLocation:16,positionStyle:16,_featureNavigationTop:16,actions:0,active:0,alignment:1,autoCloseEnabled:5,autoDestroyDisabled:5,collapsed:5,content:1,currentAlignment:32,currentDockPosition:32,defaultPopupTemplateEnabled:5,dockEnabled:5,dockOptions:0,featureCount:0,featureMenuOpen:5,featureMenuTitle:1,features:0,goToOverride:0,heading:1,headingLevel:9,hideActionBar:5,hideCloseButton:5,hideCollapseButton:5,hideFeatureMenuHeading:5,hideFeatureNavigation:5,hideFeatureListLayerTitle:5,hideHeading:5,hideSpinner:5,highlightDisabled:5,includeDefaultActionsDisabled:5,initialDisplayMode:1,label:1,location:0,messageOverrides:0,open:5,promises:0,referenceElement:1,selectedDrillInFeature:32,selectedFeature:0,selectedFeatureComponent:32,selectedFeatureIndex:9,state:32,topLayerDisabled:5,updateLocationEnabled:5,view:0}}static{this.styles=R}get trackLocation(){return this.active&&!this.dockEnabled}get _featureNavigationTop(){let{currentAlignment:t,currentDockPosition:e}=this;return t==="bottom-left"||t==="bottom-center"||t==="bottom-right"||t==="bottom-start"||t==="bottom-end"||e==="top-left"||e==="top-center"||e==="top-right"||e==="top-start"||e==="top-end"}get currentAlignment(){return this._getCurrentAlignment()}get currentDockPosition(){return this._getCurrentDockPosition()}get dockOptions(){return this._dockOptions||O}set dockOptions(t){let e={...O},i=this.viewModel?.view?.breakpoints,o={};i&&(o.width=i.xsmall,o.height=i.xsmall);let a={...e,...t},n={...e.breakpoint,...o},{breakpoint:r}=a;typeof r=="object"?a.breakpoint={...n,...r}:r&&(a.breakpoint=n),this._dockOptions=a}get selectedDrillInFeature(){return this._featuresComponent.value?.selectedDrillInFeature??null}get selectedFeatureComponent(){return this._featuresComponent.value?.selectedFeatureComponent??null}async handleViewClick(t){return this.viewModel.handleViewClick(t)}async clear(){return this.viewModel.clear()}async destroy(){await this.manager.destroy(),this._dockAction.destroy(),this._popupResizeObserver.disconnect()}async fetchFeatures(t,e){return await this._featuresComponent.value?.fetchFeatures(t,e)}async next(){return this.viewModel.next()}async previous(){return this.viewModel.previous()}async setFocus(){this._featuresComponent.value?.setFocus()}async triggerAction(t){return await this._featuresComponent.value?.triggerAction(t)}loaded(){this.manager.onLifecycle(()=>[l(()=>[this.viewModel?.view?.widthBreakpoint,this.dockEnabled,this._direction],()=>this._handleDockIcon(),{initial:!0}),l(()=>[this.dockEnabled,this.messages?.undock,this.messages?.dock],()=>this._handleDockEnabled(),{initial:!0}),l(()=>[this.dockOptions,this._featuresComponent.value],()=>{let{_dockAction:t,dockOptions:e}=this,i=this._featuresComponent.value?.headerActions;i?.remove(t),e.buttonEnabled&&i?.add(t)},{initial:!0}),l(()=>[this._pointerNode.value,this.alignment,this.currentAlignment,this.dockEnabled,this.dockOptions,this.screenLocation,this.viewModel?.active,this.viewModel?.location,this.viewModel?.view?.size],()=>this._positionContainer(),{initial:!0}),l(()=>this._mainContainerNode.value,t=>{this._popupResizeObserver.disconnect(),t&&this._popupResizeObserver.observe(t)},{initial:!0}),l(()=>this.viewModel?.view?.size,(t,e)=>this._updateDockEnabledForViewSize(t,e)),l(()=>this.viewModel?.view?.ready,()=>this._setDockEnabledForViewSize(this.dockOptions),{initial:!0}),l(()=>this.view?.map,t=>{this.viewModel.map=t},{initial:!0}),l(()=>this.screenLocation,(t,e)=>this._autoClose(t,e)),l(()=>[this.active,this._containerNode.value,this.dockEnabled,this.topLayerDisabled],()=>this._togglePopover(),{initial:!0})])}_togglePopover(){this._containerNode.value?.togglePopover(this.active&&!this.dockEnabled&&!this.topLayerDisabled)}_handleClose(t){t.stopPropagation(),this.arcgisClose.emit()}_autoClose(t,e){this.autoCloseEnabled&&t!=null&&e!=null&&(this.open=!1)}_handleArcgisPropertyChange(t){t.detail.name==="collapsed"&&(this.collapsed=t.target.collapsed)}_handleArcgisTriggerAction(t){t.stopPropagation(),t.detail.action===this._dockAction&&(this.dockEnabled=!this.dockEnabled),this.arcgisTriggerAction.emit({action:t.detail.action})}_isOutsideView(t){let{popupHeight:e,popupWidth:i,screenLocation:o,side:a,view:n}=t;return Number.isNaN(i)||Number.isNaN(e)||!n||!o?!1:a==="right"&&o.x+i/2>n.width||a==="left"&&o.x-i/2<0||a==="top"&&o.y-e<0||a==="bottom"&&o.y+e>n.height}_getPointerSize(){let{_pointerNode:t}=this,e=t.value?window.getComputedStyle(t.value):null,i=w(e?.height),o=w(e?.width);return Math.hypot(i,o)}_calculateAutoAlignment(t){if(t!=="auto")return t;let{_mainContainerNode:e,_popupRect:i,viewModel:o}=this,{view:a}=o,{screenLocation:n}=this;if(n==null||!a||!i||!e.value)return"top-center";let r=window.getComputedStyle(e.value),s=w(r.maxHeight),d=w(r.height),c=this._getPointerSize(),{height:p,width:y}=i,m=y+c,f=Math.max(p,s,d)+c,S=this._isOutsideView({popupHeight:f,popupWidth:m,screenLocation:n,side:"right",view:a}),T=this._isOutsideView({popupHeight:f,popupWidth:m,screenLocation:n,side:"left",view:a}),x=this._isOutsideView({popupHeight:f,popupWidth:m,screenLocation:n,side:"top",view:a}),V=this._isOutsideView({popupHeight:f,popupWidth:m,screenLocation:n,side:"bottom",view:a});return T?x?"bottom-right":"top-right":S?x?"bottom-left":"top-left":x?V?"top-center":"bottom-center":"top-center"}_callCurrentAlignment(t){return typeof t=="function"?t.call(this):t}_getCurrentAlignment(){return this.dockEnabled||!this.active||!this._mainContainerNode.value?null:this._calculateAutoAlignment(this._callCurrentAlignment(this.alignment))}_callDockPosition(t){return typeof t=="function"?t.call(this):t}_getDockPosition(){return this._calculateAutoDockPosition(this._callDockPosition(this.dockOptions?.position))}_getCurrentDockPosition(){return this.dockEnabled&&this.active?this._getDockPosition():null}_calculateAutoDockPosition(t){if(t!=="auto")return t;let e=this.viewModel?.view,i="top-end";if(!e)return i;let{breakpoints:o}=e;return o?.xsmall&&e.width<=o.xsmall?"bottom-center":i}_getDockIcon(){let t=this._getDockPosition(),{_direction:e}=this;if(this.dockEnabled)return"minimize";switch(t){case"top-left":case"bottom-left":return"dock-left";case"top-center":return"maximize";case"bottom-center":return"dock-bottom";case"top-right":case"bottom-right":return"dock-right";case"top-start":case"bottom-start":return e==="rtl"?"dock-right":"dock-left";default:return e==="rtl"?"dock-left":"dock-right"}}_handleDockIcon(){this._dockAction.icon=this._getDockIcon()}_handleDockEnabled(){this._dockAction.title=this.dockEnabled?this.messages?.undock:this.messages?.dock}_calculateAlignmentPosition(t,e,i,o){if(t<0||e<0||!i||!o||t>i.width||e>i.height)return;let{_direction:a,currentAlignment:n}=this,r=this._getPointerSize(),s=r/2;if(n==="top-left"||n==="top-start"&&a==="ltr"||n==="top-end"&&a==="rtl")return{top:e+i.top-(o.height+s),left:t+i.left-o.width-s};if(n==="top-center")return{top:e+i.top-(o.height+r),left:t+i.left-o.width/2};if(n==="top-right"||n==="top-end"&&a==="ltr"||n==="top-start"&&a==="rtl")return{top:e+i.top-(o.height+s),left:t+i.left+s};if(n==="bottom-left"||n==="bottom-start"&&a==="ltr"||n==="bottom-end"&&a==="rtl")return{top:e+i.top+s,left:t+i.left-o.width-s};if(n==="bottom-center")return{top:e+i.top+r,left:t+i.left-o.width/2};if(n==="bottom-right"||n==="bottom-end"&&a==="ltr"||n==="bottom-start"&&a==="rtl")return{top:e+i.top+s,left:t+i.left+s}}_getPositionStyleValue(t){return t!=null?`${t}px`:"auto"}_calculatePositionStyle(){if(this.dockEnabled)return;let{screenLocation:t}=this;if(t==null)return;let e=this.view?.container?.getBoundingClientRect(),i=this._mainContainerNode.value?.getBoundingClientRect();this._popupRect=i;let o=this._calculateAlignmentPosition(t.x,t.y,e,i);if(o)return`inset: ${this._getPositionStyleValue(o.top)} ${this._getPositionStyleValue(o.right)} ${this._getPositionStyleValue(o.bottom)} ${this._getPositionStyleValue(o.left)};`}_dockingThresholdCrossed(t,e,i){let[o,a]=t,[n,r]=e,{width:s=0,height:d=0}=i??{};return o<=s&&n>s||o>s&&n<=s||a<=d&&r>d||a>d&&r<=d}_updateDockEnabledForViewSize(t,e){if(!t||!e||!this.viewModel?.view?.ready)return;let{dockOptions:i}=this,o=i.breakpoint;typeof o=="object"&&this._dockingThresholdCrossed(t,e,o)&&this._setDockEnabledForViewSize(i)}_shouldDockAtCurrentViewSize(t){let e=t.breakpoint,i=this.viewModel?.view?.ui;if(!i)return!1;let{width:o,height:a}=i;if(Number.isNaN(o)||Number.isNaN(a)||typeof e!="object")return!1;let n=typeof e.width=="number"&&o<=(e.width??0),r=typeof e.height=="number"&&a<=(e.height??0);return n||r}_setDockEnabledForViewSize(t){this.viewModel?.view?.ready&&typeof t.breakpoint=="object"&&(this.dockEnabled=this._shouldDockAtCurrentViewSize(t))}render(){let{_direction:t,dockEnabled:e,currentAlignment:i,currentDockPosition:o,positionStyle:a}=this,{active:n,view:r}=this.viewModel,s=n&&e,d=n&&!e,c=r?.widthBreakpoint,p=r?.heightBreakpoint,y={"aligned-top-center":i==="top-center","aligned-bottom-center":i==="bottom-center","aligned-top-left":i==="top-left"||i==="top-start"&&t==="ltr"||i==="top-end"&&t==="rtl","aligned-bottom-left":i==="bottom-left"||i==="bottom-start"&&t==="ltr"||i==="bottom-end"&&t==="rtl","aligned-top-right":i==="top-right"||i==="top-end"&&t==="ltr"||i==="top-start"&&t==="rtl","aligned-bottom-right":i==="bottom-right"||i==="bottom-end"&&t==="ltr"||i==="bottom-start"&&t==="rtl","is-docked":s,shadow:d,"is-rtl":this._direction==="rtl","is-docked-top-start":o==="top-start","is-docked-top-end":o==="top-end","is-docked-top-left":o==="top-left","is-docked-top-center":o==="top-center","is-docked-top-right":o==="top-right","is-docked-bottom-left":o==="bottom-left","is-docked-bottom-center":o==="bottom-center","is-docked-bottom-right":o==="bottom-right","is-docked-bottom-start":o==="bottom-start","is-docked-bottom-end":o==="bottom-end","is-xl-width-breakpoint":c==="xlarge","is-lg-width-breakpoint":c==="large","is-md-width-breakpoint":c==="medium","is-sm-width-breakpoint":c==="small","is-xs-width-breakpoint":c==="xsmall","is-xl-height-breakpoint":p==="xlarge","is-lg-height-breakpoint":p==="large","is-md-height-breakpoint":p==="medium","is-sm-height-breakpoint":p==="small","is-xs-height-breakpoint":p==="xsmall"};return h`<div style=${D(a)} class=${v(k("root",y,{hidden:!n||!a&&!e}))} .ariaHidden=${!n} .ariaLabel=${H(this.heading??"")} role=dialog popover=manual ${u(this._containerNode)}>${this._renderMainContainer()}${this._renderPointer()}</div>`}_renderPointer(){return!this.dockEnabled||!this.active?h`<div class="pointer" role=presentation><div class=${v(k("pointer-direction","shadow"))} ${u(this._pointerNode)}></div></div>`:null}_renderMainContainer(){let t={shadow:this.dockEnabled};return h`<div class=${v(k("main-container",t))} ${u(this._mainContainerNode)}>${L(this.viewModel,h`<arcgis-features .collapsed=${this.collapsed} .autoDestroyDisabled=${this.autoDestroyDisabled} .featureNavigationTop=${this._featureNavigationTop} .headingLevel=${this.headingLevel} .hidden=${!this.active} .hideActionBar=${this.hideActionBar} .hideCloseButton=${this.hideCloseButton} .hideFeatureListLayerTitle=${this.hideFeatureListLayerTitle} .hideFeatureMenuHeading=${this.hideFeatureMenuHeading} .hideFeatureNavigation=${this.hideFeatureNavigation} .hideHeading=${this.hideHeading} .hideSpinner=${this.hideSpinner} @arcgisPropertyChange=${this._handleArcgisPropertyChange} @arcgisTriggerAction=${this._handleArcgisTriggerAction} @arcgisClose=${this._handleClose} .referenceElement=${this.referenceElement} .responsiveActionsEnabled=${!0} .showCollapseButton=${!this.hideCollapseButton} .viewModel=${this.viewModel} ${u(this._featuresComponent)}></arcgis-features>`)}</div>`}};A("arcgis-popup",C);return C},"popup/Features","applications/Components/stringUtils","core/reactiveUtils","support/actions/ActionButton",a,c,d,e,f,i)
|
|
2
|
+
import i from"./RJ6ZGPF4.js";import e from"./ULEVE3UM.js";import{a as L}from"./N7VR7H4O.js";import d from"./S5JVHVOR.js";import{a as F}from"./3AX3SJK2.js";import"./54VXNFQ4.js";import c from"./6UX4Z6VU.js";import b from"./6PKEUXSO.js";import{e as E,g as P}from"./X4K6UDSU.js";import"./HWEEHWOD.js";import a from"./BAJLAC4A.js";import{c as k}from"./L5MVC2NA.js";import{M as g,N as u,O as z,P as v,Q as D,U as A,a as M,b as h,x as f}from"./GRYRJF75.js";import"./3TTFCHAA.js";export default $arcgis.t(([B,{stripHTML:H},{watch:p},I,,,,$,,N])=>{var R=M`:host{display:contents;--arcgis-internal-popup-pointer-size: 12px;--arcgis-internal-popup-content-small-size: 280px;--arcgis-internal-popup-content-medium-size: 340px;--arcgis-internal-popup-content-large-size: 400px;--arcgis-internal-popup-content-x-large-size: 460px;--arcgis-internal-popup-content-min-size-y: 48px;--arcgis-internal-popup-pointer-size-half: calc(var(--arcgis-internal-popup-pointer-size) / 2);--arcgis-internal-popup-pointer-size-half-negative: calc(var(--arcgis-internal-popup-pointer-size-half) * -1)}.root{display:flex;position:absolute;flex-flow:column nowrap;z-index:401;pointer-events:none;border:none;overflow:visible;padding:0;width:auto;height:auto;background-color:transparent}.hidden{visibility:hidden}.root:popover-open{display:flex;position:fixed;flex-flow:column nowrap;margin:0}arcgis-features{flex:1;width:100%}.shadow{box-shadow:var(--calcite-shadow-sm)}.aligned-top-center{transform-origin:50% 100%}.aligned-bottom-center{transform-origin:50% -5%}.aligned-top-left,.aligned-bottom-left{transform-origin:100% 50%}.aligned-top-right,.aligned-bottom-right{transform-origin:-5% 50%}.aligned-top-center,.aligned-top-left,.aligned-top-right{animation:popup-intro-animation-down .2s ease-in-out}.aligned-bottom-center,.aligned-bottom-left,.aligned-bottom-right{animation:popup-intro-animation-up .2s ease-in-out}.main-container{display:flex;position:relative;z-index:1;background-color:var(--calcite-color-foreground-1);width:var(--arcgis-internal-popup-content-medium-size);min-height:var(--arcgis-internal-popup-content-min-size-y);max-height:var(--arcgis-internal-popup-content-medium-size);overflow:hidden;pointer-events:auto}.pointer{position:absolute;width:0;height:0}.pointer-direction{position:absolute;width:var(--arcgis-internal-popup-pointer-size);height:var(--arcgis-internal-popup-pointer-size);content:"";background-color:var(--calcite-color-foreground-1)}.aligned-top-center .pointer{top:100%;left:50%;margin:0 0 0 var(--arcgis-internal-popup-pointer-size-half-negative)}.aligned-bottom-center .pointer{bottom:100%;left:50%;margin:0 0 0 var(--arcgis-internal-popup-pointer-size-half-negative)}.aligned-top-left .pointer{right:var(--arcgis-internal-popup-pointer-size-half);bottom:var(--arcgis-internal-popup-pointer-size-half);transform:rotate(-45deg)}.aligned-bottom-left .pointer{top:var(--arcgis-internal-popup-pointer-size-half);right:var(--arcgis-internal-popup-pointer-size-half);transform:rotate(45deg)}.aligned-top-right .pointer{bottom:var(--arcgis-internal-popup-pointer-size-half);left:var(--arcgis-internal-popup-pointer-size-half);transform:rotate(45deg)}.aligned-bottom-right .pointer{top:var(--arcgis-internal-popup-pointer-size-half);left:var(--arcgis-internal-popup-pointer-size-half);transform:rotate(-45deg)}.aligned-top-center .pointer-direction,.aligned-bottom-center .pointer-direction{transform:scale(.75,2) rotate(45deg)}.aligned-top-left .pointer-direction,.aligned-bottom-left .pointer-direction,.aligned-top-right .pointer-direction,.aligned-bottom-right .pointer-direction{top:var(--arcgis-internal-popup-pointer-size-half-negative);left:var(--arcgis-internal-popup-pointer-size-half-negative);transform:scale(.75,2.5) rotate(45deg)}.aligned-top-center .pointer-direction{top:var(--arcgis-internal-popup-pointer-size-half-negative);left:0}.aligned-bottom-center .pointer-direction{bottom:var(--arcgis-internal-popup-pointer-size-half-negative);left:0}.is-xl-width-breakpoint .main-container{width:var(--arcgis-internal-popup-content-x-large-size)}.is-lg-width-breakpoint .main-container{width:var(--arcgis-internal-popup-content-large-size)}.is-md-width-breakpoint .main-container{width:var(--arcgis-internal-popup-content-medium-size)}.is-sm-width-breakpoint .main-container,.is-xs-width-breakpoint .main-container{width:var(--arcgis-internal-popup-content-small-size)}.is-xs-width-breakpoint.is-docked-top-center,.is-xs-width-breakpoint.is-docked-bottom-center{margin:0;width:auto}.is-xs-width-breakpoint.is-docked-top-center .main-container,.is-xs-width-breakpoint.is-docked-bottom-center .main-container{position:absolute;right:0;left:0;width:100%;max-height:75%}.is-xs-width-breakpoint.is-docked-bottom-center .main-container{bottom:0}.is-xs-width-breakpoint.is-docked-top-center .main-container{top:0}.is-xl-height-breakpoint .main-container{max-height:var(--arcgis-internal-popup-content-x-large-size)}.is-lg-height-breakpoint .main-container{max-height:var(--arcgis-internal-popup-content-large-size)}.is-sm-height-breakpoint .main-container,.is-xs-height-breakpoint .main-container{max-height:var(--arcgis-internal-popup-content-small-size)}.is-docked{flex-flow:row nowrap;inset:0;margin:var(--arcgis-layout-overlay-space-top, 0) var(--arcgis-layout-overlay-space-right, 0) var(--arcgis-layout-overlay-space-bottom, 0) var(--arcgis-layout-overlay-space-left, 0);padding:var(--calcite-spacing-lg) var(--calcite-spacing-lg) var(--calcite-spacing-xxxl) var(--calcite-spacing-lg);animation:docking-animation .25s ease-out}.is-docked-top-left,.is-docked-top-center,.is-docked-top-right,.is-docked-top-start,.is-docked-top-end{align-items:flex-start}.is-docked-bottom-left,.is-docked-bottom-center,.is-docked-bottom-right,.is-docked-bottom-start,.is-docked-bottom-end{align-items:flex-end}.is-docked-top-left,.is-docked-bottom-left,.is-docked-top-start,.is-docked-bottom-start{justify-content:flex-start}.is-docked-top-center,.is-docked-bottom-center{justify-content:center}.is-docked-top-right,.is-docked-bottom-right,.is-docked-top-end,.is-docked-bottom-end{justify-content:flex-end}.is-docked-top-left.is-rtl,.is-docked-top-right.is-rtl,.is-docked-bottom-left.is-rtl,.is-docked-bottom-right.is-rtl{flex-direction:row-reverse}.is-docked-top-left .main-container,.is-docked-top-right .main-container,.is-docked-bottom-left .main-container,.is-docked-bottom-right .main-container,.is-docked-top-start .main-container,.is-docked-top-end .main-container,.is-docked-bottom-start .main-container,.is-docked-bottom-end .main-container{max-height:80%}.is-docked-top-center .main-container,.is-docked-bottom-center .main-container{max-height:40%}@media(prefers-reduced-motion){.aligned-top-center,.aligned-top-left,.aligned-top-right,.aligned-bottom-center,.aligned-bottom-left,.aligned-bottom-right{animation:none}}@media(prefers-reduced-motion){.is-docked{animation:none}}@keyframes docking-animation{0%{opacity:0}25%{opacity:0}to{opacity:1}}@keyframes popup-intro-animation-down{0%{transform:translateY(calc(var(--calcite-spacing-xs) * -1));opacity:0}to{transform:translate(0);opacity:1}}@keyframes popup-intro-animation-up{0%{transform:translateY(var(--calcite-spacing-xs));opacity:0}to{transform:translate(0);opacity:1}}`;function w(_){return _&&Number.parseInt(_.replaceAll(/[^-\d.]/gu,""),10)||0}var j=$(B),O={buttonEnabled:!0,position:"auto",breakpoint:{width:544}},C=class extends z{constructor(){super(...arguments),this._direction=E(),this._featuresComponent=g(),this._dockAction=new I({id:"popup-dock-action"}),this._mainContainerNode=g(),this._pointerNode=g(),this.messages=F(),this.viewModel=j(this),this._containerNode=g(),this._popupResizeObserver=new ResizeObserver(()=>this._positionContainer()),this._positionContainer=()=>{this.positionStyle=this._calculatePositionStyle()},this.screenLocation=N(this),this.actions=this.viewModel.actions,this.active=this.viewModel.active,this.alignment="auto",this.autoCloseEnabled=!1,this.autoDestroyDisabled=!1,this.collapsed=!1,this.content=this.viewModel.content,this.defaultPopupTemplateEnabled=this.viewModel.defaultPopupTemplateEnabled,this.dockEnabled=!1,this.featureCount=this.viewModel.featureCount,this.featureMenuOpen=!1,this.features=this.viewModel.features,this.goToOverride=this.viewModel.goToOverride,this.heading=this.viewModel.heading,this.headingLevel=2,this.hideActionBar=!1,this.hideCloseButton=!1,this.hideCollapseButton=!1,this.hideFeatureMenuHeading=!1,this.hideFeatureNavigation=!1,this.hideFeatureListLayerTitle=!1,this.hideHeading=!1,this.hideSpinner=!1,this.highlightDisabled=this.viewModel.highlightEnabled,this.includeDefaultActionsDisabled=this.viewModel.includeDefaultActions,this.initialDisplayMode=this.viewModel.initialDisplayMode,this.location=this.viewModel.location,this.open=this.viewModel.open,this.promises=this.viewModel.promises,this.selectedFeature=this.viewModel.selectedFeature,this.selectedFeatureIndex=this.viewModel.selectedFeatureIndex,this.state=this.viewModel.state,this.topLayerDisabled=!1,this.updateLocationEnabled=this.viewModel.updateLocationEnabled,this.view=this.viewModel.view,this.arcgisPropertyChange=P()("active","collapsed","currentAlignment","dockEnabled","featureCount","featureMenuOpen","features","promises","selectedDrillInFeature","selectedFeature","selectedFeatureComponent","selectedFeatureIndex","state","open"),this.arcgisReady=f(),this.arcgisClose=f(),this.arcgisTriggerAction=f()}static{this.properties={screenLocation:16,positionStyle:16,_featureNavigationTop:16,actions:0,active:0,alignment:1,autoCloseEnabled:5,autoDestroyDisabled:5,collapsed:5,content:1,currentAlignment:32,currentDockPosition:32,defaultPopupTemplateEnabled:5,dockEnabled:5,dockOptions:0,featureCount:0,featureMenuOpen:5,featureMenuTitle:1,features:0,goToOverride:0,heading:1,headingLevel:9,hideActionBar:5,hideCloseButton:5,hideCollapseButton:5,hideFeatureMenuHeading:5,hideFeatureNavigation:5,hideFeatureListLayerTitle:5,hideHeading:5,hideSpinner:5,highlightDisabled:5,includeDefaultActionsDisabled:5,initialDisplayMode:1,label:1,location:0,messageOverrides:0,open:5,promises:0,referenceElement:1,selectedDrillInFeature:32,selectedFeature:0,selectedFeatureComponent:32,selectedFeatureIndex:9,state:32,topLayerDisabled:5,updateLocationEnabled:5,view:0}}static{this.styles=R}get trackLocation(){return this.active&&!this.dockEnabled}get _featureNavigationTop(){let{currentAlignment:t,currentDockPosition:e}=this;return t==="bottom-left"||t==="bottom-center"||t==="bottom-right"||t==="bottom-start"||t==="bottom-end"||e==="top-left"||e==="top-center"||e==="top-right"||e==="top-start"||e==="top-end"}get currentAlignment(){return this._getCurrentAlignment()}get currentDockPosition(){return this._getCurrentDockPosition()}get dockOptions(){return this._dockOptions||O}set dockOptions(t){let e={...O},o=this.viewModel?.view?.breakpoints,i={};o&&(i.width=o.xsmall,i.height=o.xsmall);let a={...e,...t},n={...e.breakpoint,...i},{breakpoint:s}=a;typeof s=="object"?a.breakpoint={...n,...s}:s&&(a.breakpoint=n),this._dockOptions=a}get selectedDrillInFeature(){return this._featuresComponent.value?.selectedDrillInFeature??null}get selectedFeatureComponent(){return this._featuresComponent.value?.selectedFeatureComponent??null}async handleViewClick(t){return this.viewModel.handleViewClick(t)}async clear(){return this.viewModel.clear()}async destroy(){await this.manager.destroy(),this._dockAction.destroy(),this._popupResizeObserver.disconnect()}async fetchFeatures(t,e){return await this._featuresComponent.value?.fetchFeatures(t,e)}async next(){return this.viewModel.next()}async previous(){return this.viewModel.previous()}async setFocus(){this._featuresComponent.value?.setFocus()}async triggerAction(t){return await this._featuresComponent.value?.triggerAction(t)}loaded(){this.manager.onLifecycle(()=>[p(()=>[this.viewModel?.view?.widthBreakpoint,this.dockEnabled,this._direction],()=>this._handleDockIcon(),{initial:!0}),p(()=>[this.dockEnabled,this.messages?.undock,this.messages?.dock],()=>this._handleDockEnabled(),{initial:!0}),p(()=>[this.dockOptions,this._featuresComponent.value],()=>{let{_dockAction:t,dockOptions:e}=this,o=this._featuresComponent.value?.headerActions;o?.remove(t),e.buttonEnabled&&o?.add(t)},{initial:!0}),p(()=>[this._pointerNode.value,this.alignment,this.currentAlignment,this.dockEnabled,this.dockOptions,this.screenLocation,this.viewModel?.active,this.viewModel?.location,this.viewModel?.view?.size],()=>this._positionContainer(),{initial:!0}),p(()=>this._mainContainerNode.value,t=>{this._popupResizeObserver.disconnect(),t&&this._popupResizeObserver.observe(t)},{initial:!0}),p(()=>this.viewModel?.view?.size,(t,e)=>this._updateDockEnabledForViewSize(t,e)),p(()=>this.viewModel?.view?.ready,()=>this._setDockEnabledForViewSize(this.dockOptions),{initial:!0}),p(()=>this.view?.map,t=>{this.viewModel.map=t},{initial:!0}),p(()=>this.screenLocation,(t,e)=>this._autoClose(t,e)),p(()=>[this.active,this._containerNode.value,this.dockEnabled,this.topLayerDisabled],()=>this._togglePopover(),{initial:!0})])}_togglePopover(){this._containerNode.value?.togglePopover(this.active&&!this.dockEnabled&&!this.topLayerDisabled)}_handleClose(t){t.stopPropagation(),this.arcgisClose.emit()}_autoClose(t,e){this.autoCloseEnabled&&t!=null&&e!=null&&(this.open=!1)}_handleArcgisPropertyChange(t){t.detail.name==="collapsed"&&(this.collapsed=t.target.collapsed)}_handleArcgisTriggerAction(t){t.stopPropagation(),t.detail.action===this._dockAction&&(this.dockEnabled=!this.dockEnabled),this.arcgisTriggerAction.emit({action:t.detail.action})}_isOutsideView(t){let{popupHeight:e,popupWidth:o,screenLocation:i,side:a,view:n}=t;return Number.isNaN(o)||Number.isNaN(e)||!n||!i?!1:a==="right"&&i.x+o/2>n.width||a==="left"&&i.x-o/2<0||a==="top"&&i.y-e<0||a==="bottom"&&i.y+e>n.height}_getPointerSize(){let{_pointerNode:t}=this,e=t.value?window.getComputedStyle(t.value):null,o=w(e?.height),i=w(e?.width);return Math.hypot(o,i)}_calculateAutoAlignment(t){if(t!=="auto")return t;let{_mainContainerNode:e,_popupRect:o,viewModel:i}=this,{view:a}=i,{screenLocation:n}=this;if(n==null||!a||!o||!e.value)return"top-center";let s=window.getComputedStyle(e.value),l=w(s.maxHeight),r=w(s.height),c=this._getPointerSize(),{height:d,width:y}=o,m=y+c,b=Math.max(d,l,r)+c,S=this._isOutsideView({popupHeight:b,popupWidth:m,screenLocation:n,side:"right",view:a}),T=this._isOutsideView({popupHeight:b,popupWidth:m,screenLocation:n,side:"left",view:a}),x=this._isOutsideView({popupHeight:b,popupWidth:m,screenLocation:n,side:"top",view:a}),V=this._isOutsideView({popupHeight:b,popupWidth:m,screenLocation:n,side:"bottom",view:a});return T?x?"bottom-right":"top-right":S?x?"bottom-left":"top-left":x?V?"top-center":"bottom-center":"top-center"}_callCurrentAlignment(t){return typeof t=="function"?t.call(this):t}_getCurrentAlignment(){return this.dockEnabled||!this.active||!this._mainContainerNode.value?null:this._calculateAutoAlignment(this._callCurrentAlignment(this.alignment))}_callDockPosition(t){return typeof t=="function"?t.call(this):t}_getDockPosition(){return this._calculateAutoDockPosition(this._callDockPosition(this.dockOptions?.position))}_getCurrentDockPosition(){return this.dockEnabled&&this.active?this._getDockPosition():null}_calculateAutoDockPosition(t){if(t!=="auto")return t;let e=this.viewModel?.view,o="top-end";if(!e)return o;let{breakpoints:i}=e;return i?.xsmall&&e.width<=i.xsmall?"bottom-center":o}_getDockIcon(){let t=this._getDockPosition(),{_direction:e}=this;if(this.dockEnabled)return"minimize";switch(t){case"top-left":case"bottom-left":return"dock-left";case"top-center":return"maximize";case"bottom-center":return"dock-bottom";case"top-right":case"bottom-right":return"dock-right";case"top-start":case"bottom-start":return e==="rtl"?"dock-right":"dock-left";default:return e==="rtl"?"dock-left":"dock-right"}}_handleDockIcon(){this._dockAction.icon=this._getDockIcon()}_handleDockEnabled(){this._dockAction.title=this.dockEnabled?this.messages?.undock:this.messages?.dock}_calculateAlignmentPosition(t,e,o,i){if(t<0||e<0||!o||!i||t>o.width||e>o.height)return;let{topLayerDisabled:a}=this,n=a?t:t+o.x,s=a?e:e+o.y,{_direction:l,currentAlignment:r}=this,c=this._getPointerSize(),d=c/2;if(r==="top-left"||r==="top-start"&&l==="ltr"||r==="top-end"&&l==="rtl")return{top:s-(i.height+d),left:n-i.width-d};if(r==="top-center")return{top:s-(i.height+c),left:n-i.width/2};if(r==="top-right"||r==="top-end"&&l==="ltr"||r==="top-start"&&l==="rtl")return{top:s-(i.height+d),left:n+d};if(r==="bottom-left"||r==="bottom-start"&&l==="ltr"||r==="bottom-end"&&l==="rtl")return{top:s+d,left:n-i.width-d};if(r==="bottom-center")return{top:s+c,left:n-i.width/2};if(r==="bottom-right"||r==="bottom-end"&&l==="ltr"||r==="bottom-start"&&l==="rtl")return{top:s+d,left:n+d}}_getPositionStyleValue(t){return t!=null?`${t}px`:"auto"}_calculatePositionStyle(){if(this.dockEnabled)return;let{screenLocation:t}=this;if(t==null)return;let e=this.view?.container?.getBoundingClientRect(),o=this._mainContainerNode.value?.getBoundingClientRect();this._popupRect=o;let i=this._calculateAlignmentPosition(t.x,t.y,e,o);if(i)return`inset: ${this._getPositionStyleValue(i.top)} ${this._getPositionStyleValue(i.right)} ${this._getPositionStyleValue(i.bottom)} ${this._getPositionStyleValue(i.left)};`}_dockingThresholdCrossed(t,e,o){let[i,a]=t,[n,s]=e,{width:l=0,height:r=0}=o??{};return i<=l&&n>l||i>l&&n<=l||a<=r&&s>r||a>r&&s<=r}_updateDockEnabledForViewSize(t,e){if(!t||!e||!this.viewModel?.view?.ready)return;let{dockOptions:o}=this,i=o.breakpoint;typeof i=="object"&&this._dockingThresholdCrossed(t,e,i)&&this._setDockEnabledForViewSize(o)}_shouldDockAtCurrentViewSize(t){let e=t.breakpoint,o=this.viewModel?.view?.ui;if(!o)return!1;let{width:i,height:a}=o;if(Number.isNaN(i)||Number.isNaN(a)||typeof e!="object")return!1;let n=typeof e.width=="number"&&i<=(e.width??0),s=typeof e.height=="number"&&a<=(e.height??0);return n||s}_setDockEnabledForViewSize(t){this.viewModel?.view?.ready&&typeof t.breakpoint=="object"&&(this.dockEnabled=this._shouldDockAtCurrentViewSize(t))}render(){let{_direction:t,dockEnabled:e,currentAlignment:o,currentDockPosition:i,positionStyle:a}=this,{active:n,view:s}=this.viewModel,l=n&&e,r=n&&!e,c=s?.widthBreakpoint,d=s?.heightBreakpoint,y={"aligned-top-center":o==="top-center","aligned-bottom-center":o==="bottom-center","aligned-top-left":o==="top-left"||o==="top-start"&&t==="ltr"||o==="top-end"&&t==="rtl","aligned-bottom-left":o==="bottom-left"||o==="bottom-start"&&t==="ltr"||o==="bottom-end"&&t==="rtl","aligned-top-right":o==="top-right"||o==="top-end"&&t==="ltr"||o==="top-start"&&t==="rtl","aligned-bottom-right":o==="bottom-right"||o==="bottom-end"&&t==="ltr"||o==="bottom-start"&&t==="rtl","is-docked":l,shadow:r,"is-rtl":this._direction==="rtl","is-docked-top-start":i==="top-start","is-docked-top-end":i==="top-end","is-docked-top-left":i==="top-left","is-docked-top-center":i==="top-center","is-docked-top-right":i==="top-right","is-docked-bottom-left":i==="bottom-left","is-docked-bottom-center":i==="bottom-center","is-docked-bottom-right":i==="bottom-right","is-docked-bottom-start":i==="bottom-start","is-docked-bottom-end":i==="bottom-end","is-xl-width-breakpoint":c==="xlarge","is-lg-width-breakpoint":c==="large","is-md-width-breakpoint":c==="medium","is-sm-width-breakpoint":c==="small","is-xs-width-breakpoint":c==="xsmall","is-xl-height-breakpoint":d==="xlarge","is-lg-height-breakpoint":d==="large","is-md-height-breakpoint":d==="medium","is-sm-height-breakpoint":d==="small","is-xs-height-breakpoint":d==="xsmall"};return h`<div style=${D(a)} class=${v(k("root",y,{hidden:!n||!a&&!e}))} .ariaHidden=${!n} .ariaLabel=${H(this.heading??"")} role=dialog popover=manual ${u(this._containerNode)}>${this._renderMainContainer()}${this._renderPointer()}</div>`}_renderPointer(){return!this.dockEnabled||!this.active?h`<div class="pointer" role=presentation><div class=${v(k("pointer-direction","shadow"))} ${u(this._pointerNode)}></div></div>`:null}_renderMainContainer(){let t={shadow:this.dockEnabled};return h`<div class=${v(k("main-container",t))} ${u(this._mainContainerNode)}>${L(this.viewModel,h`<arcgis-features .collapsed=${this.collapsed} .autoDestroyDisabled=${this.autoDestroyDisabled} .featureNavigationTop=${this._featureNavigationTop} .headingLevel=${this.headingLevel} .hidden=${!this.active} .hideActionBar=${this.hideActionBar} .hideCloseButton=${this.hideCloseButton} .hideFeatureListLayerTitle=${this.hideFeatureListLayerTitle} .hideFeatureMenuHeading=${this.hideFeatureMenuHeading} .hideFeatureNavigation=${this.hideFeatureNavigation} .hideHeading=${this.hideHeading} .hideSpinner=${this.hideSpinner} @arcgisPropertyChange=${this._handleArcgisPropertyChange} @arcgisTriggerAction=${this._handleArcgisTriggerAction} @arcgisClose=${this._handleClose} .referenceElement=${this.referenceElement} .responsiveActionsEnabled=${!0} .showCollapseButton=${!this.hideCollapseButton} .viewModel=${this.viewModel} ${u(this._featuresComponent)}></arcgis-features>`)}</div>`}};A("arcgis-popup",C);return C},"popup/Features","applications/Components/stringUtils","core/reactiveUtils","support/actions/ActionButton",a,b,c,d,e,i)
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import g from"./
|
|
2
|
+
import g from"./XOTOQOK6.js";import{a as E}from"./YFXHW7I2.js";import{a as d}from"./CUYGLJRU.js";import{a as A}from"./FL6CHMPH.js";import e from"./2LHTH7PU.js";import"./PC4PAQXQ.js";import b from"./6UX4Z6VU.js";import"./X4K6UDSU.js";import"./HWEEHWOD.js";import a from"./BAJLAC4A.js";import"./L5MVC2NA.js";import{M as c,N as v,O as _,P as m,U as f,b as p,x as w}from"./GRYRJF75.js";import"./3TTFCHAA.js";export default $arcgis.t(([{watch:n},U,R,{fetchKnowledgeGraph:x},P,{isAbortError:D},Q,{d:V,e:I},{a:i,b:u,f:C},{b:g},{a:L,b:k,c:M}])=>{var z=u(R,{}),Z=u(U,{}),y=class extends _{constructor(){super(),this._containerRef=c(),this._mapRef=c(),this._uiController=new L(this),this._activeLoadAbortController=null,this.arcgisLoadError=k(this),this.arcgisViewReadyError=M(this),this._map=z(this),this._baseCypherQuery="",this._serviceUrl="",this._propItemId="",this.view=Z(this),this.animationsDisabled=this.view.animationsEnabled,this.allLayerViews=this.view.allLayerViews,this.analyses=this.view.analyses,this.attributionMode=this.view.attributionMode,this.autoDestroyDisabled=!1,this.background=this.view.background,this.basemap=this._map.basemap,this.basemapView=this.view.basemapView,this.canZoomIn=this.view.canZoomIn,this.canZoomOut=this.view.canZoomOut,this.constraints=this.view.constraints,this.displayFilterDisabled=this.view.displayFilterEnabled,this.fatalError=this.view.fatalError,this.graphics=this.view.graphics,this.highlights=this.view.highlights,this.layerViews=this.view.layerViews,this.magnifier=this.view.magnifier,this.map=this.view.map,this.navigation=this.view.navigation,this.padding=this.view.padding,this.popup=this.view.popup,this.popupDisabled=this.view.popupEnabled,this.popupComponentEnabled=!1,this.ready=this.view.ready,this.resizeAlign=this.view.resizeAlign,this.resolution=this.view.resolution,this.rotation=this.view.rotation,this.selectionManager=this.view.selectionManager,this.slotGroupRefs=this._uiController.slotGroupRefs,this.spatialReference=this.view.spatialReference,this.suspended=this.view.suspended,this.theme=this.view.theme,this.timeExtent=this.view.timeExtent,this.timeZone=this.view.timeZone,this.updating=this.view.updating,this.arcgisViewAnalysisViewCreate=i(()=>this.view,"analysis-view-create"),this.arcgisViewAnalysisViewCreateError=i(()=>this.view,"analysis-view-create-error"),this.arcgisViewAnalysisViewDestroy=i(()=>this.view,"analysis-view-destroy"),this.arcgisViewChange=w(),this.arcgisViewClick=i(()=>this.view,"click"),this.arcgisViewDoubleClick=i(()=>this.view,"double-click"),this.arcgisViewDoubleTapDrag=i(()=>this.view,"double-tap-drag"),this.arcgisViewDrag=i(()=>this.view,"drag"),this.arcgisViewHold=i(()=>this.view,"hold"),this.arcgisViewImmediateClick=i(()=>this.view,"immediate-click"),this.arcgisViewImmediateDoubleClick=i(()=>this.view,"immediate-double-click"),this.arcgisViewKeyDown=i(()=>this.view,"key-down"),this.arcgisViewKeyUp=i(()=>this.view,"key-up"),this.arcgisViewLayerviewCreate=i(()=>this.view,"layerview-create"),this.arcgisViewLayerviewCreateError=i(()=>this.view,"layerview-create-error"),this.arcgisViewLayerviewDestroy=i(()=>this.view,"layerview-destroy"),this.arcgisViewMouseWheel=i(()=>this.view,"mouse-wheel"),this.arcgisViewPointerDown=i(()=>this.view,"pointer-down"),this.arcgisViewPointerEnter=i(()=>this.view,"pointer-enter"),this.arcgisViewPointerLeave=i(()=>this.view,"pointer-leave"),this.arcgisViewPointerMove=i(()=>this.view,"pointer-move"),this.arcgisViewPointerUp=i(()=>this.view,"pointer-up"),this.arcgisViewReadyChange=w(),this.arcgisViewVerticalTwoFingerDrag=i(()=>this.view,"vertical-two-finger-drag"),this.view.ui={components:[]}}static{this.properties={_map:16,_baseCypherQuery:16,_serviceUrl:16,_propItemId:16,view:32,animationsDisabled:5,aria:0,allLayerViews:32,analyses:0,attributionItems:32,attributionMode:1,autoDestroyDisabled:5,background:0,basemap:1,basemapView:0,canZoomIn:36,canZoomOut:36,center:1,constraints:0,displayFilterDisabled:5,extent:0,fatalError:0,focusAreas:0,graphics:0,hideAttribution:5,highlights:0,interacting:32,itemId:3,baseCypherQuery:3,serviceUrl:3,layerViews:32,magnifier:32,map:0,navigating:32,navigation:0,padding:0,popup:0,popupElement:32,popupDisabled:5,popupComponentEnabled:5,ready:36,resizeAlign:1,resolution:40,rotation:9,selectionManager:32,scale:9,slotGroupRefs:32,spatialReference:0,stationary:32,suspended:39,theme:0,timeExtent:0,timeZone:1,updating:36,viewpoint:0,zoom:9,loadErrorSources:0}}static{this.styles=[A,E]}get aria(){return this.view?.aria}set aria(e){this.view&&(this.view.aria=e)}get attributionItems(){return this.view?.attributionItems??[]}get center(){return this.view.center}set center(e){let t=I(e,this.view);t&&(this.view.center=t)}get extent(){return this.view.extent}set extent(e){this.extent?.equals(e)||(this.view.extent=e)}get focusAreas(){return this.map?this.map?.focusAreas:{areas:[],style:"bright"}}set focusAreas(e){this.map&&(this.map.focusAreas=e)}get hideAttribution(){return!this.view.attributionVisible}set hideAttribution(e){this.view.attributionVisible=!e}get interacting(){return this.view.interacting}get itemId(){return this._map.portalItem?.id}set itemId(e){this._propItemId=e}get baseCypherQuery(){return this._baseCypherQuery}set baseCypherQuery(e){this._baseCypherQuery=e}get serviceUrl(){return this._serviceUrl}set serviceUrl(e){this._serviceUrl=e}get navigating(){return this.view.navigating}get popupElement(){return this._uiController.popupElement||null}get scale(){return this.view.scale}set scale(e){this.view.scale=e}get stationary(){return this.view.stationary}get viewpoint(){return this.view.viewpoint}set viewpoint(e){V(this.viewpoint,e)&&(this.view.viewpoint=e)}get zoom(){return this.view.zoom}set zoom(e){this.view.zoom=e}async closePopup(){this._uiController.closePopup()}async destroy(){await this.manager.destroy()}async goTo(e,t){return await this.view.goTo(e,t)}async openPopup(e){this._uiController.openPopup(e)}toMap(e){return this.view.toMap(e)}toScreen(e,t){return this.view.toScreen(e,t)}async tryFatalErrorRecovery(){this.view.tryFatalErrorRecovery()}async viewOnReady(e,t){return await this.componentOnReady(),await this.view.whenReady().then(()=>e?.()).catch(t)}async whenAnalysisView(e){return await this.view.whenAnalysisView(e)}async whenLayerView(e){return await this.view.whenLayerView(e)}async zoomIn(){this.view.zoomIn()}async zoomOut(){this.view.zoomOut()}loaded(){let e=this;e.el.childElem=this._mapRef.value,this.view.container??=e.el.childElem,s.setLocalPublicMap(this,this._map),this.manager.onLifecycle(()=>[n(()=>this.map,t=>{t&&s.setLocalPrivateMap(this,t)},{initial:!0,sync:!0}),n(()=>this.view.stationary,()=>this.arcgisViewChange.emit(),{initial:!0}),n(()=>this.view.ready,()=>this.arcgisViewReadyChange.emit(),{initial:this.view.ready}),n(()=>this.view.attributionHeight,t=>{this._uiController.handleAttributionHeightChange(t)},{initial:!0})])}willUpdate(e){let t=()=>{this._activeLoadAbortController?.abort();let a=new AbortController;return this._activeLoadAbortController=a,a};if(e.has("_propItemId")||e.has("_serviceUrl")||e.has("_baseCypherQuery")){if(e.has("_propItemId")&&this._propItemId||e.has("_propItemId")&&!this._serviceUrl)t(),s.reCreateAccessor(this._map,this),s.setPortalItem(this._map,this._propItemId),s.setMap(this.view,this._map);else if(!this._propItemId)if(this._serviceUrl&&!this._baseCypherQuery){let a=t();s.fetchKnowledgeGraph(this._serviceUrl).then(l=>{let h=new s.WebLinkChart,o=new s.LinkChartLayer({url:l.url});o.load({signal:a?.signal});try{g(a.signal),h.add(o),this._setLinkChartAndZoom(h)}catch(b){if(!D(b))throw b}})}else if(this._baseCypherQuery&&this._serviceUrl){let a=t();s.fetchKnowledgeGraph(this._serviceUrl).then(l=>{s.WebLinkChart.fromCypherQuery(l,new P({openCypherQuery:this._baseCypherQuery}),void 0,{signal:a?.signal}).then(async h=>{try{g(a.signal),this._setLinkChartAndZoom(h)}catch(o){if(!D(o))throw o}})})}else!this._serviceUrl&&e.has("_serviceUrl")&&(t(),s.setMap(this.view,null))}}_setLinkChartAndZoom(e){s.reCreateAccessor(this._map,this),s.setLocalPrivateMap(this,e),s.setMap(this.view,e),this._map&&this.view.when(()=>{e.diagramNodesExtent&&this.view.goTo(e.diagramNodesExtent)})}renderMain(){return p`<div class=${m(d.base)} ${v(this._mapRef)}></div>`}render(){return p`${this.renderMain()}<section class=${m(d.containerUI)} ${v(this._containerRef)}>${this._uiController.render()}</section>`}},s={fetchKnowledgeGraph:async r=>await x(r),WebLinkChart:R,LinkChartLayer:Q,setMap:(r,e)=>{r.map=e},setLocalPrivateMap:(r,e)=>{r._map=e},setLocalPublicMap:(r,e)=>{r.map||=e},setPortalItem(r,e){r.portalItem={id:e}},reCreateAccessor:C};f("arcgis-link-chart",y);return{ArcgisLinkChart:y,exportsForTests:s}},"core/reactiveUtils","views/LinkChartView","WebLinkChart","rest/knowledgeGraphService","rest/knowledgeGraph/GraphQueryStreaming","core/promiseUtils","layers/LinkChartLayer",a,b,e,g)
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import f from"./
|
|
2
|
+
import f from"./XOTOQOK6.js";import{a as y}from"./YFXHW7I2.js";import{a as l}from"./CUYGLJRU.js";import{a as d}from"./FL6CHMPH.js";import e from"./6UX4Z6VU.js";import"./X4K6UDSU.js";import"./HWEEHWOD.js";import b from"./BAJLAC4A.js";import"./L5MVC2NA.js";import{M as n,N as o,O as c,P as h,U as v,b as a,x as r}from"./GRYRJF75.js";import"./3TTFCHAA.js";export default $arcgis.t(([{watch:s},C,E,A,{d:g,e:u},{a:e,b:w,f:m},{a:f,b:b,c:V}])=>{var R=w(E,{}),_=w(C,{}),p=class extends c{constructor(){super(),this._containerRef=n(),this._mapRef=n(),this._uiController=new f(this),this.extraContent=new A,this.arcgisLoadError=b(this),this.arcgisViewReadyError=V(this),this._map=R(this),this.view=_(this),this.animationsDisabled=this.view.animationsEnabled,this.allLayerViews=this.view.allLayerViews,this.analyses=this.view.analyses,this.attributionMode=this.view.attributionMode,this.autoDestroyDisabled=!1,this.background=this.view.background,this.basemap=this._map.basemap,this.basemapView=this.view.basemapView,this.canZoomIn=this.view.canZoomIn,this.canZoomOut=this.view.canZoomOut,this.constraints=this.view.constraints,this.displayFilterDisabled=this.view.displayFilterEnabled,this.fatalError=this.view.fatalError,this.floors=this.view.floors,this.graphics=this.view.graphics,this.ground=this._map.ground,this.highlights=this.view.highlights,this.ipsInfo=this._map.ipsInfo,this.layerViews=this.view.layerViews,this.magnifier=this.view.magnifier,this.map=this.view.map,this.navigation=this.view.navigation,this.padding=this.view.padding,this.popup=this.view.popup,this.popupDisabled=this.view.popupEnabled,this.popupComponentEnabled=!1,this.ready=this.view.ready,this.resizeAlign=this.view.resizeAlign,this.resolution=this.view.resolution,this.rotation=this.view.rotation,this.selectionManager=this.view.selectionManager,this.slotGroupRefs=this._uiController.slotGroupRefs,this.spatialReference=this.view.spatialReference,this.spatialReferenceLocked=this.view.spatialReferenceLocked,this.suspended=this.view.suspended,this.theme=this.view.theme,this.timeExtent=this.view.timeExtent,this.timeZone=this.view.timeZone,this.updating=this.view.updating,this.visibleArea=this.view.visibleArea,this.arcgisViewAnalysisViewCreate=e(()=>this.view,"analysis-view-create"),this.arcgisViewAnalysisViewCreateError=e(()=>this.view,"analysis-view-create-error"),this.arcgisViewAnalysisViewDestroy=e(()=>this.view,"analysis-view-destroy"),this.arcgisViewChange=r(),this.arcgisViewClick=e(()=>this.view,"click"),this.arcgisViewDoubleClick=e(()=>this.view,"double-click"),this.arcgisViewDoubleTapDrag=e(()=>this.view,"double-tap-drag"),this.arcgisViewDrag=e(()=>this.view,"drag"),this.arcgisViewHold=e(()=>this.view,"hold"),this.arcgisViewImmediateClick=e(()=>this.view,"immediate-click"),this.arcgisViewImmediateDoubleClick=e(()=>this.view,"immediate-double-click"),this.arcgisViewKeyDown=e(()=>this.view,"key-down"),this.arcgisViewKeyUp=e(()=>this.view,"key-up"),this.arcgisViewLayerviewCreate=e(()=>this.view,"layerview-create"),this.arcgisViewLayerviewCreateError=e(()=>this.view,"layerview-create-error"),this.arcgisViewLayerviewDestroy=e(()=>this.view,"layerview-destroy"),this.arcgisViewMouseWheel=e(()=>this.view,"mouse-wheel"),this.arcgisViewPointerDown=e(()=>this.view,"pointer-down"),this.arcgisViewPointerEnter=e(()=>this.view,"pointer-enter"),this.arcgisViewPointerLeave=e(()=>this.view,"pointer-leave"),this.arcgisViewPointerMove=e(()=>this.view,"pointer-move"),this.arcgisViewPointerUp=e(()=>this.view,"pointer-up"),this.arcgisViewReadyChange=r(),this.arcgisViewVerticalTwoFingerDrag=e(()=>this.view,"vertical-two-finger-drag"),this.view.ui={components:[]}}static{this.properties={_map:16,view:32,animationsDisabled:5,aria:0,allLayerViews:32,analyses:0,attributionItems:32,attributionMode:1,autoDestroyDisabled:5,background:0,basemap:1,basemapView:0,canZoomIn:36,canZoomOut:36,center:1,constraints:0,displayFilterDisabled:5,extent:0,fatalError:0,floors:0,focusAreas:0,gamepad:32,graphics:0,ground:1,hideAttribution:5,highlights:0,interacting:32,ipsInfo:0,itemId:3,layerViews:32,magnifier:32,map:0,navigating:32,navigation:0,padding:0,popup:0,popupElement:32,popupDisabled:5,popupComponentEnabled:5,ready:36,resizeAlign:1,resolution:40,rotation:9,scale:9,selectionManager:32,slotGroupRefs:32,spatialReference:0,spatialReferenceLocked:5,stationary:32,suspended:39,theme:0,timeExtent:0,timeZone:1,updating:36,viewpoint:0,visibleArea:32,zoom:9,loadErrorSources:0}}static{this.styles=[d,y]}get aria(){return this.view?.aria}set aria(i){this.view&&(this.view.aria=i)}get attributionItems(){return this.view?.attributionItems??[]}get center(){return this.view.center}set center(i){let t=u(i,this.view);t&&(this.view.center=t)}get extent(){return this.view.extent}set extent(i){i&&!this.extent?.equals(i)&&(this.view.extent=i)}get focusAreas(){return this.map?this.map.focusAreas:{areas:[],style:"bright"}}set focusAreas(i){this.map&&(this.map.focusAreas=i)}get gamepad(){return this.view.input.gamepad}get hideAttribution(){return!this.view.attributionVisible}set hideAttribution(i){this.view.attributionVisible=!i}get interacting(){return this.view.interacting}get itemId(){return this._map.portalItem?.id}set itemId(i){m(this._map,this),this._map.portalItem={id:i},this.view.map=this._map}get navigating(){return this.view.navigating}get popupElement(){return this._uiController.popupElement||null}get scale(){return this.view.scale}set scale(i){this.view.scale=i}get stationary(){return this.view.stationary}get viewpoint(){return this.view.viewpoint}set viewpoint(i){g(this.viewpoint,i)&&(this.view.viewpoint=i)}get zoom(){return this.view.zoom}set zoom(i){this.view.zoom=i}async closePopup(){this._uiController.closePopup()}async destroy(){await this.manager.destroy()}async goTo(i,t){return await this.view.goTo(i,t)}async hitTest(i,t){return await this.view.hitTest(i,t)}async openPopup(i){this._uiController.openPopup(i)}async takeScreenshot(i){return await this.view.takeScreenshot(i)}toMap(i){return this.view.toMap(i)}toScreen(i,t){return this.view.toScreen(i,t)}async tryFatalErrorRecovery(){this.view.tryFatalErrorRecovery()}async viewOnReady(i,t){return await this.componentOnReady(),await this.view.whenReady().then(()=>i?.()).catch(t)}async whenAnalysisView(i){return await this.view.whenAnalysisView(i)}async whenLayerView(i){return await this.view?.whenLayerView(i)}async zoomIn(){this.view.zoomIn()}async zoomOut(){this.view.zoomOut()}loaded(){let i=this;i.el.childElem=this._mapRef.value,this.view.container??=i.el.childElem,this.map||=this._map,this.manager.onLifecycle(()=>[s(()=>this.map,t=>{t&&(this._map=t)},{initial:!0,sync:!0}),s(()=>this.view.stationary,()=>this.arcgisViewChange.emit(),{initial:!0}),s(()=>this.view.ready,()=>this.arcgisViewReadyChange.emit(),{initial:this.view.ready}),s(()=>this.view.attributionHeight,t=>{this._uiController.handleAttributionHeightChange(t)},{initial:!0})])}renderMain(){return a`<div class=${h(l.base)} ${o(this._mapRef)}></div>`}render(){return a`${this.renderMain()}<section class=${h(l.containerUI)} ${o(this._containerRef)}>${this._uiController.render()}${this.extraContent}</section>`}};v("arcgis-map",p);return p},"core/reactiveUtils","views/MapView","WebMap","core/Collection",b,e,f)
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
+
import g from"./BH32Z76H.js";import f from"./R3NYK6BO.js";import e from"./S5JVHVOR.js";import{a as F}from"./3AX3SJK2.js";import d from"./6UX4Z6VU.js";import c from"./6PKEUXSO.js";import{g as _}from"./X4K6UDSU.js";import"./HWEEHWOD.js";import a from"./BAJLAC4A.js";import{c as x}from"./L5MVC2NA.js";import{N as w,O as I,P as M,R as b,U as C,a as $,b as o,x as y}from"./GRYRJF75.js";import"./3TTFCHAA.js";export default $arcgis.t(([{substitute:k},{renderingSanitizer:B},N,{watch:H},{stripHTML:Z},P,,,,L,,{a:E,b:T,c:A,d:V,e:D,i:R,p:l}])=>{var z=$`:host{display:flex;flex:1 1 auto;background-color:var(--calcite-color-foreground-1);--calcite-color-background: var(--calcite-color-foreground-1)}.root{flex:1 1 auto}.root calcite-icon{box-sizing:content-box}.loading-container{display:flex;justify-content:center;padding:var(--calcite-spacing-md) 0;width:100%}.content-element{margin-bottom:var(--calcite-spacing-lg);padding:0 var(--calcite-spacing-sm);display:flex;flex-direction:column}.content-element:only-child,.content-element:last-child{margin-bottom:var(--calcite-spacing-xxs)}.last-edited-info{padding-top:var(--calcite-spacing-xs);font-size:var(--calcite-font-size-sm)}`,U=L(P),v=class extends I{constructor(){super(...arguments),this.messages=F(),this._rootFlowNode=null,this.flowType="feature",this.internalFlowItems=new N,this.viewModel=U(this),this.view=this.viewModel.view,this.icon="icon",this.isFeatureFromTable=this.viewModel.isFeatureFromTable,this.graphic=this.viewModel.graphic,this.defaultPopupTemplateEnabled=this.viewModel.defaultPopupTemplateEnabled,this.headingLevel=2,this.spatialReference=this.viewModel.spatialReference,this.timeZone=this.viewModel.timeZone,this.heading=this.viewModel.heading,this.map=this.viewModel.map,this.chartAnimationDisabled=this.viewModel.abilities.chartAnimation,this.hideHeading=!1,this.hideContent=!1,this.hideAttachmentsContent=!1,this.hideCustomContent=!1,this.hideExpressionContent=!1,this.hideFieldsContent=!1,this.hideMediaContent=!1,this.showRelationshipContent=!1,this.hideTextContent=!1,this.showUtilityNetworkContent=!1,this.hideLastEditedInfo=!1,this.autoDestroyDisabled=!1,this.location=this.viewModel.location,this.state=this.viewModel.state,this.arcgisPropertyChange=_()("flowItems","state"),this.arcgisReady=y()}static{this.properties={flowType:16,popupTemplate:16,sourceLayer:16,fieldInfoMap:16,values:16,globalValues:16,internalFlowItems:16,viewModel:0,view:0,flowItems:0,referenceElement:1,icon:1,isFeatureFromTable:36,graphic:0,defaultPopupTemplateEnabled:5,headingLevel:9,spatialReference:0,timeZone:1,heading:0,map:0,chartAnimationDisabled:5,hideHeading:5,hideContent:5,hideAttachmentsContent:5,hideCustomContent:5,hideExpressionContent:5,hideFieldsContent:5,hideMediaContent:5,showRelationshipContent:5,hideTextContent:5,showUtilityNetworkContent:5,hideLastEditedInfo:5,autoDestroyDisabled:5,messageOverrides:0,label:1,location:0,state:32}}static{this.styles=z}get popupTemplate(){return A(this.graphic,this.defaultPopupTemplateEnabled)??void 0}get sourceLayer(){return V(this.graphic)}get fieldInfoMap(){return E(T(this.popupTemplate),this.sourceLayer)}get values(){return this.graphic?.attributes??{}}get globalValues(){return this.viewModel.formattedAttributes?.global??{}}async destroy(){this._removeFlowItems(),await this.manager.destroy()}async nextMedia(e){return this._pageContentElementMedia(e,1)}async previousMedia(e){return this._pageContentElementMedia(e,-1)}async setActiveMedia(e,t){let i=this.viewModel.content;if(!Array.isArray(i))return;let s=i[e];if(s?.type!=="media")return;let a=s;return this._setContentElementMedia(a,t)}async updateGeometry(){return await this.viewModel.updateGeometry()}loaded(){this.manager.onLifecycle(()=>[H(()=>[this.internalFlowItems?.length],()=>this._setFocus())])}_setContentElementMedia(e,t){let i=e.mediaInfos?.length??0,s=(t+i)%i;e.activeMediaInfoIndex=s}_pageContentElementMedia(e,t){let i=this.viewModel.content;if(!Array.isArray(i))return;let s=i[e];if(s?.type!=="media")return;let a=s,{activeMediaInfoIndex:n}=a,r=(n??0)+t;this._setContentElementMedia(a,r)}_removeFlowItems(){this.internalFlowItems?.destroyAll()}_storeRootFlowNode(e){this._rootFlowNode=e}_setFocus(){this._rootFlowNode?.setFocus()}_handleDrillInBackClick(){this.internalFlowItems?.pop()?.destroy()}render(){let{state:e}=this.viewModel,t=o`<div class="container">${e==="error"?this._renderError():e==="loading"?this._renderLoading():this._renderContentContainer()}</div>`;return o`<div class="root">${t}</div>`}_renderError(){let{messages:e,hideHeading:t}=this;return o`<calcite-notice icon=exclamation-mark-circle kind=danger open scale=s>${t?null:o`<div slot=title>${e.error}</div>`}<div slot=message>${e.loadingError}</div></calcite-notice>`}_renderLoading(){return o`<div class="loading-container"><calcite-loader inline label></calcite-loader></div>`}_renderAttachments(e){let{values:t,fieldInfoMap:i,sourceLayer:s,globalValues:a}=this,n=l({values:t,fieldInfoMap:i,globalValues:a,layer:s,text:e.title}),r=l({values:t,fieldInfoMap:i,globalValues:a,layer:s,text:e.description});return o`<arcgis-feature-attachments .headingLevel=${this.headingLevel} .heading=${n} class="content-element" .displayType=${e.displayType} .attachmentKeywords=${e.attachmentKeywords??void 0} .attachmentTypes=${e.attachmentTypes??void 0} .orderByFields=${e.orderByFields??void 0} .graphic=${this.graphic??void 0} .description=${r} .messages=${this.messages}></arcgis-feature-attachments>`}_renderCustom(e){return o`<arcgis-feature-content .creator=${e.creator} .destroyer=${e.destroyer??void 0} .graphic=${this.graphic??void 0} class="content-element"></arcgis-feature-content>`}_renderFields(e,t){let i=this.viewModel.formattedAttributes,{values:s,fieldInfoMap:a,sourceLayer:n,popupTemplate:r,globalValues:d,graphic:c}=this,u=!!e?.fieldInfos,h=(e.fieldInfos??r?.fieldInfos??[])?.filter(({fieldName:f})=>!!f&&(R(f)||D(f)||f in s)),p=r?.expressionInfos,m=l({values:s,fieldInfoMap:a,globalValues:d,layer:n,text:e.title}),g=l({values:s,fieldInfoMap:a,globalValues:d,layer:n,text:e.description});return o`<arcgis-feature-fields .headingLevel=${this.headingLevel} .heading=${m} class="content-element" .messages=${this.messages} .graphic=${c??void 0} .isContentFieldInfos=${u} .layer=${n} .description=${g} .values=${{...i?.global,...i?.content?.[t]}} .fieldInfos=${h} .expressionInfos=${p??void 0}></arcgis-feature-fields>`}_renderMedia(e,t){let{values:i,graphic:s,fieldInfoMap:a,sourceLayer:n,popupTemplate:r,globalValues:d}=this,{formattedAttributes:c,relatedInfos:u,expressionAttributes:h}=this.viewModel,p={...c?.global,...c?.content?.[t]},m=l({values:i,fieldInfoMap:a,globalValues:d,layer:n,text:e.title}),g=l({values:i,fieldInfoMap:a,globalValues:d,layer:n,text:e.description});return o`<arcgis-feature-media .activeMediaInfoIndex=${e.activeMediaInfoIndex??0} .chartAnimationDisabled=${this.chartAnimationDisabled} .headingLevel=${this.headingLevel} .heading=${m} class="content-element" .description=${g} .values=${i} .expressionValues=${h} .layer=${n} .graphic=${s??void 0} .messages=${this.messages} .fieldInfoMap=${a} .mediaInfos=${e.mediaInfos??[]} .popupTemplate=${r??void 0} .relatedInfos=${u} .formattedValues=${p}></arcgis-feature-media>`}_renderText(e){let{values:t,fieldInfoMap:i,sourceLayer:s,globalValues:a}=this;return o`<arcgis-feature-content .creator=${l({values:t,fieldInfoMap:i,globalValues:a,layer:s,text:e.text})} .graphic=${this.graphic??void 0} class="content-element"></arcgis-feature-content>`}_renderExpression(e,t){let i=this.viewModel.formattedAttributes,{fieldInfoMap:s}=this;return o`<arcgis-feature-expression .expressionInfo=${e.expressionInfo} .map=${this.map??void 0} .spatialReference=${this.spatialReference??void 0} .view=${this.viewModel.view??void 0} .graphic=${this.graphic??void 0} .location=${this.location??void 0} .headingLevel=${this.headingLevel} class="content-element" .interceptor=${this.viewModel.interceptor} .messages=${this.messages} .fieldInfoMap=${s} .values=${{...i?.global,...i?.content?.[t]}}></arcgis-feature-expression>`}_renderRelationship(e,t){let{values:i,graphic:s,fieldInfoMap:a,sourceLayer:n,globalValues:r}=this,{displayCount:d,orderByFields:c,relationshipId:u}=e,{formattedAttributes:h,view:p}=this.viewModel,m={...h?.global,...h?.content?.[t]},g=l({values:i,fieldInfoMap:a,globalValues:r,layer:n,text:e.title}),f=l({values:i,fieldInfoMap:a,globalValues:r,layer:n,text:e.description});return o`<arcgis-feature-relationship .autoDestroyDisabled=${this.autoDestroyDisabled} class="content-element" .flowItems=${this.flowItems??this.internalFlowItems} .description=${f} .layer=${n} .map=${this.map??void 0} .displayCount=${d} .graphic=${s??void 0} .heading=${g} .headingLevel=${this.headingLevel} .messages=${this.messages} .orderByFields=${c??void 0} .relationshipId=${u??void 0} .spatialReference=${this.spatialReference??void 0} .timeZone=${this.timeZone??void 0} .values=${m} .view=${p??void 0}></arcgis-feature-relationship>`}_renderAssociation(e){let{fieldInfoMap:t,globalValues:i,graphic:s,messages:a,sourceLayer:n,values:r}=this,d=l({values:r,fieldInfoMap:t,globalValues:i,layer:n,text:e.title}),c=l({values:r,fieldInfoMap:t,globalValues:i,layer:n,text:e.description});return o`<arcgis-feature-utility-network-associations .autoDestroyDisabled=${this.autoDestroyDisabled} .associationTypes=${e.associationTypes} class="content-element" .description=${c} .flowItems=${this.flowItems??this.internalFlowItems} .graphic=${s??void 0} .heading=${d} .headingLevel=${this.headingLevel} .layer=${n} .map=${this.map??void 0} .messages=${a} .parentFeatureViewModel=${this.viewModel} .referenceElement=${this.referenceElement} .spatialReference=${this.spatialReference??void 0} .timeZone=${this.timeZone??void 0} .view=${this.viewModel.view??void 0}></arcgis-feature-utility-network-associations>`}_renderContentElement(e,t){switch(e.type){case"attachments":return this.hideAttachmentsContent?null:this._renderAttachments(e);case"custom":return this.hideCustomContent?null:this._renderCustom(e);case"fields":return this.hideFieldsContent?null:this._renderFields(e,t);case"media":return this.hideMediaContent?null:this._renderMedia(e,t);case"text":return this.hideTextContent?null:this._renderText(e);case"expression":return this.hideExpressionContent?null:this._renderExpression(e,t);case"relationship":return this.showRelationshipContent?this._renderRelationship(e,t):null;case"utility-network-associations":return this.showUtilityNetworkContent?this._renderAssociation(e):null;default:return null}}_renderContent(){let{content:e,graphic:t}=this.viewModel;if(!e)return null;if(Array.isArray(e)&&e.length)return e.length?e.map(this._renderContentElement,this):null;if(typeof e=="string"){let{values:i,fieldInfoMap:s,sourceLayer:a,globalValues:n}=this;return o`<arcgis-feature-content .creator=${l({values:i,fieldInfoMap:s,globalValues:n,layer:a,text:e})} .graphic=${t??void 0} class="content-element"></arcgis-feature-content>`}return e instanceof HTMLElement?e:null}_renderContentContainer(){let{hideContent:e,internalFlowItems:t,headingLevel:i,state:s,messages:a,heading:n,hideHeading:r}=this;if(e)return null;let d=o`<div class="main">${[this._renderContent(),this._renderLastEditInfo()]}</div>`,c=a.returnToInitialFeature??"";return this.flowItems?d:o`<calcite-flow ${w(this._storeRootFlowNode)}><calcite-flow-item .loading=${s==="loading"} .headingLevel=${i} .heading=${this.hideHeading?void 0:Z(this.heading)} .selected=${!t.length}>${!r&&n?o`<div slot=heading .innerHTML=${B.sanitize(n??"")??""}></div>`:null}${d}</calcite-flow-item>${t.toArray().map((u,h)=>o`<calcite-flow-item @calciteFlowItemBack=${p=>{p.preventDefault(),this._handleDrillInBackClick()}} .loading=${s==="loading"} .headingLevel=${i} .selected=${h===t.length-1}><calcite-action icon=move-up @click=${this._removeFlowItems} slot=header-actions-start .text=${c} title=${c??b}></calcite-action>${u}</calcite-flow-item>`)}</calcite-flow>`}_renderLastEditInfo(){let{hideLastEditedInfo:e,messages:t}=this,{lastEditInfo:i}=this.viewModel;if(!i||e)return null;let{date:s,user:a}=i,n=i.type==="edit"?a?t.lastEditedByUser:t.lastEdited:a?t.lastCreatedByUser:t.lastCreated,r=k(n??"",{date:s,user:a});return o`<div class=${M(x("last-edited-info","content-element"))}>${r}</div>`}};C("arcgis-feature",v);return v},"intl","applications/Components/sanitizerUtils","core/Collection","core/reactiveUtils","applications/Components/stringUtils","popup/Feature",a,c,d,e,f,g)
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
+
import l from"./G7KHJU6J.js";import k from"./S5JVHVOR.js";import{a as f}from"./3AX3SJK2.js";import{a as p}from"./54VXNFQ4.js";import j from"./6UX4Z6VU.js";import i from"./6PKEUXSO.js";import{g as v}from"./X4K6UDSU.js";import"./HWEEHWOD.js";import b from"./BAJLAC4A.js";import{c as m}from"./L5MVC2NA.js";import{M as d,N as h,O as c,P as u,U as g,a as n,b as e,x as a}from"./GRYRJF75.js";import"./3TTFCHAA.js";export default $arcgis.t(([{watch:s},V,,,,_,{b:t}])=>{var b=n`:host{--arcgis-internal-video-player-controls-spacing: 16px;width:531px;height:100%}:host([inline]){width:auto;height:auto}.root,.content{height:100%}.inline{display:flex;gap:var(--calcite-spacing-xs);background-color:var(--calcite-color-foreground-1);padding:var(--calcite-spacing-xxs)}.footer{flex:1}arcgis-video{display:flex;flex:1 1 auto;aspect-ratio:16 / 9;min-height:0}`,x=_(V),l=class extends c{constructor(){super(...arguments),this.messages=f({blocking:!0}),this.viewModel=x(this),this._videoViewRef=d(),this._metadataVisible=!1,this._duration=0,this._currentTime=0,this._bufferedValue=0,this._currentValue=0,this._isBuffering=!1,this._videoViewReady=!1,this.icon="video-web",this.state=this.viewModel.state,this.layer=this.viewModel.layer,this.autoDestroyDisabled=!1,this.inline=!1,this.showFullscreenToggle=!1,this.hideHeader=!1,this.view=this.viewModel.view,this.arcgisPropertyChange=v()("state","layer"),this.arcgisReady=a(),this.arcgisVideoReady=a()}static{this.properties={_metadataVisible:16,_duration:16,_currentTime:16,_bufferedValue:16,_currentValue:16,_isBuffering:16,_videoViewReady:16,_layerTitle:16,_isLive:16,referenceElement:1,icon:1,state:32,followingMode:1,layer:0,autoDestroyDisabled:5,messageOverrides:0,label:3,inline:7,showFullscreenToggle:5,hideHeader:5,view:0}}static{this.styles=b}get followingMode(){return this.viewModel.followingMode}set followingMode(i){this.viewModel.followingMode=i}async destroy(){await this.manager.destroy()}loaded(){this.manager.onLifecycle(()=>[s(()=>[this.viewModel.currentTime,this.viewModel.duration,this.viewModel.buffered,this.viewModel.ended],()=>{let{buffered:i,currentTime:w,duration:y,ended:$}=this.viewModel,r=t(y),o=t(w),M=t(i);this._duration=r,this._currentTime=o,this._bufferedValue=M/(r||1),this._currentValue=o/(r||1),this._isBuffering=!$&&this._bufferedValue<this._currentValue}),s(()=>this.layer?.title,i=>{this._layerTitle=i??void 0},{initial:!0}),s(()=>this.layer?.isLive,i=>{this._isLive=i??void 0},{initial:!0}),s(()=>this.viewModel.view?.map,()=>this.requestUpdate())])}render(){return e`<div class=${u(m(this.inline?"inline":"root",p.widget))}><calcite-panel .heading=${this.hideHeader||this.inline?void 0:this._layerTitle??this.messages.videoPlayer}>${this.inline||this.hideHeader||!this.showFullscreenToggle?null:e`<calcite-action slot=header-actions-end icon=full-screen-exit text=minimize @click=${()=>this.inline=!this.inline}></calcite-action>`}${this.inline?e`<div class="inline">${this._renderActionBar()}${this._renderSlider()}${this.showFullscreenToggle?e`<calcite-action icon=full-screen text=maximize @click=${()=>this.inline=!this.inline}></calcite-action>`:null}</div>`:e`<div class="content">${this._renderLoadingScrim()}${this._renderBuffering()}${this._renderVideoSection()}</div>`}${this.inline?null:e`<div slot=footer class="footer">${this._renderSlider()}${this._renderActionBar()}${this._renderMetadataSection()}</div>`}</calcite-panel></div>`}_renderLoadingScrim(){return this._videoViewReady?null:e`<calcite-scrim .loading=${this.state!=="error"}>${this.state==="error"?this.messages.errorLoadingLayer:null}</calcite-scrim>`}_renderBuffering(){return this._isBuffering?e`<calcite-progress type=indeterminate></calcite-progress>`:null}_renderVideoSection(){return e`<arcgis-video .layer=${this.layer} .map=${this.viewModel.view?.map} @arcgisViewReadyChange=${()=>{this._videoViewReady=!0,this.arcgisVideoReady.emit()}} ${h(this._videoViewRef)}></arcgis-video>`}_renderSlider(){return this._isLive?null:e`<arcgis-video-player-slider .buffered=${this._bufferedValue} .value=${this._currentValue*100} .viewModel=${this.viewModel}></arcgis-video-player-slider>`}_renderActionBar(){return e`<arcgis-video-player-action-bar .currentTime=${this._currentTime} .duration=${this._duration} .messages=${this.messages} .toggleMetadata=${()=>this._metadataVisible=!this._metadataVisible} .viewModel=${this.viewModel} .inline=${this.inline}></arcgis-video-player-action-bar>`}_renderMetadataSection(){return this._metadataVisible?e`<arcgis-video-player-metadata .messages=${this.messages} .viewModel=${this.viewModel}></arcgis-video-player-metadata>`:null}};g("arcgis-video-player",l);return l},"core/reactiveUtils","widgets/VideoPlayer/VideoPlayerViewModel",b,i,j,k,l)
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
+
import{a as b}from"./MP6Z45SA.js";import c from"./BH32Z76H.js";import a from"./R3NYK6BO.js";import{a as R}from"./N7VR7H4O.js";import{c as P}from"./L5MVC2NA.js";import{M as O,N as S,O as j,P as q,S as L,U as Q,a as x,b as o}from"./GRYRJF75.js";import"./3TTFCHAA.js";export default $arcgis.t(([{templateHasKey:V,stripHTML:k},{renderingSanitizer:H},{isRelatableFeatureSupportedLayer:J,findRelatedLayer:U},{substitute:X,formatNumber:T},{watch:_,on:Y},K,z,{ignoreAbortErrors:D},ee,,{g:B}])=>{var te=x`:host{position:relative;flex:1 1 auto}.list{min-height:var(--calcite-spacing-xxxl)}.list-item-hidden{display:none}.feature-observer{position:relative;bottom:var(--calcite-spacing-xxl);z-index:2;text-align:center}.sticky-loading-container{display:flex;position:sticky;bottom:var(--calcite-spacing-sm);align-items:center;justify-content:center;z-index:2;margin:0;padding:0;height:var(--calcite-spacing-xxxl);pointer-events:none}`,re=y=>{let e=[];if(y.formTemplate){let{description:t,title:r}=y.formTemplate;y.fields?.forEach(i=>{let s=r&&V(r,i.name),a=t&&V(t,i.name);(s||a)&&e.push(i.name)})}return e},M=100,E=class extends j{constructor(){super(...arguments),this._increaseFeaturePage=()=>{let{state:e,showAllEnabled:t,relatedFeatures:r,featuresPerPage:i,featurePage:s}=this;e==="ready"&&t&&r.length>=i*s&&this.featurePage++},this._relatedFeatureIntersectionObserver=new IntersectionObserver(([e])=>{e?.isIntersecting&&this._increaseFeaturePage()},{root:window.document}),this._featurePage=1,this._cancelQuery=()=>{let{_queryAbortController:e}=this;e&&e.abort(),this._queryAbortController=null},this._cancelQueryFeatureCount=()=>{let{_queryFeatureCountAbortController:e}=this;e&&e.abort(),this._queryFeatureCountAbortController=null},this._cancelQueryPage=()=>{let{_queryPageAbortController:e}=this;e&&e.abort(),this._queryPageAbortController=null},this._queryController=async()=>{this._cancelQuery();let e=new AbortController;this._queryAbortController=e,await D(this._query()),this._queryAbortController===e&&(this._queryAbortController=null)},this._queryFeatureCountController=async()=>{this._loaded=!1,this._cancelQueryFeatureCount();let e=new AbortController;this._queryFeatureCountAbortController=e,await D(this._queryFeatureCount()),this._queryFeatureCountAbortController===e&&(this._queryFeatureCountAbortController=null),this._loaded=!0},this._queryPageController=async()=>{let e=new AbortController;this._queryPageAbortController=e,await D(this._queryPage()),this._queryPageAbortController===e&&(this._queryPageAbortController=null)},this._queryDebounced=b(this._queryController,M),this._queryFeatureCountDebounced=b(this._queryFeatureCountController,M),this._queryPageDebounced=b(this._queryPageController,M),this._query=async()=>{let{_queryAbortController:e,relatedFeatures:t}=this;!this.featureCount||this.relatedLayer?.type==="subtype-group"&&!this.activeCategory||(this.relatedFeatureViewModels.destroyAll(),this.featurePage=1,t.destroyAll(),t.addMany(this._sliceFeatures(await this._queryRelatedFeatures({signal:e?.signal}))))},this._addFlowItem=e=>{e&&this.flowItems?.push(e)},this._relatedFeatureIntersectionObserverNode=O(),this.relatedFeatures=new K,this._queryAbortController=null,this._queryPageAbortController=null,this._queryFeatureCountAbortController=null,this.featureCount=0,this._loaded=!1,this.relatedFeatureViewModels=new K,this.autoDestroyDisabled=!1,this.featuresPerPage=10,this.flowType="feature-relationship",this.headingLevel=2,this.hideHeading=!1,this.hideDescription=!1,this.showAllEnabled=!1}static{this.properties={allCategories:16,_queryAbortController:16,_queryPageAbortController:16,_queryFeatureCountAbortController:16,featureCount:16,_loaded:16,canLoad:16,canQuery:16,displayShowAllButton:16,displayListItems:16,categories:16,itemDescriptionFieldName:16,relatedFeatureViewModels:16,state:16,autoDestroyDisabled:5,allItemsDescription:32,featurePage:9,featuresPerPage:9,flowItems:0,flowType:1,headingLevel:9,messages:0,heading:1,description:1,values:0,activeCategory:0,hideHeading:5,hideDescription:5,displayCount:9,graphic:0,layer:0,map:0,view:0,spatialReference:0,timeZone:1,orderByFields:0,relationshipId:9,showAllEnabled:5,label:3}}static{this.styles=te}get orderByFieldsFixedCasing(){let{orderByFields:e,relatedLayer:t}=this;return e&&t?.loaded?e.map(r=>{let i=r.clone();return i.field=B(r.field,t),i}):e??[]}get supportsCacheHint(){return!!this.layer?.capabilities?.queryRelated?.supportsCacheHint}get allCategoriesCount(){return this.allCategories?.length??0}get objectId(){return(this.objectIdField&&this.graphic?.attributes?.[this.objectIdField])??null}get objectIdField(){return this.layer?.objectIdField||null}get relatedLayer(){let{layer:e,map:t,relationship:r}=this;if(!e?.loaded||!t||!r)return null;let i=e.type==="subtype-sublayer"&&e.parent&&J(e.parent)?e.parent:e;return U(t,i,r)??null}get relatedLayerKeyField(){let{relatedLayer:e,relationshipId:t}=this;return e?.loaded&&t!=null?e.relationships?.find(r=>r.id===t)?.keyField:null}get relatedLayerKeyFields(){let{relatedLayer:e}=this;return e?.loaded?e.relationships?.map(t=>t.keyField).filter(t=>t!=null)??[]:[]}get relationship(){let{relationshipId:e,layer:t}=this;return e!=null&&t?.loaded?t.relationships?.find(({id:r})=>r===e)??null:null}get relationshipKey(){let{relationshipKeyField:e}=this;return(e&&this.graphic?.attributes?.[e])??null}get relationshipKeyField(){return this.relationship?.keyField||null}get canLoad(){return!!this.map&&this.relationshipId!=null&&typeof this.objectId=="number"}get canQuery(){let e=this.layer?.capabilities?.queryRelated;return!!this.relatedLayer&&!!this.relationship&&this.relationshipId!=null&&this.objectId!=null&&!!e?.supportsCount&&e?.supportsPagination}get displayShowAllButton(){let{showAllEnabled:e,featureCount:t,displayCount:r,state:i,allCategoriesCount:s}=this,a=!!s&&(s>r||r===0),n=!!t&&(t>r||r===0);return!e&&i==="ready"&&(a||n)}get displayListItems(){let{relatedFeatures:e,allCategoriesCount:t}=this;return this.displayShowAllButton||!!e.length||!!t}get categories(){let{allCategories:e}=this;return this.showAllEnabled?e:e?.slice(0,this.displayCount)??null}get itemDescriptionFieldName(){return this.orderByFieldsFixedCasing[0]?.field||null}get state(){let{_queryAbortController:e,_queryFeatureCountAbortController:t,_queryPageAbortController:r,canQuery:i,_loaded:s,canLoad:a}=this;return t||a&&!s?"loading":e||r?"querying":i?"ready":"disabled"}get allItemsDescription(){let{messages:e,featureCount:t,allCategories:r,allCategoriesCount:i}=this;return X(e?.numberRecords??"",{number:T(r?i:t)})}get featurePage(){return this._featurePage}set featurePage(e){let{featuresPerPage:t,featureCount:r}=this,i=1,s=Math.ceil(r/t)||1;this._featurePage=Math.min(Math.max(e,i),s)}get heading(){let{activeCategory:e}=this;return this._heading??e?.name}set heading(e){this._heading=e}get displayCount(){return this._displayCount??3}set displayCount(e){this._displayCount=Math.min(Math.max(e??3,0),10)}async destroy(){await this.manager.destroy()}loaded(){this.manager.onLifecycle(()=>[_(()=>[this.displayCount,this.graphic,this.layer,this.layer?.loaded,this.map,this.orderByFields,this.relationshipId,this.featuresPerPage,this.showAllEnabled,this.canQuery,this.featureCount,this.activeCategory],()=>this._queryDebounced(),{initial:!0}),_(()=>[this.featurePage,this.showAllEnabled],()=>this._queryPageDebounced()),_(()=>[this.layer,this.relationshipId,this.objectId,this.canQuery,this.activeCategory],()=>this._queryFeatureCountDebounced(),{initial:!0}),_(()=>[this.state,this.showAllEnabled,this._relatedFeatureIntersectionObserverNode],()=>this._handleRelatedFeatureObserverChange()),Y(()=>this.relatedFeatures,"change",()=>this._setRelatedFeaturesViewModels())]),this.manager.onDestroy(()=>{this.relatedFeatureViewModels.destroyAll(),this.relatedFeatures.destroyAll(),this._cancelQuery(),this._cancelQueryFeatureCount(),this._cancelQueryPage(),this._unobserveRelatedFeatureObserver()})}async _queryFeatureCount(){let{layer:e,relatedLayer:t}=this;await e?.load(),await t?.load();let{_queryFeatureCountAbortController:r,activeCategory:i,canQuery:s,objectId:a,relatedLayerKeyField:n,relationshipId:l,relationshipKey:g,supportsCacheHint:f}=this;if(!s||!e||!t||a==null){this.featureCount=0,this.allCategories=void 0;return}if(t?.type==="subtype-group"&&!i){if(this.featureCount=0,this.relatedFeatureViewModels.destroyAll(),this.featurePage=1,this.relatedFeatures.destroyAll(),n&&g!=null){let{default:v}=await $arcgis.t(m=>m[0],"smartMapping/statistics/uniqueValues"),{uniqueValueInfos:w}=await v({layer:t,sqlWhere:`${n} = '${g}'`,field:t.subtypeField??void 0,signal:r?.signal}),I=w.map(({count:u,value:c})=>{let m=t.subtypes?.find(A=>A.code===c)?.name;return c!=null&&m?{count:u,value:c,name:m}:void 0}).filter(u=>u!=null);this.allCategories=I}return}let{historicMoment:p,gdbVersion:C}=e,F=new z({cacheHint:f,gdbVersion:C,historicMoment:p,relationshipId:l,returnGeometry:!1,objectIds:[a],where:this._getRelationshipWhereClause(t)}),h=await e.queryRelatedFeaturesCount(F,{signal:r?.signal});this.allCategories=void 0,this.featureCount=h[a]||0}_getRelationshipWhereClause(e){let{activeCategory:t}=this,r=e.createQuery(),i="subtypeField"in e?e.subtypeField:void 0,s=t&&i?`${i} = ${t.value}`:void 0,a=r.where;return a&&s?`(${a}) AND (${s})`:a??s}_sliceFeatures(e){let{showAllEnabled:t,displayCount:r}=this;return t?e:r?e.slice(0,r):[]}async _queryPage(){let{relatedFeatures:e,featurePage:t,showAllEnabled:r,_queryPageAbortController:i,featureCount:s}=this;!r||t<2||!s||this.relatedLayer?.type==="subtype-group"&&!this.activeCategory||e.addMany(await this._queryRelatedFeatures({signal:i?.signal}))}async _queryRelatedFeatures(e){let{displayCount:t,featureCount:r,featurePage:i,featuresPerPage:s,layer:a,orderByFieldsFixedCasing:n,relatedLayer:l,relatedLayerKeyFields:g,relationshipId:f,showAllEnabled:p,supportsCacheHint:C}=this,{canQuery:F,objectId:h}=this;if(!F||!a||!l||h==null)return[];let v=p?((i-1)*s+r)%r:0,w=p?s:t,I=l.objectIdField,u="subtypeField"in l?l.subtypeField:void 0,c=[...n.map(d=>d.field),...re(l),...g,I,u].filter(d=>d!=null),m=n.map(d=>`${d.field} ${d.order}`),{historicMoment:A,gdbVersion:Z}=a,W=new z({orderByFields:m,start:v,num:w,outFields:c,cacheHint:C,historicMoment:A,gdbVersion:Z,relationshipId:f,returnGeometry:!1,objectIds:[h],where:this._getRelationshipWhereClause(l)}),$=(await a.queryRelatedFeatures(W,{signal:e?.signal}))[h]?.features||[];return l.type==="subtype-group"&&u?$.forEach(d=>{let G=d.attributes[u],N=l.findSublayerForSubtypeCode?.(G);d.sourceLayer=N,d.layer=N}):$.forEach(d=>{d.sourceLayer=l,d.layer=l}),$}_selectCategory(e){let{flowItems:t}=this;t&&this._addRelationshipFlowItem({showAllEnabled:!0,activeCategory:e})}_selectRecord(e){let{flowItems:t}=this;t&&this._addFlowItem(L(R(e,o`<arcgis-feature .autoDestroyDisabled=${this.autoDestroyDisabled} .flowItems=${t} .flowType=${this.flowType} .graphic=${e.graphic} .map=${this.map} show-relationship-content .spatialReference=${this.spatialReference} .timeZone=${this.timeZone} .view=${this.view}></arcgis-feature>`)))}_addRelationshipFlowItem({showAllEnabled:e=!1,activeCategory:t}){this._addFlowItem(L(R(t,o`<arcgis-feature-relationship .autoDestroyDisabled=${this.autoDestroyDisabled} .messages=${this.messages} .activeCategory=${t} .displayCount=${this.displayCount} .flowItems=${this.flowItems} .flowType=${this.flowType} .graphic=${this.graphic} .heading=${this.heading} hide-description .showAllEnabled=${e} hide-heading .layer=${this.layer} .map=${this.map} .orderByFields=${this.orderByFields} .relationshipId=${this.relationshipId} .spatialReference=${this.spatialReference} .values=${this.values} .view=${this.view}></arcgis-feature-relationship>`)))}_showAllRecords(){let{flowItems:e}=this;e&&this._addRelationshipFlowItem({showAllEnabled:!0})}_handleRelatedFeatureObserverChange(){this._unobserveRelatedFeatureObserver();let{state:e,showAllEnabled:t}=this;this._relatedFeatureIntersectionObserverNode.value&&e==="ready"&&t&&this._relatedFeatureIntersectionObserver.observe(this._relatedFeatureIntersectionObserverNode.value)}_unobserveRelatedFeatureObserver(){this._relatedFeatureIntersectionObserverNode.value&&this._relatedFeatureIntersectionObserver.unobserve(this._relatedFeatureIntersectionObserverNode.value)}_matchesFeature(e,t){let r=e?.graphic?.getObjectId(),i=t?.getObjectId();return r!=null&&i!=null&&r===i}_setRelatedFeaturesViewModels(){let{relatedFeatures:e,relatedFeatureViewModels:t,map:r,view:i,spatialReference:s,timeZone:a}=this;e?.filter(Boolean).forEach(n=>{t.some(l=>this._matchesFeature(l,n))||t.add(new ee({abilities:{relationshipContent:!1},map:r,view:i,spatialReference:s,timeZone:a,graphic:n}))}),t.forEach(n=>{e?.find(l=>this._matchesFeature(n,l))||t.remove(n)})}render(){let{state:e}=this;return o`<div class="root"><arcgis-feature-element-info .heading=${this.heading} .headingLevel=${this.headingLevel} .description=${this.description}></arcgis-feature-element-info>${e==="loading"?this._renderLoading():e==="disabled"?this._renderRelationshipNotFound():this._renderRelatedFeatures()}</div>`}_renderStickyLoading(){return this.state==="querying"?o`<div class="sticky-loading-container">${this._renderLoadingIcon()}</div>`:null}_renderLoadingIcon(){return o`<calcite-loader inline label></calcite-loader>`}_renderLoading(){return o`<div class="loading-container">${this._renderLoadingIcon()}</div>`}_renderShowAllIconNode(){return o`<calcite-icon icon=list scale=s slot=content-end></calcite-icon>`}_renderChevronIconNode(){return o`<calcite-icon flip-rtl icon=chevron-right scale=s slot=content-end></calcite-icon>`}_renderCategory(e){let{count:t,name:r}=e,i=T(t);return o`<calcite-list-item class="list-item" .disabled=${!t} .label=${r} @calciteListItemSelect=${()=>this._selectCategory(e)}><calcite-chip .label=${i} scale=s slot=content-end>${i}</calcite-chip>${this._renderChevronIconNode()}</calcite-list-item>`}_renderRelatedFeature(e){let{itemDescriptionFieldName:t,values:r}=this,{formattedAttributes:i,state:s,heading:a}=e,n={...r,...i?.global},l=(t&&n?.[t])??"";return o`<calcite-list-item class=${q(P("list-item",{"list-item-hidden":s==="loading"}))} .description=${k(l.toString())} .label=${k(a)} @calciteListItemSelect=${()=>this._selectRecord(e)}><div slot=heading .innerHTML=${H.sanitize(a??"")??""}></div><div slot=description .innerHTML=${H.sanitize(l??"")??""}></div>${this._renderChevronIconNode()}</calcite-list-item>`}_renderShowAllListItem(){return this.displayShowAllButton?o`<calcite-list-item .description=${this.allItemsDescription} .label=${this.messages?.showAll} @calciteListItemSelect=${()=>this._showAllRecords()}>${this._renderShowAllIconNode()}</calcite-list-item>`:null}_renderNoRelatedFeaturesMessage(){return o`<calcite-notice icon=information kind=brand open scale=s width=full><div slot=message>${this.messages?.noRelatedFeatures}</div></calcite-notice>`}_renderFeatureObserver(){return o`<div class="feature-observer" ${S(this._relatedFeatureIntersectionObserverNode)}></div>`}_renderList(){let{relatedFeatureViewModels:e,categories:t}=this;return o`<calcite-list display-mode=flat .label=${this.messages?.relatedFeaturesList??""}>${t?.map(r=>this._renderCategory(r))??e.toArray().map(r=>this._renderRelatedFeature(r))}${this._renderShowAllListItem()}</calcite-list>`}_renderRelatedFeatures(){let{displayListItems:e}=this,{state:t}=this;return o`<div class=${q(P("list",{"list-querying":t==="querying"}))}>${e?this._renderList():t==="ready"?this._renderNoRelatedFeaturesMessage():null}${this._renderStickyLoading()}${this._renderFeatureObserver()}</div>`}_renderRelationshipNotFound(){return o`<calcite-notice icon=exclamation-mark-triangle kind=danger open scale=s width=full><div slot=message>${this.messages?.relationshipNotFound}</div></calcite-notice>`}};Q("arcgis-feature-relationship",E);return E},"applications/Components/stringUtils","applications/Components/sanitizerUtils","applications/Components/featureUtils","intl","core/reactiveUtils","core/Collection","rest/support/RelationshipQuery","core/promiseUtils","popup/Feature",a,c)
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
+
import b from"./G7KHJU6J.js";import{c}from"./L5MVC2NA.js";import{O as a,P as l,U as r,a as o,b as i}from"./GRYRJF75.js";import"./3TTFCHAA.js";export default $arcgis.t(([{watch:d},{a:s}])=>{var v=o`.toolbar{display:flex;align-items:center;background-color:var(--calcite-color-foreground-1);font-size:var(--calcite-font-size--2)}.timecode{color:var(--calcite-color-text-3);line-height:1.25rem}.controls-group{display:flex;flex:1 0 auto;justify-content:flex-end}.live-icon{color:var(--calcite-color-status-danger)}.controls-container{display:flex;align-items:center;gap:var(--calcite-spacing-md)}`,t=class extends a{static{this.properties={_isLive:16,viewModel:0,messages:0,currentTime:9,duration:9,toggleMetadata:0,inline:5}}static{this.styles=v}loaded(){this.manager.onLifecycle(()=>[d(()=>this.viewModel.layer?.isLive,e=>{this._isLive=e??void 0},{initial:!0})])}render(){let{messages:e}=this;this._isLive===void 0&&(this._isLive=this.viewModel.layer?.isLive);let n=this._isLive?s(this.currentTime):`${s(this.currentTime)} / ${s(this.duration)}`;return i`<div class=${l(c("toolbar"))}><div class="controls-container"><arcgis-video-player-actions-group .inline=${this.inline} .messages=${e} .viewModel=${this.viewModel}></arcgis-video-player-actions-group>${this._isLive?i`<calcite-icon class="live-icon" icon=beacon></calcite-icon>`:null}${!this.inline||this._isLive?i`<div class="timecode">${n}</div>`:null}</div>${this.inline?null:i`<arcgis-video-player-controls-group class="controls-group" .messages=${e} .toggleMetadata=${()=>this.toggleMetadata()} .viewModel=${this.viewModel}></arcgis-video-player-controls-group>`}</div>`}};r("arcgis-video-player-action-bar",t);return t},"core/reactiveUtils",b)
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import j from"./N2ZR7Q6F.js";import i from"./BH32Z76H.js";import h from"./R3NYK6BO.js";import{a as b}from"./N7VR7H4O.js";import g from"./2LHTH7PU.js";import"./PC4PAQXQ.js";import"./IVKWYER5.js";import e from"./S5JVHVOR.js";import{a as B}from"./3AX3SJK2.js";import d from"./6UX4Z6VU.js";import c from"./6PKEUXSO.js";import{g as O}from"./X4K6UDSU.js";import"./HWEEHWOD.js";import a from"./BAJLAC4A.js";import{c as M}from"./L5MVC2NA.js";import{M as f,N as u,O as D,P as F,R as l,S as E,U as N,a as k,b as n,o as y,x as _}from"./GRYRJF75.js";import"./3TTFCHAA.js";export default $arcgis.t(([G,{substitute:d,formatNumber:$},{watch:c},{stripHTML:A},V,{renderingSanitizer:U},{initializeProjection:W},,,,R,,,{d:L},{a:P,b:S,e:H,f:z}])=>{var X=k`:host{display:flex;overflow:hidden;flex:1 1 auto}.root{--calcite-color-background: var(--calcite-color-foreground-1);display:flex;overflow:hidden;flex:1 1 auto;flex-direction:column}.root img{image-orientation:from-image}.flow-item-collapsed{--calcite-flow-item-header-border-block-end: none}.container{display:flex;flex:1 1 auto;background-color:var(--calcite-color-foreground-1)}.container calcite-list{width:100%}.container:not(:empty){padding:var(--arcgis-internal-padding-md, var(--calcite-spacing-md))}.root .arcgis-feature,.root .arcgis-feature-relationship,.root .arcgis-feature-utility-network-associations{background-color:transparent}.heading{word-break:break-word;word-wrap:break-word}.header,.footer{display:flex;align-items:center;justify-content:flex-end;background-color:var(--calcite-color-foreground-1)}.footer{flex:1}.pagination-text{padding-inline:var(--calcite-spacing-sm);color:var(--calcite-color-text-3);font-size:var(--calcite-font-size-sm)}.loader{align-self:center;padding-inline:var(--calcite-spacing-lg)}.pagination-action-bar{flex:1}.pagination-menu-button{padding-inline:var(--calcite-spacing-xxs);border-inline-start:var(--calcite-border-width-sm) solid var(--calcite-color-border-3)}.icon{display:inline-block;flex:0 0 var(--calcite-spacing-lg);width:var(--calcite-spacing-lg);height:var(--calcite-spacing-lg)}.action-image{flex:0 0 var(--calcite-spacing-lg);background-position:50% 50%;background-repeat:no-repeat;background-size:contain;width:var(--calcite-spacing-lg);height:var(--calcite-spacing-lg)}.header{border-block-end:var(--calcite-border-width-sm) solid var(--calcite-color-border-3)}.content-feature{--calcite-flow-item-footer-padding: 0}.feature-menu-observer{position:relative;bottom:var(--calcite-spacing-xxl);z-index:2;text-align:center}.action-exit{transform:scaleX(-1)}`,w=P.clone();function q(T){return T?.declaredClass.startsWith("esri.layers.")??!1}var Q=R(G),x=class extends D{constructor(){super(...arguments),this._fetchFeaturesController=null,this._featureMenuIntersectionObserverCallback=([e])=>{e?.isIntersecting&&this.viewModel.featurePage!=null&&this.viewModel.featurePage++},this._featureMenuIntersectionObserver=new IntersectionObserver(this._featureMenuIntersectionObserverCallback,{root:window.document}),this._featureMenuIntersectionObserverNode=null,this._rootFlowItemNode=f(),this._featureMenuViewportNode=f(),this._actionBarMenuNode=f(),this._flowContainerNode=f(),this.messages=B(),this._selectedFeatureComponent=f(),this._cancelOpenRelatedFeature=()=>{let{_openRelatedFeatureAbortController:e}=this;e&&e.abort(),this._openRelatedFeatureAbortController=null},this._openRelatedFeatureAbortController=null,this.flowItems=new V,this.viewModel=Q(this),this.actions=this.viewModel.actions,this.active=this.viewModel.active,this.autoDestroyDisabled=!1,this.collapsed=!1,this.content=this.viewModel.content,this.defaultPopupTemplateEnabled=this.viewModel.defaultPopupTemplateEnabled,this.featureCount=this.viewModel.featureCount,this.featureMenuOpen=!1,this.featureNavigationTop=!1,this.features=this.viewModel.features,this.featuresPerPage=this.viewModel.featuresPerPage,this.featureItemAbilities=this.viewModel.featureItemAbilities,this.goToOverride=this.viewModel.goToOverride,this.headerActions=new V,this.heading=this.viewModel.heading,this.headingLevel=2,this.hideActionBar=!1,this.hideCloseButton=!1,this.hideFeatureMenuHeading=!1,this.hideFeatureNavigation=!1,this.hideFeatureListLayerTitle=!1,this.hideHeading=!1,this.hideSelectFeature=!1,this.hideSpinner=!1,this.hideContent=!1,this.chartAnimationDisabled=this.viewModel.featureItemAbilities?.chartAnimation,this.hideAttachmentsContent=this.viewModel.featureItemAbilities?.attachmentsContent,this.hideCustomContent=this.viewModel.featureItemAbilities?.customContent,this.hideExpressionContent=!1,this.hideFieldsContent=this.viewModel.featureItemAbilities?.fieldsContent,this.hideMediaContent=this.viewModel.featureItemAbilities?.mediaContent,this.hideRelationshipContent=this.viewModel.featureItemAbilities?.relationshipContent,this.hideTextContent=this.viewModel.featureItemAbilities?.textContent,this.hideUtilityNetworkContent=this.viewModel.featureItemAbilities?.utilityNetworkAssociationsContent,this.hideLastEditedInfo=!1,this.highlightDisabled=this.viewModel.highlightEnabled,this.includeDefaultActionsDisabled=this.viewModel.includeDefaultActions,this.initialDisplayMode=this.viewModel.initialDisplayMode,this.location=this.viewModel.location,this.map=this.viewModel.map,this.open=this.viewModel.open,this.promises=this.viewModel.promises,this.responsiveActionsEnabled=!1,this.selectedFeature=this.viewModel.selectedFeature,this.selectedFeatureIndex=this.viewModel.selectedFeatureIndex,this.showCollapseButton=!1,this.spatialReference=this.viewModel.spatialReference,this.state=this.viewModel.state,this.timeZone=this.viewModel.timeZone,this.updateLocationEnabled=this.viewModel.updateLocationEnabled,this.view=this.viewModel.view,this.arcgisPropertyChange=O()("active","collapsed","featureCount","featureMenuOpen","features","promises","selectedDrillInFeature","selectedFeature","selectedFeatureComponent","selectedFeatureIndex","state","open"),this.arcgisReady=_(),this.arcgisClose=_(),this.arcgisTriggerAction=_()}static{this.properties={_openRelatedFeatureAbortController:16,flowItems:16,_hideActionText:16,_featureNavigationVisible:16,_isCollapsed:16,_collapseEnabled:16,_featureFlowItemSelected:16,viewModel:0,actions:0,active:0,autoDestroyDisabled:5,collapsed:5,content:1,defaultPopupTemplateEnabled:5,featureCount:9,featureMenuOpen:5,featureMenuTitle:1,featureNavigationTop:5,features:0,featuresPerPage:9,featureItemAbilities:0,goToOverride:0,headerActions:0,heading:1,headingLevel:9,hideActionBar:5,hideCloseButton:5,hideFeatureMenuHeading:5,hideFeatureNavigation:5,hideFeatureListLayerTitle:5,hideHeading:5,hideSelectFeature:5,hideSpinner:5,hideContent:5,chartAnimationDisabled:5,hideAttachmentsContent:5,hideCustomContent:5,hideExpressionContent:5,hideFieldsContent:5,hideMediaContent:5,hideRelationshipContent:5,hideTextContent:5,hideUtilityNetworkContent:5,hideLastEditedInfo:5,highlightDisabled:5,icon:1,includeDefaultActionsDisabled:5,initialDisplayMode:1,label:1,location:0,map:0,messageOverrides:0,open:5,referenceElement:1,promises:0,responsiveActionsEnabled:5,selectedDrillInFeature:32,selectedFeature:0,selectedFeatureComponent:32,selectedFeatureIndex:9,showCollapseButton:5,spatialReference:0,state:32,timeZone:1,updateLocationEnabled:5,view:0}}static{this.styles=X}get _hideActionText(){if(!this.responsiveActionsEnabled)return!1;let e=this.viewModel.view?.widthBreakpoint;return e==="xsmall"||e==="small"||e==="medium"}get _featureNavigationVisible(){return this.viewModel.active&&this.viewModel.featureCount>1&&!!this.viewModel.selectedFeature&&!this.hideFeatureNavigation}get _isCollapsed(){return this._collapseEnabled&&this.collapsed}get _collapseEnabled(){return this.showCollapseButton&&(this.initialDisplayMode==="list"||!!(this.heading||this.viewModel.selectedFeatureItem?.heading)&&!!(this.content||this.viewModel.selectedFeatureItem?.content))}get _featureFlowItemSelected(){return this.initialDisplayMode==="list"?!!this.selectedFeature:!this.featureMenuOpen}async clear(){return this.viewModel.clear()}async close(){this.open=!1}async destroy(){await this.manager.destroy(),await this._destroySpinner(this.referenceElement),this._cancelOpenRelatedFeature(),this._removeFlowItems(),this._unobserveFeatureMenuObserver(),this._cancelFetchingFeatures(),this._featureMenuIntersectionObserver?.disconnect()}async fetchFeatures(e,t){this._cancelFetchingFeatures();let{signal:i}=t??{},a=new AbortController,{signal:s}=a,o=i?AbortSignal.any([s,i]):s;if(this._fetchFeaturesController=a,!e&&this.view&&this.location&&(await W(this.location.spatialReference,this.view.spatialReference,null,{signal:o}),e=this.view.toScreen(this.location)??void 0),!e)return;let r=await this.viewModel.fetchFeatures(e,{...t,signal:o});this.location=r.location,this.promises=r.pendingFeatures}async next(){return this.viewModel.next()}async previous(){return this.viewModel.previous()}async setFocus(){this._flowContainerNode.value?.setFocus()}async triggerAction(e){if(!e.disabled)return e?.type==="toggle"&&(e.value=!e.value),e?.id===S.id&&(this.featureMenuOpen=!1),await z(e,this.viewModel)}loaded(){this.manager.onLifecycle(()=>[c(()=>this.viewModel?.selectedFeatureIndex,(e,t)=>this._selectedFeatureIndexUpdated(e,t)),c(()=>this.viewModel?.view,()=>this._viewChange()),c(()=>this._spinnerEl?.screenLocation,()=>this._closeOpenActionMenu()),c(()=>this.selectedFeatureComponent?.viewModel,()=>this._removeFlowItems()),c(()=>this.viewModel?.featureItems,()=>this._featureMenuViewportScrollTop()),c(()=>this.flowItems.length,()=>{let e=Array.from(this.flowItems).at(-1);y(()=>this.selectedDrillInFeature=e?.graphic??void 0)}),c(()=>[this.flowItems?.length,this.featureMenuOpen],()=>{this.setFocus()}),c(()=>this.referenceElement,(e,t)=>{this._destroySpinner(t),this._createSpinner()},{initial:!0}),c(()=>[this.hideSpinner,this.viewModel?.view,this.viewModel?.location,this.viewModel?.waitingForResult,this.viewModel?.view],()=>{this._createSpinner()},{initial:!0})])}updated(){let e=this._selectedFeatureComponent.value??void 0;this.selectedFeatureComponent!==e&&y(()=>this.selectedFeatureComponent=e)}_cancelFetchingFeatures(){this._fetchFeaturesController?.abort(),this._fetchFeaturesController=null}_handleClose(){this.close(),this.arcgisClose.emit()}_groupResultsByLayer(){let{featureItems:e}=this.viewModel,t=new Map;return e.forEach(i=>{let a=i?.graphic;if(!a)return;let s=L(a),o=q(s)?s:null,r=t.get(o)??[];t.set(o,[...r,i])}),t}_handleCollapseToggle(){this.collapsed=!this.collapsed}async _openRelatedFeature(e){this._cancelOpenRelatedFeature();let t=new AbortController;this._openRelatedFeatureAbortController=t,await e.updateGeometry();let i=e.graphic,a=i?.geometry;if(a==null||i==null)return;this._removeFlowItems(),await this.viewModel.zoomTo({target:a});let s=(await $arcgis.t(m=>m[0],"geometry/operators/labelPointOperator")).execute(a);s!=null&&(this.location=s),this.features=[i],this.open=!0,await this.setFocus(),this._openRelatedFeatureAbortController===t&&(this._openRelatedFeatureAbortController=null)}_handlePaginationMenuButton(){this._updateFeatureMenu()}_openFeatureMenu(){this._updateFeatureMenu(!0)}_closeFeatureMenu(){this._updateFeatureMenu(!1)}_updateFeatureMenu(e=!this.featureMenuOpen){this.featureMenuOpen=e}_previousFeature(){this.viewModel.previous()}_nextFeature(){this.viewModel.next()}_handleFeatureBack(){this.initialDisplayMode==="list"?(this.selectedFeatureIndex=-1,this.setFocus()):this._openFeatureMenu()}_handleFeatureMenuBack(){this.initialDisplayMode==="list"?(this.selectedFeatureIndex=-1,this.setFocus()):this.featureMenuOpen&&this._closeFeatureMenu()}_setActiveFeature(e){let{viewModel:t}=this;t.activeFeature=t.features?.[e]||null}_removeActiveFeature(){this.viewModel.activeFeature=null}_selectFeature(e){this.viewModel.selectedFeatureIndex=e,this.initialDisplayMode==="feature"?this._handleFeatureMenuBack():this.setFocus()}_unobserveFeatureMenuObserver(){this._featureMenuIntersectionObserverNode&&this._featureMenuIntersectionObserver.unobserve(this._featureMenuIntersectionObserverNode)}_featureMenuIntersectionObserverCreated(e){this._unobserveFeatureMenuObserver(),e&&this._featureMenuIntersectionObserver.observe(e),this._featureMenuIntersectionObserverNode=e}_getActionTitle(e){let{messages:t,selectedFeature:i}=this,{id:a}=e,s=i?.attributes,o=e.title??"",r=a==="zoom-to-feature"?d(o,{messages:t}):a==="remove-selected-feature"?d(o,{messages:t}):a==="zoom-to-clustered-features"?d(o,{messages:t}):a==="browse-clustered-features"?d(o,{messages:t}):e.title;return r&&s?d(r,s):r??""}_onMainKeydown(e){let{key:t}=e;t==="ArrowLeft"&&(e.stopPropagation(),this._handleFeatureMenuBack(),this.previous(),this.setFocus()),t==="ArrowRight"&&(e.stopPropagation(),this._handleFeatureMenuBack(),this.next(),this.setFocus())}_featureMenuViewportScrollTop(){this._featureMenuViewportNode&&this._featureMenuViewportNode.value?.scrollContentTo({top:0})}_selectedFeatureIndexUpdated(e,t){let{featureCount:i,waitingForResult:a}=this.viewModel;a||!i||e===t||e===-1||(this._removeFlowItems(),this._rootFlowItemNode.value?.scrollContentTo({top:0}))}_triggerAction(e){this.triggerAction(e),this.arcgisTriggerAction.emit({action:e})}_viewChange(){this.viewModel.clear(),this.open=!1}_closeOpenActionMenu(){let{_actionBarMenuNode:e}=this;e.value&&(e.value.menuOpen=!1)}_removeFlowItems(){this.flowItems?.destroyAll()}_getDrillInFlowItemDescription(e){switch(e.flowType){case"feature":case"feature-association":case"feature-utility-network-associations":case"feature-utility-network-association-type":return e.description;case"feature-relationship":return e.allItemsDescription}}_handleDrillInBackClick(){this.flowItems?.pop()?.destroy()}_getHeading(){let{hideHeading:e}=this,{heading:t,selectedFeatureItem:i}=this.viewModel;return i&&!e?i?.state==="error"?this.messages?.errorMessage??"":i?.heading||"":!e&&t?t:""}async _destroySpinner(e){e?.manager?.component?.extraContent?.remove(this._spinnerEl)}async _createSpinner(){let e=this.referenceElement;e&&(await this._destroySpinner(e),this._spinnerEl=E(n`<arcgis-spinner auto-destroy-disabled .label=${this.messages.loading??""} .trackLocation=${!this.hideSpinner&&this.viewModel?.waitingForResult} .location=${this.viewModel?.location??void 0} .view=${this.viewModel?.view??void 0}></arcgis-spinner>`),e.manager?.component?.extraContent?.add(this._spinnerEl))}render(){return n`<div class="root" @keydown=${this._onMainKeydown}>${this._renderHeader()}${this._renderContentContainer()}</div>`}_renderFeatureNavigation(){return[this._renderPagination(),this.initialDisplayMode==="list"?this._renderFeaturePaginationText():this._renderFeatureMenuButton()]}_renderHeader(){return this.featureNavigationTop&&this._featureNavigationVisible?n`<div class="header">${this._renderFeatureNavigation()}</div>`:null}_renderFooter(){return!this.featureNavigationTop&&this._featureNavigationVisible?n`<div class="footer" slot=footer>${this._renderFeatureNavigation()}</div>`:null}_renderFeaturePaginationText(){let{messages:e,viewModel:t}=this,{featureCount:i,selectedFeatureIndex:a}=t;return n`<div class="pagination-text">${d(e.pageText??"",{index:$(a+1),total:$(i)})}</div>`}_renderFeatureMenuButton(){let{messages:e,viewModel:t}=this,{featureCount:i,selectedFeatureIndex:a,pendingPromisesCount:s}=t;return n`<calcite-action class="pagination-menu-button" icon=list .label=${e.selectFeature} .loading=${s>0} @click=${this._handlePaginationMenuButton} .text=${d(e.pageText??"",{index:$(a+1),total:$(i)})} text-enabled title=${e.selectFeature??l}></calcite-action>`}_renderPagination(){let{previous:e,next:t}=this.messages;return n`<calcite-action-bar class="pagination-action-bar" expand-disabled layout=horizontal overflow-actions-disabled scale=s><calcite-action-group scale=s><calcite-action class="pagination-previous" icon=chevron-left icon-flip-rtl .label=${e??""} @click=${this._previousFeature} .text=${e??""} title=${e??""??l}></calcite-action><calcite-action icon=chevron-right icon-flip-rtl .label=${t??""} @click=${this._nextFeature} .text=${t??""} title=${t??""??l}></calcite-action></calcite-action-group></calcite-action-bar>`}_renderFeatureMenuItem(e){let{initialDisplayMode:t}=this,{selectedFeatureItem:i,featureItems:a}=this.viewModel,s=e===i,o=a.indexOf(e);return n`<calcite-list-item @blur=${this._removeActiveFeature} @focus=${()=>this._setActiveFeature(o)} @mouseleave=${this._removeActiveFeature} @mouseover=${()=>this._setActiveFeature(o)} .selected=${s} @calciteListItemSelect=${()=>this._selectFeature(o)}><span .innerHTML=${(U.sanitize(e.heading)||this.messages.untitled)??""} slot=content></span>${t==="list"?n`<calcite-icon flip-rtl icon=chevron-right scale=s slot=content-end></calcite-icon>`:null}</calcite-list-item>`}_renderFeatureMenu(){let{messages:e,viewModel:t}=this,i=this._groupResultsByLayer(),a=this.initialDisplayMode==="list"?"none":"single";return t.featureItems.length?n`<calcite-list display-mode=flat .label=${e?.featuresList??""} selection-appearance=icon .selectionMode=${a}>${Array.from(i.keys(),s=>{let o=i.get(s)?.map(h=>this._renderFeatureMenuItem(h)),r=s?s.title??this.messages.untitled:null;return!this.hideFeatureListLayerTitle&&r!==null?b(s??"map-graphics",n`<calcite-list-item-group .heading=${r}>${o}</calcite-list-item-group>`):o})}</calcite-list>`:null}_renderHeaderAction(e){let t=e.title||"";return e.visible?n`<calcite-action .active=${e.type==="toggle"?e.value:!1} .disabled=${e.disabled} .icon=${e.icon??void 0} .indicator=${e.active} .loading=${e.active} @click=${()=>this._triggerAction(e)} slot=header-actions-end .text=${t} title=${t??l}></calcite-action>`:null}_renderHeaderActions(){return this.headerActions.map(e=>this._renderHeaderAction(e)).toArray()}_renderContentFeature(){let{headingLevel:e,hideCloseButton:t,_isCollapsed:i,_collapseEnabled:a,_featureFlowItemSelected:s,featureNavigationTop:o,flowItems:r,initialDisplayMode:h,selectedFeature:p}=this,{active:g}=this.viewModel,v=this._getHeading();if(h==="list"&&!p)return null;let m=r.length===0&&s;return n`<calcite-flow-item class=${F(M({"content-feature":!0,"flow-item-collapsed":i}))} .closable=${!t} .closed=${!g} .collapsed=${i} .collapseDirection=${o?"down":"up"} .collapsible=${a} .headingLevel=${e} .selected=${m} @calciteFlowItemBack=${this._handleFeatureBack} .loading=${!!this._openRelatedFeatureAbortController} @calciteFlowItemClose=${this._handleClose} @calciteFlowItemToggle=${this._handleCollapseToggle} .heading=${A(v)} ${u(this._rootFlowItemNode)}>${this._renderHeaderActions()}${this._renderActionBar()}<div class=${F(M("container","content-container"))}>${this._renderContent()}</div>${this._renderFooter()}</calcite-flow-item>`}_renderFeatureMenuContainer(){let{viewModel:e,hideCloseButton:t,featureMenuTitle:i,messages:a,initialDisplayMode:s,featureMenuOpen:o,_featureFlowItemSelected:r,_collapseEnabled:h,_isCollapsed:p,featureNavigationTop:g,headingLevel:v}=this,{active:m,featureItems:C,pendingPromisesCount:I}=e,Z=i??a.selectFeature;if(s==="feature"&&!o)return null;let j=!r;return n`<calcite-flow-item class=${F(M({"flow-item-collapsed":p}))} .closable=${s==="list"&&!t} .closed=${!m} .collapsed=${s==="list"&&p} .collapseDirection=${g?"down":"up"} .collapsible=${s==="list"&&h} .description=${this.hideFeatureMenuHeading?void 0:d(a.total??"",{total:C.length})} .heading=${this.hideFeatureMenuHeading?void 0:Z} .headingLevel=${v} .loading=${e.waitingForContents} .selected=${j} @calciteFlowItemBack=${K=>{K.preventDefault(),this._handleFeatureMenuBack()}} @calciteFlowItemClose=${this._handleClose} @calciteFlowItemToggle=${this._handleCollapseToggle} ${u(this._featureMenuViewportNode)}>${s==="list"?this._renderHeaderActions():null}${I>0?n`<calcite-loader class="loader" inline .label=${a.loading??""} slot=header-actions-end></calcite-loader>`:null}<div class="container">${this._renderFeatureMenu()}</div><div class="feature-menu-observer" ${u(this._featureMenuIntersectionObserverCreated)}></div>${s==="feature"?n`<calcite-button appearance=transparent @click=${this._handleFeatureMenuBack} slot=footer-start width=full>${a.back}</calcite-button>`:null}</calcite-flow-item>`}_renderFlowItem(e,t){let{messages:i,hideCloseButton:a,hideSelectFeature:s,active:o}=this,r="graphic"in e&&"isFeatureFromTable"in e&&!e.isFeatureFromTable,h=r&&!s,p=e.flowType==="feature-association",g=i.returnToInitialFeature??"",v=i?.selectFeature,m=this._getActionTitle(w),C=!this.hideActionBar&&p&&r;return n`<calcite-flow-item .closable=${!a} .closed=${!o} .description=${A(this._getDrillInFlowItemDescription(e)??"")} .heading=${this.hideHeading?void 0:A(e.heading??"")} .selected=${t} @calciteFlowItemBack=${I=>{I.preventDefault(),this._handleDrillInBackClick()}} .loading=${!!this._openRelatedFeatureAbortController} @calciteFlowItemClose=${this._handleClose}><calcite-action class="action-exit" icon=move-up @click=${this._removeFlowItems} slot=header-actions-start .text=${g??""} title=${g??""??l}></calcite-action>${h?n`<calcite-action icon=zoom-to-object @click=${()=>this._openRelatedFeature(e)} slot=header-actions-end .text=${v??""} title=${v??l}></calcite-action>`:null}${C?n`<calcite-action-bar expand-disabled expanded scale=s slot=action-bar><calcite-action-group overlay-positioning=fixed scale=s><calcite-action .disabled=${w.disabled} .icon=${w.icon??void 0} .loading=${w.active} scale=s text-enabled .text=${m} title=${m??l} @click=${()=>H(this.viewModel,e)}></calcite-action></calcite-action-group></calcite-action-bar>`:null}<div class="container">${e}</div></calcite-flow-item>`}_renderContentContainer(){let e=this.flowItems?.toArray(),t=e?.map((a,s)=>this._renderFlowItem(a,this._featureFlowItemSelected&&s===e.length-1)),i=this.initialDisplayMode==="list"?[this._renderFeatureMenuContainer(),this._renderContentFeature(),t]:[this._renderContentFeature(),t,this._renderFeatureMenuContainer()];return n`<calcite-flow ${u(this._flowContainerNode)}>${i}</calcite-flow>`}_renderActionBar(){let e=this.viewModel.selectedFeatureItem?.isFeatureFromTable&&!this.location?this.viewModel.allActions.filter(t=>t.id!==w.id):this.viewModel.allActions;return!this._isCollapsed&&!this.hideActionBar&&e.length?n`<calcite-action-bar expand-disabled .expanded=${!this._hideActionText} scale=s slot=action-bar><calcite-action-group overlay-positioning=fixed scale=s ${u(this._actionBarMenuNode)}>${this._renderActions()}</calcite-action-group></calcite-action-bar>`:null}_renderActions(){return this.viewModel.allActions.toArray().map(e=>{let t=this._getActionTitle(e);return n`<calcite-action .active=${e.type==="toggle"?e.value:!1} .disabled=${e.disabled} .icon=${e.icon??void 0} .loading=${e.active} scale=s .textEnabled=${!this._hideActionText} .text=${t??""} title=${t??l} .hidden=${!e.visible} @click=${()=>this._triggerAction(e)}></calcite-action>`})}_renderContent(){let{content:e,selectedFeatureItem:t}=this.viewModel;return t?b(t,n`<arcgis-feature .autoDestroyDisabled=${this.autoDestroyDisabled} .chartAnimationDisabled=${this.chartAnimationDisabled} .defaultPopupTemplateEnabled=${this.defaultPopupTemplateEnabled} .flowItems=${this.flowItems} .graphic=${t.graphic} .headingLevel=${this.headingLevel+1} .hideAttachmentsContent=${this.hideAttachmentsContent} .hideContent=${this.hideContent} .hideCustomContent=${this.hideCustomContent} .hideExpressionContent=${this.hideExpressionContent} .hideFieldsContent=${this.hideFieldsContent} hide-heading .hideLastEditedInfo=${this.hideLastEditedInfo} .hideMediaContent=${this.hideMediaContent} .hideTextContent=${this.hideTextContent} .location=${this.location} .map=${this.map} .referenceElement=${this.referenceElement} .showRelationshipContent=${!this.hideRelationshipContent} .showUtilityNetworkContent=${!this.hideUtilityNetworkContent} .spatialReference=${this.spatialReference} .timeZone=${this.timeZone} ${u(this._selectedFeatureComponent)}></arcgis-feature>`):typeof e=="string"?b(e,n`<div .innerHTML=${U.sanitize(e)??""}></div>`):e??null}};N("arcgis-features",x);return x},"popup/Features","intl","core/reactiveUtils","applications/Components/stringUtils","core/Collection","applications/Components/sanitizerUtils","applications/Components/featureUtils",a,c,d,e,g,h,i,j)
|
|
2
|
+
import j from"./N2ZR7Q6F.js";import i from"./BH32Z76H.js";import h from"./R3NYK6BO.js";import{a as $}from"./N7VR7H4O.js";import g from"./2LHTH7PU.js";import"./PC4PAQXQ.js";import"./IVKWYER5.js";import e from"./S5JVHVOR.js";import{a as L}from"./3AX3SJK2.js";import d from"./6UX4Z6VU.js";import c from"./6PKEUXSO.js";import{g as B}from"./X4K6UDSU.js";import"./HWEEHWOD.js";import a from"./BAJLAC4A.js";import{c as b}from"./L5MVC2NA.js";import{M as f,N as p,O as E,P as M,R as l,S as N,U as O,a as D,b as n,o as A,x as F}from"./GRYRJF75.js";import"./3TTFCHAA.js";export default $arcgis.t(([G,{substitute:d,formatNumber:C},{watch:c},{stripHTML:x},U,{renderingSanitizer:w},{initializeProjection:W},,,,R,,,{d:P},{a:S,b:H,e:z,f:V}])=>{var X=D`:host{display:flex;overflow:hidden;flex:1 1 auto}.root{--calcite-color-background: var(--calcite-color-foreground-1);display:flex;overflow:hidden;flex:1 1 auto;flex-direction:column}.root img{image-orientation:from-image}.flow-item-collapsed{--calcite-flow-item-header-border-block-end: none}.container{display:flex;flex:1 1 auto;background-color:var(--calcite-color-foreground-1)}.container calcite-list{width:100%}.container:not(:empty){padding:var(--arcgis-internal-padding-md, var(--calcite-spacing-md))}.root .arcgis-feature,.root .arcgis-feature-relationship,.root .arcgis-feature-utility-network-associations{background-color:transparent}.heading{word-break:break-word;word-wrap:break-word}.header,.footer{display:flex;align-items:center;justify-content:flex-end;background-color:var(--calcite-color-foreground-1)}.footer{flex:1}.pagination-text{padding-inline:var(--calcite-spacing-sm);color:var(--calcite-color-text-3);font-size:var(--calcite-font-size-sm)}.loader{align-self:center;padding-inline:var(--calcite-spacing-lg)}.pagination-action-bar{flex:1}.pagination-menu-button{padding-inline:var(--calcite-spacing-xxs);border-inline-start:var(--calcite-border-width-sm) solid var(--calcite-color-border-3)}.icon{display:inline-block;flex:0 0 var(--calcite-spacing-lg);width:var(--calcite-spacing-lg);height:var(--calcite-spacing-lg)}.action-image{flex:0 0 var(--calcite-spacing-lg);background-position:50% 50%;background-repeat:no-repeat;background-size:contain;width:var(--calcite-spacing-lg);height:var(--calcite-spacing-lg)}.header{border-block-end:var(--calcite-border-width-sm) solid var(--calcite-color-border-3)}.content-feature{--calcite-flow-item-footer-padding: 0}.feature-menu-observer{position:relative;bottom:var(--calcite-spacing-xxl);z-index:2;text-align:center}.action-exit{transform:scaleX(-1)}`,_=S.clone();function q(k){return k?.declaredClass.startsWith("esri.layers.")??!1}var Q=R(G),T=class extends E{constructor(){super(...arguments),this._fetchFeaturesController=null,this._featureMenuIntersectionObserverCallback=([e])=>{e?.isIntersecting&&this.viewModel.featurePage!=null&&this.viewModel.featurePage++},this._featureMenuIntersectionObserver=new IntersectionObserver(this._featureMenuIntersectionObserverCallback,{root:window.document}),this._featureMenuIntersectionObserverNode=null,this._rootFlowItemNode=f(),this._featureMenuViewportNode=f(),this._actionBarMenuNode=f(),this._flowContainerNode=f(),this.messages=L(),this._selectedFeatureComponent=f(),this._cancelOpenRelatedFeature=()=>{let{_openRelatedFeatureAbortController:e}=this;e&&e.abort(),this._openRelatedFeatureAbortController=null},this._openRelatedFeatureAbortController=null,this.flowItems=new U,this.viewModel=Q(this),this.actions=this.viewModel.actions,this.active=this.viewModel.active,this.autoDestroyDisabled=!1,this.collapsed=!1,this.content=this.viewModel.content,this.defaultPopupTemplateEnabled=this.viewModel.defaultPopupTemplateEnabled,this.featureCount=this.viewModel.featureCount,this.featureMenuOpen=!1,this.featureNavigationTop=!1,this.features=this.viewModel.features,this.featuresPerPage=this.viewModel.featuresPerPage,this.featureItemAbilities=this.viewModel.featureItemAbilities,this.goToOverride=this.viewModel.goToOverride,this.headerActions=new U,this.heading=this.viewModel.heading,this.headingLevel=2,this.hideActionBar=!1,this.hideCloseButton=!1,this.hideFeatureMenuHeading=!1,this.hideFeatureNavigation=!1,this.hideFeatureListLayerTitle=!1,this.hideHeading=!1,this.hideSelectFeature=!1,this.hideSpinner=!1,this.hideContent=!1,this.chartAnimationDisabled=this.viewModel.featureItemAbilities?.chartAnimation,this.hideAttachmentsContent=this.viewModel.featureItemAbilities?.attachmentsContent,this.hideCustomContent=this.viewModel.featureItemAbilities?.customContent,this.hideExpressionContent=!1,this.hideFieldsContent=this.viewModel.featureItemAbilities?.fieldsContent,this.hideMediaContent=this.viewModel.featureItemAbilities?.mediaContent,this.hideRelationshipContent=this.viewModel.featureItemAbilities?.relationshipContent,this.hideTextContent=this.viewModel.featureItemAbilities?.textContent,this.hideUtilityNetworkContent=this.viewModel.featureItemAbilities?.utilityNetworkAssociationsContent,this.hideLastEditedInfo=!1,this.highlightDisabled=this.viewModel.highlightEnabled,this.includeDefaultActionsDisabled=this.viewModel.includeDefaultActions,this.initialDisplayMode=this.viewModel.initialDisplayMode,this.location=this.viewModel.location,this.map=this.viewModel.map,this.open=this.viewModel.open,this.promises=this.viewModel.promises,this.responsiveActionsEnabled=!1,this.selectedFeature=this.viewModel.selectedFeature,this.selectedFeatureIndex=this.viewModel.selectedFeatureIndex,this.showCollapseButton=!1,this.spatialReference=this.viewModel.spatialReference,this.state=this.viewModel.state,this.timeZone=this.viewModel.timeZone,this.updateLocationEnabled=this.viewModel.updateLocationEnabled,this.view=this.viewModel.view,this.arcgisPropertyChange=B()("active","collapsed","featureCount","featureMenuOpen","features","promises","selectedDrillInFeature","selectedFeature","selectedFeatureComponent","selectedFeatureIndex","state","open"),this.arcgisReady=F(),this.arcgisClose=F(),this.arcgisTriggerAction=F()}static{this.properties={_openRelatedFeatureAbortController:16,flowItems:16,_hideActionText:16,_featureNavigationVisible:16,_isCollapsed:16,_collapseEnabled:16,_featureFlowItemSelected:16,viewModel:0,actions:0,active:0,autoDestroyDisabled:5,collapsed:5,content:1,defaultPopupTemplateEnabled:5,featureCount:9,featureMenuOpen:5,featureMenuTitle:1,featureNavigationTop:5,features:0,featuresPerPage:9,featureItemAbilities:0,goToOverride:0,headerActions:0,heading:1,headingLevel:9,hideActionBar:5,hideCloseButton:5,hideFeatureMenuHeading:5,hideFeatureNavigation:5,hideFeatureListLayerTitle:5,hideHeading:5,hideSelectFeature:5,hideSpinner:5,hideContent:5,chartAnimationDisabled:5,hideAttachmentsContent:5,hideCustomContent:5,hideExpressionContent:5,hideFieldsContent:5,hideMediaContent:5,hideRelationshipContent:5,hideTextContent:5,hideUtilityNetworkContent:5,hideLastEditedInfo:5,highlightDisabled:5,icon:1,includeDefaultActionsDisabled:5,initialDisplayMode:1,label:1,location:0,map:0,messageOverrides:0,open:5,referenceElement:1,promises:0,responsiveActionsEnabled:5,selectedDrillInFeature:32,selectedFeature:0,selectedFeatureComponent:32,selectedFeatureIndex:9,showCollapseButton:5,spatialReference:0,state:32,timeZone:1,updateLocationEnabled:5,view:0}}static{this.styles=X}get _hideActionText(){if(!this.responsiveActionsEnabled)return!1;let e=this.viewModel.view?.widthBreakpoint;return e==="xsmall"||e==="small"||e==="medium"}get _featureNavigationVisible(){return this.viewModel.active&&this.viewModel.featureCount>1&&!!this.viewModel.selectedFeature&&!this.hideFeatureNavigation}get _isCollapsed(){return this._collapseEnabled&&this.collapsed}get _collapseEnabled(){return this.showCollapseButton&&(this.initialDisplayMode==="list"||!!(this.heading||this.viewModel.selectedFeatureItem?.heading)&&!!(this.content||this.viewModel.selectedFeatureItem?.content))}get _featureFlowItemSelected(){return this.initialDisplayMode==="list"?!!this.selectedFeature:!this.featureMenuOpen}async clear(){return this.viewModel.clear()}async close(){this.open=!1}async destroy(){await this.manager.destroy(),await this._destroySpinner(this.referenceElement),this._cancelOpenRelatedFeature(),this._removeFlowItems(),this._unobserveFeatureMenuObserver(),this._cancelFetchingFeatures(),this._featureMenuIntersectionObserver?.disconnect()}async fetchFeatures(e,t){this._cancelFetchingFeatures();let{signal:i}=t??{},a=new AbortController,{signal:s}=a,o=i?AbortSignal.any([s,i]):s;if(this._fetchFeaturesController=a,!e&&this.view&&this.location&&(await W(this.location.spatialReference,this.view.spatialReference,null,{signal:o}),e=this.view.toScreen(this.location)??void 0),!e)return;let r=await this.viewModel.fetchFeatures(e,{...t,signal:o});this.location=r.location,this.promises=r.pendingFeatures}async next(){return this.viewModel.next()}async previous(){return this.viewModel.previous()}async setFocus(){this._flowContainerNode.value?.setFocus()}async triggerAction(e){if(!e.disabled)return e?.type==="toggle"&&(e.value=!e.value),e?.id===H.id&&(this.featureMenuOpen=!1),await V(e,this.viewModel)}loaded(){this.manager.onLifecycle(()=>[c(()=>this.viewModel?.selectedFeatureIndex,(e,t)=>this._selectedFeatureIndexUpdated(e,t)),c(()=>this.viewModel?.view,()=>this._viewChange()),c(()=>this._spinnerEl?.screenLocation,()=>this._closeOpenActionMenu()),c(()=>this.selectedFeatureComponent?.viewModel,()=>this._removeFlowItems()),c(()=>this.viewModel?.featureItems,()=>this._featureMenuViewportScrollTop()),c(()=>this.flowItems.length,()=>{let e=Array.from(this.flowItems).at(-1);A(()=>this.selectedDrillInFeature=e?.graphic??void 0)}),c(()=>[this.flowItems?.length,this.featureMenuOpen],()=>{this.setFocus()}),c(()=>this.referenceElement,(e,t)=>{this._destroySpinner(t),this._createSpinner()},{initial:!0}),c(()=>[this.hideSpinner,this.viewModel?.view,this.viewModel?.location,this.viewModel?.waitingForResult,this.viewModel?.view],()=>{this._createSpinner()},{initial:!0})])}updated(){let e=this._selectedFeatureComponent.value??void 0;this.selectedFeatureComponent!==e&&A(()=>this.selectedFeatureComponent=e)}_cancelFetchingFeatures(){this._fetchFeaturesController?.abort(),this._fetchFeaturesController=null}_handleClose(){this.close(),this.arcgisClose.emit()}_groupResultsByLayer(){let{featureItems:e}=this.viewModel,t=new Map;return e.forEach(i=>{let a=i?.graphic;if(!a)return;let s=P(a),o=q(s)?s:null,r=t.get(o)??[];t.set(o,[...r,i])}),t}_handleCollapseToggle(){this.collapsed=!this.collapsed}async _openRelatedFeature(e){this._cancelOpenRelatedFeature();let t=new AbortController;this._openRelatedFeatureAbortController=t,await e.updateGeometry();let i=e.graphic,a=i?.geometry;if(a==null||i==null)return;this._removeFlowItems(),await this.viewModel.zoomTo({target:a});let s=(await $arcgis.t(m=>m[0],"geometry/operators/labelPointOperator")).execute(a);s!=null&&(this.location=s),this.features=[i],this.open=!0,await this.setFocus(),this._openRelatedFeatureAbortController===t&&(this._openRelatedFeatureAbortController=null)}_handlePaginationMenuButton(){this._updateFeatureMenu()}_openFeatureMenu(){this._updateFeatureMenu(!0)}_closeFeatureMenu(){this._updateFeatureMenu(!1)}_updateFeatureMenu(e=!this.featureMenuOpen){this.featureMenuOpen=e}_previousFeature(){this.viewModel.previous()}_nextFeature(){this.viewModel.next()}_handleFeatureBack(){this.initialDisplayMode==="list"?(this.selectedFeatureIndex=-1,this.setFocus()):this._openFeatureMenu()}_handleFeatureMenuBack(){this.initialDisplayMode==="list"?(this.selectedFeatureIndex=-1,this.setFocus()):this.featureMenuOpen&&this._closeFeatureMenu()}_setActiveFeature(e){let{viewModel:t}=this;t.activeFeature=t.features?.[e]||null}_removeActiveFeature(){this.viewModel.activeFeature=null}_selectFeature(e){this.viewModel.selectedFeatureIndex=e,this.initialDisplayMode==="feature"?this._handleFeatureMenuBack():this.setFocus()}_unobserveFeatureMenuObserver(){this._featureMenuIntersectionObserverNode&&this._featureMenuIntersectionObserver.unobserve(this._featureMenuIntersectionObserverNode)}_featureMenuIntersectionObserverCreated(e){this._unobserveFeatureMenuObserver(),e&&this._featureMenuIntersectionObserver.observe(e),this._featureMenuIntersectionObserverNode=e}_getActionTitle(e){let{messages:t,selectedFeature:i}=this,{id:a}=e,s=i?.attributes,o=e.title??"",r=a==="zoom-to-feature"?d(o,{messages:t}):a==="remove-selected-feature"?d(o,{messages:t}):a==="zoom-to-clustered-features"?d(o,{messages:t}):a==="browse-clustered-features"?d(o,{messages:t}):e.title;return r&&s?d(r,s):r??""}_onMainKeydown(e){let{key:t}=e;t==="ArrowLeft"&&(e.stopPropagation(),this._handleFeatureMenuBack(),this.previous(),this.setFocus()),t==="ArrowRight"&&(e.stopPropagation(),this._handleFeatureMenuBack(),this.next(),this.setFocus())}_featureMenuViewportScrollTop(){this._featureMenuViewportNode&&this._featureMenuViewportNode.value?.scrollContentTo({top:0})}_selectedFeatureIndexUpdated(e,t){let{featureCount:i,waitingForResult:a}=this.viewModel;a||!i||e===t||e===-1||(this._removeFlowItems(),this._rootFlowItemNode.value?.scrollContentTo({top:0}))}_triggerAction(e){this.triggerAction(e),this.arcgisTriggerAction.emit({action:e})}_viewChange(){this.viewModel.clear(),this.open=!1}_closeOpenActionMenu(){let{_actionBarMenuNode:e}=this;e.value&&(e.value.menuOpen=!1)}_removeFlowItems(){this.flowItems?.destroyAll()}_getDrillInFlowItemDescription(e){switch(e.flowType){case"feature":case"feature-association":case"feature-utility-network-associations":case"feature-utility-network-association-type":return e.description;case"feature-relationship":return e.allItemsDescription}}_handleDrillInBackClick(){this.flowItems?.pop()?.destroy()}_getHeading(){let{hideHeading:e}=this,{heading:t,selectedFeatureItem:i}=this.viewModel;return i&&!e?i?.state==="error"?this.messages?.errorMessage??"":i?.heading||"":!e&&t?t:""}async _destroySpinner(e){e?.manager?.component?.extraContent?.remove(this._spinnerEl)}async _createSpinner(){let e=this.referenceElement;e&&(await this._destroySpinner(e),this._spinnerEl=N(n`<arcgis-spinner auto-destroy-disabled .label=${this.messages.loading??""} .trackLocation=${!this.hideSpinner&&this.viewModel?.waitingForResult} .location=${this.viewModel?.location??void 0} .view=${this.viewModel?.view??void 0}></arcgis-spinner>`),e.manager?.component?.extraContent?.add(this._spinnerEl))}render(){return n`<div class="root" @keydown=${this._onMainKeydown}>${this._renderHeader()}${this._renderContentContainer()}</div>`}_renderFeatureNavigation(){return[this._renderPagination(),this.initialDisplayMode==="list"?this._renderFeaturePaginationText():this._renderFeatureMenuButton()]}_renderHeader(){return this.featureNavigationTop&&this._featureNavigationVisible?n`<div class="header">${this._renderFeatureNavigation()}</div>`:null}_renderFooter(){return!this.featureNavigationTop&&this._featureNavigationVisible?n`<div class="footer" slot=footer>${this._renderFeatureNavigation()}</div>`:null}_renderFeaturePaginationText(){let{messages:e,viewModel:t}=this,{featureCount:i,selectedFeatureIndex:a}=t;return n`<div class="pagination-text">${d(e.pageText??"",{index:C(a+1),total:C(i)})}</div>`}_renderFeatureMenuButton(){let{messages:e,viewModel:t}=this,{featureCount:i,selectedFeatureIndex:a,pendingPromisesCount:s}=t;return n`<calcite-action class="pagination-menu-button" icon=list .label=${e.selectFeature} .loading=${s>0} @click=${this._handlePaginationMenuButton} .text=${d(e.pageText??"",{index:C(a+1),total:C(i)})} text-enabled title=${e.selectFeature??l}></calcite-action>`}_renderPagination(){let{previous:e,next:t}=this.messages;return n`<calcite-action-bar class="pagination-action-bar" expand-disabled layout=horizontal overflow-actions-disabled scale=s><calcite-action-group scale=s><calcite-action class="pagination-previous" icon=chevron-left icon-flip-rtl .label=${e??""} @click=${this._previousFeature} .text=${e??""} title=${e??""??l}></calcite-action><calcite-action icon=chevron-right icon-flip-rtl .label=${t??""} @click=${this._nextFeature} .text=${t??""} title=${t??""??l}></calcite-action></calcite-action-group></calcite-action-bar>`}_renderFeatureMenuItem(e){let{initialDisplayMode:t}=this,{selectedFeatureItem:i,featureItems:a}=this.viewModel,s=e===i,o=a.indexOf(e);return n`<calcite-list-item @blur=${this._removeActiveFeature} @focus=${()=>this._setActiveFeature(o)} @mouseleave=${this._removeActiveFeature} @mouseover=${()=>this._setActiveFeature(o)} .selected=${s} @calciteListItemSelect=${()=>this._selectFeature(o)}><span .innerHTML=${(w.sanitize(e.heading)||this.messages.untitled)??""} slot=content></span>${t==="list"?n`<calcite-icon flip-rtl icon=chevron-right scale=s slot=content-end></calcite-icon>`:null}</calcite-list-item>`}_renderFeatureMenu(){let{messages:e,viewModel:t}=this,i=this._groupResultsByLayer(),a=this.initialDisplayMode==="list"?"none":"single";return t.featureItems.length?n`<calcite-list display-mode=flat .label=${e?.featuresList??""} selection-appearance=icon .selectionMode=${a}>${Array.from(i.keys(),s=>{let o=i.get(s)?.map(h=>this._renderFeatureMenuItem(h)),r=s?s.title??this.messages.untitled:null;return!this.hideFeatureListLayerTitle&&r!==null?$(s??"map-graphics",n`<calcite-list-item-group .heading=${r}>${o}</calcite-list-item-group>`):o})}</calcite-list>`:null}_renderHeaderAction(e){let t=e.title||"";return e.visible?n`<calcite-action .active=${e.type==="toggle"?e.value:!1} .disabled=${e.disabled} .icon=${e.icon??void 0} .indicator=${e.active} .loading=${e.active} @click=${()=>this._triggerAction(e)} slot=header-actions-end .text=${t} title=${t??l}></calcite-action>`:null}_renderHeaderActions(){return this.headerActions.map(e=>this._renderHeaderAction(e)).toArray()}_renderContentFeature(){let{headingLevel:e,hideCloseButton:t,_isCollapsed:i,_collapseEnabled:a,_featureFlowItemSelected:s,featureNavigationTop:o,flowItems:r,initialDisplayMode:h,selectedFeature:g}=this,{active:v}=this.viewModel,u=this._getHeading();if(h==="list"&&!g)return null;let m=r.length===0&&s;return n`<calcite-flow-item class=${M(b({"content-feature":!0,"flow-item-collapsed":i}))} .closable=${!t} .closed=${!v} .collapsed=${i} .collapseDirection=${o?"down":"up"} .collapsible=${a} .headingLevel=${e} .selected=${m} @calciteFlowItemBack=${this._handleFeatureBack} .loading=${!!this._openRelatedFeatureAbortController} @calciteFlowItemClose=${this._handleClose} @calciteFlowItemToggle=${this._handleCollapseToggle} .heading=${x(u)} ${p(this._rootFlowItemNode)}><div slot=heading .innerHTML=${w.sanitize(u??"")??""}></div>${this._renderHeaderActions()}${this._renderActionBar()}<div class=${M(b("container","content-container"))}>${this._renderContent()}</div>${this._renderFooter()}</calcite-flow-item>`}_renderFeatureMenuContainer(){let{viewModel:e,hideCloseButton:t,featureMenuTitle:i,messages:a,initialDisplayMode:s,featureMenuOpen:o,_featureFlowItemSelected:r,_collapseEnabled:h,_isCollapsed:g,featureNavigationTop:v,headingLevel:u}=this,{active:m,featureItems:I,pendingPromisesCount:y}=e,Z=i??a.selectFeature;if(s==="feature"&&!o)return null;let j=!r;return n`<calcite-flow-item class=${M(b({"flow-item-collapsed":g}))} .closable=${s==="list"&&!t} .closed=${!m} .collapsed=${s==="list"&&g} .collapseDirection=${v?"down":"up"} .collapsible=${s==="list"&&h} .description=${this.hideFeatureMenuHeading?void 0:d(a.total??"",{total:I.length})} .heading=${this.hideFeatureMenuHeading?void 0:Z} .headingLevel=${u} .loading=${e.waitingForContents} .selected=${j} @calciteFlowItemBack=${K=>{K.preventDefault(),this._handleFeatureMenuBack()}} @calciteFlowItemClose=${this._handleClose} @calciteFlowItemToggle=${this._handleCollapseToggle} ${p(this._featureMenuViewportNode)}>${s==="list"?this._renderHeaderActions():null}${y>0?n`<calcite-loader class="loader" inline .label=${a.loading??""} slot=header-actions-end></calcite-loader>`:null}<div class="container">${this._renderFeatureMenu()}</div><div class="feature-menu-observer" ${p(this._featureMenuIntersectionObserverCreated)}></div>${s==="feature"?n`<calcite-button appearance=transparent @click=${this._handleFeatureMenuBack} slot=footer-start width=full>${a.back}</calcite-button>`:null}</calcite-flow-item>`}_renderFlowItem(e,t){let{messages:i,hideCloseButton:a,hideSelectFeature:s,active:o}=this,r="graphic"in e&&"isFeatureFromTable"in e&&!e.isFeatureFromTable,h=r&&!s,g=e.flowType==="feature-association",v=i.returnToInitialFeature??"",u=i?.selectFeature,m=this._getActionTitle(_),I=!this.hideActionBar&&g&&r;return n`<calcite-flow-item .closable=${!a} .closed=${!o} .description=${x(this._getDrillInFlowItemDescription(e)??"")} .heading=${this.hideHeading?void 0:x(e.heading??"")} .selected=${t} @calciteFlowItemBack=${y=>{y.preventDefault(),this._handleDrillInBackClick()}} .loading=${!!this._openRelatedFeatureAbortController} @calciteFlowItemClose=${this._handleClose}>${this.hideHeading?null:n`<div slot=heading .innerHTML=${w.sanitize(e.heading??"")??""}></div>`}<div slot=description .innerHTML=${w.sanitize(this._getDrillInFlowItemDescription(e)??"")??""}></div><calcite-action class="action-exit" icon=move-up @click=${this._removeFlowItems} slot=header-actions-start .text=${v??""} title=${v??""??l}></calcite-action>${h?n`<calcite-action icon=zoom-to-object @click=${()=>this._openRelatedFeature(e)} slot=header-actions-end .text=${u??""} title=${u??l}></calcite-action>`:null}${I?n`<calcite-action-bar expand-disabled expanded scale=s slot=action-bar><calcite-action-group overlay-positioning=fixed scale=s><calcite-action .disabled=${_.disabled} .icon=${_.icon??void 0} .loading=${_.active} scale=s text-enabled .text=${m} title=${m??l} @click=${()=>z(this.viewModel,e)}></calcite-action></calcite-action-group></calcite-action-bar>`:null}<div class="container">${e}</div></calcite-flow-item>`}_renderContentContainer(){let e=this.flowItems?.toArray(),t=e?.map((a,s)=>this._renderFlowItem(a,this._featureFlowItemSelected&&s===e.length-1)),i=this.initialDisplayMode==="list"?[this._renderFeatureMenuContainer(),this._renderContentFeature(),t]:[this._renderContentFeature(),t,this._renderFeatureMenuContainer()];return n`<calcite-flow ${p(this._flowContainerNode)}>${i}</calcite-flow>`}_renderActionBar(){let e=this.viewModel.selectedFeatureItem?.isFeatureFromTable&&!this.location?this.viewModel.allActions.filter(t=>t.id!==_.id):this.viewModel.allActions;return!this._isCollapsed&&!this.hideActionBar&&e.length?n`<calcite-action-bar expand-disabled .expanded=${!this._hideActionText} scale=s slot=action-bar><calcite-action-group overlay-positioning=fixed scale=s ${p(this._actionBarMenuNode)}>${this._renderActions()}</calcite-action-group></calcite-action-bar>`:null}_renderActions(){return this.viewModel.allActions.toArray().map(e=>{let t=this._getActionTitle(e);return n`<calcite-action .active=${e.type==="toggle"?e.value:!1} .disabled=${e.disabled} .icon=${e.icon??void 0} .loading=${e.active} scale=s .textEnabled=${!this._hideActionText} .text=${t??""} title=${t??l} .hidden=${!e.visible} @click=${()=>this._triggerAction(e)}></calcite-action>`})}_renderContent(){let{content:e,selectedFeatureItem:t}=this.viewModel;return t?$(t,n`<arcgis-feature .autoDestroyDisabled=${this.autoDestroyDisabled} .chartAnimationDisabled=${this.chartAnimationDisabled} .defaultPopupTemplateEnabled=${this.defaultPopupTemplateEnabled} .flowItems=${this.flowItems} .graphic=${t.graphic} .headingLevel=${this.headingLevel+1} .hideAttachmentsContent=${this.hideAttachmentsContent} .hideContent=${this.hideContent} .hideCustomContent=${this.hideCustomContent} .hideExpressionContent=${this.hideExpressionContent} .hideFieldsContent=${this.hideFieldsContent} hide-heading .hideLastEditedInfo=${this.hideLastEditedInfo} .hideMediaContent=${this.hideMediaContent} .hideTextContent=${this.hideTextContent} .location=${this.location} .map=${this.map} .referenceElement=${this.referenceElement} .showRelationshipContent=${!this.hideRelationshipContent} .showUtilityNetworkContent=${!this.hideUtilityNetworkContent} .spatialReference=${this.spatialReference} .timeZone=${this.timeZone} ${p(this._selectedFeatureComponent)}></arcgis-feature>`):typeof e=="string"?$(e,n`<div .innerHTML=${w.sanitize(e)??""}></div>`):e??null}};O("arcgis-features",T);return T},"popup/Features","intl","core/reactiveUtils","applications/Components/stringUtils","core/Collection","applications/Components/sanitizerUtils","applications/Components/featureUtils",a,c,d,e,g,h,i,j)
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
+
import b from"./BH32Z76H.js";import a from"./R3NYK6BO.js";import{a as j}from"./N7VR7H4O.js";import{d as D,e as O}from"./X4K6UDSU.js";import"./HWEEHWOD.js";import{f as H}from"./L5MVC2NA.js";import{N as P,O as U,R as M,U as B,a as E,b as I}from"./GRYRJF75.js";import"./3TTFCHAA.js";export default $arcgis.t(([{getColorsFromRenderer:re},{substitute:ne},{watch:se},oe,J,{renderingSanitizer:Q},,{e:C,f:G,g:V,h:K,i:W,j:q,l:L,n:F,o:k,p:R}])=>{var le=E`.container{display:flex;flex-flow:row wrap;align-items:center;margin-top:var(--calcite-spacing-xs);width:100%;min-height:150px}.container .pagination-button{display:flex;align-items:center;justify-content:center;border:none;background:transparent;cursor:pointer;padding-block:var(--calcite-spacing-xs);padding-inline:var(--calcite-spacing-xs);color:var(--calcite-color-text-3)}.container .pagination-button:hover,.container .pagination-button:focus{background-color:var(--calcite-color-foreground-3);color:var(--calcite-color-text-1);fill:var(--calcite-color-text-1)}.item-title{margin:0;font-size:var(--calcite-font-size-md);line-height:var(--calcite-font-line-height-relative-snug)}.item-caption{padding-block-start:var(--calcite-spacing-xxs);font-size:var(--calcite-font-size-sm);line-height:var(--calcite-font-line-height-relative-snug)}.item{display:flex;align-items:flex-start;justify-content:center;margin-block:var(--calcite-spacing-xs);width:100%;height:auto}.item-navigation{display:flex;flex:0 1 100%;align-items:flex-start;justify-content:space-between;margin-block-end:var(--calcite-spacing-xs)}.item-text{margin-inline-end:var(--calcite-spacing-xs)}.pagination{display:flex;flex:0 0 auto;align-items:center;overflow:hidden}.pagination:only-child{margin-inline-start:auto}.pagination-text{padding-inline:var(--calcite-spacing-xxs);color:var(--calcite-color-text-3);font-size:var(--calcite-font-size-sm);line-height:var(--calcite-font-line-height-relative-normal)}.item-container{flex:0 1 auto;width:100%}.item-container img{max-width:100%}.item-container img[src$=".SVG"],.item-container img[src$=".svg"]{width:100%}.chart{width:100%;height:155px}`;function z(S){if(!C(S))return null;let[e,t]=S.split("/").slice(1);return{layerId:e,fieldName:t}}var X=15,w="category",A="value",ce="rgba(50, 50, 50, 1)",de=250,he=500,ue=200,N=class extends U{constructor(){super(...arguments),this._direction=O(),this._prefersReducedMotion=D("(prefers-reduced-motion)"),this.activeMediaInfoIndex=0,this.chartAnimationDisabled=!1,this.headingLevel=2}static{this.properties={_refreshIntervalInfo:16,messages:0,values:0,expressionValues:0,activeMediaInfoIndex:9,chartAnimationDisabled:5,activeMediaInfo:32,formattedMediaInfos:32,description:1,fieldInfoMap:0,layer:0,mediaInfos:0,popupTemplate:0,relatedInfos:0,formattedValues:0,heading:1,graphic:0,formattedMediaInfoCount:32,headingLevel:9}}static{this.styles=le}get activeMediaInfo(){return this.formattedMediaInfos[this.activeMediaInfoIndex]||null}get formattedMediaInfos(){return this._formatMediaInfos()||[]}get formattedMediaInfoCount(){return this.formattedMediaInfos.length}next(){this._pageContentElementMedia(1)}previous(){this._pageContentElementMedia(-1)}setActiveMedia(e){this._setContentElementMedia(e)}loaded(){this.manager.onLifecycle(()=>[se(()=>[this.activeMediaInfo,this.activeMediaInfoIndex],()=>this._setupMediaRefreshTimer(),{initial:!0}),{remove:()=>this._clearMediaRefreshTimer()}])}_setContentElementMedia(e){let{formattedMediaInfoCount:t}=this,i=(e+t)%t;this.activeMediaInfoIndex=i}_pageContentElementMedia(e){let{activeMediaInfoIndex:t}=this,i=t+e;this._setContentElementMedia(i)}_formatMediaInfos(){let{mediaInfos:e,layer:t}=this,i=this.values??{},a=this.formattedValues??{},s=this.fieldInfoMap??new Map,r=this.expressionValues??{};return e?.map(o=>{let n=o?.clone();if(!n)return null;if(n.title=R({values:i,fieldInfoMap:s,globalValues:a,layer:t,text:n.title}),n.caption=R({values:i,fieldInfoMap:s,globalValues:a,layer:t,text:n.caption}),n.altText=R({values:i,fieldInfoMap:s,globalValues:a,layer:t,text:n.altText}),n.type==="image"){if(!n.value)return null;let l=n.value;return this._setImageValue({value:l,formattedValues:a,layer:t}),l.sourceURL?n:void 0}if(n.type==="pie-chart"||n.type==="line-chart"||n.type==="column-chart"||n.type==="bar-chart"){if(!n.value)return null;let l=n.value;return this._setChartValue({value:l,chartType:n.type,values:i,expressionValues:r,formattedValues:a,layer:t}),n}return null}).filter(o=>o!=null)??[]}_setImageValue(e){let t=this.fieldInfoMap??new Map,{value:i,formattedValues:a,layer:s}=e,{linkURL:r,sourceURL:o}=i;if(o){let n=k(o,s);i.sourceURL=F({formattedValues:a,template:n,fieldInfoMap:t})}if(r){let n=k(r,s);i.linkURL=F({formattedValues:a,template:n,fieldInfoMap:t})}}_setChartValue(e){let{value:t,values:i,expressionValues:a,formattedValues:s,chartType:r,layer:o}=e,{popupTemplate:n,relatedInfos:l}=this,{fields:p,normalizeField:d}=t,c=o;if(t.fields=K(p,c),d&&(t.normalizeField=V(d,c)),!p.some(u=>!!(s[u]!=null||C(u)&&l?.size)))return;let m=n?.fieldInfos??[];t.series=[],p.forEach((u,g)=>{let h=t.colors?.[g];if(C(u)){t.series=[...t.series,...this._getRelatedChartInfos({fieldInfos:m,fieldName:u,formattedValues:s,expressionValues:a,chartType:r,value:t,color:h})];return}let v=this._getChartOption({value:t,values:i,chartType:r,formattedValues:s,expressionValues:a,fieldName:u,fieldInfos:m,color:h});t.series.push(v)})}_getRelatedChartInfos(e){let{fieldInfos:t,fieldName:i,formattedValues:a,chartType:s,value:r,color:o,expressionValues:n}=e,l=[],p=z(i),d=p&&this.relatedInfos?.get(p.layerId);if(!d)return l;let{relatedFeatures:c,relation:m}=d;if(!m||!c)return l;let{cardinality:u}=m;return c.forEach(g=>{let h=g.attributes;h&&Object.keys(h).forEach(v=>{v===p.fieldName&&l.push(this._getChartOption({value:r,values:h,formattedValues:a,expressionValues:n,fieldName:i,chartType:s,relatedFieldName:v,hasMultipleRelatedFeatures:c?.length>1,fieldInfos:t,color:o}))})}),u&&(u==="one-to-many"||u==="many-to-many")?l:[l[0]]}_getTooltip({label:e,value:t,chartType:i}){return i==="pie-chart"?`${e}`:`${e}: ${t}`}_getChartOption(e){let{value:t,values:i,formattedValues:a,expressionValues:s,fieldName:r,relatedFieldName:o,fieldInfos:n,chartType:l,hasMultipleRelatedFeatures:p,color:d}=e,{layer:c,graphic:m}=this,u=this.fieldInfoMap??new Map,{normalizeField:g,tooltipField:h}=t,v=g?C(g)?i[z(g).fieldName]:i[g]:null,x=W(r)&&s?.[r]!==void 0?s[r]:o&&i[o]!==void 0?i[o]:i[r]!==void 0?i[r]:a[r],_=x===void 0?null:x&&v&&typeof x=="number"&&typeof v=="number"?x/v:x,f=q(n,r),y=V(r,c),b=(h&&a[h]!==void 0?a[h]:L({fieldInfo:f||new oe({fieldName:y}),expressionInfos:this.popupTemplate?.expressionInfos,graphic:m,layer:c}))??"",Z=a[y]??"",Y=_!=null?typeof _=="number"?_:Number(_):null;if(C(r)){let T=u.get(r.toLowerCase()),ee=h?u.get(h.toLowerCase()):null,te=T?.fieldName??r,$=p&&h?z(h).fieldName:ee?.fieldName??h,ie=(p&&$?i[$]:a[$]??(T&&L({fieldInfo:T,layer:c,graphic:m}))??T?.fieldName??o)??"",ae=(p&&o?i[o]:a[te])??"";return new J({fieldName:r,tooltip:this._getTooltip({label:ie,value:ae,chartType:l}),color:d,value:Y})}return new J({fieldName:r,tooltip:this._getTooltip({label:b,value:Z,chartType:l}),color:d,value:Y})}_getRenderer(){let e=this.layer;return this.graphic?.isAggregate&&e?.featureReduction&&"renderer"in e.featureReduction?e.featureReduction.renderer:e?.renderer}async _getSeriesColors(e){let{color:t}=await import("./KUHHYT6E.js"),i=new Map;return e.forEach(a=>{a.color&&i.set(a,t(a.color.toCss(!0)))}),i}async _getRendererColors(){let{color:e}=await import("./KUHHYT6E.js"),t=new Map,i=this._getRenderer(),a="default";if(!i)return t;let s=await re(i);return s.delete(a),Array.from(s.values()).every(r=>r?.length===1)&&Array.from(s.keys()).forEach(r=>{let o=s.get(r)?.[0]?.toCss(!0);o&&t.set(r,e(o))}),t}async _createChart(e){let{activeMediaInfo:t}=this;if(!e||!t)return;let{createRoot:i}=await import("./NYFOMOKM.js").then(m=>m.default.then(e=>({createRoot:e}))),a=await i(e);this._chartRoot=a,this._renderChart({mediaInfo:t,root:a})}_handleMediaKeyup(e){let{key:t}=e;t==="ArrowLeft"&&(e.stopPropagation(),this.previous()),t==="ArrowRight"&&(e.stopPropagation(),this.next())}_canAnimateChart(){return!this.chartAnimationDisabled&&!this._prefersReducedMotion}_getChartAnimationMS(){return this._canAnimateChart()?de:0}_getChartSeriesAnimationMS(){return this._canAnimateChart()?he:0}async _customizeChartTooltip(e,t="horizontal"){let{color:i}=await import("./KUHHYT6E.js");e.setAll({pointerOrientation:t}),e.get("background")?.setAll({stroke:i(ce)}),e.label.setAll({direction:this._direction,oversizedBehavior:"wrap",maxWidth:ue})}async _createPieChart(e,t){let[{Tooltip:i},{PieChart:a,PieSeries:s}]=await Promise.all([import("./KUHHYT6E.js"),import("./6L32XZYR.js")]),{mediaInfo:r,root:o}=e,{title:n}=r,l=5,p=r?.altText||r?.title||"",d=o.container.children.push(a.new(o,{role:"figure",ariaLabel:p,focusable:!0,paddingBottom:l,paddingTop:l,paddingLeft:l,paddingRight:l})),c=`{category}: {valuePercentTotal.formatNumber('0.00')}%
|
|
3
|
+
({value})`,m=i.new(o,{labelText:c}),u=d.series.push(s.new(o,{name:n,valueField:A,categoryField:w,tooltip:m}));u.ticks.template.set("forceHidden",!0),u.labels.template.set("forceHidden",!0),u.slices.template.states.create("active",{shiftRadius:l}),this._customizeChartTooltip(m),u.slices.template.setAll({ariaLabel:c,focusable:!0,templateField:"columnSettings"}),u.data.setAll(t),u.appear(this._getChartSeriesAnimationMS()),d.appear(this._getChartAnimationMS()),d.root.dom.classList.toggle("chart-rendered",!0)}_getMinSeriesValue(e){let t=0;return e.forEach(i=>t=Math.min(i.value,t)),t}async _createColumnChart(e,t,i){let[{Tooltip:a,Scrollbar:s},{CategoryAxis:r,AxisRendererX:o,AxisRendererY:n,ValueAxis:l,ColumnSeries:p}]=await Promise.all([import("./KUHHYT6E.js"),import("./OU4GNV5Y.js")]),{mediaInfo:d,root:c}=t,{value:m,title:u}=d,{_direction:g}=this;e.setAll({wheelX:"panX",wheelY:"zoomX"});let h=e.xAxes.push(r.new(c,{renderer:o.new(c,{inversed:g==="rtl"}),categoryField:w}));h.get("renderer").labels.template.setAll({forceHidden:!0});let v=e.yAxes.push(l.new(c,{renderer:n.new(c,{inside:!1}),min:this._getMinSeriesValue(m.series)}));v.get("renderer").labels.template.setAll({direction:g});let x="{categoryX}",_=a.new(c,{labelText:x}),f=e.series.push(p.new(c,{name:u,xAxis:h,yAxis:v,valueYField:A,categoryXField:w,tooltip:_}));this._customizeChartTooltip(_),f.columns.template.setAll({ariaLabel:x,focusable:!0,templateField:"columnSettings"}),m.series.length>X&&e.set("scrollbarX",s.new(c,{orientation:"horizontal"})),h.data.setAll(i),f.data.setAll(i),f.appear(this._getChartSeriesAnimationMS()),e.appear(this._getChartAnimationMS())}async _createBarChart(e,t,i){let[{Tooltip:a,Scrollbar:s},{CategoryAxis:r,AxisRendererX:o,AxisRendererY:n,ValueAxis:l,ColumnSeries:p}]=await Promise.all([import("./KUHHYT6E.js"),import("./OU4GNV5Y.js")]),{mediaInfo:d,root:c}=t,{value:m,title:u}=d,{_direction:g}=this;e.setAll({wheelX:"panY",wheelY:"zoomY"});let h=e.yAxes.push(r.new(c,{renderer:n.new(c,{inversed:!0}),categoryField:w}));h.get("renderer").labels.template.setAll({forceHidden:!0});let v=e.xAxes.push(l.new(c,{renderer:o.new(c,{inside:!1,inversed:g==="rtl"}),min:this._getMinSeriesValue(m.series)}));v.get("renderer").labels.template.setAll({direction:g});let x="{categoryY}",_=a.new(c,{labelText:x}),f=e.series.push(p.new(c,{name:u,xAxis:v,yAxis:h,valueXField:A,categoryYField:w,tooltip:_}));this._customizeChartTooltip(_,"vertical"),f.columns.template.setAll({ariaLabel:x,focusable:!0,templateField:"columnSettings"}),m.series.length>X&&e.set("scrollbarY",s.new(c,{orientation:"vertical"})),h.data.setAll(i),f.data.setAll(i),f.appear(this._getChartSeriesAnimationMS()),e.appear(this._getChartAnimationMS())}async _createLineChart(e,t,i){let[{Tooltip:a,Scrollbar:s},{CategoryAxis:r,AxisRendererX:o,AxisRendererY:n,ValueAxis:l,LineSeries:p}]=await Promise.all([import("./KUHHYT6E.js"),import("./OU4GNV5Y.js")]),{root:d,mediaInfo:c}=t,{value:m,title:u}=c,{_direction:g}=this;e.setAll({wheelX:"panX",wheelY:"zoomX"});let h=e.xAxes.push(r.new(d,{renderer:o.new(d,{inversed:g==="rtl"}),categoryField:w}));h.get("renderer").labels.template.setAll({forceHidden:!0});let v=e.yAxes.push(l.new(d,{renderer:n.new(d,{inside:!1}),min:this._getMinSeriesValue(m.series)}));v.get("renderer").labels.template.setAll({direction:g});let x="{categoryX}",_=i[0]?.lineSettings?.stroke,f=a.new(d,{getFillFromSprite:!_,labelText:x});_&&f.get("background")?.setAll({fill:_});let y=e.series.push(p.new(d,{name:u,xAxis:h,yAxis:v,valueYField:A,categoryXField:w,tooltip:f}));y.strokes.template.setAll({templateField:"lineSettings"}),this._customizeChartTooltip(f,"vertical"),m.series.length>X&&e.set("scrollbarX",s.new(d,{orientation:"horizontal"})),h.data.setAll(i),y.data.setAll(i),y.appear(this._getChartSeriesAnimationMS()),e.appear(this._getChartAnimationMS())}async _createXYChart(e,t){let{XYChart:i,XYCursor:a}=await import("./OU4GNV5Y.js"),{root:s,mediaInfo:r}=e,{type:o}=r,n=r?.altText||r?.title||"",l=s.container.children.push(i.new(s,{role:"figure",ariaLabel:n,focusable:!0,panX:!0,panY:!0}));l.set("cursor",a.new(s,{})),o==="column-chart"&&await this._createColumnChart(l,e,t),o==="bar-chart"&&await this._createBarChart(l,e,t),o==="line-chart"&&await this._createLineChart(l,e,t),l.root.dom.classList.toggle("chart-rendered",!0)}_clearMediaRefreshTimer(){let{_refreshTimer:e}=this;e&&(clearTimeout(e),this._refreshTimer=void 0)}_updateMediaInfoTimestamp(e){let t=Date.now();this._refreshIntervalInfo={timestamp:t,sourceURL:e&&this._getImageSource(e,t)}}_setupMediaRefreshTimer(){this._clearMediaRefreshTimer();let{activeMediaInfo:e}=this;e?.type==="image"&&e.refreshInterval>0&&this._setRefreshTimeout(e)}_setRefreshTimeout(e){let{refreshInterval:t,value:i}=e,a=t*6e4;this._updateMediaInfoTimestamp(i.sourceURL);let s=window.setInterval(()=>{this._updateMediaInfoTimestamp(i.sourceURL)},a);this._refreshTimer=s}_getImageSource(e,t){let i=e.includes("?")?"&":"?",[a,s=""]=e.split("#");return`${a}${i}timestamp=${t}${s?"#":""}${s}`}_updateChartElement(e){this._chartRoot?.dispose(),this._chartRoot=void 0,e&&this._createChart(e)}render(){return I`<div class="root" @keyup=${this._handleMediaKeyup}><arcgis-feature-element-info .heading=${this.heading} .description=${this.description} .headingLevel=${this.headingLevel}></arcgis-feature-element-info>${this._renderMedia()}</div>`}_renderMedia(){let{formattedMediaInfoCount:e,activeMediaInfoIndex:t}=this,i=this._renderMediaText();return e?I`<div class="container">${this._renderMediaInfo()}<div class="item-navigation">${i}${e>1?I`<div class="pagination">${this._renderMediaPageButton("previous")}<span class="pagination-text">${ne(this.messages?.pageText??"",{index:t+1,total:e})}</span>${this._renderMediaPageButton("next")}</div>`:null}</div></div>`:null}_renderMediaText(){let{activeMediaInfo:e}=this;if(!e)return null;let t=e?.title?I`<div class="item-title" .innerHTML=${Q.sanitize(e.title)??""}></div>`:null,i=e?.caption?I`<div class="item-caption" .innerHTML=${Q.sanitize(e.caption)??""}></div>`:null;return t||i?I`<div class="item-text">${t}${i}</div>`:null}_renderImageMediaInfo(e){if(!e.value)return null;let{_refreshIntervalInfo:t}=this,{value:i,refreshInterval:a,altText:s,title:r}=e,{sourceURL:o,linkURL:n}=i,l=G(n??void 0)?"_blank":"_self",p=l==="_blank"?"noreferrer":"",d=a?t:null,c=d?d.sourceURL:o,m=I`<img alt=${(s||r)??M} src=${c??void 0??M}>`;return(n?I`<a href=${n??M} rel=${p??M} target=${l??M} title=${r??M}>${m}</a>`:null)??m}_renderChartMediaInfo(e){let{activeMediaInfoIndex:t,formattedMediaInfoCount:i}=this;return j(`media-${e.type}-${t}-${i}`,I`<div class="chart" ${P(this._updateChartElement)}></div>`)}_renderMediaInfoType(){let{activeMediaInfo:e}=this;return e?e.type==="image"?this._renderImageMediaInfo(e):e.type.includes("chart")?this._renderChartMediaInfo(e):null:null}_renderMediaInfo(){let{activeMediaInfo:e}=this;return e?I`<div class="item-container"><div class="item">${this._renderMediaInfoType()}</div></div>`:null}_renderMediaPageButton(e){if(this.formattedMediaInfoCount<2)return null;let t=e==="previous",i=t?this.messages?.previous??"":this.messages?.next??"",a=t?"chevron-left":"chevron-right",s=t?this.previous:this.next;return I`<button .ariaLabel=${i} class="pagination-button" @click=${s} tabindex=0 title=${i??M} type=button><calcite-icon flip-rtl class="pagination-icon" .icon=${a} scale=s></calcite-icon></button>`}async _renderChart(e){let{root:t,mediaInfo:i}=e,{value:a,type:s}=i,[{default:r},{default:o},{default:n},{esriChartColorSet:l},{ColorSet:p,Theme:d}]=await Promise.all([import("./A22L5XP5.js"),import("./ONHQ3PYJ.js"),import("./2MYNJXEY.js"),import("./NBMOR3C3.js"),import("./KUHHYT6E.js")]),c=d.new(t);c.rule("ColorSet").set("colors",l),c.rule("ColorSet").set("reuse",!0);let m=[n.new(t),c];H(this.el)==="dark"&&m.push(o.new(t)),this._canAnimateChart()&&m.push(r.new(t)),t.setThemes(m);let u=await this._getRendererColors(),g=await this._getSeriesColors(a.series),h=p.new(t,{}),v=g.get(a.series[0]),x=v?{lineSettings:{stroke:v}}:void 0,_=a.series.map((f,y)=>{let b=g.get(f)||u.get(f.fieldName)||h.getIndex(y);return{[w]:f.tooltip,[A]:f.value,columnSettings:{fill:b,stroke:b},...x}}).filter(f=>s==="pie-chart"?f.value!=null&&f.value>0:!0);s==="pie-chart"?this._createPieChart(e,_):this._createXYChart(e,_)}};B("arcgis-feature-media",N);return N},"renderers/support/utils","intl","core/reactiveUtils","popup/FieldInfo","popup/content/support/ChartMediaInfoValueSeries","applications/Components/sanitizerUtils",a,b)
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import g from"./
|
|
2
|
+
import g from"./XOTOQOK6.js";import{a as b}from"./YFXHW7I2.js";import{a as c}from"./CUYGLJRU.js";import{a as f}from"./FL6CHMPH.js";import e from"./6UX4Z6VU.js";import"./X4K6UDSU.js";import"./HWEEHWOD.js";import d from"./BAJLAC4A.js";import"./L5MVC2NA.js";import{M as n,N as o,O as l,P as h,U as p,b as a,x as r}from"./GRYRJF75.js";import"./3TTFCHAA.js";export default $arcgis.t(([A,{watch:s},P,D,R,{c:u,d:g,e:d,f:y},{a:t,b:w,f:v},{a:V,b:_,c:C}])=>{var I=w(R,{}),M=w(D,{}),m=class extends l{constructor(){super(),this._containerRef=n(),this._mapRef=n(),this._uiController=new V(this),this._cameraProperties={},this.arcgisLoadError=_(this),this.arcgisViewReadyError=C(this),this._map=I(this),this.view=M(this),this.allLayerViews=this.view.allLayerViews,this.alphaCompositingEnabled=this.view.alphaCompositingEnabled,this.analyses=this.view.analyses,this.animationsDisabled=this.view.animationsEnabled,this.attributionMode=this.view.attributionMode,this.autoDestroyDisabled=!1,this.basemap=this._map.basemap,this.basemapView=this.view.basemapView,this.canZoomIn=this.view.canZoomIn,this.canZoomOut=this.view.canZoomOut,this.clippingArea=this.view.clippingArea,this.constraints=this.view.constraints,this.displayFilterDisabled=this.view.displayFilterEnabled,this.environment=this.view.environment,this.fatalError=this.view.fatalError,this.floors=this.view.floors,this.graphics=this.view.graphics,this.ground=this._map.ground,this.groundView=this.view.groundView,this.highlights=this.view.highlights,this.layerViews=this.view.layerViews,this.magnifier=this.view.magnifier,this.map=this.view.map,this.navigation=this.view.navigation,this.padding=this.view.padding,this.popup=this.view.popup,this.popupDisabled=this.view.popupEnabled,this.popupComponentEnabled=!1,this.qualityProfile=this.view.qualityProfile,this.ready=this.view.ready,this.selectionManager=this.view.selectionManager,this.slotGroupRefs=this._uiController.slotGroupRefs,this.spatialReference=this.view.spatialReference,this.suspended=this.view.suspended,this.theme=this.view.theme,this.timeExtent=this.view.timeExtent,this.updating=this.view.updating,this.viewingMode=this.view.viewingMode,this.visibleArea=this.view.visibleArea,this.arcgisViewAnalysisViewCreate=t(()=>this.view,"analysis-view-create"),this.arcgisViewAnalysisViewCreateError=t(()=>this.view,"analysis-view-create-error"),this.arcgisViewAnalysisViewDestroy=t(()=>this.view,"analysis-view-destroy"),this.arcgisViewChange=r(),this.arcgisViewClick=t(()=>this.view,"click"),this.arcgisViewDoubleClick=t(()=>this.view,"double-click"),this.arcgisViewDoubleTapDrag=t(()=>this.view,"double-tap-drag"),this.arcgisViewDrag=t(()=>this.view,"drag"),this.arcgisViewHold=t(()=>this.view,"hold"),this.arcgisViewImmediateClick=t(()=>this.view,"immediate-click"),this.arcgisViewImmediateDoubleClick=t(()=>this.view,"immediate-double-click"),this.arcgisViewKeyDown=t(()=>this.view,"key-down"),this.arcgisViewKeyUp=t(()=>this.view,"key-up"),this.arcgisViewLayerviewCreate=t(()=>this.view,"layerview-create"),this.arcgisViewLayerviewCreateError=t(()=>this.view,"layerview-create-error"),this.arcgisViewLayerviewDestroy=t(()=>this.view,"layerview-destroy"),this.arcgisViewMouseWheel=t(()=>this.view,"mouse-wheel"),this.arcgisViewPointerDown=t(()=>this.view,"pointer-down"),this.arcgisViewPointerEnter=t(()=>this.view,"pointer-enter"),this.arcgisViewPointerLeave=t(()=>this.view,"pointer-leave"),this.arcgisViewPointerMove=t(()=>this.view,"pointer-move"),this.arcgisViewPointerUp=t(()=>this.view,"pointer-up"),this.arcgisViewReadyChange=r(),this.arcgisViewVerticalTwoFingerDrag=t(()=>this.view,"vertical-two-finger-drag"),this.view.ui={components:[]}}static{this.properties={_map:16,aria:0,view:32,allLayerViews:32,alphaCompositingEnabled:5,analyses:0,animationsDisabled:5,attributionItems:32,attributionMode:1,autoDestroyDisabled:5,basemap:1,basemapView:0,camera:0,cameraFov:9,cameraHeading:9,cameraPosition:1,cameraTilt:9,canZoomIn:36,canZoomOut:36,center:1,clippingArea:0,constraints:0,displayFilterDisabled:5,environment:0,extent:0,fatalError:0,floors:0,focusAreas:0,gamepad:32,graphics:0,ground:1,groundView:32,hideAttribution:5,highlights:0,interacting:32,itemId:3,layerViews:32,magnifier:32,map:0,navigating:32,navigation:0,padding:0,performanceInfo:32,popup:0,popupElement:32,popupDisabled:5,popupComponentEnabled:5,qualityProfile:1,ready:36,resolution:32,selectionManager:32,scale:9,slotGroupRefs:32,spatialReference:0,stationary:32,suspended:39,theme:0,timeExtent:0,updating:36,viewingMode:1,viewpoint:0,visibleArea:32,zoom:9,loadErrorSources:0}}static{this.styles=[f,b]}get aria(){return this.view?.aria??null}set aria(i){this.view&&(this.view.aria=i)}get attributionItems(){return this.view?.attributionItems??[]}get camera(){return this.view.camera}set camera(i){u(this.camera,i)||(this.view.camera=i)}get cameraFov(){let{view:i}=this;return i.ready?this.view.camera?.fov:this._cameraProperties.fov}set cameraFov(i){i!=null&&this._mutateCamera(e=>{e.fov=i})}get cameraHeading(){let{view:i}=this;return i.ready?i.camera?.heading:this._cameraProperties.heading}set cameraHeading(i){i!=null&&this._mutateCamera(e=>{e.heading=i})}get cameraPosition(){let{view:i}=this;if(i.ready)return i.camera?.position;let{position:e}=this._cameraProperties;return e?new P(e):void 0}set cameraPosition(i){let e=y(this.view.camera?.position,i);e&&this._mutateCamera(E=>{E.position=e})}get cameraTilt(){let{view:i}=this;return i.ready?i.camera?.tilt:this._cameraProperties.tilt}set cameraTilt(i){i!=null&&this._mutateCamera(e=>{e.tilt=i})}get center(){return this.view.center}set center(i){let e=d(i,this.view);e&&(this.view.center=e)}get extent(){return this.view.extent}set extent(i){i&&!this.extent.equals(i)&&(this.view.extent=i)}get focusAreas(){return this.map?this.map?.focusAreas:{areas:[],style:"bright"}}set focusAreas(i){this.map&&(this.map.focusAreas=i)}get gamepad(){return this.view.input.gamepad}get hideAttribution(){return!this.view.attributionVisible}set hideAttribution(i){this.view.attributionVisible=!i}get interacting(){return this.view.interacting}get itemId(){return this._map.portalItem?.id}set itemId(i){v(this._map,this),this._map.portalItem={id:i},this.view.map=this._map}get navigating(){return this.view.navigating}get performanceInfo(){return this.view.performanceInfo}get popupElement(){return this._uiController.popupElement||null}get resolution(){return this.view.resolution}get scale(){return this.view.scale}set scale(i){this.view.scale=i}get stationary(){return this.view.stationary}get viewpoint(){return this.view.viewpoint}set viewpoint(i){g(this.viewpoint,i)&&(this.view.viewpoint=i)}get zoom(){return this.view.zoom}set zoom(i){this.view.zoom=i}async closePopup(){this._uiController.closePopup()}async destroy(){await this.manager.destroy()}async goTo(i,e){return await this.view.goTo(i,e)}async hitTest(i,e){return await this.view.hitTest(i,e)}async openPopup(i){this._uiController.openPopup(i)}async takeScreenshot(i){return await this.view.takeScreenshot(i)}toMap(i,e){return this.view.toMap(i,e)}toScreen(i){return this.view.toScreen(i)}async tryFatalErrorRecovery(){this.view.tryFatalErrorRecovery()}async viewOnReady(i,e){return await this.componentOnReady(),await this.view.whenReady().then(()=>i?.()).catch(e)}async whenAnalysisView(i){return await this.view.whenAnalysisView(i)}async whenLayerView(i){return await this.view.whenLayerView(i)}async zoomIn(){this.view.zoomIn()}async zoomOut(){this.view.zoomOut()}loaded(){let i=this;i.el.childElem=this._mapRef.value,this.view.container??=i.el.childElem,this.map||=this._map,this.manager.onLifecycle(()=>[s(()=>this.map,e=>{e&&(this._map=e)},{initial:!0,sync:!0}),s(()=>this.view.stationary,()=>this.arcgisViewChange.emit(),{initial:!0}),s(()=>this.view.ready,e=>{e&&(this.camera=this.view.camera.clone().set(this._cameraProperties),this._cameraProperties={}),this.arcgisViewReadyChange.emit()},{initial:this.view.ready}),s(()=>this.view.attributionHeight,e=>{this._uiController.handleAttributionHeightChange(e)},{initial:!0})])}_mutateCamera(i){if(!this.view.ready){i(this._cameraProperties);return}let e=this.view.camera?.clone()??new A;i(e),this.camera=e}renderMain(){return a`<div class=${h(c.base)} ${o(this._mapRef)}></div>`}render(){return a`${this.renderMain()}<section class=${h(c.containerUI)} ${o(this._containerRef)}>${this._uiController.render()}</section>`}};p("arcgis-scene",m);return m},"Camera","core/reactiveUtils","geometry/Point","views/SceneView","WebScene",d,e,g)
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
+
import{b as m,c as d}from"./YFXHW7I2.js";import{b as s,e as c}from"./X4K6UDSU.js";import{a as u}from"./L5MVC2NA.js";import{M as h,b as a,x as i,z as l}from"./GRYRJF75.js";export default $arcgis.t(([{when:E,watch:f}])=>{var g=class extends l{constructor(o){super(o),this.direction=c(),this.popupRef=h(),this.slotGroupRefs=m(),this.attributionHeight=0,this._uiContainer=null,this.component.listen("arcgisViewClick",t=>{let e=t.detail.native;t.detail.button!==0||e?.ctrlKey||e?.metaKey||this._handleOpenPopup(t.detail)}),this.component.listenOn(globalThis,"unhandledrejection",t=>{let e=t.reason;if(e?.name==="webgl:required"){let{name:p}=e;this.webGLError={name:p}}})}hostLifecycle(){return[E(()=>this.component.view.ready,()=>{this._assignDefaultPopup()}),E(()=>this.component.view.popup?.visible,()=>{this.popupElement?.open&&(this.popupElement.open=!1)})]}async openPopup(o){if(this._assignDefaultPopup(),this.closePopup(),this.popupElement){await this.popupElement.componentOnReady(),this.popupElement.open=!0;let{fetchFeatures:t}=o;delete o.fetchFeatures,Object.assign(this.popupElement,o),t&&this.popupElement.fetchFeatures()}else await this.component.view.openPopup(o)}closePopup(){this.popupElement&&(this.popupElement.open=!1),this.component.view.closePopup()}_assignDefaultPopup(){this.popupRef.value&&!this.popupElement&&(this.popupElement=this.popupRef.value,this.popupElement.referenceElement=this.component.el,this.popupElement.view=this.component.view)}handleAttributionHeightChange(o){if(!(this.attributionHeight===o||!this.component.el.shadowRoot)){if(this.attributionHeight=o,!this._uiContainer){let t=this.component.el.shadowRoot.querySelector(".arcgis-map-container-ui");this._uiContainer=t}this._uiContainer?.style.setProperty("--arcgis-internal-attribution-space-top",`${this.attributionHeight}px`)}}async _handleOpenPopup(o){if(this._assignDefaultPopup(),this.popupElement&&!this.component.popupDisabled){o.stopPropagation();let{location:t,promises:e}=await this.popupElement.handleViewClick(o);e?.length?this.openPopup({location:t,promises:e}):this.popupElement.open&&this.closePopup()}}_handlePopupSlotChange(o){let t=u(o.target,"arcgis-popup");!this.popupElement&&t.length?this.popupElement=t[0]:t.length||(this.popupElement=void 0)}_webGLErrorAlert(){return this.webGLError?a`<arcgis-webgl-error .errorName=${this.webGLError.name}></arcgis-webgl-error>`:null}render(){return d({direction:this.direction,popupComponentEnabled:this.component.popupComponentEnabled,slotGroupRefs:this.slotGroupRefs,handlePopupSlotChange:o=>this._handlePopupSlotChange(o),webGLErrorElement:this._webGLErrorAlert(),popupElement:this.popupRef})}},G=s((n,o)=>{let t=i();return o.onLifecycle(()=>f(()=>{let{map:e}=n;if(!e||e.destroyed)return[];let p=[];return e.loadError&&p.push(e),e.basemap?.loadError&&p.push(e.basemap),e.ground.loadError&&p.push(e.ground),[...e.allLayers,...e.allTables].forEach(r=>{r.loadError&&p.push(r)}),p},e=>{e.length&&(n.loadErrorSources=e,t.emit())})),t}),R=s((n,o)=>{let t=i();return o.onLifecycle(()=>f(()=>n.view?.readyState,e=>{(e==="map-content-error"||e==="rendering-error")&&t.emit()})),t});return{a:g,b:G,c:R}},"core/reactiveUtils")
|