@arcgis/common-components 5.0.0-next.125 → 5.0.0-next.127
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/{KFL2TIFP.js → 2LTYU66A.js} +2 -2
- package/dist/cdn/{WAUMNDLN.js → 7DDRCQNY.js} +2 -2
- package/dist/cdn/{LONFK6F4.js → 7RKSFOWA.js} +1 -1
- package/dist/cdn/{S3P7GTZF.js → D6CPSBFQ.js} +2 -2
- package/dist/cdn/{HU4U7MEH.js → GN37LSAX.js} +2 -2
- package/dist/cdn/{RA4N4CF3.js → GNP3JESU.js} +1 -1
- package/dist/cdn/{Q3VYXBBM.js → H53P62OK.js} +2 -2
- package/dist/cdn/{MV2HPDDI.js → HVP6UWMF.js} +2 -2
- package/dist/cdn/{4CRBTYNF.js → IF2NSVPQ.js} +1 -1
- package/dist/cdn/{T75EYZ5M.js → IIFXPKTC.js} +2 -2
- package/dist/cdn/{BUT6HWCA.js → KLHMVE6R.js} +2 -2
- package/dist/cdn/{YGF5RNPU.js → LV7Y5WXH.js} +2 -2
- package/dist/cdn/{L4YABBBX.js → M6CMPOSQ.js} +2 -2
- package/dist/cdn/{COOUHA4K.js → NNNQII6A.js} +2 -2
- package/dist/cdn/{PAH5NEYW.js → SDJXKVZA.js} +2 -2
- package/dist/cdn/{M5JGIZYS.js → TB4L7OK7.js} +2 -2
- package/dist/cdn/{7Y73AHBR.js → V2KUGXUC.js} +2 -2
- package/dist/cdn/{PD5SNT7N.js → VFE3DVXK.js} +2 -2
- package/dist/cdn/{KEDP2XOF.js → VYBM2FYV.js} +2 -2
- package/dist/cdn/{Q3NZOH23.js → XC57VMCW.js} +1 -1
- package/dist/cdn/{KD2IJTFF.js → YEPOY4UE.js} +123 -123
- package/dist/cdn/ZG65PSAN.js +6 -0
- package/dist/cdn/{FPH7ZJDS.js → ZR4CMZFQ.js} +2 -2
- package/dist/cdn/index.js +2 -2
- package/dist/chunks/commonEnums.js +1 -1
- package/dist/chunks/commonFunctions.js +1 -1
- package/dist/chunks/resources.js +1 -1
- package/dist/chunks/runtime.js +1 -1
- package/dist/chunks/useT9n.js +1 -1
- package/dist/components/arcgis-ckeditor5/customElement.js +7708 -6887
- package/dist/components/arcgis-ckeditor5-popover/customElement.js +1 -1
- package/dist/components/arcgis-color-input/customElement.js +1 -1
- package/dist/components/arcgis-field-info/customElement.js +1 -1
- package/dist/components/arcgis-field-pick-list/customElement.js +1 -1
- package/dist/components/arcgis-histogram/customElement.js +1 -1
- package/dist/components/arcgis-label-input/customElement.js +1 -1
- package/dist/components/arcgis-picker-input/customElement.js +1 -1
- package/dist/components/arcgis-ramp-color/customElement.js +1 -1
- package/dist/components/arcgis-ramp-color-break/customElement.js +1 -1
- package/dist/components/arcgis-ramp-opacity/customElement.js +1 -1
- package/dist/components/arcgis-slider/customElement.js +1 -1
- package/dist/components/arcgis-slider-input/customElement.js +1 -1
- package/dist/components/arcgis-ticks/customElement.js +1 -1
- package/dist/components/arcgis-unique-values-list/customElement.js +1 -1
- package/dist/docs/api.json +2 -2
- package/dist/docs/docs.json +2 -2
- package/dist/docs/web-types.json +1 -1
- package/dist/index.js +1 -1
- package/dist/loader.js +1 -1
- package/package.json +4 -6
- package/dist/cdn/UIGZUM56.js +0 -6
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
2
2
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
3
|
-
v5.0.0-next.
|
|
4
|
-
import{a as g}from"./LONFK6F4.js";import{a as C,b as k}from"./S3P7GTZF.js";import{a as B}from"./PAH5NEYW.js";import{b as x}from"./M5JGIZYS.js";import"./4CRBTYNF.js";import{A as h,B as w,C as $,D as m,E as c,F as v,H as S,g as y,i as s,m as p,n as F,q as n,z as r}from"./UIGZUM56.js";var o=new Map;o.set("oid","key");o.set("guid","key");o.set("global-id","key");o.set("blob","binary");o.set("integer","integer");o.set("small-integer","integer");o.set("big-integer","integer");o.set("single","number");o.set("double","number");o.set("long","number");o.set("number","number");o.set("date","date-time");o.set("date-only","calendar");o.set("time-only","clock");o.set("timestamp-offset","time-zone");o.set("string","string");var L=({fieldType:u})=>s`<calcite-icon scale=s .icon=${o.get(u)}></calcite-icon>`,E=y`.panel{min-height:250px}.content{max-height:50vh}.field-icons{display:flex;align-items:center;padding:0 var(--calcite-space-sm)}.selection-button-div{padding:var(--calcite-space-2xs) var(--calcite-space-sm-plus)}.no-match-text{padding:var(--calcite-space-md)}.footer{width:100%}.add-cancel-buttons{display:flex;align-content:space-between}`,f=class extends w{constructor(){super(...arguments),this._messages=x({blocking:!0}),this.popoverNode=r(),this.listNode=r(),this.flowElement=r(),this.panelElement=r(),this.dropdownNode=r(),this.fieldInfoFlowItemEl=r(),this.allLists=[],this.filterText="",this.panelCutOffHeight=0,this._propWatcherTask=new C(this,{task:async([e])=>{if(!this.listOnly&&!k(e?.refElement))throw p("error",this,F("popoverProps")),new Error;this._propWatcherTask.autoRun=!1},args:()=>[this.popoverProps]}),this.fields=[],this.selectedFields=[],this.listOnly=!1,this.showFieldInfo=!1,this.showFieldTypeIcon=!1,this.showFieldName=!1,this.showDescription=!1,this.showSelectionAll=!1,this.showCancel=!0,this.hideCancel=!1,this.showSort=!0,this.hideSort=!1,this.showFilterLength=10,this.multiple=!1,this.sortBy="default",this.groupFieldsAndExpressions=!1,this.arcgisChange=n(),this.arcgisClose=n(),this.arcgisFieldPickListChange=n(),this.arcgisFieldPickListDismissed=n(),this.arcgisFieldPickListSortByChange=n(),this.arcgisSortByChange=n(),this.arcgisEditField=n(),this.arcgisDeleteField=n()}static{this.properties={lastSortBy:16,filterFields:16,mapView:0,view:0,layer:0,fields:0,selectedFields:0,listOnly:5,popoverProps:0,showFieldInfo:5,showFieldTypeIcon:5,showFieldName:5,showDescription:5,showSelectionAll:5,showCancel:5,hideCancel:5,showSort:5,hideSort:5,showFilterLength:9,multiple:5,heading:1,okBtnText:1,filterPlaceholderText:1,filterNoResultsText:1,sortBy:1,groupFieldsAndExpressions:5,fieldsGroupHeading:1,expressionsGroupHeading:1,customExpressionCheck:0}}static{this.styles=E}async reposition(){await this.popoverNode.value?.reposition()}async setFocus(){setTimeout(()=>requestAnimationFrame(()=>{this.listOnly?this.listNode.value?.setFocus():this.panelElement.value?.setFocus()}),1)}async setDisabled(e){this.panelElement.value&&(this.panelElement.value.disabled=e)}load(){!this.view&&this.mapView&&(this.view=this.mapView),!this.showCancel&&!this.hideCancel&&(this.hideCancel=!0),!this.showSort&&!this.hideSort&&(this.hideSort=!0),this.listOnly&&this.showFieldInfo&&(this.showFieldInfo=!1,p("info",this,"showFieldInfo is not supported if listOnly is true.")),!this.multiple&&this.selectedFields.length>1&&(this.selectedFields=[this.selectedFields[0]]),this.lastSortBy=this.sortBy??this.lastSortBy,this.updateGroupedLists()}willUpdate(e){(e.has("fields")||e.has("lastSortBy")||e.has("customExpressionCheck"))&&this.updateGroupedLists()}loaded(){this.setUpObserver(),this.listOnly?this.listNode.value?.setFocus():(this.flowElement.value?.setFocus(),this.checkMaxHeight())}disconnectedCallback(){super.disconnectedCallback(),this.observer?.disconnect()}setUpObserver(){this.observer=new MutationObserver(e=>{for(let t of e)t.attributeName==="style"&&this.popoverNode.value&&this.dropdownNode.value&&this.popoverNode.value.style.visibility==="hidden"&&(this.dropdownNode.value.open=!1)})}checkMaxHeight(){setTimeout(()=>this.checkPanelMaxHeight(),200),setTimeout(()=>this.checkPanelMaxHeight(),500),setTimeout(()=>this.checkPanelMaxHeight(),1e3),setTimeout(()=>this.checkPanelMaxHeight(),1500)}checkPanelMaxHeight(){if(this.panelCutOffHeight===0){let e=this.panelElement.value?.getBoundingClientRect();if(e&&e.bottom>window.innerHeight){this.panelCutOffHeight=e.height-(e.bottom-window.innerHeight)-5;let t=this.listNode.value?.getBoundingClientRect();t&&(this.listNode.value.style.maxHeight=`${t.height-(e.bottom-window.innerHeight)-5}px`)}}}getSortedList(e){let t=[...e],i=t.filter(l=>l.type==="none");return t=t.filter(l=>l.type!=="none"),this.lastSortBy==="display"?t.sort((l,a)=>l.alias.localeCompare(a.alias)):this.lastSortBy==="field"?t.sort((l,a)=>l.name.localeCompare(a.name)):this.lastSortBy==="type"&&t.sort((l,a)=>l.type.localeCompare(a.type)),t=t.concat(i),t}isExpression(e){return this.customExpressionCheck?this.customExpressionCheck(e):e.name.includes(g.expression)}canDeselectAll(){let e=this.getAllFields();return this.filterFields?.length?this.filterContainsAll():this.selectedFields.length===e.length}filterContainsAll(){return!!this.filterFields?.every(e=>this.selectedFields.some(t=>t===e))}showFieldInfoCheck(e){let{layer:t}=this;return this.showFieldInfo?!(!t||this.isExpression(e)||e.name.includes(g.relationship)||e.type==="none"):!1}updateGroupedLists(){if(this.fields)if(this.allLists=[],this.usingCustomGroups())for(let e of this.fields)this.allLists.push({title:e.title,fields:[...this.getSortedList(e.fields)]});else this.allLists=this.groupFieldsAndExpressions?[{title:this.expressionsGroupHeading,fields:[...this.getSortedList(this.fields)].filter(e=>this.isExpression(e))},{title:this.fieldsGroupHeading,fields:[...this.getSortedList(this.fields)].filter(e=>!this.isExpression(e))}]:[{title:void 0,fields:[...this.getSortedList(this.fields)]}]}addFieldInfoFlowItem(e,t){let i=this.flowElement.value,l=v(s`<calcite-flow-item selected .heading=${e.alias??e.name} .description=${e.name} class="panel" style=${m(this.panelCutOffHeight>0?`max-height: ${this.panelCutOffHeight}px`:"max-height: 50vh")} @calciteFlowItemBack=${a=>{a.currentTarget.remove(),this.fieldInfoFlowItemEl.value.selected=!1,this.panelElement.value.selected=!0,setTimeout(()=>{t.setFocus()},300)}} ${h(this.fieldInfoFlowItemEl)}><arcgis-field-info lang=${this._messages._lang??c} .fieldName=${e.name} .layer=${this.layer} .view=${this.view} class="content"></arcgis-field-info></calcite-flow-item>`);i.appendChild(l),this.panelElement.value.selected=!1,this.fieldInfoFlowItemEl?.value.setFocus()}usingCustomGroups(){return!!this.fields.length&&"fields"in this.fields[0]}getAllFields(){return this.allLists.map(e=>e.fields).flat()}render(){return this._propWatcherTask.render({complete:()=>{if(this.listOnly)return this.renderList();let e=this.heading||(this.multiple?this._messages.headerSelect:this._messages.header),t=this.popoverProps;return this.el.classList.add("js-app-flyout"),s`<calcite-popover .placement=${t.placement??"leading-start"} open pointer-disabled .referenceElement=${t.refElement} .offsetDistance=${t.offsetDistance??-Math.round(t.refElement.getBoundingClientRect().width)} .offsetSkidding=${t.offsetSkidding??0} .overlayPositioning=${t.overlayPositioning} trigger-disabled .autoClose=${t.autoClose} .label=${this.heading??(this.multiple?this._messages.headerSelect:this._messages.header)??""} @calcitePopoverClose=${()=>{this.arcgisClose.emit(),this.arcgisFieldPickListDismissed.emit()}} ${h(this.popoverNode)}><calcite-flow style=${m({width:`${t.popoverWidth??t.refElement.getBoundingClientRect().width}px`,...t.maxHeight&&{maxHeight:t.maxHeight}})} ${h(this.flowElement)}><calcite-flow-item class="panel" .heading=${e} closable @calciteFlowItemClose=${()=>{this.arcgisClose.emit(),this.arcgisFieldPickListDismissed.emit()}} ${h(this.panelElement)}><slot slot=content-top name=content-top></slot>${this.renderList()}<slot slot=content-bottom name=content-bottom></slot>${(this.multiple||!this.hideCancel)&&s`<div slot=footer class="footer"><slot name=content-footer></slot>${this.multiple&&!this.hideCancel?s`<div class="add-cancel-buttons">${this.renderAddButton()}${this.renderCancelButton()}</div>`:s`${this.renderAddButton()}${this.renderCancelButton()}`}</div>`||""}</calcite-flow-item></calcite-flow></calcite-popover>`},error:()=>""})}renderList(){let e=this.heading||(this.multiple?this._messages.headerSelect:this._messages.header),t=this.getAllFields(),i=t.length>=this.showFilterLength;return s`${t.length?s`<calcite-list .label=${e} .selectionMode=${this.multiple?"multiple":"single"} class=${$(this.listOnly?"":"content")} .filterEnabled=${i} .filterPlaceholder=${this.filterPlaceholderText??this._messages.filter} @calciteListChange=${()=>{let l=this.listNode.value.selectedItems.map(d=>d.value),a=this.selectedFields.filter(d=>l.includes(d)),b=l.filter(d=>!this.selectedFields.includes(d));this.selectedFields=[...new Set([...a,...b])],this.arcgisChange.emit({selectedFields:this.selectedFields}),this.arcgisFieldPickListChange.emit({selectedFields:this.selectedFields}),this.multiple||(this.arcgisClose.emit({selectedFields:this.selectedFields}),this.arcgisFieldPickListDismissed.emit({selectedFields:this.selectedFields}))}} @calciteListFilter=${l=>{l.stopPropagation(),this.filterFields=this.listNode.value.filteredItems?.map(a=>a.value),this.filterText=this.listNode.value.filterText}} ${h(this.listNode)}>${this.renderSortButton()}<slot name=content-center></slot>${this.multiple&&this.showSelectionAll&&(!i||!this.filterText||this.filterFields?.length)?this.renderSelectionButton():null}${this.renderListItems()}</calcite-list>`:s`<slot name=no-fields></slot>`}${this.filterFields&&!this.filterFields.length&&this.listNode.value&&this.filterNoResultsText?.length!==0?s`<div class="no-match-text">${this.filterNoResultsText??this._messages.noMatches}</div>`:null}`}renderSortButton(){let e=this.getAllFields();if(!(e.length>=this.showFilterLength&&!this.hideSort))return"";let t=e.every(i=>!!i.type);return s`<calcite-dropdown slot=filter-actions-end placement=bottom-end overlay-positioning=fixed .disabled=${this.filterFields?this.filterFields.length<4:!1} @calciteDropdownOpen=${()=>{this.observer?.disconnect(),this.popoverNode.value&&this.observer?.observe(this.popoverNode.value,{attributes:!0})}} @calciteDropdownClose=${()=>this.observer?.disconnect()} ${h(this.dropdownNode)}><calcite-action slot=trigger .text=${this._messages.sort??""} title=${this._messages.sort??c}><calcite-icon scale=s icon=sortDescending flip-rtl></calcite-icon></calcite-action><calcite-dropdown-group><calcite-dropdown-item .selected=${this.lastSortBy==="default"} @click=${()=>{this.lastSortBy="default",this.arcgisSortByChange.emit(this.lastSortBy),this.arcgisFieldPickListSortByChange.emit(this.lastSortBy)}} @keydown=${i=>{i.stopPropagation(),(i.key===" "||i.key==="Enter")&&(this.lastSortBy="default",this.arcgisSortByChange.emit(this.lastSortBy),this.arcgisFieldPickListSortByChange.emit(this.lastSortBy))}}>${this._messages.default}</calcite-dropdown-item><calcite-dropdown-item .selected=${this.lastSortBy==="display"} @click=${()=>{this.lastSortBy="display",this.arcgisSortByChange.emit(this.lastSortBy),this.arcgisFieldPickListSortByChange.emit(this.lastSortBy)}} @keydown=${i=>{i.stopPropagation(),(i.key===" "||i.key==="Enter")&&(this.lastSortBy="display",this.arcgisSortByChange.emit(this.lastSortBy),this.arcgisFieldPickListSortByChange.emit(this.lastSortBy))}}>${this._messages.displayName}</calcite-dropdown-item>${t&&s`<calcite-dropdown-item .selected=${this.lastSortBy==="type"} @click=${()=>{this.lastSortBy="type",this.arcgisSortByChange.emit(this.lastSortBy),this.arcgisFieldPickListSortByChange.emit(this.lastSortBy)}} @keydown=${i=>{i.stopPropagation(),(i.key===" "||i.key==="Enter")&&(this.lastSortBy="type",this.arcgisSortByChange.emit(this.lastSortBy),this.arcgisFieldPickListSortByChange.emit(this.lastSortBy))}}>${this._messages.type}</calcite-dropdown-item>`||""}<calcite-dropdown-item .selected=${this.lastSortBy==="field"} @click=${()=>{this.lastSortBy="field",this.arcgisSortByChange.emit(this.lastSortBy),this.arcgisFieldPickListSortByChange.emit(this.lastSortBy)}} @keydown=${i=>{i.stopPropagation(),(i.key===" "||i.key==="Enter")&&(this.lastSortBy="field",this.arcgisSortByChange.emit(this.lastSortBy),this.arcgisFieldPickListSortByChange.emit(this.lastSortBy))}}>${this._messages.fieldName}</calcite-dropdown-item></calcite-dropdown-group></calcite-dropdown>`}renderSelectionButton(){return s`<div class="selection-button-div"><calcite-button appearance=transparent scale=s width=full @click=${()=>{if(this.canDeselectAll())this.selectedFields=this.filterFields?.length?this.selectedFields.filter(e=>!this.filterFields?.includes(e)):[];else if(this.filterFields?.length)this.selectedFields=[...new Set([...this.selectedFields,...this.filterFields])];else{let e=this.getAllFields();this.selectedFields=e.map(t=>t.name)}this.arcgisChange.emit({selectedFields:this.selectedFields}),this.arcgisFieldPickListChange.emit({selectedFields:this.selectedFields})}}>${this.canDeselectAll()?this._messages.deselectAll:this._messages.selectAll}</calcite-button></div>`}renderListItems(){let e=this.allLists.filter(t=>!!t.fields.length);return e.length===1&&!e[0].title?e[0].fields.map(t=>this.renderCalciteListItem(t)):e.map(t=>s`<calcite-list-item-group .heading=${t.title}>${t.fields.map(i=>this.renderCalciteListItem(i))}</calcite-list-item-group>`)}renderCalciteListItem(e){let t=this.showFieldInfoCheck(e),i=this.showFieldTypeIcon&&!!e.type;return B(e.name,s`<calcite-list-item .label=${e.alias||e.name} .description=${(()=>{if(this.showFieldName&&e.hideFieldName!==!0)return`{${e.name}}`;if(this.showDescription&&e.hideDescription!==!0&&e.description)return e.description})()} .value=${e.name} .selected=${!this.multiple&&e.name===this.selectedFields[0]||this.multiple&&this.selectedFields.includes(e.name)} .metadata=${{label:e.alias,fieldName:e.name}}>${i&&s`<div slot=actions-end class="field-icons">${L({fieldType:e.type})}</div>`||""}${this.renderInfoAction(e,t)}${this.renderEditAction(e)}${this.renderDeleteAction(e)}</calcite-list-item>`)}renderInfoAction(e,t){let{_messages:i}=this;return t?s`<calcite-action slot=actions-end .text=${i.info} title=${i.info??c} scale=s icon=information @click=${l=>{l.stopPropagation();let a=l.currentTarget;this.addFieldInfoFlowItem(e,a)}}></calcite-action>`:""}renderEditAction(e){let{_messages:t}=this;return e.showEditAction?s`<calcite-action slot=actions-end .text=${t.edit} title=${t.edit??c} scale=s icon=pencil @click=${i=>{i.stopPropagation(),this.arcgisEditField.emit({fieldName:e.name})}}></calcite-action>`:""}renderDeleteAction(e){let{_messages:t}=this;return e.showDeleteAction?s`<calcite-action slot=actions-end .text=${t.delete} title=${t.delete??c} scale=s icon=trash @click=${i=>{i.stopPropagation(),this.arcgisDeleteField.emit({fieldName:e.name})}}></calcite-action>`:""}renderAddButton(){return this.multiple?s`<calcite-button .appearance=${this.hideCancel?"outline-fill":"solid"} .width=${this.hideCancel?"full":"half"} @click=${()=>{this.arcgisClose.emit({selectedFields:this.selectedFields}),this.arcgisFieldPickListDismissed.emit({selectedFields:this.selectedFields})}}>${this.okBtnText||(this.multiple?this._messages.done:this._messages.ok)}</calcite-button>`:""}renderCancelButton(){return this.hideCancel?"":s`<calcite-button appearance=outline-fill .width=${this.multiple?"half":"full"} @click=${()=>{this.arcgisClose.emit(),this.arcgisFieldPickListDismissed.emit()}}>${this._messages.cancel}</calcite-button>`}};S("arcgis-field-pick-list",f);export{f as ArcgisFieldPickList};
|
|
3
|
+
v5.0.0-next.127 */
|
|
4
|
+
import{a as g}from"./7RKSFOWA.js";import{a as C,b as k}from"./D6CPSBFQ.js";import{a as B}from"./SDJXKVZA.js";import{b as x}from"./TB4L7OK7.js";import"./IF2NSVPQ.js";import{A as h,B as w,C as $,D as m,E as c,F as v,H as S,g as y,i as s,m as p,n as F,q as n,z as r}from"./ZG65PSAN.js";var o=new Map;o.set("oid","key");o.set("guid","key");o.set("global-id","key");o.set("blob","binary");o.set("integer","integer");o.set("small-integer","integer");o.set("big-integer","integer");o.set("single","number");o.set("double","number");o.set("long","number");o.set("number","number");o.set("date","date-time");o.set("date-only","calendar");o.set("time-only","clock");o.set("timestamp-offset","time-zone");o.set("string","string");var L=({fieldType:u})=>s`<calcite-icon scale=s .icon=${o.get(u)}></calcite-icon>`,E=y`.panel{min-height:250px}.content{max-height:50vh}.field-icons{display:flex;align-items:center;padding:0 var(--calcite-space-sm)}.selection-button-div{padding:var(--calcite-space-2xs) var(--calcite-space-sm-plus)}.no-match-text{padding:var(--calcite-space-md)}.footer{width:100%}.add-cancel-buttons{display:flex;align-content:space-between}`,f=class extends w{constructor(){super(...arguments),this._messages=x({blocking:!0}),this.popoverNode=r(),this.listNode=r(),this.flowElement=r(),this.panelElement=r(),this.dropdownNode=r(),this.fieldInfoFlowItemEl=r(),this.allLists=[],this.filterText="",this.panelCutOffHeight=0,this._propWatcherTask=new C(this,{task:async([e])=>{if(!this.listOnly&&!k(e?.refElement))throw p("error",this,F("popoverProps")),new Error;this._propWatcherTask.autoRun=!1},args:()=>[this.popoverProps]}),this.fields=[],this.selectedFields=[],this.listOnly=!1,this.showFieldInfo=!1,this.showFieldTypeIcon=!1,this.showFieldName=!1,this.showDescription=!1,this.showSelectionAll=!1,this.showCancel=!0,this.hideCancel=!1,this.showSort=!0,this.hideSort=!1,this.showFilterLength=10,this.multiple=!1,this.sortBy="default",this.groupFieldsAndExpressions=!1,this.arcgisChange=n(),this.arcgisClose=n(),this.arcgisFieldPickListChange=n(),this.arcgisFieldPickListDismissed=n(),this.arcgisFieldPickListSortByChange=n(),this.arcgisSortByChange=n(),this.arcgisEditField=n(),this.arcgisDeleteField=n()}static{this.properties={lastSortBy:16,filterFields:16,mapView:0,view:0,layer:0,fields:0,selectedFields:0,listOnly:5,popoverProps:0,showFieldInfo:5,showFieldTypeIcon:5,showFieldName:5,showDescription:5,showSelectionAll:5,showCancel:5,hideCancel:5,showSort:5,hideSort:5,showFilterLength:9,multiple:5,heading:1,okBtnText:1,filterPlaceholderText:1,filterNoResultsText:1,sortBy:1,groupFieldsAndExpressions:5,fieldsGroupHeading:1,expressionsGroupHeading:1,customExpressionCheck:0}}static{this.styles=E}async reposition(){await this.popoverNode.value?.reposition()}async setFocus(){setTimeout(()=>requestAnimationFrame(()=>{this.listOnly?this.listNode.value?.setFocus():this.panelElement.value?.setFocus()}),1)}async setDisabled(e){this.panelElement.value&&(this.panelElement.value.disabled=e)}load(){!this.view&&this.mapView&&(this.view=this.mapView),!this.showCancel&&!this.hideCancel&&(this.hideCancel=!0),!this.showSort&&!this.hideSort&&(this.hideSort=!0),this.listOnly&&this.showFieldInfo&&(this.showFieldInfo=!1,p("info",this,"showFieldInfo is not supported if listOnly is true.")),!this.multiple&&this.selectedFields.length>1&&(this.selectedFields=[this.selectedFields[0]]),this.lastSortBy=this.sortBy??this.lastSortBy,this.updateGroupedLists()}willUpdate(e){(e.has("fields")||e.has("lastSortBy")||e.has("customExpressionCheck"))&&this.updateGroupedLists()}loaded(){this.setUpObserver(),this.listOnly?this.listNode.value?.setFocus():(this.flowElement.value?.setFocus(),this.checkMaxHeight())}disconnectedCallback(){super.disconnectedCallback(),this.observer?.disconnect()}setUpObserver(){this.observer=new MutationObserver(e=>{for(let t of e)t.attributeName==="style"&&this.popoverNode.value&&this.dropdownNode.value&&this.popoverNode.value.style.visibility==="hidden"&&(this.dropdownNode.value.open=!1)})}checkMaxHeight(){setTimeout(()=>this.checkPanelMaxHeight(),200),setTimeout(()=>this.checkPanelMaxHeight(),500),setTimeout(()=>this.checkPanelMaxHeight(),1e3),setTimeout(()=>this.checkPanelMaxHeight(),1500)}checkPanelMaxHeight(){if(this.panelCutOffHeight===0){let e=this.panelElement.value?.getBoundingClientRect();if(e&&e.bottom>window.innerHeight){this.panelCutOffHeight=e.height-(e.bottom-window.innerHeight)-5;let t=this.listNode.value?.getBoundingClientRect();t&&(this.listNode.value.style.maxHeight=`${t.height-(e.bottom-window.innerHeight)-5}px`)}}}getSortedList(e){let t=[...e],i=t.filter(l=>l.type==="none");return t=t.filter(l=>l.type!=="none"),this.lastSortBy==="display"?t.sort((l,a)=>l.alias.localeCompare(a.alias)):this.lastSortBy==="field"?t.sort((l,a)=>l.name.localeCompare(a.name)):this.lastSortBy==="type"&&t.sort((l,a)=>l.type.localeCompare(a.type)),t=t.concat(i),t}isExpression(e){return this.customExpressionCheck?this.customExpressionCheck(e):e.name.includes(g.expression)}canDeselectAll(){let e=this.getAllFields();return this.filterFields?.length?this.filterContainsAll():this.selectedFields.length===e.length}filterContainsAll(){return!!this.filterFields?.every(e=>this.selectedFields.some(t=>t===e))}showFieldInfoCheck(e){let{layer:t}=this;return this.showFieldInfo?!(!t||this.isExpression(e)||e.name.includes(g.relationship)||e.type==="none"):!1}updateGroupedLists(){if(this.fields)if(this.allLists=[],this.usingCustomGroups())for(let e of this.fields)this.allLists.push({title:e.title,fields:[...this.getSortedList(e.fields)]});else this.allLists=this.groupFieldsAndExpressions?[{title:this.expressionsGroupHeading,fields:[...this.getSortedList(this.fields)].filter(e=>this.isExpression(e))},{title:this.fieldsGroupHeading,fields:[...this.getSortedList(this.fields)].filter(e=>!this.isExpression(e))}]:[{title:void 0,fields:[...this.getSortedList(this.fields)]}]}addFieldInfoFlowItem(e,t){let i=this.flowElement.value,l=v(s`<calcite-flow-item selected .heading=${e.alias??e.name} .description=${e.name} class="panel" style=${m(this.panelCutOffHeight>0?`max-height: ${this.panelCutOffHeight}px`:"max-height: 50vh")} @calciteFlowItemBack=${a=>{a.currentTarget.remove(),this.fieldInfoFlowItemEl.value.selected=!1,this.panelElement.value.selected=!0,setTimeout(()=>{t.setFocus()},300)}} ${h(this.fieldInfoFlowItemEl)}><arcgis-field-info lang=${this._messages._lang??c} .fieldName=${e.name} .layer=${this.layer} .view=${this.view} class="content"></arcgis-field-info></calcite-flow-item>`);i.appendChild(l),this.panelElement.value.selected=!1,this.fieldInfoFlowItemEl?.value.setFocus()}usingCustomGroups(){return!!this.fields.length&&"fields"in this.fields[0]}getAllFields(){return this.allLists.map(e=>e.fields).flat()}render(){return this._propWatcherTask.render({complete:()=>{if(this.listOnly)return this.renderList();let e=this.heading||(this.multiple?this._messages.headerSelect:this._messages.header),t=this.popoverProps;return this.el.classList.add("js-app-flyout"),s`<calcite-popover .placement=${t.placement??"leading-start"} open pointer-disabled .referenceElement=${t.refElement} .offsetDistance=${t.offsetDistance??-Math.round(t.refElement.getBoundingClientRect().width)} .offsetSkidding=${t.offsetSkidding??0} .overlayPositioning=${t.overlayPositioning} trigger-disabled .autoClose=${t.autoClose} .label=${this.heading??(this.multiple?this._messages.headerSelect:this._messages.header)??""} @calcitePopoverClose=${()=>{this.arcgisClose.emit(),this.arcgisFieldPickListDismissed.emit()}} ${h(this.popoverNode)}><calcite-flow style=${m({width:`${t.popoverWidth??t.refElement.getBoundingClientRect().width}px`,...t.maxHeight&&{maxHeight:t.maxHeight}})} ${h(this.flowElement)}><calcite-flow-item class="panel" .heading=${e} closable @calciteFlowItemClose=${()=>{this.arcgisClose.emit(),this.arcgisFieldPickListDismissed.emit()}} ${h(this.panelElement)}><slot slot=content-top name=content-top></slot>${this.renderList()}<slot slot=content-bottom name=content-bottom></slot>${(this.multiple||!this.hideCancel)&&s`<div slot=footer class="footer"><slot name=content-footer></slot>${this.multiple&&!this.hideCancel?s`<div class="add-cancel-buttons">${this.renderAddButton()}${this.renderCancelButton()}</div>`:s`${this.renderAddButton()}${this.renderCancelButton()}`}</div>`||""}</calcite-flow-item></calcite-flow></calcite-popover>`},error:()=>""})}renderList(){let e=this.heading||(this.multiple?this._messages.headerSelect:this._messages.header),t=this.getAllFields(),i=t.length>=this.showFilterLength;return s`${t.length?s`<calcite-list .label=${e} .selectionMode=${this.multiple?"multiple":"single"} class=${$(this.listOnly?"":"content")} .filterEnabled=${i} .filterPlaceholder=${this.filterPlaceholderText??this._messages.filter} @calciteListChange=${()=>{let l=this.listNode.value.selectedItems.map(d=>d.value),a=this.selectedFields.filter(d=>l.includes(d)),b=l.filter(d=>!this.selectedFields.includes(d));this.selectedFields=[...new Set([...a,...b])],this.arcgisChange.emit({selectedFields:this.selectedFields}),this.arcgisFieldPickListChange.emit({selectedFields:this.selectedFields}),this.multiple||(this.arcgisClose.emit({selectedFields:this.selectedFields}),this.arcgisFieldPickListDismissed.emit({selectedFields:this.selectedFields}))}} @calciteListFilter=${l=>{l.stopPropagation(),this.filterFields=this.listNode.value.filteredItems?.map(a=>a.value),this.filterText=this.listNode.value.filterText}} ${h(this.listNode)}>${this.renderSortButton()}<slot name=content-center></slot>${this.multiple&&this.showSelectionAll&&(!i||!this.filterText||this.filterFields?.length)?this.renderSelectionButton():null}${this.renderListItems()}</calcite-list>`:s`<slot name=no-fields></slot>`}${this.filterFields&&!this.filterFields.length&&this.listNode.value&&this.filterNoResultsText?.length!==0?s`<div class="no-match-text">${this.filterNoResultsText??this._messages.noMatches}</div>`:null}`}renderSortButton(){let e=this.getAllFields();if(!(e.length>=this.showFilterLength&&!this.hideSort))return"";let t=e.every(i=>!!i.type);return s`<calcite-dropdown slot=filter-actions-end placement=bottom-end overlay-positioning=fixed .disabled=${this.filterFields?this.filterFields.length<4:!1} @calciteDropdownOpen=${()=>{this.observer?.disconnect(),this.popoverNode.value&&this.observer?.observe(this.popoverNode.value,{attributes:!0})}} @calciteDropdownClose=${()=>this.observer?.disconnect()} ${h(this.dropdownNode)}><calcite-action slot=trigger .text=${this._messages.sort??""} title=${this._messages.sort??c}><calcite-icon scale=s icon=sortDescending flip-rtl></calcite-icon></calcite-action><calcite-dropdown-group><calcite-dropdown-item .selected=${this.lastSortBy==="default"} @click=${()=>{this.lastSortBy="default",this.arcgisSortByChange.emit(this.lastSortBy),this.arcgisFieldPickListSortByChange.emit(this.lastSortBy)}} @keydown=${i=>{i.stopPropagation(),(i.key===" "||i.key==="Enter")&&(this.lastSortBy="default",this.arcgisSortByChange.emit(this.lastSortBy),this.arcgisFieldPickListSortByChange.emit(this.lastSortBy))}}>${this._messages.default}</calcite-dropdown-item><calcite-dropdown-item .selected=${this.lastSortBy==="display"} @click=${()=>{this.lastSortBy="display",this.arcgisSortByChange.emit(this.lastSortBy),this.arcgisFieldPickListSortByChange.emit(this.lastSortBy)}} @keydown=${i=>{i.stopPropagation(),(i.key===" "||i.key==="Enter")&&(this.lastSortBy="display",this.arcgisSortByChange.emit(this.lastSortBy),this.arcgisFieldPickListSortByChange.emit(this.lastSortBy))}}>${this._messages.displayName}</calcite-dropdown-item>${t&&s`<calcite-dropdown-item .selected=${this.lastSortBy==="type"} @click=${()=>{this.lastSortBy="type",this.arcgisSortByChange.emit(this.lastSortBy),this.arcgisFieldPickListSortByChange.emit(this.lastSortBy)}} @keydown=${i=>{i.stopPropagation(),(i.key===" "||i.key==="Enter")&&(this.lastSortBy="type",this.arcgisSortByChange.emit(this.lastSortBy),this.arcgisFieldPickListSortByChange.emit(this.lastSortBy))}}>${this._messages.type}</calcite-dropdown-item>`||""}<calcite-dropdown-item .selected=${this.lastSortBy==="field"} @click=${()=>{this.lastSortBy="field",this.arcgisSortByChange.emit(this.lastSortBy),this.arcgisFieldPickListSortByChange.emit(this.lastSortBy)}} @keydown=${i=>{i.stopPropagation(),(i.key===" "||i.key==="Enter")&&(this.lastSortBy="field",this.arcgisSortByChange.emit(this.lastSortBy),this.arcgisFieldPickListSortByChange.emit(this.lastSortBy))}}>${this._messages.fieldName}</calcite-dropdown-item></calcite-dropdown-group></calcite-dropdown>`}renderSelectionButton(){return s`<div class="selection-button-div"><calcite-button appearance=transparent scale=s width=full @click=${()=>{if(this.canDeselectAll())this.selectedFields=this.filterFields?.length?this.selectedFields.filter(e=>!this.filterFields?.includes(e)):[];else if(this.filterFields?.length)this.selectedFields=[...new Set([...this.selectedFields,...this.filterFields])];else{let e=this.getAllFields();this.selectedFields=e.map(t=>t.name)}this.arcgisChange.emit({selectedFields:this.selectedFields}),this.arcgisFieldPickListChange.emit({selectedFields:this.selectedFields})}}>${this.canDeselectAll()?this._messages.deselectAll:this._messages.selectAll}</calcite-button></div>`}renderListItems(){let e=this.allLists.filter(t=>!!t.fields.length);return e.length===1&&!e[0].title?e[0].fields.map(t=>this.renderCalciteListItem(t)):e.map(t=>s`<calcite-list-item-group .heading=${t.title}>${t.fields.map(i=>this.renderCalciteListItem(i))}</calcite-list-item-group>`)}renderCalciteListItem(e){let t=this.showFieldInfoCheck(e),i=this.showFieldTypeIcon&&!!e.type;return B(e.name,s`<calcite-list-item .label=${e.alias||e.name} .description=${(()=>{if(this.showFieldName&&e.hideFieldName!==!0)return`{${e.name}}`;if(this.showDescription&&e.hideDescription!==!0&&e.description)return e.description})()} .value=${e.name} .selected=${!this.multiple&&e.name===this.selectedFields[0]||this.multiple&&this.selectedFields.includes(e.name)} .metadata=${{label:e.alias,fieldName:e.name}}>${i&&s`<div slot=actions-end class="field-icons">${L({fieldType:e.type})}</div>`||""}${this.renderInfoAction(e,t)}${this.renderEditAction(e)}${this.renderDeleteAction(e)}</calcite-list-item>`)}renderInfoAction(e,t){let{_messages:i}=this;return t?s`<calcite-action slot=actions-end .text=${i.info} title=${i.info??c} scale=s icon=information @click=${l=>{l.stopPropagation();let a=l.currentTarget;this.addFieldInfoFlowItem(e,a)}}></calcite-action>`:""}renderEditAction(e){let{_messages:t}=this;return e.showEditAction?s`<calcite-action slot=actions-end .text=${t.edit} title=${t.edit??c} scale=s icon=pencil @click=${i=>{i.stopPropagation(),this.arcgisEditField.emit({fieldName:e.name})}}></calcite-action>`:""}renderDeleteAction(e){let{_messages:t}=this;return e.showDeleteAction?s`<calcite-action slot=actions-end .text=${t.delete} title=${t.delete??c} scale=s icon=trash @click=${i=>{i.stopPropagation(),this.arcgisDeleteField.emit({fieldName:e.name})}}></calcite-action>`:""}renderAddButton(){return this.multiple?s`<calcite-button .appearance=${this.hideCancel?"outline-fill":"solid"} .width=${this.hideCancel?"full":"half"} @click=${()=>{this.arcgisClose.emit({selectedFields:this.selectedFields}),this.arcgisFieldPickListDismissed.emit({selectedFields:this.selectedFields})}}>${this.okBtnText||(this.multiple?this._messages.done:this._messages.ok)}</calcite-button>`:""}renderCancelButton(){return this.hideCancel?"":s`<calcite-button appearance=outline-fill .width=${this.multiple?"half":"full"} @click=${()=>{this.arcgisClose.emit(),this.arcgisFieldPickListDismissed.emit()}}>${this._messages.cancel}</calcite-button>`}};S("arcgis-field-pick-list",f);export{f as ArcgisFieldPickList};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
2
2
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
3
|
-
v5.0.0-next.
|
|
4
|
-
import{B as x,C,E as d,H as v,g as f,i as z,j as m}from"./
|
|
3
|
+
v5.0.0-next.127 */
|
|
4
|
+
import{B as x,C,E as d,H as v,g as f,i as z,j as m}from"./ZG65PSAN.js";export default $arcgis.t(([w])=>{var M=f`:host{display:block;block-size:30px;inline-size:100%}:host([layout="vertical"]){writing-mode:vertical-lr}.hidden{display:none!important}svg{stroke-width:var(--calcite-border-width-sm);stroke:var(--calcite-color-border-input);margin:0;display:block;block-size:100%;inline-size:100%;padding:0}svg .background{fill:#e0e0e0}`,u=class{constructor(i,s,e,a){this.color=i,this.ratio=s,this.opacity=e,this.sizeRatio=a}},D=new w([0,0,0,.5]),I=class extends x{constructor(){super(...arguments),this._minSizeRatio=.2,this._rampStops=[],this._containerDimensions=[0,0],this.layout="horizontal",this.min=0,this.max=1,this.stops=[]}static{this.properties={_containerDimensions:16,layout:3,min:9,max:9,stops:0}}static{this.styles=M}willUpdate(i){if(super.willUpdate(i),i.has("min")||i.has("max")||i.has("stops")){let{stops:s,min:e,max:a}=this,r=a-e,o=s.map(n=>n.size??0),c=Math.min(...o),l=Math.max(...o)-c,t=s.map(n=>{let{color:h,value:g,size:$}=n,y=h instanceof w?h:w.fromString(h)??D,b=(g-e)/r;return new u(y.toCss(),b,y.a,$?($-c)/l:void 0)});if(t[0].ratio!==0){let{color:n,opacity:h,sizeRatio:g}=t[0];t.unshift(new u(n,0,h,g))}if(t[t.length-1].ratio!==0){let{color:n,opacity:h,sizeRatio:g}=t[t.length-1];t.push(new u(n,1,h,g))}this._rampStops=t}}loaded(){let i=new ResizeObserver(a=>{for(let r of a){let{width:o,height:c}=r.contentRect;this._containerDimensions=[o,c]}}),{width:s,height:e}=this.el.getBoundingClientRect();this._containerDimensions=[s,e],i.observe(this.el)}render(){let i=this._rampStops,[s,e]=this._containerDimensions,a=this.layout==="horizontal",r="rampFillId",o="rampBackgroundFillId",c=R(i),l=[];if(s>0&&e>0)if(c){let t=S(this.layout,s,e,i,this._minSizeRatio);l.push(m`<path fill=${`url(#${o})`} d=${t??d} />`,m`<path fill=${`url(#${r})`} d=${t??d} />`)}else l.push(m`<rect fill=${`url(#${o})`} height=100% width=100% x=0 y=0 />`,m`<rect fill=${`url(#${r})`} height=100% width=100% x=0 y=0 />`);return z`<svg xmlns=http://www.w3.org/2000/svg>${m`<defs><linearGradient id=${r} x1=0 x2=${a?1:0} y1=${a?0:1} y2=0>${i.map(({ratio:t,color:n,opacity:h})=>m`<stop offset=${`${(t*100).toFixed(2)}%`} stop-color=${n??d} stop-opacity=${h??d} />`)}</linearGradient><pattern height=15 id=${o} patternUnits=userSpaceOnUse width=15 x=0 y=0><image height=15 href=data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZlcnNpb249IjEuMSIgaGVpZ2h0PSIxNiIgd2lkdGg9IjE2Ij48cGF0aCBkPSJNMCAwIEw4IDAgTDggOCBMMCA4IFoiIGZpbGw9IiNjY2MiIC8+PHBhdGggZD0iTTAgMCBMOCAwIEw4IDggTDAgOCBaIiBmaWxsPSIjZmZmIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgwLDgpIiAvPjxwYXRoIGQ9Ik0wIDAgTDggMCBMOCA4IEwwIDggWiIgZmlsbD0iI2NjYyIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoOCw4KSIgLz48cGF0aCBkPSJNMCAwIEw4IDAgTDggOCBMMCA4IFoiIGZpbGw9IiNmZmYiIHRyYW5zZm9ybT0idHJhbnNsYXRlKDgsMCkiIC8+PC9zdmc+ width=15 x=0 y=0 /></pattern></defs><rect class=${C({background:!0})} height=100% width=100% x=0 y=0 />${l}`}</svg>`}};function R(p){return p.every(i=>i.sizeRatio!==void 0)}function S(p,i,s,e,a){let r=o=>(1-a)*o+a;if(p==="horizontal"){let o=e.map(({ratio:c,sizeRatio:l})=>{let t=c*i,n=s-r(l)*s;return`L ${t} ${n}`});return`M 0 ${s} ${o.join(" ")} L ${i} ${s} Z`}else{let o=e.map(({ratio:c,sizeRatio:l})=>{let t=s-c*s;return`L ${r(l)*i} ${t}`});return`M 0 ${s} ${o.join(" ")} L 0 0 Z`}}v("arcgis-ramp-color",I);return I},"Color")
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
2
2
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
3
|
-
v5.0.0-next.
|
|
3
|
+
v5.0.0-next.127 */
|
|
4
4
|
var e=(r=>(r.expression="expression/",r.raster="Raster.",r.relationship="relationships/",r))(e||{});export{e as a};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
2
2
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
3
|
-
v5.0.0-next.
|
|
4
|
-
import{h as o}from"./
|
|
3
|
+
v5.0.0-next.127 */
|
|
4
|
+
import{h as o}from"./ZG65PSAN.js";var n=Symbol(),h=class{get taskComplete(){return this.t||(this.i===1?this.t=new Promise(((t,i)=>{this.o=t,this.h=i})):this.i===3?this.t=Promise.reject(this.l):this.t=Promise.resolve(this.u)),this.t}constructor(t,i,e){this.p=0,this.i=0,(this._=t).addController(this);let r=typeof i=="object"?i:{task:i,args:e};this.v=r.task,this.j=r.args,this.m=r.argsEqual??u,this.k=r.onComplete,this.A=r.onError,this.autoRun=r.autoRun??!0,"initialValue"in r&&(this.u=r.initialValue,this.i=2,this.O=this.T?.())}hostUpdate(){this.autoRun===!0&&this.S()}hostUpdated(){this.autoRun==="afterUpdate"&&this.S()}T(){if(this.j===void 0)return;let t=this.j();if(!Array.isArray(t))throw Error("The args function must return an array");return t}async S(){let t=this.T(),i=this.O;this.O=t,t===i||t===void 0||i!==void 0&&this.m(i,t)||await this.run(t)}async run(t){let i,e;t??=this.T(),this.O=t,this.i===1?this.q?.abort():(this.t=void 0,this.o=void 0,this.h=void 0),this.i=1,this.autoRun==="afterUpdate"?queueMicrotask((()=>this._.requestUpdate())):this._.requestUpdate();let r=++this.p;this.q=new AbortController;let a=!1;try{i=await this.v(t,{signal:this.q.signal})}catch(l){a=!0,e=l}if(this.p===r){if(i===n)this.i=0;else{if(a===!1){try{this.k?.(i)}catch{}this.i=2,this.o?.(i)}else{try{this.A?.(e)}catch{}this.i=3,this.h?.(e)}this.u=i,this.l=e}this._.requestUpdate()}}abort(t){this.i===1&&this.q?.abort(t)}get value(){return this.u}get error(){return this.l}get status(){return this.i}render(t){switch(this.i){case 0:return t.initial?.();case 1:return t.pending?.();case 2:return t.complete?.(this.value);case 3:return t.error?.(this.error);default:throw Error("Unexpected status: "+this.i)}}},u=(s,t)=>s===t||s.length===t.length&&s.every(((i,e)=>!o(i,t[e])));function q(s){return s!=null}function v(s){return c(s)&&p(s)}function c(s){return s!=null&&typeof s=="object"&&"type"in s&&s.type==="feature"}function p(s){return s?.type==="feature"&&s.source?.type==="feature-layer"}export{h as a,q as b,v as c};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
2
2
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
3
|
-
v5.0.0-next.
|
|
4
|
-
import{a as k,b as h}from"./S3P7GTZF.js";import{a as R}from"./PAH5NEYW.js";import{b as B}from"./M5JGIZYS.js";import"./4CRBTYNF.js";import{A as F,B as S,H as O,g as L,i as b,m as w,n as N,q as Z,z as U}from"./UIGZUM56.js";export default $arcgis.t(([{formatDate:q,convertDateFormatToIntlOptions:y,formatDateOnly:K,formatTimeOnly:Q,formatTimestamp:C,formatNumber:X},Y,{clone:I}])=>{function _(i){return new Date(`1970-01-01T${i}Z`).getTime()}function M(i){return new Date(`${i} 00:00:00`).getTime()}function ee(i,e,t){let o;return e==="unknown"?o=q(i,{...y("short-date-short-time"),timeZone:"utc",timeZoneName:"shortOffset"}):o=q(i,{...y("short-date-short-time"),timeZone:e}),o}function te(i){return i?K(i,y("short-date")):""}function ie(i){let e;return typeof i=="string"?e=Q(i,y("short-date-long-time")):e=q(i,{...y("long-time"),timeZone:"utc"}),e}function se(i,e){return typeof i=="string"?e&&"timeZone"in e&&e.timeZone==="unknown"?C(i,{...y("short-date-short-time"),timeZone:"utc",timeZoneName:"shortOffset"}):C(i,{...y("short-date-short-time"),timeZone:e&&"timeZone"in e&&e.timeZone?e.timeZone:"system"}):e&&"timeZone"in e&&e.timeZone==="unknown"?q(i,{...y("short-date-short-time"),timeZone:"utc",timeZoneName:"shortOffset"}):q(i,{...y("short-date-short-time"),timeZone:e&&"timeZone"in e&&e.timeZone?e.timeZone:"system"})}function A(i,e){if(i.type!=="feature"&&i.type!=="subtype-group"&&i.type!=="subtype-sublayer"&&i.type!=="imagery")return;let t;return i.fields.forEach(o=>{let s=o.name,r=o.domain;if(i.type!=="imagery"&&i.subtypeField===s){let p;i.type==="subtype-group"||i.type==="feature"?p=i.subtypes:p=i.parent.subtypes,p.forEach(l=>{i.type==="subtype-sublayer"&&i.subtypeCode!==l.code||(e.name===s&&(t=t||[],t.push({code:l.code,name:l.name})),l.domains&&Object.keys(l.domains).forEach(a=>{if(e.name===a){let n=l.domains[a];n?.type==="coded-value"&&n?.codedValues&&n.codedValues.forEach(u=>{let f=!1;t=t||[],t.forEach(c=>{c.code===u.code&&(f=!0,`| ${c.name} |`.includes(`| ${u.name} |`)||(c.name+=` | ${u.name}`))}),f||t.push({code:u.code,name:u.name})})}}))})}if(e.name===s&&(i.type==="feature"||i.type==="imagery")){let p=i.type==="feature"?i.typeIdField:void 0,l=i.type==="feature"?i.types:void 0;i.type==="feature"&&p&&l?(p===s?t=l.map(a=>({code:a.id,name:a.name})):(t=t||[],l.forEach(a=>{if(!a.domains?.[s]||a.domains[s].type==="inherited"){let n=r;n?.codedValues&&n.codedValues.forEach(u=>{let f=!1;t.forEach(c=>{c.code===u.code&&(f=!0,`| ${c.name} |`.includes(`| ${u.name} |`)||(c.name+=` | ${u.name}`))}),f||t.push(I(u))})}else a.domains?.[s]?.codedValues&&a.domains[s].codedValues.forEach(n=>{let u=!1;t.forEach(f=>{f.code===n.code&&(u=!0,`| ${f.name} |`.includes(`| ${n.name} |`)||(f.name+=` | ${n.name}`))}),u||t.push(I(n))})})),!t?.length&&r?.codedValues&&(t=I(r.codedValues))):r?.codedValues&&(t=r.codedValues)}}),t}function E(i,e){let t=e;if(t){let o="";for(let s=0;s<t.length;s++){let r=t[s];r.code==i&&(o+=(o.length?" | ":"")+r.name)}return o.length||(o=`${i}`),o}return i}function W(i){return["small-integer","big-integer","integer","single","double","long"].includes(i.type)}function P(i){switch(i.type){case"small-integer":case"big-integer":case"integer":case"single":case"double":case"long":return"number";case"blob":case"geometry":case"global-id":case"guid":case"oid":case"raster":case"xml":return;default:return i.type}}var ne=L`:host{width:100%}.container{min-height:30px}.popover-unique-list{width:100%;overflow-y:auto}.unique-values-content-list-msg{font-size:75%;margin:5px}.count{padding:0 6px;font-size:smaller;white-space:nowrap}`,D=class extends S{constructor(){super(...arguments),this.dropdownNode=U(),this._messages=B({blocking:!0}),this._propWatcherTask=new k(this,{task:async([e,t,o])=>{let s=h(e)&&h(t)||h(o);if(!h(o)&&!h(e)&&!h(t)?w("error",this,N("uniqueValues")):h(o)||(h(e)||w("error",this,N("layer")),h(t)||w("error",this,N("fieldName"))),h(e)&&h(t)&&!e.fields?.filter(r=>r.name===t))throw w("error",this,"Field could not be found."),new Error;if(!s)throw new Error;await this.processProps()},args:()=>[this.layer,this.fieldName,this.uniqueValues]}),this.initialRender=!0,this.multiple=!1,this.partialUniqueValues=!1,this.showFilterLength=10,this.arcgisChange=Z(),this.arcgisSortByChange=Z(),this.arcgisLoad=Z()}static{this.properties={initialRender:16,view:0,layer:0,fieldName:1,uniqueValues:0,numberFormatOptions:0,selectedValues:0,sortBy:1,multiple:5,partialUniqueValues:5,showFilterLength:9,maxHeight:9}}static{this.styles=ne}async setFocus(){this.listNode?.setFocus()}async getUniqueValues(){let{fieldInfo:e}=this;if(h(e?.uniqueValueInfos)){let{uniqueValueInfos:t,partialUniqueValues:o}=e;return{uniqueValues:t,partialUniqueValues:o}}}loaded(){this.layer&&this.fieldInfo&&(setTimeout(()=>this.initialRender=!1,800),this.listNode?.setFocus())}async processProps(){let{layer:e,fieldName:t,view:o}=this,s=e?.fields?.filter(r=>r.name===t)?.[0];if(h(this.uniqueValues))this.fieldInfo={layerField:s,fieldDomains:e&&s?A(e,s):void 0,simpleType:e&&s?P(s):void 0,partialUniqueValues:this.partialUniqueValues??!1,uniqueValueInfos:this.uniqueValues},this.arcgisLoad.emit();else if(e&&s){this.fieldInfo={layerField:s,fieldDomains:A(e,s),simpleType:P(s),partialUniqueValues:!1};let{fieldInfo:r}=this;try{let p=await Y({layer:e,view:o,field:t,sqlWhere:"definitionExpression"in e?e.definitionExpression??void 0:void 0,forBinning:!1}),l=W(s),a=p.uniqueValueInfos.filter(n=>h(n.value)?s.type==="string"&&!l||s.type==="guid"?n.value!=="<Null>"&&`${n.value}`.trim()!=="":(W(s)||s.type,n.value!=="<Null>"&&n.value!==""):!1);a.sort((n,u)=>n.count>u.count?-1:n.count<u.count?1:0),r.fieldDomains?.length&&r.fieldDomains.forEach(n=>{a.find(u=>u.value===n.code)||a.push({value:n.code,count:0})}),r.uniqueValueInfos=a,r.partialUniqueValues=p.uniqueValueInfos.length===2e3,this.arcgisLoad.emit()}catch(p){if(w("error",this,`uniqueValues() - ${p.message}`),this.hasFieldDomains(r)){let l=[];r.fieldDomains.forEach(a=>{l.find(n=>n.value===a.code)||l.push({value:a.code,count:void 0})})}}setTimeout(()=>{this.initialRender=!1,this.listNode?.setFocus()},800)}}setListRef(e){let{maxHeight:t}=this;this.listNode=e,t&&e?.setAttribute("style",`max-height: ${t||400}px`)}onSortMenuSelect(e){let t=e.currentTarget.selectedItems?.[0].getAttribute("data-value");this.sortBy=t||void 0,this.arcgisSortByChange.emit(t||void 0)}isSameLists(e,t){if(!e&&!t)return!0;if(!e||!t||e?.length!==t?.length)return!1;for(let o=0;o<e.length;o++)if(e[o]!==t[o])return!1;return!0}hasFieldDomains(e){return!!e.fieldDomains?.length}render(){return this._propWatcherTask.render({complete:()=>{let{fieldInfo:e,selectedValues:t,sortBy:o,multiple:s,initialRender:r,showFilterLength:p,_messages:l}=this,{fieldDomains:a,uniqueValueInfos:n,partialUniqueValues:u,layerField:f}=e,c=f?.type;if(!n?.length)return"";let x=c?["small-integer","big-integer","integer","single","double","long","oid"].includes(c):!1,z=c?["date","date-only","time-only"].includes(c):!1,H=g=>{g.sort((d,m)=>d.count<=m.count?1:-1)},j=g=>{let d=a?.length;g.sort((m,v)=>{if(!d&&x)return(typeof m.value=="string"?Number.parseFloat(m.value):m.value)-(typeof v.value=="string"?Number.parseFloat(v.value):v.value);{let $=d?E(m.value,a):m.value,V=d?E(v.value,a):v.value;return`${$}`.startsWith("_")?1:`${V}`.startsWith("_")?-1:`${$}`.localeCompare(`${V}`)}})},G=(g,d)=>{g.sort((m,v)=>{let $=d?.indexOf(m.value)??-1,V=d?.indexOf(v.value)??-1;return $===V||$>-1&&V>-1?0:$>V?-1:1})};j(n),!o||o==="count"?H(n):o==="selected"&&G(n,t);let J=n.map(g=>this.renderUniqueValue(g)),T;return u&&!r&&(T=b`<div class="unique-values-content-list-msg">${l.errors.tooManyUniqueValues}</div>`),b`<div class="container"><calcite-list .label=${l.values} class="popover-unique-list" .filterEnabled=${n.length>=p} .selectionMode=${s?"multiple":"single"} .filterPlaceholder=${l.searchValues} @calciteListChange=${g=>{let d=g.target.selectedItems.map(m=>m.value);!a&&c==="date-only"?d=d?.map(m=>M(m)):!a&&c==="time-only"?d=d?.map(m=>_(m)):c&&["date","oid","small-integer","big-integer","integer","long"].includes(c)?d=d?.map(m=>Number.parseInt(m)):c&&["single","double"].includes(c)&&(d=d?.map(m=>Number.parseFloat(m))),!this.isSameLists(d,this.selectedValues)&&(this.selectedValues=d,this.arcgisChange.emit(d))}} @calciteListFilter=${()=>{this.dropdownNode.value&&(this.dropdownNode.value.disabled=this.listNode.filteredItems.length<4)}} ${F(this.setListRef)}>${n.length>=p&&!r?this.renderSort(x,z):null}${J}</calcite-list>${T}</div>`},error:()=>""})}renderSort(e,t){let{sortBy:o,_messages:s}=this;return b`<calcite-dropdown slot=filter-actions-end placement=bottom-end overlay-positioning=fixed @calciteDropdownSelect=${this.onSortMenuSelect} ${F(this.dropdownNode)}><calcite-action slot=trigger .label=${s.sortValues} text><calcite-icon scale=s icon=sortDescending flip-rtl></calcite-icon></calcite-action><calcite-dropdown-group><calcite-dropdown-item .selected=${o==="count"||!h(o)} data-value=count>${s.sortByCount}</calcite-dropdown-item><calcite-dropdown-item .selected=${o==="name"} data-value=name>${e||t?s.sortAscending:s.sortAlphabetical}</calcite-dropdown-item><calcite-dropdown-item .selected=${o==="selected"} data-value=selected>${s.sortSelected}</calcite-dropdown-item></calcite-dropdown-group></calcite-dropdown>`}renderUniqueValue(e){let{selectedValues:t,initialRender:o,view:s,fieldInfo:r,numberFormatOptions:p}=this,{fieldDomains:l,uniqueValueInfos:a,simpleType:n}=r,u=s&&"timeZone"in s&&s.timeZone||"system",f=l?.length?E(e.value,l):n==="date"?ee(e.value,u):n==="date-only"?te(e.value):n==="time-only"?ie(e.value):n==="timestamp-offset"?se(e.value,s):typeof e.value=="number"?X(e.value,p):e.value,c=t?n==="date-only"?t.includes(l?.length?e.value:M(e.value)):n==="time-only"?t.includes(l?.length?e.value:_(e.value)):t.includes(e.value):!1;return R(`list-item_${e.value}`,b`<calcite-list-item .label=${`${f}`} .value=${`${e.value}`} .selected=${c}>${h(e.count)&&(a.length>200&&!o||a.length<=200)?b`<div class="count" slot=actions-end>${`${e.count}`}</div>`:null}</calcite-list-item>`)}};O("arcgis-unique-values-list",D);return D},"intl","smartMapping/statistics/uniqueValues","core/lang")
|
|
3
|
+
v5.0.0-next.127 */
|
|
4
|
+
import{a as k,b as h}from"./D6CPSBFQ.js";import{a as R}from"./SDJXKVZA.js";import{b as B}from"./TB4L7OK7.js";import"./IF2NSVPQ.js";import{A as F,B as S,H as O,g as L,i as b,m as w,n as N,q as Z,z as U}from"./ZG65PSAN.js";export default $arcgis.t(([{formatDate:q,convertDateFormatToIntlOptions:y,formatDateOnly:K,formatTimeOnly:Q,formatTimestamp:C,formatNumber:X},Y,{clone:I}])=>{function _(i){return new Date(`1970-01-01T${i}Z`).getTime()}function M(i){return new Date(`${i} 00:00:00`).getTime()}function ee(i,e,t){let o;return e==="unknown"?o=q(i,{...y("short-date-short-time"),timeZone:"utc",timeZoneName:"shortOffset"}):o=q(i,{...y("short-date-short-time"),timeZone:e}),o}function te(i){return i?K(i,y("short-date")):""}function ie(i){let e;return typeof i=="string"?e=Q(i,y("short-date-long-time")):e=q(i,{...y("long-time"),timeZone:"utc"}),e}function se(i,e){return typeof i=="string"?e&&"timeZone"in e&&e.timeZone==="unknown"?C(i,{...y("short-date-short-time"),timeZone:"utc",timeZoneName:"shortOffset"}):C(i,{...y("short-date-short-time"),timeZone:e&&"timeZone"in e&&e.timeZone?e.timeZone:"system"}):e&&"timeZone"in e&&e.timeZone==="unknown"?q(i,{...y("short-date-short-time"),timeZone:"utc",timeZoneName:"shortOffset"}):q(i,{...y("short-date-short-time"),timeZone:e&&"timeZone"in e&&e.timeZone?e.timeZone:"system"})}function A(i,e){if(i.type!=="feature"&&i.type!=="subtype-group"&&i.type!=="subtype-sublayer"&&i.type!=="imagery")return;let t;return i.fields.forEach(o=>{let s=o.name,r=o.domain;if(i.type!=="imagery"&&i.subtypeField===s){let p;i.type==="subtype-group"||i.type==="feature"?p=i.subtypes:p=i.parent.subtypes,p.forEach(l=>{i.type==="subtype-sublayer"&&i.subtypeCode!==l.code||(e.name===s&&(t=t||[],t.push({code:l.code,name:l.name})),l.domains&&Object.keys(l.domains).forEach(a=>{if(e.name===a){let n=l.domains[a];n?.type==="coded-value"&&n?.codedValues&&n.codedValues.forEach(u=>{let f=!1;t=t||[],t.forEach(c=>{c.code===u.code&&(f=!0,`| ${c.name} |`.includes(`| ${u.name} |`)||(c.name+=` | ${u.name}`))}),f||t.push({code:u.code,name:u.name})})}}))})}if(e.name===s&&(i.type==="feature"||i.type==="imagery")){let p=i.type==="feature"?i.typeIdField:void 0,l=i.type==="feature"?i.types:void 0;i.type==="feature"&&p&&l?(p===s?t=l.map(a=>({code:a.id,name:a.name})):(t=t||[],l.forEach(a=>{if(!a.domains?.[s]||a.domains[s].type==="inherited"){let n=r;n?.codedValues&&n.codedValues.forEach(u=>{let f=!1;t.forEach(c=>{c.code===u.code&&(f=!0,`| ${c.name} |`.includes(`| ${u.name} |`)||(c.name+=` | ${u.name}`))}),f||t.push(I(u))})}else a.domains?.[s]?.codedValues&&a.domains[s].codedValues.forEach(n=>{let u=!1;t.forEach(f=>{f.code===n.code&&(u=!0,`| ${f.name} |`.includes(`| ${n.name} |`)||(f.name+=` | ${n.name}`))}),u||t.push(I(n))})})),!t?.length&&r?.codedValues&&(t=I(r.codedValues))):r?.codedValues&&(t=r.codedValues)}}),t}function E(i,e){let t=e;if(t){let o="";for(let s=0;s<t.length;s++){let r=t[s];r.code==i&&(o+=(o.length?" | ":"")+r.name)}return o.length||(o=`${i}`),o}return i}function W(i){return["small-integer","big-integer","integer","single","double","long"].includes(i.type)}function P(i){switch(i.type){case"small-integer":case"big-integer":case"integer":case"single":case"double":case"long":return"number";case"blob":case"geometry":case"global-id":case"guid":case"oid":case"raster":case"xml":return;default:return i.type}}var ne=L`:host{width:100%}.container{min-height:30px}.popover-unique-list{width:100%;overflow-y:auto}.unique-values-content-list-msg{font-size:75%;margin:5px}.count{padding:0 6px;font-size:smaller;white-space:nowrap}`,D=class extends S{constructor(){super(...arguments),this.dropdownNode=U(),this._messages=B({blocking:!0}),this._propWatcherTask=new k(this,{task:async([e,t,o])=>{let s=h(e)&&h(t)||h(o);if(!h(o)&&!h(e)&&!h(t)?w("error",this,N("uniqueValues")):h(o)||(h(e)||w("error",this,N("layer")),h(t)||w("error",this,N("fieldName"))),h(e)&&h(t)&&!e.fields?.filter(r=>r.name===t))throw w("error",this,"Field could not be found."),new Error;if(!s)throw new Error;await this.processProps()},args:()=>[this.layer,this.fieldName,this.uniqueValues]}),this.initialRender=!0,this.multiple=!1,this.partialUniqueValues=!1,this.showFilterLength=10,this.arcgisChange=Z(),this.arcgisSortByChange=Z(),this.arcgisLoad=Z()}static{this.properties={initialRender:16,view:0,layer:0,fieldName:1,uniqueValues:0,numberFormatOptions:0,selectedValues:0,sortBy:1,multiple:5,partialUniqueValues:5,showFilterLength:9,maxHeight:9}}static{this.styles=ne}async setFocus(){this.listNode?.setFocus()}async getUniqueValues(){let{fieldInfo:e}=this;if(h(e?.uniqueValueInfos)){let{uniqueValueInfos:t,partialUniqueValues:o}=e;return{uniqueValues:t,partialUniqueValues:o}}}loaded(){this.layer&&this.fieldInfo&&(setTimeout(()=>this.initialRender=!1,800),this.listNode?.setFocus())}async processProps(){let{layer:e,fieldName:t,view:o}=this,s=e?.fields?.filter(r=>r.name===t)?.[0];if(h(this.uniqueValues))this.fieldInfo={layerField:s,fieldDomains:e&&s?A(e,s):void 0,simpleType:e&&s?P(s):void 0,partialUniqueValues:this.partialUniqueValues??!1,uniqueValueInfos:this.uniqueValues},this.arcgisLoad.emit();else if(e&&s){this.fieldInfo={layerField:s,fieldDomains:A(e,s),simpleType:P(s),partialUniqueValues:!1};let{fieldInfo:r}=this;try{let p=await Y({layer:e,view:o,field:t,sqlWhere:"definitionExpression"in e?e.definitionExpression??void 0:void 0,forBinning:!1}),l=W(s),a=p.uniqueValueInfos.filter(n=>h(n.value)?s.type==="string"&&!l||s.type==="guid"?n.value!=="<Null>"&&`${n.value}`.trim()!=="":(W(s)||s.type,n.value!=="<Null>"&&n.value!==""):!1);a.sort((n,u)=>n.count>u.count?-1:n.count<u.count?1:0),r.fieldDomains?.length&&r.fieldDomains.forEach(n=>{a.find(u=>u.value===n.code)||a.push({value:n.code,count:0})}),r.uniqueValueInfos=a,r.partialUniqueValues=p.uniqueValueInfos.length===2e3,this.arcgisLoad.emit()}catch(p){if(w("error",this,`uniqueValues() - ${p.message}`),this.hasFieldDomains(r)){let l=[];r.fieldDomains.forEach(a=>{l.find(n=>n.value===a.code)||l.push({value:a.code,count:void 0})})}}setTimeout(()=>{this.initialRender=!1,this.listNode?.setFocus()},800)}}setListRef(e){let{maxHeight:t}=this;this.listNode=e,t&&e?.setAttribute("style",`max-height: ${t||400}px`)}onSortMenuSelect(e){let t=e.currentTarget.selectedItems?.[0].getAttribute("data-value");this.sortBy=t||void 0,this.arcgisSortByChange.emit(t||void 0)}isSameLists(e,t){if(!e&&!t)return!0;if(!e||!t||e?.length!==t?.length)return!1;for(let o=0;o<e.length;o++)if(e[o]!==t[o])return!1;return!0}hasFieldDomains(e){return!!e.fieldDomains?.length}render(){return this._propWatcherTask.render({complete:()=>{let{fieldInfo:e,selectedValues:t,sortBy:o,multiple:s,initialRender:r,showFilterLength:p,_messages:l}=this,{fieldDomains:a,uniqueValueInfos:n,partialUniqueValues:u,layerField:f}=e,c=f?.type;if(!n?.length)return"";let x=c?["small-integer","big-integer","integer","single","double","long","oid"].includes(c):!1,z=c?["date","date-only","time-only"].includes(c):!1,H=g=>{g.sort((d,m)=>d.count<=m.count?1:-1)},j=g=>{let d=a?.length;g.sort((m,v)=>{if(!d&&x)return(typeof m.value=="string"?Number.parseFloat(m.value):m.value)-(typeof v.value=="string"?Number.parseFloat(v.value):v.value);{let $=d?E(m.value,a):m.value,V=d?E(v.value,a):v.value;return`${$}`.startsWith("_")?1:`${V}`.startsWith("_")?-1:`${$}`.localeCompare(`${V}`)}})},G=(g,d)=>{g.sort((m,v)=>{let $=d?.indexOf(m.value)??-1,V=d?.indexOf(v.value)??-1;return $===V||$>-1&&V>-1?0:$>V?-1:1})};j(n),!o||o==="count"?H(n):o==="selected"&&G(n,t);let J=n.map(g=>this.renderUniqueValue(g)),T;return u&&!r&&(T=b`<div class="unique-values-content-list-msg">${l.errors.tooManyUniqueValues}</div>`),b`<div class="container"><calcite-list .label=${l.values} class="popover-unique-list" .filterEnabled=${n.length>=p} .selectionMode=${s?"multiple":"single"} .filterPlaceholder=${l.searchValues} @calciteListChange=${g=>{let d=g.target.selectedItems.map(m=>m.value);!a&&c==="date-only"?d=d?.map(m=>M(m)):!a&&c==="time-only"?d=d?.map(m=>_(m)):c&&["date","oid","small-integer","big-integer","integer","long"].includes(c)?d=d?.map(m=>Number.parseInt(m)):c&&["single","double"].includes(c)&&(d=d?.map(m=>Number.parseFloat(m))),!this.isSameLists(d,this.selectedValues)&&(this.selectedValues=d,this.arcgisChange.emit(d))}} @calciteListFilter=${()=>{this.dropdownNode.value&&(this.dropdownNode.value.disabled=this.listNode.filteredItems.length<4)}} ${F(this.setListRef)}>${n.length>=p&&!r?this.renderSort(x,z):null}${J}</calcite-list>${T}</div>`},error:()=>""})}renderSort(e,t){let{sortBy:o,_messages:s}=this;return b`<calcite-dropdown slot=filter-actions-end placement=bottom-end overlay-positioning=fixed @calciteDropdownSelect=${this.onSortMenuSelect} ${F(this.dropdownNode)}><calcite-action slot=trigger .label=${s.sortValues} text><calcite-icon scale=s icon=sortDescending flip-rtl></calcite-icon></calcite-action><calcite-dropdown-group><calcite-dropdown-item .selected=${o==="count"||!h(o)} data-value=count>${s.sortByCount}</calcite-dropdown-item><calcite-dropdown-item .selected=${o==="name"} data-value=name>${e||t?s.sortAscending:s.sortAlphabetical}</calcite-dropdown-item><calcite-dropdown-item .selected=${o==="selected"} data-value=selected>${s.sortSelected}</calcite-dropdown-item></calcite-dropdown-group></calcite-dropdown>`}renderUniqueValue(e){let{selectedValues:t,initialRender:o,view:s,fieldInfo:r,numberFormatOptions:p}=this,{fieldDomains:l,uniqueValueInfos:a,simpleType:n}=r,u=s&&"timeZone"in s&&s.timeZone||"system",f=l?.length?E(e.value,l):n==="date"?ee(e.value,u):n==="date-only"?te(e.value):n==="time-only"?ie(e.value):n==="timestamp-offset"?se(e.value,s):typeof e.value=="number"?X(e.value,p):e.value,c=t?n==="date-only"?t.includes(l?.length?e.value:M(e.value)):n==="time-only"?t.includes(l?.length?e.value:_(e.value)):t.includes(e.value):!1;return R(`list-item_${e.value}`,b`<calcite-list-item .label=${`${f}`} .value=${`${e.value}`} .selected=${c}>${h(e.count)&&(a.length>200&&!o||a.length<=200)?b`<div class="count" slot=actions-end>${`${e.count}`}</div>`:null}</calcite-list-item>`)}};O("arcgis-unique-values-list",D);return D},"intl","smartMapping/statistics/uniqueValues","core/lang")
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
2
2
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
3
|
-
v5.0.0-next.
|
|
3
|
+
v5.0.0-next.127 */
|
|
4
4
|
var o={arcgisAppCkeditor:"arcgis-app-ckeditor",arcgisAppCkeditorMentionHeader:"arcgis-app-ckeditor-mention-header",arcgisAppCkeditorMentionItem:"arcgis-app-ckeditor-mention-item",arcgisAppCkeditorMentionItemContainer:"arcgis-app-ckeditor-mention-item-container",arcgisAppCkeditorPopoverContainer:"arcgis-app-ckeditor-popover-container",arcgisAppCkeditorPopoverFooter:"arcgis-app-ckeditor-popover-footer",popover:"popover"};export{o as a};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
2
2
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
3
|
-
v5.0.0-next.
|
|
4
|
-
import{a as b}from"./
|
|
3
|
+
v5.0.0-next.127 */
|
|
4
|
+
import{a as b}from"./XC57VMCW.js";import{B as m,H as o,g as h,i as d,q as r}from"./ZG65PSAN.js";var $=h`.container{display:flex;align-items:center;justify-content:space-between;position:relative}.slider{width:50%}.input{width:45%}`,p=class extends m{constructor(){super(...arguments),this.debouncedApplyValueOnChange=b(e=>this.applyValueOnChange(e),800),this.disabled=!1,this.flipLabels=!1,this.min=0,this.max=100,this.value=50,this.step=1,this.withSteppers=!1,this.arcgisSliderInputValueChange=r(),this.arcgisValueChange=r()}static{this.properties={disabled:5,label:1,flipLabels:5,min:9,max:9,value:9,step:9,unitsLabel:1,withSteppers:5}}static{this.styles=$}applyValueOnChange(e){let{min:i,max:a,value:n}=this,s=Number(e.value),t=i!==void 0&&a!==void 0?Math.min(a,Math.max(i,s)):s;s!==n&&(e.value=`${t}`,this.arcgisValueChange.emit(t),this.arcgisSliderInputValueChange.emit(t),this.value=t)}render(){let{disabled:e,min:i,max:a,value:n,step:s,withSteppers:t,flipLabels:c,unitsLabel:u,label:g}=this;return d`<div class="container"><calcite-slider class="slider" .disabled=${e} .min=${i} .max=${a} .value=${n} .step=${s} @calciteSliderInput=${l=>this.debouncedApplyValueOnChange(l.currentTarget)}></calcite-slider><calcite-input class="input" .disabled=${e} .min=${i} .max=${a} .numberButtonType=${t?"vertical":"none"} .prefixText=${c?u:""} @calciteInputInput=${l=>this.debouncedApplyValueOnChange(l.target)} @click=${l=>l.stopPropagation()} scale=s step=any .suffixText=${c?"":u} type=number .value=${`${n}`} .label=${g}></calcite-input></div>`}};o("arcgis-slider-input",p);export{p as ArcgisSliderInput};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
2
2
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
3
|
-
v5.0.0-next.
|
|
4
|
-
import{B as p,H as m,g as l,i as e}from"./
|
|
3
|
+
v5.0.0-next.127 */
|
|
4
|
+
import{B as p,H as m,g as l,i as e}from"./ZG65PSAN.js";export default $arcgis.t(([t])=>{var h=l`:host{display:block;block-size:30px;inline-size:100%}:host([layout="vertical"]){writing-mode:vertical-lr}arcgis-ramp-color{block-size:inherit;inline-size:inherit}`,c=new t([0,121,193]),o=class extends p{constructor(){super(...arguments),this._rampStops=[],this.fillColor=c.clone(),this.layout="horizontal",this.min=0,this.max=1,this.stops=[]}static{this.properties={fillColor:1,layout:1,min:9,max:9,stops:0}}static{this.styles=h}willUpdate(s){if(super.willUpdate(s),s.has("fillColor")||s.has("stops")){let{stops:n,fillColor:i}=this,r=(i instanceof t?i:t.fromString(i)??c).toRgb();this._rampStops=n.map(a=>({color:new t(r&&[...r,a.opacity]),value:a.value}))}}render(){return e`<arcgis-ramp-color .layout=${this.layout} .stops=${this._rampStops} .min=${this.min} .max=${this.max}></arcgis-ramp-color>`}};m("arcgis-ramp-opacity",o);return o},"Color")
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
2
2
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
3
|
-
v5.0.0-next.
|
|
3
|
+
v5.0.0-next.127 */
|
|
4
4
|
function g(n){return a(n).length>0}function a(n,t){return l(n.target,t)}function l(n,t){let e=n.assignedElements({flatten:!0});return t?e.filter(s=>s.matches(t)):e}var E=(...n)=>{let t=[];for(let s=0;s<n.length;s++){let o=n[s];if(typeof o=="string")t.push(o);else if(Array.isArray(o))t.push.apply(t,o);else if(typeof o=="object")for(let r in o)o[r]&&t.push(r)}let e=t.join(" ");return t.length=0,e},d=(n,t)=>{let e=n;for(;e;){if(e===t)return!0;if(!e.parentNode)return!1;e.parentNode instanceof ShadowRoot?e=e.parentNode.host:e=e.parentNode}return!1},b=(n,t,e)=>{let s=f(t).subscribe;return s(o=>{o.some(i=>d(n,i.target))&&e()})},c={},f=n=>{let t=n.join(","),e=c[t];if(e!==void 0)return e;let s=new Set,o=new MutationObserver(i=>s.forEach(u=>u(i)));globalThis.document&&o.observe(document.documentElement,{attributes:!0,attributeFilter:n,subtree:!0});let r={subscribe:i=>(s.add(i),()=>{s.delete(i),s.size===0&&(o.disconnect(),c[t]=void 0)})};return c[t]=r,r},h=(n,t)=>{let e=n;for(;e;){let s=e.closest?.(t);if(s)return s;let o=e.getRootNode?.();if(o===globalThis.document)return;e=o.host}};var p=n=>m(n,"dir","ltr"),m=(n,t,e)=>h(n,`[${t}]`)?.getAttribute(t)??e;export{g as a,E as b,b as c,h as d,p as e,m as f};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
2
2
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
3
|
-
v5.0.0-next.
|
|
4
|
-
import{b as E}from"./
|
|
3
|
+
v5.0.0-next.127 */
|
|
4
|
+
import{b as E}from"./TB4L7OK7.js";import"./IF2NSVPQ.js";import{B as D,C as f,D as y,E as u,H as _,g as L,i as x,j as d}from"./ZG65PSAN.js";export default $arcgis.t(([{substitute:z}])=>{var p={content:"content",svg:"svg",label:"label",dataLine:"data-line",averageDataLine:"average-data-line",dataLineSymbol:"data-line-symbol"},N=L`:host{display:flex;--arcgis-histogram-bar-color: var(--calcite-color-border-1);--arcgis-histogram-stop-color: color-mix(in srgb, var(--calcite-color-brand) 80%, transparent)}.content{display:flex;flex:1;direction:ltr}.svg{display:inline-block;flex:1;overflow:hidden}.data-line{stroke:#888;stroke-width:1px;shape-rendering:crispEdges}.average-data-line{stroke-width:1px;shape-rendering:crispEdges;stroke:#444}.label,.data-line-symbol{font-size:12px;stroke:#fff;stroke-width:2px;paint-order:stroke;unicode-bidi:plaintext}.data-line-symbol{font-family:"Georgia, serif",sans-serif;font-style:italic}`;function B(n,r,t,e,a){let[i,s]=a;if(!n||s===0||i===0||t==null||r==null)return null;let o=t-r,l=(n.length>1?n[n.length-1].maxValue-n[0].minValue:0)/o,[c,h]=e==="vertical"?[s*l,i]:[s,i*l],b=n?n.map(m=>m.count):[],g=Math.max(...b);return n.map(m=>{let[$,v]=e==="vertical"?[c/n.length,g!==0?m.count/g*h:0]:[g!==0?m.count/g*c:0,h/n.length],{maxValue:k}=m,V=t-k,[I,C]=e==="vertical"?[0,V*(s/o)]:[i-v-V*(i/o),s-$];return[I,C,v,$]})}function A(n,r,t,e,a){let i=[];return n!=null&&i.push({value:n,symbol:"x\u0304",lineClass:p.averageDataLine}),r!=null&&t!=null&&e!=null&&i.push(...H(t,e,r,n)),a&&i.push(...a),i}function P(n,r,t,e,a){if(t==null)return[0,0,0,0];let i=Math.round((a-t)/e*100)/100,[s,o]=n;if(r==="vertical"){let c=o-i*o||1;return c=Math.round(c)+.5,[0,"100%",c,c]}let l=i*s||1;return l=Math.round(l)+.5,[l,l,"100%",0]}function T(n,r,t,e,a){if(t==null)return[0,0];let i=Math.round((a-t)/e*100)/100,[s,o]=n;return r==="vertical"?[s,o-i*o]:[0,i*s]}function O(n,r,t){if(!n||n.length===0)return null;if(S(n)){let e=n.map(a=>({...a,color:M(a.color??t)}));return e.unshift({color:r,minValue:Number.NEGATIVE_INFINITY,maxValue:e[0].minValue}),e.push({color:r,minValue:e[e.length-1].maxValue,maxValue:Number.POSITIVE_INFINITY}),e}else return n.map(e=>({...e,color:M(e.color??t)}))}function R(n,r,t,e){if(!n||n.length===0)return t;if(S(n)){let a=G(n,r);if(a.length===0)return t;if(e){let{color:i=t,weight:s}=a[0],{color:o=t,weight:l}=a[1]??a[0],c=s+l;return`color-mix(in srgb, ${i} ${s/c*100}%, ${o} ${l/c*100}%)`}return a[0].color??t}return Y(n,r)}function G(n,r){let t=[];for(let e of n){let a=Math.max(0,Math.min(r.maxValue,e.maxValue)-Math.max(r.minValue,e.minValue));a>0&&t.push({color:e.color,weight:a})}return t.sort((e,a)=>a.weight-e.weight)}function Y(n,r){let t=(r.maxValue-r.minValue)/2+r.minValue;if(t>n[n.length-1].value)return n[n.length-1].color;for(let e=0;e<n.length-1;e++){let a=n[e],i=n[e+1];if(t<=a.value)return a.color;if(t<i.value){let s=(t-a.value)/(i.value-a.value)*100;return`color-mix(in srgb, ${a.color}, ${i.color} ${s}%)`}}return n[n.length-1].color}function S(n){return n[0]!=null&&"minValue"in n[0]}function M(n){if(!n)return;if(typeof n=="string")return n;if(Array.isArray(n))return`rgba(${n[0]}, ${n[1]}, ${n[2]}, ${n[3]??1})`;let{r,g:t,b:e,a=1}=n;return`rgba(${r}, ${t}, ${e}, ${a})`}function H(n,r,t,e){let a=.06*(r-n);return U(t,e).filter(i=>Math.abs(e-i)>a).map((i,s,o)=>{let l=o.length/2,c=i>e?"+":"-",h=s>=l?s-l+1:l-s;return{symbol:`${c}${h===1?"":h}\u03C3`,value:i}})}function U(n,r){if(r==null||n==null)return[];let t=1,e=[];for(let a=t*-1;a<=t;a++)a!==0&&e.push(r+a*n);return e}var F="var(--arcgis-histogram-bar-color)",q="var(--arcgis-histogram-stop-color)",w=class extends D{constructor(){super(...arguments),this._messages=E(),this._normalizedStops=null,this.containerDimensions=[0,0],this.icon="graph-histogram",this.layout="horizontal",this.colorBlendingEnabled=!1}static{this.properties={containerDimensions:16,colorStops:0,icon:3,average:11,messageOverrides:0,standardDeviation:11,bins:0,dataLines:0,label:1,labelFormatFunction:0,layout:3,max:11,min:11,colorBlendingEnabled:5}}static{this.styles=N}loaded(){let r=new ResizeObserver(a=>{for(let i of a){let{width:s,height:o}=i.contentRect;this.containerDimensions=[s,o]}}),{width:t,height:e}=this.el.getBoundingClientRect();this.containerDimensions=[t,e],r.observe(this.el)}willUpdate(r){r.has("colorStops")&&(this._normalizedStops=O(this.colorStops,F,q))}render(){let{label:r}=this;return this.containerDimensions?x`<div role=img .ariaLabel=${r??void 0} class=${f(p.content)}>${this._renderContent()}</div>`:null}_renderContent(){let{containerDimensions:[r,t]}=this,e="bg-fill";return x`<svg class=${f(p.svg)} xmlns=http://www.w3.org/2000/svg>${d`<defs><clipPath id=${e}><rect height=${t??u} width=${r??u} x=0 y=0 /></clipPath></defs><g style=${y({clipPath:`url(#${e})`})}><g>${this._renderBars()}</g></g><g>${this._renderLines()}</g>`}</svg>`}_renderBars(){let{bins:r,_messages:t}=this,e=B(this.bins,this.min,this.max,this.layout,this.containerDimensions);return!e||!r?null:e.map((a,i)=>{let[s,o,l,c]=a,h=r[i],b=t?.barLabel?z(t.barLabel,h):"";return d`<rect style=${y({fill:R(this._normalizedStops,h,F,this.colorBlendingEnabled)})} .ariaLabel=${b} data-index=${i??u} height=${c??u} role=img shape-rendering=crispEdges stroke-width=0 width=${l??u} x=${s??u} y=${o??u} />`})}_renderLines(){return A(this.average,this.standardDeviation,this.min,this.max,this.dataLines)?.map(r=>W({dataLine:r,containerDimensions:this.containerDimensions,layout:this.layout,min:this.min,max:this.max,labelFormatFunction:this.labelFormatFunction}))}},W=n=>{let{containerDimensions:r,layout:t,min:e,max:a,dataLine:i,labelFormatFunction:s}=n,o=a!=null&&e!=null?a-e:0,[l,c,h,b]=P(r,t,e,o,i.value),[g,m]=T(r,t,e,o,i.value),$="symbol"in i?[d`<tspan class=${f(p.dataLineSymbol)}>${i.symbol}</tspan>`,d`<tspan>${s?s(i.value):i.value}</tspan>`]:i.label,v="lineClass"in i&&i.lineClass?i.lineClass:p.dataLine;return d`<g><title>${i.value}</title><line class=${f(v)} shape-rendering=crispEdges x1=${l??u} x2=${c??u} y1=${h??u} y2=${b??u} /><text class=${f(p.label)} text-anchor=end transform=${(t==="horizontal"?"rotate(270)":void 0)??u} x=${g??u} y=${m-2}>${$}</text></g>`};_("arcgis-histogram",w);return w},"intl")
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
2
2
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
3
|
-
v5.0.0-next.
|
|
4
|
-
import{B as l,H as e,g as r,i as a}from"./
|
|
3
|
+
v5.0.0-next.127 */
|
|
4
|
+
import{B as l,H as e,g as r,i as a}from"./ZG65PSAN.js";var h=r`:host{display:block;block-size:30px;inline-size:100%}:host([layout="vertical"]){writing-mode:vertical-lr}arcgis-ramp-color{block-size:inherit;inline-size:inherit}`,s=class extends l{constructor(){super(...arguments),this._rampStops=[],this.layout="horizontal",this.min=0,this.max=1,this.stops=[]}static{this.properties={layout:1,min:9,max:9,stops:0}}static{this.styles=h}willUpdate(t){if(super.willUpdate(t),t.has("stops")){let{stops:p}=this,i=[];p.forEach(c=>{let{color:o,max:m,min:n}=c;i.push({value:n,color:o},{value:m,color:o})}),this._rampStops=i}}render(){return a`<arcgis-ramp-color .layout=${this.layout} .min=${this.min} .max=${this.max} .stops=${this._rampStops}></arcgis-ramp-color>`}};e("arcgis-ramp-color-break",s);export{s as ArcgisRampColorBreak};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
2
2
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
3
|
-
v5.0.0-next.
|
|
4
|
-
import{a as X}from"./PAH5NEYW.js";import{a as J,b as Q}from"./M5JGIZYS.js";import{a as V,b as G,d as Z}from"./4CRBTYNF.js";import{A as R,B as W,C as $,D as T,E as w,H as Y,g as H,i as f,o as q,p as K,q as E,s as j,t as O,z as A}from"./UIGZUM56.js";export default $arcgis.t(([{on:ze,watch:ee},{createObservable:ce,trackAccess:de},{property:Ne,subclass:Be},He,pe,{property:k,subclass:ve},{watch:F}])=>{var te=(i,e)=>t=>he(t,i),S=class extends j{constructor(e,t){super(e),this.Y=new Map,this.A=void 0,this.#r=ce();let r=this;r.#e=t,r.Z(),r.setProvisionalExports(ue(e,new WeakRef(r),e.M.length-1,r.instance,r.Y),!1),q(e,n=>{if(n){let a=ee(()=>e[n],l=>{if(l===r.instance)return;let s=r.instance;r.exports=l,r.instance=l,r.Y.forEach((o,d)=>e.requestUpdate(o,s[d])),r.#t&&s.destroy(),r.#t=!1},{sync:!0});r.onDestroy(a.remove)}},r.exports)}#t;#r;#e;get exports(){return de(this.#r),super.exports}set exports(e){super.exports=e,this.#r.notify()}Z(){let e=this;e.instance="prototype"in e.#e&&"declaredClass"in e.#e.prototype?new e.#e:e.#e(),e.#t=!0}hostConnected(){this.exports=this.instance}hostDestroy(){this.#t&&this.instance.destroy?.()}},he=J(S),ue=(i,e,t,r,n)=>new Proxy(r,{get:(a,l)=>{let s=a[l];if(typeof l=="symbol"||n.has(l))return s;let o=i.M[t];return o.A=l,K(i,d=>{if(o.A=void 0,d!==void 0){let c=d.key;n.set(l,c);let h=i.constructor.getPropertyOptions(c),u=l!==c&&c.toLowerCase().includes("disable");ge(e,h,l,c,u),h.i===void 0&&me(h,t,l,u)}},s)}}),ge=(i,e,t,r,n,a)=>a=ee(()=>{let l=i.deref();return l===void 0||l.component.manager.destroyed?a=a.remove():l.exports[t]},(l,s)=>{if(!a)return;i.deref().component?.requestUpdate(r,n?!s:s),e.c=!1},{sync:!0}),me=(i,e,t,r)=>{i.d.get=function(){let n=this.M[e]?.exports[t];return r?!n:n},i.d.set=function(n){let a=this.M[e];a.A!==t&&(a.exports[t]=r?!n:n)}};function*re(i,e){if(i!==void 0){let t=0;for(let r of i)yield e(r,t++)}}var fe=H`:host{display:flex;width:100%;height:100%;font-family:Avenir Next,Helvetica Neue,helvetica,arial,sans-serif;font-size:var(--calcite-font-size--2);font-variant-numeric:tabular-nums;--arcgis-slider-dash-length: 5px;--arcgis-slider-handle-size: .875rem;--arcgis-slider-track-background-color: var(--calcite-color-border-2);--arcgis-slider-internal-show-range-labels: 0;--arcgis-slider-internal-show-value-labels: 0;--arcgis-slider-internal-value-labels-placement-leading: 0;--arcgis-slider-internal-value-labels-placement-trailing: 0;--arcgis-slider-internal-range-labels-placement-center: 0;--arcgis-slider-internal-range-labels-placement-trailing: 0;--arcgis-slider-internal-handle-offset: calc(var(--arcgis-slider-handle-size) / 2);--arcgis-slider-internal-label-input-margin: calc(var(--arcgis-slider-internal-handle-offset) + 4px);--arcgis-slider-internal-label-input-height: var(--calcite-input-number-height, 1.5rem);--arcgis-slider-internal-track-size: 2px}:host([show-range-labels]){--arcgis-slider-internal-show-range-labels: 1}:host(:not([value-labels-display="hidden"])){--arcgis-slider-internal-show-value-labels: 1}:host([value-labels-placement="leading"]){--arcgis-slider-internal-value-labels-placement-leading: var(--arcgis-slider-internal-show-value-labels)}:host([value-labels-placement="trailing"]){--arcgis-slider-internal-value-labels-placement-trailing: var(--arcgis-slider-internal-show-value-labels)}:host([range-labels-placement="center"]){--arcgis-slider-internal-range-labels-placement-center: var(--arcgis-slider-internal-show-range-labels)}:host([range-labels-placement="trailing"]){--arcgis-slider-internal-range-labels-placement-trailing: var(--arcgis-slider-internal-show-range-labels)}:host([disabled]){cursor:default;opacity:var(--calcite-opacity-disabled);pointer-events:none}.content{direction:ltr;flex:1;touch-action:none;user-select:none;display:grid;word-wrap:normal;word-break:normal;padding-block:var(--arcgis-slider-internal-handle-offset)}.track-container{grid-area:track-container;position:relative;display:flex;justify-content:center;align-items:center}.track{touch-action:none;position:relative}.track-bounds{background-color:var(--calcite-color-border-2)}.track-fill{--arcgis-slider-track-background-color: var(--calcite-color-brand)}:host([layout="vertical"]){.track-effective-leading{background:repeating-linear-gradient(to bottom,var(--arcgis-slider-track-background-color) 0 var(--arcgis-slider-dash-length),color-mix(in srgb,transparent 75%,var(--arcgis-slider-track-background-color) 25%) var(--arcgis-slider-dash-length) calc(var(--arcgis-slider-dash-length) * 2))}.track-effective-trailing{background:repeating-linear-gradient(to top,var(--arcgis-slider-track-background-color) 0 var(--arcgis-slider-dash-length),color-mix(in srgb,transparent 75%,var(--arcgis-slider-track-background-color) 25%) var(--arcgis-slider-dash-length) calc(var(--arcgis-slider-dash-length) * 2))}}:host([layout="horizontal"]){.track-effective-leading{background:repeating-linear-gradient(to right,var(--arcgis-slider-track-background-color) 0 var(--arcgis-slider-dash-length),color-mix(in srgb,transparent 75%,var(--arcgis-slider-track-background-color) 25%) var(--arcgis-slider-dash-length) calc(var(--arcgis-slider-dash-length) * 2))}.track-effective-trailing{background:repeating-linear-gradient(to left,var(--arcgis-slider-track-background-color) 0 var(--arcgis-slider-dash-length),color-mix(in srgb,transparent 75%,var(--arcgis-slider-track-background-color) 25%) var(--arcgis-slider-dash-length) calc(var(--arcgis-slider-dash-length) * 2))}}.track-range{background-color:var(--calcite-color-brand);&.active{box-shadow:0 0 8px #00000029;outline:1px solid var(--calcite-color-focus, var(--calcite-color-focus, var(--calcite-color-brand)))}}:host([disabled]) .track-range{background-color:var(--calcite-color-text-3)}:host([layout="horizontal"]){.track-range.interactive{&:after{all:initial;cursor:ew-resize;position:absolute;inline-size:100%;content:"";inset-block-start:calc(-1 * var(--arcgis-slider-internal-handle-offset));block-size:var(--arcgis-slider-handle-size);margin-top:1px}}}:host([layout="vertical"]){.track-range.interactive{&:after{all:initial;cursor:ns-resize;position:absolute;inline-size:100%;content:"";inset-block-start:var(--arcgis-slider-internal-handle-offset);block-size:var(--arcgis-slider-handle-size);margin-left:1px}}}.segment{transform-origin:0 0;inset-block-start:0px;block-size:.125rem;position:absolute;top:0;left:0}.thumb{-webkit-user-select:none;user-select:none;background-color:#4c4c4c;position:absolute}.thumb:focus,.thumb.active{.handle{background-color:var(--calcite-color-brand);box-shadow:0 0 8px #00000029;outline:2px solid var(--calcite-color-focus, var(--calcite-color-focus, var(--calcite-color-brand)));outline-offset:calc(2px*(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}}.handle{cursor:pointer;box-sizing:border-box;z-index:1;touch-action:none;background-color:var(--calcite-color-foreground-1);box-shadow:0 0 0 2px var(--calcite-color-text-3) inset;border-radius:var(--arcgis-slider-handle-size);width:var(--arcgis-slider-handle-size);height:var(--arcgis-slider-handle-size);transition:all .125s ease-in-out;position:absolute;top:calc(var(--arcgis-slider-internal-handle-offset) * -1);left:calc(var(--arcgis-slider-internal-handle-offset) * -1)}.handle:hover{box-shadow:0 0 0 3px var(--calcite-color-brand) inset}.label{position:absolute;will-change:transform}.label[hidden]{display:block;opacity:0;pointer-events:none}.min{grid-area:range-start}.max{grid-area:range-end}:host([layout="horizontal"][mirrored][range-labels-placement="center"]),:host([layout="vertical"]:not([mirrored])){.min{grid-area:range-end}.max{grid-area:range-start}}.content-start{grid-area:content-start;display:flex}.content-end{grid-area:content-end;display:flex}:host([layout="vertical"]){.content{grid-template:". range-start range-start range-start ." "content-start content-start track-container content-end content-end" ". range-end range-end range-end .";grid-template-rows:auto 1fr auto;grid-template-columns:1fr auto auto auto 1fr;row-gap:var(--arcgis-slider-internal-handle-offset)}.track-container{flex-direction:column}.track{flex:1;width:var(--arcgis-slider-internal-track-size)}.segment{writing-mode:vertical-lr}.label{top:calc(var(--arcgis-slider-internal-label-input-height) * -.5)}&:host([value-labels-placement="leading"]){.label{right:var(--arcgis-slider-internal-label-input-margin)}}&:host([value-labels-placement="trailing"]){.label{left:var(--arcgis-slider-internal-label-input-margin)}}}:host([layout="horizontal"][range-labels-placement="center"]){.content{--arcgis-slider-internal-content-start-min-height: calc( ((1 - var(--arcgis-slider-internal-show-range-labels)) * var(--arcgis-slider-internal-handle-offset)) + ( var(--arcgis-slider-internal-value-labels-placement-leading) * var(--arcgis-slider-internal-label-input-height) ) );--arcgis-slider-internal-content-end-min-height: calc( ((1 - var(--arcgis-slider-internal-show-range-labels)) * var(--arcgis-slider-internal-handle-offset)) + ( var(--arcgis-slider-internal-value-labels-placement-trailing) * var(--arcgis-slider-internal-label-input-height) ) );column-gap:calc(var(--arcgis-slider-internal-show-range-labels) * var(--arcgis-slider-internal-handle-offset) / 2);padding-inline:calc((1 - var(--arcgis-slider-internal-show-range-labels)) * var(--arcgis-slider-internal-handle-offset));grid-template:". content-start ." "range-start content-start range-end" "range-start track-container range-end" "range-start content-end range-end" ". content-end .";grid-template-columns:auto 1fr auto;grid-template-rows:minmax(var(--arcgis-slider-internal-content-start-min-height),auto) calc(var(--arcgis-slider-internal-show-range-labels) * calc(calc(var(--arcgis-slider-internal-label-input-height) / 2) - calc(var(--arcgis-slider-internal-track-size) / 2))) var(--arcgis-slider-internal-track-size) calc(var(--arcgis-slider-internal-show-range-labels) * calc(calc(var(--arcgis-slider-internal-label-input-height) / 2) - calc(var(--arcgis-slider-internal-track-size) / 2))) minmax(var(--arcgis-slider-internal-content-end-min-height),auto)}.track{flex:1;height:var(--arcgis-slider-internal-track-size)}&:host([value-labels-placement="leading"]){.label{bottom:var(--arcgis-slider-internal-label-input-margin)}}&:host([value-labels-placement="trailing"]){.label{top:var(--arcgis-slider-internal-label-input-margin)}}}:host([layout="horizontal"][range-labels-placement="trailing"]){.content{--arcgis-slider-internal-content-start-min-height: calc( var(--arcgis-slider-internal-handle-offset) + var(--arcgis-slider-internal-value-labels-placement-leading) * var(--arcgis-slider-internal-label-input-height) );--arcgis-slider-internal-content-end-min-height: calc( var(--arcgis-slider-internal-value-labels-placement-trailing) * var(--arcgis-slider-internal-label-input-height) );padding-inline:var(--arcgis-slider-internal-handle-offset);grid-template:"content-start content-start content-start" "track-container track-container track-container" "content-end content-end content-end" "content-end content-end content-end" "content-end content-end content-end";grid-template-columns:auto;grid-template-rows:minmax(var(--arcgis-slider-internal-content-start-min-height),auto) var(--arcgis-slider-internal-track-size) var(--arcgis-slider-internal-handle-offset) calc(var(--arcgis-slider-internal-range-labels-placement-trailing) * var(--arcgis-slider-internal-label-input-height)) minmax(var(--arcgis-slider-internal-content-end-min-height),auto);column-gap:var(--arcgis-slider-internal-handle-offset)}.track{flex:1;height:var(--arcgis-slider-internal-track-size)}&:host([value-labels-placement="leading"]){.label{bottom:var(--arcgis-slider-internal-label-input-margin)}}&:host([value-labels-placement="trailing"]){.label{top:calc(var(--arcgis-slider-internal-label-input-margin) + var(--arcgis-slider-internal-range-labels-placement-trailing) * (var(--arcgis-slider-internal-label-input-height)))}}.min,.max{--arcgis-slider-internal-range-translation: calc(var(--arcgis-slider-internal-handle-offset) + .5rem + 1px);grid-area:unset;grid-row:-3}&:host(:not([mirrored])){.min{grid-column:1;transform:translate(calc(var(--arcgis-slider-internal-range-translation) * -1))}.max{grid-column:3;transform:translate(var(--arcgis-slider-internal-range-translation))}}&:host([mirrored]){.min{grid-column:3;transform:translate(var(--arcgis-slider-internal-range-translation))}.max{grid-column:1;transform:translate(calc(var(--arcgis-slider-internal-range-translation) * -1))}}}`,be=Object.defineProperty,_e=Object.getOwnPropertyDescriptor,y=(i,e,t,r)=>{for(var n=r>1?void 0:r?_e(e,t):e,a=i.length-1,l;a>=0;a--)(l=i[a])&&(n=(r?l(e,t,n):l(n))||n);return r&&n&&be(e,t,n),n};function xe(){return{min:0,max:100,values:[]}}var _=class extends pe{constructor(i={}){super({...xe(),properties:i}),this._entries=new Map,this.precision=4,this.ready=!1}startup(){let{precision:i}=this,{min:e,max:t,values:r}=this;t=b(t,i),e=b(e,i),r=r?.map(a=>I(b(a,i),e,t)),this._set("min",e),this._set("max",t),this._set("values",r);let n=new Map(r?.map(a=>[O(),a]));this._entries=n,F(()=>this.min,a=>{let l=this.values;a!=null&&l?.length&&l.some(s=>s<a)&&(this._entries.forEach((s,o)=>{s<a&&this._entries.set(o,a)}),this._updatesValues())},{sync:!0}),F(()=>this.max,a=>{let l=this.values;a!=null&&l?.length&&l.some(s=>s>a)&&(this._entries.forEach((s,o)=>{s>a&&this._entries.set(o,a)}),this._updatesValues())},{sync:!0}),F(()=>this.precision,a=>{let{min:l,max:s,values:o}=this;this._set("min",b(l,a)),this._set("max",b(s,a)),o?.length&&(this._entries.forEach((d,c)=>{this._entries.set(c,b(d,a))}),this._updatesValues())},{sync:!0}),this._set("ready",!0)}get entries(){return this._entries}set max(i){if(!this.ready){this._set("max",i);return}let e=this._get("max"),t=b(i,this.precision);e!==t&&this._set("max",t)}set min(i){if(!this.ready){this._set("min",i);return}let e=this._get("min"),t=b(i,this.precision);e!==t&&this._set("min",t)}set values(i){if(!this.ready){this._set("values",i);return}let e=this._get("values");if(i=i?.map(r=>I(b(r,this.precision),this.min,this.max)).sort((r,n)=>r-n),e&&i&&e.length===i.length&&e.every((r,n)=>r===i[n]))return;let t=new Map(i?.map(r=>[O(),r]));this._entries=t,this._set("values",i)}getValue(i){return this._entries.get(i)}setValue(i,e){if(this.values==null)return!1;let{min:t,max:r}=this,n=this._entries.get(i),a=I(b(e,this.precision),t,r);return n===a?!1:(this._entries.set(i,a),this._updatesValues(),!0)}setValues(i){if(this.values==null)return!1;let e=!1,{min:t,max:r}=this;for(let[n,a]of i){let l=this._entries.get(n),s=I(b(a,this.precision),t,r);l!==s&&(e=!0,this._entries.set(n,s))}return e?(this._updatesValues(),!0):!1}_updatesValues(){let i=Array.from(this._entries.values()).sort((e,t)=>e-t);this._set("values",i)}};y([k()],_.prototype,"_entries",2);y([k({readOnly:!0})],_.prototype,"entries",1);y([k()],_.prototype,"max",1);y([k()],_.prototype,"min",1);y([k({cast:i=>I(i,0,20)})],_.prototype,"precision",2);y([k({readOnly:!0})],_.prototype,"ready",2);y([k()],_.prototype,"values",1);_=y([ve("esri.widgets.Slider.SliderData")],_);function I(i,e,t){return Math.min(Math.max(i,e),t)}function b(i,e){return Number.parseFloat(i.toFixed(e))}var N=class{constructor(e){this.steps=e,this.minIndex=0,this.maxIndex=this.steps.length-1}indexToValue(e){return this.steps[P(e,this.minIndex,this.maxIndex)]}valueToIndex(e){let t=this.steps.indexOf(e);return t!==-1?t:this.steps.reduce((r,n,a,l)=>Math.abs(n-e)<Math.abs(l[r]-e)?a:r)}},B=class{constructor(e,t,r){this.min=e,this.max=t,this.stepSize=r,this.minIndex=0,this.maxIndex=Math.round((this.max-this.min)/this.stepSize)}indexToValue(e){return this.min+P(e,this.minIndex,this.maxIndex)*this.stepSize}valueToIndex(e){return e=P(e,this.min,this.max),Math.round((e-this.min)/this.stepSize)}};function ye(i){if(i.steps==null)return null;let e=i.steps;return Array.isArray(e)?e.length===0?null:new N(e):new B(i.min,i.max,e)}function we(i,e,t){if(i==null){let s=new Map;for(let[o,d]of e.entries())s.set(o,d+t);return s}let r=e.size,n=Array.from(e.entries()).map(([s,o])=>{let d=o+t,c=[];for(let h=i.minIndex;h<=i.maxIndex;h++){let u=i.indexToValue(h),p=Math.abs(u-d),g=!1;for(let v=0;v<c.length;v++)if(p<c[v].dist){c.splice(v,0,{idx:h,value:u,dist:p}),g=!0;break}!g&&c.length<r&&c.push({idx:h,value:u,dist:p}),c.length>r&&(c.length=r)}return{uuid:s,stepDistances:c}}),a=new Set,l=new Map;n.sort((s,o)=>s.stepDistances[0].dist-o.stepDistances[0].dist);for(let s of n){let o=s.stepDistances.find(d=>!a.has(d.idx));o?(a.add(o.idx),l.set(s.uuid,o.value)):l.set(s.uuid,e.get(s.uuid))}return l}function ae(i,e,t,r,n){let a=e.get(t)??0;if(!i)return a+r;let l=a+r,s=new Set;if(!n)for(let[c,h]of e.entries())c!==t&&s.add(i.valueToIndex(h));let o=null,d=1/0;for(let c=i.minIndex;c<=i.maxIndex;c++){if(s.has(c))continue;let h=i.indexToValue(c),u=Math.abs(h-l);u<d&&(d=u,o=c)}return o==null?a:i.indexToValue(o)}function ke(i,e,t){let r=new Map,n=t>0?Ee:le,a=Array.from(e).sort((o,d)=>n(o[1],d[1])),l=!1,s=!0;for(let[o,d]of a)if(r.set(o,d),s){let c=se(i,r,o,t);d===c&&(s=!1),l||=s,r.set(o,c)}return{changed:l,entries:r}}function se(i,e,t,r){let{allowValuesOverlap:n,stepsProvider:a,resolution:l,min:s,max:o}=i,d=e.get(t);if(r=r>0?1:-1,!a){let m=P(d+r*l,s,o);if(n)return m;let x=new Set;for(let[M,oe]of e)M!==t&&x.add(oe);for(;x.has(m)&&m<=o&&m>=s;)m=P(m+r*l,s,o);return x.has(m)||m>o||m<s?d:m}let c=a.valueToIndex(d);if(c===-1)return d;if(n){let m=P(c+r,a.minIndex,a.maxIndex);return a.indexToValue(m)}let h=new Set;for(let[m,x]of e)m!==t&&h.add(a.valueToIndex(x));let u=c,p=!1,g=a.minIndex,v=a.maxIndex,D=0;for(;D<Math.abs(v-g)&&(u+=r,!(u<g||u>v));){if(!h.has(u)){p=!0;break}D++}return p?a.indexToValue(u):d}function De(i,e,t,r){let{allowValuesOverlap:n,stepsProvider:a,resolution:l,min:s,max:o}=i,d=e.get(t);if(r=r>0?1:-1,!a){let p=new Set(Array.from(e).filter(([v])=>v!==t).map(([,v])=>v)),g=r>0?o:s;if(n)return g;for(;p.has(g);)if(g-=r*l,r>0&&g>o||r<0&&g<s){g=d;break}return g}if(n)return r>0?a.indexToValue(a.maxIndex):a.indexToValue(a.minIndex);let c=a.valueToIndex(d);if(c===-1)return d;let h=new Set(Array.from(e).filter(([p])=>p!==t).map(([,p])=>a.valueToIndex(p))),u=r>0?a.maxIndex:a.minIndex;for(;h.has(u);)if(u-=r,r>0&&u>o||r<0&&u<s){u=c;break}return a.indexToValue(u)}function Pe(i,e,t){let{stepsProvider:r,min:n,max:a}=i,l=new Map,s=Array.from(e).sort((d,c)=>le(d[1],c[1]));if(r){let d=0;if(t>0){let c=s[s.length-1],h=r.valueToIndex(c[1]);d=r.maxIndex-h}else{let c=s[0],h=r.valueToIndex(c[1]);d=r.minIndex-h}if(d===0)for(let[c,h]of s)l.set(c,h);for(let[c,h]of s){let u=r.indexToValue(r.valueToIndex(h)+d);l.set(c,u)}return l}let o=0;if(t>0){let d=s[s.length-1];o=a-d[1]}else{let d=s[0];o=n-d[1]}for(let[d,c]of s)l.set(d,c+o);return l}function le(i,e){return i-e}function Ee(i,e){return e-i}function P(i,e,t){return Math.max(e,Math.min(t,i))}var $e=te(_),U=class extends W{constructor(){super(...arguments),this._popoverElement=A(),this._trackElement=A(),this.messages=Q({}),this._onPointerMoveDragUpdate=e=>{this._updateDrag(this._mapEventToRange(e))},this._onPointerUpDragEnd=e=>{L(e)&&this._endDrag()},this._onPointerCancelDragEnd=()=>{this._endDrag()},this._minFormatter=e=>this._formatLabel(e,"min"),this._maxFormatter=e=>this._formatLabel(e,"max"),this._valueFormatter=e=>this._formatLabel(e,"value"),this._formatLabel=(e,t)=>{let r=this.labelFormatter;return r?r(e,t,this._defaultFormatter)??this._defaultFormatter(e):this._defaultFormatter(e)},this._defaultFormatter=e=>this._numberFormatter.format(e),this._numberFormatter=new Intl.NumberFormat(this.messages._lang),this._resizeObserver=new ResizeObserver(()=>{this._layoutLabelInputs()}),this._labelInputsUpdateComplete=null,this._dragInfo=null,this._hasPopoverContent=!1,this._hasContentStart=!1,this._hasContentEnd=!1,this._sliderData=$e(this),this.allowValuesOverlap=!1,this.autoDestroyDisabled=!1,this.disabled=!1,this.fillPlacement="start",this.layout="horizontal",this.max=this._sliderData.max,this.min=this._sliderData.min,this.mirrored=!1,this.popoverLabel="",this.popoverPlacement="leading",this.precision=this._sliderData.precision,this.rangeLabelsEditingEnabled=!1,this.rangeLabelsPlacement="center",this.segmentsDraggingDisabled=!1,this.showRangeLabels=!1,this.valueLabelsDisplay="hidden",this.valueLabelsPlacement="leading",this.valueLabelsEditingEnabled=!1,this.values=this._sliderData.values,this.arcgisActiveValueChange=E({cancelable:!1}),this.arcgisChange=E({cancelable:!1}),this.arcgisInput=E({cancelable:!1}),this.arcgisRangeChange=E({cancelable:!1})}static{this.properties={_dragInfo:16,_hasPopoverContent:16,_hasContentStart:16,_hasContentEnd:16,_activePart:16,_sliderData:16,activeValue:32,allowValuesOverlap:5,autoDestroyDisabled:5,disabled:[7,{useDefault:!0}],fullRangeMax:11,fullRangeMin:11,fillPlacement:1,labelFormatter:0,layout:3,max:11,min:11,mirrored:[7,{useDefault:!0}],popoverLabel:1,popoverPlacement:3,precision:11,rangeLabelsEditingEnabled:5,rangeLabelsPlacement:3,segmentsDraggingDisabled:5,showRangeLabels:7,steps:[9,{converter:{fromAttribute(e){if(e.includes(","))return e.split(",").filter(r=>r.trim()!=="").map(parseFloat).filter(r=>Number.isFinite(r));let t=parseFloat(e);return Number.isFinite(t)?t:void 0}}}],valueLabelsDisplay:3,valueLabelsPlacement:3,valueLabelsEditingEnabled:5,values:[1,{converter:{fromAttribute(e){return e.includes(",")?e.split(",").filter(t=>t.trim()!=="").map(parseFloat).filter(t=>Number.isFinite(t)):[parseFloat(e)].filter(t=>Number.isFinite(t))}}}],messageOverrides:0}}static{this.styles=fe}static{this.shadowRootOptions={mode:"open",delegatesFocus:!0}}get _fullMin(){return this.fullRangeMin??this.min}get _fullMax(){return this.fullRangeMax??this.max}get _fullRange(){return this._fullMax-this._fullMin}get isHorizontal(){return this.layout==="horizontal"}get _trackWidthOrHeight(){let e=this._trackElement.value?.getBoundingClientRect();return e?this.isHorizontal?e.width:e.height:0}get _disabledOrInvalid(){return this.disabled||this.values.length===0||this._invalid}get _invalid(){let e=this.fullRangeMin==null||this.fullRangeMax==null||this.fullRangeMin<this.fullRangeMax,t=this.fullRangeMin==null||this.fullRangeMin<=this.min,r=this.fullRangeMax==null||this.fullRangeMax>=this.max;return this.min>=this.max||!e||!t||!r}get resolution(){let e=(this._sliderData.max-this._sliderData.min)/this._trackWidthOrHeight;return Math.max(e,1/Math.pow(10,this.precision))}get activeValue(){if(this._activePart)return this._activePart==="range"?"all":this._sliderData.getValue(this._activePart)}async destroy(){await this.manager.destroy()}load(){this._sliderData.startup()}willUpdate(e){if((e.has("steps")||e.has("min")||e.has("max"))&&(this._stepsProvider=ye(this)),e.has("messages")||e.has("min")||e.has("max")||e.has("precision")){let t=this.max!=null&&this.min!=null&&this.max-this.min>10?2:this.precision;this._numberFormatter=new Intl.NumberFormat(this.messages._lang,{maximumFractionDigits:t})}}updated(e){this._layoutLabelInputs();let t=this._popoverElement.value;t&&(e.has("values")||e.has("min")||e.has("max"))&&t.reposition()}loaded(){this._resizeObserver.observe(this.el)}disconnectedCallback(){super.disconnectedCallback(),this._removeDragListeners()}_makeResizeRef(){let e=null;return t=>{t?(e=t,this._resizeObserver.observe(t)):e&&(this._resizeObserver.unobserve(e),e=null)}}async _layoutLabelInputs(){if(this.layout!=="horizontal"||!this._trackElement.value||this.valueLabelsDisplay==="hidden")return;let e=this.renderRoot.querySelectorAll("arcgis-label-input"),t=this.componentOnReady().then(()=>Promise.all(Array.from(e,a=>a.updateComplete)));if(this._labelInputsUpdateComplete=t,await t,t!==this._labelInputsUpdateComplete)return;this._labelInputsUpdateComplete=null;let{_trackElement:{value:r}}=this,n=r.getBoundingClientRect();for(let a of this._sliderData.entries.keys()){let l=this._activePart==="range"||this._activePart===a;if(this.valueLabelsDisplay==="always"||l){let s=Re(this,a),o=ie(this,a);if(!s||!o)continue;let d=s.getBoundingClientRect(),c=o.getBoundingClientRect(),h=o.getLabelBoundingClientRect(),u=d.width/2,p=Math.round(d.left+u),g=Math.round(h.width/2),v=c.width/2,D=n.left-u,m=n.right+u,x=p-g,M=p+g;x<D?v+=x-D:M>m&&(v+=M-m),o.style.transform=`translateX(${-Math.round(v)}px)`}}}_onTrackFocus(){this._setActivePart("range")}_onTrackBlur(){this._setActivePart(null)}_onTrackRangePointerDown(e){this._disabledOrInvalid||!L(e)||this._startDrag("range",this._mapEventToRange(e))}async _onPointerDown(e){if(this._disabledOrInvalid||!L(e))return;let t=this.renderRoot.querySelector("arcgis-label-input[editing]");if(e.target===t)return;if(t){t.blur(),this._focusEntry(C(t));return}if(Ce(e.target)||this.values?.length>1)return;let r=this._mapEventToRange(e),[n,a]=this._sliderData.entries.entries().next().value,l=r*this._fullRange+this._fullMin-a,s=z(this._fullMin,this._fullMax,a)/100;this._startDrag(n,s);let o=ae(this._stepsProvider,this._sliderData.entries,n,l,this.allowValuesOverlap);this._setValue(n,o),this._focusEntry(n)}_onThumbPointerDown(e){let t=C(e.currentTarget);if(!L(e)||this._disabledOrInvalid||!t)return;let r=ie(this,t);e.target===r&&r?.editing||(e.stopPropagation(),this._startDrag(t,this._mapEventToRange(e)))}_endDrag(){if(this._disabledOrInvalid)return;this._removeDragListeners();let e=!1;if(this._dragInfo){let{entries:t}=this._dragInfo;for(let[r,n]of t)if(this._sliderData.getValue(r)!==n){e=!0;break}}this._dragInfo=null,e&&this.arcgisChange.emit()}_startDrag(e,t){if(this._disabledOrInvalid)return;let{min:r,max:n,values:a}=this,l=r,s=n;if(this._setActivePart(e),e==="range"){if(this.segmentsDraggingDisabled)return;l=r-a[0],s=n-a[a.length-1]}this._dragInfo={position:t,entries:new Map(this._sliderData.entries.entries()),minDiff:l,maxDiff:s},this._addDragListeners()}_updateDrag(e){if(!this._dragInfo||!this._activePart)return;let{_activePart:t,_dragInfo:{position:r,entries:n,minDiff:a,maxDiff:l}}=this;if(r===e)return;let s=(e-r)*this._fullRange;if(t==="range"){s=Math.min(l,Math.max(a,s));let o=we(this._stepsProvider,n,s);this._setValues(o)}else{let o=ae(this._stepsProvider,n,t,s,this.allowValuesOverlap);this._setValue(t,o)}}_focusEntry(e){e&&Me(this,e)?.focus()}_addDragListeners(){document.addEventListener("pointerup",this._onPointerUpDragEnd),document.addEventListener("pointermove",this._onPointerMoveDragUpdate),document.addEventListener("pointercancel",this._onPointerCancelDragEnd)}_removeDragListeners(){document.removeEventListener("pointerup",this._onPointerUpDragEnd),document.removeEventListener("pointermove",this._onPointerMoveDragUpdate),document.removeEventListener("pointercancel",this._onPointerCancelDragEnd)}_setValues(e){this._sliderData.setValues(e)&&(this._dragInfo||this.arcgisChange.emit(),this.arcgisInput.emit())}_setValue(e,t){this._sliderData.setValue(e,t)&&(this._dragInfo||this.arcgisChange.emit(),this.arcgisInput.emit())}_onThumbFocus(e){let t=C(e.currentTarget);this._setActivePart(t)}_onThumbBlur(){this._setActivePart(null)}_onRangeInputChange(e){let t=e.currentTarget,r=t.value,n=t.dataset.type,a=!1;switch(e.stopPropagation(),n){case"min":{r<this.max?(this.min=r,a=!0):t.value=this.min;break}case"max":{r>this.min?(this.max=r,a=!0):t.value=this.max;break}}a&&this.arcgisRangeChange.emit()}_onValueInputChange(e){let t=e.currentTarget,r=C(t),n=t.value;r&&(e.stopPropagation(),this._setValue(r,n),t.value=this._sliderData.getValue(r))}_mapEventToRange(e){let t=this._trackElement.value?.getBoundingClientRect();if(!t)return 0;let r=this.isHorizontal?(e.clientX-t.left)/t.width:1-(e.clientY-t.top)/t.height;return this.mirrored?1-r:r}_getPositionStyleForElement(e){let t=z(this._fullMin,this._fullMax,e);return{[this.isHorizontal?this.mirrored?"right":"left":this.mirrored?"top":"bottom"]:`${t}%`}}_popoverSlotChange(e){this._hasPopoverContent=V(e)}_onContentStartSlotChange(e){this._hasContentStart=V(e)}_onContentEndSlotChange(e){this._hasContentEnd=V(e)}_onThumbKeyDown(e){let t=C(e.currentTarget);if(!t)return;let r=e.currentTarget.querySelector("arcgis-label-input");if(!r||r.editing)return;let n=e.key;switch(n){case"Enter":{r.edit();break}case"ArrowUp":case"ArrowDown":case"ArrowLeft":case"ArrowRight":{e.preventDefault();let a=n==="ArrowUp"||n==="ArrowRight"?1:-1;a=this.mirrored?a*-1:a;let l=se({allowValuesOverlap:this.allowValuesOverlap,stepsProvider:this._stepsProvider,resolution:this.resolution,min:this.min,max:this.max},this._sliderData.entries,t,a);this._setValue(t,l);break}case"End":case"Home":{e.preventDefault();let a=this.isHorizontal&&this.mirrored||this.layout==="vertical"?n==="End"?-1:1:n==="Home"?-1:1,l=De({allowValuesOverlap:this.allowValuesOverlap,stepsProvider:this._stepsProvider,resolution:this.resolution,min:this.min,max:this.max},this._sliderData.entries,t,a);this._setValue(t,l);break}}}_onTrackRangeKeyDown(e){let t=e.key;switch(t){case"ArrowUp":case"ArrowDown":case"ArrowLeft":case"ArrowRight":{e.preventDefault();let r=t==="ArrowUp"||t==="ArrowRight"?1:-1;r=this.mirrored?r*-1:r;let{entries:n}=ke({allowValuesOverlap:this.allowValuesOverlap,stepsProvider:this._stepsProvider,resolution:this.resolution,min:this.min,max:this.max},this._sliderData.entries,r);this._setValues(n);break}case"End":case"Home":{e.preventDefault();let r=this.isHorizontal&&this.mirrored||this.layout==="vertical"?t==="End"?-1:1:t==="Home"?-1:1,n=Pe({allowValuesOverlap:this.allowValuesOverlap,stepsProvider:this._stepsProvider,resolution:this.resolution,min:this.min,max:this.max},this._sliderData.entries,r);this._setValues(n);break}}}_setActivePart(e){this._activePart!==e&&(this._activePart=e,this.arcgisActiveValueChange.emit())}render(){return f`<div class=${$({content:!0,disabled:this._disabledOrInvalid})} @pointerdown=${this._onPointerDown}>${this._renderContentStart()}${this._renderContentEnd()}${this._renderRangeLabel("min")}${this._renderTrackRange()}${this._renderRangeLabel("max")}${this._renderPopover()}</div>`}_renderPopover(){let{_activePart:e,layout:t,popoverPlacement:r,valueLabelsPlacement:n,valueLabelsDisplay:a,popoverLabel:l}=this,s=e?Ie(e)?e:"track-range":"",o=this._hasPopoverContent&&!!s,d=t==="horizontal"?r==="leading"?"top":"bottom":r==="leading"?"left":"right",c=14;return a!=="hidden"&&r===n&&(c+=24),f`<calcite-popover flip-disabled focus-trap-disabled .label=${l} .open=${o} .offsetDistance=${c} .placement=${d} pointer-disabled .referenceElement=${s} scale=s trigger-disabled ${R(this._popoverElement)}><slot name=popover @slotchange=${this._popoverSlotChange}></slot></calcite-popover>`}_renderContentStart(){return f`<div class="content-start" .hidden=${!this._hasContentStart}><slot name=content-start @slotchange=${this._onContentStartSlotChange}></slot></div>`}_renderContentEnd(){return f`<div class="content-end" .hidden=${!this._hasContentEnd}><slot name=content-end @slotchange=${this._onContentEndSlotChange}></slot></div>`}_renderTrackRange(){return f`<div class="track-container">${this._renderTrack()}${this._renderThumbs()}</div>`}_renderTrack(){return f`<div class="track" ${R(this._trackElement)}>${this._renderTrackBackground()}${this._renderFillSegment()}</div>`}_renderTrackBackground(){let{max:e,min:t,fillPlacement:r,values:n}=this,a=n.length>1,l=this._fullMin,s=this._fullMax,o=[];return this._invalid?f`<div class="segment track-bounds" style=${T({left:"0%",right:"0%",top:"0%",bottom:"0%"})}></div>`:(l<t&&(o.push(this._renderSegment(l,t,[this.mirrored?"track-effective-trailing":"track-effective-leading",!a&&r==="start"?"track-fill":null])),l=t),s>e&&(o.push(this._renderSegment(e,s,[this.mirrored?"track-effective-leading":"track-effective-trailing",!a&&r==="end"?"track-fill":null])),s=e),o.push(this._renderSegment(l,s,["track-bounds"])),o)}_renderFillSegment(){let{values:e,fillPlacement:t,min:r,max:n}=this;if(!e?.length||this._invalid)return;let a=[...e].sort((l,s)=>l-s);if(a.length===1)switch(t){case"start":if(r<a[0])return this._renderSegment(r,a[0],["track-range"]);break;case"end":if(n>a[0])return this._renderSegment(a[0],n,["track-range"]);break}return this._renderSegment(a[0],a[a.length-1],["track-range",this.segmentsDraggingDisabled?null:"interactive",this._activePart==="range"?"active":null],{id:"track-range",onFocus:this.segmentsDraggingDisabled?void 0:this._onTrackFocus,onBlur:this.segmentsDraggingDisabled?void 0:this._onTrackBlur,onPointerDown:this.segmentsDraggingDisabled?void 0:this._onTrackRangePointerDown,onKeyDown:this.segmentsDraggingDisabled?void 0:this._onTrackRangeKeyDown})}_renderSegment(e,t,r,n){let{_fullMin:a,_fullMax:l,mirrored:s}=this,o=[z(a,l,ne(e,a,l)),100-z(a,l,ne(t,a,l))];s&&o.reverse();let d=this.isHorizontal?{left:`${o[0]}%`,right:`${o[1]}%`}:{top:`${o[1]}%`,bottom:`${o[0]}%`},c=G("segment",...r);return f`<div id=${n?.id??w} class=${$(c)} style=${T(d)} .tabIndex=${n?.onPointerDown?0:-1} @focus=${n?.onFocus} @blur=${n?.onBlur} @pointerdown=${n?.onPointerDown} @keydown=${n?.onKeyDown}></div>`}_renderThumbs(){let{_sliderData:e}=this,t=Array.from(e.entries).filter(([,r])=>r>=this._fullMin&&r<=this._fullMax);return re(t,([r,n])=>this._renderThumb(r,n))}_renderThumb(e,t){let{valueLabelsDisplay:r}=this,n=this._activePart===e||this._activePart==="range",a=this._activePart==="range"||this._activePart===e,l=r==="always"||r==="auto"&&a,s=this.isHorizontal,o=s?"horizontal":"vertical",d=`label-${e}`,c=s?"center":this.valueLabelsPlacement==="leading"?"end":"start";return X(e,f`<div id=${e??w} .ariaLabel=${this.messages.sliderValue} aria-labelledby=${(r?d:void 0)??w} .ariaOrientation=${o} .ariaValueMax=${this.max} .ariaValueMin=${this.min} .ariaValueNow=${t} class=${$({thumb:!0,active:n})} data-entry=${e??w} @pointerdown=${this._onThumbPointerDown} @focus=${this._onThumbFocus} @blur=${this._onThumbBlur} @keydown=${this._onThumbKeyDown} role=slider style=${T({...this._getPositionStyleForElement(t),"z-index":this._activePart===e?1:0})} tabindex=0><span class="handle"></span><arcgis-label-input .alignment=${c} class="label" .hidden=${!l} id=${d??w} .labelFormatter=${this._valueFormatter} @focus=${this._onThumbFocus} @blur=${this._onThumbBlur} @arcgisChange=${this._onValueInputChange} .readOnly=${!this.valueLabelsEditingEnabled} tabindex=-1 .value=${t} ${R(this._makeResizeRef())}></arcgis-label-input></div>`)}_renderRangeLabel(e){let t="center";return this.isHorizontal&&(t=e==="min"?"end":"start",this.rangeLabelsPlacement==="trailing"&&(t=t==="end"?"start":"end"),this.mirrored&&(t=t==="end"?"start":"end")),f`<arcgis-label-input .alignment=${t} class=${$(e)} data-type=${e??w} .hidden=${!this.showRangeLabels} .labelFormatter=${this[`_${e}Formatter`]} @arcgisChange=${this._onRangeInputChange} .readOnly=${!this.rangeLabelsEditingEnabled} .value=${this[e]}></arcgis-label-input>`}};function Ce(i){return"dataset"in i&&i.tagName==="ARCGIS-LABEL-INPUT"&&(i.dataset.type==="min"||i.dataset.type==="max")}function C(i){let e=Z(i,"[data-entry]");return e&&"dataset"in e?e.dataset.entry:null}function Ie(i){return typeof i!=null&&i!=="range"}function Me(i,e){return e?i.renderRoot.querySelector(`div[data-entry="${e}"]`):null}function Re(i,e){return e?i.renderRoot.querySelector(`div[data-entry="${e}"] span.handle`):null}function ie(i,e){return e?i.renderRoot.querySelector(`div[data-entry="${e}"] arcgis-label-input`):null}function L(i){return i.isPrimary&&i.button===0}var Te=5;function z(i,e,t){let r=e-i,n=(t-i)/r*100;return Number.parseFloat(n.toFixed(Te))}function ne(i,e,t){return Math.max(e,Math.min(t,i))}Y("arcgis-slider",U);return U},"core/reactiveUtils","applications/Components/reactiveUtils","core/accessorSupport/decorators","core/Accessor","core/Accessor","core/accessorSupport/decorators","core/reactiveUtils")
|
|
3
|
+
v5.0.0-next.127 */
|
|
4
|
+
import{a as X}from"./SDJXKVZA.js";import{a as J,b as Q}from"./TB4L7OK7.js";import{a as V,b as G,d as Z}from"./IF2NSVPQ.js";import{A as R,B as W,C as $,D as T,E as w,H as Y,g as H,i as f,o as q,p as K,q as E,s as j,t as O,z as A}from"./ZG65PSAN.js";export default $arcgis.t(([{on:ze,watch:ee},{createObservable:ce,trackAccess:de},{property:Ne,subclass:Be},He,pe,{property:k,subclass:ve},{watch:F}])=>{var te=(i,e)=>t=>he(t,i),S=class extends j{constructor(e,t){super(e),this.Y=new Map,this.A=void 0,this.#r=ce();let r=this;r.#e=t,r.Z(),r.setProvisionalExports(ue(e,new WeakRef(r),e.M.length-1,r.instance,r.Y),!1),q(e,n=>{if(n){let a=ee(()=>e[n],l=>{if(l===r.instance)return;let s=r.instance;r.exports=l,r.instance=l,r.Y.forEach((o,d)=>e.requestUpdate(o,s[d])),r.#t&&s.destroy(),r.#t=!1},{sync:!0});r.onDestroy(a.remove)}},r.exports)}#t;#r;#e;get exports(){return de(this.#r),super.exports}set exports(e){super.exports=e,this.#r.notify()}Z(){let e=this;e.instance="prototype"in e.#e&&"declaredClass"in e.#e.prototype?new e.#e:e.#e(),e.#t=!0}hostConnected(){this.exports=this.instance}hostDestroy(){this.#t&&this.instance.destroy?.()}},he=J(S),ue=(i,e,t,r,n)=>new Proxy(r,{get:(a,l)=>{let s=a[l];if(typeof l=="symbol"||n.has(l))return s;let o=i.M[t];return o.A=l,K(i,d=>{if(o.A=void 0,d!==void 0){let c=d.key;n.set(l,c);let h=i.constructor.getPropertyOptions(c),u=l!==c&&c.toLowerCase().includes("disable");ge(e,h,l,c,u),h.i===void 0&&me(h,t,l,u)}},s)}}),ge=(i,e,t,r,n,a)=>a=ee(()=>{let l=i.deref();return l===void 0||l.component.manager.destroyed?a=a.remove():l.exports[t]},(l,s)=>{if(!a)return;i.deref().component?.requestUpdate(r,n?!s:s),e.c=!1},{sync:!0}),me=(i,e,t,r)=>{i.d.get=function(){let n=this.M[e]?.exports[t];return r?!n:n},i.d.set=function(n){let a=this.M[e];a.A!==t&&(a.exports[t]=r?!n:n)}};function*re(i,e){if(i!==void 0){let t=0;for(let r of i)yield e(r,t++)}}var fe=H`:host{display:flex;width:100%;height:100%;font-family:Avenir Next,Helvetica Neue,helvetica,arial,sans-serif;font-size:var(--calcite-font-size--2);font-variant-numeric:tabular-nums;--arcgis-slider-dash-length: 5px;--arcgis-slider-handle-size: .875rem;--arcgis-slider-track-background-color: var(--calcite-color-border-2);--arcgis-slider-internal-show-range-labels: 0;--arcgis-slider-internal-show-value-labels: 0;--arcgis-slider-internal-value-labels-placement-leading: 0;--arcgis-slider-internal-value-labels-placement-trailing: 0;--arcgis-slider-internal-range-labels-placement-center: 0;--arcgis-slider-internal-range-labels-placement-trailing: 0;--arcgis-slider-internal-handle-offset: calc(var(--arcgis-slider-handle-size) / 2);--arcgis-slider-internal-label-input-margin: calc(var(--arcgis-slider-internal-handle-offset) + 4px);--arcgis-slider-internal-label-input-height: var(--calcite-input-number-height, 1.5rem);--arcgis-slider-internal-track-size: 2px}:host([show-range-labels]){--arcgis-slider-internal-show-range-labels: 1}:host(:not([value-labels-display="hidden"])){--arcgis-slider-internal-show-value-labels: 1}:host([value-labels-placement="leading"]){--arcgis-slider-internal-value-labels-placement-leading: var(--arcgis-slider-internal-show-value-labels)}:host([value-labels-placement="trailing"]){--arcgis-slider-internal-value-labels-placement-trailing: var(--arcgis-slider-internal-show-value-labels)}:host([range-labels-placement="center"]){--arcgis-slider-internal-range-labels-placement-center: var(--arcgis-slider-internal-show-range-labels)}:host([range-labels-placement="trailing"]){--arcgis-slider-internal-range-labels-placement-trailing: var(--arcgis-slider-internal-show-range-labels)}:host([disabled]){cursor:default;opacity:var(--calcite-opacity-disabled);pointer-events:none}.content{direction:ltr;flex:1;touch-action:none;user-select:none;display:grid;word-wrap:normal;word-break:normal;padding-block:var(--arcgis-slider-internal-handle-offset)}.track-container{grid-area:track-container;position:relative;display:flex;justify-content:center;align-items:center}.track{touch-action:none;position:relative}.track-bounds{background-color:var(--calcite-color-border-2)}.track-fill{--arcgis-slider-track-background-color: var(--calcite-color-brand)}:host([layout="vertical"]){.track-effective-leading{background:repeating-linear-gradient(to bottom,var(--arcgis-slider-track-background-color) 0 var(--arcgis-slider-dash-length),color-mix(in srgb,transparent 75%,var(--arcgis-slider-track-background-color) 25%) var(--arcgis-slider-dash-length) calc(var(--arcgis-slider-dash-length) * 2))}.track-effective-trailing{background:repeating-linear-gradient(to top,var(--arcgis-slider-track-background-color) 0 var(--arcgis-slider-dash-length),color-mix(in srgb,transparent 75%,var(--arcgis-slider-track-background-color) 25%) var(--arcgis-slider-dash-length) calc(var(--arcgis-slider-dash-length) * 2))}}:host([layout="horizontal"]){.track-effective-leading{background:repeating-linear-gradient(to right,var(--arcgis-slider-track-background-color) 0 var(--arcgis-slider-dash-length),color-mix(in srgb,transparent 75%,var(--arcgis-slider-track-background-color) 25%) var(--arcgis-slider-dash-length) calc(var(--arcgis-slider-dash-length) * 2))}.track-effective-trailing{background:repeating-linear-gradient(to left,var(--arcgis-slider-track-background-color) 0 var(--arcgis-slider-dash-length),color-mix(in srgb,transparent 75%,var(--arcgis-slider-track-background-color) 25%) var(--arcgis-slider-dash-length) calc(var(--arcgis-slider-dash-length) * 2))}}.track-range{background-color:var(--calcite-color-brand);&.active{box-shadow:0 0 8px #00000029;outline:1px solid var(--calcite-color-focus, var(--calcite-color-focus, var(--calcite-color-brand)))}}:host([disabled]) .track-range{background-color:var(--calcite-color-text-3)}:host([layout="horizontal"]){.track-range.interactive{&:after{all:initial;cursor:ew-resize;position:absolute;inline-size:100%;content:"";inset-block-start:calc(-1 * var(--arcgis-slider-internal-handle-offset));block-size:var(--arcgis-slider-handle-size);margin-top:1px}}}:host([layout="vertical"]){.track-range.interactive{&:after{all:initial;cursor:ns-resize;position:absolute;inline-size:100%;content:"";inset-block-start:var(--arcgis-slider-internal-handle-offset);block-size:var(--arcgis-slider-handle-size);margin-left:1px}}}.segment{transform-origin:0 0;inset-block-start:0px;block-size:.125rem;position:absolute;top:0;left:0}.thumb{-webkit-user-select:none;user-select:none;background-color:#4c4c4c;position:absolute}.thumb:focus,.thumb.active{.handle{background-color:var(--calcite-color-brand);box-shadow:0 0 8px #00000029;outline:2px solid var(--calcite-color-focus, var(--calcite-color-focus, var(--calcite-color-brand)));outline-offset:calc(2px*(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}}.handle{cursor:pointer;box-sizing:border-box;z-index:1;touch-action:none;background-color:var(--calcite-color-foreground-1);box-shadow:0 0 0 2px var(--calcite-color-text-3) inset;border-radius:var(--arcgis-slider-handle-size);width:var(--arcgis-slider-handle-size);height:var(--arcgis-slider-handle-size);transition:all .125s ease-in-out;position:absolute;top:calc(var(--arcgis-slider-internal-handle-offset) * -1);left:calc(var(--arcgis-slider-internal-handle-offset) * -1)}.handle:hover{box-shadow:0 0 0 3px var(--calcite-color-brand) inset}.label{position:absolute;will-change:transform}.label[hidden]{display:block;opacity:0;pointer-events:none}.min{grid-area:range-start}.max{grid-area:range-end}:host([layout="horizontal"][mirrored][range-labels-placement="center"]),:host([layout="vertical"]:not([mirrored])){.min{grid-area:range-end}.max{grid-area:range-start}}.content-start{grid-area:content-start;display:flex}.content-end{grid-area:content-end;display:flex}:host([layout="vertical"]){.content{grid-template:". range-start range-start range-start ." "content-start content-start track-container content-end content-end" ". range-end range-end range-end .";grid-template-rows:auto 1fr auto;grid-template-columns:1fr auto auto auto 1fr;row-gap:var(--arcgis-slider-internal-handle-offset)}.track-container{flex-direction:column}.track{flex:1;width:var(--arcgis-slider-internal-track-size)}.segment{writing-mode:vertical-lr}.label{top:calc(var(--arcgis-slider-internal-label-input-height) * -.5)}&:host([value-labels-placement="leading"]){.label{right:var(--arcgis-slider-internal-label-input-margin)}}&:host([value-labels-placement="trailing"]){.label{left:var(--arcgis-slider-internal-label-input-margin)}}}:host([layout="horizontal"][range-labels-placement="center"]){.content{--arcgis-slider-internal-content-start-min-height: calc( ((1 - var(--arcgis-slider-internal-show-range-labels)) * var(--arcgis-slider-internal-handle-offset)) + ( var(--arcgis-slider-internal-value-labels-placement-leading) * var(--arcgis-slider-internal-label-input-height) ) );--arcgis-slider-internal-content-end-min-height: calc( ((1 - var(--arcgis-slider-internal-show-range-labels)) * var(--arcgis-slider-internal-handle-offset)) + ( var(--arcgis-slider-internal-value-labels-placement-trailing) * var(--arcgis-slider-internal-label-input-height) ) );column-gap:calc(var(--arcgis-slider-internal-show-range-labels) * var(--arcgis-slider-internal-handle-offset) / 2);padding-inline:calc((1 - var(--arcgis-slider-internal-show-range-labels)) * var(--arcgis-slider-internal-handle-offset));grid-template:". content-start ." "range-start content-start range-end" "range-start track-container range-end" "range-start content-end range-end" ". content-end .";grid-template-columns:auto 1fr auto;grid-template-rows:minmax(var(--arcgis-slider-internal-content-start-min-height),auto) calc(var(--arcgis-slider-internal-show-range-labels) * calc(calc(var(--arcgis-slider-internal-label-input-height) / 2) - calc(var(--arcgis-slider-internal-track-size) / 2))) var(--arcgis-slider-internal-track-size) calc(var(--arcgis-slider-internal-show-range-labels) * calc(calc(var(--arcgis-slider-internal-label-input-height) / 2) - calc(var(--arcgis-slider-internal-track-size) / 2))) minmax(var(--arcgis-slider-internal-content-end-min-height),auto)}.track{flex:1;height:var(--arcgis-slider-internal-track-size)}&:host([value-labels-placement="leading"]){.label{bottom:var(--arcgis-slider-internal-label-input-margin)}}&:host([value-labels-placement="trailing"]){.label{top:var(--arcgis-slider-internal-label-input-margin)}}}:host([layout="horizontal"][range-labels-placement="trailing"]){.content{--arcgis-slider-internal-content-start-min-height: calc( var(--arcgis-slider-internal-handle-offset) + var(--arcgis-slider-internal-value-labels-placement-leading) * var(--arcgis-slider-internal-label-input-height) );--arcgis-slider-internal-content-end-min-height: calc( var(--arcgis-slider-internal-value-labels-placement-trailing) * var(--arcgis-slider-internal-label-input-height) );padding-inline:var(--arcgis-slider-internal-handle-offset);grid-template:"content-start content-start content-start" "track-container track-container track-container" "content-end content-end content-end" "content-end content-end content-end" "content-end content-end content-end";grid-template-columns:auto;grid-template-rows:minmax(var(--arcgis-slider-internal-content-start-min-height),auto) var(--arcgis-slider-internal-track-size) var(--arcgis-slider-internal-handle-offset) calc(var(--arcgis-slider-internal-range-labels-placement-trailing) * var(--arcgis-slider-internal-label-input-height)) minmax(var(--arcgis-slider-internal-content-end-min-height),auto);column-gap:var(--arcgis-slider-internal-handle-offset)}.track{flex:1;height:var(--arcgis-slider-internal-track-size)}&:host([value-labels-placement="leading"]){.label{bottom:var(--arcgis-slider-internal-label-input-margin)}}&:host([value-labels-placement="trailing"]){.label{top:calc(var(--arcgis-slider-internal-label-input-margin) + var(--arcgis-slider-internal-range-labels-placement-trailing) * (var(--arcgis-slider-internal-label-input-height)))}}.min,.max{--arcgis-slider-internal-range-translation: calc(var(--arcgis-slider-internal-handle-offset) + .5rem + 1px);grid-area:unset;grid-row:-3}&:host(:not([mirrored])){.min{grid-column:1;transform:translate(calc(var(--arcgis-slider-internal-range-translation) * -1))}.max{grid-column:3;transform:translate(var(--arcgis-slider-internal-range-translation))}}&:host([mirrored]){.min{grid-column:3;transform:translate(var(--arcgis-slider-internal-range-translation))}.max{grid-column:1;transform:translate(calc(var(--arcgis-slider-internal-range-translation) * -1))}}}`,be=Object.defineProperty,_e=Object.getOwnPropertyDescriptor,y=(i,e,t,r)=>{for(var n=r>1?void 0:r?_e(e,t):e,a=i.length-1,l;a>=0;a--)(l=i[a])&&(n=(r?l(e,t,n):l(n))||n);return r&&n&&be(e,t,n),n};function xe(){return{min:0,max:100,values:[]}}var _=class extends pe{constructor(i={}){super({...xe(),properties:i}),this._entries=new Map,this.precision=4,this.ready=!1}startup(){let{precision:i}=this,{min:e,max:t,values:r}=this;t=b(t,i),e=b(e,i),r=r?.map(a=>I(b(a,i),e,t)),this._set("min",e),this._set("max",t),this._set("values",r);let n=new Map(r?.map(a=>[O(),a]));this._entries=n,F(()=>this.min,a=>{let l=this.values;a!=null&&l?.length&&l.some(s=>s<a)&&(this._entries.forEach((s,o)=>{s<a&&this._entries.set(o,a)}),this._updatesValues())},{sync:!0}),F(()=>this.max,a=>{let l=this.values;a!=null&&l?.length&&l.some(s=>s>a)&&(this._entries.forEach((s,o)=>{s>a&&this._entries.set(o,a)}),this._updatesValues())},{sync:!0}),F(()=>this.precision,a=>{let{min:l,max:s,values:o}=this;this._set("min",b(l,a)),this._set("max",b(s,a)),o?.length&&(this._entries.forEach((d,c)=>{this._entries.set(c,b(d,a))}),this._updatesValues())},{sync:!0}),this._set("ready",!0)}get entries(){return this._entries}set max(i){if(!this.ready){this._set("max",i);return}let e=this._get("max"),t=b(i,this.precision);e!==t&&this._set("max",t)}set min(i){if(!this.ready){this._set("min",i);return}let e=this._get("min"),t=b(i,this.precision);e!==t&&this._set("min",t)}set values(i){if(!this.ready){this._set("values",i);return}let e=this._get("values");if(i=i?.map(r=>I(b(r,this.precision),this.min,this.max)).sort((r,n)=>r-n),e&&i&&e.length===i.length&&e.every((r,n)=>r===i[n]))return;let t=new Map(i?.map(r=>[O(),r]));this._entries=t,this._set("values",i)}getValue(i){return this._entries.get(i)}setValue(i,e){if(this.values==null)return!1;let{min:t,max:r}=this,n=this._entries.get(i),a=I(b(e,this.precision),t,r);return n===a?!1:(this._entries.set(i,a),this._updatesValues(),!0)}setValues(i){if(this.values==null)return!1;let e=!1,{min:t,max:r}=this;for(let[n,a]of i){let l=this._entries.get(n),s=I(b(a,this.precision),t,r);l!==s&&(e=!0,this._entries.set(n,s))}return e?(this._updatesValues(),!0):!1}_updatesValues(){let i=Array.from(this._entries.values()).sort((e,t)=>e-t);this._set("values",i)}};y([k()],_.prototype,"_entries",2);y([k({readOnly:!0})],_.prototype,"entries",1);y([k()],_.prototype,"max",1);y([k()],_.prototype,"min",1);y([k({cast:i=>I(i,0,20)})],_.prototype,"precision",2);y([k({readOnly:!0})],_.prototype,"ready",2);y([k()],_.prototype,"values",1);_=y([ve("esri.widgets.Slider.SliderData")],_);function I(i,e,t){return Math.min(Math.max(i,e),t)}function b(i,e){return Number.parseFloat(i.toFixed(e))}var N=class{constructor(e){this.steps=e,this.minIndex=0,this.maxIndex=this.steps.length-1}indexToValue(e){return this.steps[P(e,this.minIndex,this.maxIndex)]}valueToIndex(e){let t=this.steps.indexOf(e);return t!==-1?t:this.steps.reduce((r,n,a,l)=>Math.abs(n-e)<Math.abs(l[r]-e)?a:r)}},B=class{constructor(e,t,r){this.min=e,this.max=t,this.stepSize=r,this.minIndex=0,this.maxIndex=Math.round((this.max-this.min)/this.stepSize)}indexToValue(e){return this.min+P(e,this.minIndex,this.maxIndex)*this.stepSize}valueToIndex(e){return e=P(e,this.min,this.max),Math.round((e-this.min)/this.stepSize)}};function ye(i){if(i.steps==null)return null;let e=i.steps;return Array.isArray(e)?e.length===0?null:new N(e):new B(i.min,i.max,e)}function we(i,e,t){if(i==null){let s=new Map;for(let[o,d]of e.entries())s.set(o,d+t);return s}let r=e.size,n=Array.from(e.entries()).map(([s,o])=>{let d=o+t,c=[];for(let h=i.minIndex;h<=i.maxIndex;h++){let u=i.indexToValue(h),p=Math.abs(u-d),g=!1;for(let v=0;v<c.length;v++)if(p<c[v].dist){c.splice(v,0,{idx:h,value:u,dist:p}),g=!0;break}!g&&c.length<r&&c.push({idx:h,value:u,dist:p}),c.length>r&&(c.length=r)}return{uuid:s,stepDistances:c}}),a=new Set,l=new Map;n.sort((s,o)=>s.stepDistances[0].dist-o.stepDistances[0].dist);for(let s of n){let o=s.stepDistances.find(d=>!a.has(d.idx));o?(a.add(o.idx),l.set(s.uuid,o.value)):l.set(s.uuid,e.get(s.uuid))}return l}function ae(i,e,t,r,n){let a=e.get(t)??0;if(!i)return a+r;let l=a+r,s=new Set;if(!n)for(let[c,h]of e.entries())c!==t&&s.add(i.valueToIndex(h));let o=null,d=1/0;for(let c=i.minIndex;c<=i.maxIndex;c++){if(s.has(c))continue;let h=i.indexToValue(c),u=Math.abs(h-l);u<d&&(d=u,o=c)}return o==null?a:i.indexToValue(o)}function ke(i,e,t){let r=new Map,n=t>0?Ee:le,a=Array.from(e).sort((o,d)=>n(o[1],d[1])),l=!1,s=!0;for(let[o,d]of a)if(r.set(o,d),s){let c=se(i,r,o,t);d===c&&(s=!1),l||=s,r.set(o,c)}return{changed:l,entries:r}}function se(i,e,t,r){let{allowValuesOverlap:n,stepsProvider:a,resolution:l,min:s,max:o}=i,d=e.get(t);if(r=r>0?1:-1,!a){let m=P(d+r*l,s,o);if(n)return m;let x=new Set;for(let[M,oe]of e)M!==t&&x.add(oe);for(;x.has(m)&&m<=o&&m>=s;)m=P(m+r*l,s,o);return x.has(m)||m>o||m<s?d:m}let c=a.valueToIndex(d);if(c===-1)return d;if(n){let m=P(c+r,a.minIndex,a.maxIndex);return a.indexToValue(m)}let h=new Set;for(let[m,x]of e)m!==t&&h.add(a.valueToIndex(x));let u=c,p=!1,g=a.minIndex,v=a.maxIndex,D=0;for(;D<Math.abs(v-g)&&(u+=r,!(u<g||u>v));){if(!h.has(u)){p=!0;break}D++}return p?a.indexToValue(u):d}function De(i,e,t,r){let{allowValuesOverlap:n,stepsProvider:a,resolution:l,min:s,max:o}=i,d=e.get(t);if(r=r>0?1:-1,!a){let p=new Set(Array.from(e).filter(([v])=>v!==t).map(([,v])=>v)),g=r>0?o:s;if(n)return g;for(;p.has(g);)if(g-=r*l,r>0&&g>o||r<0&&g<s){g=d;break}return g}if(n)return r>0?a.indexToValue(a.maxIndex):a.indexToValue(a.minIndex);let c=a.valueToIndex(d);if(c===-1)return d;let h=new Set(Array.from(e).filter(([p])=>p!==t).map(([,p])=>a.valueToIndex(p))),u=r>0?a.maxIndex:a.minIndex;for(;h.has(u);)if(u-=r,r>0&&u>o||r<0&&u<s){u=c;break}return a.indexToValue(u)}function Pe(i,e,t){let{stepsProvider:r,min:n,max:a}=i,l=new Map,s=Array.from(e).sort((d,c)=>le(d[1],c[1]));if(r){let d=0;if(t>0){let c=s[s.length-1],h=r.valueToIndex(c[1]);d=r.maxIndex-h}else{let c=s[0],h=r.valueToIndex(c[1]);d=r.minIndex-h}if(d===0)for(let[c,h]of s)l.set(c,h);for(let[c,h]of s){let u=r.indexToValue(r.valueToIndex(h)+d);l.set(c,u)}return l}let o=0;if(t>0){let d=s[s.length-1];o=a-d[1]}else{let d=s[0];o=n-d[1]}for(let[d,c]of s)l.set(d,c+o);return l}function le(i,e){return i-e}function Ee(i,e){return e-i}function P(i,e,t){return Math.max(e,Math.min(t,i))}var $e=te(_),U=class extends W{constructor(){super(...arguments),this._popoverElement=A(),this._trackElement=A(),this.messages=Q({}),this._onPointerMoveDragUpdate=e=>{this._updateDrag(this._mapEventToRange(e))},this._onPointerUpDragEnd=e=>{L(e)&&this._endDrag()},this._onPointerCancelDragEnd=()=>{this._endDrag()},this._minFormatter=e=>this._formatLabel(e,"min"),this._maxFormatter=e=>this._formatLabel(e,"max"),this._valueFormatter=e=>this._formatLabel(e,"value"),this._formatLabel=(e,t)=>{let r=this.labelFormatter;return r?r(e,t,this._defaultFormatter)??this._defaultFormatter(e):this._defaultFormatter(e)},this._defaultFormatter=e=>this._numberFormatter.format(e),this._numberFormatter=new Intl.NumberFormat(this.messages._lang),this._resizeObserver=new ResizeObserver(()=>{this._layoutLabelInputs()}),this._labelInputsUpdateComplete=null,this._dragInfo=null,this._hasPopoverContent=!1,this._hasContentStart=!1,this._hasContentEnd=!1,this._sliderData=$e(this),this.allowValuesOverlap=!1,this.autoDestroyDisabled=!1,this.disabled=!1,this.fillPlacement="start",this.layout="horizontal",this.max=this._sliderData.max,this.min=this._sliderData.min,this.mirrored=!1,this.popoverLabel="",this.popoverPlacement="leading",this.precision=this._sliderData.precision,this.rangeLabelsEditingEnabled=!1,this.rangeLabelsPlacement="center",this.segmentsDraggingDisabled=!1,this.showRangeLabels=!1,this.valueLabelsDisplay="hidden",this.valueLabelsPlacement="leading",this.valueLabelsEditingEnabled=!1,this.values=this._sliderData.values,this.arcgisActiveValueChange=E({cancelable:!1}),this.arcgisChange=E({cancelable:!1}),this.arcgisInput=E({cancelable:!1}),this.arcgisRangeChange=E({cancelable:!1})}static{this.properties={_dragInfo:16,_hasPopoverContent:16,_hasContentStart:16,_hasContentEnd:16,_activePart:16,_sliderData:16,activeValue:32,allowValuesOverlap:5,autoDestroyDisabled:5,disabled:[7,{useDefault:!0}],fullRangeMax:11,fullRangeMin:11,fillPlacement:1,labelFormatter:0,layout:3,max:11,min:11,mirrored:[7,{useDefault:!0}],popoverLabel:1,popoverPlacement:3,precision:11,rangeLabelsEditingEnabled:5,rangeLabelsPlacement:3,segmentsDraggingDisabled:5,showRangeLabels:7,steps:[9,{converter:{fromAttribute(e){if(e.includes(","))return e.split(",").filter(r=>r.trim()!=="").map(parseFloat).filter(r=>Number.isFinite(r));let t=parseFloat(e);return Number.isFinite(t)?t:void 0}}}],valueLabelsDisplay:3,valueLabelsPlacement:3,valueLabelsEditingEnabled:5,values:[1,{converter:{fromAttribute(e){return e.includes(",")?e.split(",").filter(t=>t.trim()!=="").map(parseFloat).filter(t=>Number.isFinite(t)):[parseFloat(e)].filter(t=>Number.isFinite(t))}}}],messageOverrides:0}}static{this.styles=fe}static{this.shadowRootOptions={mode:"open",delegatesFocus:!0}}get _fullMin(){return this.fullRangeMin??this.min}get _fullMax(){return this.fullRangeMax??this.max}get _fullRange(){return this._fullMax-this._fullMin}get isHorizontal(){return this.layout==="horizontal"}get _trackWidthOrHeight(){let e=this._trackElement.value?.getBoundingClientRect();return e?this.isHorizontal?e.width:e.height:0}get _disabledOrInvalid(){return this.disabled||this.values.length===0||this._invalid}get _invalid(){let e=this.fullRangeMin==null||this.fullRangeMax==null||this.fullRangeMin<this.fullRangeMax,t=this.fullRangeMin==null||this.fullRangeMin<=this.min,r=this.fullRangeMax==null||this.fullRangeMax>=this.max;return this.min>=this.max||!e||!t||!r}get resolution(){let e=(this._sliderData.max-this._sliderData.min)/this._trackWidthOrHeight;return Math.max(e,1/Math.pow(10,this.precision))}get activeValue(){if(this._activePart)return this._activePart==="range"?"all":this._sliderData.getValue(this._activePart)}async destroy(){await this.manager.destroy()}load(){this._sliderData.startup()}willUpdate(e){if((e.has("steps")||e.has("min")||e.has("max"))&&(this._stepsProvider=ye(this)),e.has("messages")||e.has("min")||e.has("max")||e.has("precision")){let t=this.max!=null&&this.min!=null&&this.max-this.min>10?2:this.precision;this._numberFormatter=new Intl.NumberFormat(this.messages._lang,{maximumFractionDigits:t})}}updated(e){this._layoutLabelInputs();let t=this._popoverElement.value;t&&(e.has("values")||e.has("min")||e.has("max"))&&t.reposition()}loaded(){this._resizeObserver.observe(this.el)}disconnectedCallback(){super.disconnectedCallback(),this._removeDragListeners()}_makeResizeRef(){let e=null;return t=>{t?(e=t,this._resizeObserver.observe(t)):e&&(this._resizeObserver.unobserve(e),e=null)}}async _layoutLabelInputs(){if(this.layout!=="horizontal"||!this._trackElement.value||this.valueLabelsDisplay==="hidden")return;let e=this.renderRoot.querySelectorAll("arcgis-label-input"),t=this.componentOnReady().then(()=>Promise.all(Array.from(e,a=>a.updateComplete)));if(this._labelInputsUpdateComplete=t,await t,t!==this._labelInputsUpdateComplete)return;this._labelInputsUpdateComplete=null;let{_trackElement:{value:r}}=this,n=r.getBoundingClientRect();for(let a of this._sliderData.entries.keys()){let l=this._activePart==="range"||this._activePart===a;if(this.valueLabelsDisplay==="always"||l){let s=Re(this,a),o=ie(this,a);if(!s||!o)continue;let d=s.getBoundingClientRect(),c=o.getBoundingClientRect(),h=o.getLabelBoundingClientRect(),u=d.width/2,p=Math.round(d.left+u),g=Math.round(h.width/2),v=c.width/2,D=n.left-u,m=n.right+u,x=p-g,M=p+g;x<D?v+=x-D:M>m&&(v+=M-m),o.style.transform=`translateX(${-Math.round(v)}px)`}}}_onTrackFocus(){this._setActivePart("range")}_onTrackBlur(){this._setActivePart(null)}_onTrackRangePointerDown(e){this._disabledOrInvalid||!L(e)||this._startDrag("range",this._mapEventToRange(e))}async _onPointerDown(e){if(this._disabledOrInvalid||!L(e))return;let t=this.renderRoot.querySelector("arcgis-label-input[editing]");if(e.target===t)return;if(t){t.blur(),this._focusEntry(C(t));return}if(Ce(e.target)||this.values?.length>1)return;let r=this._mapEventToRange(e),[n,a]=this._sliderData.entries.entries().next().value,l=r*this._fullRange+this._fullMin-a,s=z(this._fullMin,this._fullMax,a)/100;this._startDrag(n,s);let o=ae(this._stepsProvider,this._sliderData.entries,n,l,this.allowValuesOverlap);this._setValue(n,o),this._focusEntry(n)}_onThumbPointerDown(e){let t=C(e.currentTarget);if(!L(e)||this._disabledOrInvalid||!t)return;let r=ie(this,t);e.target===r&&r?.editing||(e.stopPropagation(),this._startDrag(t,this._mapEventToRange(e)))}_endDrag(){if(this._disabledOrInvalid)return;this._removeDragListeners();let e=!1;if(this._dragInfo){let{entries:t}=this._dragInfo;for(let[r,n]of t)if(this._sliderData.getValue(r)!==n){e=!0;break}}this._dragInfo=null,e&&this.arcgisChange.emit()}_startDrag(e,t){if(this._disabledOrInvalid)return;let{min:r,max:n,values:a}=this,l=r,s=n;if(this._setActivePart(e),e==="range"){if(this.segmentsDraggingDisabled)return;l=r-a[0],s=n-a[a.length-1]}this._dragInfo={position:t,entries:new Map(this._sliderData.entries.entries()),minDiff:l,maxDiff:s},this._addDragListeners()}_updateDrag(e){if(!this._dragInfo||!this._activePart)return;let{_activePart:t,_dragInfo:{position:r,entries:n,minDiff:a,maxDiff:l}}=this;if(r===e)return;let s=(e-r)*this._fullRange;if(t==="range"){s=Math.min(l,Math.max(a,s));let o=we(this._stepsProvider,n,s);this._setValues(o)}else{let o=ae(this._stepsProvider,n,t,s,this.allowValuesOverlap);this._setValue(t,o)}}_focusEntry(e){e&&Me(this,e)?.focus()}_addDragListeners(){document.addEventListener("pointerup",this._onPointerUpDragEnd),document.addEventListener("pointermove",this._onPointerMoveDragUpdate),document.addEventListener("pointercancel",this._onPointerCancelDragEnd)}_removeDragListeners(){document.removeEventListener("pointerup",this._onPointerUpDragEnd),document.removeEventListener("pointermove",this._onPointerMoveDragUpdate),document.removeEventListener("pointercancel",this._onPointerCancelDragEnd)}_setValues(e){this._sliderData.setValues(e)&&(this._dragInfo||this.arcgisChange.emit(),this.arcgisInput.emit())}_setValue(e,t){this._sliderData.setValue(e,t)&&(this._dragInfo||this.arcgisChange.emit(),this.arcgisInput.emit())}_onThumbFocus(e){let t=C(e.currentTarget);this._setActivePart(t)}_onThumbBlur(){this._setActivePart(null)}_onRangeInputChange(e){let t=e.currentTarget,r=t.value,n=t.dataset.type,a=!1;switch(e.stopPropagation(),n){case"min":{r<this.max?(this.min=r,a=!0):t.value=this.min;break}case"max":{r>this.min?(this.max=r,a=!0):t.value=this.max;break}}a&&this.arcgisRangeChange.emit()}_onValueInputChange(e){let t=e.currentTarget,r=C(t),n=t.value;r&&(e.stopPropagation(),this._setValue(r,n),t.value=this._sliderData.getValue(r))}_mapEventToRange(e){let t=this._trackElement.value?.getBoundingClientRect();if(!t)return 0;let r=this.isHorizontal?(e.clientX-t.left)/t.width:1-(e.clientY-t.top)/t.height;return this.mirrored?1-r:r}_getPositionStyleForElement(e){let t=z(this._fullMin,this._fullMax,e);return{[this.isHorizontal?this.mirrored?"right":"left":this.mirrored?"top":"bottom"]:`${t}%`}}_popoverSlotChange(e){this._hasPopoverContent=V(e)}_onContentStartSlotChange(e){this._hasContentStart=V(e)}_onContentEndSlotChange(e){this._hasContentEnd=V(e)}_onThumbKeyDown(e){let t=C(e.currentTarget);if(!t)return;let r=e.currentTarget.querySelector("arcgis-label-input");if(!r||r.editing)return;let n=e.key;switch(n){case"Enter":{r.edit();break}case"ArrowUp":case"ArrowDown":case"ArrowLeft":case"ArrowRight":{e.preventDefault();let a=n==="ArrowUp"||n==="ArrowRight"?1:-1;a=this.mirrored?a*-1:a;let l=se({allowValuesOverlap:this.allowValuesOverlap,stepsProvider:this._stepsProvider,resolution:this.resolution,min:this.min,max:this.max},this._sliderData.entries,t,a);this._setValue(t,l);break}case"End":case"Home":{e.preventDefault();let a=this.isHorizontal&&this.mirrored||this.layout==="vertical"?n==="End"?-1:1:n==="Home"?-1:1,l=De({allowValuesOverlap:this.allowValuesOverlap,stepsProvider:this._stepsProvider,resolution:this.resolution,min:this.min,max:this.max},this._sliderData.entries,t,a);this._setValue(t,l);break}}}_onTrackRangeKeyDown(e){let t=e.key;switch(t){case"ArrowUp":case"ArrowDown":case"ArrowLeft":case"ArrowRight":{e.preventDefault();let r=t==="ArrowUp"||t==="ArrowRight"?1:-1;r=this.mirrored?r*-1:r;let{entries:n}=ke({allowValuesOverlap:this.allowValuesOverlap,stepsProvider:this._stepsProvider,resolution:this.resolution,min:this.min,max:this.max},this._sliderData.entries,r);this._setValues(n);break}case"End":case"Home":{e.preventDefault();let r=this.isHorizontal&&this.mirrored||this.layout==="vertical"?t==="End"?-1:1:t==="Home"?-1:1,n=Pe({allowValuesOverlap:this.allowValuesOverlap,stepsProvider:this._stepsProvider,resolution:this.resolution,min:this.min,max:this.max},this._sliderData.entries,r);this._setValues(n);break}}}_setActivePart(e){this._activePart!==e&&(this._activePart=e,this.arcgisActiveValueChange.emit())}render(){return f`<div class=${$({content:!0,disabled:this._disabledOrInvalid})} @pointerdown=${this._onPointerDown}>${this._renderContentStart()}${this._renderContentEnd()}${this._renderRangeLabel("min")}${this._renderTrackRange()}${this._renderRangeLabel("max")}${this._renderPopover()}</div>`}_renderPopover(){let{_activePart:e,layout:t,popoverPlacement:r,valueLabelsPlacement:n,valueLabelsDisplay:a,popoverLabel:l}=this,s=e?Ie(e)?e:"track-range":"",o=this._hasPopoverContent&&!!s,d=t==="horizontal"?r==="leading"?"top":"bottom":r==="leading"?"left":"right",c=14;return a!=="hidden"&&r===n&&(c+=24),f`<calcite-popover flip-disabled focus-trap-disabled .label=${l} .open=${o} .offsetDistance=${c} .placement=${d} pointer-disabled .referenceElement=${s} scale=s trigger-disabled ${R(this._popoverElement)}><slot name=popover @slotchange=${this._popoverSlotChange}></slot></calcite-popover>`}_renderContentStart(){return f`<div class="content-start" .hidden=${!this._hasContentStart}><slot name=content-start @slotchange=${this._onContentStartSlotChange}></slot></div>`}_renderContentEnd(){return f`<div class="content-end" .hidden=${!this._hasContentEnd}><slot name=content-end @slotchange=${this._onContentEndSlotChange}></slot></div>`}_renderTrackRange(){return f`<div class="track-container">${this._renderTrack()}${this._renderThumbs()}</div>`}_renderTrack(){return f`<div class="track" ${R(this._trackElement)}>${this._renderTrackBackground()}${this._renderFillSegment()}</div>`}_renderTrackBackground(){let{max:e,min:t,fillPlacement:r,values:n}=this,a=n.length>1,l=this._fullMin,s=this._fullMax,o=[];return this._invalid?f`<div class="segment track-bounds" style=${T({left:"0%",right:"0%",top:"0%",bottom:"0%"})}></div>`:(l<t&&(o.push(this._renderSegment(l,t,[this.mirrored?"track-effective-trailing":"track-effective-leading",!a&&r==="start"?"track-fill":null])),l=t),s>e&&(o.push(this._renderSegment(e,s,[this.mirrored?"track-effective-leading":"track-effective-trailing",!a&&r==="end"?"track-fill":null])),s=e),o.push(this._renderSegment(l,s,["track-bounds"])),o)}_renderFillSegment(){let{values:e,fillPlacement:t,min:r,max:n}=this;if(!e?.length||this._invalid)return;let a=[...e].sort((l,s)=>l-s);if(a.length===1)switch(t){case"start":if(r<a[0])return this._renderSegment(r,a[0],["track-range"]);break;case"end":if(n>a[0])return this._renderSegment(a[0],n,["track-range"]);break}return this._renderSegment(a[0],a[a.length-1],["track-range",this.segmentsDraggingDisabled?null:"interactive",this._activePart==="range"?"active":null],{id:"track-range",onFocus:this.segmentsDraggingDisabled?void 0:this._onTrackFocus,onBlur:this.segmentsDraggingDisabled?void 0:this._onTrackBlur,onPointerDown:this.segmentsDraggingDisabled?void 0:this._onTrackRangePointerDown,onKeyDown:this.segmentsDraggingDisabled?void 0:this._onTrackRangeKeyDown})}_renderSegment(e,t,r,n){let{_fullMin:a,_fullMax:l,mirrored:s}=this,o=[z(a,l,ne(e,a,l)),100-z(a,l,ne(t,a,l))];s&&o.reverse();let d=this.isHorizontal?{left:`${o[0]}%`,right:`${o[1]}%`}:{top:`${o[1]}%`,bottom:`${o[0]}%`},c=G("segment",...r);return f`<div id=${n?.id??w} class=${$(c)} style=${T(d)} .tabIndex=${n?.onPointerDown?0:-1} @focus=${n?.onFocus} @blur=${n?.onBlur} @pointerdown=${n?.onPointerDown} @keydown=${n?.onKeyDown}></div>`}_renderThumbs(){let{_sliderData:e}=this,t=Array.from(e.entries).filter(([,r])=>r>=this._fullMin&&r<=this._fullMax);return re(t,([r,n])=>this._renderThumb(r,n))}_renderThumb(e,t){let{valueLabelsDisplay:r}=this,n=this._activePart===e||this._activePart==="range",a=this._activePart==="range"||this._activePart===e,l=r==="always"||r==="auto"&&a,s=this.isHorizontal,o=s?"horizontal":"vertical",d=`label-${e}`,c=s?"center":this.valueLabelsPlacement==="leading"?"end":"start";return X(e,f`<div id=${e??w} .ariaLabel=${this.messages.sliderValue} aria-labelledby=${(r?d:void 0)??w} .ariaOrientation=${o} .ariaValueMax=${this.max} .ariaValueMin=${this.min} .ariaValueNow=${t} class=${$({thumb:!0,active:n})} data-entry=${e??w} @pointerdown=${this._onThumbPointerDown} @focus=${this._onThumbFocus} @blur=${this._onThumbBlur} @keydown=${this._onThumbKeyDown} role=slider style=${T({...this._getPositionStyleForElement(t),"z-index":this._activePart===e?1:0})} tabindex=0><span class="handle"></span><arcgis-label-input .alignment=${c} class="label" .hidden=${!l} id=${d??w} .labelFormatter=${this._valueFormatter} @focus=${this._onThumbFocus} @blur=${this._onThumbBlur} @arcgisChange=${this._onValueInputChange} .readOnly=${!this.valueLabelsEditingEnabled} tabindex=-1 .value=${t} ${R(this._makeResizeRef())}></arcgis-label-input></div>`)}_renderRangeLabel(e){let t="center";return this.isHorizontal&&(t=e==="min"?"end":"start",this.rangeLabelsPlacement==="trailing"&&(t=t==="end"?"start":"end"),this.mirrored&&(t=t==="end"?"start":"end")),f`<arcgis-label-input .alignment=${t} class=${$(e)} data-type=${e??w} .hidden=${!this.showRangeLabels} .labelFormatter=${this[`_${e}Formatter`]} @arcgisChange=${this._onRangeInputChange} .readOnly=${!this.rangeLabelsEditingEnabled} .value=${this[e]}></arcgis-label-input>`}};function Ce(i){return"dataset"in i&&i.tagName==="ARCGIS-LABEL-INPUT"&&(i.dataset.type==="min"||i.dataset.type==="max")}function C(i){let e=Z(i,"[data-entry]");return e&&"dataset"in e?e.dataset.entry:null}function Ie(i){return typeof i!=null&&i!=="range"}function Me(i,e){return e?i.renderRoot.querySelector(`div[data-entry="${e}"]`):null}function Re(i,e){return e?i.renderRoot.querySelector(`div[data-entry="${e}"] span.handle`):null}function ie(i,e){return e?i.renderRoot.querySelector(`div[data-entry="${e}"] arcgis-label-input`):null}function L(i){return i.isPrimary&&i.button===0}var Te=5;function z(i,e,t){let r=e-i,n=(t-i)/r*100;return Number.parseFloat(n.toFixed(Te))}function ne(i,e,t){return Math.max(e,Math.min(t,i))}Y("arcgis-slider",U);return U},"core/reactiveUtils","applications/Components/reactiveUtils","core/accessorSupport/decorators","core/Accessor","core/Accessor","core/accessorSupport/decorators","core/reactiveUtils")
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
2
2
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
3
|
-
v5.0.0-next.
|
|
4
|
-
import{A as s,B as u,H as h,g as r,i as n,q as o,z as a}from"./
|
|
3
|
+
v5.0.0-next.127 */
|
|
4
|
+
import{A as s,B as u,H as h,g as r,i as n,q as o,z as a}from"./ZG65PSAN.js";export default $arcgis.t(([{formatNumber:c}])=>{var d=r`:host{display:block}:host([hidden]){display:none}.readOnlyLabel{display:block;font-size:var(--calcite-font-size-sm);font-variant-numeric:tabular-nums;line-height:1rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding-inline:.5rem;padding-block:3px;border-color:var(--calcite-color-transparent);border-style:solid;border-width:var(--calcite-button-border-size, 1px);color:var(--calcite-color-text-1)}:host(:not([read-only])) .readOnlyLabel{position:absolute;opacity:0}:host([alignment="start"]){.readOnlyLabel{text-align:start}}:host([alignment="end"]){.readOnlyLabel{text-align:end}}:host([alignment="center"]){.readOnlyLabel{text-align:center}}calcite-button{inline-size:100%;--calcite-offset-invert-focus: 1;--calcite-internal-animation-timing-fast: 0}calcite-input-number{inline-size:100%;--calcite-internal-animation-timing-fast: 0}`,l=class extends u{constructor(){super(...arguments),this._buttonRef=a(),this._inputRef=a(),this._labelRef=a(),this._formatOptions={style:"decimal",useGrouping:!0,minimumFractionDigits:0,maximumFractionDigits:2},this._formatValue=t=>c(t,this._formatOptions),this._pointerDownPosition=null,this._displayedValue="",this._editing=!1,this.alignment="center",this.readOnly=!1,this.value=0,this.arcgisChange=o({cancelable:!1})}static{this.properties={_displayedValue:16,_editing:16,alignment:3,editing:39,labelFormatter:0,readOnly:7,value:11}}static{this.styles=d}static{this.shadowRootOptions={mode:"open",delegatesFocus:!0}}get editing(){return this._editing}async edit(){this._enterEdit()}getLabelBoundingClientRect(){return this._labelRef.value?this._labelRef.value.getBoundingClientRect():this.el.getBoundingClientRect()}willUpdate(t){if(t.has("value")||t.has("labelFormatter")){let e=this.value;this._displayedValue=this._internalLabelFormatter(e)}}updated(t){let e=this._inputRef.value,i=this.renderRoot.querySelector(".readOnlyLabel");e&&i&&(e.style.width=`${i.offsetWidth}px`)}_enterEdit(){this._editing||this.readOnly||(this._editing=!0,this.requestUpdate("editing",!1),this.updateComplete.then(async()=>{let t=this._inputRef.value;await t?.setFocus(),await t?.selectText()}))}_exitEdit(t,e=!1){this._editing&&(t?this._commitValue(this._inputRef.value):this._inputRef.value&&(this._displayedValue=this._internalLabelFormatter(this.value),this._inputRef.value.value=`${this.value}`),this._editing=!1,this.requestUpdate("editing",!0),e||this.updateComplete.then(async()=>{await this._buttonRef.value?.setFocus()}))}_commitValue(t){let e=this._parseNumber(t?.value??"");e!==null&&this.value!==e&&(this.value=e,this.arcgisChange.emit())}_parseNumber(t){if(t.trim()==="")return null;let e=Number(t);return Number.isFinite(e)?e:this.value??null}_internalLabelFormatter(t){let e=this.labelFormatter;return e?e(t,this._formatValue)??this._formatValue(t):this._formatValue(t)}_onBlur(){this._exitEdit(!0,!0)}_onValueChange(t){this._commitValue(t.currentTarget)}_onKeyDown(t){t.key==="Enter"?(this._exitEdit(!0),t.stopPropagation(),t.preventDefault()):t.key==="Escape"&&(this._exitEdit(!1),t.stopPropagation(),t.preventDefault())}_onPointerDown(t){this._pointerDownPosition={x:t.clientX,y:t.clientY}}_onClick(t){if(this._pointerDownPosition){let e=t.clientX-this._pointerDownPosition.x,i=t.clientY-this._pointerDownPosition.y;if(Math.sqrt(e*e+i*i)>2)return}this._enterEdit(),this._pointerDownPosition=null}_onInput(t){let e=this._parseNumber(t.currentTarget.value??"");if(e===null){this._displayedValue="";return}this._displayedValue=this._internalLabelFormatter(e)}render(){let{alignment:t,_displayedValue:e}=this,i=[n`<span class="readOnlyLabel"><span ${s(this._labelRef)}>${e}</span></span>`];return this.readOnly||i.push(n`<calcite-button .alignment=${t} appearance=transparent .hidden=${this._editing} @pointerdown=${this._onPointerDown} @click=${this._onClick} scale=s width=full ${s(this._buttonRef)}>${e}</calcite-button>`,n`<calcite-input-number .alignment=${t} group-separator .hidden=${!this._editing} number-button-type=none @calciteInputNumberChange=${this._onValueChange} @keydown=${this._onKeyDown} @blur=${this._onBlur} @input=${this._onInput} scale=s status=idle .value=${`${this.value}`} ${s(this._inputRef)}></calcite-input-number>`),i}};h("arcgis-label-input",l);return l},"intl")
|