@arcgis/map-components
Version:
ArcGIS Map Components
305 lines (304 loc) • 23.4 kB
JavaScript
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
import { c as C } from "../../chunks/runtime.js";
import { css as M, html as d } from "lit";
import { LitElement as O, createEvent as S, nothing as T, safeClassMap as u } from "@arcgis/lumina";
import { usePropertyChange as $ } from "@arcgis/lumina/controllers";
import { u as z } from "../../chunks/useT9n.js";
import { m as k } from "../../chunks/useViewModel.js";
import { H as f } from "../../chunks/heading.js";
import { g as m } from "../../chunks/globalCss.js";
import { V as g } from "../../chunks/visible-element.js";
import I from "@arcgis/core/analysis/ShadowCastAnalysis.js";
import { property as r, subclass as P } from "/core/core/accessorSupport/decorators.js";
import { A as V } from "../../chunks/AnalysisViewModel.js";
import { watch as E, whenOnce as L } from "@arcgis/core/core/reactiveUtils.js";
import { t as A } from "../../chunks/earth-utils.js";
import { c as h, g as R } from "../../chunks/time-utils.js";
import { forceInteractive as H } from "@arcgis/core/applications/Components/analysisUtils.js";
const j = M`.esri-widget__heading{color:var(--calcite-color-text-2);margin:0 0 .5rem;font-weight:var(--calcite-font-weight-semibold)}h1.esri-widget__heading{font-size:var(--calcite-font-size-xl)}h2.esri-widget__heading{font-size:var(--calcite-font-size-md)}h3.esri-widget__heading,h4.esri-widget__heading,h5.esri-widget__heading,h6.esri-widget__heading{font-size:var(--calcite-font-size)}.esri-widget{box-sizing:border-box;color:var(--calcite-color-text-2);background-color:var(--calcite-color-foreground-1);font-size:var(--calcite-font-size);line-height:var(--calcite-font-line-height-relative-tight)}.esri-widget *,.esri-widget :before,.esri-widget :after{box-sizing:inherit}.esri-widget.esri-widget--disabled>*{opacity:.4;pointer-events:none}.esri-widget.esri-widget--compact{--esri-widget-padding-y: 0;--esri-widget-padding-x: 0}.esri-widget__anchor{color:var(--calcite-color-text-2)}.esri-widget__anchor:hover{color:var(--calcite-color-text-3)}.esri-widget__anchor:hover,.esri-widget__anchor:focus{text-decoration:underline}.esri-widget__anchor--disabled{opacity:.4;pointer-events:none}.esri-widget__header{background-color:var(--calcite-color-foreground-1);flex:1 0 100%;justify-content:space-between;align-items:center;width:100%;min-height:48px;padding:12px 0 12px 15px;display:flex}.esri-widget__heading{word-break:break-word}.esri-widget__header .esri-widget__heading{width:calc(100% - 48px);text-align:initial;color:var(--calcite-color-text-1);align-items:center;margin:0;padding:0;display:flex}.esri-widget__header-button{appearance:none;cursor:pointer;color:var(--calcite-color-text-2);background-color:var(--calcite-color-foreground-1);border:none;flex:0 0 48px;justify-content:center;align-self:stretch;align-items:center;width:48px;padding:0;display:flex}.esri-widget__footer{background-color:var(--calcite-color-foreground-1);justify-content:center;align-items:center;width:100%;min-height:48px;display:flex}.esri-widget__footer-pagination{color:var(--calcite-color-text-2);justify-content:space-between;align-items:center;display:flex}.esri-widget__footer-pagination-previous-button,.esri-widget__footer-pagination-next-button{cursor:pointer;background-color:var(--calcite-color-foreground-1);border:0;margin:0 7px;padding:12px 15px;transition:background-color .125s ease-in-out}.esri-widget__footer-pagination-previous-button:hover,.esri-widget__footer-pagination-previous-button:focus,.esri-widget__footer-pagination-next-button:hover,.esri-widget__footer-pagination-next-button:focus{color:var(--calcite-color-text-1);background-color:var(--calcite-color-foreground-1)}.esri-menu{visibility:hidden;z-index:1;background-clip:padding;background-color:var(--calcite-color-foreground-1);background-clip:padding-box;width:100%;max-height:0;margin:2px 0 0;padding:0;font-size:var(--calcite-font-size);line-height:var(--calcite-spacing-xl);position:absolute;top:100%;left:0;overflow:hidden;box-shadow:0 1px 2px #0000004d}.esri-menu .esri-menu__header{color:var(--calcite-color-text-inverse);background-color:var(--calcite-color-inverse);padding:6px 12px}.esri-menu__list{margin:0;padding:0;list-style:none}.esri-menu__list-item{cursor:pointer;border-top:1px solid #adadad4d;border-left:3px solid #0000;padding:.8em 1em}.esri-menu__list-item [class^=esri-icon-],.esri-menu__list-item [class*=" esri-icon-"]{padding-right:2.8px}.esri-menu__list-item:first-child{border-top:none}.esri-menu__list-item--focus,.esri-menu__list-item:hover,.esri-menu__list-item:focus{background-color:var(--calcite-color-foreground-1)}.esri-menu__list-item:active{background-color:var(--calcite-color-foreground-current)}.esri-menu__list-item--active,.esri-menu__list-item--active:hover,.esri-menu__list-item--active:focus{background-color:var(--calcite-color-foreground-1);border-left-color:var(--calcite-color-brand)}.esri-widget__table{border-collapse:collapse;color:var(--calcite-color-text-1);border:none;width:100%;line-height:var(--calcite-font-line-height-relative-tight)}.esri-widget__table tr:nth-child(odd){background-color:var(--calcite-color-transparent)}.esri-widget__table tr:nth-child(2n){background-color:var(--calcite-color-transparent-press)}.esri-widget__table tr a{color:var(--calcite-color-text-2)}.esri-widget__table tr a:hover,.esri-widget__table tr a:focus{color:var(--calcite-color-text-1)}.esri-widget__table tr td,.esri-widget__table tr th{vertical-align:top;word-break:break-word;padding:.5em .7em;font-size:var(--calcite-font-size-sm);font-weight:var(--calcite-font-weight-regular)}.esri-widget__table tr th{text-align:left;border-right:3px solid #0000000d;width:50%}.esri-widget__table tr td{width:50%}.esri-input{color:var(--calcite-color-text-1);background-color:var(--calcite-color-foreground-1);border:1px solid #959595;font-size:var(--calcite-font-size)}.esri-input::-ms-clear{display:none}.esri-input::placeholder{opacity:1;color:var(--calcite-color-text-2)}.esri-input:placeholder-shown{text-overflow:ellipsis}.esri-input[type=text],.esri-input[type=password],.esri-input[type=number]{height:32px;padding:0 .5em}calcite-combobox.esri-input{border:none}.esri-widget__content--empty{text-align:center;color:var(--calcite-color-border-input);flex-flow:column wrap;align-items:center;padding:18px 22px;display:flex}.esri-widget__content--empty h1.esri-widget__heading,.esri-widget__content--empty h2.esri-widget__heading,.esri-widget__content--empty h3.esri-widget__heading,.esri-widget__content--empty h4.esri-widget__heading,.esri-widget__content--empty h5.esri-widget__heading{font-weight:var(--calcite-font-weight-regular)}.esri-widget__content-illustration--empty{width:128px;padding:1rem 0}.esri-widget__content-icon--empty{width:32px;padding:.5rem 0}.esri-select{appearance:none;cursor:pointer;color:var(--calcite-color-text-2);background:var(--calcite-color-foreground-1) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-8 -8 32 32' width='32' height='32'%3E%3Cpath d='M8 11.207l-4-4V5.793l4 4 4-4v1.414z' fill='%23adadad' fillrule='nonzero'/%3E%3C/svg%3E") 100% no-repeat;border:1px solid #959595;border-radius:0;width:100%;height:32px;margin:0;padding:0 .5em;font-family:inherit;font-size:.85em;display:block}.esri-select[disabled]{cursor:auto}.esri-select::-ms-expand{display:none}.esri-disabled a,.esri-disabled [role=menu],.esri-disabled [role=checkbox],.esri-disabled [class^=esri-icon-],.esri-disabled [class*=" esri-icon-"]{color:var(--calcite-color-text-3)}.keynav-mode .esri-widget:focus,.keynav-mode .esri-widget :focus{z-index:1;outline-offset:2px;outline:2px solid #adadad}.esri-widget__loader-animation{border:.15em solid #adadad4d;border-top-color:var(--calcite-color-border-input);border-radius:100%;width:1em;height:1em;font-size:var(--calcite-font-size-md);animation:1.25s linear infinite esri-rotate;display:block;transform:translateZ(0)}:dir(rtl) .esri-widget__table th{text-align:right;border-left:3px solid #0000000d;border-right:none}:dir(rtl) .esri-select{background-position:0}:dir(rtl) .esri-menu__list-item{border-left:none;border-right:3px solid #0000}:dir(rtl) .esri-menu__list-item [class^=esri-icon-],:dir(rtl) .esri-menu__list-item [class*=" esri-icon-"]{padding-left:2px;padding-right:0}:dir(rtl) .esri-menu__list-item--active{border-right-color:var(--calcite-color-brand)}.esri-icon-font-fallback-text{clip:rect(0 0 0 0);width:1px;height:1px;position:absolute;overflow:hidden}.esri-rotating{animation:1.25s linear infinite esri-rotate;transform:translateZ(0)}.esri-clearfix:before,.esri-clearfix:after{content:" ";display:table}.esri-clearfix:after{clear:both}.esri-interactive{cursor:pointer}.esri-hidden{display:none!important}.esri-invisible{visibility:hidden!important}.esri-offscreen{position:absolute;top:-999em;left:-999em}.esri-match-height{flex-direction:column;flex:auto;display:flex;overflow:hidden}.esri-widget--panel{min-width:300px;min-height:32px;padding:var(--arcgis-internal-padding);transition:max-height .25s ease-in-out;overflow-y:auto}:host{position:relative;width:var(--arcgis-internal-panel-width, 300px)}.root{--section-internal-gap: var(--calcite-spacing-md);display:flex;flex-direction:column;gap:var(--calcite-spacing-lg);min-width:var(--arcgis-internal-panel-min-width, 300px);overflow:var(--arcgis-internal-panel-overflow, visible);height:fit-content}:host([visual-scale="s"]) .root{--section-internal-gap: var(--calcite-spacing-sm)}:host([visual-scale="l"]) .root{--section-internal-gap: var(--calcite-spacing-lg)}.time-range-section arcgis-time-of-day-slider{margin-block-end:var(--section-internal-gap)}.time-range-section calcite-label:last-child,.visualization-options-section calcite-label:last-child{--calcite-label-margin-bottom: 0}.date-picker{flex-grow:1;display:block}.visualization-options{flex-direction:column;display:flex;gap:var(--section-internal-gap)}.hidden-config{display:none}`;
var U = Object.defineProperty, Z = Object.getOwnPropertyDescriptor, a = (e, i, t, n) => {
for (var s = n > 1 ? void 0 : n ? Z(i, t) : i, l = e.length - 1, c; l >= 0; l--)
(c = e[l]) && (s = (n ? c(i, t, s) : c(s)) || s);
return n && s && U(i, t, s), s;
};
const v = /* @__PURE__ */ Symbol("interactiveHandle");
let o = class extends V {
constructor() {
super(...arguments), this.supportedViewType = "3d", this.unsupportedErrorMessage = "The Shadow Cast component is only supported in 3D views.", this.shouldForceInteractive = !1, this.minMinDuration = 0, this.maxMinDuration = h(8, "hours", "milliseconds"), this.hideShadowDurationTooltip = !1;
}
constructAnalysis() {
return new I();
}
initialize() {
this.addHandles(
E(
() => ({
analysisView: this.analysisView,
tooltipVisible: !this.hideShadowDurationTooltip
}),
({ analysisView: e, tooltipVisible: i }) => {
this.removeHandles(v), e && (e.interactive = i, i && this.addHandles(H(e), v));
},
{ sync: !0, initial: !0 }
)
);
}
get date() {
return this.analysis.date;
}
set date(e) {
this.analysis.date = e;
}
get discreteColor() {
return this.analysis.discreteOptions.color;
}
set discreteColor(e) {
this.analysis.discreteOptions.color = e;
}
get discreteInterval() {
return this.analysis.discreteOptions.interval;
}
set discreteInterval(e) {
this.analysis.discreteOptions.interval = e;
}
get totalDurationColor() {
return this.analysis.totalDurationOptions.color;
}
set totalDurationColor(e) {
this.analysis.totalDurationOptions.color = e;
}
get totalDurationMode() {
return this.analysis.totalDurationOptions.mode;
}
set totalDurationMode(e) {
this.analysis.totalDurationOptions.mode = e;
}
get localDate() {
return R(this.view, this.effectiveUtcOffset);
}
get mode() {
return this.analysis.mode;
}
set mode(e) {
this.analysis.mode = e;
}
get visualizeSunlight() {
return this.analysis.visualizeSunlight;
}
set visualizeSunlight(e) {
this.analysis.visualizeSunlight = e;
}
get startTimeOfDay() {
return this.analysis.startTimeOfDay;
}
set startTimeOfDay(e) {
this.analysis.startTimeOfDay = e;
}
get endTimeOfDay() {
return this.analysis.endTimeOfDay;
}
set endTimeOfDay(e) {
this.analysis.endTimeOfDay = e;
}
get state() {
return this.view?.ready && this.analysisView ? "ready" : "disabled";
}
get minDurationColor() {
return this.analysis.minDurationOptions.color;
}
set minDurationColor(e) {
this.analysis.minDurationOptions.color = e;
}
get minDuration() {
return this.analysis.minDurationOptions.minDuration;
}
set minDuration(e) {
this.analysis.minDurationOptions.minDuration = e;
}
get minDurationContextEnabled() {
return this.analysis.minDurationOptions.contextEnabled;
}
set minDurationContextEnabled(e) {
this.analysis.minDurationOptions.contextEnabled = e;
}
get minDurationContextColor() {
return this.analysis.minDurationOptions.contextOptions.color;
}
set minDurationContextColor(e) {
this.analysis.minDurationOptions.contextOptions.color = e;
}
get minDurationContextInterval() {
return this.analysis.minDurationOptions.contextOptions.interval;
}
set minDurationContextInterval(e) {
this.analysis.minDurationOptions.contextOptions.interval = e;
}
get utcOffset() {
return this.analysis.utcOffset ?? void 0;
}
set utcOffset(e) {
this.analysis.utcOffset = e;
}
get effectiveUtcOffset() {
const { utcOffset: e } = this.analysis;
if (e != null)
return e;
const i = this.view?.camera?.position;
return i ? A(i) : 0;
}
async getDurationAtScreen(e) {
return await (await L(() => this.analysisView)).getDurationAtScreen(e);
}
};
a([
r()
], o.prototype, "date", 1);
a([
r()
], o.prototype, "discreteColor", 1);
a([
r()
], o.prototype, "discreteInterval", 1);
a([
r()
], o.prototype, "totalDurationColor", 1);
a([
r()
], o.prototype, "totalDurationMode", 1);
a([
r()
], o.prototype, "localDate", 1);
a([
r()
], o.prototype, "mode", 1);
a([
r()
], o.prototype, "visualizeSunlight", 1);
a([
r()
], o.prototype, "startTimeOfDay", 1);
a([
r()
], o.prototype, "endTimeOfDay", 1);
a([
r()
], o.prototype, "state", 1);
a([
r()
], o.prototype, "minDurationColor", 1);
a([
r()
], o.prototype, "minMinDuration", 2);
a([
r()
], o.prototype, "maxMinDuration", 2);
a([
r()
], o.prototype, "minDuration", 1);
a([
r()
], o.prototype, "minDurationContextEnabled", 1);
a([
r()
], o.prototype, "minDurationContextColor", 1);
a([
r()
], o.prototype, "minDurationContextInterval", 1);
a([
r()
], o.prototype, "utcOffset", 1);
a([
r()
], o.prototype, "effectiveUtcOffset", 1);
a([
r()
], o.prototype, "hideShadowDurationTooltip", 2);
o = a([
P("components.shadow-cast.ShadowCastViewModel")
], o);
const F = k(o);
class B extends O {
constructor() {
super(...arguments), this.viewModel = F(this), this.messages = z(), this.analysis = this.viewModel.analysis, this.view = this.viewModel.view, this.visualizeSunlight = this.viewModel.visualizeSunlight, this.visualScale = "m", this.autoDestroyDisabled = !1, this.endTimeOfDay = this.viewModel.endTimeOfDay, this.headingLevel = 4, this.hideTimeRangeSlider = !1, this.hideTimezone = !1, this.hideDatePicker = !1, this.hideShadowDurationTooltip = this.viewModel.hideShadowDurationTooltip, this.hideVisualization = this.viewModel.hideVisualization, this.hideVisualizationOptions = !1, this.hideDiscreteOptions = !1, this.hideDiscreteColorPicker = !1, this.hideDiscreteInterval = !1, this.hideTotalDurationOptions = !1, this.hideTotalDurationColorPicker = !1, this.hideTotalDurationModeSelect = !1, this.hideMinDurationOptions = !1, this.hideMinDurationColorPicker = !1, this.hideMinDurationSlider = !1, this.hideMinDurationContextOptions = !1, this.hideMinDurationContextToggle = !1, this.hideMinDurationContextColorPicker = !1, this.hideMinDurationContextInterval = !1, this.icon = "measure-building-height-shadow", this.mode = this.viewModel.mode, this.startTimeOfDay = this.viewModel.startTimeOfDay, this.state = this.viewModel.state, this.utcOffset = this.viewModel.utcOffset, this.discreteColor = this.viewModel.discreteColor, this.discreteInterval = this.viewModel.discreteInterval, this.totalDurationColor = this.viewModel.totalDurationColor, this.totalDurationMode = this.viewModel.totalDurationMode, this.minDuration = this.viewModel.minDuration, this.minDurationColor = this.viewModel.minDurationColor, this.minMinDuration = this.viewModel.minMinDuration, this.maxMinDuration = this.viewModel.maxMinDuration, this.minDurationContextEnabled = this.viewModel.minDurationContextEnabled, this.minDurationContextColor = this.viewModel.minDurationContextColor, this.minDurationContextInterval = this.viewModel.minDurationContextInterval, this.arcgisPropertyChange = $()("state"), this.arcgisReady = S();
}
static {
this.properties = { analysis: 0, view: 0, visualizeSunlight: 5, visualScale: 3, autoDestroyDisabled: 5, date: 1, endTimeOfDay: 9, headingLevel: 9, hideTimeRangeSlider: 5, hideTimezone: 5, hideDatePicker: 5, hideShadowDurationTooltip: 5, hideVisualization: 5, hideVisualizationOptions: 5, hideDiscreteOptions: 5, hideDiscreteColorPicker: 5, hideDiscreteInterval: 5, hideTotalDurationOptions: 5, hideTotalDurationColorPicker: 5, hideTotalDurationModeSelect: 5, hideMinDurationOptions: 5, hideMinDurationColorPicker: 5, hideMinDurationSlider: 5, hideMinDurationContextOptions: 5, hideMinDurationContextToggle: 5, hideMinDurationContextColorPicker: 5, hideMinDurationContextInterval: 5, icon: 3, label: 1, mode: 1, referenceElement: 1, startTimeOfDay: 9, state: 32, utcOffset: 9, discreteColor: 0, discreteInterval: 9, totalDurationColor: 0, totalDurationMode: 1, minDuration: 9, minDurationColor: 0, minMinDuration: 9, maxMinDuration: 9, minDurationContextEnabled: 5, minDurationContextColor: 0, minDurationContextInterval: 9 };
}
static {
this.styles = j;
}
get _effectiveMessages() {
const { messages: i, visualizeSunlight: t } = this, { sunlight: n } = i;
return {
...i,
discrete: t ? n?.discrete : i.discrete,
minDuration: t ? n?.minDuration : i.minDuration,
totalDuration: t ? n?.totalDuration : i.totalDuration,
timeInShadow: t ? i.timeInSunlight : i.timeInShadow,
timeRangeSliderLabel: i.timeRangeSliderLabel
};
}
get date() {
return this.viewModel.date;
}
set date(i) {
this.viewModel.date = i;
}
async destroy() {
await this.manager.destroy();
}
async getDurationAtScreen(i) {
return await this.viewModel.getDurationAtScreen(i);
}
render() {
const { _effectiveMessages: i } = this;
return d`<div aria-label=${i.componentLabel ?? T} class=${u({
root: !0,
[m.widget]: !0,
[m.widgetDisabled]: this.viewModel.state === "disabled",
[m.panel]: !0
})} role=presentation>${this._renderTimeRangeSection()}${g({ hidden: this.hideVisualizationOptions, children: this._renderVisualizationOptionsSection() })}</div>`;
}
_renderTimeRangeSection() {
if (!this.analysis || this.hideTimeRangeSlider && this.hideDatePicker)
return;
const { _effectiveMessages: i, viewModel: t } = this, n = this.visualScale;
return d`<section class="time-range-section">${f({ level: this.headingLevel, children: i.timeRangeHeading })}${g({ hidden: this.hideTimeRangeSlider, children: this._renderTimeRange() })}${g({ hidden: this.hideTimezone, children: d`<calcite-label .scale=${n}>${i.timezoneLabel}<calcite-input-time-zone mode=offset overlay-positioning=fixed .referenceDate=${t.localDate} .scale=${n} .value=${`${h(t.effectiveUtcOffset, "hours", "minutes")}`} =${(s) => {
t.utcOffset = +s.target.value / 60;
}}></calcite-input-time-zone></calcite-label>` })}${g({ hidden: this.hideDatePicker, children: d`<calcite-label .scale=${n}>${i.dateLabel}<calcite-input-date-picker overlay-positioning=fixed placement=bottom .scale=${n} .valueAsDate=${t.date} =${(s) => {
const l = s.currentTarget.valueAsDate;
t.date = Array.isArray(l) ? l[0] : l;
}}></calcite-input-date-picker></calcite-label>` })}</section>`;
}
_renderTimeRange() {
const { _effectiveMessages: i, viewModel: t } = this;
return d`<arcgis-time-of-day-slider mode=range .startTime=${w(this.startTimeOfDay)} .endTime=${w(this.endTimeOfDay)} .label=${i.timeRangeSliderLabel} .visualScale=${this.visualScale} =${({ currentTarget: n }) => {
t.startTimeOfDay = h(n.startTime, "minutes", "milliseconds"), t.endTimeOfDay = h(n.endTime, "minutes", "milliseconds");
}}></arcgis-time-of-day-slider>`;
}
_renderVisualizationOptionsSection() {
const { analysis: i, _effectiveMessages: t, headingLevel: n, viewModel: s } = this;
if (!i)
return;
const { discreteOptions: l, totalDurationOptions: c, minDurationOptions: D } = i, p = (_, b) => s.mode === _ && !b ? void 0 : "hidden-config", x = this.hideMinDurationContextOptions || this.visualizeSunlight, y = this.hideMinDurationContextToggle || this.visualizeSunlight;
return d`<section class="visualization-options-section">${f({ level: n, children: t.visualizationLabel })}<div class="visualization-options">${this._renderModeSelect()}<div class=${u(p("min-duration", this.hideMinDurationOptions))}><arcgis-shadow-cast-min-duration-config .hideColorPicker=${this.hideMinDurationColorPicker} .hideContextColorPicker=${this.hideMinDurationContextColorPicker} .hideContextInterval=${this.hideMinDurationContextInterval} .hideContextOptions=${x} .hideContextToggle=${y} .hideSlider=${this.hideMinDurationSlider} .minMinDuration=${this.minMinDuration} .maxMinDuration=${this.maxMinDuration} .messages=${t} .options=${D} .scale=${this.visualScale}></arcgis-shadow-cast-min-duration-config></div><div class=${u(p("total-duration", this.hideTotalDurationOptions))}><arcgis-shadow-cast-total-duration-config .hideColorPicker=${this.hideTotalDurationColorPicker} .hideModeSelect=${this.hideTotalDurationModeSelect} .messages=${t} .options=${c} .scale=${this.visualScale}></arcgis-shadow-cast-total-duration-config></div><div class=${u(p("discrete", this.hideDiscreteOptions))}><arcgis-shadow-cast-discrete-config .hideColorPicker=${this.hideDiscreteColorPicker} .hideInterval=${this.hideDiscreteInterval} .messages=${t} .options=${l} .scale=${this.visualScale}></arcgis-shadow-cast-discrete-config></div></div></section>`;
}
_renderModeSelect() {
const { _effectiveMessages: i, viewModel: t } = this, { mode: n } = t;
return d`<calcite-select .label=${i.visualizationLabel ?? ""} .scale=${this.visualScale} =${(s) => {
const l = s.target.selectedOption?.value;
t.mode = l ?? "min-duration";
}}>${[
{ mode: "min-duration", label: i.minDuration?.optionLabel },
{ mode: "total-duration", label: i.totalDuration?.optionLabel },
{ mode: "discrete", label: i.discrete?.optionLabel }
].map(({ mode: s, label: l }) => d`<calcite-option .selected=${s === n} .value=${s} .label=${l}></calcite-option>`)}</calcite-select>`;
}
}
function w(e) {
return Math.round(h(e, "milliseconds", "minutes"));
}
C("arcgis-shadow-cast", B);
export {
B as ArcgisShadowCast
};