@esri/solutions-components 0.8.8 → 0.8.9
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/assets/t9n/crowdsource-reporter/resources.json +3 -1
- package/dist/assets/t9n/crowdsource-reporter/resources_en.json +3 -1
- package/dist/cjs/{calcite-action-menu_2.cjs.entry.js → calcite-action-menu_3.cjs.entry.js} +114 -7
- package/dist/cjs/calcite-alert_4.cjs.entry.js +46 -5
- package/dist/cjs/{calcite-input-date-picker_3.cjs.entry.js → calcite-block_5.cjs.entry.js} +691 -13
- package/dist/cjs/{calcite-combobox_5.cjs.entry.js → calcite-combobox_3.cjs.entry.js} +876 -844
- package/dist/cjs/calcite-dropdown_4.cjs.entry.js +1023 -0
- package/dist/cjs/{calcite-flow_5.cjs.entry.js → calcite-flow_6.cjs.entry.js} +327 -2
- package/dist/cjs/card-manager_3.cjs.entry.js +5 -5
- package/dist/cjs/crowdsource-manager.cjs.entry.js +1 -1
- package/dist/cjs/crowdsource-reporter.cjs.entry.js +122 -21
- package/dist/cjs/{downloadUtils-8b05d7cc.js → downloadUtils-dc349b1a.js} +2 -2
- package/dist/cjs/{index.es-e7587227.js → index.es-1830a1e6.js} +2 -2
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/map-select-tools_3.cjs.entry.js +8 -8
- package/dist/cjs/{mapViewUtils-3e0fa457.js → mapViewUtils-9dc05308.js} +11 -5
- package/dist/cjs/public-notification.cjs.entry.js +2 -2
- package/dist/cjs/solutions-components.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/components/create-feature/create-feature.js +18 -0
- package/dist/collection/components/crowdsource-reporter/crowdsource-reporter.css +16 -0
- package/dist/collection/components/crowdsource-reporter/crowdsource-reporter.js +155 -35
- package/dist/collection/components/feature-details/feature-details.css +18 -0
- package/dist/collection/components/feature-details/feature-details.js +500 -0
- package/dist/collection/components/feature-details/test/feature-details.e2e.js +14 -0
- package/dist/collection/components/feature-details/test/feature-details.spec.js +22 -0
- package/dist/collection/components/feature-list/feature-list.js +14 -1
- package/dist/collection/components/info-card/info-card.css +15 -5
- package/dist/collection/components/info-card/info-card.js +178 -5
- package/dist/collection/components/layer-table/layer-table.js +2 -2
- package/dist/collection/components/map-card/map-card.js +1 -1
- package/dist/collection/components/map-select-tools/map-select-tools.js +5 -5
- package/dist/collection/components/refine-selection/refine-selection.js +1 -1
- package/dist/collection/demos/crowdsource-reporter.html +115 -1
- package/dist/collection/utils/mapViewUtils.js +11 -5
- package/dist/collection/utils/mapViewUtils.ts +13 -5
- package/dist/components/create-feature2.js +4 -0
- package/dist/components/crowdsource-reporter.js +270 -81
- package/dist/components/feature-details.d.ts +11 -0
- package/dist/components/feature-details.js +11 -0
- package/dist/components/feature-details2.js +449 -0
- package/dist/components/feature-list2.js +14 -1
- package/dist/components/info-card2.js +53 -5
- package/dist/components/layer-table2.js +2 -2
- package/dist/components/map-card2.js +1 -1
- package/dist/components/map-select-tools2.js +5 -5
- package/dist/components/mapViewUtils.js +11 -5
- package/dist/components/refine-selection2.js +1 -1
- package/dist/esm/{calcite-action-menu_2.entry.js → calcite-action-menu_3.entry.js} +118 -12
- package/dist/esm/calcite-alert_4.entry.js +46 -5
- package/dist/esm/{calcite-input-date-picker_3.entry.js → calcite-block_5.entry.js} +688 -12
- package/dist/esm/{calcite-combobox_5.entry.js → calcite-combobox_3.entry.js} +878 -844
- package/dist/esm/calcite-date-picker-day_3.entry.js +1 -1
- package/dist/esm/calcite-dropdown_4.entry.js +1016 -0
- package/dist/esm/{calcite-flow_5.entry.js → calcite-flow_6.entry.js} +327 -3
- package/dist/esm/card-manager_3.entry.js +5 -5
- package/dist/esm/crowdsource-manager.entry.js +1 -1
- package/dist/esm/crowdsource-reporter.entry.js +122 -21
- package/dist/esm/{date-5630530d.js → date-0c026a8b.js} +1 -1
- package/dist/esm/{downloadUtils-0c1e4d7b.js → downloadUtils-df4f21f6.js} +2 -2
- package/dist/esm/{index.es-286e3cfa.js → index.es-904fb846.js} +2 -2
- package/dist/esm/loader.js +1 -1
- package/dist/esm/map-select-tools_3.entry.js +8 -8
- package/dist/esm/{mapViewUtils-253178f1.js → mapViewUtils-2ec19fb0.js} +11 -5
- package/dist/esm/public-notification.entry.js +2 -2
- package/dist/esm/solutions-components.js +1 -1
- package/dist/solutions-components/demos/crowdsource-reporter.html +115 -1
- package/dist/solutions-components/{p-813fd8a4.entry.js → p-29f518fd.entry.js} +2 -2
- package/dist/solutions-components/{p-13ca3b00.entry.js → p-452fd697.entry.js} +1 -1
- package/dist/solutions-components/p-511b1c91.entry.js +23 -0
- package/dist/solutions-components/p-577efb16.js +36 -0
- package/dist/solutions-components/{p-94de9279.js → p-5817d78c.js} +1 -1
- package/dist/solutions-components/p-602cd811.entry.js +17 -0
- package/dist/solutions-components/{p-15f9624a.entry.js → p-6557b703.entry.js} +1 -1
- package/dist/solutions-components/p-7269c49b.entry.js +6 -0
- package/dist/solutions-components/p-760bd17e.entry.js +6 -0
- package/dist/solutions-components/p-95fea07a.entry.js +17 -0
- package/dist/solutions-components/{p-212b02e7.js → p-ae4d86e8.js} +1 -1
- package/dist/solutions-components/{p-038fcd93.entry.js → p-c273ab7a.entry.js} +1 -1
- package/dist/solutions-components/p-d742b915.entry.js +29 -0
- package/dist/solutions-components/p-dfad61a8.entry.js +24 -0
- package/dist/solutions-components/{p-331b5d1e.js → p-fca434c8.js} +2 -2
- package/dist/solutions-components/p-fd82a00f.entry.js +6 -0
- package/dist/solutions-components/solutions-components.esm.js +1 -1
- package/dist/solutions-components/utils/mapViewUtils.ts +13 -5
- package/dist/types/components/create-feature/create-feature.d.ts +4 -4
- package/dist/types/components/crowdsource-reporter/crowdsource-reporter.d.ts +91 -10
- package/dist/types/components/feature-details/feature-details.d.ts +151 -0
- package/dist/types/components/feature-list/feature-list.d.ts +6 -0
- package/dist/types/components/info-card/info-card.d.ts +33 -1
- package/dist/types/components.d.ts +129 -12
- package/dist/types/preact.d.ts +6 -1
- package/dist/types/utils/mapViewUtils.d.ts +5 -3
- package/package.json +1 -1
- package/dist/cjs/calcite-block_2.cjs.entry.js +0 -652
- package/dist/cjs/calcite-graph_2.cjs.entry.js +0 -1055
- package/dist/cjs/calcite-scrim.cjs.entry.js +0 -125
- package/dist/cjs/utils-7bc7f595.js +0 -64
- package/dist/esm/calcite-block_2.entry.js +0 -647
- package/dist/esm/calcite-graph_2.entry.js +0 -1050
- package/dist/esm/calcite-scrim.entry.js +0 -121
- package/dist/esm/utils-9fb4104a.js +0 -61
- package/dist/solutions-components/p-04c37d69.entry.js +0 -17
- package/dist/solutions-components/p-0b92e4b1.entry.js +0 -11
- package/dist/solutions-components/p-238d3b5f.entry.js +0 -6
- package/dist/solutions-components/p-3af79063.js +0 -36
- package/dist/solutions-components/p-80b11ec1.entry.js +0 -17
- package/dist/solutions-components/p-a3a11749.entry.js +0 -6
- package/dist/solutions-components/p-aec06ce4.entry.js +0 -18
- package/dist/solutions-components/p-bfdf89c2.js +0 -11
- package/dist/solutions-components/p-c4ff3b52.entry.js +0 -17
- package/dist/solutions-components/p-ced067bd.entry.js +0 -17
- package/dist/solutions-components/p-d136eab0.entry.js +0 -23
- package/dist/solutions-components/p-e0446d5b.entry.js +0 -6
@@ -0,0 +1,24 @@
|
|
1
|
+
/*!
|
2
|
+
* Copyright 2022 Esri
|
3
|
+
* Licensed under the Apache License, Version 2.0
|
4
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
5
|
+
*/
|
6
|
+
import{r as t,c as e,h as i,F as s,g as n,f as a,H as o}from"./p-7d280d8a.js";import{g as r}from"./p-fc9fe5fb.js";import{t as l,i as c,e as h,f as d,q as p,D as f}from"./p-3dd92f0d.js";import{g as m}from"./p-5a9a971a.js";import{i as u}from"./p-e7afc0a8.js";import{s as v,a as g,c as b}from"./p-a4149333.js";import{a as x,C as w,I as y,S as k}from"./p-4c5d243f.js";import{f as E,c as z,b as C,a as H,r as P,F as D}from"./p-db53bde3.js";import{d as j,a as I,c as L,u as M}from"./p-d7b02d3a.js";import{o as A}from"./p-2b0454a0.js";import{H as O}from"./p-76bd5032.js";import{c as S,d as B}from"./p-13f2d901.js";import{u as F,c as R,s as $,d as T}from"./p-05cb50f9.js";import{c as _}from"./p-1f65ab1e.js";import{F as U}from"./p-201a6ea3.js";import{g as W}from"./p-495e7b9d.js";import"./p-7c2be8cc.js";import"./p-a82f35c9.js";const X=["ArrowUp","ArrowDown","End","Home"],Y=class{constructor(i){t(this,i),this.calciteActionMenuOpen=e(this,"calciteActionMenuOpen",6),this.actionElements=[],this.guid=`calcite-action-menu-${m()}`,this.menuId=`${this.guid}-menu`,this.menuButtonId=`${this.guid}-menu-button`,this.connectMenuButtonEl=()=>{const{menuButtonId:t,menuId:e,open:i,label:s}=this,n=this.slottedMenuButtonEl||this.defaultMenuButtonEl;this.menuButtonEl!==n&&(this.disconnectMenuButtonEl(),this.menuButtonEl=n,this.setTooltipReferenceElement(),n&&(n.active=i,n.setAttribute("aria-controls",e),n.setAttribute("aria-expanded",l(i)),n.setAttribute("aria-haspopup","true"),n.id||(n.id=t),n.label||(n.label=s),n.text||(n.text=s),n.addEventListener("pointerdown",this.menuButtonClick),n.addEventListener("keydown",this.menuButtonKeyDown)))},this.disconnectMenuButtonEl=()=>{const{menuButtonEl:t}=this;t&&(t.removeEventListener("pointerdown",this.menuButtonClick),t.removeEventListener("keydown",this.menuButtonKeyDown))},this.setMenuButtonEl=t=>{const e=t.target.assignedElements({flatten:!0}).filter((t=>null==t?void 0:t.matches("calcite-action")));this.slottedMenuButtonEl=e[0],this.connectMenuButtonEl()},this.setDefaultMenuButtonEl=t=>{this.defaultMenuButtonEl=t,this.connectMenuButtonEl()},this.handleCalciteActionClick=()=>{this.open=!1,this.setFocus()},this.menuButtonClick=t=>{c(t)&&this.toggleOpen()},this.updateTooltip=t=>{const e=t.target.assignedElements({flatten:!0}).filter((t=>null==t?void 0:t.matches("calcite-tooltip")));this.tooltipEl=e[0],this.setTooltipReferenceElement()},this.setTooltipReferenceElement=()=>{const{tooltipEl:t,expanded:e,menuButtonEl:i,open:s}=this;t&&(t.referenceElement=e||s?null:i)},this.updateAction=(t,e)=>{const{guid:i,activeMenuItemIndex:s}=this,n=`${i}-action-${e}`;t.tabIndex=-1,t.setAttribute("role","menuitem"),t.id||(t.id=n),t.toggleAttribute(x,e===s)},this.updateActions=t=>{null==t||t.forEach(this.updateAction)},this.handleDefaultSlotChange=t=>{const e=t.target.assignedElements({flatten:!0}).reduce(((t,e)=>(null==e?void 0:e.matches("calcite-action"))?(t.push(e),t):(null==e?void 0:e.matches("calcite-action-group"))?t.concat(Array.from(e.querySelectorAll("calcite-action"))):t),[]);this.actionElements=e.filter((t=>!t.disabled&&!t.hidden))},this.menuButtonKeyDown=t=>{const{key:e}=t,{actionElements:i,activeMenuItemIndex:s,open:n}=this;if(i.length){if(u(e)){if(t.preventDefault(),!n)return void this.toggleOpen();const e=i[s];e?e.click():this.toggleOpen(!1)}if("Tab"!==e)return"Escape"===e?(this.toggleOpen(!1),void t.preventDefault()):void this.handleActionNavigation(t,e,i);this.open=!1}},this.handleActionNavigation=(t,e,i)=>{if(!this.isValidKey(e,X))return;if(t.preventDefault(),!this.open)return this.toggleOpen(),"Home"!==e&&"ArrowDown"!==e||(this.activeMenuItemIndex=0),void("End"!==e&&"ArrowUp"!==e||(this.activeMenuItemIndex=i.length-1));"Home"===e&&(this.activeMenuItemIndex=0),"End"===e&&(this.activeMenuItemIndex=i.length-1);const s=this.activeMenuItemIndex;"ArrowUp"===e&&(this.activeMenuItemIndex=r(Math.max(s-1,-1),i.length)),"ArrowDown"===e&&(this.activeMenuItemIndex=r(s+1,i.length))},this.toggleOpenEnd=()=>{this.setFocus(),this.el.removeEventListener("calcitePopoverOpen",this.toggleOpenEnd)},this.toggleOpen=(t=!this.open)=>{this.el.addEventListener("calcitePopoverOpen",this.toggleOpenEnd),this.open=t},this.handlePopoverOpen=()=>{this.open=!0},this.handlePopoverClose=()=>{this.open=!1},this.appearance="solid",this.expanded=!1,this.flipPlacements=void 0,this.label=void 0,this.open=!1,this.overlayPositioning="absolute",this.placement="auto",this.scale=void 0,this.menuButtonEl=void 0,this.activeMenuItemIndex=-1}connectedCallback(){this.connectMenuButtonEl()}componentWillLoad(){v(this)}componentDidLoad(){g(this)}disconnectedCallback(){this.disconnectMenuButtonEl()}expandedHandler(){this.open=!1,this.setTooltipReferenceElement()}openHandler(t){this.activeMenuItemIndex=this.open?0:-1,this.menuButtonEl&&(this.menuButtonEl.active=t),this.calciteActionMenuOpen.emit(),this.setTooltipReferenceElement()}activeMenuItemIndexHandler(){this.updateActions(this.actionElements)}async setFocus(){return await b(this),h(this.menuButtonEl)}renderMenuButton(){const{appearance:t,label:e,scale:s,expanded:n}=this;return i("slot",{name:k.trigger,onSlotchange:this.setMenuButtonEl},i("calcite-action",{appearance:t,class:w.defaultTrigger,icon:y.menu,scale:s,text:e,textEnabled:n,ref:this.setDefaultMenuButtonEl}))}renderMenuItems(){const{actionElements:t,activeMenuItemIndex:e,open:s,menuId:n,menuButtonEl:a,label:o,placement:r,overlayPositioning:l,flipPlacements:c}=this,h=t[e];return i("calcite-popover",{autoClose:!0,flipPlacements:c,focusTrapDisabled:!0,label:o,offsetDistance:0,onCalcitePopoverClose:this.handlePopoverClose,onCalcitePopoverOpen:this.handlePopoverOpen,open:s,overlayPositioning:l,placement:r,pointerDisabled:!0,referenceElement:a},i("div",{"aria-activedescendant":(null==h?void 0:h.id)||null,"aria-labelledby":null==a?void 0:a.id,class:w.menu,id:n,onClick:this.handleCalciteActionClick,role:"menu",tabIndex:-1},i("slot",{onSlotchange:this.handleDefaultSlotChange})))}render(){return i(s,null,this.renderMenuButton(),this.renderMenuItems(),i("slot",{name:k.tooltip,onSlotchange:this.updateTooltip}))}isValidKey(t,e){return!!e.find((e=>e===t))}get el(){return n(this)}static get watchers(){return{expanded:["expandedHandler"],open:["openHandler"],activeMenuItemIndex:["activeMenuItemIndexHandler"]}}};Y.style=":host{box-sizing:border-box;display:flex;flex-direction:column;font-size:var(--calcite-font-size-1);color:var(--calcite-color-text-2)}::slotted(calcite-action-group){border-block-end:1px solid var(--calcite-color-border-3)}::slotted(calcite-action-group:last-child){border-block-end:0}.default-trigger{position:relative;block-size:100%;flex:0 1 auto;align-self:stretch}slot[name=trigger]::slotted(calcite-action),calcite-action::slotted([slot=trigger]){position:relative;block-size:100%;flex:0 1 auto;align-self:stretch}.menu{max-block-size:45vh;flex-direction:column;flex-wrap:nowrap;overflow-y:auto;overflow-x:hidden;outline:2px solid transparent;outline-offset:2px}:host([hidden]){display:none}[hidden]{display:none}";
|
7
|
+
/*!
|
8
|
+
* All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
9
|
+
* See https://github.com/Esri/calcite-design-system/blob/main/LICENSE.md for details.
|
10
|
+
* v2.4.0
|
11
|
+
*/
|
12
|
+
const q="close-button-container",K="header",V="aria-controls",G="aria-expanded",J=new
|
13
|
+
/*!
|
14
|
+
* All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
15
|
+
* See https://github.com/Esri/calcite-design-system/blob/main/LICENSE.md for details.
|
16
|
+
* v2.4.0
|
17
|
+
*/
|
18
|
+
class{constructor(){this.registeredElements=new Map,this.registeredElementCount=0,this.queryPopover=t=>{const{registeredElements:e}=this,i=t.find((t=>e.has(t)));return e.get(i)},this.togglePopovers=t=>{const e=t.composedPath(),i=this.queryPopover(e);i&&!i.triggerDisabled&&(i.open=!i.open),Array.from(this.registeredElements.values()).filter((t=>t!==i&&t.autoClose&&t.open&&!e.includes(t))).forEach((t=>t.open=!1))},this.keyHandler=t=>{t.defaultPrevented||("Escape"===t.key?this.closeAllPopovers():u(t.key)&&this.togglePopovers(t))},this.clickHandler=t=>{c(t)&&this.togglePopovers(t)}}registerElement(t,e){this.registeredElementCount++,this.registeredElements.set(t,e),1===this.registeredElementCount&&this.addListeners()}unregisterElement(t){this.registeredElements.delete(t)&&this.registeredElementCount--,0===this.registeredElementCount&&this.removeListeners()}closeAllPopovers(){Array.from(this.registeredElements.values()).forEach((t=>t.open=!1))}addListeners(){window.addEventListener("pointerdown",this.clickHandler,{capture:!0}),window.addEventListener("keydown",this.keyHandler,{capture:!0})}removeListeners(){window.removeEventListener("pointerdown",this.clickHandler,{capture:!0}),window.removeEventListener("keydown",this.keyHandler,{capture:!0})}},N=class{constructor(i){t(this,i),this.calcitePopoverBeforeClose=e(this,"calcitePopoverBeforeClose",6),this.calcitePopoverClose=e(this,"calcitePopoverClose",6),this.calcitePopoverBeforeOpen=e(this,"calcitePopoverBeforeOpen",6),this.calcitePopoverOpen=e(this,"calcitePopoverOpen",6),this.mutationObserver=_("mutation",(()=>this.updateFocusTrapElements())),this.guid=`calcite-popover-${m()}`,this.openTransitionProp="opacity",this.hasLoaded=!1,this.setTransitionEl=t=>{this.transitionEl=t},this.setFilteredPlacements=()=>{const{el:t,flipPlacements:e}=this;this.filteredFlipPlacements=e?E(e,t):null},this.setUpReferenceElement=(t=!0)=>{this.removeReferences(),this.effectiveReferenceElement=this.getReferenceElement(),z(this,this.effectiveReferenceElement,this.el);const{el:e,referenceElement:i,effectiveReferenceElement:s}=this;t&&i&&!s&&console.warn(`${e.tagName}: reference-element id "${i}" was not found.`,{el:e}),this.addReferences()},this.getId=()=>this.el.id||this.guid,this.setExpandedAttr=()=>{const{effectiveReferenceElement:t,open:e}=this;t&&"setAttribute"in t&&t.setAttribute(G,l(e))},this.addReferences=()=>{const{effectiveReferenceElement:t}=this;if(!t)return;const e=this.getId();"setAttribute"in t&&t.setAttribute(V,e),J.registerElement(t,this.el),this.setExpandedAttr()},this.removeReferences=()=>{const{effectiveReferenceElement:t}=this;t&&("removeAttribute"in t&&(t.removeAttribute(V),t.removeAttribute(G)),J.unregisterElement(t))},this.hide=()=>{this.open=!1},this.storeArrowEl=t=>{this.arrowEl=t,this.reposition(!0)},this.autoClose=!1,this.closable=!1,this.flipDisabled=!1,this.focusTrapDisabled=!1,this.pointerDisabled=!1,this.flipPlacements=void 0,this.heading=void 0,this.headingLevel=void 0,this.label=void 0,this.messageOverrides=void 0,this.messages=void 0,this.offsetDistance=C,this.offsetSkidding=0,this.open=!1,this.overlayPositioning="absolute",this.placement="auto",this.referenceElement=void 0,this.scale="m",this.triggerDisabled=!1,this.effectiveLocale="",this.floatingLayout="vertical",this.effectiveReferenceElement=void 0,this.defaultMessages=void 0}handleFocusTrapDisabled(t){this.open&&(t?j(this):I(this))}flipPlacementsHandler(){this.setFilteredPlacements(),this.reposition(!0)}onMessagesChange(){}offsetDistanceOffsetHandler(){this.reposition(!0)}offsetSkiddingHandler(){this.reposition(!0)}openHandler(){A(this),this.reposition(!0),this.setExpandedAttr()}overlayPositioningHandler(){this.reposition(!0)}placementHandler(){this.reposition(!0)}referenceElementHandler(){this.setUpReferenceElement(),this.reposition(!0)}effectiveLocaleChange(){F(this,this.effectiveLocale)}connectedCallback(){this.setFilteredPlacements(),S(this),R(this),this.setUpReferenceElement(this.hasLoaded),L(this),this.open&&A(this),z(this,this.effectiveReferenceElement,this.el)}async componentWillLoad(){await $(this),v(this)}componentDidLoad(){g(this),this.referenceElement&&!this.effectiveReferenceElement&&this.setUpReferenceElement(),this.reposition(),this.hasLoaded=!0}disconnectedCallback(){this.removeReferences(),B(this),T(this),H(this,this.effectiveReferenceElement,this.el),j(this)}async reposition(t=!1){const{el:e,effectiveReferenceElement:i,placement:s,overlayPositioning:n,flipDisabled:a,filteredFlipPlacements:o,offsetDistance:r,offsetSkidding:l,arrowEl:c}=this;return P(this,{floatingEl:e,referenceEl:i,overlayPositioning:n,placement:s,flipDisabled:a,flipPlacements:o,offsetDistance:r,offsetSkidding:l,arrowEl:c,type:"popover"},t)}async setFocus(){await b(this),a(this.el),d(this.el)}async updateFocusTrapElements(){M(this)}getReferenceElement(){const{referenceElement:t,el:e}=this;return("string"==typeof t?p(e,{id:t}):t)||null}onBeforeOpen(){this.calcitePopoverBeforeOpen.emit()}onOpen(){this.calcitePopoverOpen.emit(),I(this)}onBeforeClose(){this.calcitePopoverBeforeClose.emit()}onClose(){this.calcitePopoverClose.emit(),j(this)}renderCloseButton(){const{messages:t,closable:e}=this;return e?i("div",{class:q,key:q},i("calcite-action",{appearance:"transparent",class:"close-button",onClick:this.hide,scale:this.scale,text:t.close,ref:t=>this.closeButtonEl=t},i("calcite-icon",{icon:"x",scale:W(this.scale)}))):null}renderHeader(){const{heading:t,headingLevel:e}=this,s=t?i(O,{class:"heading",level:e},t):null;return s?i("div",{class:K,key:K},s,this.renderCloseButton()):null}render(){const{effectiveReferenceElement:t,heading:e,label:s,open:n,pointerDisabled:a,floatingLayout:r}=this,c=t&&n,h=!c,d=a?null:i(U,{floatingLayout:r,key:"floating-arrow",ref:this.storeArrowEl});return i(o,{"aria-hidden":l(h),"aria-label":s,"aria-live":"polite","calcite-hydrated-hidden":h,id:this.getId(),role:"dialog"},i("div",{class:{[D.animation]:!0,[D.animationActive]:c},ref:this.setTransitionEl},d,i("div",{class:{"has-header":!!e,container:!0}},this.renderHeader(),i("div",{class:"content"},i("slot",null)),e?null:this.renderCloseButton())))}static get assetsDirs(){return["assets"]}get el(){return n(this)}static get watchers(){return{focusTrapDisabled:["handleFocusTrapDisabled"],flipPlacements:["flipPlacementsHandler"],messageOverrides:["onMessagesChange"],offsetDistance:["offsetDistanceOffsetHandler"],offsetSkidding:["offsetSkiddingHandler"],open:["openHandler"],overlayPositioning:["overlayPositioningHandler"],placement:["placementHandler"],referenceElement:["referenceElementHandler"],effectiveLocale:["effectiveLocaleChange"]}}};N.style=":host{--calcite-floating-ui-z-index:var(--calcite-popover-z-index, var(--calcite-z-index-popup));display:block;position:absolute;z-index:var(--calcite-floating-ui-z-index)}.calcite-floating-ui-anim{position:relative;transition:var(--calcite-floating-ui-transition);transition-property:transform, visibility, opacity;opacity:0;box-shadow:0 0 16px 0 rgba(0, 0, 0, 0.16);z-index:var(--calcite-z-index);border-radius:0.25rem}:host([data-placement^=bottom]) .calcite-floating-ui-anim{transform:translateY(-5px)}:host([data-placement^=top]) .calcite-floating-ui-anim{transform:translateY(5px)}:host([data-placement^=left]) .calcite-floating-ui-anim{transform:translateX(5px)}:host([data-placement^=right]) .calcite-floating-ui-anim{transform:translateX(-5px)}:host([data-placement]) .calcite-floating-ui-anim--active{opacity:1;transform:translate(0)}:host([calcite-hydrated-hidden]){visibility:hidden !important;pointer-events:none}.calcite-floating-ui-arrow{pointer-events:none;position:absolute;z-index:calc(var(--calcite-z-index) * -1);fill:var(--calcite-color-foreground-1)}.calcite-floating-ui-arrow__stroke{stroke:var(--calcite-color-border-3)}:host([scale=s]) .heading{padding-inline:0.75rem;padding-block:0.5rem;font-size:var(--calcite-font-size--1);line-height:1.375}:host([scale=m]) .heading{padding-inline:1rem;padding-block:0.75rem;font-size:var(--calcite-font-size-0);line-height:1.375}:host([scale=l]) .heading{padding-inline:1.25rem;padding-block:1rem;font-size:var(--calcite-font-size-1);line-height:1.375}:host{pointer-events:none}:host([open]){pointer-events:initial}.calcite-floating-ui-anim{border-radius:0.25rem;border-width:1px;border-style:solid;border-color:var(--calcite-color-border-3);background-color:var(--calcite-color-foreground-1)}.arrow::before{outline:1px solid var(--calcite-color-border-3)}.header{display:flex;flex:1 1 auto;align-items:stretch;justify-content:flex-start;border-width:0px;border-block-end-width:1px;border-style:solid;border-block-end-color:var(--calcite-color-border-3)}.heading{margin:0px;display:block;flex:1 1 auto;align-self:center;white-space:normal;font-weight:var(--calcite-font-weight-medium);color:var(--calcite-color-text-1);word-wrap:break-word;word-break:break-word}.container{position:relative;display:flex;block-size:100%;flex-direction:row;flex-wrap:nowrap;border-radius:0.25rem;color:var(--calcite-color-text-1)}.container.has-header{flex-direction:column}.content{display:flex;block-size:100%;inline-size:100%;flex-direction:column;flex-wrap:nowrap;align-self:center;word-wrap:break-word;word-break:break-word}.close-button-container{display:flex;overflow:hidden;flex:0 0 auto;border-start-end-radius:0.25rem;border-end-end-radius:0.25rem}::slotted(calcite-panel),::slotted(calcite-flow){block-size:100%}:host([hidden]){display:none}[hidden]{display:none}";
|
19
|
+
/*!
|
20
|
+
* All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
21
|
+
* See https://github.com/Esri/calcite-design-system/blob/main/LICENSE.md for details.
|
22
|
+
* v2.4.0
|
23
|
+
*/
|
24
|
+
const Q=class{constructor(e){t(this,e),this.resizeObserver=_("resize",(()=>this.handleResize())),this.handleDefaultSlotChange=t=>{this.hasContent=f(t)},this.storeLoaderEl=t=>{this.loaderEl=t,this.handleResize()},this.loading=!1,this.messages=void 0,this.messageOverrides=void 0,this.loaderScale=void 0,this.defaultMessages=void 0,this.effectiveLocale="",this.hasContent=!1}onMessagesChange(){}effectiveLocaleChange(){F(this,this.effectiveLocale)}connectedCallback(){var t;S(this),R(this),null===(t=this.resizeObserver)||void 0===t||t.observe(this.el)}async componentWillLoad(){await $(this)}disconnectedCallback(){var t;B(this),T(this),null===(t=this.resizeObserver)||void 0===t||t.disconnect()}render(){const{hasContent:t,loading:e,messages:s}=this;return i("div",{class:"scrim"},e?i("calcite-loader",{label:s.loading,scale:this.loaderScale,ref:this.storeLoaderEl}):null,i("div",{class:"content",hidden:!t},i("slot",{onSlotchange:this.handleDefaultSlotChange})))}getScale(t){return t<72?"s":t>=480?"l":"m"}handleResize(){var t;const{loaderEl:e,el:i}=this;e&&(this.loaderScale=this.getScale(null!==(t=Math.min(i.clientHeight,i.clientWidth))&&void 0!==t?t:0))}static get assetsDirs(){return["assets"]}get el(){return n(this)}static get watchers(){return{messageOverrides:["onMessagesChange"],effectiveLocale:["effectiveLocaleChange"]}}};Q.style=":host{--calcite-scrim-background:var(--calcite-color-transparent-scrim);position:absolute;inset:0px;z-index:var(--calcite-z-index-overlay);display:flex;block-size:100%;inline-size:100%;flex-direction:column;align-items:stretch}@keyframes calcite-scrim-fade-in{0%{--tw-bg-opacity:0}100%{--tw-text-opacity:1}}.scrim{position:absolute;inset:0px;display:flex;flex-direction:column;align-content:center;align-items:center;justify-content:center;overflow:hidden;animation:calcite-scrim-fade-in var(--calcite-internal-animation-timing-medium) ease-in-out;background-color:var(--calcite-scrim-background, var(--calcite-color-transparent-scrim))}.content{padding:1rem}:host([hidden]){display:none}[hidden]{display:none}";export{Y as calcite_action_menu,N as calcite_popover,Q as calcite_scrim}
|
@@ -3,7 +3,7 @@
|
|
3
3
|
* Licensed under the Apache License, Version 2.0
|
4
4
|
* http://www.apache.org/licenses/LICENSE-2.0
|
5
5
|
*/
|
6
|
-
import{c as t,d as n}from"./p-e2d0ad1b.js";import{a as i}from"./p-7d280d8a.js";import{l as r}from"./p-be8ef276.js";import{q as e}from"./p-
|
6
|
+
import{c as t,d as n}from"./p-e2d0ad1b.js";import{a as i}from"./p-7d280d8a.js";import{l as r}from"./p-be8ef276.js";import{q as e}from"./p-577efb16.js";import"./p-b503d01d.js";import"./p-a230b270.js";import{_ as s,r as o,c as a,g as u}from"./p-94c634ba.js";
|
7
7
|
/* @preserve
|
8
8
|
* arcgis-pdf-creator v0.0.1
|
9
9
|
* Thu Apr 27 2023 17:20:32 GMT-0700 (Pacific Daylight Time)
|
@@ -310,7 +310,7 @@ function(t){var n=function(t){for(var n=t.length,i=new Uint8Array(n),r=0;r<n;r++
|
|
310
310
|
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
311
311
|
* ====================================================================
|
312
312
|
*/
|
313
|
-
function(){function t(){return(Z.canvg?Promise.resolve(Z.canvg):import("./p-
|
313
|
+
function(){function t(){return(Z.canvg?Promise.resolve(Z.canvg):import("./p-ae4d86e8.js")).catch((function(t){return Promise.reject(new Error("Could not load canvg: "+t))})).then((function(t){return t.default?t.default:t}))}Pt.API.addSvgAsImage=function(n,i,r,e,s,o,a,u){if(isNaN(i)||isNaN(r))throw tt.error("jsPDF.addSvgAsImage: Invalid coordinates",arguments),new Error("Invalid coordinates passed to jsPDF.addSvgAsImage");if(isNaN(e)||isNaN(s))throw tt.error("jsPDF.addSvgAsImage: Invalid measurements",arguments),new Error("Invalid measurements (width and/or height) passed to jsPDF.addSvgAsImage");var f=document.createElement("canvas");f.width=e,f.height=s;var c=f.getContext("2d");c.fillStyle="#fff",c.fillRect(0,0,f.width,f.height);var h={ignoreMouse:!0,ignoreAnimation:!0,ignoreDimensions:!0},l=this;return t().then((function(t){return t.fromString(c,n,h)}),(function(){return Promise.reject(new Error("Could not load canvg."))})).then((function(t){return t.render(h)})).then((function(){l.addImage(f.toDataURL("image/jpeg",1),i,r,e,s,a,u)}))}}(),Pt.API.putTotalPages=function(t){var n,i=0;parseInt(this.internal.getFont().id.substr(1),10)<15?(n=new RegExp(t,"g"),i=this.internal.getNumberOfPages()):(n=new RegExp(this.pdfEscape16(t,this.internal.getFont()),"g"),i=this.pdfEscape16(this.internal.getNumberOfPages()+"",this.internal.getFont()));for(var r=1;r<=this.internal.getNumberOfPages();r++)for(var e=0;e<this.internal.pages[r].length;e++)this.internal.pages[r][e]=this.internal.pages[r][e].replace(n,i);return this},Pt.API.viewerPreferences=function(t,n){var i;t=t||{},n=n||!1;var r,e,s,o={HideToolbar:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},HideMenubar:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},HideWindowUI:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},FitWindow:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},CenterWindow:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},DisplayDocTitle:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.4},NonFullScreenPageMode:{defaultValue:"UseNone",value:"UseNone",type:"name",explicitSet:!1,valueSet:["UseNone","UseOutlines","UseThumbs","UseOC"],pdfVersion:1.3},Direction:{defaultValue:"L2R",value:"L2R",type:"name",explicitSet:!1,valueSet:["L2R","R2L"],pdfVersion:1.3},ViewArea:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},ViewClip:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},PrintArea:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},PrintClip:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},PrintScaling:{defaultValue:"AppDefault",value:"AppDefault",type:"name",explicitSet:!1,valueSet:["AppDefault","None"],pdfVersion:1.6},Duplex:{defaultValue:"",value:"none",type:"name",explicitSet:!1,valueSet:["Simplex","DuplexFlipShortEdge","DuplexFlipLongEdge","none"],pdfVersion:1.7},PickTrayByPDFSize:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.7},PrintPageRange:{defaultValue:"",value:"",type:"array",explicitSet:!1,valueSet:null,pdfVersion:1.7},NumCopies:{defaultValue:1,value:1,type:"integer",explicitSet:!1,valueSet:null,pdfVersion:1.7}},a=Object.keys(o),u=[],f=0,c=0,h=0;function v(t,n){var i,r=!1;for(i=0;i<t.length;i+=1)t[i]===n&&(r=!0);return r}if(void 0===this.internal.viewerpreferences&&(this.internal.viewerpreferences={},this.internal.viewerpreferences.configuration=JSON.parse(JSON.stringify(o)),this.internal.viewerpreferences.isSubscribed=!1),i=this.internal.viewerpreferences.configuration,"reset"===t||!0===n){var d=a.length;for(h=0;h<d;h+=1)i[a[h]].value=i[a[h]].defaultValue,i[a[h]].explicitSet=!1}if("object"===l(t))for(e in t)if(s=t[e],v(a,e)&&void 0!==s){if("boolean"===i[e].type&&"boolean"==typeof s)i[e].value=s;else if("name"===i[e].type&&v(i[e].valueSet,s))i[e].value=s;else if("integer"===i[e].type&&Number.isInteger(s))i[e].value=s;else if("array"===i[e].type){for(f=0;f<s.length;f+=1)if(r=!0,1===s[f].length&&"number"==typeof s[f][0])u.push(String(s[f]-1));else if(s[f].length>1){for(c=0;c<s[f].length;c+=1)"number"!=typeof s[f][c]&&(r=!1);!0===r&&u.push([s[f][0]-1,s[f][1]-1].join(" "))}i[e].value="["+u.join(" ")+"]"}else i[e].value=i[e].defaultValue;i[e].explicitSet=!0}return!1===this.internal.viewerpreferences.isSubscribed&&(this.internal.events.subscribe("putCatalog",(function(){var t,n=[];for(t in i)!0===i[t].explicitSet&&n.push("name"===i[t].type?"/"+t+" /"+i[t].value:"/"+t+" "+i[t].value);0!==n.length&&this.internal.write("/ViewerPreferences\n<<\n"+n.join("\n")+"\n>>")})),this.internal.viewerpreferences.isSubscribed=!0),this.internal.viewerpreferences.configuration=i,this
|
314
314
|
/** ====================================================================
|
315
315
|
* @license
|
316
316
|
* jsPDF XMP metadata plugin
|
@@ -0,0 +1,6 @@
|
|
1
|
+
/*!
|
2
|
+
* Copyright 2022 Esri
|
3
|
+
* Licensed under the Apache License, Version 2.0
|
4
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
5
|
+
*/
|
6
|
+
import{r as i,c as t,h as s,H as e,g as a}from"./p-7d280d8a.js";import{a as l,l as h,g as n}from"./p-be8ef276.js";import{d as o,h as r,j as d,k as c,b as p,l as g,m as b,n as u}from"./p-577efb16.js";import{a as v,e as y,f as m}from"./p-c1cf3ebc.js";import{s as w}from"./p-322868ec.js";import{d as f,a as S}from"./p-fca434c8.js";import"./p-8ddc7786.js";import"./p-e2d0ad1b.js";import"./p-18f1e8b5.js";import"./p-b503d01d.js";import"./p-a230b270.js";import"./p-94c634ba.js";const _=class{constructor(s){i(this,s),this.selectionSetChange=t(this,"selectionSetChange",7),this._selectedIds=[],this._selectionLabel="",this._graphics=[],this._featuresCollection={},this.bufferColor=[227,139,79,.8],this.bufferOutlineColor=[255,255,255],this.customLabelEnabled=void 0,this.enabledLayerIds=[],this.defaultBufferDistance=void 0,this.defaultBufferUnit=void 0,this.geometries=[],this.isUpdate=!1,this.layerViews=[],this.mapView=void 0,this.noResultText=void 0,this.searchConfiguration=void 0,this.selectionSet=void 0,this.selectionLayerIds=[],this.selectLayerView=void 0,this.sketchLineSymbol=void 0,this.sketchPointSymbol=void 0,this.sketchPolygonSymbol=void 0,this._numSelected=0,this._searchDistanceEnabled=!1,this._searchTerm=void 0,this._selectionLoading=!1,this._translations=void 0,this._useLayerFeaturesEnabled=!1}async watchGeometriesHandler(i,t){if(i!==t){const t=0===i.length;if(await this._clearResults(t,t),i.length>0)return this._highlightWithOIDsOrGeoms()}}async mapViewWatchHandler(i,t){i&&i!==t&&await this._init()}async watchSearchConfigurationHandler(i,t){JSON.stringify(i)!==JSON.stringify(t)&&await this._initSearchWidget()}async clearSelection(){return this._clearResults(!0,!0)}async getSelection(){return/\S+/gm.test(this._selectionLabel)||await this._updateLabel(),{id:this.isUpdate?this.selectionSet.id:Date.now(),searchResult:this._searchResult,buffer:this._bufferGeometry,distance:this._bufferTools.distance,download:!0,unit:this._bufferTools.unit,label:this._selectionLabel,selectedIds:this._selectedIds,layerView:this.selectLayerView,geometries:this.geometries,graphics:this._graphics,selectLayers:this.layerViews,skipGeomOIDs:this._skipGeomOIDs,searchDistanceEnabled:this._searchDistanceEnabled,workflowType:this._workflowType,useLayerFeaturesEnabled:this._useLayerFeaturesEnabled,sketchGraphic:this._sketchGraphic}}searchConfigurationChangeChanged(i){this.searchConfiguration=i.detail}async distanceChanged(i){await this._distanceChanged(i.detail)}async unitChanged(i){i.detail.newValue!==i.detail.oldValue&&(this._unit=i.detail.newValue,await this._updateLabel())}async componentWillLoad(){await this._getTranslations(),await this._initModules()}async componentDidLoad(){await this._init()}render(){return s(e,null,this._getMapLayerPicker(),s("div",{class:"border-bottom"}),s("div",{class:"padding-top-sides-1"},s("div",{class:"search-widget",ref:i=>{this._searchElement=i}}),s("div",{class:"padding-top-1"},s("map-draw-tools",{active:!0,editGraphicsEnabled:!this._useLayerFeaturesEnabled,graphics:this._graphics,mapView:this.mapView,onSketchGraphicsChange:i=>{this._sketchGraphicsChanged(i)},pointSymbol:this.sketchPointSymbol,polygonSymbol:this.sketchPolygonSymbol,polylineSymbol:this.sketchLineSymbol,ref:i=>{this._drawTools=i}})),this._getBufferOptions(),this._getUseLayerFeaturesOptions(),this._getNumSelected()),s("div",{class:"border-bottom"}),this._getNameInput())}_getBufferOptions(){var i,t;const e=this._searchDistanceEnabled?"search-distance":"div-not-visible",a="number"==typeof(null===(i=this.selectionSet)||void 0===i?void 0:i.distance)?this.selectionSet.distance:this.defaultBufferDistance;return s("div",null,s("div",{class:"padding-top-1 display-flex"},s("calcite-label",{class:"label-margin-0 w-100",layout:"inline-space-between"},s("div",{class:"tooltip-container"},this._translations.searchDistance,s("calcite-icon",{class:"padding-start-1-2 icon",icon:"question",id:"search-distance-icon",scale:"s"}))),s("calcite-popover",{closable:!0,label:"",referenceElement:"search-distance-icon"},s("span",{class:"tooltip-message"},this._translations.useSearchDistanceTootip)),s("calcite-switch",{checked:this._searchDistanceEnabled,onCalciteSwitchChange:()=>this._searchDistanceEnabled=!this._searchDistanceEnabled})),s("div",{class:e},s("buffer-tools",{disabled:!this._searchDistanceEnabled,distance:a,geometries:this.geometries,onBufferComplete:i=>{this._bufferComplete(i)},ref:i=>this._bufferTools=i,unit:(null===(t=this.selectionSet)||void 0===t?void 0:t.unit)||this.defaultBufferUnit})))}_getUseLayerFeaturesOptions(){const i=this._useLayerFeaturesEnabled?"div-visible":"div-not-visible";return s("div",null,s("div",{class:"padding-top-1 display-flex"},s("calcite-label",{class:"label-margin-0 w-100",layout:"inline-space-between"},s("div",{class:"tooltip-container"},this._translations.useLayerFeatures,s("calcite-icon",{class:"padding-start-1-2 icon",icon:"question",id:"use-layer-features-icon",scale:"s"}))),s("calcite-popover",{closable:!0,label:"",referenceElement:"use-layer-features-icon"},s("span",{class:"tooltip-message"},this._translations.useLayerFeaturesTooltip)),s("calcite-switch",{checked:this._useLayerFeaturesEnabled,onCalciteSwitchChange:()=>{this._useLayerFeaturesEnabledChanged()}})),s("div",{class:i+" padding-top-1"},s("map-layer-picker",{enabledLayerIds:this.selectionLayerIds,mapView:this.mapView,onLayerSelectionChange:i=>{this._layerSelectionChange(i)},selectedIds:this.layerViews.map((i=>i.layer.id)),showTables:!1})))}_getNumSelected(){const i=l(this.el),t=i&&"en"===i?`${this._translations.selectionLoading}...`:this._translations.selectionLoading;return s("div",{class:"padding-top-1 padding-bottom-1",style:{"align-items":"end",display:"flex"}},this._selectionLoading?s("div",null,s("calcite-loader",{class:"info-blue",inline:!0,label:t,scale:"m",type:"indeterminate"})):s("calcite-icon",{class:"info-blue padding-end-1-2",icon:"feature-layer",scale:"s"}),s("calcite-input-message",{class:"info-blue",scale:"m"},this._selectionLoading?t:this.noResultText&&0===this._numSelected?this.noResultText:this._translations.selectedFeatures.replace("{{n}}",this._numSelected.toString())))}_getNameInput(){return s("div",{class:"padding-sides-1 padding-top-1 "+(this.customLabelEnabled?"":"display-none")},s("calcite-label",{class:"font-bold"},this._translations.listName,s("calcite-input",{onInput:()=>{this._selectionLabel=this._labelName.value},placeholder:this._translations.listNamePlaceholder,ref:i=>{this._labelName=i},value:this._selectionLabel||""})))}_getMapLayerPicker(){return s("div",{class:"display-flex padding-sides-1 padding-bottom-1"},s("calcite-label",{class:"font-bold width-full label-margin-0"},this._translations.inputLayer,s("map-layer-picker",{enabledLayerIds:this.enabledLayerIds,mapView:this.mapView,onLayerSelectionChange:i=>{this._inputLayerSelectionChange(i)},selectedIds:this.selectLayerView?[this.selectLayerView.layer.id]:this.selectionSet?[this.selectionSet.layerView.layer.id]:[],showTables:!1})))}async _initModules(){const[i,t,s,e,a]=await h(["esri/layers/GraphicsLayer","esri/Graphic","esri/widgets/Search","esri/geometry/geometryEngine","esri/layers/FeatureLayer"]);this.GraphicsLayer=i,this.Graphic=t,this.Search=s,this._geometryEngine=e,this.FeatureLayer=a}async _init(){this._initGraphicsLayer(),await this._initSelectionSet(),await this._initSearchWidget()}async _initSelectionSet(){var i,t,s,e;this.selectionSet&&(this._searchTerm=null===(i=this.selectionSet.searchResult)||void 0===i?void 0:i.name,this._searchResult=this.selectionSet.searchResult,this._selectLayers=this.selectionSet.selectLayers,this._selectedIds=this.selectionSet.selectedIds,this._skipGeomOIDs=this.selectionSet.skipGeomOIDs,this._searchDistanceEnabled=this.selectionSet.searchDistanceEnabled,this._useLayerFeaturesEnabled=this.selectionSet.useLayerFeaturesEnabled,this._distance=this.selectionSet.searchDistanceEnabled?this.selectionSet.distance:0,this._unit=this.selectionSet.unit,this._workflowType=this.selectionSet.workflowType,this.selectLayerView=this.selectionSet.layerView,this._sketchGraphic=this.selectionSet.sketchGraphic,this.geometries=[...(null===(t=this.selectionSet)||void 0===t?void 0:t.geometries)||[]],this._graphics=this.geometries.map((i=>new this.Graphic({geometry:i,symbol:"point"===i.type?this.sketchPointSymbol:"polyline"===i.type?this.sketchLineSymbol:this.sketchPolygonSymbol}))),this._selectionLabel=null===(s=this.selectionSet)||void 0===s?void 0:s.label,this._useLayerFeaturesEnabled||await(null===(e=this._drawTools)||void 0===e?void 0:e.updateGraphics()),await o(this.selectionSet.selectedIds,this.selectionSet.layerView,this.mapView,!1))}async _initSearchWidget(){if(this.mapView&&this._searchElement){const i=this._getSearchConfig(this.searchConfiguration,this.mapView),t=Object.assign({view:this.mapView,container:this._searchElement,searchTerm:this._searchTerm},i);this._searchWidget=new this.Search(t),this._searchWidget.popupEnabled=!1,this._searchWidget.resultGraphicEnabled=!1,this._searchWidget.on("search-clear",(()=>{const i=this._searchClearLabel();this._clearResults(!1,i)})),this._searchWidget.on("select-result",(i=>{var t,s;if(i.result){this._searchResult=i.result;const e=(null===(s=null===(t=i.source)||void 0===t?void 0:t.layer)||void 0===s?void 0:s.id)&&i.source.layer.id===this.selectLayerView.layer.id,a=e?[i.result.feature.getObjectId()]:void 0;this._workflowType=v.SEARCH,this._updateLabel();const l=[i.result.feature];this._updateSelection(l,e,a),this._drawTools.graphics=l,this._searchWidget.resultGraphic.visible=!1}else{const i=this._searchClearLabel();this._clearResults(!1,i)}})),await this._searchWidget.when((()=>{var i;this._searchWidget.allPlaceholder=(null===(i=this.searchConfiguration)||void 0===i?void 0:i.allPlaceholder)&&"find address or place"!==this.searchConfiguration.allPlaceholder.toLowerCase()?this.searchConfiguration.allPlaceholder:this._translations.placeholder}))}}_searchClearLabel(){var i;return(null===(i=this._searchResult)||void 0===i?void 0:i.name)&&this._labelName.value.indexOf(this._searchResult.name)>-1}_getSearchConfig(i,t){const s=null==i?void 0:i.sources;return(null==s?void 0:s.length)>0?(i.includeDefaultSources=!1,s.forEach((i=>{var s,e;if(i.hasOwnProperty("layer")){const a=i,l=null===(s=a.layer)||void 0===s?void 0:s.id,h=l?t.map.findLayerById(l):null,n=null===(e=null==a?void 0:a.layer)||void 0===e?void 0:e.url;h?a.layer=h:n&&(a.layer=new this.FeatureLayer(n))}})),null==s||s.forEach((i=>{if(i.hasOwnProperty("locator")){const t=i;"ArcGIS World Geocoding Service"===(null==t?void 0:t.name)&&(t.outFields=t.outFields||["Addr_type","Match_addr","StAddr","City"],t.singleLineFieldName="SingleLine"),t.url=t.url,delete t.url}}))):i=Object.assign(Object.assign({},i),{includeDefaultSources:!0}),i}_initGraphicsLayer(){const i=this._translations.bufferLayer;if(this.mapView){const t=this.mapView.map.layers.findIndex((t=>t.title===i));if(t>-1)this._bufferGraphicsLayer=this.mapView.map.layers.getItemAt(t);else{this._bufferGraphicsLayer=new this.GraphicsLayer({title:i,listMode:"hide"}),w.managedLayers[i]="buffer";const t=this.mapView.map.layers.findIndex((i=>i.title===this._translations.sketchLayer));t>-1?this.mapView.map.layers.add(this._bufferGraphicsLayer,t):this.mapView.map.layers.add(this._bufferGraphicsLayer)}}}async _sketchGraphicsChanged(i,t=!1){const s=i.detail.graphics;if(s.length>0&&s[0])if(t||(this._sketchGraphic=s[0]),this._workflowType=this._useLayerFeaturesEnabled?v.SELECT:v.SKETCH,this._workflowType===v.SKETCH&&await this._drawTools.updateGraphics(),await this._updateLabel(),this._clearSearchWidget(),this._useLayerFeaturesEnabled&&!t){const i=Array.isArray(s)?s.map((i=>i.geometry)):this.geometries;await this._selectLayerFeatures(i[0])}else{const t=s.reduce(((i,t)=>{var s;return(null===(s=null==t?void 0:t.layer)||void 0===s?void 0:s.objectIdField)?i.push(t.attributes[t.layer.objectIdField]):t.getObjectId&&i.push(t.getObjectId()),i}),[]),e=i.detail.useOIDs&&t.length>0;this._updateSelection(s,e,t),e&&await this._highlightFeatures(t)}else await this._clearResults(!0,!0)}async _highlightWithOIDsOrGeoms(){var i;return(null===(i=this._skipGeomOIDs)||void 0===i?void 0:i.length)>0?(this._selectedIds=this._skipGeomOIDs,this._highlightFeatures(this._selectedIds)):this._geomQuery(this.geometries)}async _highlightFeatures(i){w.removeHandles(),i.length>0&&w.highlightHandles.push(await r(i,this.selectLayerView,this.mapView)),this._numSelected=i.length,this.selectionSetChange.emit(i.length)}async _selectFeatures(i){this._selectionLoading=!0,this._selectedIds=await d(i,this.selectLayerView.layer),this._selectionLoading=!1,this._drawTools.graphics=this._graphics,await this._highlightFeatures(this._selectedIds)}async _bufferComplete(i){this._bufferGeometry=Array.isArray(i.detail)?i.detail[0]:i.detail;let t=this._bufferTools.distance,s=0;if(this._bufferGeometry){const i=new this.Graphic({geometry:this._bufferGeometry,symbol:{type:"simple-fill",color:this.bufferColor,outline:{color:this.bufferOutlineColor,width:1}}});this._bufferGraphicsLayer.removeAll(),this._bufferGraphicsLayer.add(i),await this._selectFeatures([this._bufferGeometry]),await this.mapView.goTo(i.geometry.extent),s=t,t=0}else this._bufferGraphicsLayer&&this._bufferGraphicsLayer.removeAll(),await this._highlightWithOIDsOrGeoms();await this._distanceChanged({oldValue:t,newValue:s})}_geomQuery(i){const t=c(i,this._geometryEngine);return this._selectFeatures(t)}async _clearResults(i=!0,t=!1){var s;this._selectedIds=[],this._distance=void 0,this._unit=void 0,t&&(this._selectionLabel="",this._labelName.value=""),this._bufferGraphicsLayer&&this._bufferGraphicsLayer.removeAll(),i&&this._searchWidget&&this._clearSearchWidget(),w.removeHandles(),(null===(s=this._drawTools)||void 0===s?void 0:s.clear)&&(this._graphics=[],await this._drawTools.clear()),this.selectionSetChange.emit(this._selectedIds.length)}_clearSearchWidget(){this._searchWidget.clear(),this._searchResult=void 0}_updateSelection(i,t,s){this._selectedIds=t&&s?s:this._selectedIds,this._skipGeomOIDs=t?s:void 0,this.geometries=Array.isArray(i)?i.map((i=>i.geometry)):this.geometries,this._graphics=i}async _updateLabel(){var i,t;const s=this._selectionLabel.indexOf(this._translations.sketch)>-1,e=this._selectionLabel.indexOf(this._translations.select)>-1,a=this._selectionLabel.indexOf(null===(i=this._searchResult)||void 0===i?void 0:i.name)>-1,l=this._workflowType===v.SEARCH?null===(t=this._searchResult)||void 0===t?void 0:t.name:this._workflowType===v.SELECT?this._translations.select:this._translations.sketch,h=this._unit?this._unit:this._bufferTools.unit,n=await this._bufferTools.getTranslatedUnit(h),o=isNaN(this._distance)?this._bufferTools.distance:this._distance;this._selectionLabel=s||e||a||!this._selectionLabel?`${l} ${o} ${n}`:this._selectionLabel,this._labelName.value=this._selectionLabel}async _layerSelectionChange(i){if(Array.isArray(i.detail)&&i.detail.length>0){const t=i.detail.map((i=>p(this.mapView,i)));return Promise.all(t).then((i=>{this.layerViews=i,this._featuresCollection={},this._sketchGraphic&&this._sketchGraphicsChanged({detail:{graphics:[this._sketchGraphic],useOIDs:!1}})}))}}async _inputLayerSelectionChange(i){var t;const s=(null===(t=null==i?void 0:i.detail)||void 0===t?void 0:t.length)>0?i.detail[0]:"";this.selectLayerView&&s===this.selectLayerView.layer.id||(this.selectLayerView=await p(this.mapView,s),await this._updateLabel(),this._bufferGeometry?await this._selectFeatures([this._bufferGeometry]):await this._highlightWithOIDsOrGeoms())}async _distanceChanged(i){i.newValue!==i.oldValue&&(this._distance=i.newValue,await this._updateLabel())}async _selectLayerFeatures(i){this._selectionLoading=!0;const t=this.layerViews.map((t=>(this._featuresCollection[t.layer.id]=[],g(0,t.layer,i,this._featuresCollection))));return Promise.all(t).then((async i=>{this._selectionLoading=!1;let t=[];i.forEach((i=>{Object.keys(i).forEach((s=>{t=t.concat(i[s])}))}));let s=!1;t.forEach((i=>{var t;const e=i.geometry;i.symbol="point"===e.type?this.sketchPointSymbol:"polyline"===e.type?this.sketchLineSymbol:"polygon"===e.type?this.sketchPolygonSymbol:void 0,s=(null===(t=null==i?void 0:i.layer)||void 0===t?void 0:t.hasOwnProperty("objectIdField"))||i.hasOwnProperty("getObjectId")}));const e=this.layerViews[0].layer.title===this.selectLayerView.layer.title&&s;await this._sketchGraphicsChanged({detail:{graphics:t,useOIDs:e}},!0)}))}_useLayerFeaturesEnabledChanged(){this._useLayerFeaturesEnabled=!this._useLayerFeaturesEnabled,this._sketchGraphic&&this._sketchGraphicsChanged({detail:{graphics:[this._sketchGraphic],useOIDs:!1}})}async _getTranslations(){const i=await n(this.el);this._translations=i[0]}get el(){return a(this)}static get watchers(){return{geometries:["watchGeometriesHandler"],mapView:["mapViewWatchHandler"],searchConfiguration:["watchSearchConfigurationHandler"]}}};_.style=':host{display:block}.div-visible{display:inherit}.div-visible-search{display:flex;height:44px;align-items:center;padding-bottom:0}.div-not-visible{display:none}.padding-bottom-1{padding-bottom:1rem}.padding-top-1{padding-top:1rem}.search-widget{width:100% !important;border:1px solid var(--calcite-color-border-input)}.w-100{width:100%}.w-50{width:50%}.search-distance-container{padding-top:"1rem" !important}.end-border{border-inline-end:1px solid var(--calcite-color-border-2)}.search-distance{display:flex;padding-top:1rem}.font-bold{font:bold}.border-bottom{border-bottom:1px solid var(--calcite-color-border-2)}.tooltip-container{display:flex}.padding-start-1-2{padding-inline-start:0.5rem}.icon{--calcite-color-icon-color:var(--calcite-color-brand)}.tooltip-message{padding:5px 8px;font-weight:var(--calcite-font-weight-normal);color:var(--calcite-color-text-2)}';const L=Object.freeze({__proto__:null,default:[{descriptionPDF:{labelWidthDisplay:"2-5/8",labelHeightDisplay:"1",labelsPerPageDisplay:"30",averyPartNumber:"*60"},labelSpec:{type:"AVERY",pageProperties:{pageType:"ANSI A",leftMargin:.1875,rightMargin:.1875,topMargin:.5,bottomMargin:.5},numLabelsAcross:3,numLabelsDown:10,labelWidth:2.625,labelHeight:1,horizGapIn:.125,vertGapIn:0,labelPadding:.1,fontSizePx:11,maxNumLabelLines:4}},{descriptionPDF:{labelWidthDisplay:"4",labelHeightDisplay:"1",labelsPerPageDisplay:"20",averyPartNumber:"*61"},labelSpec:{type:"AVERY",pageProperties:{pageType:"ANSI A",leftMargin:.15625,rightMargin:.15625,topMargin:.47637821,bottomMargin:.5},numLabelsAcross:2,numLabelsDown:10,labelWidth:4,labelHeight:1.0025,horizGapIn:.1875,vertGapIn:0,labelPadding:.1,fontSizePx:11,maxNumLabelLines:4}},{descriptionPDF:{labelWidthDisplay:"4",labelHeightDisplay:"1-1/3",labelsPerPageDisplay:"14",averyPartNumber:"*62"},labelSpec:{type:"AVERY",pageProperties:{pageType:"ANSI A",leftMargin:.15625,rightMargin:.15625,topMargin:.81889808,bottomMargin:.83464612},numLabelsAcross:2,numLabelsDown:7,labelWidth:4,labelHeight:1.3352,horizGapIn:.1875,vertGapIn:0,labelPadding:.1,fontSizePx:11,maxNumLabelLines:6}},{descriptionPDF:{labelWidthDisplay:"4",labelHeightDisplay:"2",labelsPerPageDisplay:"10",averyPartNumber:"*63"},labelSpec:{type:"AVERY",pageProperties:{pageType:"ANSI A",leftMargin:.15625,rightMargin:.15625,topMargin:.5,bottomMargin:.5},numLabelsAcross:2,numLabelsDown:5,labelWidth:4,labelHeight:2,horizGapIn:.1875,vertGapIn:0,labelPadding:.1,fontSizePx:12,maxNumLabelLines:10}},{descriptionPDF:{labelWidthDisplay:"4",labelHeightDisplay:"3-1/3",labelsPerPageDisplay:"6",averyPartNumber:"*64"},labelSpec:{type:"AVERY",pageProperties:{pageType:"ANSI A",leftMargin:.15625,rightMargin:.15625,topMargin:.4724412,bottomMargin:.50000027},numLabelsAcross:2,numLabelsDown:3,labelWidth:4,labelHeight:3.342,horizGapIn:.1875,vertGapIn:0,labelPadding:.1,fontSizePx:14,maxNumLabelLines:12}},{descriptionPDF:{labelWidthDisplay:"1-3/4",labelHeightDisplay:"1/2",labelsPerPageDisplay:"80",averyPartNumber:"*67"},labelSpec:{type:"AVERY",pageProperties:{pageType:"ANSI A",leftMargin:.307086375,rightMargin:.307086375,topMargin:.4724412,bottomMargin:.49606326},numLabelsAcross:4,numLabelsDown:20,labelWidth:1.75,labelHeight:.50155,horizGapIn:.29527575,vertGapIn:0,labelPadding:.1,fontSizePx:8,maxNumLabelLines:3}},{descriptionPDF:{labelWidthDisplay:"1-3/4",labelHeightDisplay:"2/3",labelsPerPageDisplay:"60",averyPartNumber:"*95"},labelSpec:{type:"AVERY",pageProperties:{pageType:"ANSI A",leftMargin:.28936983,rightMargin:.28936983,topMargin:.53937037,bottomMargin:.5511814},numLabelsAcross:4,numLabelsDown:15,labelWidth:1.75,labelHeight:.6605,horizGapIn:.30708678,vertGapIn:0,labelPadding:.1,fontSizePx:8,maxNumLabelLines:4}}]}),P=class{constructor(t){i(this,t),this.defaultNumLabelsPerPage=void 0,this.disabled=!1,this._translations=void 0}async downloadCSV(i,t,s,e=!0){return f(i,t,!0,s,e)}async downloadPDF(i,t,s=!1,e="",a=""){var l;return S(i,t,null===(l=this._labelInfoElement.selectedOption)||void 0===l?void 0:l.value,s,e,a)}async componentWillLoad(){await this._getTranslations(),await this._initModules()}render(){return s(e,null,s("calcite-select",{disabled:this.disabled,label:"",ref:i=>{this._labelInfoElement=i}}))}componentDidLoad(){this._renderOptions()}async _initModules(){const[i]=await h(["esri/intl"]);this._intl=i}_getLabelSizeText(i){const t="‎"+i.descriptionPDF.labelWidthDisplay+" x "+i.descriptionPDF.labelHeightDisplay+"‏";return this._translations.pdfLabel.replace("{{n}}",i.descriptionPDF.labelsPerPageDisplay).replace("{{labelSize}}",t)}async _getTranslations(){const i=await n(this.el);this._translations=i[0]}_renderOptions(){(L.default||L).sort(((i,t)=>{const s=parseInt(i.descriptionPDF.labelsPerPageDisplay,10),e=parseInt(t.descriptionPDF.labelsPerPageDisplay,10);return s<e?-1:s>e?1:0})).forEach(((i,t)=>{const s=document.createElement("calcite-option");s.value=i,s.innerHTML=this._getLabelSizeText(i),this._labelInfoElement.appendChild(s),(this.defaultNumLabelsPerPage?parseInt(i.descriptionPDF.labelsPerPageDisplay,10)===this.defaultNumLabelsPerPage:0===t)&&(s.selected=!0,this._labelInfoElement.selectedOption=s)}))}get el(){return a(this)}};P.style=":host{display:block}";const x=class{constructor(s){i(this,s),this.selectionLoadingChange=t(this,"selectionLoadingChange",7),this.selectionSetsChanged=t(this,"selectionSetsChanged",7),this._addEnabled=!0,this._refineSets=[],this._enabledLayerIds=[],this._featuresCollection={},this.addresseeLayer=void 0,this.enabledLayerIds=[],this.mapView=void 0,this.selectionSets=[],this.sketchLineSymbol=void 0,this.sketchPointSymbol=void 0,this.sketchPolygonSymbol=void 0,this._translations=void 0,this._selectionMode=y.ADD,this._refineLayer=void 0}async componentWillLoad(){await this._getTranslations(),this._enabledLayerIds=this._getEnabledLayerIds(),await this._setRefineSet(this._enabledLayerIds[0])}render(){var i,t;return s(e,null,s("div",{class:(this._enabledLayerIds.length>1?"display-block":"display-none")+" padding-top-sides-1"},s("div",{class:"display-flex"},s("calcite-label",{class:"font-bold width-full label-margin-0"},s("div",{class:"display-flex"},this._translations.inputLayer,s("calcite-icon",{class:"padding-start-1-2 icon",icon:"question",id:"refine-input-layer",scale:"s"})),s("map-layer-picker",{enabledLayerIds:this._enabledLayerIds,mapView:this.mapView,onLayerSelectionChange:i=>{this._layerSelectionChange(i)},ref:i=>{this._layerPicker=i},selectedIds:[this._refineLayer.layer.id],showTables:!1})),s("calcite-popover",{closable:!0,label:"",referenceElement:"refine-input-layer"},s("span",{class:"tooltip-message"},this._translations.inputLayerTip)))),s("div",{class:"padding-1"},s("div",{class:"padding-bottom-1"},s("calcite-segmented-control",{class:"w-100",width:"full"},s("calcite-segmented-control-item",{checked:this._addEnabled,class:"w-50 word-wrap-anywhere",onClick:()=>this._setSelectionMode(y.ADD),value:y.ADD},s("span",{class:"font-weight-500"},this._translations.add)),s("calcite-segmented-control-item",{checked:!this._addEnabled,class:"w-50 word-wrap-anywhere",onClick:()=>this._setSelectionMode(y.REMOVE),value:y.REMOVE},s("span",{class:"font-weight-500"},this._translations.remove)))),s("div",null,s("map-draw-tools",{active:!0,drawMode:m.REFINE,mapView:this.mapView,onDrawRedo:()=>this._redo(),onDrawUndo:()=>this._undo(),onSketchGraphicsChange:i=>this._sketchGraphicsChanged(i),pointSymbol:this.sketchPointSymbol,polygonSymbol:this.sketchPolygonSymbol,polylineSymbol:this.sketchLineSymbol,redoEnabled:(null===(i=this._refineSelectionSet)||void 0===i?void 0:i.redoStack.length)>0,ref:i=>{this._drawTools=i},undoEnabled:(null===(t=this._refineSelectionSet)||void 0===t?void 0:t.undoStack.length)>0})),s("br",null),s("calcite-list",{class:"list-border"},this._getRefineSelectionSetList())))}_layerSelectionChange(i){this._setRefineSet(i.detail[0])}_setSelectionMode(i){this._selectionMode=i}_sketchGraphicsChanged(i){var t;const s=null===(t=i.detail)||void 0===t?void 0:t.graphics[0].geometry;this._selectFeatures(s)}_getEnabledLayerIds(){return this.selectionSets.reduce(((i,t)=>{var s;const e=null===(s=null==t?void 0:t.layerView)||void 0===s?void 0:s.layer.id;return e&&i.indexOf(e)<0?i.push(e):t.workflowType===v.REFINE&&Object.keys(t.refineInfos).forEach((t=>{i.indexOf(t)<0&&i.push(t)})),i}),[])}async _setRefineSet(i){this.selectionSets.some((t=>{if(t.workflowType===v.REFINE)return this._refineSelectionSet=t,Object.keys(t.refineInfos).indexOf(i)>-1}))||await this._initRefineSet(i,this._refineSelectionSet),this._refineLayer=this._refineSelectionSet.refineInfos[i].layerView}async _initRefineSet(i,t){const s={};s[i]={addIds:[],removeIds:[],layerView:await p(this.mapView,i)},t?t.refineInfos=Object.assign(Object.assign({},t.refineInfos),s):(this._refineSelectionSet={id:Date.now(),searchResult:void 0,buffer:void 0,distance:0,download:!0,unit:"feet",label:"Refine",selectedIds:[],layerView:void 0,geometries:[],graphics:[],selectLayers:[],workflowType:v.REFINE,searchDistanceEnabled:!1,useLayerFeaturesEnabled:!1,refineInfos:s,redoStack:[],undoStack:[],sketchGraphic:void 0},this.selectionSets.push(this._refineSelectionSet))}_undo(){const i=this._refineSelectionSet.undoStack.pop();this._updateIds(i.ids,i.mode===y.ADD?y.REMOVE:y.ADD,this._refineSelectionSet.redoStack,i.layerView)}_redo(){const i=this._refineSelectionSet.redoStack.pop();this._updateIds(i.ids,i.mode===y.ADD?y.REMOVE:y.ADD,this._refineSelectionSet.undoStack,i.layerView)}_getRefineSelectionSetList(){const i=this._getTotal(this.selectionSets);let t;this.selectionSets.some((i=>{if(i.workflowType===v.REFINE)return t=i,!0}));let e=0,a=0;return Object.keys(t.refineInfos).forEach((i=>{e+=t.refineInfos[i].addIds.length,a+=t.refineInfos[i].removeIds.length})),[s("calcite-list-item",{label:this._translations.featuresAdded.replace("{{n}}",e.toString()),"non-interactive":!0}),s("calcite-list-item",{label:this._translations.featuresRemoved.replace("{{n}}",a.toString()),"non-interactive":!0}),s("calcite-list-item",{label:this._translations.totalSelected.replace("{{n}}",i.toString()),"non-interactive":!0})]}_getTotal(i){const t=b(i);return Object.keys(t).reduce(((i,s)=>i+t[s].ids.length),0)}async _getTranslations(){const i=await n(this.el);this._translations=i[0]}async _selectFeatures(i){var t,s;this.selectionLoadingChange.emit(!0),this._featuresCollection[null===(t=this._refineLayer)||void 0===t?void 0:t.layer.id]=[];const e=await g(0,null===(s=this._refineLayer)||void 0===s?void 0:s.layer,i,this._featuresCollection);this.selectionLoadingChange.emit(!1);let a=[];Object.keys(e).forEach((i=>{var t;i===(null===(t=this._refineLayer)||void 0===t?void 0:t.layer.id)&&(a=a.concat(e[i]))}));const l=Array.isArray(a)?a.map((i=>{var t;return i.attributes[null===(t=null==i?void 0:i.layer)||void 0===t?void 0:t.objectIdField]})):[];await this._updateIds(l,this._selectionMode,this._refineSelectionSet.undoStack,this._refineLayer),this._drawTools.clear()}async _highlightFeatures(){this._clearHighlight(),w.highlightHandles=await u(this.selectionSets)}_clearHighlight(){w.removeHandles()}async _updateIds(i,t,s,e){let a=!1;const l=this._refineSelectionSet.refineInfos,h=e.layer.id,n={};n[h]={addIds:[],removeIds:[],layerView:e};const o=Object.keys(l).indexOf(h)>-1?l[h]:n[h];if(t===y.ADD)o.addIds=[...new Set([...i,...o.addIds])],o.addIds.length>0&&s.push({ids:i,mode:t,layerView:e}),o.removeIds.length>0&&(o.removeIds=o.removeIds.filter((t=>i.indexOf(t)<0)));else{const l=this.selectionSets.reduce(((t,s)=>(i.forEach((i=>{s.workflowType!==v.REFINE?s.selectedIds.indexOf(i)>-1&&t.push(i):Object.keys(s.refineInfos).some((a=>{const l=s.refineInfos[a];if(l.layerView.layer.id===e.layer.id&&l.addIds.indexOf(i)>-1)return t.push(i),!0}))})),t)),[]);o.removeIds=[...new Set([...l,...o.removeIds])],o.addIds=o.addIds.filter((i=>l.indexOf(i)<0)),o.removeIds.length>0&&s.push({ids:l,mode:t,layerView:e}),this.selectionSets=this.selectionSets.reduce(((i,t)=>(t.workflowType!==v.REFINE&&t.layerView.layer.id===e.layer.id?(t.selectedIds=t.selectedIds.filter((i=>o.removeIds.indexOf(i)<0)),t.selectedIds.length>0?i.push(t):a=!0):i.push(t),i)),[])}this._refineSelectionSet.refineInfos[h]=o,this.selectionSets=[...this.selectionSets],a&&this.selectionSetsChanged.emit(this.selectionSets),await this._highlightFeatures()}get el(){return a(this)}};x.style=':host{display:block}.div-visible{display:inherit}.div-not-visible{display:none !important}.padding-top-1-2{padding-top:.5rem}.main-label{display:flex;float:left}html[dir="rtl"] .main-label{display:flex;float:right}.border{outline:1px solid var(--calcite-color-border-input)}.margin-top-1{margin-top:1rem}.esri-sketch{display:flex;flex-flow:column wrap}.esri-widget{box-sizing:border-box;color:#323232;font-size:14px;font-family:"Avenir Next","Helvetica Neue",Helvetica,Arial,sans-serif;line-height:1.3em;background-color:var(--calcite-color-foreground-1)}.esri-sketch__panel{align-items:center;display:flex;flex-flow:row nowrap;padding:0}*/ .esri-sketch__tool-section{border-right:1px solid rgba(110,110,110,.3)}.esri-sketch__section{align-items:center;display:flex;flex-flow:row nowrap;padding:0 7px;margin:6px 0;border-right:1px solid rgba(110,110,110,.3)}.display-flex{display:flex}.font-bold{font-weight:bold}.width-full{width:100%}.label-margin-0{--calcite-label-margin-bottom:0}.padding-start-1-2{padding-inline-start:0.5rem}.font-weight-500{font-weight:500}.word-wrap-anywhere{word-wrap:anywhere}';export{_ as map_select_tools,P as pdf_download,x as refine_selection}
|