@esri/calcite-components 5.2.0-next.44 → 5.2.0-next.45
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/{VQAOL77U.js → 25GZRWLO.js} +1 -1
- package/dist/cdn/{2PHCANX2.js → 25UJLH3F.js} +1 -1
- package/dist/cdn/{ELEHM6SM.js → 2SNCPVXF.js} +1 -1
- package/dist/cdn/{IJMQOY62.js → 2TE5KUHK.js} +1 -1
- package/dist/cdn/{HHL3MK6T.js → 3F6GQDCI.js} +1 -1
- package/dist/cdn/{5Z6C2X5M.js → 3I5F4XUF.js} +1 -1
- package/dist/cdn/{CW4PYCUD.js → 3KUZ5DMK.js} +1 -1
- package/dist/cdn/{6FEIEUZZ.js → 3NBVXX66.js} +1 -1
- package/dist/cdn/{3VVCKLMD.js → 4533COHR.js} +1 -1
- package/dist/cdn/{HXCRR6BA.js → 4DFECA5W.js} +1 -1
- package/dist/cdn/{JXLRG6VX.js → 4MELGJJU.js} +1 -1
- package/dist/cdn/{66UMQAVF.js → 5FRCQHDI.js} +1 -1
- package/dist/cdn/{INMGPFUF.js → 5MOJXH4I.js} +1 -1
- package/dist/cdn/{DFWIL2EW.js → 5PD6IMOH.js} +1 -1
- package/dist/cdn/{KSCXISUY.js → 5SHFFSYG.js} +1 -1
- package/dist/cdn/{3BNA6FWR.js → 5TYT6FPC.js} +1 -1
- package/dist/cdn/{XL4QINLT.js → 5VMMFKR6.js} +1 -1
- package/dist/cdn/{ZDX6E2ID.js → 62KPI3FK.js} +1 -1
- package/dist/cdn/{2LEAGXRC.js → 62ZMNU3A.js} +1 -1
- package/dist/cdn/{IB77HFOJ.js → 6KY526JN.js} +1 -1
- package/dist/cdn/{ORV44K64.js → 6PGVCFYC.js} +1 -1
- package/dist/cdn/{A3DB45ZW.js → 6RJP3STU.js} +1 -1
- package/dist/cdn/{LWNISVMS.js → 74CBQUE4.js} +1 -1
- package/dist/cdn/{RTQ5QAEN.js → 74N4FFED.js} +1 -1
- package/dist/cdn/{IPLWZAVT.js → 7B77T42X.js} +1 -1
- package/dist/cdn/{KIC6NKAK.js → 7VIF5ZC5.js} +1 -1
- package/dist/cdn/{AZG62CMV.js → 7XQYFPRS.js} +1 -1
- package/dist/cdn/{DQPQBE44.js → 7XRDDWF4.js} +1 -1
- package/dist/cdn/{G27D3SZT.js → 7ZCUYS2O.js} +1 -1
- package/dist/cdn/{TP5N2U4E.js → AZ3MOLXC.js} +1 -1
- package/dist/cdn/{IZ2JDBZ5.js → BL5WYJ56.js} +1 -1
- package/dist/cdn/{NHZUT5FA.js → CW5OE7JQ.js} +1 -1
- package/dist/cdn/{TFCXTMPD.js → DG3FNESN.js} +1 -1
- package/dist/cdn/{NFJJDSZY.js → DMM4BXZG.js} +1 -1
- package/dist/cdn/{R6CCGOTQ.js → DMP56JI2.js} +1 -1
- package/dist/cdn/{V6MNRNTP.js → DPAJBRD2.js} +1 -1
- package/dist/cdn/{LOKIUSDE.js → EELG7TMH.js} +1 -1
- package/dist/cdn/{XTIDUHCQ.js → EFUVBWEJ.js} +1 -1
- package/dist/cdn/{E7L6YLEY.js → EWALVFZO.js} +1 -1
- package/dist/cdn/{ZNNX3HMN.js → EZDFYGCD.js} +1 -1
- package/dist/cdn/{APUUVZU3.js → F5G6AAA6.js} +1 -1
- package/dist/cdn/{N4JMX3TC.js → FANKJJCE.js} +1 -1
- package/dist/cdn/{APO5A3X6.js → FBMO6SUH.js} +1 -1
- package/dist/cdn/{GXQQN75F.js → FJBSITBV.js} +1 -1
- package/dist/cdn/{KPYK6ZCA.js → FUAR52XF.js} +1 -1
- package/dist/cdn/{XYHKUDZF.js → FUO35K5O.js} +1 -1
- package/dist/cdn/{T6WNXMDO.js → FX3FRV7T.js} +1 -1
- package/dist/cdn/{QJIGBVLX.js → G4F6RY3M.js} +1 -1
- package/dist/cdn/{LIMDFPEA.js → GAXYNBJA.js} +1 -1
- package/dist/cdn/{7MZHM4NI.js → GRY3Q4HB.js} +1 -1
- package/dist/cdn/{BVOYTTRM.js → GTDH6HDW.js} +1 -1
- package/dist/cdn/{WY5EGJUC.js → GVTNPWNX.js} +1 -1
- package/dist/cdn/{DEMWKUSV.js → H3AIIMCB.js} +1 -1
- package/dist/cdn/{K47LAICX.js → HFYHQNJC.js} +1 -1
- package/dist/cdn/{WGIIJKTS.js → HLNXQMDR.js} +1 -1
- package/dist/cdn/{6VHRHSIJ.js → HST3KLCD.js} +1 -1
- package/dist/cdn/{4YBBM46Y.js → I4GUNYPU.js} +1 -1
- package/dist/cdn/{SMXHRTT2.js → I4RXJVGN.js} +1 -1
- package/dist/cdn/{2JB4VHGU.js → IDAWDLUM.js} +1 -1
- package/dist/cdn/{45TZVR5L.js → IQQNCVTF.js} +1 -1
- package/dist/cdn/{UW542TEF.js → IZQJD2TY.js} +1 -1
- package/dist/cdn/{7M3DCP3P.js → IZUCW3CZ.js} +1 -1
- package/dist/cdn/{W7NEBG3P.js → J7YJNY7J.js} +1 -1
- package/dist/cdn/{QNVVRIKY.js → JFHZPHIH.js} +1 -1
- package/dist/cdn/{SJCHPTN7.js → JHZENLTN.js} +1 -1
- package/dist/cdn/{KXV644DB.js → JMN777KY.js} +1 -1
- package/dist/cdn/{FX2LLI3Q.js → JPKZCVS7.js} +1 -1
- package/dist/cdn/{UML462S6.js → JPQDBGMQ.js} +1 -1
- package/dist/cdn/{FA553F4H.js → JVYNSPY4.js} +1 -1
- package/dist/cdn/{FIVBJX3T.js → K6KDKMG4.js} +1 -1
- package/dist/cdn/{T4Y6NUI3.js → KDFHIOJ2.js} +1 -1
- package/dist/cdn/{NDAZA3HY.js → KLA6UNLN.js} +1 -1
- package/dist/cdn/{AEIZCYV4.js → KLZ4PJCC.js} +1 -1
- package/dist/cdn/{DCT743JJ.js → KMKX42WX.js} +1 -1
- package/dist/cdn/{M3OX67AP.js → KMLQYVFQ.js} +1 -1
- package/dist/cdn/{Z554GNVA.js → KXGJXHNL.js} +1 -1
- package/dist/cdn/{TE5JYRP5.js → L5M4AOLA.js} +1 -1
- package/dist/cdn/{6EK67Q77.js → LDVKNV75.js} +1 -1
- package/dist/cdn/{CDGFDRAM.js → LG5GUCVM.js} +1 -1
- package/dist/cdn/{E3WTHMHU.js → LTV6XOQB.js} +1 -1
- package/dist/cdn/{LJYFEISA.js → MA52NPZI.js} +1 -1
- package/dist/cdn/{KY2WU6KT.js → MPCSCASK.js} +1 -1
- package/dist/cdn/{F3NS7FCQ.js → MW342IUG.js} +1 -1
- package/dist/cdn/{XGKHKGLI.js → MY56KHLP.js} +1 -1
- package/dist/cdn/{NSPN72PP.js → N3ZWLHPD.js} +1 -1
- package/dist/cdn/{Y7EHAR6C.js → NMQ2D5G7.js} +1 -1
- package/dist/cdn/{6NPSWFX2.js → NQ5UUCLO.js} +1 -1
- package/dist/cdn/{WQDBKWBJ.js → OAOZRUMX.js} +1 -1
- package/dist/cdn/{A5KNFFW5.js → OL2MQEMS.js} +1 -1
- package/dist/cdn/{3HCDZGRJ.js → P5PMWHMJ.js} +1 -1
- package/dist/cdn/{VNYCTNXM.js → PIHA3X27.js} +1 -1
- package/dist/cdn/{MT7BKXNU.js → PJ6UFUTM.js} +1 -1
- package/dist/cdn/{SCJTB5QR.js → POKGHG5P.js} +1 -1
- package/dist/cdn/{NUEE3RC5.js → Q7EG63LU.js} +1 -1
- package/dist/cdn/{WKUUJPMB.js → QIMZFB6Z.js} +1 -1
- package/dist/cdn/{XBHFE6H2.js → QV4F23FN.js} +1 -1
- package/dist/cdn/{PLVAIZEG.js → QVHK7LKC.js} +1 -1
- package/dist/cdn/{33QZ2NJJ.js → R5CTQ3US.js} +1 -1
- package/dist/cdn/{VEZVYJSA.js → R5XYRBJU.js} +1 -1
- package/dist/cdn/{ZSXJBBAT.js → RCGDFU4O.js} +1 -1
- package/dist/cdn/{5L3BDPLE.js → RDYYQ3C3.js} +1 -1
- package/dist/cdn/{XHG2PRXC.js → RJ3PRJAC.js} +1 -1
- package/dist/cdn/{JRLYYEZZ.js → RTVHJ3B6.js} +1 -1
- package/dist/cdn/{OWWZVFUV.js → RVQPGR6T.js} +1 -1
- package/dist/cdn/S2PWOCPW.js +2 -0
- package/dist/cdn/{HKUZYLLE.js → SDK6P3OI.js} +1 -1
- package/dist/cdn/{2CTMJVC3.js → SF5YCNMP.js} +1 -1
- package/dist/cdn/{5HPWFFAC.js → SHICO6FM.js} +1 -1
- package/dist/cdn/{XCBRE2B6.js → SOCDOHLW.js} +1 -1
- package/dist/cdn/{OQMJUBOQ.js → SWP7M47Q.js} +1 -1
- package/dist/cdn/{LCH3W2SZ.js → T26QGAD7.js} +1 -1
- package/dist/cdn/{H4RYLWQ3.js → T5N6A65Z.js} +1 -1
- package/dist/cdn/{ENY437DL.js → TCEGPJNB.js} +1 -1
- package/dist/cdn/{5N3T7BFJ.js → TCHYLOEZ.js} +1 -1
- package/dist/cdn/{QYWWPZRM.js → THRVSS7O.js} +1 -1
- package/dist/cdn/{5WBOA7YI.js → TNPXVAGH.js} +1 -1
- package/dist/cdn/{USPQQI22.js → TOBZANYV.js} +1 -1
- package/dist/cdn/{7OKZFXOI.js → TOJL7OC5.js} +1 -1
- package/dist/cdn/{GNGC5N7C.js → UEVG5G6Y.js} +1 -1
- package/dist/cdn/{UXIOETP4.js → UK3MEWIX.js} +1 -1
- package/dist/cdn/{FZPOPPES.js → UYUR65WZ.js} +1 -1
- package/dist/cdn/{D23MDHHB.js → VKCH7XHM.js} +1 -1
- package/dist/cdn/{LEKTTV7F.js → VXNMF3KJ.js} +1 -1
- package/dist/cdn/{2PWOBQBE.js → W5PR6ZHD.js} +1 -1
- package/dist/cdn/{FO24BWKT.js → W67WHHBD.js} +1 -1
- package/dist/cdn/{BVDJOIHQ.js → WKNVNYFV.js} +1 -1
- package/dist/cdn/{QF4HG7SZ.js → WNU7CSOP.js} +1 -1
- package/dist/cdn/{7YNWVNM5.js → WPG62KIS.js} +1 -1
- package/dist/cdn/{YTMG336H.js → WS4IJ65X.js} +1 -1
- package/dist/cdn/{MFNARHZV.js → WTGM653O.js} +1 -1
- package/dist/cdn/{XZEYC2EZ.js → WV2SJVZZ.js} +1 -1
- package/dist/cdn/{N2I62PPK.js → X5G3TYGT.js} +1 -1
- package/dist/cdn/{UMVDSDG6.js → XCYYAXUZ.js} +1 -1
- package/dist/cdn/{PVDBGCSF.js → YDATK3SB.js} +1 -1
- package/dist/cdn/{OB2XFFOT.js → YKVKDDFW.js} +1 -1
- package/dist/cdn/{N2AHP4TE.js → Z4GHOFOX.js} +1 -1
- package/dist/cdn/{7KIBU5Z4.js → Z7FCYPKS.js} +1 -1
- package/dist/cdn/{323SXKZ6.js → Z7OTAYCR.js} +1 -1
- package/dist/cdn/{MQNRZDDZ.js → ZLTNX3DI.js} +1 -1
- package/dist/cdn/{6FUEQ6XE.js → ZVWRSFN7.js} +1 -1
- package/dist/cdn/{OEHSNBOP.js → ZYE7IY4H.js} +1 -1
- package/dist/cdn/index.js +1 -1
- package/dist/chunks/dom.js +23 -23
- package/dist/chunks/manager.js +1 -1
- package/dist/chunks/openCloseComponent.js +1 -1
- package/dist/chunks/runtime.js +3 -3
- package/dist/chunks/useFocusTrap.js +1 -1
- package/dist/chunks/useForm.js +1 -1
- package/dist/chunks/useLabel.js +1 -1
- package/dist/chunks/useSetFocus.js +1 -1
- package/dist/chunks/utils2.js +1 -1
- package/dist/components/calcite-action-bar/customElement.js +19 -9
- package/dist/components/calcite-action-pad/customElement.js +1 -1
- package/dist/components/calcite-alert/customElement.js +1 -1
- package/dist/components/calcite-avatar/customElement.js +1 -1
- package/dist/components/calcite-block-group/customElement.js +1 -1
- package/dist/components/calcite-button/customElement.js +1 -1
- package/dist/components/calcite-card-group/customElement.js +1 -1
- package/dist/components/calcite-carousel/customElement.js +1 -1
- package/dist/components/calcite-chip/customElement.js +1 -1
- package/dist/components/calcite-chip-group/customElement.js +1 -1
- package/dist/components/calcite-color-picker/customElement.js +1 -1
- package/dist/components/calcite-color-picker-swatch/customElement.js +1 -1
- package/dist/components/calcite-combobox/customElement.js +1 -1
- package/dist/components/calcite-combobox-item/customElement.js +1 -1
- package/dist/components/calcite-date-picker-month-header/customElement.js +1 -1
- package/dist/components/calcite-dropdown/customElement.js +1 -1
- package/dist/components/calcite-input/customElement.js +1 -1
- package/dist/components/calcite-input-message/customElement.js +1 -1
- package/dist/components/calcite-input-number/customElement.js +1 -1
- package/dist/components/calcite-input-text/customElement.js +1 -1
- package/dist/components/calcite-list/customElement.js +1 -1
- package/dist/components/calcite-list-item/customElement.js +1 -1
- package/dist/components/calcite-menu/customElement.js +1 -1
- package/dist/components/calcite-meter/customElement.js +1 -1
- package/dist/components/calcite-notice/customElement.js +1 -1
- package/dist/components/calcite-panel/customElement.js +1 -1
- package/dist/components/calcite-scrim/customElement.js +1 -1
- package/dist/components/calcite-segmented-control-item/customElement.js +1 -1
- package/dist/components/calcite-slider/customElement.js +1 -1
- package/dist/components/calcite-sortable-list/customElement.js +1 -1
- package/dist/components/calcite-stepper/customElement.js +1 -1
- package/dist/components/calcite-stepper-item/customElement.js +1 -1
- package/dist/components/calcite-swatch-group/customElement.js +1 -1
- package/dist/components/calcite-tab/customElement.js +1 -1
- package/dist/components/calcite-tab-nav/customElement.js +1 -1
- package/dist/components/calcite-tab-title/customElement.js +1 -1
- package/dist/components/calcite-table-row/customElement.js +1 -1
- package/dist/components/calcite-tile-group/customElement.js +1 -1
- package/dist/components/calcite-tree/customElement.js +1 -1
- package/dist/components/calcite-tree-item/customElement.js +1 -1
- package/dist/docs/api.json +1 -1
- package/dist/docs/docs.json +1 -1
- package/dist/docs/web-types.json +1 -1
- package/package.json +2 -2
- package/dist/cdn/CBV5UE76.js +0 -2
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{E as l,F as a,H as o,R as r,g as n,h as t}from"./
|
|
2
|
+
import{E as l,F as a,H as o,R as r,g as n,h as t}from"./TNPXVAGH.js";var i={container:"container",containerNoSpacing:"container--no-spacing",firstTitle:"first-title",heading:"heading",scale:c=>`scale--${c}`,separator:"separator"},g=n`.scale--s{font-size:var(--calcite-font-size-relative-sm);line-height:var(--calcite-font-line-height-sm);--calcite-internal-autocomplete-item-group-horizontal-spacing-unit: var(--calcite-spacing-sm);--calcite-internal-autocomplete-item-group-vertical-spacing-unit: var(--calcite-spacing-xxs)}.scale--s .first-title{padding-block-start:var(--calcite-spacing-sm)}.scale--s .separator{margin-block:var(--calcite-internal-autocomplete-item-group-vertical-spacing-unit);margin-inline:var(--calcite-internal-autocomplete-item-group-horizontal-spacing-unit)}.scale--m{font-size:var(--calcite-font-size-relative-base);line-height:var(--calcite-font-line-height-base);--calcite-internal-autocomplete-item-group-horizontal-spacing-unit: var(--calcite-spacing-md);--calcite-internal-autocomplete-item-group-vertical-spacing-unit: var(--calcite-spacing-xs)}.scale--m .first-title{padding-block-start:var(--calcite-spacing-md)}.scale--m .separator{margin-block:var(--calcite-internal-autocomplete-item-group-vertical-spacing-unit);margin-inline:var(--calcite-internal-autocomplete-item-group-horizontal-spacing-unit)}.scale--l{font-size:var(--calcite-font-size-relative-md);line-height:var(--calcite-font-line-height-md);--calcite-internal-autocomplete-item-group-horizontal-spacing-unit: var(--calcite-spacing-lg);--calcite-internal-autocomplete-item-group-vertical-spacing-unit: var(--calcite-spacing-sm-plus)}.scale--l .first-title{padding-block-start:var(--calcite-spacing-xl)}.scale--l .separator{margin-block:var(--calcite-internal-autocomplete-item-group-vertical-spacing-unit);margin-inline:var(--calcite-internal-autocomplete-item-group-horizontal-spacing-unit)}:host{margin:0;display:flex;flex-direction:column}.container{display:flex;flex-direction:column;background-color:var(--calcite-autocomplete-background-color, var(--calcite-color-foreground-1))}.container--no-spacing{padding-block-start:0}.separator{block-size:var(--calcite-spacing-px);background-color:var(--calcite-autocomplete-border-color, var(--calcite-color-border-3))}.heading{box-sizing:border-box;inline-size:100%;min-inline-size:0px;max-inline-size:100%;font-weight:var(--calcite-font-weight-bold);word-wrap:break-word;word-break:break-word;color:var(--calcite-autocomplete-text-color, var(--calcite-color-text-1));padding-block:var(--calcite-internal-autocomplete-item-group-vertical-spacing-unit);padding-inline:var(--calcite-internal-autocomplete-item-group-horizontal-spacing-unit)}:host([hidden]){display:none}[hidden]{display:none}`,e=class extends l{constructor(){super(...arguments),this.disableSpacing=!1,this.position=0,this.scale="m"}static{this.properties={disableSpacing:[5,{},{type:Boolean}],heading:1,label:1,position:[9,{},{type:Number}],scale:1}}static{this.styles=g}render(){let{scale:s}=this,p=this.position>0?t`<div class=${a(i.separator)} role=separator></div>`:null;return t`<div aria-label=${this.label??this.heading??o} class=${a({[i.container]:!0,[i.containerNoSpacing]:this.disableSpacing,[i.scale(s)]:!0})} role=group>${p}<div class=${a({[i.heading]:!0,[i.firstTitle]:this.position===0})}>${this.heading}</div><slot></slot></div>`}};r("calcite-autocomplete-item-group",e);export{e as AutocompleteItemGroup};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{a as b,b as v,j as o,m as C,n as I,q as w}from"./RYA2FB6F.js";import"./MBM7UIXE.js";import{a as F}from"./NHZUT5FA.js";import"./YP3AYJH3.js";import{D as $,E as A,F as u,R,g as x,h as g,p as y}from"./5WBOA7YI.js";var D={calendar:"calendar",calendarContainer:"calendar-container",calendarStart:"calendar--start",currentDay:"current-day",dayContainer:"day-container",month:"month",noncurrent:"noncurrent",weekDays:"week-days",weekHeader:"week-header",weekHeaderContainer:"week-header-container"},Y=x`:host([hidden]){display:none}[hidden]{display:none}.calendar-container{display:flex;inline-size:100%}:host([range][layout=vertical]) .calendar-container{flex-direction:column}.calendar{inline-size:100%}.week-header-container{display:flex;block-size:16px;padding-inline:var(--calcite-spacing-sm);padding-block:var(--calcite-spacing-md)}.week-header{display:flex;align-items:center;justify-content:center;text-align:center;font-size:var(--calcite-font-size-relative-sm);line-height:var(--calcite-font-line-height-sm);font-weight:var(--calcite-font-weight-bold);inline-size:14.2857142857%;color:var(--calcite-date-picker-week-header-text-color, var(--calcite-color-text-2))}.day-container{display:flex;inline-size:100%;min-inline-size:0px;justify-content:center}.day-container calcite-date-picker-day{inline-size:100%}.week-days{display:grid;grid-template-columns:repeat(7,1fr);grid-auto-rows:1fr;padding-inline:var(--calcite-spacing-sm);padding-block-end:var(--calcite-spacing-sm)}.month-header{display:flex;inline-size:100%;justify-content:space-between}.month{display:flex;inline-size:100%;flex-direction:column;justify-content:space-between}.day{font-size:var(--calcite-font-size)}:host([scale=s]) .week-days{padding-inline:var(--calcite-spacing-xs);padding-block-end:var(--calcite-spacing-xs)}:host([scale=s]) .week-header-container{padding-inline:var(--calcite-spacing-xs);padding-block:var(--calcite-spacing-sm)}:host([scale=s]) .day{font-size:var(--calcite-font-size-sm)}:host([scale=l]) .week-header{font-size:var(--calcite-font-size-relative-base);line-height:var(--calcite-font-line-height-base)}:host([scale=l]) .week-days{padding-inline:var(--calcite-spacing-md);padding-block-end:var(--calcite-spacing-md)}:host([scale=l]) .week-header-container{padding-inline:var(--calcite-spacing-md);padding-block:var(--calcite-spacing-md-plus)}:host([scale=l]) .day{font-size:var(--calcite-font-size-md)}.calendar--start{border-width:0px;border-style:solid;border-color:var(--calcite-date-picker-range-calendar-divider-color, var(--calcite-color-border-1))}:host([range][layout=horizontal][calendars="2"]) .calendar--start{border-inline-end-width:var(--calcite-border-width-sm)}:host([range][layout=vertical][calendars="2"]) .calendar--start{border-block-end-width:var(--calcite-border-width-sm)}.noncurrent{pointer-events:none;opacity:0}`,m=7,M=6,P=42,S=class extends A{constructor(){super(),this.activeFocus=!1,this.storeDayRef=e=>{e?.active&&this.activeFocus&&e.setFocus()},this.activeDate=new Date,this.calendars=2,this.range=!1,this.calciteInternalDatePickerDayHover=y({cancelable:!1}),this.calciteInternalDatePickerDaySelect=y({cancelable:!1}),this.calciteInternalDatePickerMonthActiveDateChange=y({cancelable:!1}),this.calciteInternalDatePickerMonthChange=y({cancelable:!1}),this.calciteInternalDatePickerMonthMouseOut=y({cancelable:!1}),this.listen("pointerout",this.pointerOutHandler),this.listen("focusout",this.disableActiveFocus)}static{this.properties={focusedDate:[16,{},{state:!0}],activeDate:[0,{},{attribute:!1}],calendars:[11,{},{type:Number,reflect:!0}],dateTimeFormat:[0,{},{attribute:!1}],endDate:[0,{},{attribute:!1}],headingLevel:[11,{},{type:Number,reflect:!0}],hoverRange:[0,{},{attribute:!1}],layout:[3,{},{reflect:!0}],localeData:[0,{},{attribute:!1}],max:[0,{},{attribute:!1}],messages:[0,{},{attribute:!1}],min:[0,{},{attribute:!1}],monthStyle:1,range:[7,{},{reflect:!0,type:Boolean}],scale:[3,{},{reflect:!0}],selectedDate:[0,{},{attribute:!1}],startDate:[0,{},{attribute:!1}]}}static{this.styles=Y}load(){this.focusedDate=this.selectedDate||this.activeDate}willUpdate(e){e.has("activeDate")&&this.updateFocusedDateWithActive(this.activeDate),e.has("selectedDate")&&(this.focusedDate=this.selectedDate)}updateFocusedDateWithActive(e){this.selectedDate||(this.focusedDate=b(e,this.min,this.max)?e:v(e,this.min,this.max))}keyDownHandler(e){if(e.defaultPrevented)return;let a=this.el.dir==="rtl",t=e.target.value;switch(e.key){case"ArrowUp":e.preventDefault(),this.addDays(-7,t);break;case"ArrowRight":e.preventDefault(),this.addDays(a?-1:1,t);break;case"ArrowDown":e.preventDefault(),this.addDays(7,t);break;case"ArrowLeft":e.preventDefault(),this.addDays(a?1:-1,t);break;case"PageUp":e.preventDefault(),this.addMonths(-1,t);break;case"PageDown":e.preventDefault(),this.addMonths(1,t);break;case"Home":e.preventDefault(),this.activeDate.setDate(1),this.addDays(0,t);break;case"End":e.preventDefault(),this.activeDate.setDate(new Date(this.activeDate.getFullYear(),this.activeDate.getMonth()+1,0).getDate()),this.addDays(0,t);break;case"Enter":case" ":e.preventDefault();break;case"Tab":this.activeFocus=!1}}disableActiveFocus(){this.activeFocus=!1}pointerOutHandler(){this.calciteInternalDatePickerMonthMouseOut.emit()}addMonths(e,a){let t=new Date(a);t.setMonth(a.getMonth()+e),this.calciteInternalDatePickerMonthActiveDateChange.emit(v(t,this.min,this.max)),this.focusedDate=v(t,this.min,this.max),this.activeFocus=!0,this.calciteInternalDatePickerDayHover.emit(t)}addDays(e=0,a){let t=new Date(a);t.setDate(a.getDate()+e),this.calciteInternalDatePickerMonthActiveDateChange.emit(v(t,this.min,this.max)),this.focusedDate=v(t,this.min,this.max),this.activeFocus=!0,this.calciteInternalDatePickerDayHover.emit(t)}getPreviousMonthDays(e,a,t){let s=new Date(a,e,0),i=s.getDate(),n=s.getDay(),r=[];if(n===(t+M)%m)return r;if(n===t)return[i];for(let l=(m+n-t)%m;l>=0;l--)r.push(i-l);return r}getCurrentMonthDays(e,a){let t=new Date(a,e+1,0).getDate(),s=[];for(let i=0;i<t;i++)s.push(i+1);return s}getNextMonthDays(e,a,t){let s=new Date(a,e+1,0).getDay(),i=[];if(s===(t+M)%m)return i;for(let n=0;n<(M-(s-t))%m;n++)i.push(n+1);return i}betweenSelectedRange(e){return!!(this.startDate&&this.endDate&&e>this.startDate&&e<this.endDate&&!this.isRangeHover(e))}isSelected(e){return!!(o(e,this.selectedDate)||this.startDate&&o(e,this.startDate)||this.endDate&&o(e,this.endDate))}isStartOfRange(e){return!!(this.startDate&&!o(this.startDate,this.endDate)&&o(this.startDate,e)&&!this.isEndOfRange(e))}isEndOfRange(e){return!!(this.endDate&&!o(this.startDate,this.endDate)&&o(this.endDate,e)||!this.endDate&&this.hoverRange&&o(this.startDate,this.hoverRange.end)&&o(e,this.hoverRange.end))}dayHover(e){let a=e.target;a.disabled?this.calciteInternalDatePickerMonthMouseOut.emit():this.calciteInternalDatePickerDayHover.emit(a.value),e.stopPropagation()}daySelect(e){let a=e.target;this.activeFocus=!1,this.calciteInternalDatePickerDaySelect.emit(a.value),e.stopPropagation()}isFocusedOnStart(){return this.hoverRange?.focused==="start"}isHoverInRange(){if(!this.hoverRange||!this.startDate)return!1;let{start:e,end:a}=this.hoverRange,t=this.isFocusedOnStart(),s=this.startDate&&a&&a>this.startDate,i=this.endDate&&a&&a<this.endDate,n=this.startDate&&e&&e>this.startDate,r=this.endDate&&e&&e<this.endDate,l=!t&&this.startDate&&s&&(!this.endDate||i),c=t&&this.startDate&&n&&r;return!!(l||c)}isRangeHover(e){if(!this.hoverRange)return!1;let{start:a,end:t}=this.hoverRange,s=this.isFocusedOnStart(),i=this.isHoverInRange(),n=!!(a&&e>a&&this.startDate&&e<this.startDate),r=!!(t&&e<t&&this.endDate&&e>this.endDate),l=!!(t&&e>t&&this.endDate&&e<this.endDate),c=!!(a&&e<a&&this.startDate&&e>this.startDate),h=!!(t&&e<t&&this.startDate&&e>this.startDate),d=!!(a&&e>a&&this.endDate&&e<this.endDate),f=this.startDate&&this.endDate;if(i){if(f)return s?!!(this.endDate&&e<this.endDate)&&(c||n):l||r;if(this.startDate&&!this.endDate)return s?n:h;if(!this.startDate&&this.endDate)return s?d:r}else if(f)return s?n:r;return!1}getDays(e,a,t,s="start"){let i=this.activeDate.getMonth(),n=i+1;i=s==="end"?n:i;let r=this.activeDate.getFullYear();return[...e.map(c=>({active:!1,day:c,date:new Date(r,i-1,c)})),...a.map(c=>{let h=new Date(r,i,c),d=o(h,new Date);return{active:this.focusedDate&&this.focusedDate!==this.startDate&&this.focusedDate!==this.endDate?o(h,this.focusedDate):o(h,this.startDate)||o(h,this.endDate),currentMonth:!0,currentDay:d,day:c,date:h}}),...t.map(c=>({active:!1,day:c,date:new Date(r,n,c)}))]}monthHeaderSelectChange(e){let a=new Date(e.detail),t=e.target;this.updateFocusableDate(a),e.stopPropagation(),this.calciteInternalDatePickerMonthChange.emit({date:a,position:t.position})}updateFocusableDate(e){!this.selectedDate||!this.range?this.focusedDate=this.getFirstValidDateOfMonth(e):this.selectedDate&&this.range&&(!w(this.startDate,e)||!w(this.endDate,e))&&(this.focusedDate=this.getFirstValidDateOfMonth(e))}getFirstValidDateOfMonth(e){return e.getDate()===1?e:C(e,this.min,this.max)}render(){let e=this.activeDate.getMonth(),a=this.activeDate.getFullYear(),t=this.localeData.weekStart%7,{abbreviated:s,short:i,narrow:n}=this.localeData.days,r=this.scale==="s"?n||i||s:i||s||n,l=[...r.slice(t,7),...r.slice(0,t)],c=this.getCurrentMonthDays(e,a),h=this.getPreviousMonthDays(e,a,t),d=this.getNextMonthDays(e,a,t),f=c.length+h.length+d.length;if(f<P){let N=d.length?d[d.length-1]:0;for(let k=1;k<=P-f;k++)d.push(N+k)}let p=e+1,H=this.getPreviousMonthDays(p,a,t),E=this.getCurrentMonthDays(p,a),z=this.getNextMonthDays(p,a,t),O=this.getDays(h,c,d),B=this.getDays(H,E,z,"end");return g`<div class=${u({[D.calendarContainer]:!0})} role=grid>${this.renderCalendar(l,O)}${this.range&&this.calendars===2&&this.renderCalendar(l,B,!0)||""}</div>`}renderDateDay({active:e,currentMonth:a,currentDay:t,date:s,day:i},n){let r=b(s,this.min,this.max);return F(n,g`<div class=${u({[D.dayContainer]:!0})} role=gridcell><calcite-date-picker-day .active=${e} class=${u({[D.currentDay]:t,[D.noncurrent]:this.range&&this.calendars===2&&!a})} .currentMonth=${a} .dateTimeFormat=${this.dateTimeFormat} .day=${i} .disabled=${!r} .endOfRange=${this.isEndOfRange(s)} .highlighted=${this.betweenSelectedRange(s)} @calciteInternalDayHover=${this.dayHover} @calciteInternalDaySelect=${this.daySelect} .range=${!!this.startDate&&!!this.endDate&&!o(this.startDate,this.endDate)} .rangeHover=${r&&this.isRangeHover(s)} .scale=${this.scale} .selected=${this.isSelected(s)} .startOfRange=${this.isStartOfRange(s)} .value=${s} ${$(this.storeDayRef)}></calcite-date-picker-day></div>`)}renderCalendar(e,a,t=!1){return g`<div class=${u({[D.calendar]:!0,[D.calendarStart]:!t})}><calcite-date-picker-month-header .activeDate=${t?I(this.activeDate):this.activeDate} .headingLevel=${this.headingLevel} .localeData=${this.localeData} .max=${this.max} .messages=${this.messages} .min=${this.min} .monthStyle=${this.monthStyle} @calciteInternalDatePickerMonthHeaderSelectChange=${this.monthHeaderSelectChange} .position=${t?"end":this.range&&this.calendars===2?"start":void 0} .scale=${this.scale} .selectedDate=${this.selectedDate}></calcite-date-picker-month-header>${this.renderMonthCalendar(e,a,t)}</div>`}renderMonthCalendar(e,a,t=!1){return g`<div class=${u({[D.month]:!0})} @keydown=${this.keyDownHandler}><div class=${u({[D.weekHeaderContainer]:!0})} role=row>${e.map(i=>g`<span class=${u({[D.weekHeader]:!0})} role=columnheader>${i}</span>`)}</div><div class=${u({[D.weekDays]:!0})} role=row>${a.map((i,n)=>this.renderDateDay(i,t?50+n:n))}</div></div>`}};R("calcite-date-picker-month",S);export{S as DatePickerMonth};
|
|
2
|
+
import{a as b,b as v,j as o,m as C,n as I,q as w}from"./RYA2FB6F.js";import"./MBM7UIXE.js";import{a as F}from"./CW5OE7JQ.js";import"./YP3AYJH3.js";import{D as $,E as A,F as u,R,g as x,h as g,p as y}from"./TNPXVAGH.js";var D={calendar:"calendar",calendarContainer:"calendar-container",calendarStart:"calendar--start",currentDay:"current-day",dayContainer:"day-container",month:"month",noncurrent:"noncurrent",weekDays:"week-days",weekHeader:"week-header",weekHeaderContainer:"week-header-container"},Y=x`:host([hidden]){display:none}[hidden]{display:none}.calendar-container{display:flex;inline-size:100%}:host([range][layout=vertical]) .calendar-container{flex-direction:column}.calendar{inline-size:100%}.week-header-container{display:flex;block-size:16px;padding-inline:var(--calcite-spacing-sm);padding-block:var(--calcite-spacing-md)}.week-header{display:flex;align-items:center;justify-content:center;text-align:center;font-size:var(--calcite-font-size-relative-sm);line-height:var(--calcite-font-line-height-sm);font-weight:var(--calcite-font-weight-bold);inline-size:14.2857142857%;color:var(--calcite-date-picker-week-header-text-color, var(--calcite-color-text-2))}.day-container{display:flex;inline-size:100%;min-inline-size:0px;justify-content:center}.day-container calcite-date-picker-day{inline-size:100%}.week-days{display:grid;grid-template-columns:repeat(7,1fr);grid-auto-rows:1fr;padding-inline:var(--calcite-spacing-sm);padding-block-end:var(--calcite-spacing-sm)}.month-header{display:flex;inline-size:100%;justify-content:space-between}.month{display:flex;inline-size:100%;flex-direction:column;justify-content:space-between}.day{font-size:var(--calcite-font-size)}:host([scale=s]) .week-days{padding-inline:var(--calcite-spacing-xs);padding-block-end:var(--calcite-spacing-xs)}:host([scale=s]) .week-header-container{padding-inline:var(--calcite-spacing-xs);padding-block:var(--calcite-spacing-sm)}:host([scale=s]) .day{font-size:var(--calcite-font-size-sm)}:host([scale=l]) .week-header{font-size:var(--calcite-font-size-relative-base);line-height:var(--calcite-font-line-height-base)}:host([scale=l]) .week-days{padding-inline:var(--calcite-spacing-md);padding-block-end:var(--calcite-spacing-md)}:host([scale=l]) .week-header-container{padding-inline:var(--calcite-spacing-md);padding-block:var(--calcite-spacing-md-plus)}:host([scale=l]) .day{font-size:var(--calcite-font-size-md)}.calendar--start{border-width:0px;border-style:solid;border-color:var(--calcite-date-picker-range-calendar-divider-color, var(--calcite-color-border-1))}:host([range][layout=horizontal][calendars="2"]) .calendar--start{border-inline-end-width:var(--calcite-border-width-sm)}:host([range][layout=vertical][calendars="2"]) .calendar--start{border-block-end-width:var(--calcite-border-width-sm)}.noncurrent{pointer-events:none;opacity:0}`,m=7,M=6,P=42,S=class extends A{constructor(){super(),this.activeFocus=!1,this.storeDayRef=e=>{e?.active&&this.activeFocus&&e.setFocus()},this.activeDate=new Date,this.calendars=2,this.range=!1,this.calciteInternalDatePickerDayHover=y({cancelable:!1}),this.calciteInternalDatePickerDaySelect=y({cancelable:!1}),this.calciteInternalDatePickerMonthActiveDateChange=y({cancelable:!1}),this.calciteInternalDatePickerMonthChange=y({cancelable:!1}),this.calciteInternalDatePickerMonthMouseOut=y({cancelable:!1}),this.listen("pointerout",this.pointerOutHandler),this.listen("focusout",this.disableActiveFocus)}static{this.properties={focusedDate:[16,{},{state:!0}],activeDate:[0,{},{attribute:!1}],calendars:[11,{},{type:Number,reflect:!0}],dateTimeFormat:[0,{},{attribute:!1}],endDate:[0,{},{attribute:!1}],headingLevel:[11,{},{type:Number,reflect:!0}],hoverRange:[0,{},{attribute:!1}],layout:[3,{},{reflect:!0}],localeData:[0,{},{attribute:!1}],max:[0,{},{attribute:!1}],messages:[0,{},{attribute:!1}],min:[0,{},{attribute:!1}],monthStyle:1,range:[7,{},{reflect:!0,type:Boolean}],scale:[3,{},{reflect:!0}],selectedDate:[0,{},{attribute:!1}],startDate:[0,{},{attribute:!1}]}}static{this.styles=Y}load(){this.focusedDate=this.selectedDate||this.activeDate}willUpdate(e){e.has("activeDate")&&this.updateFocusedDateWithActive(this.activeDate),e.has("selectedDate")&&(this.focusedDate=this.selectedDate)}updateFocusedDateWithActive(e){this.selectedDate||(this.focusedDate=b(e,this.min,this.max)?e:v(e,this.min,this.max))}keyDownHandler(e){if(e.defaultPrevented)return;let a=this.el.dir==="rtl",t=e.target.value;switch(e.key){case"ArrowUp":e.preventDefault(),this.addDays(-7,t);break;case"ArrowRight":e.preventDefault(),this.addDays(a?-1:1,t);break;case"ArrowDown":e.preventDefault(),this.addDays(7,t);break;case"ArrowLeft":e.preventDefault(),this.addDays(a?1:-1,t);break;case"PageUp":e.preventDefault(),this.addMonths(-1,t);break;case"PageDown":e.preventDefault(),this.addMonths(1,t);break;case"Home":e.preventDefault(),this.activeDate.setDate(1),this.addDays(0,t);break;case"End":e.preventDefault(),this.activeDate.setDate(new Date(this.activeDate.getFullYear(),this.activeDate.getMonth()+1,0).getDate()),this.addDays(0,t);break;case"Enter":case" ":e.preventDefault();break;case"Tab":this.activeFocus=!1}}disableActiveFocus(){this.activeFocus=!1}pointerOutHandler(){this.calciteInternalDatePickerMonthMouseOut.emit()}addMonths(e,a){let t=new Date(a);t.setMonth(a.getMonth()+e),this.calciteInternalDatePickerMonthActiveDateChange.emit(v(t,this.min,this.max)),this.focusedDate=v(t,this.min,this.max),this.activeFocus=!0,this.calciteInternalDatePickerDayHover.emit(t)}addDays(e=0,a){let t=new Date(a);t.setDate(a.getDate()+e),this.calciteInternalDatePickerMonthActiveDateChange.emit(v(t,this.min,this.max)),this.focusedDate=v(t,this.min,this.max),this.activeFocus=!0,this.calciteInternalDatePickerDayHover.emit(t)}getPreviousMonthDays(e,a,t){let s=new Date(a,e,0),i=s.getDate(),n=s.getDay(),r=[];if(n===(t+M)%m)return r;if(n===t)return[i];for(let l=(m+n-t)%m;l>=0;l--)r.push(i-l);return r}getCurrentMonthDays(e,a){let t=new Date(a,e+1,0).getDate(),s=[];for(let i=0;i<t;i++)s.push(i+1);return s}getNextMonthDays(e,a,t){let s=new Date(a,e+1,0).getDay(),i=[];if(s===(t+M)%m)return i;for(let n=0;n<(M-(s-t))%m;n++)i.push(n+1);return i}betweenSelectedRange(e){return!!(this.startDate&&this.endDate&&e>this.startDate&&e<this.endDate&&!this.isRangeHover(e))}isSelected(e){return!!(o(e,this.selectedDate)||this.startDate&&o(e,this.startDate)||this.endDate&&o(e,this.endDate))}isStartOfRange(e){return!!(this.startDate&&!o(this.startDate,this.endDate)&&o(this.startDate,e)&&!this.isEndOfRange(e))}isEndOfRange(e){return!!(this.endDate&&!o(this.startDate,this.endDate)&&o(this.endDate,e)||!this.endDate&&this.hoverRange&&o(this.startDate,this.hoverRange.end)&&o(e,this.hoverRange.end))}dayHover(e){let a=e.target;a.disabled?this.calciteInternalDatePickerMonthMouseOut.emit():this.calciteInternalDatePickerDayHover.emit(a.value),e.stopPropagation()}daySelect(e){let a=e.target;this.activeFocus=!1,this.calciteInternalDatePickerDaySelect.emit(a.value),e.stopPropagation()}isFocusedOnStart(){return this.hoverRange?.focused==="start"}isHoverInRange(){if(!this.hoverRange||!this.startDate)return!1;let{start:e,end:a}=this.hoverRange,t=this.isFocusedOnStart(),s=this.startDate&&a&&a>this.startDate,i=this.endDate&&a&&a<this.endDate,n=this.startDate&&e&&e>this.startDate,r=this.endDate&&e&&e<this.endDate,l=!t&&this.startDate&&s&&(!this.endDate||i),c=t&&this.startDate&&n&&r;return!!(l||c)}isRangeHover(e){if(!this.hoverRange)return!1;let{start:a,end:t}=this.hoverRange,s=this.isFocusedOnStart(),i=this.isHoverInRange(),n=!!(a&&e>a&&this.startDate&&e<this.startDate),r=!!(t&&e<t&&this.endDate&&e>this.endDate),l=!!(t&&e>t&&this.endDate&&e<this.endDate),c=!!(a&&e<a&&this.startDate&&e>this.startDate),h=!!(t&&e<t&&this.startDate&&e>this.startDate),d=!!(a&&e>a&&this.endDate&&e<this.endDate),f=this.startDate&&this.endDate;if(i){if(f)return s?!!(this.endDate&&e<this.endDate)&&(c||n):l||r;if(this.startDate&&!this.endDate)return s?n:h;if(!this.startDate&&this.endDate)return s?d:r}else if(f)return s?n:r;return!1}getDays(e,a,t,s="start"){let i=this.activeDate.getMonth(),n=i+1;i=s==="end"?n:i;let r=this.activeDate.getFullYear();return[...e.map(c=>({active:!1,day:c,date:new Date(r,i-1,c)})),...a.map(c=>{let h=new Date(r,i,c),d=o(h,new Date);return{active:this.focusedDate&&this.focusedDate!==this.startDate&&this.focusedDate!==this.endDate?o(h,this.focusedDate):o(h,this.startDate)||o(h,this.endDate),currentMonth:!0,currentDay:d,day:c,date:h}}),...t.map(c=>({active:!1,day:c,date:new Date(r,n,c)}))]}monthHeaderSelectChange(e){let a=new Date(e.detail),t=e.target;this.updateFocusableDate(a),e.stopPropagation(),this.calciteInternalDatePickerMonthChange.emit({date:a,position:t.position})}updateFocusableDate(e){!this.selectedDate||!this.range?this.focusedDate=this.getFirstValidDateOfMonth(e):this.selectedDate&&this.range&&(!w(this.startDate,e)||!w(this.endDate,e))&&(this.focusedDate=this.getFirstValidDateOfMonth(e))}getFirstValidDateOfMonth(e){return e.getDate()===1?e:C(e,this.min,this.max)}render(){let e=this.activeDate.getMonth(),a=this.activeDate.getFullYear(),t=this.localeData.weekStart%7,{abbreviated:s,short:i,narrow:n}=this.localeData.days,r=this.scale==="s"?n||i||s:i||s||n,l=[...r.slice(t,7),...r.slice(0,t)],c=this.getCurrentMonthDays(e,a),h=this.getPreviousMonthDays(e,a,t),d=this.getNextMonthDays(e,a,t),f=c.length+h.length+d.length;if(f<P){let N=d.length?d[d.length-1]:0;for(let k=1;k<=P-f;k++)d.push(N+k)}let p=e+1,H=this.getPreviousMonthDays(p,a,t),E=this.getCurrentMonthDays(p,a),z=this.getNextMonthDays(p,a,t),O=this.getDays(h,c,d),B=this.getDays(H,E,z,"end");return g`<div class=${u({[D.calendarContainer]:!0})} role=grid>${this.renderCalendar(l,O)}${this.range&&this.calendars===2&&this.renderCalendar(l,B,!0)||""}</div>`}renderDateDay({active:e,currentMonth:a,currentDay:t,date:s,day:i},n){let r=b(s,this.min,this.max);return F(n,g`<div class=${u({[D.dayContainer]:!0})} role=gridcell><calcite-date-picker-day .active=${e} class=${u({[D.currentDay]:t,[D.noncurrent]:this.range&&this.calendars===2&&!a})} .currentMonth=${a} .dateTimeFormat=${this.dateTimeFormat} .day=${i} .disabled=${!r} .endOfRange=${this.isEndOfRange(s)} .highlighted=${this.betweenSelectedRange(s)} @calciteInternalDayHover=${this.dayHover} @calciteInternalDaySelect=${this.daySelect} .range=${!!this.startDate&&!!this.endDate&&!o(this.startDate,this.endDate)} .rangeHover=${r&&this.isRangeHover(s)} .scale=${this.scale} .selected=${this.isSelected(s)} .startOfRange=${this.isStartOfRange(s)} .value=${s} ${$(this.storeDayRef)}></calcite-date-picker-day></div>`)}renderCalendar(e,a,t=!1){return g`<div class=${u({[D.calendar]:!0,[D.calendarStart]:!t})}><calcite-date-picker-month-header .activeDate=${t?I(this.activeDate):this.activeDate} .headingLevel=${this.headingLevel} .localeData=${this.localeData} .max=${this.max} .messages=${this.messages} .min=${this.min} .monthStyle=${this.monthStyle} @calciteInternalDatePickerMonthHeaderSelectChange=${this.monthHeaderSelectChange} .position=${t?"end":this.range&&this.calendars===2?"start":void 0} .scale=${this.scale} .selectedDate=${this.selectedDate}></calcite-date-picker-month-header>${this.renderMonthCalendar(e,a,t)}</div>`}renderMonthCalendar(e,a,t=!1){return g`<div class=${u({[D.month]:!0})} @keydown=${this.keyDownHandler}><div class=${u({[D.weekHeaderContainer]:!0})} role=row>${e.map(i=>g`<span class=${u({[D.weekHeader]:!0})} role=columnheader>${i}</span>`)}</div><div class=${u({[D.weekDays]:!0})} role=row>${a.map((i,n)=>this.renderDateDay(i,t?50+n:n))}</div></div>`}};R("calcite-date-picker-month",S);export{S as DatePickerMonth};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{m}from"./MBM7UIXE.js";import"./YP3AYJH3.js";import{a as O}from"./VI7SBYXT.js";import{a as P}from"./HKUZYLLE.js";import{b as f}from"./ZWPNZ5XW.js";import"./7OKZFXOI.js";import{C as b,D as h,E as T,F as c,R as A,g as z,h as n,l as x,m as k,p as u}from"./5WBOA7YI.js";function N(){return navigator.userAgentData}function D(){if(!1)return"";let g=N();return g?.brands?g.brands.map(({brand:e,version:t})=>`${e}/${t}`).join(" "):navigator.userAgent}var l={bordered:"bordered",striped:"striped",selectionArea:"selection-area",paginationArea:"pagination-area",container:"container",tableContainer:"table-container",tableContainerOverflow:"table-container--overflow",tableFixed:"table--fixed",assistiveText:"assistive-text",selectionActions:"selection-actions",dismissButton:"dismiss-button",selectionChipActive:"selection-chip--active",selectionCountChip:"selection-chip",selectionOutOfViewChip:"selection-chip--out-of-view"},w={selectionActions:"selection-actions",tableHeader:"table-header",tableFooter:"table-footer"},H={hideEmpty:"hide-empty",clear:"x"},V=z`@charset "UTF-8";:host{display:flex;--calcite-internal-table-border-collapse: collapse}:host([scale=s]){--calcite-internal-table-cell-padding: .25rem;--calcite-internal-table-cell-font-size: var(--calcite-font-size--2);--calcite-internal-table-cell-font-size-secondary: var(--calcite-font-size--3)}:host([scale=m]){--calcite-internal-table-cell-padding: .5rem;--calcite-internal-table-cell-font-size: var(--calcite-font-size--1);--calcite-internal-table-cell-font-size-secondary: var(--calcite-font-size--2)}:host(:is([scale=s],[scale=m])){--calcite-internal-table-selection-action-spacing: var(--calcite-spacing-xxs)}:host([scale=l]){--calcite-internal-table-selection-action-spacing: var(--calcite-spacing-xs);--calcite-internal-table-cell-padding: 1rem;--calcite-internal-table-cell-font-size: var(--calcite-font-size-0);--calcite-internal-table-cell-font-size-secondary: var(--calcite-font-size--1)}:host([sticky-header]){--calcite-internal-table-border-collapse: separate;--calcite-internal-table-header-border-block-end-width: 0;--calcite-internal-table-sticky-header-border-shadow: inset 0 calc(-1 * var(--calcite-border-width-sm)) 0 0 var(--calcite-table-header-border-color, var(--calcite-table-border-color, var(--calcite-color-border-2)))}:host([sticky-header]) .table-container{position:relative}.container{display:flex;flex-direction:column;inline-size:var(--calcite-container-size-content-fluid);block-size:var(--calcite-container-size-content-fluid)}.table-container{white-space:nowrap;line-height:var(--calcite-font-line-height-relative-tight);border:var(--calcite-border-width-sm) solid var(--calcite-table-border-color, var(--calcite-color-border-2));border-radius:var(--calcite-table-corner-radius, var(--calcite-corner-radius-sharp));box-shadow:var(--calcite-table-shadow, var(--calcite-shadow-none));overflow:auto}.table-container--overflow{overscroll-behavior-y:none}.assistive-text{position:absolute;inline-size:1px;block-size:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}table{border-collapse:var(--calcite-internal-table-border-collapse);border-spacing:0;inline-size:var(--calcite-container-size-content-fluid)}@-moz-document url-prefix(){table{border-collapse:separate;border-spacing:0}}.table--fixed{table-layout:fixed}.bordered ::slotted(calcite-table-row){--calcite-table-row-border-color: var(--calcite-table-border-color, var(--calcite-color-border-2))}.striped ::slotted(calcite-table-row:nth-child(2n+1)){--calcite-table-row-background-color: var( --calcite-table-row-background-color-striped, var(--calcite-color-foreground-2) )}.selection-actions{display:flex;flex-direction:row;gap:var(--calcite-internal-table-selection-action-spacing);margin-inline-start:auto}.selection-area{display:flex;flex-direction:row;align-items:center;padding-block:var(--calcite-internal-table-cell-padding)}.selection-area calcite-chip:last-of-type{margin-inline-end:.5rem}.selection-area calcite-chip:last-of-type:not(:first-of-type){margin-inline-start:.5rem}.selection-area calcite-button{margin-inline-end:1rem}.selection-chip{--calcite-chip-background-color: var(--calcite-table-selection-chip-background-color);--calcite-chip-border-color: var(--calcite-table-selection-chip-border-color);--calcite-chip-corner-radius: var(--calcite-table-selection-chip-corner-radius);--calcite-chip-shadow: var(--calcite-table-selection-chip-shadow);--calcite-chip-text-color: var(--calcite-table-selection-chip-text-color)}.selection-chip.selection-chip--active{--calcite-chip-background-color: var(--calcite-table-selection-chip-background-color-selected);--calcite-chip-border-color: var(--calcite-table-selection-chip-border-color-selected);--calcite-chip-text-color: var(--calcite-table-selection-chip-text-color-selected)}.selection-chip--out-of-view{--calcite-chip-background-color: var(--calcite-table-selection-out-of-view-chip-background-color);--calcite-chip-border-color: var(--calcite-table-selection-out-of-view-chip-border-color);--calcite-chip-corner-radius: var(--calcite-table-selection-out-of-view-chip-corner-radius);--calcite-chip-shadow: var(--calcite-table-selection-out-of-view-chip-shadow);--calcite-chip-text-color: var(--calcite-table-selection-out-of-view-chip-text-color);--calcite-chip-icon-color: var(--calcite-table-selection-out-of-view-chip-icon-color)}.pagination-area{display:flex;inline-size:100%;flex-direction:row;justify-content:center;padding-block:var(--calcite-internal-table-cell-padding)}calcite-pagination{flex:1;justify-content:center;--calcite-pagination-color: var(--calcite-table-pagination-color);--calcite-pagination-color-hover: var(--calcite-table-pagination-color-hover);--calcite-pagination-color-border-hover: var(--calcite-table-pagination-color-border-hover);--calcite-pagination-color-border-active: var(--calcite-table-pagination-color-border-active);--calcite-pagination-background-color: var(--calcite-table-pagination-background-color);--calcite-pagination-icon-color-background-hover: var(--calcite-table-pagination-icon-color-background-hover)}.dismiss-button{margin-inline-end:1rem;--calcite-button-background-color: var(--calcite-table-selection-dismiss-button-background-color);--calcite-button-border-color: var(--calcite-table-selection-dismiss-button-border-color);--calcite-button-corner-radius: var(--calcite-table-selection-dismiss-button-corner-radius);--calcite-button-shadow: var(--calcite-table-selection-dismiss-button-shadow);--calcite-button-text-color: var(--calcite-table-selection-dismiss-button-text-color)}.dismiss-button:hover{--calcite-button-background-color: var(--calcite-table-selection-dismiss-button-background-color-hover);--calcite-button-border-color: var(--calcite-table-selection-dismiss-button-border-color-hover);--calcite-button-text-color: var(--calcite-table-selection-dismiss-button-text-color-hover)}.dismiss-button:active{--calcite-button-background-color: var(--calcite-table-selection-dismiss-button-background-color-active);--calcite-button-border-color: var(--calcite-table-selection-dismiss-button-border-color-active);--calcite-button-text-color: var(--calcite-table-selection-dismiss-button-text-color-active)}:host([hidden]){display:none}[hidden]{display:none}`,y=class extends T{constructor(){super(),this.allRows=[],this.bodyRows=[],this.footRows=[],this.headRows=[],this.paginationRef=b(),this.tableContainerRef=b(),this.tableEl=null,this.tableBodySlotRef=b(),this.tableFootSlotRef=b(),this.tableHeadSlotRef=b(),this.tableContainerOverflowAnimationFrame=null,this.tableContainerResizeObserver=O("resize",()=>this.scheduleTableContainerOverflowUpdate()),this.messages=P({blocking:!0}),this.colCount=0,this.pageStartRow=1,this.readCellContentsToAT=!1,this.selectedCount=0,this.tableContainerHasOverflow=!1,this._selectedItems=[],this.bordered=!1,this.currentPage=0,this.groupSeparator=!1,this.interactionMode="interactive",this.layout="auto",this.numbered=!1,this.pageSize=0,this.scale="m",this.selectionDisplay="top",this.selectionMode="none",this.striped=!1,this.stickyHeader=!1,this.calciteInternalTableRowFocusChange=u({cancelable:!1}),this.calciteTablePageChange=u({cancelable:!1}),this.calciteTableSelect=u({cancelable:!1}),this.listen("calciteTableRowSelect",this.calciteTableRowSelectListener),this.listen("calciteInternalTableRowSelect",this.calciteInternalTableRowSelectListener),this.listen("calciteInternalTableRowFocusRequest",this.calciteInternalTableRowFocusEvent)}static{this.properties={colCount:[16,{},{state:!0}],pageStartRow:[16,{},{state:!0}],readCellContentsToAT:[16,{},{state:!0}],selectedCount:[16,{},{state:!0}],tableContainerHasOverflow:[16,{},{state:!0}],_selectedItems:[16,{},{state:!0}],bordered:[7,{},{reflect:!0,type:Boolean}],caption:1,currentPage:[11,{},{reflect:!0,type:Number}],groupSeparator:[7,{},{reflect:!0,type:Boolean}],interactionMode:[3,{},{reflect:!0}],layout:[3,{},{reflect:!0}],messageOverrides:[0,{},{attribute:!1}],numbered:[7,{},{reflect:!0,type:Boolean}],numberingSystem:[3,{},{reflect:!0}],pageSize:[11,{},{reflect:!0,type:Number}],scale:[3,{},{reflect:!0}],selectedItems:[32,{},{attribute:!1,readOnly:!0}],selectionDisplay:[3,{},{reflect:!0}],selectionMode:[3,{},{reflect:!0}],striped:[7,{},{reflect:!0,type:Boolean}],stickyHeader:[7,{},{reflect:!0,type:Boolean}]}}static{this.styles=V}get selectedItems(){return this._selectedItems}async load(){this.readCellContentsToAT=/safari/i.test(D()),this.listenOn(this.el.shadowRoot,"slotchange",this.handleSlotChange)}disconnectedCallback(){super.disconnectedCallback(),this.tableContainerOverflowAnimationFrame!==null&&(cancelAnimationFrame(this.tableContainerOverflowAnimationFrame),this.tableContainerOverflowAnimationFrame=null),this.tableContainerResizeObserver?.disconnect()}willUpdate(e){(e.has("groupSeparator")&&(this.hasUpdated||this.groupSeparator!==!1)||e.has("interactionMode")&&(this.hasUpdated||this.interactionMode!=="interactive")||e.has("numbered")&&(this.hasUpdated||this.numbered!==!1)||e.has("numberingSystem")||e.has("pageSize")&&(this.hasUpdated||this.pageSize!==0)||e.has("scale")&&(this.hasUpdated||this.scale!=="m")||e.has("selectionMode")&&(this.hasUpdated||this.selectionMode!=="none")||e.has("currentPage")&&(this.hasUpdated||this.currentPage>1)&&this.pageSize>0)&&this.updateRows(),e.has("stickyHeader")&&(this.hasUpdated||this.stickyHeader!==!1)&&(this.allRows?.forEach(t=>{t.stickyHeaderEnabled=this.stickyHeader}),this.stickyHeader?this.applyHeaderRowPositionStyles():this.resetStickyHeaderState())}handleSlotChange(){this.updateRows()}clearStickyHeaderRowStyles(){this.headRows?.forEach(e=>{e.style.removeProperty("--calcite-internal-table-header-offset"),e.style.removeProperty("--calcite-internal-table-header-z-index"),e.style.removeProperty("--calcite-internal-table-header-row-position")})}resetStickyHeaderState(){this.clearStickyHeaderRowStyles()}calciteTableRowSelectListener(e){e.composedPath().includes(this.el)&&this.setSelectedItems(e.target)}calciteInternalTableRowSelectListener(e){e.composedPath().includes(this.el)&&(this.updateSelectedItems(!1),e.stopPropagation())}calciteInternalTableRowFocusEvent(e){let t=e.detail.cellPosition,a=e.detail.rowPosition,o=e.detail.destination,r=e.detail.lastCell,i=this.bodyRows?.filter(p=>!f(p)),s=this.allRows?.filter(p=>!f(p)),R=this.headRows[this.headRows.length-1]?.positionAll,S=i[0]?.positionAll,C=i[i.length-1]?.positionAll,$=this.footRows[0]?.positionAll,F=s[s.length-1]?.positionAll,I=o==="next"&&a===R,E=o==="previous"&&a===$,M=o==="previous"&&a===S,B=o==="next"&&a===C,d;switch(o){case"first":d=0;break;case"last":d=F;break;case"next":d=I?S:B?$:a+1;break;case"previous":d=E?C:M?R:a-1;break}let v=this.allRows.find(p=>p.positionAll===d)?.cellCount,U=v&&t>v?v:t;d!==void 0&&this.calciteInternalTableRowFocusChange.emit({cellPosition:U,rowPosition:d,destination:o,lastCell:r})}getSlottedRows(e){return e?e.assignedElements({flatten:!0}).filter(t=>t.matches("calcite-table-row")):[]}observeTableContainer(){this.tableContainerResizeObserver?.disconnect();let e=this.tableContainerRef.value,t=this.tableEl;e&&this.tableContainerResizeObserver?.observe(e),t&&this.tableContainerResizeObserver?.observe(t)}scheduleTableContainerOverflowUpdate(){this.tableContainerOverflowAnimationFrame!==null&&cancelAnimationFrame(this.tableContainerOverflowAnimationFrame),this.tableContainerOverflowAnimationFrame=requestAnimationFrame(()=>{this.tableContainerOverflowAnimationFrame=null,this.updateTableContainerOverflow()})}applyHeaderRowPositionStyles(){this.clearStickyHeaderRowStyles();let e=this.headRows?.[0];e&&(e.style.setProperty("--calcite-internal-table-header-offset","0"),e.style.setProperty("--calcite-internal-table-header-z-index","2"),e.style.setProperty("--calcite-internal-table-header-row-position",this.stickyHeader?"sticky":"static"))}updateTableContainerOverflow(){let e=this.tableContainerRef.value;this.tableContainerHasOverflow=!!e&&(e.scrollHeight>e.clientHeight||e.scrollWidth>e.clientWidth)}updateRows(){let e=this.getSlottedRows(this.tableHeadSlotRef.value),t=this.getSlottedRows(this.tableBodySlotRef.value),a=this.getSlottedRows(this.tableFootSlotRef.value),o=[...e,...t,...a];e.forEach(i=>{let s=e.indexOf(i);i.rowType="head",i.positionSection=s,i.positionSectionLocalized=this.localizeNumber((s+1).toString())}),t.forEach(i=>{let s=t.indexOf(i);i.rowType="body",i.positionSection=s,i.positionSectionLocalized=this.localizeNumber((s+1).toString())}),a.forEach(i=>{let s=a.indexOf(i);i.rowType="foot",i.positionSection=s,i.positionSectionLocalized=this.localizeNumber((s+1).toString())}),o.forEach(i=>{i.interactionMode=this.interactionMode,i.selectionMode=this.selectionMode,i.bodyRowCount=t?.length,i.positionAll=o?.indexOf(i),i.numbered=this.numbered,i.scale=this.scale,i.readCellContentsToAT=this.readCellContentsToAT,i.lastVisibleRow=o?.indexOf(i)===o.length-1});let r=e[0]?.cellCount||0;this.colCount=r,this.headRows=e,this.bodyRows=t,this.footRows=a,this.allRows=o,this.applyHeaderRowPositionStyles(),this.observeTableContainer(),this.scheduleTableContainerOverflowUpdate(),this.handleCurrentPageRange(),this.updateSelectedItems()}handleCurrentPageRange(){let e=this.currentPage,t=this.bodyRows?.length||0,a=this.pageSize>0?Math.ceil(t/this.pageSize):1;if(a>0){let o=Math.min(Math.max(e,1),a);this.currentPage=o,this.pageStartRow=(o-1)*this.pageSize+1}this.paginateRows()}handlePaginationChange(){let e=this.paginationRef.value?.startItem;this.pageStartRow=e||1,this.currentPage=Math.ceil(this.pageStartRow/this.pageSize),this.calciteTablePageChange.emit(),this.updateRows()}paginateRows(){this.bodyRows?.forEach(e=>{let t=e.positionSection+1,a=t>=this.pageStartRow&&t<this.pageStartRow+this.pageSize;e.itemHidden=this.pageSize>0&&!a&&!this.footRows.includes(e),e.lastVisibleRow=t===this.pageStartRow+this.pageSize-1||t===this.bodyRows.length})}async updateSelectedItems(e){let t=this.bodyRows?.filter(a=>a.selected);this._selectedItems=t,this.selectedCount=t?.length,this.allRows?.forEach(a=>{a.selectedRowCount=this.selectedCount,a.selectedRowCountLocalized=this.localizeNumber(this.selectedCount)}),e&&this.calciteTableSelect.emit()}handleDeselectAllRows(){this.bodyRows?.forEach(e=>{e.selected=!1}),this.updateSelectedItems(!0)}setSelectedItems(e){this.bodyRows?.forEach(t=>{e?.rowType==="head"?t.selected=this.selectedCount!==this.bodyRows?.length:t.selected=this.selectionMode==="multiple"||e===t?t.selected:!1}),this.updateSelectedItems(!0)}localizeNumber(e){return m.numberFormatOptions={locale:this.messages._lang,numberingSystem:this.numberingSystem,useGrouping:this.groupSeparator},m.localize(e.toString())}renderSelectionArea(){let e=this._selectedItems?.filter(i=>f(i))?.length,t=this.localizeNumber(e?.toString()),o=`${this.localizeNumber(this.selectedCount?.toString())} ${this.messages.selected}`,r=`${t} ${this.messages.hiddenSelected}`;return n`<div class=${c(l.selectionArea)}><calcite-chip class=${c({[l.selectionCountChip]:!0,[l.selectionChipActive]:this.selectedCount>0})} .kind=${this.selectedCount>0?"brand":"neutral"} .label=${o} .scale=${this.scale} .value=${o}>${o}</calcite-chip>${e>0&&n`<calcite-chip class=${c(l.selectionOutOfViewChip)} .icon=${H.hideEmpty} .label=${r} .scale=${this.scale} title=${r??x} .value=${r}>${t}</calcite-chip>`||""}${this.selectedCount>0&&n`<calcite-button class=${c(l.dismissButton)} .iconStart=${H.clear} kind=neutral @click=${this.handleDeselectAllRows} round .scale=${this.scale} .title=${`${this.messages.clear} ${o} ${this.messages.row}`}>${this.messages.clear}</calcite-button>`||""}<div class=${c(l.selectionActions)}><slot name=${w.selectionActions}></slot></div></div>`}renderPaginationArea(){return n`<div class=${c(l.paginationArea)}><calcite-pagination .groupSeparator=${this.groupSeparator} .numberingSystem=${this.numberingSystem} @calcitePaginationChange=${this.handlePaginationChange} .pageSize=${this.pageSize} .scale=${this.scale} .startItem=${this.pageStartRow} .totalItems=${this.bodyRows?.length} ${h(this.paginationRef)}></calcite-pagination></div>`}renderTHead(){return n`<thead><slot name=${w.tableHeader} ${h(this.tableHeadSlotRef)}></slot></thead>`}renderTBody(){return n`<tbody><slot ${h(this.tableBodySlotRef)}></slot></tbody>`}renderTFoot(){return n`<tfoot><slot name=${w.tableFooter} ${h(this.tableFootSlotRef)}></slot></tfoot>`}render(){return n`<div class=${c(l.container)}>${this.selectionMode!=="none"&&this.selectionDisplay!=="none"&&this.renderSelectionArea()||""}<div class=${c({[l.bordered]:this.bordered,[l.striped]:this.striped,[l.tableContainer]:!0,[l.tableContainerOverflow]:this.tableContainerHasOverflow})} ${h(this.tableContainerRef)}><table .ariaColCount=${this.colCount} .ariaMultiSelectable=${this.selectionMode==="multiple"?"true":void 0} .ariaRowCount=${this.allRows?.length} class=${c({[l.tableFixed]:this.layout==="fixed"})} .role=${this.interactionMode==="interactive"?"grid":"table"} ${h(e=>{e&&(this.tableEl=e,k(n`<caption class=${c(l.assistiveText)}>${this.caption}</caption>${this.renderTHead()}${this.renderTBody()}${this.renderTFoot()}`,e))})}></table></div>${this.pageSize>0&&this.renderPaginationArea()||""}</div>`}};A("calcite-table",y);export{y as Table};
|
|
2
|
+
import{m}from"./MBM7UIXE.js";import"./YP3AYJH3.js";import{a as O}from"./VI7SBYXT.js";import{a as P}from"./SDK6P3OI.js";import{b as f}from"./ZWPNZ5XW.js";import"./TOJL7OC5.js";import{C as b,D as h,E as T,F as c,R as A,g as z,h as n,l as x,m as k,p as u}from"./TNPXVAGH.js";function N(){return navigator.userAgentData}function D(){if(!1)return"";let g=N();return g?.brands?g.brands.map(({brand:e,version:t})=>`${e}/${t}`).join(" "):navigator.userAgent}var l={bordered:"bordered",striped:"striped",selectionArea:"selection-area",paginationArea:"pagination-area",container:"container",tableContainer:"table-container",tableContainerOverflow:"table-container--overflow",tableFixed:"table--fixed",assistiveText:"assistive-text",selectionActions:"selection-actions",dismissButton:"dismiss-button",selectionChipActive:"selection-chip--active",selectionCountChip:"selection-chip",selectionOutOfViewChip:"selection-chip--out-of-view"},w={selectionActions:"selection-actions",tableHeader:"table-header",tableFooter:"table-footer"},H={hideEmpty:"hide-empty",clear:"x"},V=z`@charset "UTF-8";:host{display:flex;--calcite-internal-table-border-collapse: collapse}:host([scale=s]){--calcite-internal-table-cell-padding: .25rem;--calcite-internal-table-cell-font-size: var(--calcite-font-size--2);--calcite-internal-table-cell-font-size-secondary: var(--calcite-font-size--3)}:host([scale=m]){--calcite-internal-table-cell-padding: .5rem;--calcite-internal-table-cell-font-size: var(--calcite-font-size--1);--calcite-internal-table-cell-font-size-secondary: var(--calcite-font-size--2)}:host(:is([scale=s],[scale=m])){--calcite-internal-table-selection-action-spacing: var(--calcite-spacing-xxs)}:host([scale=l]){--calcite-internal-table-selection-action-spacing: var(--calcite-spacing-xs);--calcite-internal-table-cell-padding: 1rem;--calcite-internal-table-cell-font-size: var(--calcite-font-size-0);--calcite-internal-table-cell-font-size-secondary: var(--calcite-font-size--1)}:host([sticky-header]){--calcite-internal-table-border-collapse: separate;--calcite-internal-table-header-border-block-end-width: 0;--calcite-internal-table-sticky-header-border-shadow: inset 0 calc(-1 * var(--calcite-border-width-sm)) 0 0 var(--calcite-table-header-border-color, var(--calcite-table-border-color, var(--calcite-color-border-2)))}:host([sticky-header]) .table-container{position:relative}.container{display:flex;flex-direction:column;inline-size:var(--calcite-container-size-content-fluid);block-size:var(--calcite-container-size-content-fluid)}.table-container{white-space:nowrap;line-height:var(--calcite-font-line-height-relative-tight);border:var(--calcite-border-width-sm) solid var(--calcite-table-border-color, var(--calcite-color-border-2));border-radius:var(--calcite-table-corner-radius, var(--calcite-corner-radius-sharp));box-shadow:var(--calcite-table-shadow, var(--calcite-shadow-none));overflow:auto}.table-container--overflow{overscroll-behavior-y:none}.assistive-text{position:absolute;inline-size:1px;block-size:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}table{border-collapse:var(--calcite-internal-table-border-collapse);border-spacing:0;inline-size:var(--calcite-container-size-content-fluid)}@-moz-document url-prefix(){table{border-collapse:separate;border-spacing:0}}.table--fixed{table-layout:fixed}.bordered ::slotted(calcite-table-row){--calcite-table-row-border-color: var(--calcite-table-border-color, var(--calcite-color-border-2))}.striped ::slotted(calcite-table-row:nth-child(2n+1)){--calcite-table-row-background-color: var( --calcite-table-row-background-color-striped, var(--calcite-color-foreground-2) )}.selection-actions{display:flex;flex-direction:row;gap:var(--calcite-internal-table-selection-action-spacing);margin-inline-start:auto}.selection-area{display:flex;flex-direction:row;align-items:center;padding-block:var(--calcite-internal-table-cell-padding)}.selection-area calcite-chip:last-of-type{margin-inline-end:.5rem}.selection-area calcite-chip:last-of-type:not(:first-of-type){margin-inline-start:.5rem}.selection-area calcite-button{margin-inline-end:1rem}.selection-chip{--calcite-chip-background-color: var(--calcite-table-selection-chip-background-color);--calcite-chip-border-color: var(--calcite-table-selection-chip-border-color);--calcite-chip-corner-radius: var(--calcite-table-selection-chip-corner-radius);--calcite-chip-shadow: var(--calcite-table-selection-chip-shadow);--calcite-chip-text-color: var(--calcite-table-selection-chip-text-color)}.selection-chip.selection-chip--active{--calcite-chip-background-color: var(--calcite-table-selection-chip-background-color-selected);--calcite-chip-border-color: var(--calcite-table-selection-chip-border-color-selected);--calcite-chip-text-color: var(--calcite-table-selection-chip-text-color-selected)}.selection-chip--out-of-view{--calcite-chip-background-color: var(--calcite-table-selection-out-of-view-chip-background-color);--calcite-chip-border-color: var(--calcite-table-selection-out-of-view-chip-border-color);--calcite-chip-corner-radius: var(--calcite-table-selection-out-of-view-chip-corner-radius);--calcite-chip-shadow: var(--calcite-table-selection-out-of-view-chip-shadow);--calcite-chip-text-color: var(--calcite-table-selection-out-of-view-chip-text-color);--calcite-chip-icon-color: var(--calcite-table-selection-out-of-view-chip-icon-color)}.pagination-area{display:flex;inline-size:100%;flex-direction:row;justify-content:center;padding-block:var(--calcite-internal-table-cell-padding)}calcite-pagination{flex:1;justify-content:center;--calcite-pagination-color: var(--calcite-table-pagination-color);--calcite-pagination-color-hover: var(--calcite-table-pagination-color-hover);--calcite-pagination-color-border-hover: var(--calcite-table-pagination-color-border-hover);--calcite-pagination-color-border-active: var(--calcite-table-pagination-color-border-active);--calcite-pagination-background-color: var(--calcite-table-pagination-background-color);--calcite-pagination-icon-color-background-hover: var(--calcite-table-pagination-icon-color-background-hover)}.dismiss-button{margin-inline-end:1rem;--calcite-button-background-color: var(--calcite-table-selection-dismiss-button-background-color);--calcite-button-border-color: var(--calcite-table-selection-dismiss-button-border-color);--calcite-button-corner-radius: var(--calcite-table-selection-dismiss-button-corner-radius);--calcite-button-shadow: var(--calcite-table-selection-dismiss-button-shadow);--calcite-button-text-color: var(--calcite-table-selection-dismiss-button-text-color)}.dismiss-button:hover{--calcite-button-background-color: var(--calcite-table-selection-dismiss-button-background-color-hover);--calcite-button-border-color: var(--calcite-table-selection-dismiss-button-border-color-hover);--calcite-button-text-color: var(--calcite-table-selection-dismiss-button-text-color-hover)}.dismiss-button:active{--calcite-button-background-color: var(--calcite-table-selection-dismiss-button-background-color-active);--calcite-button-border-color: var(--calcite-table-selection-dismiss-button-border-color-active);--calcite-button-text-color: var(--calcite-table-selection-dismiss-button-text-color-active)}:host([hidden]){display:none}[hidden]{display:none}`,y=class extends T{constructor(){super(),this.allRows=[],this.bodyRows=[],this.footRows=[],this.headRows=[],this.paginationRef=b(),this.tableContainerRef=b(),this.tableEl=null,this.tableBodySlotRef=b(),this.tableFootSlotRef=b(),this.tableHeadSlotRef=b(),this.tableContainerOverflowAnimationFrame=null,this.tableContainerResizeObserver=O("resize",()=>this.scheduleTableContainerOverflowUpdate()),this.messages=P({blocking:!0}),this.colCount=0,this.pageStartRow=1,this.readCellContentsToAT=!1,this.selectedCount=0,this.tableContainerHasOverflow=!1,this._selectedItems=[],this.bordered=!1,this.currentPage=0,this.groupSeparator=!1,this.interactionMode="interactive",this.layout="auto",this.numbered=!1,this.pageSize=0,this.scale="m",this.selectionDisplay="top",this.selectionMode="none",this.striped=!1,this.stickyHeader=!1,this.calciteInternalTableRowFocusChange=u({cancelable:!1}),this.calciteTablePageChange=u({cancelable:!1}),this.calciteTableSelect=u({cancelable:!1}),this.listen("calciteTableRowSelect",this.calciteTableRowSelectListener),this.listen("calciteInternalTableRowSelect",this.calciteInternalTableRowSelectListener),this.listen("calciteInternalTableRowFocusRequest",this.calciteInternalTableRowFocusEvent)}static{this.properties={colCount:[16,{},{state:!0}],pageStartRow:[16,{},{state:!0}],readCellContentsToAT:[16,{},{state:!0}],selectedCount:[16,{},{state:!0}],tableContainerHasOverflow:[16,{},{state:!0}],_selectedItems:[16,{},{state:!0}],bordered:[7,{},{reflect:!0,type:Boolean}],caption:1,currentPage:[11,{},{reflect:!0,type:Number}],groupSeparator:[7,{},{reflect:!0,type:Boolean}],interactionMode:[3,{},{reflect:!0}],layout:[3,{},{reflect:!0}],messageOverrides:[0,{},{attribute:!1}],numbered:[7,{},{reflect:!0,type:Boolean}],numberingSystem:[3,{},{reflect:!0}],pageSize:[11,{},{reflect:!0,type:Number}],scale:[3,{},{reflect:!0}],selectedItems:[32,{},{attribute:!1,readOnly:!0}],selectionDisplay:[3,{},{reflect:!0}],selectionMode:[3,{},{reflect:!0}],striped:[7,{},{reflect:!0,type:Boolean}],stickyHeader:[7,{},{reflect:!0,type:Boolean}]}}static{this.styles=V}get selectedItems(){return this._selectedItems}async load(){this.readCellContentsToAT=/safari/i.test(D()),this.listenOn(this.el.shadowRoot,"slotchange",this.handleSlotChange)}disconnectedCallback(){super.disconnectedCallback(),this.tableContainerOverflowAnimationFrame!==null&&(cancelAnimationFrame(this.tableContainerOverflowAnimationFrame),this.tableContainerOverflowAnimationFrame=null),this.tableContainerResizeObserver?.disconnect()}willUpdate(e){(e.has("groupSeparator")&&(this.hasUpdated||this.groupSeparator!==!1)||e.has("interactionMode")&&(this.hasUpdated||this.interactionMode!=="interactive")||e.has("numbered")&&(this.hasUpdated||this.numbered!==!1)||e.has("numberingSystem")||e.has("pageSize")&&(this.hasUpdated||this.pageSize!==0)||e.has("scale")&&(this.hasUpdated||this.scale!=="m")||e.has("selectionMode")&&(this.hasUpdated||this.selectionMode!=="none")||e.has("currentPage")&&(this.hasUpdated||this.currentPage>1)&&this.pageSize>0)&&this.updateRows(),e.has("stickyHeader")&&(this.hasUpdated||this.stickyHeader!==!1)&&(this.allRows?.forEach(t=>{t.stickyHeaderEnabled=this.stickyHeader}),this.stickyHeader?this.applyHeaderRowPositionStyles():this.resetStickyHeaderState())}handleSlotChange(){this.updateRows()}clearStickyHeaderRowStyles(){this.headRows?.forEach(e=>{e.style.removeProperty("--calcite-internal-table-header-offset"),e.style.removeProperty("--calcite-internal-table-header-z-index"),e.style.removeProperty("--calcite-internal-table-header-row-position")})}resetStickyHeaderState(){this.clearStickyHeaderRowStyles()}calciteTableRowSelectListener(e){e.composedPath().includes(this.el)&&this.setSelectedItems(e.target)}calciteInternalTableRowSelectListener(e){e.composedPath().includes(this.el)&&(this.updateSelectedItems(!1),e.stopPropagation())}calciteInternalTableRowFocusEvent(e){let t=e.detail.cellPosition,a=e.detail.rowPosition,o=e.detail.destination,r=e.detail.lastCell,i=this.bodyRows?.filter(p=>!f(p)),s=this.allRows?.filter(p=>!f(p)),R=this.headRows[this.headRows.length-1]?.positionAll,S=i[0]?.positionAll,C=i[i.length-1]?.positionAll,$=this.footRows[0]?.positionAll,F=s[s.length-1]?.positionAll,I=o==="next"&&a===R,E=o==="previous"&&a===$,M=o==="previous"&&a===S,B=o==="next"&&a===C,d;switch(o){case"first":d=0;break;case"last":d=F;break;case"next":d=I?S:B?$:a+1;break;case"previous":d=E?C:M?R:a-1;break}let v=this.allRows.find(p=>p.positionAll===d)?.cellCount,U=v&&t>v?v:t;d!==void 0&&this.calciteInternalTableRowFocusChange.emit({cellPosition:U,rowPosition:d,destination:o,lastCell:r})}getSlottedRows(e){return e?e.assignedElements({flatten:!0}).filter(t=>t.matches("calcite-table-row")):[]}observeTableContainer(){this.tableContainerResizeObserver?.disconnect();let e=this.tableContainerRef.value,t=this.tableEl;e&&this.tableContainerResizeObserver?.observe(e),t&&this.tableContainerResizeObserver?.observe(t)}scheduleTableContainerOverflowUpdate(){this.tableContainerOverflowAnimationFrame!==null&&cancelAnimationFrame(this.tableContainerOverflowAnimationFrame),this.tableContainerOverflowAnimationFrame=requestAnimationFrame(()=>{this.tableContainerOverflowAnimationFrame=null,this.updateTableContainerOverflow()})}applyHeaderRowPositionStyles(){this.clearStickyHeaderRowStyles();let e=this.headRows?.[0];e&&(e.style.setProperty("--calcite-internal-table-header-offset","0"),e.style.setProperty("--calcite-internal-table-header-z-index","2"),e.style.setProperty("--calcite-internal-table-header-row-position",this.stickyHeader?"sticky":"static"))}updateTableContainerOverflow(){let e=this.tableContainerRef.value;this.tableContainerHasOverflow=!!e&&(e.scrollHeight>e.clientHeight||e.scrollWidth>e.clientWidth)}updateRows(){let e=this.getSlottedRows(this.tableHeadSlotRef.value),t=this.getSlottedRows(this.tableBodySlotRef.value),a=this.getSlottedRows(this.tableFootSlotRef.value),o=[...e,...t,...a];e.forEach(i=>{let s=e.indexOf(i);i.rowType="head",i.positionSection=s,i.positionSectionLocalized=this.localizeNumber((s+1).toString())}),t.forEach(i=>{let s=t.indexOf(i);i.rowType="body",i.positionSection=s,i.positionSectionLocalized=this.localizeNumber((s+1).toString())}),a.forEach(i=>{let s=a.indexOf(i);i.rowType="foot",i.positionSection=s,i.positionSectionLocalized=this.localizeNumber((s+1).toString())}),o.forEach(i=>{i.interactionMode=this.interactionMode,i.selectionMode=this.selectionMode,i.bodyRowCount=t?.length,i.positionAll=o?.indexOf(i),i.numbered=this.numbered,i.scale=this.scale,i.readCellContentsToAT=this.readCellContentsToAT,i.lastVisibleRow=o?.indexOf(i)===o.length-1});let r=e[0]?.cellCount||0;this.colCount=r,this.headRows=e,this.bodyRows=t,this.footRows=a,this.allRows=o,this.applyHeaderRowPositionStyles(),this.observeTableContainer(),this.scheduleTableContainerOverflowUpdate(),this.handleCurrentPageRange(),this.updateSelectedItems()}handleCurrentPageRange(){let e=this.currentPage,t=this.bodyRows?.length||0,a=this.pageSize>0?Math.ceil(t/this.pageSize):1;if(a>0){let o=Math.min(Math.max(e,1),a);this.currentPage=o,this.pageStartRow=(o-1)*this.pageSize+1}this.paginateRows()}handlePaginationChange(){let e=this.paginationRef.value?.startItem;this.pageStartRow=e||1,this.currentPage=Math.ceil(this.pageStartRow/this.pageSize),this.calciteTablePageChange.emit(),this.updateRows()}paginateRows(){this.bodyRows?.forEach(e=>{let t=e.positionSection+1,a=t>=this.pageStartRow&&t<this.pageStartRow+this.pageSize;e.itemHidden=this.pageSize>0&&!a&&!this.footRows.includes(e),e.lastVisibleRow=t===this.pageStartRow+this.pageSize-1||t===this.bodyRows.length})}async updateSelectedItems(e){let t=this.bodyRows?.filter(a=>a.selected);this._selectedItems=t,this.selectedCount=t?.length,this.allRows?.forEach(a=>{a.selectedRowCount=this.selectedCount,a.selectedRowCountLocalized=this.localizeNumber(this.selectedCount)}),e&&this.calciteTableSelect.emit()}handleDeselectAllRows(){this.bodyRows?.forEach(e=>{e.selected=!1}),this.updateSelectedItems(!0)}setSelectedItems(e){this.bodyRows?.forEach(t=>{e?.rowType==="head"?t.selected=this.selectedCount!==this.bodyRows?.length:t.selected=this.selectionMode==="multiple"||e===t?t.selected:!1}),this.updateSelectedItems(!0)}localizeNumber(e){return m.numberFormatOptions={locale:this.messages._lang,numberingSystem:this.numberingSystem,useGrouping:this.groupSeparator},m.localize(e.toString())}renderSelectionArea(){let e=this._selectedItems?.filter(i=>f(i))?.length,t=this.localizeNumber(e?.toString()),o=`${this.localizeNumber(this.selectedCount?.toString())} ${this.messages.selected}`,r=`${t} ${this.messages.hiddenSelected}`;return n`<div class=${c(l.selectionArea)}><calcite-chip class=${c({[l.selectionCountChip]:!0,[l.selectionChipActive]:this.selectedCount>0})} .kind=${this.selectedCount>0?"brand":"neutral"} .label=${o} .scale=${this.scale} .value=${o}>${o}</calcite-chip>${e>0&&n`<calcite-chip class=${c(l.selectionOutOfViewChip)} .icon=${H.hideEmpty} .label=${r} .scale=${this.scale} title=${r??x} .value=${r}>${t}</calcite-chip>`||""}${this.selectedCount>0&&n`<calcite-button class=${c(l.dismissButton)} .iconStart=${H.clear} kind=neutral @click=${this.handleDeselectAllRows} round .scale=${this.scale} .title=${`${this.messages.clear} ${o} ${this.messages.row}`}>${this.messages.clear}</calcite-button>`||""}<div class=${c(l.selectionActions)}><slot name=${w.selectionActions}></slot></div></div>`}renderPaginationArea(){return n`<div class=${c(l.paginationArea)}><calcite-pagination .groupSeparator=${this.groupSeparator} .numberingSystem=${this.numberingSystem} @calcitePaginationChange=${this.handlePaginationChange} .pageSize=${this.pageSize} .scale=${this.scale} .startItem=${this.pageStartRow} .totalItems=${this.bodyRows?.length} ${h(this.paginationRef)}></calcite-pagination></div>`}renderTHead(){return n`<thead><slot name=${w.tableHeader} ${h(this.tableHeadSlotRef)}></slot></thead>`}renderTBody(){return n`<tbody><slot ${h(this.tableBodySlotRef)}></slot></tbody>`}renderTFoot(){return n`<tfoot><slot name=${w.tableFooter} ${h(this.tableFootSlotRef)}></slot></tfoot>`}render(){return n`<div class=${c(l.container)}>${this.selectionMode!=="none"&&this.selectionDisplay!=="none"&&this.renderSelectionArea()||""}<div class=${c({[l.bordered]:this.bordered,[l.striped]:this.striped,[l.tableContainer]:!0,[l.tableContainerOverflow]:this.tableContainerHasOverflow})} ${h(this.tableContainerRef)}><table .ariaColCount=${this.colCount} .ariaMultiSelectable=${this.selectionMode==="multiple"?"true":void 0} .ariaRowCount=${this.allRows?.length} class=${c({[l.tableFixed]:this.layout==="fixed"})} .role=${this.interactionMode==="interactive"?"grid":"table"} ${h(e=>{e&&(this.tableEl=e,k(n`<caption class=${c(l.assistiveText)}>${this.caption}</caption>${this.renderTHead()}${this.renderTBody()}${this.renderTFoot()}`,e))})}></table></div>${this.pageSize>0&&this.renderPaginationArea()||""}</div>`}};A("calcite-table",y);export{y as Table};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{b}from"./GZZYSINJ.js";import{u}from"./
|
|
2
|
+
import{b}from"./GZZYSINJ.js";import{u}from"./WPG62KIS.js";import{E as g,F as c,R as m,g as d,h as o,p as h}from"./TNPXVAGH.js";var f={input:"input"},t={label:"label",labelScale:r=>`label--scale-${r}`,labelHorizontal:"label--horizontal",labelOutline:"label--outline",labelOutlineFill:"label--outline-fill",icon:"icon",iconSolo:"icon--solo"},v=d`:host{display:flex;cursor:pointer;align-self:stretch;font-weight:var(--calcite-font-weight-normal);outline-color:transparent;transition:background-color var(--calcite-internal-animation-timing-fast) ease-in-out}.label{pointer-events:none;margin:.125rem;box-sizing:border-box;display:flex;flex:1 1 0%;align-items:center;color:var(--calcite-segmented-control-color, var(--calcite-color-text-3));background-color:var(--calcite-segmented-control-background-color);box-shadow:var(--calcite-segmented-control-shadow);border-radius:max(0px,var(--calcite-segmented-control-corner-radius, var(--calcite-corner-radius)) - 2px);transition:background-color var(--calcite-internal-animation-timing-fast) ease-in-out,color var(--calcite-internal-animation-timing-fast) ease-in-out}.label--horizontal{justify-content:center}:host(:focus){outline:var(--calcite-border-width-md) solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)));outline-offset:calc(calc(-1 * var(--calcite-spacing-base)) * calc(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))));outline-offset:-1px;z-index:var(--calcite-z-index)}.label--scale-s{padding-inline:.5rem;font-size:var(--calcite-font-size-relative-sm);line-height:var(--calcite-font-line-height-sm);padding-block:.125rem}.label--scale-m{padding-inline:.75rem;font-size:var(--calcite-font-size-relative-base);line-height:var(--calcite-font-line-height-base);padding-block:.375rem}.label--scale-l{padding-inline:1rem;padding-block:var(--calcite-space-sm-plus);font-size:var(--calcite-font-size-relative-md);line-height:var(--calcite-font-line-height-md)}:host(:hover) .label{background-color:var(--calcite-segmented-control-background-color, var(--calcite-color-foreground-2));color:var(--calcite-segmented-control-color, var(--calcite-color-text-1))}:host(:active) .label{background-color:var(--calcite-segmented-control-background-color, var(--calcite-color-foreground-3))}:host([checked]) .label{cursor:default;background-color:var(--calcite-segmented-control-background-color, var(--calcite-color-brand));color:var(--calcite-segmented-control-color, var(--calcite-color-text-inverse))}:host([checked]) .label--outline,:host([checked]) .label--outline-fill{background-color:var(--calcite-segmented-control-background-color, var(--calcite-color-foreground-1));box-shadow:var(--calcite-segmented-control-shadow, inset 0 0 0 1px var(--calcite-color-brand));color:var(--calcite-segmented-control-color, var(--calcite-color-brand))}:host([checked]) .label--outline{background-color:var(--calcite-segmented-control-background-color, transparent)}::slotted(input){display:none}@media(forced-colors:active){:host([checked]) .label{background-color:highlight}:host([checked]) .label--outline,:host([checked]) .label--outline-fill{outline:2px solid transparent;outline-offset:2px}:host([checked]) .label:not([class~=label--outline]) .icon{color:highlightText}}.icon{position:relative;margin:0;display:inline-flex;line-height:inherit;margin-inline-start:var(--calcite-internal-segmented-control-icon-margin-start);margin-inline-end:var(--calcite-internal-segmented-control-icon-margin-end);--calcite-icon-color: var(--calcite-segmented-control-icon-color)}:host([icon-start]) .label--scale-s{--calcite-internal-segmented-control-icon-margin-end: .5rem}:host([icon-end]) .label--scale-s{--calcite-internal-segmented-control-icon-margin-start: .5rem}:host([icon-start]) .label--scale-m{--calcite-internal-segmented-control-icon-margin-end: .75rem}:host([icon-end]) .label--scale-m{--calcite-internal-segmented-control-icon-margin-start: .75rem}:host([icon-start]) .label--scale-l{--calcite-internal-segmented-control-icon-margin-end: 1rem}:host([icon-end]) .label--scale-l{--calcite-internal-segmented-control-icon-margin-start: 1rem}.label .icon--solo{--calcite-internal-segmented-control-icon-margin-start: 0;--calcite-internal-segmented-control-icon-margin-end: 0}:host([hidden]){display:none}[hidden]{display:none}`,i=class extends g{constructor(){super(...arguments),this.hasSlottedContent=!1,this.appearance="solid",this.checked=!1,this.iconFlipRtl=!1,this.layout="horizontal",this.scale="m",this.calciteInternalSegmentedControlItemChange=h({cancelable:!1})}static{this.properties={hasSlottedContent:[16,{},{state:!0}],appearance:1,checked:[7,{},{reflect:!0,type:Boolean}],iconEnd:[3,{},{reflect:!0}],iconFlipRtl:[7,{},{reflect:!0,type:Boolean}],iconStart:[3,{},{reflect:!0}],layout:1,scale:1,value:1}}static{this.styles=v}willUpdate(e){e.has("checked")&&(this.hasUpdated||this.checked!==!1)&&this.calciteInternalSegmentedControlItemChange.emit()}handleSlotChange(e){this.hasSlottedContent=u(e)}renderIcon(e,l=!1){return e?o`<calcite-icon class=${c({[t.icon]:!0,[t.iconSolo]:l})} .flipRtl=${this.iconFlipRtl} .icon=${e} scale=s></calcite-icon>`:null}render(){let{appearance:e,checked:l,layout:n,scale:a,value:s}=this;return this.el.ariaChecked=b(l),this.el.ariaLabel=s,this.el.role="radio",o`<label class=${c({[t.label]:!0,[t.labelScale(a)]:!0,[t.labelHorizontal]:n==="horizontal",[t.labelOutline]:e==="outline",[t.labelOutlineFill]:e==="outline-fill"})}>${this.renderContent()}</label>`}renderContent(){let{hasSlottedContent:e,iconEnd:l,iconStart:n}=this,a=n||l;return!e&&a?[this.renderIcon(a,!0),o`<slot @slotchange=${this.handleSlotChange}></slot>`]:[this.renderIcon(n),o`<slot @slotchange=${this.handleSlotChange}></slot>`,o`<slot name=${f.input}></slot>`,this.renderIcon(l)]}};m("calcite-segmented-control-item",i);export{i as SegmentedControlItem};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{a as Dt}from"./5EBGPCB7.js";import{L as Lt,O as Tt}from"./5WBOA7YI.js";var yt=["top","right","bottom","left"],Ft=["start","end"],vt=yt.reduce((t,e)=>t.concat(e,e+"-"+Ft[0],e+"-"+Ft[1]),[]),U=Math.min,B=Math.max,st=Math.round,rt=Math.floor,$=t=>({x:t,y:t}),Oe={left:"right",right:"left",bottom:"top",top:"bottom"};function bt(t,e,n){return B(t,U(e,n))}function I(t,e){return typeof t=="function"?t(e):t}function _(t){return t.split("-")[0]}function F(t){return t.split("-")[1]}function At(t){return t==="x"?"y":"x"}function ut(t){return t==="y"?"height":"width"}function H(t){let e=t[0];return e==="t"||e==="b"?"y":"x"}function dt(t){return At(H(t))}function Ot(t,e,n){n===void 0&&(n=!1);let o=F(t),i=dt(t),s=ut(i),r=i==="x"?o===(n?"end":"start")?"right":"left":o==="start"?"bottom":"top";return e.reference[s]>e.floating[s]&&(r=it(r)),[r,it(r)]}function $t(t){let e=it(t);return[ot(t),e,ot(e)]}function ot(t){return t.includes("start")?t.replace("start","end"):t.replace("end","start")}var Mt=["left","right"],Nt=["right","left"],Re=["top","bottom"],Pe=["bottom","top"];function Ce(t,e,n){switch(t){case"top":case"bottom":return n?e?Nt:Mt:e?Mt:Nt;case"left":case"right":return e?Re:Pe;default:return[]}}function kt(t,e,n,o){let i=F(t),s=Ce(_(t),n==="start",o);return i&&(s=s.map(r=>r+"-"+i),e&&(s=s.concat(s.map(ot)))),s}function it(t){let e=_(t);return Oe[e]+t.slice(e.length)}function Se(t){var e,n,o,i;return{top:(e=t.top)!=null?e:0,right:(n=t.right)!=null?n:0,bottom:(o=t.bottom)!=null?o:0,left:(i=t.left)!=null?i:0}}function Rt(t){return typeof t!="number"?Se(t):{top:t,right:t,bottom:t,left:t}}function q(t){let{x:e,y:n,width:o,height:i}=t;return{width:o,height:i,top:n,left:e,right:e+o,bottom:n+i,x:e,y:n}}function Wt(t,e,n){let{reference:o,floating:i}=t,s=H(e),r=dt(e),c=ut(r),a=_(e),l=s==="y",d=o.x+o.width/2-i.width/2,u=o.y+o.height/2-i.height/2,m=o[c]/2-i[c]/2,f;switch(a){case"top":f={x:d,y:o.y-i.height};break;case"bottom":f={x:d,y:o.y+o.height};break;case"right":f={x:o.x+o.width,y:u};break;case"left":f={x:o.x-i.width,y:u};break;default:f={x:o.x,y:o.y}}let g=F(e);return g&&(f[r]+=m*(g==="end"?1:-1)*(n&&l?-1:1)),f}async function Ht(t,e){var n;e===void 0&&(e={});let{x:o,y:i,platform:s,rects:r,elements:c,strategy:a}=t,{boundary:l="clippingAncestors",rootBoundary:d="viewport",elementContext:u="floating",altBoundary:m=!1,padding:f=0}=I(e,t),g=Rt(f),w=c[m?u==="floating"?"reference":"floating":u],h=q(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(w)))==null||n?w:w.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(c.floating)),boundary:l,rootBoundary:d,strategy:a})),x=u==="floating"?{x:o,y:i,width:r.floating.width,height:r.floating.height}:r.reference,y=await(s.getOffsetParent==null?void 0:s.getOffsetParent(c.floating)),b=await(s.isElement==null?void 0:s.isElement(y))&&await(s.getScale==null?void 0:s.getScale(y))||{x:1,y:1},O=q(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:x,offsetParent:y,strategy:a}):x);return{top:(h.top-O.top+g.top)/b.y,bottom:(O.bottom-h.bottom+g.bottom)/b.y,left:(h.left-O.left+g.left)/b.x,right:(O.right-h.right+g.right)/b.x}}var Ee=50,Vt=async(t,e,n)=>{let{placement:o="bottom",strategy:i="absolute",middleware:s=[],platform:r}=n,c=r.detectOverflow?r:{...r,detectOverflow:Ht},a=await(r.isRTL==null?void 0:r.isRTL(e)),l=await r.getElementRects({reference:t,floating:e,strategy:i}),{x:d,y:u}=Wt(l,o,a),m=o,f=0,g={};for(let p=0;p<s.length;p++){let w=s[p];if(!w)continue;let{name:h,fn:x}=w,{x:y,y:b,data:O,reset:A}=await x({x:d,y:u,initialPlacement:o,placement:m,strategy:i,middlewareData:g,rects:l,platform:c,elements:{reference:t,floating:e}});d=y??d,u=b??u,g[h]={...g[h],...O},A&&f<Ee&&(f++,typeof A=="object"&&(A.placement&&(m=A.placement),A.rects&&(l=A.rects===!0?await r.getElementRects({reference:t,floating:e,strategy:i}):A.rects),{x:d,y:u}=Wt(l,m,a)),p=-1)}return{x:d,y:u,placement:m,strategy:i,middlewareData:g}},zt=t=>({name:"arrow",options:t,async fn(e){let{x:n,y:o,placement:i,rects:s,platform:r,elements:c,middlewareData:a}=e,{element:l,padding:d=0}=I(t,e)||{};if(l==null)return{};let u=Rt(d),m={x:n,y:o},f=dt(i),g=ut(f),p=await r.getDimensions(l),w=f==="y",h=w?"top":"left",x=w?"bottom":"right",y=w?"clientHeight":"clientWidth",b=s.reference[g]+s.reference[f]-m[f]-s.floating[g],O=m[f]-s.reference[f],A=await(r.getOffsetParent==null?void 0:r.getOffsetParent(l)),R=A?A[y]:0;(!R||!await(r.isElement==null?void 0:r.isElement(A)))&&(R=c.floating[y]||s.floating[g]);let S=b/2-O/2,P=R/2-p[g]/2-1,v=U(u[h],P),L=U(u[x],P),X=R-p[g]-L,E=R/2-p[g]/2+S,T=bt(v,E,X),Y=!a.arrow&&F(i)!=null&&E!==T&&s.reference[g]/2-(E<v?v:L)-p[g]/2<0,W=Y?E<v?E-v:E-X:0;return{[f]:m[f]+W,data:{[f]:T,centerOffset:E-T-W,...Y&&{alignmentOffset:W}},reset:Y}}});function Le(t,e,n){return(t?[...n.filter(i=>F(i)===t),...n.filter(i=>F(i)!==t)]:n.filter(i=>_(i)===i)).filter(i=>t?F(i)===t||(e?ot(i)!==i:!1):!0)}var Ut=function(t){return t===void 0&&(t={}),{name:"autoPlacement",options:t,async fn(e){var n,o,i;let{rects:s,middlewareData:r,placement:c,platform:a,elements:l}=e,{crossAxis:d=!1,alignment:u,allowedPlacements:m=vt,autoAlignment:f=!0,...g}=I(t,e),p=u!==void 0||m===vt?Le(u||null,f,m):m,w=((n=r.autoPlacement)==null?void 0:n.index)||0,h=p[w];if(h==null)return{};if(c!==h)return{reset:{placement:p[0]}};let x=await a.detectOverflow(e,g),y=Ot(h,s,await(a.isRTL==null?void 0:a.isRTL(l.floating))),b=[x[_(h)],x[y[0]],x[y[1]]],O=[...((o=r.autoPlacement)==null?void 0:o.overflows)||[],{placement:h,overflows:b}],A=p[w+1];if(A)return{data:{index:w+1,overflows:O},reset:{placement:A}};let R=O.map(v=>{let L=F(v.placement);return[v.placement,L&&d?v.overflows.slice(0,2).reduce((X,E)=>X+E,0):v.overflows[0],v.overflows]}).sort((v,L)=>v[1]-L[1]),P=((i=R.filter(v=>v[2].slice(0,F(v[0])?2:3).every(L=>L<=0))[0])==null?void 0:i[0])||R[0][0];return P!==c?{data:{index:w+1,overflows:O},reset:{placement:P}}:{}}}},It=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var n,o;let{placement:i,middlewareData:s,rects:r,initialPlacement:c,platform:a,elements:l}=e,{mainAxis:d=!0,crossAxis:u=!0,fallbackPlacements:m,fallbackStrategy:f="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:p=!0,...w}=I(t,e);if((n=s.arrow)!=null&&n.alignmentOffset)return{};let h=_(i),x=H(c),y=_(c)===c,b=await(a.isRTL==null?void 0:a.isRTL(l.floating)),O=m||(y||!p?[it(c)]:$t(c)),A=g!=="none";!m&&A&&O.push(...kt(c,p,g,b));let R=[c,...O],S=await a.detectOverflow(e,w),P=[],v=((o=s.flip)==null?void 0:o.overflows)||[];if(d&&P.push(S[h]),u){let T=Ot(i,r,b);P.push(S[T[0]],S[T[1]])}if(v=[...v,{placement:i,overflows:P}],!P.every(T=>T<=0)){var L,X;let T=(((L=s.flip)==null?void 0:L.index)||0)+1,Y=R[T];if(Y&&(!(u==="alignment"?x!==H(Y):!1)||v.every(D=>H(D.placement)===x?D.overflows[0]>0:!0)))return{data:{index:T,overflows:v},reset:{placement:Y}};let W=(X=v.filter(K=>K.overflows[0]<=0).sort((K,D)=>K.overflows[1]-D.overflows[1])[0])==null?void 0:X.placement;if(!W)switch(f){case"bestFit":{var E;let K=(E=v.filter(D=>{if(A){let z=H(D.placement);return z===x||z==="y"}return!0}).map(D=>[D.placement,D.overflows.filter(z=>z>0).reduce((z,Ae)=>z+Ae,0)]).sort((D,z)=>D[1]-z[1])[0])==null?void 0:E[0];K&&(W=K);break}case"initialPlacement":W=c;break}if(i!==W)return{reset:{placement:W}}}return{}}}};function Bt(t,e){return{top:t.top-e.height,right:t.right-e.width,bottom:t.bottom-e.height,left:t.left-e.width}}function _t(t){return yt.some(e=>t[e]>=0)}var jt=function(t){return t===void 0&&(t={}),{name:"hide",options:t,async fn(e){let{rects:n,platform:o}=e,{strategy:i="referenceHidden",...s}=I(t,e);switch(i){case"referenceHidden":{let r=await o.detectOverflow(e,{...s,elementContext:"reference"}),c=Bt(r,n.reference);return{data:{referenceHiddenOffsets:c,referenceHidden:_t(c)}}}case"escaped":{let r=await o.detectOverflow(e,{...s,altBoundary:!0}),c=Bt(r,n.floating);return{data:{escapedOffsets:c,escaped:_t(c)}}}default:return{}}}}};var Te=new Set(["left","top"]);async function De(t,e){let{placement:n,platform:o,elements:i}=t,s=await(o.isRTL==null?void 0:o.isRTL(i.floating)),r=_(n),c=F(n),a=H(n)==="y",l=Te.has(r)?-1:1,d=s&&a?-1:1,u=I(e,t),{mainAxis:m,crossAxis:f,alignmentAxis:g}=typeof u=="number"?{mainAxis:u,crossAxis:0,alignmentAxis:null}:{mainAxis:u.mainAxis||0,crossAxis:u.crossAxis||0,alignmentAxis:u.alignmentAxis};return c&&typeof g=="number"&&(f=c==="end"?g*-1:g),a?{x:f*d,y:m*l}:{x:m*l,y:f*d}}var Xt=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var n,o;let{x:i,y:s,placement:r,middlewareData:c}=e,a=await De(e,t);return r===((n=c.offset)==null?void 0:n.placement)&&(o=c.arrow)!=null&&o.alignmentOffset?{}:{x:i+a.x,y:s+a.y,data:{...a,placement:r}}}}},Yt=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){let{x:n,y:o,placement:i,platform:s}=e,{mainAxis:r=!0,crossAxis:c=!1,limiter:a={fn:x=>{let{x:y,y:b}=x;return{x:y,y:b}}},...l}=I(t,e),d={x:n,y:o},u=await s.detectOverflow(e,l),m=H(i),f=At(m),g=d[f],p=d[m],w=(x,y)=>bt(y+u[x==="y"?"top":"left"],y,y-u[x==="y"?"bottom":"right"]);r&&(g=w(f,g)),c&&(p=w(m,p));let h=a.fn({...e,[f]:g,[m]:p});return{...h,data:{x:h.x-n,y:h.y-o,enabled:{[f]:r,[m]:c}}}}}};function mt(){return typeof window<"u"}function J(t){return qt(t)?(t.nodeName||"").toLowerCase():"#document"}function C(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function k(t){var e;return(e=(qt(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function qt(t){return mt()?t instanceof Node||t instanceof C(t).Node:!1}function M(t){return mt()?t instanceof Element||t instanceof C(t).Element:!1}function V(t){return mt()?t instanceof HTMLElement||t instanceof C(t).HTMLElement:!1}function Kt(t){return!mt()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof C(t).ShadowRoot}function ct(t){let{overflow:e,overflowX:n,overflowY:o,display:i}=N(t);return/auto|scroll|overlay|hidden|clip/.test(e+o+n)&&i!=="inline"&&i!=="contents"}function Gt(t){return/^(table|td|th)$/.test(J(t))}function lt(t){try{if(t.matches(":popover-open"))return!0}catch{}try{return t.matches(":modal")}catch{return!1}}var Fe=/transform|translate|scale|rotate|perspective|filter/,Me=/paint|layout|strict|content/,G=t=>!!t&&t!=="none",Pt;function tt(t){let e=M(t)?N(t):t;return G(e.transform)||G(e.translate)||G(e.scale)||G(e.rotate)||G(e.perspective)||!gt()&&(G(e.backdropFilter)||G(e.filter))||Fe.test(e.willChange||"")||Me.test(e.contain||"")}function Jt(t){let e=j(t);for(;V(e)&&!et(e);){if(tt(e))return e;if(lt(e))return null;e=j(e)}return null}function gt(){return Pt==null&&(Pt=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Pt}function et(t){return/^(html|body|#document)$/.test(J(t))}function N(t){return C(t).getComputedStyle(t)}function at(t){return M(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function j(t){if(J(t)==="html")return t;let e=t.assignedSlot||t.parentNode||Kt(t)&&t.host||k(t);return Kt(e)?e.host:e}function Qt(t){let e=j(t);return et(e)?(t.ownerDocument||t).body:V(e)&&ct(e)?e:Qt(e)}function Z(t,e,n){var o;e===void 0&&(e=[]),n===void 0&&(n=!0);let i=Qt(t),s=i===((o=t.ownerDocument)==null?void 0:o.body),r=C(i);if(s){let c=ht(r);return e.concat(r,r.visualViewport||[],ct(i)?i:[],c&&n?Z(c):[])}else return e.concat(i,Z(i,[],n))}function ht(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function ee(t){let e=N(t),n=parseFloat(e.width)||0,o=parseFloat(e.height)||0,i=V(t),s=i?t.offsetWidth:n,r=i?t.offsetHeight:o,c=st(n)!==s||st(o)!==r;return c&&(n=s,o=r),{width:n,height:o,$:c}}function St(t){return M(t)?t:t.contextElement}function nt(t){let e=St(t);if(!V(e))return $(1);let n=e.getBoundingClientRect(),{width:o,height:i,$:s}=ee(e),r=(s?st(n.width):n.width)/o,c=(s?st(n.height):n.height)/i;return(!r||!Number.isFinite(r))&&(r=1),(!c||!Number.isFinite(c))&&(c=1),{x:r,y:c}}var Ne=$(0);function ne(t){let e=C(t);return!gt()||!e.visualViewport?Ne:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function $e(t,e,n){return e===void 0&&(e=!1),!!n&&e&&n===C(t)}function Q(t,e,n,o){e===void 0&&(e=!1),n===void 0&&(n=!1);let i=t.getBoundingClientRect(),s=St(t),r=$(1);e&&(o?M(o)&&(r=nt(o)):r=nt(t));let c=$e(s,n,o)?ne(s):$(0),a=(i.left+c.x)/r.x,l=(i.top+c.y)/r.y,d=i.width/r.x,u=i.height/r.y;if(s&&o){let m=C(s),f=M(o)?C(o):o,g=m,p=ht(g);for(;p&&f!==g;){let w=nt(p),h=p.getBoundingClientRect(),x=N(p),y=h.left+(p.clientLeft+parseFloat(x.paddingLeft))*w.x,b=h.top+(p.clientTop+parseFloat(x.paddingTop))*w.y;a*=w.x,l*=w.y,d*=w.x,u*=w.y,a+=y,l+=b,g=C(p),p=ht(g)}}return q({width:d,height:u,x:a,y:l})}function pt(t,e){let n=at(t).scrollLeft;return e?e.left+n:Q(k(t)).left+n}function oe(t,e){let n=t.getBoundingClientRect(),o=n.left+e.scrollLeft-pt(t,n),i=n.top+e.scrollTop;return{x:o,y:i}}function ke(t){let{elements:e,rect:n,offsetParent:o,strategy:i}=t,s=i==="fixed",r=k(o),c=e?lt(e.floating):!1;if(o===r||c&&s)return n;let a={scrollLeft:0,scrollTop:0},l=$(1),d=$(0),u=V(o);if((u||!s)&&((J(o)!=="body"||ct(r))&&(a=at(o)),u)){let f=Q(o);l=nt(o),d.x=f.x+o.clientLeft,d.y=f.y+o.clientTop}let m=r&&!u&&!s?oe(r,a):$(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-a.scrollLeft*l.x+d.x+m.x,y:n.y*l.y-a.scrollTop*l.y+d.y+m.y}}function We(t){return t.getClientRects?Array.from(t.getClientRects()):[]}function Be(t){let e=at(t),n=t.ownerDocument.body,o=B(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),i=B(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight),s=-e.scrollLeft+pt(t),r=-e.scrollTop;return N(n).direction==="rtl"&&(s+=B(t.clientWidth,n.clientWidth)-o),{width:o,height:i,x:s,y:r}}var _e=25;function He(t,e,n){n===void 0&&(n="viewport");let o=n==="layoutViewport",i=C(t),s=k(t),r=i.visualViewport,c=s.clientWidth,a=s.clientHeight,l=0,d=0;if(r){let m=!gt()||e==="fixed";o?m||(l=-r.offsetLeft,d=-r.offsetTop):(c=r.width,a=r.height,m&&(l=r.offsetLeft,d=r.offsetTop))}if(pt(s)<=0){let m=s.ownerDocument,f=m.body,g=getComputedStyle(f),p=m.compatMode==="CSS1Compat"&&parseFloat(g.marginLeft)+parseFloat(g.marginRight)||0,w=Math.abs(s.clientWidth-f.clientWidth-p),h=getComputedStyle(s).scrollbarGutter==="stable both-edges"?w/2:w;h<=_e&&(c-=h)}return{width:c,height:a,x:l,y:d}}function Ve(t,e){let n=Q(t,!0,e==="fixed"),o=n.top+t.clientTop,i=n.left+t.clientLeft,s=nt(t),r=t.clientWidth*s.x,c=t.clientHeight*s.y,a=i*s.x,l=o*s.y;return{width:r,height:c,x:a,y:l}}function Zt(t,e,n){let o;if(e==="viewport"||e==="layoutViewport")o=He(t,n,e);else if(e==="document")o=Be(k(t));else if(M(e))o=Ve(e,n);else{let i=ne(t);o={x:e.x-i.x,y:e.y-i.y,width:e.width,height:e.height}}return q(o)}function ze(t,e){let n=e.get(t);if(n)return n;let o=Z(t,[],!1).filter(c=>M(c)&&J(c)!=="body"),i=null,s=N(t).position==="fixed",r=s?j(t):t;for(;M(r)&&!et(r);){let c=N(r),a=tt(r),l=i?i.position:s?"fixed":"";!a&&(l==="fixed"||l==="absolute"&&c.position==="static")?o=o.filter(u=>u!==r):i=c,r=j(r)}return e.set(t,o),o}function Ue(t){let{element:e,boundary:n,rootBoundary:o,strategy:i}=t,r=[...n==="clippingAncestors"?lt(e)?[]:ze(e,this._c):[].concat(n),o],c=Zt(e,r[0],i),a=c.top,l=c.right,d=c.bottom,u=c.left;for(let m=1;m<r.length;m++){let f=Zt(e,r[m],i);a=B(f.top,a),l=U(f.right,l),d=U(f.bottom,d),u=B(f.left,u)}return{width:l-u,height:d-a,x:u,y:a}}function Ie(t){let{width:e,height:n}=ee(t);return{width:e,height:n}}function je(t,e,n){let o=V(e),i=k(e),s=n==="fixed",r=Q(t,!0,s,e),c={scrollLeft:0,scrollTop:0},a=$(0);if((o||!s)&&((J(e)!=="body"||ct(i))&&(c=at(e)),o)){let m=Q(e,!0,s,e);a.x=m.x+e.clientLeft,a.y=m.y+e.clientTop}!o&&i&&(a.x=pt(i));let l=i&&!o&&!s?oe(i,c):$(0),d=r.left+c.scrollLeft-a.x-l.x,u=r.top+c.scrollTop-a.y-l.y;return{x:d,y:u,width:r.width,height:r.height}}function Ct(t){return N(t).position==="static"}function te(t,e){if(!V(t)||N(t).position==="fixed")return null;if(e)return e(t);let n=t.offsetParent;return k(t)===n&&(n=n.ownerDocument.body),n}function ie(t,e){let n=C(t);if(lt(t))return n;if(!V(t)){let i=j(t);for(;i&&!et(i);){if(M(i)&&!Ct(i))return i;i=j(i)}return n}let o=te(t,e);for(;o&&Gt(o)&&Ct(o);)o=te(o,e);return o&&et(o)&&Ct(o)&&!tt(o)?n:o||Jt(t)||n}var Xe=async function(t){let e=this.getOffsetParent||ie,n=this.getDimensions,o=await n(t.floating);return{reference:je(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function Ye(t){return N(t).direction==="rtl"}var wt={convertOffsetParentRelativeRectToViewportRelativeRect:ke,getDocumentElement:k,getClippingRect:Ue,getOffsetParent:ie,getElementRects:Xe,getClientRects:We,getDimensions:Ie,getScale:nt,isElement:M,isRTL:Ye};function se(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function Ke(t,e,n){let o=null,i,s=k(t);function r(){var d;clearTimeout(i),(d=o)==null||d.disconnect(),o=null}function c(d,u){d===void 0&&(d=!1),u===void 0&&(u=1),r();let m=t.getBoundingClientRect(),{left:f,top:g,width:p,height:w}=m;if(d||e(),!p||!w)return;let h=rt(g),x=rt(s.clientWidth-(f+p)),y=rt(s.clientHeight-(g+w)),b=rt(f),A={rootMargin:-h+"px "+-x+"px "+-y+"px "+-b+"px",threshold:B(0,U(1,u))||1},R=!0;function S(P){let v=P[0].intersectionRatio;if(!se(m,t.getBoundingClientRect()))return c();if(v!==u){if(!R)return c();v?c(!1,v):i=setTimeout(()=>{c(!1,1e-7)},1e3)}R=!1}try{o=new IntersectionObserver(S,{...A,root:s.ownerDocument})}catch{o=new IntersectionObserver(S,A)}o.observe(t)}let a=C(t),l=()=>c(n);return a.addEventListener("resize",l),c(!0),()=>{a.removeEventListener("resize",l),r()}}function re(t,e,n,o){o===void 0&&(o={});let{ancestorScroll:i=!0,ancestorResize:s=!0,elementResize:r=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:a=!1}=o,l=St(t),d=i||s?[...l?Z(l):[],...e?Z(e):[]]:[];d.forEach(h=>{i&&h.addEventListener("scroll",n),s&&h.addEventListener("resize",n)});let u=l&&c?Ke(l,n,s):null,m=-1,f=null;r&&(f=new ResizeObserver(h=>{let[x]=h;x&&x.target===l&&f&&e&&(f.unobserve(e),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var y;(y=f)==null||y.observe(e)})),n()}),l&&!a&&f.observe(l),e&&f.observe(e));let g,p=a?Q(t):null;a&&w();function w(){let h=Q(t);p&&!se(p,h)&&n(),p=h,g=requestAnimationFrame(w)}return n(),()=>{var h;d.forEach(x=>{i&&x.removeEventListener("scroll",n),s&&x.removeEventListener("resize",n)}),u?.(),(h=f)==null||h.disconnect(),f=null,a&&cancelAnimationFrame(g)}}var ce=Xt,le=Ut,ae=Yt,fe=It;var ue=jt,de=zt;var me=(t,e,n)=>{let o=new Map,i=n??{},s={...wt,...i.platform,_c:o};return Vt(t,e,{...i,platform:s})};function ge(t){return qe(t)}function Et(t){return t.assignedSlot?t.assignedSlot:t.parentNode instanceof ShadowRoot?t.parentNode.host:t.parentNode}function qe(t){for(let e=t;e;e=Et(e))if(e instanceof Element&&getComputedStyle(e).display==="none")return null;for(let e=Et(t);e;e=Et(e)){if(!(e instanceof Element))continue;let n=getComputedStyle(e);if(n.display!=="contents"&&(n.position!=="static"||tt(n)||e.tagName==="BODY"))return e}return null}(function(){if(!!1){let e=wt.getOffsetParent;wt.getOffsetParent=n=>e(n,ge)}})();function he(t){let e=window.devicePixelRatio||1;return Math.round(t*e)/e}var ye=(async(t,{arrowEl:e,direction:n,flipDisabled:o,flipPlacements:i,floatingEl:s,offsetDistance:r,offsetSkidding:c,overlayPositioning:a="absolute",placement:l,referenceEl:d,type:u})=>{if(!d||!s)return;let m=n==="rtl",{x:f,y:g,placement:p,strategy:w,middlewareData:h}=await me(d,s,{strategy:a,placement:l==="auto"||l==="auto-start"||l==="auto-end"?void 0:pe(l,m),middleware:Je({placement:l,flipDisabled:o,flipPlacements:i?.map(O=>pe(O,m)),offsetDistance:r,offsetSkidding:c,arrowEl:e,type:u})});if(e&&h.arrow){let{x:O,y:A}=h.arrow,R=p.split("-")[0],S=O!=null?"left":"top",P=tn[R],v={left:"",top:"",bottom:"",right:""};"floatingLayout"in t&&(t.floatingLayout=R==="left"||R==="right"?"horizontal":"vertical"),Object.assign(e.style,{...v,[S]:`${S=="left"?O:A}px`,[R]:"100%",transform:P})}let y=h.hide?.referenceHidden?"hidden":null,b=y?"none":null;s.setAttribute(Ge,p),Object.assign(s.style,{pointerEvents:b,position:w,transform:`translate(${he(f)}px,${he(g)}px)`,visibility:y})}),Ge="data-placement",ve=["top","bottom","right","left","top-start","top-end","bottom-start","bottom-end","right-start","right-end","left-start","left-end","leading","trailing","leading-start","leading-end","trailing-start","trailing-end"],On="bottom-start",Rn="bottom-end",Pn={animation:"calcite-floating-ui-anim",animationActive:"calcite-floating-ui-anim--active"};function Je({placement:t,flipDisabled:e,flipPlacements:n,offsetDistance:o,offsetSkidding:i,arrowEl:s,type:r}){let c="layoutViewport",a=t==="auto"||t==="auto-start"||t==="auto-end",l=[ae({rootBoundary:c})];if(l.push(ce({mainAxis:typeof o=="number"?o:0,crossAxis:typeof i=="number"?i:0})),a&&l.push(le({alignment:t==="auto-start"?"start":t==="auto-end"?"end":null,rootBoundary:c})),!e&&(!a||r==="menu")){let u=r==="menu"?n||["top-start","top","top-end","bottom-start","bottom","bottom-end"]:n;l.push(fe(u?{fallbackPlacements:u,rootBoundary:c}:{rootBoundary:c}))}return s&&l.push(de({element:s})),l.push(ue({rootBoundary:c})),l}function Qe(t){return ve.includes(t)}function Cn(t,e){let n=t.filter(Qe);return n.length!==t.length&&Tt.warn(`${e.tagName}: Invalid value found in: flipPlacements. Try any of these: ${ve.map(o=>`"${o}"`).join(", ").trim()}`,{el:e}),n}function pe(t,e=!1){let n=["left","right"];return e&&n.reverse(),t.replace(/leading/gi,n[0]).replace(/trailing/gi,n[1])}async function Sn(t,e,n=!1){if(!t.open||!e.floatingEl||!e.referenceEl)return;if(Object.assign(e.floatingEl.style,{display:"block",inset:"unset",left:"0",position:e.overlayPositioning??"absolute",top:"0"}),!ft.get(t))return be(t);await(n?Ze(t):ye)(t,e)}function Ze(t){let e=xt.get(t);return e||(e=Dt(ye,Lt.reposition,{edges:["leading","trailing"]}),xt.set(t,e),e)}var tn={top:"",left:"rotate(-90deg)",bottom:"rotate(180deg)",right:"rotate(90deg)"},ft=new WeakMap,xt=new WeakMap;async function be(t){let{referenceEl:e,floatingEl:n}=t;if(!n?.isConnected)return;let o=re;ft.set(t,{state:"pending"});let i,s=o(e,n,()=>{let r=t.reposition();i||(i=r)});return ft.set(t,{state:"active",cleanUp:s}),i}function en(t){let{floatingEl:e}=t;e&&Object.assign(e.style,{display:"",left:"",pointerEvents:"",position:"",top:"",transform:"",visibility:""})}async function En(t){let{floatingEl:e,referenceEl:n}=t;if(en(t),nn(t),!(!e||!n||!t.open))return be(t)}function nn(t){let e=ft.get(t);e?.state==="active"&&e.cleanUp(),ft.delete(t),xt.get(t)?.cancel(),xt.delete(t)}var we=4,Ln=Math.ceil(Math.hypot(we,we));export{On as a,Rn as b,Pn as c,Cn as d,Sn as e,en as f,En as g,nn as h,Ln as i};
|
|
2
|
+
import{a as Dt}from"./5EBGPCB7.js";import{L as Lt,O as Tt}from"./TNPXVAGH.js";var yt=["top","right","bottom","left"],Ft=["start","end"],vt=yt.reduce((t,e)=>t.concat(e,e+"-"+Ft[0],e+"-"+Ft[1]),[]),U=Math.min,B=Math.max,st=Math.round,rt=Math.floor,$=t=>({x:t,y:t}),Oe={left:"right",right:"left",bottom:"top",top:"bottom"};function bt(t,e,n){return B(t,U(e,n))}function I(t,e){return typeof t=="function"?t(e):t}function _(t){return t.split("-")[0]}function F(t){return t.split("-")[1]}function At(t){return t==="x"?"y":"x"}function ut(t){return t==="y"?"height":"width"}function H(t){let e=t[0];return e==="t"||e==="b"?"y":"x"}function dt(t){return At(H(t))}function Ot(t,e,n){n===void 0&&(n=!1);let o=F(t),i=dt(t),s=ut(i),r=i==="x"?o===(n?"end":"start")?"right":"left":o==="start"?"bottom":"top";return e.reference[s]>e.floating[s]&&(r=it(r)),[r,it(r)]}function $t(t){let e=it(t);return[ot(t),e,ot(e)]}function ot(t){return t.includes("start")?t.replace("start","end"):t.replace("end","start")}var Mt=["left","right"],Nt=["right","left"],Re=["top","bottom"],Pe=["bottom","top"];function Ce(t,e,n){switch(t){case"top":case"bottom":return n?e?Nt:Mt:e?Mt:Nt;case"left":case"right":return e?Re:Pe;default:return[]}}function kt(t,e,n,o){let i=F(t),s=Ce(_(t),n==="start",o);return i&&(s=s.map(r=>r+"-"+i),e&&(s=s.concat(s.map(ot)))),s}function it(t){let e=_(t);return Oe[e]+t.slice(e.length)}function Se(t){var e,n,o,i;return{top:(e=t.top)!=null?e:0,right:(n=t.right)!=null?n:0,bottom:(o=t.bottom)!=null?o:0,left:(i=t.left)!=null?i:0}}function Rt(t){return typeof t!="number"?Se(t):{top:t,right:t,bottom:t,left:t}}function q(t){let{x:e,y:n,width:o,height:i}=t;return{width:o,height:i,top:n,left:e,right:e+o,bottom:n+i,x:e,y:n}}function Wt(t,e,n){let{reference:o,floating:i}=t,s=H(e),r=dt(e),c=ut(r),a=_(e),l=s==="y",d=o.x+o.width/2-i.width/2,u=o.y+o.height/2-i.height/2,m=o[c]/2-i[c]/2,f;switch(a){case"top":f={x:d,y:o.y-i.height};break;case"bottom":f={x:d,y:o.y+o.height};break;case"right":f={x:o.x+o.width,y:u};break;case"left":f={x:o.x-i.width,y:u};break;default:f={x:o.x,y:o.y}}let g=F(e);return g&&(f[r]+=m*(g==="end"?1:-1)*(n&&l?-1:1)),f}async function Ht(t,e){var n;e===void 0&&(e={});let{x:o,y:i,platform:s,rects:r,elements:c,strategy:a}=t,{boundary:l="clippingAncestors",rootBoundary:d="viewport",elementContext:u="floating",altBoundary:m=!1,padding:f=0}=I(e,t),g=Rt(f),w=c[m?u==="floating"?"reference":"floating":u],h=q(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(w)))==null||n?w:w.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(c.floating)),boundary:l,rootBoundary:d,strategy:a})),x=u==="floating"?{x:o,y:i,width:r.floating.width,height:r.floating.height}:r.reference,y=await(s.getOffsetParent==null?void 0:s.getOffsetParent(c.floating)),b=await(s.isElement==null?void 0:s.isElement(y))&&await(s.getScale==null?void 0:s.getScale(y))||{x:1,y:1},O=q(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:x,offsetParent:y,strategy:a}):x);return{top:(h.top-O.top+g.top)/b.y,bottom:(O.bottom-h.bottom+g.bottom)/b.y,left:(h.left-O.left+g.left)/b.x,right:(O.right-h.right+g.right)/b.x}}var Ee=50,Vt=async(t,e,n)=>{let{placement:o="bottom",strategy:i="absolute",middleware:s=[],platform:r}=n,c=r.detectOverflow?r:{...r,detectOverflow:Ht},a=await(r.isRTL==null?void 0:r.isRTL(e)),l=await r.getElementRects({reference:t,floating:e,strategy:i}),{x:d,y:u}=Wt(l,o,a),m=o,f=0,g={};for(let p=0;p<s.length;p++){let w=s[p];if(!w)continue;let{name:h,fn:x}=w,{x:y,y:b,data:O,reset:A}=await x({x:d,y:u,initialPlacement:o,placement:m,strategy:i,middlewareData:g,rects:l,platform:c,elements:{reference:t,floating:e}});d=y??d,u=b??u,g[h]={...g[h],...O},A&&f<Ee&&(f++,typeof A=="object"&&(A.placement&&(m=A.placement),A.rects&&(l=A.rects===!0?await r.getElementRects({reference:t,floating:e,strategy:i}):A.rects),{x:d,y:u}=Wt(l,m,a)),p=-1)}return{x:d,y:u,placement:m,strategy:i,middlewareData:g}},zt=t=>({name:"arrow",options:t,async fn(e){let{x:n,y:o,placement:i,rects:s,platform:r,elements:c,middlewareData:a}=e,{element:l,padding:d=0}=I(t,e)||{};if(l==null)return{};let u=Rt(d),m={x:n,y:o},f=dt(i),g=ut(f),p=await r.getDimensions(l),w=f==="y",h=w?"top":"left",x=w?"bottom":"right",y=w?"clientHeight":"clientWidth",b=s.reference[g]+s.reference[f]-m[f]-s.floating[g],O=m[f]-s.reference[f],A=await(r.getOffsetParent==null?void 0:r.getOffsetParent(l)),R=A?A[y]:0;(!R||!await(r.isElement==null?void 0:r.isElement(A)))&&(R=c.floating[y]||s.floating[g]);let S=b/2-O/2,P=R/2-p[g]/2-1,v=U(u[h],P),L=U(u[x],P),X=R-p[g]-L,E=R/2-p[g]/2+S,T=bt(v,E,X),Y=!a.arrow&&F(i)!=null&&E!==T&&s.reference[g]/2-(E<v?v:L)-p[g]/2<0,W=Y?E<v?E-v:E-X:0;return{[f]:m[f]+W,data:{[f]:T,centerOffset:E-T-W,...Y&&{alignmentOffset:W}},reset:Y}}});function Le(t,e,n){return(t?[...n.filter(i=>F(i)===t),...n.filter(i=>F(i)!==t)]:n.filter(i=>_(i)===i)).filter(i=>t?F(i)===t||(e?ot(i)!==i:!1):!0)}var Ut=function(t){return t===void 0&&(t={}),{name:"autoPlacement",options:t,async fn(e){var n,o,i;let{rects:s,middlewareData:r,placement:c,platform:a,elements:l}=e,{crossAxis:d=!1,alignment:u,allowedPlacements:m=vt,autoAlignment:f=!0,...g}=I(t,e),p=u!==void 0||m===vt?Le(u||null,f,m):m,w=((n=r.autoPlacement)==null?void 0:n.index)||0,h=p[w];if(h==null)return{};if(c!==h)return{reset:{placement:p[0]}};let x=await a.detectOverflow(e,g),y=Ot(h,s,await(a.isRTL==null?void 0:a.isRTL(l.floating))),b=[x[_(h)],x[y[0]],x[y[1]]],O=[...((o=r.autoPlacement)==null?void 0:o.overflows)||[],{placement:h,overflows:b}],A=p[w+1];if(A)return{data:{index:w+1,overflows:O},reset:{placement:A}};let R=O.map(v=>{let L=F(v.placement);return[v.placement,L&&d?v.overflows.slice(0,2).reduce((X,E)=>X+E,0):v.overflows[0],v.overflows]}).sort((v,L)=>v[1]-L[1]),P=((i=R.filter(v=>v[2].slice(0,F(v[0])?2:3).every(L=>L<=0))[0])==null?void 0:i[0])||R[0][0];return P!==c?{data:{index:w+1,overflows:O},reset:{placement:P}}:{}}}},It=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var n,o;let{placement:i,middlewareData:s,rects:r,initialPlacement:c,platform:a,elements:l}=e,{mainAxis:d=!0,crossAxis:u=!0,fallbackPlacements:m,fallbackStrategy:f="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:p=!0,...w}=I(t,e);if((n=s.arrow)!=null&&n.alignmentOffset)return{};let h=_(i),x=H(c),y=_(c)===c,b=await(a.isRTL==null?void 0:a.isRTL(l.floating)),O=m||(y||!p?[it(c)]:$t(c)),A=g!=="none";!m&&A&&O.push(...kt(c,p,g,b));let R=[c,...O],S=await a.detectOverflow(e,w),P=[],v=((o=s.flip)==null?void 0:o.overflows)||[];if(d&&P.push(S[h]),u){let T=Ot(i,r,b);P.push(S[T[0]],S[T[1]])}if(v=[...v,{placement:i,overflows:P}],!P.every(T=>T<=0)){var L,X;let T=(((L=s.flip)==null?void 0:L.index)||0)+1,Y=R[T];if(Y&&(!(u==="alignment"?x!==H(Y):!1)||v.every(D=>H(D.placement)===x?D.overflows[0]>0:!0)))return{data:{index:T,overflows:v},reset:{placement:Y}};let W=(X=v.filter(K=>K.overflows[0]<=0).sort((K,D)=>K.overflows[1]-D.overflows[1])[0])==null?void 0:X.placement;if(!W)switch(f){case"bestFit":{var E;let K=(E=v.filter(D=>{if(A){let z=H(D.placement);return z===x||z==="y"}return!0}).map(D=>[D.placement,D.overflows.filter(z=>z>0).reduce((z,Ae)=>z+Ae,0)]).sort((D,z)=>D[1]-z[1])[0])==null?void 0:E[0];K&&(W=K);break}case"initialPlacement":W=c;break}if(i!==W)return{reset:{placement:W}}}return{}}}};function Bt(t,e){return{top:t.top-e.height,right:t.right-e.width,bottom:t.bottom-e.height,left:t.left-e.width}}function _t(t){return yt.some(e=>t[e]>=0)}var jt=function(t){return t===void 0&&(t={}),{name:"hide",options:t,async fn(e){let{rects:n,platform:o}=e,{strategy:i="referenceHidden",...s}=I(t,e);switch(i){case"referenceHidden":{let r=await o.detectOverflow(e,{...s,elementContext:"reference"}),c=Bt(r,n.reference);return{data:{referenceHiddenOffsets:c,referenceHidden:_t(c)}}}case"escaped":{let r=await o.detectOverflow(e,{...s,altBoundary:!0}),c=Bt(r,n.floating);return{data:{escapedOffsets:c,escaped:_t(c)}}}default:return{}}}}};var Te=new Set(["left","top"]);async function De(t,e){let{placement:n,platform:o,elements:i}=t,s=await(o.isRTL==null?void 0:o.isRTL(i.floating)),r=_(n),c=F(n),a=H(n)==="y",l=Te.has(r)?-1:1,d=s&&a?-1:1,u=I(e,t),{mainAxis:m,crossAxis:f,alignmentAxis:g}=typeof u=="number"?{mainAxis:u,crossAxis:0,alignmentAxis:null}:{mainAxis:u.mainAxis||0,crossAxis:u.crossAxis||0,alignmentAxis:u.alignmentAxis};return c&&typeof g=="number"&&(f=c==="end"?g*-1:g),a?{x:f*d,y:m*l}:{x:m*l,y:f*d}}var Xt=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var n,o;let{x:i,y:s,placement:r,middlewareData:c}=e,a=await De(e,t);return r===((n=c.offset)==null?void 0:n.placement)&&(o=c.arrow)!=null&&o.alignmentOffset?{}:{x:i+a.x,y:s+a.y,data:{...a,placement:r}}}}},Yt=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){let{x:n,y:o,placement:i,platform:s}=e,{mainAxis:r=!0,crossAxis:c=!1,limiter:a={fn:x=>{let{x:y,y:b}=x;return{x:y,y:b}}},...l}=I(t,e),d={x:n,y:o},u=await s.detectOverflow(e,l),m=H(i),f=At(m),g=d[f],p=d[m],w=(x,y)=>bt(y+u[x==="y"?"top":"left"],y,y-u[x==="y"?"bottom":"right"]);r&&(g=w(f,g)),c&&(p=w(m,p));let h=a.fn({...e,[f]:g,[m]:p});return{...h,data:{x:h.x-n,y:h.y-o,enabled:{[f]:r,[m]:c}}}}}};function mt(){return typeof window<"u"}function J(t){return qt(t)?(t.nodeName||"").toLowerCase():"#document"}function C(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function k(t){var e;return(e=(qt(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function qt(t){return mt()?t instanceof Node||t instanceof C(t).Node:!1}function M(t){return mt()?t instanceof Element||t instanceof C(t).Element:!1}function V(t){return mt()?t instanceof HTMLElement||t instanceof C(t).HTMLElement:!1}function Kt(t){return!mt()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof C(t).ShadowRoot}function ct(t){let{overflow:e,overflowX:n,overflowY:o,display:i}=N(t);return/auto|scroll|overlay|hidden|clip/.test(e+o+n)&&i!=="inline"&&i!=="contents"}function Gt(t){return/^(table|td|th)$/.test(J(t))}function lt(t){try{if(t.matches(":popover-open"))return!0}catch{}try{return t.matches(":modal")}catch{return!1}}var Fe=/transform|translate|scale|rotate|perspective|filter/,Me=/paint|layout|strict|content/,G=t=>!!t&&t!=="none",Pt;function tt(t){let e=M(t)?N(t):t;return G(e.transform)||G(e.translate)||G(e.scale)||G(e.rotate)||G(e.perspective)||!gt()&&(G(e.backdropFilter)||G(e.filter))||Fe.test(e.willChange||"")||Me.test(e.contain||"")}function Jt(t){let e=j(t);for(;V(e)&&!et(e);){if(tt(e))return e;if(lt(e))return null;e=j(e)}return null}function gt(){return Pt==null&&(Pt=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Pt}function et(t){return/^(html|body|#document)$/.test(J(t))}function N(t){return C(t).getComputedStyle(t)}function at(t){return M(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function j(t){if(J(t)==="html")return t;let e=t.assignedSlot||t.parentNode||Kt(t)&&t.host||k(t);return Kt(e)?e.host:e}function Qt(t){let e=j(t);return et(e)?(t.ownerDocument||t).body:V(e)&&ct(e)?e:Qt(e)}function Z(t,e,n){var o;e===void 0&&(e=[]),n===void 0&&(n=!0);let i=Qt(t),s=i===((o=t.ownerDocument)==null?void 0:o.body),r=C(i);if(s){let c=ht(r);return e.concat(r,r.visualViewport||[],ct(i)?i:[],c&&n?Z(c):[])}else return e.concat(i,Z(i,[],n))}function ht(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function ee(t){let e=N(t),n=parseFloat(e.width)||0,o=parseFloat(e.height)||0,i=V(t),s=i?t.offsetWidth:n,r=i?t.offsetHeight:o,c=st(n)!==s||st(o)!==r;return c&&(n=s,o=r),{width:n,height:o,$:c}}function St(t){return M(t)?t:t.contextElement}function nt(t){let e=St(t);if(!V(e))return $(1);let n=e.getBoundingClientRect(),{width:o,height:i,$:s}=ee(e),r=(s?st(n.width):n.width)/o,c=(s?st(n.height):n.height)/i;return(!r||!Number.isFinite(r))&&(r=1),(!c||!Number.isFinite(c))&&(c=1),{x:r,y:c}}var Ne=$(0);function ne(t){let e=C(t);return!gt()||!e.visualViewport?Ne:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function $e(t,e,n){return e===void 0&&(e=!1),!!n&&e&&n===C(t)}function Q(t,e,n,o){e===void 0&&(e=!1),n===void 0&&(n=!1);let i=t.getBoundingClientRect(),s=St(t),r=$(1);e&&(o?M(o)&&(r=nt(o)):r=nt(t));let c=$e(s,n,o)?ne(s):$(0),a=(i.left+c.x)/r.x,l=(i.top+c.y)/r.y,d=i.width/r.x,u=i.height/r.y;if(s&&o){let m=C(s),f=M(o)?C(o):o,g=m,p=ht(g);for(;p&&f!==g;){let w=nt(p),h=p.getBoundingClientRect(),x=N(p),y=h.left+(p.clientLeft+parseFloat(x.paddingLeft))*w.x,b=h.top+(p.clientTop+parseFloat(x.paddingTop))*w.y;a*=w.x,l*=w.y,d*=w.x,u*=w.y,a+=y,l+=b,g=C(p),p=ht(g)}}return q({width:d,height:u,x:a,y:l})}function pt(t,e){let n=at(t).scrollLeft;return e?e.left+n:Q(k(t)).left+n}function oe(t,e){let n=t.getBoundingClientRect(),o=n.left+e.scrollLeft-pt(t,n),i=n.top+e.scrollTop;return{x:o,y:i}}function ke(t){let{elements:e,rect:n,offsetParent:o,strategy:i}=t,s=i==="fixed",r=k(o),c=e?lt(e.floating):!1;if(o===r||c&&s)return n;let a={scrollLeft:0,scrollTop:0},l=$(1),d=$(0),u=V(o);if((u||!s)&&((J(o)!=="body"||ct(r))&&(a=at(o)),u)){let f=Q(o);l=nt(o),d.x=f.x+o.clientLeft,d.y=f.y+o.clientTop}let m=r&&!u&&!s?oe(r,a):$(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-a.scrollLeft*l.x+d.x+m.x,y:n.y*l.y-a.scrollTop*l.y+d.y+m.y}}function We(t){return t.getClientRects?Array.from(t.getClientRects()):[]}function Be(t){let e=at(t),n=t.ownerDocument.body,o=B(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),i=B(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight),s=-e.scrollLeft+pt(t),r=-e.scrollTop;return N(n).direction==="rtl"&&(s+=B(t.clientWidth,n.clientWidth)-o),{width:o,height:i,x:s,y:r}}var _e=25;function He(t,e,n){n===void 0&&(n="viewport");let o=n==="layoutViewport",i=C(t),s=k(t),r=i.visualViewport,c=s.clientWidth,a=s.clientHeight,l=0,d=0;if(r){let m=!gt()||e==="fixed";o?m||(l=-r.offsetLeft,d=-r.offsetTop):(c=r.width,a=r.height,m&&(l=r.offsetLeft,d=r.offsetTop))}if(pt(s)<=0){let m=s.ownerDocument,f=m.body,g=getComputedStyle(f),p=m.compatMode==="CSS1Compat"&&parseFloat(g.marginLeft)+parseFloat(g.marginRight)||0,w=Math.abs(s.clientWidth-f.clientWidth-p),h=getComputedStyle(s).scrollbarGutter==="stable both-edges"?w/2:w;h<=_e&&(c-=h)}return{width:c,height:a,x:l,y:d}}function Ve(t,e){let n=Q(t,!0,e==="fixed"),o=n.top+t.clientTop,i=n.left+t.clientLeft,s=nt(t),r=t.clientWidth*s.x,c=t.clientHeight*s.y,a=i*s.x,l=o*s.y;return{width:r,height:c,x:a,y:l}}function Zt(t,e,n){let o;if(e==="viewport"||e==="layoutViewport")o=He(t,n,e);else if(e==="document")o=Be(k(t));else if(M(e))o=Ve(e,n);else{let i=ne(t);o={x:e.x-i.x,y:e.y-i.y,width:e.width,height:e.height}}return q(o)}function ze(t,e){let n=e.get(t);if(n)return n;let o=Z(t,[],!1).filter(c=>M(c)&&J(c)!=="body"),i=null,s=N(t).position==="fixed",r=s?j(t):t;for(;M(r)&&!et(r);){let c=N(r),a=tt(r),l=i?i.position:s?"fixed":"";!a&&(l==="fixed"||l==="absolute"&&c.position==="static")?o=o.filter(u=>u!==r):i=c,r=j(r)}return e.set(t,o),o}function Ue(t){let{element:e,boundary:n,rootBoundary:o,strategy:i}=t,r=[...n==="clippingAncestors"?lt(e)?[]:ze(e,this._c):[].concat(n),o],c=Zt(e,r[0],i),a=c.top,l=c.right,d=c.bottom,u=c.left;for(let m=1;m<r.length;m++){let f=Zt(e,r[m],i);a=B(f.top,a),l=U(f.right,l),d=U(f.bottom,d),u=B(f.left,u)}return{width:l-u,height:d-a,x:u,y:a}}function Ie(t){let{width:e,height:n}=ee(t);return{width:e,height:n}}function je(t,e,n){let o=V(e),i=k(e),s=n==="fixed",r=Q(t,!0,s,e),c={scrollLeft:0,scrollTop:0},a=$(0);if((o||!s)&&((J(e)!=="body"||ct(i))&&(c=at(e)),o)){let m=Q(e,!0,s,e);a.x=m.x+e.clientLeft,a.y=m.y+e.clientTop}!o&&i&&(a.x=pt(i));let l=i&&!o&&!s?oe(i,c):$(0),d=r.left+c.scrollLeft-a.x-l.x,u=r.top+c.scrollTop-a.y-l.y;return{x:d,y:u,width:r.width,height:r.height}}function Ct(t){return N(t).position==="static"}function te(t,e){if(!V(t)||N(t).position==="fixed")return null;if(e)return e(t);let n=t.offsetParent;return k(t)===n&&(n=n.ownerDocument.body),n}function ie(t,e){let n=C(t);if(lt(t))return n;if(!V(t)){let i=j(t);for(;i&&!et(i);){if(M(i)&&!Ct(i))return i;i=j(i)}return n}let o=te(t,e);for(;o&&Gt(o)&&Ct(o);)o=te(o,e);return o&&et(o)&&Ct(o)&&!tt(o)?n:o||Jt(t)||n}var Xe=async function(t){let e=this.getOffsetParent||ie,n=this.getDimensions,o=await n(t.floating);return{reference:je(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function Ye(t){return N(t).direction==="rtl"}var wt={convertOffsetParentRelativeRectToViewportRelativeRect:ke,getDocumentElement:k,getClippingRect:Ue,getOffsetParent:ie,getElementRects:Xe,getClientRects:We,getDimensions:Ie,getScale:nt,isElement:M,isRTL:Ye};function se(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function Ke(t,e,n){let o=null,i,s=k(t);function r(){var d;clearTimeout(i),(d=o)==null||d.disconnect(),o=null}function c(d,u){d===void 0&&(d=!1),u===void 0&&(u=1),r();let m=t.getBoundingClientRect(),{left:f,top:g,width:p,height:w}=m;if(d||e(),!p||!w)return;let h=rt(g),x=rt(s.clientWidth-(f+p)),y=rt(s.clientHeight-(g+w)),b=rt(f),A={rootMargin:-h+"px "+-x+"px "+-y+"px "+-b+"px",threshold:B(0,U(1,u))||1},R=!0;function S(P){let v=P[0].intersectionRatio;if(!se(m,t.getBoundingClientRect()))return c();if(v!==u){if(!R)return c();v?c(!1,v):i=setTimeout(()=>{c(!1,1e-7)},1e3)}R=!1}try{o=new IntersectionObserver(S,{...A,root:s.ownerDocument})}catch{o=new IntersectionObserver(S,A)}o.observe(t)}let a=C(t),l=()=>c(n);return a.addEventListener("resize",l),c(!0),()=>{a.removeEventListener("resize",l),r()}}function re(t,e,n,o){o===void 0&&(o={});let{ancestorScroll:i=!0,ancestorResize:s=!0,elementResize:r=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:a=!1}=o,l=St(t),d=i||s?[...l?Z(l):[],...e?Z(e):[]]:[];d.forEach(h=>{i&&h.addEventListener("scroll",n),s&&h.addEventListener("resize",n)});let u=l&&c?Ke(l,n,s):null,m=-1,f=null;r&&(f=new ResizeObserver(h=>{let[x]=h;x&&x.target===l&&f&&e&&(f.unobserve(e),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var y;(y=f)==null||y.observe(e)})),n()}),l&&!a&&f.observe(l),e&&f.observe(e));let g,p=a?Q(t):null;a&&w();function w(){let h=Q(t);p&&!se(p,h)&&n(),p=h,g=requestAnimationFrame(w)}return n(),()=>{var h;d.forEach(x=>{i&&x.removeEventListener("scroll",n),s&&x.removeEventListener("resize",n)}),u?.(),(h=f)==null||h.disconnect(),f=null,a&&cancelAnimationFrame(g)}}var ce=Xt,le=Ut,ae=Yt,fe=It;var ue=jt,de=zt;var me=(t,e,n)=>{let o=new Map,i=n??{},s={...wt,...i.platform,_c:o};return Vt(t,e,{...i,platform:s})};function ge(t){return qe(t)}function Et(t){return t.assignedSlot?t.assignedSlot:t.parentNode instanceof ShadowRoot?t.parentNode.host:t.parentNode}function qe(t){for(let e=t;e;e=Et(e))if(e instanceof Element&&getComputedStyle(e).display==="none")return null;for(let e=Et(t);e;e=Et(e)){if(!(e instanceof Element))continue;let n=getComputedStyle(e);if(n.display!=="contents"&&(n.position!=="static"||tt(n)||e.tagName==="BODY"))return e}return null}(function(){if(!!1){let e=wt.getOffsetParent;wt.getOffsetParent=n=>e(n,ge)}})();function he(t){let e=window.devicePixelRatio||1;return Math.round(t*e)/e}var ye=(async(t,{arrowEl:e,direction:n,flipDisabled:o,flipPlacements:i,floatingEl:s,offsetDistance:r,offsetSkidding:c,overlayPositioning:a="absolute",placement:l,referenceEl:d,type:u})=>{if(!d||!s)return;let m=n==="rtl",{x:f,y:g,placement:p,strategy:w,middlewareData:h}=await me(d,s,{strategy:a,placement:l==="auto"||l==="auto-start"||l==="auto-end"?void 0:pe(l,m),middleware:Je({placement:l,flipDisabled:o,flipPlacements:i?.map(O=>pe(O,m)),offsetDistance:r,offsetSkidding:c,arrowEl:e,type:u})});if(e&&h.arrow){let{x:O,y:A}=h.arrow,R=p.split("-")[0],S=O!=null?"left":"top",P=tn[R],v={left:"",top:"",bottom:"",right:""};"floatingLayout"in t&&(t.floatingLayout=R==="left"||R==="right"?"horizontal":"vertical"),Object.assign(e.style,{...v,[S]:`${S=="left"?O:A}px`,[R]:"100%",transform:P})}let y=h.hide?.referenceHidden?"hidden":null,b=y?"none":null;s.setAttribute(Ge,p),Object.assign(s.style,{pointerEvents:b,position:w,transform:`translate(${he(f)}px,${he(g)}px)`,visibility:y})}),Ge="data-placement",ve=["top","bottom","right","left","top-start","top-end","bottom-start","bottom-end","right-start","right-end","left-start","left-end","leading","trailing","leading-start","leading-end","trailing-start","trailing-end"],On="bottom-start",Rn="bottom-end",Pn={animation:"calcite-floating-ui-anim",animationActive:"calcite-floating-ui-anim--active"};function Je({placement:t,flipDisabled:e,flipPlacements:n,offsetDistance:o,offsetSkidding:i,arrowEl:s,type:r}){let c="layoutViewport",a=t==="auto"||t==="auto-start"||t==="auto-end",l=[ae({rootBoundary:c})];if(l.push(ce({mainAxis:typeof o=="number"?o:0,crossAxis:typeof i=="number"?i:0})),a&&l.push(le({alignment:t==="auto-start"?"start":t==="auto-end"?"end":null,rootBoundary:c})),!e&&(!a||r==="menu")){let u=r==="menu"?n||["top-start","top","top-end","bottom-start","bottom","bottom-end"]:n;l.push(fe(u?{fallbackPlacements:u,rootBoundary:c}:{rootBoundary:c}))}return s&&l.push(de({element:s})),l.push(ue({rootBoundary:c})),l}function Qe(t){return ve.includes(t)}function Cn(t,e){let n=t.filter(Qe);return n.length!==t.length&&Tt.warn(`${e.tagName}: Invalid value found in: flipPlacements. Try any of these: ${ve.map(o=>`"${o}"`).join(", ").trim()}`,{el:e}),n}function pe(t,e=!1){let n=["left","right"];return e&&n.reverse(),t.replace(/leading/gi,n[0]).replace(/trailing/gi,n[1])}async function Sn(t,e,n=!1){if(!t.open||!e.floatingEl||!e.referenceEl)return;if(Object.assign(e.floatingEl.style,{display:"block",inset:"unset",left:"0",position:e.overlayPositioning??"absolute",top:"0"}),!ft.get(t))return be(t);await(n?Ze(t):ye)(t,e)}function Ze(t){let e=xt.get(t);return e||(e=Dt(ye,Lt.reposition,{edges:["leading","trailing"]}),xt.set(t,e),e)}var tn={top:"",left:"rotate(-90deg)",bottom:"rotate(180deg)",right:"rotate(90deg)"},ft=new WeakMap,xt=new WeakMap;async function be(t){let{referenceEl:e,floatingEl:n}=t;if(!n?.isConnected)return;let o=re;ft.set(t,{state:"pending"});let i,s=o(e,n,()=>{let r=t.reposition();i||(i=r)});return ft.set(t,{state:"active",cleanUp:s}),i}function en(t){let{floatingEl:e}=t;e&&Object.assign(e.style,{display:"",left:"",pointerEvents:"",position:"",top:"",transform:"",visibility:""})}async function En(t){let{floatingEl:e,referenceEl:n}=t;if(en(t),nn(t),!(!e||!n||!t.open))return be(t)}function nn(t){let e=ft.get(t);e?.state==="active"&&e.cleanUp(),ft.delete(t),xt.get(t)?.cancel(),xt.delete(t)}var we=4,Ln=Math.ceil(Math.hypot(we,we));export{On as a,Rn as b,Pn as c,Cn as d,Sn as e,en as f,En as g,nn as h,Ln as i};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{a as i}from"./VOCKM3G2.js";import"./PM5LDKID.js";import{a as v}from"./
|
|
2
|
+
import{a as i}from"./VOCKM3G2.js";import"./PM5LDKID.js";import{a as v}from"./FUO35K5O.js";import{a as g}from"./QIMZFB6Z.js";import{a as m}from"./5EBGPCB7.js";import{a as b}from"./SDK6P3OI.js";import{a as f}from"./K6KDKMG4.js";import"./ZWPNZ5XW.js";import"./TOJL7OC5.js";import"./WPG62KIS.js";import{C as o,D as n,E as d,F as u,L as h,R as p,g as s,h as c,p as r}from"./TNPXVAGH.js";var y={container:"container"},x={search:"search"},k=s`:host{box-sizing:border-box;background-color:var(--calcite-color-foreground-1);color:var(--calcite-color-text-2);font-size:var(--calcite-font-size--1)}:host *{box-sizing:border-box}:host([disabled]){cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-opacity-disabled)}:host([disabled]) *,:host([disabled]) ::slotted(*){pointer-events:none}:host{display:flex;inline-size:100%}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}.container{display:flex;inline-size:100%}:host([scale=s]) .container{padding:var(--calcite-filter-content-space, var(--calcite-spacing-sm))}:host([scale=m]) .container{padding:var(--calcite-filter-content-space, var(--calcite-spacing-md))}:host([scale=l]) .container{padding:var(--calcite-filter-content-space, var(--calcite-spacing-lg))}label{position:relative;margin-block:0px;display:flex;inline-size:100%;align-items:center;overflow:hidden}calcite-input{inline-size:100%;--calcite-input-background-color: var(--calcite-filter-input-background-color);--calcite-input-border-color: var(--calcite-filter-input-border-color);--calcite-input-corner-radius: var(--calcite-filter-input-corner-radius);--calcite-input-shadow: var(--calcite-filter-input-shadow);--calcite-input-icon-color: var(--calcite-filter-input-icon-color);--calcite-input-text-color: var(--calcite-filter-input-text-color);--calcite-input-placeholder-text-color: var(--calcite-filter-input-placeholder-text-color);--calcite-input-actions-background-color: var(--calcite-filter-input-actions-background-color);--calcite-input-actions-background-color-hover: var(--calcite-filter-input-actions-background-color-hover);--calcite-input-actions-background-color-press: var(--calcite-filter-input-actions-background-color-press);--calcite-input-actions-icon-color: var(--calcite-filter-input-actions-icon-color);--calcite-input-actions-icon-color-hover: var(--calcite-filter-input-actions-icon-color-hover);--calcite-input-actions-icon-color-press: var(--calcite-filter-input-actions-icon-color-press)}:host([hidden]){display:none}[hidden]{display:none}`,l=class extends d{constructor(){super(...arguments),this.cancelable=g()(this),this.filterDebounced=m((e,t=!1,a)=>this.updateFiltered(i(this.items??[],e,this.filterProps),t,a),h.filter),this.textInputRef=o(),this._value="",this.messages=b(),this.focusSetter=f()(this),this.interactiveContainer=v(this),this.disabled=!1,this.filteredItems=[],this.items=[],this.scale="m",this.calciteFilterChange=r({cancelable:!1})}static{this.properties={disabled:[7,{},{reflect:!0,type:Boolean}],filterProps:[0,{},{attribute:!1}],filteredItems:[0,{},{attribute:!1}],items:[0,{},{attribute:!1}],label:1,messageOverrides:[0,{},{attribute:!1}],placeholder:1,scale:[3,{},{reflect:!0}],value:1}}static{this.shadowRootOptions={mode:"open",delegatesFocus:!0}}static{this.styles=k}get value(){return this._value}set value(e){let t=this._value;e!==t&&(this._value=e,this.valueHandler(e))}async filter(e=this.value){return new Promise(t=>{this.value=e,this.updateFiltered(i(this.items??[],e,this.filterProps),!1,t)})}async setFocus(e){return this.focusSetter(()=>this.textInputRef.value,e)}connectedCallback(){super.connectedCallback(),this.cancelable.add(this.filterDebounced)}async load(){this.updateFiltered(i(this.items??[],this.value,this.filterProps))}willUpdate(e){(e.has("items")&&(this.hasUpdated||this.items?.length>0)||e.has("filterProps"))&&this.filterDebounced(this.value)}valueHandler(e){this.filterDebounced(e)}inputHandler(e){let t=e.target;this.value=t.value,this.filterDebounced(t.value,!0)}keyDownHandler(e){e.defaultPrevented||(e.key==="Escape"&&this.value.length>0&&(this.clear(),e.preventDefault()),e.key==="Enter"&&e.preventDefault())}clear(){this.value="",this.filterDebounced("",!0),this.setFocus()}updateFiltered(e,t=!1,a){this.filteredItems=e,t&&this.calciteFilterChange.emit(),a?.()}render(){let{disabled:e,scale:t}=this;return this.interactiveContainer({disabled:e,children:c`<div class=${u(y.container)}><label><calcite-input clearable .disabled=${e} .icon=${x.search} .label=${this.label??this.messages.label} .messageOverrides=${{clear:this.messages.clear}} @calciteInputInput=${this.inputHandler} @keydown=${this.keyDownHandler} .placeholder=${this.placeholder} .scale=${t} type=text .value=${this.value} ${n(this.textInputRef)}></calcite-input></label></div>`})}};p("calcite-filter",l);export{l as Filter};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{a as k}from"./
|
|
2
|
+
import{a as k}from"./JPKZCVS7.js";import{a as C}from"./JPQDBGMQ.js";import{c as S}from"./JFHZPHIH.js";import{a as I}from"./DKJI4BME.js";import{a as A}from"./QVHK7LKC.js";import{a as w}from"./FUO35K5O.js";import{a as x}from"./SDK6P3OI.js";import{a as y}from"./K6KDKMG4.js";import"./ZWPNZ5XW.js";import{e as b}from"./TOJL7OC5.js";import{y as v}from"./WPG62KIS.js";import{E as u,F as p,J as f,R as g,g as d,h as o,l as h,p as m}from"./TNPXVAGH.js";var q={itemWrapper:"item-wrapper"},D={validationMessage:"segmentedControlValidationMessage"},$=d`:host([disabled]){cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-opacity-disabled)}:host([disabled]) *,:host([disabled]) ::slotted(*){pointer-events:none}:host{display:flex;flex-direction:column}.item-wrapper{display:flex;background-color:var(--calcite-color-foreground-1);inline-size:fit-content;border-radius:var(--calcite-segmented-control-corner-radius, var(--calcite-corner-radius));outline:1px solid var(--calcite-segmented-control-border-color, var(--calcite-color-border-input));outline-offset:-1px}:host([appearance=outline])>.item-wrapper{background-color:transparent}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}:host([layout=vertical])>.item-wrapper{flex-direction:column;align-items:flex-start;align-self:flex-start}:host([width=full])>.item-wrapper{inline-size:100%;min-inline-size:fit-content}:host([width=full])>.item-wrapper ::slotted(calcite-segmented-control-item){flex:1 1 auto}:host([width=full][layout=vertical])>.item-wrapper ::slotted(calcite-segmented-control-item){justify-content:flex-start}.internal-label-alignment--center{align-items:center}.internal-label-alignment--end{align-items:end}.internal-label--container{display:flex;justify-content:space-between;color:var(--calcite-color-text-1)}.internal-label-required--indicator{font-weight:var(--calcite-font-weight-medium);color:var(--calcite-color-status-danger);padding-inline:var(--calcite-spacing-base)}.internal-label-required--indicator:hover{cursor:help}.internal-label--text{line-height:1}:host([scale=s]) .internal-label-spacing--bottom{margin-block-end:var(--calcite-spacing-xxs)}:host([scale=s]) .internal-label-spacing-inline--end{margin-inline-end:var(--calcite-spacing-sm)}:host([scale=s]) .internal-label-spacing-inline--start{margin-inline-start:var(--calcite-spacing-sm)}:host([scale=s]) .internal-label--text{font-size:var(--calcite-font-size--2)}:host([scale=m]) .internal-label-spacing--bottom{margin-block-end:var(--calcite-spacing-sm)}:host([scale=m]) .internal-label-spacing-inline--end{margin-inline-end:var(--calcite-spacing-sm)}:host([scale=m]) .internal-label-spacing-inline--start{margin-inline-start:var(--calcite-spacing-sm)}:host([scale=m]) .internal-label--text{font-size:var(--calcite-font-size--1)}:host([scale=l]) .internal-label-spacing--bottom{margin-block-end:var(--calcite-spacing-sm)}:host([scale=l]) .internal-label-spacing-inline--end{margin-inline-end:var(--calcite-spacing-md)}:host([scale=l]) .internal-label-spacing-inline--start{margin-inline-start:var(--calcite-spacing-md)}:host([scale=l]) .internal-label--text{font-size:var(--calcite-font-size-0)}.validation-container{display:flex;flex-direction:column;align-items:flex-start;align-self:stretch}:host([scale=m]) .validation-container,:host([scale=l]) .validation-container{padding-block-start:.5rem}:host([scale=s]) .validation-container{padding-block-start:.25rem}:host([hidden]){display:none}[hidden]{display:none}`,c=class extends u{constructor(){super(),this.direction=b(),this.formSupport=S({inputType:"text"})(this),this.items=[],this.messages=x(),this.focusSetter=y()(this),this.interactiveContainer=w(this),this.labelable=A(this),this.appearance="solid",this.disabled=!1,this.layout="horizontal",this.required=!1,this.scale="m",this.status="idle",this.value=null,this.width="auto",this.calciteSegmentedControlChange=m({cancelable:!1}),this.listen("calciteInternalSegmentedControlItemChange",this.handleSelected),this.listen("keydown",this.handleKeyDown),this.listen("click",this.handleClick)}static{this.properties={appearance:[3,{},{reflect:!0}],disabled:[7,{},{reflect:!0,type:Boolean}],form:[3,{},{reflect:!0}],layout:[3,{},{reflect:!0}],labelText:1,messageOverrides:[0,{},{attribute:!1}],name:[3,{},{reflect:!0}],required:[7,{},{reflect:!0,type:Boolean}],scale:[3,{},{reflect:!0}],selectedItem:[0,{},{attribute:!1}],status:[3,{},{reflect:!0}],validationIcon:[3,{converter:f},{reflect:!0}],validationMessage:1,validity:[32,{},{readOnly:!0,attribute:!1}],value:1,width:[3,{},{reflect:!0}]}}static{this.formAssociated=!0}static{this.styles=$}async setFocus(e){return this.focusSetter(()=>this.selectedItem||this.items[0],e)}willUpdate(e){(e.has("appearance")&&(this.hasUpdated||this.appearance!=="solid")||e.has("layout")&&(this.hasUpdated||this.layout!=="horizontal")||e.has("scale")&&(this.hasUpdated||this.scale!=="m"))&&this.handleItemPropChange(),e.has("value")&&(this.hasUpdated||this.value!==null)&&this.valueHandler(this.value),e.has("selectedItem")&&this.handleSelectedItemChange(this.selectedItem,e.get("selectedItem"))}loaded(){this.formSupport.overrideDefaultValue(this.value)}valueHandler(e){let{items:t}=this;t.forEach(a=>a.checked=a.value===e)}handleSelectedItemChange(e,t){if(this.value=e?.value,e===t)return;let{items:a}=this,l=a.filter(s=>s===e).pop();l?this.selectItem(l):a[0]&&(a[0].tabIndex=0)}handleClick(e){this.disabled||e.target.localName==="calcite-segmented-control-item"&&this.selectItem(e.target,!0)}handleSelected(e){e.preventDefault();let t=e.target;t.checked&&this.selectItem(t),e.stopPropagation()}handleKeyDown(e){let t=["ArrowLeft","ArrowUp","ArrowRight","ArrowDown"," "],{key:a}=e,{selectedItem:l}=this;if(t.indexOf(a)===-1)return;let s=a;this.direction==="rtl"&&(a==="ArrowRight"&&(s="ArrowLeft"),a==="ArrowLeft"&&(s="ArrowRight"));let{items:i}=this,n=-1;switch(i.forEach((r,z)=>{r===l&&(n=z)}),s){case"ArrowLeft":case"ArrowUp":{e.preventDefault();let r=n<1?i[i.length-1]:i[n-1];this.selectItem(r,!0);return}case"ArrowRight":case"ArrowDown":{e.preventDefault();let r=n===-1?i[1]:i[n+1]||i[0];this.selectItem(r,!0);return}case" ":e.preventDefault(),this.selectItem(e.target,!0);return;default:return}}handleItemPropChange(){let{items:e}=this;e.forEach(t=>{t.appearance=this.appearance,t.layout=this.layout,t.scale=this.scale})}handleSelectedItem(){let{items:e}=this,t=e.filter(a=>a.checked).pop();t?this.selectItem(t):e[0]&&(e[0].tabIndex=0)}async handleDefaultSlotChange(e){let t=v(e).filter(a=>a.matches("calcite-segmented-control-item"));await Promise.all(t.map(a=>a.componentOnReady())),this.items=t,this.handleSelectedItem(),this.handleItemPropChange()}onLabelClick(){this.setFocus()}async selectItem(e,t=!1){if(e===this.selectedItem)return;let{items:a}=this,l;a.forEach(s=>{let i=s===e;(i&&!s.checked||!i&&s.checked)&&(s.checked=i),s.tabIndex=i?0:-1,i&&(l=s)}),this.selectedItem=l,l&&t&&(await this.updateComplete,this.calciteSegmentedControlChange.emit(),l.focus())}render(){return this.el.role="radiogroup",o`${this.labelText&&C({labelText:this.labelText,onClick:this.onLabelClick,required:this.required,tooltipText:this.messages.required})||""}<div aria-errormessage=${D.validationMessage} aria-label=${I(this)??h} .ariaInvalid=${this.status==="invalid"} .ariaRequired=${this.required} class=${p(q.itemWrapper)}>${this.interactiveContainer({disabled:this.disabled,children:o`<slot @slotchange=${this.handleDefaultSlotChange}></slot>`})}</div>${this.validationMessage&&this.status==="invalid"?k({icon:this.validationIcon,id:D.validationMessage,message:this.validationMessage,scale:this.scale,status:this.status}):null}`}};g("calcite-segmented-control",c);export{c as SegmentedControl};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{a as u}from"./VI7SBYXT.js";import{a as y}from"./
|
|
2
|
+
import{a as u}from"./VI7SBYXT.js";import{a as y}from"./K6KDKMG4.js";import"./ZWPNZ5XW.js";import"./TOJL7OC5.js";import{x as n}from"./WPG62KIS.js";import{C as g,D as m,E as d,F as o,R as v,g as c,h as s,p as h}from"./TNPXVAGH.js";var a={container:"container",containerContent:"container-content",hasProgress:"progress-bar",hide:"hide",primary:"primary",secondary:"secondary",tertiary:"tertiary"},e={logo:"logo",user:"user",progress:"progress",navigationAction:"navigation-action",contentStart:"content-start",contentEnd:"content-end",contentCenter:"content-center",navSecondary:"navigation-secondary",navTertiary:"navigation-tertiary"},p={hamburger:"hamburger"},E=c`:host([hidden]){display:none}[hidden]{display:none}:host{display:block}:host([scale=s]){--calcite-internal-navigation-primary-height: 3rem;--calcite-internal-navigation-secondary-height: 2.25rem;--calcite-internal-navigation-tertiary-height: 2.25rem;--calcite-internal-navigation-navigation-action-margin-inline: 8px}:host([scale=m]){--calcite-internal-navigation-primary-height: 4rem;--calcite-internal-navigation-secondary-height: 3rem;--calcite-internal-navigation-tertiary-height: 3rem;--calcite-internal-navigation-navigation-action-margin-inline: var(--calcite-font-size-sm)}:host([scale=l]){--calcite-internal-navigation-primary-height: 4.75rem;--calcite-internal-navigation-secondary-height: 4rem;--calcite-internal-navigation-tertiary-height: 4rem;--calcite-internal-navigation-navigation-action-margin-inline: var(--calcite-font-size-md)}.container{display:flex;inline-size:100%;flex-direction:column;margin-block:0;margin-inline:auto;background-color:var(--calcite-navigation-background-color, var(--calcite-navigation-background, var(--calcite-color-foreground-1)))}.container.primary,.container.secondary,.container.tertiary{border-block-end:1px solid;border-block-end-color:var(--calcite-navigation-border-color, var(--calcite-color-border-3))}.user,.logo{display:flex}.hide{display:none}.primary{block-size:var(--calcite-internal-navigation-primary-height)}.secondary{block-size:var(--calcite-internal-navigation-secondary-height)}.tertiary{block-size:var(--calcite-internal-navigation-tertiary-height)}.container-content{margin-inline:auto;display:flex;block-size:100%;inline-size:100%;margin-block:0;inline-size:var(--calcite-navigation-width, 100%);max-inline-size:100%}.container-content.progress-bar{margin-block-start:.125rem}slot[name]{display:flex;flex-direction:row}slot[name=navigation-secondary]::slotted(calcite-navigation),slot[name=navigation-tertiary]::slotted(calcite-navigation){inline-size:100%}slot[name=content-start]::slotted(*),slot[name=content-center]::slotted(*),slot[name=content-end]::slotted(*){display:flex;flex-direction:row;align-items:center}slot[name=progress],slot[name=progress] calcite-progress{inset-block-start:0;inset-inline:0}slot[name=content-end]{margin-inline-start:auto}slot[name=content-start]{margin-inline-end:auto}slot[name=content-end],slot[name=logo]~slot[name=user],slot[name=user]:only-child{margin-inline-start:auto}slot[name=content-center]{margin-inline-start:auto;margin-inline-end:auto}slot[name=content-start]~slot[name=content-center]{margin-inline-start:0px}slot[name=content-start]~slot[name=content-end],slot[name=content-center]~slot[name=content-end],slot[name=content-center]~slot[name=user],slot[name=content-end]~slot[name=user]{margin:0}slot[name=navigation-action] calcite-action{align-self:center;margin-inline-start:var(--calcite-internal-navigation-navigation-action-margin-inline)}`,r=class extends d{constructor(){super(...arguments),this.navigationActionRef=g(),this.focusSetter=y()(this),this.mutationObserver=u("mutation",()=>{this.updateNavigationLogo(),this.updateNavigationUser(),this.updateNestedNavigation()}),this.logoSlotHasElements=!1,this.navigationActionSlotHasElements=!1,this.primaryContentCenterSlotHasElements=!1,this.primaryContentEndSlotHasElements=!1,this.primaryContentStartSlotHasElements=!1,this.progressSlotHasElement=!1,this.secondarySlotHasElements=!1,this.tertiarySlotHasElements=!1,this.userSlotHasElements=!1,this.navigationAction=!1,this.scale="m",this.calciteNavigationActionSelect=h({cancelable:!1})}static{this.properties={logoSlotHasElements:[16,{},{state:!0}],navigationActionSlotHasElements:[16,{},{state:!0}],primaryContentCenterSlotHasElements:[16,{},{state:!0}],primaryContentEndSlotHasElements:[16,{},{state:!0}],primaryContentStartSlotHasElements:[16,{},{state:!0}],progressSlotHasElement:[16,{},{state:!0}],secondarySlotHasElements:[16,{},{state:!0}],tertiarySlotHasElements:[16,{},{state:!0}],userSlotHasElements:[16,{},{state:!0}],label:1,navigationAction:[7,{},{reflect:!0,type:Boolean}],scale:[3,{},{reflect:!0}]}}static{this.styles=E}async setFocus(t){return this.focusSetter(()=>this.navigationActionRef.value,t)}connectedCallback(){super.connectedCallback(),this.mutationObserver?.observe(this.el,{childList:!0}),this.updateNavigationLogo(),this.updateNavigationUser(),this.updateNestedNavigation()}updated(t){(t.has("scale")||t.has("logoSlotHasElements")||t.has("userSlotHasElements")||t.has("secondarySlotHasElements")||t.has("tertiarySlotHasElements"))&&(this.updateNavigationLogo(),this.updateNavigationUser(),this.updateNestedNavigation())}disconnectedCallback(){super.disconnectedCallback(),this.mutationObserver?.disconnect()}actionClickHandler(){this.calciteNavigationActionSelect.emit()}handleUserSlotChange(t){this.isPrimaryLevel()&&(this.userSlotHasElements=n(t))}handleLogoSlotChange(t){this.isPrimaryLevel()&&(this.logoSlotHasElements=n(t))}handleContentStartSlotChange(t){this.isPrimaryLevel()&&(this.primaryContentStartSlotHasElements=n(t))}handleContentEndSlotChange(t){this.isPrimaryLevel()&&(this.primaryContentEndSlotHasElements=n(t))}handleContentCenterSlotChange(t){this.isPrimaryLevel()&&(this.primaryContentCenterSlotHasElements=n(t))}handleSecondarySlotChange(t){this.secondarySlotHasElements=n(t)}handleTertiarySlotChange(t){this.tertiarySlotHasElements=n(t)}handleMenuActionSlotChange(t){this.isPrimaryLevel()&&(this.navigationActionSlotHasElements=n(t),this.navigationActionSlotHasElements&&(this.navigationAction=!1))}handleProgressSlotChange(t){this.isPrimaryLevel()&&(this.progressSlotHasElement=n(t))}isPrimaryLevel(){return this.el.slot!==e.navSecondary&&this.el.slot!==e.navTertiary}getOwnedNavigationElements(t,i){let l=this.el.shadowRoot?.querySelector(`slot[name="${t}"]`);return l?l.assignedElements({flatten:!0}).filter(S=>S.matches(i)):[]}updateNavigationLogo(){this.getOwnedNavigationElements(e.logo,"calcite-navigation-logo").forEach(t=>{t.scale=this.scale})}updateNavigationUser(){this.getOwnedNavigationElements(e.user,"calcite-navigation-user").forEach(t=>{t.scale=this.scale})}updateNestedNavigation(){[...this.getOwnedNavigationElements(e.navSecondary,"calcite-navigation"),...this.getOwnedNavigationElements(e.navTertiary,"calcite-navigation")].forEach(i=>{i!==this.el&&(i.scale=this.scale)})}renderMenuAction(){return s`<slot name=${e.navigationAction} @slotchange=${this.handleMenuActionSlotChange}>${this.navigationAction&&s`<calcite-action .icon=${p.hamburger} @click=${this.actionClickHandler} .text=${this.label} ${m(this.navigationActionRef)}></calcite-action>`||""}</slot>`}render(){let t=this.logoSlotHasElements||this.userSlotHasElements||this.navigationActionSlotHasElements||this.primaryContentCenterSlotHasElements||this.primaryContentEndSlotHasElements||this.primaryContentStartSlotHasElements||this.navigationAction,i=this.el.slot;return s`<div class=${o({[a.container]:!0,[a.secondary]:i===e.navSecondary,[a.tertiary]:i===e.navTertiary,[a.primary]:t})}><div class=${o({[a.hide]:!this.progressSlotHasElement,[e.progress]:!0})}><slot name=${e.progress} @slotchange=${this.handleProgressSlotChange}></slot></div><div class=${o({[a.containerContent]:!0,[a.hasProgress]:this.progressSlotHasElement})}>${this.renderMenuAction()}<div class=${o({[a.hide]:!this.logoSlotHasElements,[e.logo]:!0})}><slot name=${e.logo} @slotchange=${this.handleLogoSlotChange}></slot></div><slot name=${e.contentStart} @slotchange=${this.handleContentStartSlotChange}></slot><slot name=${e.contentCenter} @slotchange=${this.handleContentCenterSlotChange}></slot><slot name=${e.contentEnd} @slotchange=${this.handleContentEndSlotChange}></slot><div class=${o({[a.hide]:!this.userSlotHasElements,[e.user]:!0})}><slot name=${e.user} @slotchange=${this.handleUserSlotChange}></slot></div></div></div><slot name=${e.navSecondary} @slotchange=${this.handleSecondarySlotChange}></slot><slot name=${e.navTertiary} @slotchange=${this.handleTertiarySlotChange}></slot>`}};v("calcite-navigation",r);export{r as Navigation};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{a as k}from"./
|
|
2
|
+
import{a as k}from"./JPQDBGMQ.js";import{c as x}from"./JFHZPHIH.js";import{a as f}from"./DKJI4BME.js";import{a as y}from"./QVHK7LKC.js";import{a as m}from"./FUO35K5O.js";import{a as p}from"./YP3AYJH3.js";import{a as u}from"./SDK6P3OI.js";import{a as v}from"./K6KDKMG4.js";import"./ZWPNZ5XW.js";import{e as b}from"./TOJL7OC5.js";import"./WPG62KIS.js";import{C as r,D as n,E as h,F as i,H as a,K as d,R as g,g as s,h as l,i as o,p as t}from"./TNPXVAGH.js";var z={toggle:"toggle",check:"check-svg"},w=s`:host([disabled]){cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-opacity-disabled)}:host([disabled]) *,:host([disabled]) ::slotted(*){pointer-events:none}:host([scale=s]) .check-svg,:host([scale=s]) .toggle{inline-size:var(--calcite-checkbox-size, .75rem);block-size:var(--calcite-checkbox-size, .75rem)}:host([scale=m]) .check-svg,:host([scale=m]) .toggle{inline-size:var(--calcite-checkbox-size, var(--calcite-font-size-relative-base));block-size:var(--calcite-checkbox-size, var(--calcite-font-size-relative-base))}:host([scale=l]) .check-svg,:host([scale=l]) .toggle{inline-size:var(--calcite-checkbox-size, 1rem);block-size:var(--calcite-checkbox-size, 1rem)}:host{position:relative;display:inline-flex;cursor:pointer;-webkit-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent}:host .check-svg{pointer-events:none;box-sizing:border-box;display:block;overflow:hidden;background-color:var(--calcite-color-foreground-1);fill:currentColor;stroke:currentColor;stroke-width:1;transition-property:background-color,block-size,border-color,box-shadow,color,inset-block-end,inset-block-start,inset-inline-end,inset-inline-start,inset-size,opacity,outline-color,transform;transition-duration:var(--calcite-animation-timing);transition-timing-function:ease-in-out;box-shadow:inset 0 0 0 1px var(--calcite-checkbox-border-color, var(--calcite-color-border-input));color:var(--calcite-checkbox-icon-color, var(--calcite-color-background))}:host([status=invalid]:not([checked])) .check-svg{box-shadow:inset 0 0 0 1px var(--calcite-color-status-danger)}:host([status=invalid]:not([checked])) .toggle:hover .check-svg{box-shadow:inset 0 0 0 2px var(--calcite-color-status-danger)}:host([status=invalid]:not([checked])) .toggle:active .check-svg{box-shadow:inset 0 0 0 2px var(--calcite-color-brand-press)}:host([status=invalid]:not([checked])) .toggle:focus{outline:var(--calcite-border-width-md) solid var(--calcite-color-status-danger);outline-offset:calc(var(--calcite-spacing-base) * calc(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}:host([checked]) .check-svg,:host([indeterminate]) .check-svg{background-color:var(--calcite-color-brand);box-shadow:inset 0 0 0 1px var(--calcite-color-brand)}:host([checked]) .toggle:hover .check-svg,:host([indeterminate]) .toggle:hover .check-svg{background-color:var(--calcite-checkbox-border-color-hover, var(--calcite-color-brand-hover))}:host([checked]) .toggle:active .check-svg,:host([indeterminate]) .toggle:active .check-svg{background-color:var(--calcite-checkbox-border-color-press, var(--calcite-color-brand-press));box-shadow:inset 0 0 0 2px var(--calcite-checkbox-border-color-press, var(--calcite-color-brand-press))}:host([hovered]) .toggle .check-svg,:host .toggle:hover .check-svg{box-shadow:inset 0 0 0 2px var(--calcite-checkbox-border-color-hover, var(--calcite-color-brand-hover))}.toggle:active .check-svg{box-shadow:inset 0 0 0 2px var(--calcite-checkbox-border-color-press, var(--calcite-color-brand-press))}.toggle{position:relative;outline-color:transparent}.toggle:active,.toggle:focus,.toggle:focus-visible{outline:var(--calcite-border-width-md) solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)));outline-offset:calc(var(--calcite-spacing-base) * calc(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}.toggle:after,.toggle:before{inset-block-start:50%;inset-inline-start:50%;min-block-size:1.5rem;min-inline-size:1.5rem;position:absolute}.toggle:not(.calcite--rtl):after{content:"";transform:translate(-50%) translateY(-50%)}.toggle.calcite--rtl:before{content:"";transform:translate(50%) translateY(-50%)}@media(forced-colors:active){.check-svg{border:1px solid currentColor}}.internal-label-alignment--center{align-items:center}.internal-label-alignment--end{align-items:end}.internal-label--container{display:flex;justify-content:space-between;color:var(--calcite-color-text-1)}.internal-label-required--indicator{font-weight:var(--calcite-font-weight-medium);color:var(--calcite-color-status-danger);padding-inline:var(--calcite-spacing-base)}.internal-label-required--indicator:hover{cursor:help}.internal-label--text{line-height:1}:host([scale=s]) .internal-label-spacing--bottom{margin-block-end:var(--calcite-spacing-xxs)}:host([scale=s]) .internal-label-spacing-inline--end{margin-inline-end:var(--calcite-spacing-sm)}:host([scale=s]) .internal-label-spacing-inline--start{margin-inline-start:var(--calcite-spacing-sm)}:host([scale=s]) .internal-label--text{font-size:var(--calcite-font-size--2)}:host([scale=m]) .internal-label-spacing--bottom{margin-block-end:var(--calcite-spacing-sm)}:host([scale=m]) .internal-label-spacing-inline--end{margin-inline-end:var(--calcite-spacing-sm)}:host([scale=m]) .internal-label-spacing-inline--start{margin-inline-start:var(--calcite-spacing-sm)}:host([scale=m]) .internal-label--text{font-size:var(--calcite-font-size--1)}:host([scale=l]) .internal-label-spacing--bottom{margin-block-end:var(--calcite-spacing-sm)}:host([scale=l]) .internal-label-spacing-inline--end{margin-inline-end:var(--calcite-spacing-md)}:host([scale=l]) .internal-label-spacing-inline--start{margin-inline-start:var(--calcite-spacing-md)}:host([scale=l]) .internal-label--text{font-size:var(--calcite-font-size-0)}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}:host([hidden]){display:none}[hidden]{display:none}`,c=class extends h{constructor(){super(),this.checkedPath="M5.5 12L2 8.689l.637-.636L5.5 10.727l8.022-7.87.637.637z",this.direction=b(),this.formSupport=x({inputType:"checkbox"})(this),this.indeterminatePath="M13 8v1H3V8z",this.labelable=y(this),this.onLabelClick=()=>{this.toggle()},this.toggleRef=r(),this.messages=u(),this.focusSetter=v()(this),this.interactiveContainer=m(this),this.checked=!1,this.disabled=!1,this.hovered=!1,this.indeterminate=!1,this.required=!1,this.scale="m",this.status="idle",this.calciteCheckboxChange=t({cancelable:!1}),this.calciteInternalCheckboxBlur=t({cancelable:!1}),this.calciteInternalCheckboxFocus=t({cancelable:!1}),this.listen("click",this.clickHandler),this.listen("keydown",this.keyDownHandler)}static{this.properties={checked:[7,{},{reflect:!0,type:Boolean}],disabled:[7,{},{reflect:!0,type:Boolean}],form:[3,{},{reflect:!0}],hovered:[7,{},{reflect:!0,type:Boolean}],indeterminate:[7,{},{reflect:!0,type:Boolean}],label:1,labelText:1,messageOverrides:[0,{},{attribute:!1}],name:[3,{},{reflect:!0}],required:[7,{},{reflect:!0,type:Boolean}],scale:[3,{},{reflect:!0}],status:[3,{},{reflect:!0}],validity:[32,{},{readOnly:!0,attribute:!1}],value:1}}static{this.formAssociated=!0}static{this.styles=w}async setFocus(e){return this.focusSetter(()=>this.toggleRef.value,e)}getPath(){return this.indeterminate?this.indeterminatePath:this.checked?this.checkedPath:""}toggle(){this.disabled||(this.checked=!this.checked,this.setFocus(),this.indeterminate=!1,this.calciteCheckboxChange.emit())}keyDownHandler(e){p(e.key)&&(this.toggle(),e.preventDefault())}clickHandler(){this.toggle()}onToggleBlur(){this.calciteInternalCheckboxBlur.emit(!1)}onToggleFocus(){this.calciteInternalCheckboxFocus.emit(!0)}render(){let e=this.direction==="rtl";return this.interactiveContainer({disabled:this.disabled,children:l`<div .ariaChecked=${this.checked} .ariaLabel=${f(this)} .ariaRequired=${this.required} class=${i({[z.toggle]:!0,[d.rtl]:e})} @blur=${this.onToggleBlur} @focus=${this.onToggleFocus} role=checkbox tabindex=${(this.disabled?void 0:0)??a} ${n(this.toggleRef)}><svg aria-hidden=true class=${i(z.check)} viewBox="0 0 16 16">${o`<path d=${this.getPath()??a} />`}</svg><slot></slot></div>${this.labelText&&k({bottomSpacingDisabled:!0,labelText:this.labelText,required:this.required,spacingInlineStart:!0,tooltipText:this.messages.required})||""}`})}};g("calcite-checkbox",c);export{c as Checkbox};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{b as o}from"./
|
|
2
|
+
import{b as o}from"./TOJL7OC5.js";import{F as r,h as i}from"./TNPXVAGH.js";var l={container:"interaction-container"},d=({children:e,disabled:t})=>i`<div class=${r(l.container)} .inert=${t}>${e}</div>`,k=o((e,t)=>(t.onUpdated(()=>f(e)),d));function u(){let{disabled:e}=this;e||HTMLElement.prototype.click.call(this)}function a(e){e.target.disabled&&e.preventDefault()}var c=["mousedown","mouseup","click"];function s(e){e.target.disabled&&(e.stopImmediatePropagation(),e.preventDefault())}var n={capture:!0};function f(e){if(e.disabled){e.el.setAttribute("aria-disabled","true"),e.el.contains(document.activeElement)&&document.activeElement.blur(),v(e);return}m(e),e.el.removeAttribute("aria-disabled")}function v(e){e.el.click=u,b(e.el)}function b(e){e.addEventListener("pointerdown",a,n),c.forEach(t=>e.addEventListener(t,s,n))}function m(e){delete e.el.click,E(e.el)}function E(e){e.removeEventListener("pointerdown",a,n),c.forEach(t=>e.removeEventListener(t,s,n))}export{k as a};
|