@esri/calcite-components 5.2.0-next.30 → 5.2.0-next.31
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/{DNJWLEZW.js → 275HTM6C.js} +1 -1
- package/dist/cdn/{YIG7OHCG.js → 2DNDO7OS.js} +1 -1
- package/dist/cdn/{VMCOZ3HV.js → 2H7GADY6.js} +1 -1
- package/dist/cdn/{C3WONRU7.js → 2KBNA5VV.js} +1 -1
- package/dist/cdn/{DXNQDJIF.js → 2PB3PUJA.js} +1 -1
- package/dist/cdn/{YVPTOJ5A.js → 2YFHVR5X.js} +1 -1
- package/dist/cdn/{7JP2QDSY.js → 34LKI7AN.js} +1 -1
- package/dist/cdn/{E4TKILOL.js → 34T5T2XB.js} +1 -1
- package/dist/cdn/{UXTQJCNN.js → 3GDCEW2O.js} +1 -1
- package/dist/cdn/{PNWVAEZN.js → 4DQGC5JY.js} +1 -1
- package/dist/cdn/{GL4HAMBI.js → 4XIM5ILC.js} +1 -1
- package/dist/cdn/{OTHJKEUE.js → 554NDE73.js} +1 -1
- package/dist/cdn/{WWITNWC2.js → 5HDPDQLH.js} +1 -1
- package/dist/cdn/{RIRQHOBE.js → 5IPGJCLD.js} +1 -1
- package/dist/cdn/{RW4M5CR6.js → 5JJPS3HK.js} +1 -1
- package/dist/cdn/{OIHVLKPK.js → 5PHIIVOU.js} +1 -1
- package/dist/cdn/{S5NVS4GZ.js → 5RP24S6I.js} +1 -1
- package/dist/cdn/{IAFVBT32.js → 5WA7VCUZ.js} +1 -1
- package/dist/cdn/{KUWM3KH7.js → 5WH4GGFT.js} +1 -1
- package/dist/cdn/{AVCX74DP.js → 5XTVVQ6D.js} +1 -1
- package/dist/cdn/{VLGXJHJZ.js → 62XMTWRN.js} +1 -1
- package/dist/cdn/{ECBRRRYY.js → 6ICS6SMF.js} +1 -1
- package/dist/cdn/{TJUGLK7F.js → 6TS5ZWQ7.js} +1 -1
- package/dist/cdn/{UESRXLZE.js → 6YTP7R4Z.js} +1 -1
- package/dist/cdn/{SVU2DXVH.js → 73LRUXQN.js} +1 -1
- package/dist/cdn/7UDX2IW2.js +2 -0
- package/dist/cdn/{ILOVG2ER.js → 7ZO4IPZP.js} +1 -1
- package/dist/cdn/{FXRJYL3C.js → AGIZ5KII.js} +1 -1
- package/dist/cdn/{JR5WU7IG.js → ASAPFCDE.js} +1 -1
- package/dist/cdn/{LP3TELFB.js → B2S475VC.js} +1 -1
- package/dist/cdn/{ZFAINRBG.js → B32RTCOC.js} +1 -1
- package/dist/cdn/{RIY7L66T.js → B35DWLY3.js} +1 -1
- package/dist/cdn/{N37CYE3C.js → B5SOOORA.js} +1 -1
- package/dist/cdn/{AGDLGJ6L.js → B64U7QND.js} +1 -1
- package/dist/cdn/{76ACXAF3.js → BAG3AJA4.js} +1 -1
- package/dist/cdn/{MXIWNVFP.js → BN3I74NC.js} +1 -1
- package/dist/cdn/{7TZ6KD4O.js → BXPFZXKS.js} +1 -1
- package/dist/cdn/{744ICFOB.js → BXZHLQWU.js} +1 -1
- package/dist/cdn/{GNXXWAUU.js → C7ODFPXC.js} +1 -1
- package/dist/cdn/{WOQEDKPR.js → CIZGCFP6.js} +1 -1
- package/dist/cdn/{A5J4D5E4.js → CN7PTHEB.js} +1 -1
- package/dist/cdn/{7VCES7OE.js → CU7CJFBQ.js} +1 -1
- package/dist/cdn/{UHCJZSPT.js → CXNZFM4C.js} +1 -1
- package/dist/cdn/{WSGPRBXQ.js → D5VAYHIC.js} +1 -1
- package/dist/cdn/{JLVQUTEE.js → DDD32FUC.js} +1 -1
- package/dist/cdn/{7Z4FHAX2.js → DGQGNFWC.js} +1 -1
- package/dist/cdn/{YSMLTX25.js → DM6ECIF2.js} +1 -1
- package/dist/cdn/DMK27J6W.js +2 -0
- package/dist/cdn/{R434GHPA.js → DSZP76JS.js} +1 -1
- package/dist/cdn/{JHYELFTN.js → DX4UNEXL.js} +1 -1
- package/dist/cdn/{GYLPLFN5.js → EBF72GF4.js} +1 -1
- package/dist/cdn/{OUL6IB3V.js → EJ4Q77N6.js} +1 -1
- package/dist/cdn/{GYGYZGV2.js → ESLOUCHV.js} +1 -1
- package/dist/cdn/{HFGCBOA6.js → ETODEMQI.js} +1 -1
- package/dist/cdn/{JWCIDZM4.js → F3AVUHA6.js} +1 -1
- package/dist/cdn/{TIZK2BII.js → FAYBZ4NA.js} +1 -1
- package/dist/cdn/{7HJVRNDA.js → FRJN2MYE.js} +1 -1
- package/dist/cdn/{NFQVM6G3.js → G6JEYMUX.js} +1 -1
- package/dist/cdn/GJYVDQON.js +2 -0
- package/dist/cdn/{O6JGN5I7.js → GL2M4Y47.js} +1 -1
- package/dist/cdn/{KNG2XVTR.js → GOBF5ORA.js} +1 -1
- package/dist/cdn/{OWGPSQUW.js → GSG6GHLN.js} +1 -1
- package/dist/cdn/{SVZ3IFYS.js → GTTVUYZE.js} +1 -1
- package/dist/cdn/{P6VCN6MX.js → GVQVBOVP.js} +1 -1
- package/dist/cdn/{V7E67VOT.js → GVXEBJEW.js} +1 -1
- package/dist/cdn/{KM4ZA4CE.js → GXI7Q6QU.js} +1 -1
- package/dist/cdn/{HYONXP3Q.js → H34AXDQR.js} +1 -1
- package/dist/cdn/{H4KOQ3P3.js → H6J4OSM7.js} +1 -1
- package/dist/cdn/{NYRH26AX.js → HFKP45FH.js} +1 -1
- package/dist/cdn/{P5V7JFB5.js → HIHNZASH.js} +1 -1
- package/dist/cdn/{4F7RPBMC.js → HX5G6PEU.js} +1 -1
- package/dist/cdn/{XVKFFHIM.js → I7VLBVVR.js} +1 -1
- package/dist/cdn/{Y3WHK3EI.js → IA4HJQWG.js} +1 -1
- package/dist/cdn/{FPFNNOM4.js → IJ5EZCER.js} +1 -1
- package/dist/cdn/{G2G2EWKP.js → IKBEV42F.js} +1 -1
- package/dist/cdn/{A3QXPEE3.js → ILFOOTH6.js} +1 -1
- package/dist/cdn/{2TYJA7ZA.js → IRVIPQ7D.js} +1 -1
- package/dist/cdn/{PIRO2BNM.js → IXX32AEN.js} +1 -1
- package/dist/cdn/{WJE5Q74F.js → JFKJED36.js} +1 -1
- package/dist/cdn/{L4JBLHJP.js → JGCDFFLC.js} +1 -1
- package/dist/cdn/{O2TWSKJQ.js → JGO735CO.js} +1 -1
- package/dist/cdn/{QOK4W2DZ.js → JSGT6DCJ.js} +1 -1
- package/dist/cdn/{HHB75VAP.js → JZA7C6P3.js} +1 -1
- package/dist/cdn/{7CNQUYOT.js → K4PSZCHX.js} +1 -1
- package/dist/cdn/{ZM4UKWZJ.js → KCNYR66O.js} +1 -1
- package/dist/cdn/KDQXAYDJ.js +2 -0
- package/dist/cdn/{OTWUFKKP.js → KMRQDEB2.js} +1 -1
- package/dist/cdn/{C67GL2CA.js → LG7NMJYN.js} +1 -1
- package/dist/cdn/{6QWNCW32.js → LPRA3T32.js} +1 -1
- package/dist/cdn/{2Q5EZYJY.js → MIXAK4SX.js} +1 -1
- package/dist/cdn/{WEC4V5A4.js → MQDJHBBP.js} +1 -1
- package/dist/cdn/{TYUT2PCJ.js → N3NMWUPR.js} +1 -1
- package/dist/cdn/{USCBNO6D.js → NEUPWH65.js} +1 -1
- package/dist/cdn/{KQ7JODBH.js → NQY3QGUP.js} +1 -1
- package/dist/cdn/{HQAF5VNB.js → O3ZI5ANT.js} +1 -1
- package/dist/cdn/{FEEM36AX.js → O6SPXDVK.js} +1 -1
- package/dist/cdn/{B4CZNDF3.js → O7NYKDOG.js} +1 -1
- package/dist/cdn/{G2VMVWVC.js → OAT4WOFR.js} +1 -1
- package/dist/cdn/{IPPUJ4XV.js → OHEH32P2.js} +1 -1
- package/dist/cdn/{YVJQNMYJ.js → OIYAOKXL.js} +1 -1
- package/dist/cdn/{KE4B2YVK.js → OMBL5LNO.js} +1 -1
- package/dist/cdn/{TN5VSQFI.js → OSBBG6HI.js} +1 -1
- package/dist/cdn/{UG4WZLVD.js → P2S6K7H4.js} +1 -1
- package/dist/cdn/{BFU36GZX.js → P6CXN7P4.js} +1 -1
- package/dist/cdn/{KLSU556M.js → PCWHJTFI.js} +1 -1
- package/dist/cdn/{L6XXOKYW.js → PUPGDIZ5.js} +1 -1
- package/dist/cdn/{H6W4S4LE.js → QN35D4ON.js} +1 -1
- package/dist/cdn/{QUZYKERC.js → QPZWBDRN.js} +1 -1
- package/dist/cdn/{DQIOK5E6.js → RA3ZTRG2.js} +1 -1
- package/dist/cdn/{XRJY4MG7.js → RT3EYWNV.js} +1 -1
- package/dist/cdn/{V7CTUOE3.js → S5W6RC6X.js} +1 -1
- package/dist/cdn/{I72HA7SW.js → S6KZLK5M.js} +1 -1
- package/dist/cdn/{MQSF7LRG.js → SAW4B7WT.js} +1 -1
- package/dist/cdn/{PX6LQKUI.js → SIGHPEZ7.js} +1 -1
- package/dist/cdn/{I7EE4WLX.js → SIYPKMOX.js} +1 -1
- package/dist/cdn/{MHRIRXTX.js → SKFU336B.js} +1 -1
- package/dist/cdn/{S75DSAHG.js → SRJHFMFP.js} +1 -1
- package/dist/cdn/{UCKR6SFU.js → SRNYDEOY.js} +1 -1
- package/dist/cdn/{YLLHGJB3.js → ST5SCEF4.js} +1 -1
- package/dist/cdn/{KVL67YS2.js → SZHLLS6U.js} +1 -1
- package/dist/cdn/{CIXBCLNA.js → TBX6B7NS.js} +1 -1
- package/dist/cdn/{XCQQISIF.js → TSZKDMVH.js} +1 -1
- package/dist/cdn/{UDBL4JHQ.js → U5K5WQQL.js} +1 -1
- package/dist/cdn/{II6DZIXM.js → URIFYT4D.js} +1 -1
- package/dist/cdn/{2JUKL5RZ.js → UYUBR74C.js} +1 -1
- package/dist/cdn/{HZR6NCWA.js → VLZTSSQW.js} +1 -1
- package/dist/cdn/{B6YEVWZC.js → W64C3RNL.js} +1 -1
- package/dist/cdn/{3AXZKAYQ.js → WBRB2MAG.js} +1 -1
- package/dist/cdn/{3ULD6GMI.js → WKGZT2PG.js} +1 -1
- package/dist/cdn/{WF4T4755.js → WQBBH5FE.js} +1 -1
- package/dist/cdn/{IUPRTI22.js → XHEIS6D3.js} +1 -1
- package/dist/cdn/XKRS7NPC.js +2 -0
- package/dist/cdn/{U4CNMRWE.js → XNTVXLSV.js} +1 -1
- package/dist/cdn/{NNVHBWZN.js → XOGICJGV.js} +1 -1
- package/dist/cdn/{IV6LNHPU.js → XPIK2PAN.js} +1 -1
- package/dist/cdn/{7BMELRUN.js → XZZQRQ65.js} +1 -1
- package/dist/cdn/Y42AXULS.js +2 -0
- package/dist/cdn/{GQQAD4CY.js → YA7ARNQJ.js} +1 -1
- package/dist/cdn/{CBALBCOP.js → YLAZZLRL.js} +1 -1
- package/dist/cdn/{CUZA2JG2.js → YM7MW4ZE.js} +1 -1
- package/dist/cdn/{XZ3AWUYG.js → YUYGZXBT.js} +1 -1
- package/dist/cdn/{DCV7F4JX.js → YWGZAN5R.js} +1 -1
- package/dist/cdn/{3QCZXBFB.js → ZJHYIAS5.js} +1 -1
- package/dist/cdn/{SDSIO47V.js → ZVDNCEBK.js} +1 -1
- package/dist/cdn/{TUU23R4U.js → ZXZ7BCV3.js} +1 -1
- package/dist/cdn/{GPVRWYQF.js → ZYUHSMKB.js} +1 -1
- package/dist/cdn/index.js +1 -1
- package/dist/chunks/ExpandToggle.js +11 -45
- package/dist/chunks/dom.js +23 -23
- package/dist/chunks/manager.js +1 -1
- package/dist/chunks/openCloseComponent.js +1 -1
- package/dist/chunks/resources2.js +10 -14
- package/dist/chunks/resources3.js +17 -9
- package/dist/chunks/runtime.js +4 -4
- 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-accordion-item/customElement.d.ts +5 -1
- package/dist/components/calcite-action/customElement.d.ts +5 -1
- package/dist/components/calcite-action-bar/customElement.d.ts +8 -2
- package/dist/components/calcite-action-bar/customElement.js +252 -55
- package/dist/components/calcite-action-group/customElement.d.ts +14 -1
- package/dist/components/calcite-action-group/customElement.js +61 -51
- package/dist/components/calcite-action-menu/customElement.d.ts +10 -0
- package/dist/components/calcite-action-menu/customElement.js +78 -36
- package/dist/components/calcite-action-pad/customElement.d.ts +5 -1
- package/dist/components/calcite-action-pad/customElement.js +2 -2
- package/dist/components/calcite-alert/customElement.d.ts +5 -1
- package/dist/components/calcite-alert/customElement.js +1 -1
- package/dist/components/calcite-autocomplete/customElement.d.ts +5 -1
- package/dist/components/calcite-avatar/customElement.js +1 -1
- package/dist/components/calcite-block/customElement.d.ts +5 -1
- package/dist/components/calcite-block-group/customElement.js +1 -1
- package/dist/components/calcite-block-section/customElement.d.ts +5 -1
- package/dist/components/calcite-button/customElement.d.ts +5 -1
- package/dist/components/calcite-button/customElement.js +1 -1
- package/dist/components/calcite-card/customElement.d.ts +5 -1
- package/dist/components/calcite-carousel/customElement.d.ts +5 -1
- package/dist/components/calcite-checkbox/customElement.d.ts +5 -1
- package/dist/components/calcite-chip/customElement.d.ts +5 -1
- package/dist/components/calcite-chip/customElement.js +1 -1
- package/dist/components/calcite-color-picker/customElement.d.ts +5 -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.d.ts +5 -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/customElement.d.ts +6 -2
- package/dist/components/calcite-date-picker/customElement.js +27 -5
- package/dist/components/calcite-date-picker-month-header/customElement.js +1 -1
- package/dist/components/calcite-dialog/customElement.d.ts +5 -1
- package/dist/components/calcite-dropdown/customElement.js +1 -1
- package/dist/components/calcite-filter/customElement.d.ts +5 -1
- package/dist/components/calcite-flow-item/customElement.d.ts +5 -1
- package/dist/components/calcite-handle/customElement.d.ts +5 -1
- package/dist/components/calcite-inline-editable/customElement.d.ts +5 -1
- package/dist/components/calcite-input/customElement.d.ts +5 -1
- package/dist/components/calcite-input/customElement.js +1 -1
- package/dist/components/calcite-input-date-picker/customElement.d.ts +5 -1
- package/dist/components/calcite-input-message/customElement.js +1 -1
- package/dist/components/calcite-input-number/customElement.d.ts +5 -1
- package/dist/components/calcite-input-number/customElement.js +1 -1
- package/dist/components/calcite-input-text/customElement.d.ts +5 -1
- package/dist/components/calcite-input-text/customElement.js +1 -1
- package/dist/components/calcite-input-time-picker/customElement.d.ts +5 -1
- package/dist/components/calcite-input-time-zone/customElement.d.ts +5 -1
- package/dist/components/calcite-list/customElement.d.ts +5 -1
- package/dist/components/calcite-list/customElement.js +1 -1
- package/dist/components/calcite-list-item/customElement.d.ts +5 -1
- package/dist/components/calcite-list-item/customElement.js +1 -1
- package/dist/components/calcite-menu/customElement.d.ts +5 -1
- package/dist/components/calcite-menu/customElement.js +1 -1
- package/dist/components/calcite-menu-item/customElement.d.ts +5 -1
- package/dist/components/calcite-meter/customElement.js +1 -1
- package/dist/components/calcite-notice/customElement.d.ts +5 -1
- package/dist/components/calcite-notice/customElement.js +1 -1
- package/dist/components/calcite-pagination/customElement.d.ts +5 -1
- package/dist/components/calcite-panel/customElement.d.ts +5 -1
- package/dist/components/calcite-panel/customElement.js +2 -2
- package/dist/components/calcite-popover/customElement.d.ts +5 -1
- package/dist/components/calcite-radio-button-group/customElement.d.ts +5 -1
- package/dist/components/calcite-rating/customElement.d.ts +5 -1
- package/dist/components/calcite-scrim/customElement.d.ts +5 -1
- package/dist/components/calcite-scrim/customElement.js +1 -1
- package/dist/components/calcite-segmented-control/customElement.d.ts +5 -1
- package/dist/components/calcite-segmented-control-item/customElement.js +1 -1
- package/dist/components/calcite-select/customElement.d.ts +5 -1
- package/dist/components/calcite-sheet/customElement.d.ts +5 -1
- package/dist/components/calcite-shell-panel/customElement.d.ts +5 -1
- package/dist/components/calcite-slider/customElement.d.ts +5 -1
- package/dist/components/calcite-slider/customElement.js +1 -1
- package/dist/components/calcite-sort-handle/customElement.d.ts +5 -1
- package/dist/components/calcite-sortable-list/customElement.js +1 -1
- package/dist/components/calcite-stepper/customElement.d.ts +5 -1
- package/dist/components/calcite-stepper-item/customElement.d.ts +5 -1
- package/dist/components/calcite-stepper-item/customElement.js +1 -1
- package/dist/components/calcite-tab/customElement.js +1 -1
- package/dist/components/calcite-tab-nav/customElement.d.ts +5 -1
- package/dist/components/calcite-tab-nav/customElement.js +1 -1
- package/dist/components/calcite-tab-title/customElement.d.ts +5 -1
- package/dist/components/calcite-tab-title/customElement.js +1 -1
- package/dist/components/calcite-table/customElement.d.ts +5 -1
- package/dist/components/calcite-table-cell/customElement.d.ts +5 -1
- package/dist/components/calcite-table-header/customElement.d.ts +5 -1
- package/dist/components/calcite-table-row/customElement.js +1 -1
- package/dist/components/calcite-tabs/customElement.js +1 -1
- package/dist/components/calcite-text-area/customElement.d.ts +5 -1
- package/dist/components/calcite-time-picker/customElement.d.ts +5 -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/vscode.html-custom-data.json +1 -1
- package/dist/docs/web-types.json +1 -1
- package/dist/loader.js +2 -2
- package/dist/types/lumina.d.ts +2 -0
- package/dist/types/preact.d.ts +2 -0
- package/dist/types/react.d.ts +2 -0
- package/dist/types/stencil.d.ts +2 -0
- package/package.json +2 -2
- package/dist/cdn/B5BPICM5.js +0 -2
- package/dist/cdn/IZ7RXFUG.js +0 -2
- package/dist/cdn/LIAKX4W7.js +0 -2
- package/dist/cdn/RYOYQ7JI.js +0 -2
- package/dist/cdn/U6XLKGTJ.js +0 -2
- package/dist/cdn/VVXGJ5AX.js +0 -2
- /package/dist/cdn/{WXZMRXAK.js → 5IJ25RMA.js} +0 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{j as f}from"./
|
|
2
|
+
import{j as f}from"./5IPGJCLD.js";function m(t,e,n){if(!t)return!1;let r=t.getTime(),a=!(e instanceof Date)||r>=e.getTime(),o=!(n instanceof Date)||r<=n.getTime();return a&&o}function p(t,e,n){if(!(t instanceof Date))return;let r=t.getTime(),a=e instanceof Date&&r<e.getTime(),o=n instanceof Date&&r>n.getTime();return a?e:o?n:t}function O(t,e=!1){if(t instanceof Date)return t;if(!t||typeof t!="string")return;let n=t.split(/[: T-]/).map(parseFloat),r=new Date(n[0],(n[1]||1)-1,n[2]||1);if(r.setFullYear(n[0]),isNaN(r.getTime()))throw new Error(`Invalid ISO 8601 date: "${t}"`);return e?T(r):r}function w(t,e){if(!e)return;let{separator:n}=e,r=y(t,e),{day:a,month:o}=r,s=M(r.year,e),i=new Date(s,o,a);i.setFullYear(s);let c=a>0,u=o>-1,l=!isNaN(i.getTime()),D=t.split(n).filter(h=>h).length>2,d=s.toString().length>0;if(c&&u&&l&&D&&d)return i}function M(t,e){return g(t,e,"read")}function v(t,e){return g(t,e,"write")}function g(t,e,n){if(e["default-calendar"]!=="buddhist")return t;let a=543*(n==="read"?-1:1);return t+a}function F(t,e){let{separator:n,unitOrder:r}=e,a=S(r),o=t.split(n).map(u=>f.delocalize(u)),s=o[a.indexOf("d")],i=o[a.indexOf("m")],c=o[a.indexOf("y")];return{day:s,month:i,year:c}}function I(t){if(t instanceof Date){let e=String(t.getMonth()+1).padStart(2,"0"),n=String(t.getDate()).padStart(2,"0");return`${String(t.getFullYear()).padStart(4,"0")}-${e}-${n}`}return""}function x(t){let e=t.split("-");return{day:e[2],month:e[1],year:e[0]}}function E(t,e){return t instanceof Date&&e instanceof Date&&t.getDate()===e.getDate()&&t.getMonth()===e.getMonth()&&t.getFullYear()===e.getFullYear()}function A(t){let e=t.getMonth(),n=new Date(t);return n.setMonth(e-1),e===n.getMonth()?new Date(t.getFullYear(),e,0):n}function C(t,e){let n=new Date(t);return n.setMonth(e),n}function L(t,e,n){if(!t)return;let r=new Date(t);return r.setDate(1),m(r,e,n)?r:p(r,e,n)}function N(t){let e=t.getMonth(),n=new Date(t);return n.setMonth(e+1),(e+2)%7===n.getMonth()%7?new Date(t.getFullYear(),e+2,0):n}function y(t,e){let{day:n,month:r,year:a}=F(t,e);return{day:parseInt(n,10),month:parseInt(r,10)-1,year:parseInt(a,10)}}function S(t){let e=["d","m","y"],n=t.toLowerCase();return e.sort((r,a)=>n.indexOf(r)-n.indexOf(a))}function R(t,e){let n=t.getTime(),r=e.getTime();return(n-r)/(1e3*3600*24)}function T(t){return t.setHours(23,59,59,999),t}function _(t,e){return!!(t&&e&&t.getMonth()===e.getMonth()&&t.getFullYear()===e.getFullYear())}export{m as a,p as b,O as c,w as d,M as e,v as f,F as g,I as h,x as i,E as j,A as k,C as l,L as m,N as n,S as o,R as p,_ as q};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{a as d}from"./Q24FQVQ4.js";import{a as n}from"./VI7SBYXT.js";import{G as r,H as i,S as c,g as l,h as t,p as o}from"./
|
|
2
|
+
import{a as d}from"./Q24FQVQ4.js";import{a as n}from"./VI7SBYXT.js";import{G as r,H as i,S as c,g as l,h as t,p as o}from"./5RP24S6I.js";var s={title:"title",firstTitle:"first-title",separator:"separator"},h=l`:host{display:block}.container{text-align:start}.title{margin-block-end:-1px;display:block;cursor:default;overflow-wrap:break-word;border-width:0px;font-weight:var(--calcite-font-weight-bold);color:var(--calcite-dropdown-group-title-text-color, var(--calcite-color-text-1))}.separator{display:block;block-size:1px;background-color:var(--calcite-dropdown-group-border-color, var(--calcite-color-border-3))}:host([scale=s]){font-size:var(--calcite-font-size-relative-sm);line-height:var(--calcite-font-line-height-sm)}:host([scale=s]) .title{padding-block:var(--calcite-spacing-xxs);padding-inline:var(--calcite-spacing-sm)}:host([scale=s]) .first-title{padding-block-start:var(--calcite-spacing-sm)}:host([scale=s]) .separator{margin-block:var(--calcite-spacing-xxs);margin-inline:var(--calcite-spacing-sm)}:host([scale=m]){font-size:var(--calcite-font-size-relative-base);line-height:var(--calcite-font-line-height-base)}:host([scale=m]) .title{padding-block:var(--calcite-spacing-sm);padding-inline:var(--calcite-spacing-md)}:host([scale=m]) .first-title{padding-block-start:var(--calcite-spacing-lg)}:host([scale=m]) .separator{margin-block:var(--calcite-spacing-sm);margin-inline:var(--calcite-spacing-md)}:host([scale=l]){font-size:var(--calcite-font-size-relative-md);line-height:var(--calcite-font-line-height-md)}:host([scale=l]) .title{padding-block:var(--calcite-spacing-sm-plus);padding-inline:var(--calcite-spacing-lg)}:host([scale=l]) .first-title{padding-block-start:var(--calcite-spacing-xl)}:host([scale=l]) .separator{margin-block:var(--calcite-spacing-sm-plus);margin-inline:var(--calcite-spacing-lg)}:host([hidden]){display:none}[hidden]{display:none}`,a=class extends r{constructor(){super(),this.mutationObserver=n("mutation",()=>this.updateItems()),this.position=-1,this.scale="m",this.selectionMode="single",this.calciteInternalDropdownItemChange=o({cancelable:!1}),this.listen("calciteInternalDropdownItemSelect",this.updateActiveItemOnChange)}static{this.properties={groupTitle:[3,{},{reflect:!0}],position:[9,{},{type:Number}],scale:[3,{},{reflect:!0}],selectionMode:[3,{},{reflect:!0}]}}static{this.shadowRootOptions={mode:"open",delegatesFocus:!0}}static{this.styles=h}connectedCallback(){super.connectedCallback(),this.updateItems(),this.mutationObserver?.observe(this.el,{childList:!0})}willUpdate(e){e.has("selectionMode")&&(this.hasUpdated||this.selectionMode!=="single")&&this.updateItems()}disconnectedCallback(){super.disconnectedCallback(),this.mutationObserver?.disconnect()}updateActiveItemOnChange(e){this.requestedDropdownGroup=e.detail.requestedDropdownGroup,this.requestedDropdownItem=e.detail.requestedDropdownItem,this.calciteInternalDropdownItemChange.emit({requestedDropdownGroup:this.requestedDropdownGroup,requestedDropdownItem:this.requestedDropdownItem})}updateItems(){Array.from(this.el.querySelectorAll("calcite-dropdown-item")).forEach(e=>e.selectionMode=this.selectionMode)}render(){let e=this.groupTitle?t`<span aria-hidden=true class=${i({[s.title]:!0,[s.firstTitle]:this.position===0})}>${this.groupTitle}</span>`:null,p=this.position>0?t`<div class=${i(s.separator)} role=separator></div>`:null;return this.el.ariaLabel=this.groupTitle??null,this.el.role="group",t`<div class=${i({[d.container]:!0})}>${p}${e}<slot></slot></div>`}};c("calcite-dropdown-group",a);export{a as DropdownGroup};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{a as t,b as z,c as S,d as l}from"./BLWTCPBG.js";import{a as U}from"./XRJY4MG7.js";import{a as K}from"./UG4WZLVD.js";import{b as _}from"./744ICFOB.js";import{a as I}from"./GYGYZGV2.js";import"./YLLHGJB3.js";import{a as R}from"./P6VCN6MX.js";import{a as m}from"./DQIOK5E6.js";import"./5EBGPCB7.js";import{a as P,b as N}from"./VI7SBYXT.js";import{a as M}from"./P5V7JFB5.js";import{c as j}from"./RYOYQ7JI.js";import{a as L}from"./VLGXJHJZ.js";import{a as O}from"./ZWPNZ5XW.js";import"./U4CNMRWE.js";import"./V7CTUOE3.js";import{q as k,r as A,s as h,t as x}from"./QUZYKERC.js";import{E as F,F as E,G as B,H as o,S as D,g as T,h as n,l as y,p as C}from"./S5NVS4GZ.js";var V=T`: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{position:relative;box-sizing:border-box;display:flex;block-size:100%;inline-size:100%;flex:1 1 auto;overflow:hidden;border-radius:var(--calcite-panel-corner-radius, var(--calcite-corner-radius-sharp))}slot[name=alerts]::slotted(calcite-alert){block-size:0}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}:host([scale=s]){--calcite-internal-panel-default-space: var(--calcite-spacing-sm);--calcite-internal-panel-header-vertical-padding: var(--calcite-spacing-sm-plus)}:host([scale=s]) .header-content .heading{font-size:var(--calcite-font-size--1)}:host([scale=s]) .header-content .description{font-size:var(--calcite-font-size--2)}:host([scale=s]) .header-content .icon{margin-inline-end:var(--calcite-spacing-sm)}:host([scale=m]){--calcite-internal-panel-default-space: var(--calcite-spacing-md);--calcite-internal-panel-header-vertical-padding: var(--calcite-spacing-md-plus)}:host([scale=m]) .header-content .heading{font-size:var(--calcite-font-size-0)}:host([scale=m]) .header-content .description{font-size:var(--calcite-font-size--1)}:host([scale=m]) .header-content .icon{margin-inline-end:var(--calcite-spacing-md)}:host(:is([scale=s],[scale=m])){--calcite-internal-panel-action-spacing: var(--calcite-spacing-xxs)}:host([scale=l]){--calcite-internal-panel-action-spacing: var(--calcite-spacing-xs);--calcite-internal-panel-default-space: var(--calcite-spacing-lg);--calcite-internal-panel-header-vertical-padding: var(--calcite-spacing-xl)}:host([scale=l]) .header-content .heading{font-size:var(--calcite-font-size-1)}:host([scale=l]) .header-content .description{font-size:var(--calcite-font-size-0)}:host([scale=l]) .header-content .icon{margin-inline-end:var(--calcite-spacing-lg)}.content-top,.content-bottom{display:flex;align-items:flex-start;align-self:stretch;border-block-start:1px solid var(--calcite-panel-border-color, var(--calcite-color-border-3));background-color:var(--calcite-panel-background-color, var(--calcite-color-foreground-1))}.content-top{padding:var(--calcite-panel-content-top-space, var(--calcite-internal-panel-default-space))}.content-bottom{padding:var(--calcite-panel-content-bottom-space, var(--calcite-internal-panel-default-space))}.container{position:relative;margin:0;display:flex;inline-size:100%;flex:1 1 auto;flex-direction:column;align-items:stretch;overflow:hidden;background-color:var(--calcite-color-background);padding:0;font-size:var(--calcite-font-size-relative-base);color:var(--calcite-color-text-2);transition:max-block-size var(--calcite-animation-timing),inline-size var(--calcite-animation-timing);box-sizing:border-box;font-size:var(--calcite-font-size--1)}.container *{box-sizing:border-box}.header{z-index:var(--calcite-z-index-header);display:flex;flex-direction:column;background-color:var(--calcite-panel-header-background-color, var(--calcite-color-foreground-1));border-block-end:1px solid var(--calcite-panel-border-color, var(--calcite-panel-header-border-block-end, var(--calcite-color-border-3)))}.header-container{display:flex;inline-size:100%;flex-direction:row;align-items:stretch;justify-content:flex-start;flex:0 0 auto}.header-container--border-end{border-block-end:1px solid var(--calcite-panel-border-color, var(--calcite-color-border-3))}.action-bar-container{inline-size:100%}.action-bar-container ::slotted(calcite-action-bar){inline-size:100%}.header-content{display:flex;flex-direction:column;overflow:hidden;padding-inline:.75rem;padding-block:.875rem;margin-inline-end:auto;justify-content:center}.header-content .heading-text-content{flex:1 1 auto;overflow:hidden}.header-content .heading,.header-content .description{display:block;flex:none;overflow-wrap:break-word;padding:0;line-height:var(--calcite-font-line-height-relative-snug)}.header-content .heading{font-weight:var(--calcite-font-weight-medium);color:var(--calcite-panel-heading-text-color, var(--calcite-color-text-1))}.header-content .heading:only-child{margin-block-end:0px}.header-content .description{color:var(--calcite-panel-description-text-color, var(--calcite-color-text-2))}#close,#collapse,calcite-action-menu{--calcite-action-background-color: var(--calcite-panel-header-action-background-color);--calcite-action-background-color-hover: var(--calcite-panel-header-action-background-color-hover);--calcite-action-background-color-press: var(--calcite-panel-header-action-background-color-press);--calcite-action-text-color: var(--calcite-panel-header-action-text-color);--calcite-action-text-color-press: var(--calcite-panel-header-action-text-color-press)}.header-actions{display:flex;flex-direction:row;flex-wrap:nowrap;margin:auto;gap:var(--calcite-internal-panel-action-spacing)}.header-actions--start{margin-inline-start:var(--calcite-internal-panel-action-spacing)}.header-actions--end{margin-inline-end:var(--calcite-internal-panel-action-spacing)}.content-wrapper{position:relative;display:flex;block-size:100%;flex:1 1 auto;flex-direction:column;flex-wrap:nowrap;align-items:stretch;overflow:auto;color:var(--calcite-color-text-2);outline-color:transparent;padding:var(--calcite-panel-space, var(--calcite-panel-content-space, 0));background:var(--calcite-panel-background-color, var(--calcite-color-background))}.content-wrapper: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(calc(-1 * var(--calcite-spacing-base)) * calc(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}.header-content{flex:1 1 auto;justify-content:center;padding-block:var(--calcite-internal-panel-header-vertical-padding);padding-inline:var(--calcite-internal-panel-default-space)}.header-content.header--slotted-content{padding:var(--calcite-panel-header-content-space, var(--calcite-internal-panel-header-vertical-padding) var(--calcite-internal-panel-default-space))}.header-content.header--non-slotted-content{align-items:center;flex-direction:row}.footer{margin-block-start:auto;display:flex;flex-direction:row;align-content:space-between;align-items:center;justify-content:center;font-size:var(--calcite-font-size-relative-sm);line-height:var(--calcite-font-line-height-relative-snug);border-block-start:1px solid var(--calcite-panel-border-color, var(--calcite-color-border-3));padding:var(--calcite-panel-footer-space, var(--calcite-panel-footer-padding, var(--calcite-internal-panel-default-space)));background-color:var(--calcite-panel-footer-background-color, var(--calcite-color-foreground-1))}.footer-content{display:flex;flex:1 1 0%;flex-direction:row;align-items:center;justify-content:center}.footer-start{display:flex;flex:1 1 0%;flex-direction:row;align-items:center;justify-content:flex-start;margin-inline-end:auto;gap:var(--calcite-internal-panel-default-space)}.footer-end{display:flex;flex:1 1 0%;flex-direction:row;align-items:center;justify-content:flex-end;margin-inline-start:auto;gap:var(--calcite-internal-panel-default-space)}.fab-container{position:sticky;inset-block-end:0px;z-index:var(--calcite-z-index-sticky);margin-block:0px;margin-inline:auto;display:block;padding:.5rem;inset-inline:0;inline-size:fit-content}calcite-icon{--calcite-icon-color: var(--calcite-panel-icon-color, var(--calcite-ui-icon-color, var(--calcite-color-text-1)))}:host([hidden]){display:none}[hidden]{display:none}`,w=class extends B{constructor(){super(),this.containerRef=F(),this.resizeObserver=P("resize",()=>this.resizeHandler()),this.messages=M(),this._closed=!1,this.focusSetter=L()(this),this.focusTrapController=U({focusTrapOptions:{allowOutsideClick:!0,escapeDeactivates:e=>(!e.defaultPrevented&&this.closable&&(this.emitCloseEvent(),e.preventDefault()),!1)}})(this),this.interactiveContainer=R(this),this.hasActionBar=!1,this.hasContentBottom=!1,this.hasContentTop=!1,this.hasEndActions=!1,this.hasFab=!1,this.hasFooterContent=!1,this.hasFooterEndContent=!1,this.hasFooterStartContent=!1,this.hasHeaderContent=!1,this.hasHeaderDescription=!1,this.hasHeaderHeading=!1,this.hasMenuItems=!1,this.hasStartActions=!1,this.showHeaderContent=!1,this.closable=!1,this.collapseDirection="down",this.collapsed=!1,this.collapsible=!1,this.disabled=!1,this.iconFlipRtl=!1,this.loading=!1,this.focusTrapEnabled=!1,this.menuOpen=!1,this.menuPlacement=_,this.overlayPositioning="absolute",this.scale="m",this.topLayerDisabled=!1,this.calcitePanelClose=C({cancelable:!0}),this.calcitePanelCollapse=C({cancelable:!1}),this.calcitePanelExpand=C({cancelable:!1}),this.calcitePanelScroll=C({cancelable:!1}),this.calcitePanelToggle=C({cancelable:!1}),this.listen("keydown",this.panelKeyDownHandler),this.listen("calcitePanelClose",this.panelCloseHandler)}static{this.properties={hasActionBar:[16,{},{state:!0}],hasContentBottom:[16,{},{state:!0}],hasContentTop:[16,{},{state:!0}],hasEndActions:[16,{},{state:!0}],hasFab:[16,{},{state:!0}],hasFooterContent:[16,{},{state:!0}],hasFooterEndContent:[16,{},{state:!0}],hasFooterStartContent:[16,{},{state:!0}],hasHeaderContent:[16,{},{state:!0}],hasHeaderDescription:[16,{},{state:!0}],hasHeaderHeading:[16,{},{state:!0}],hasMenuItems:[16,{},{state:!0}],hasStartActions:[16,{},{state:!0}],showHeaderContent:[16,{},{state:!0}],beforeClose:[0,{},{attribute:!1}],closable:[7,{},{reflect:!0,type:Boolean}],closed:[7,{},{reflect:!0,type:Boolean}],collapseDirection:1,collapsed:[7,{},{reflect:!0,type:Boolean}],collapsible:[7,{},{reflect:!0,type:Boolean}],description:1,disabled:[7,{},{reflect:!0,type:Boolean}],heading:1,headingLevel:[11,{},{type:Number,reflect:!0}],icon:[3,{type:String},{reflect:!0}],iconFlipRtl:[7,{},{reflect:!0,type:Boolean}],loading:[7,{},{reflect:!0,type:Boolean}],focusTrapEnabled:[7,{},{reflect:!0,type:Boolean}],focusTrapOptions:[0,{},{attribute:!1}],menuFlipPlacements:[0,{},{attribute:!1}],menuOpen:[7,{},{reflect:!0,type:Boolean}],menuPlacement:[3,{},{reflect:!0}],messageOverrides:[0,{},{attribute:!1}],overlayPositioning:[3,{},{reflect:!0}],scale:[3,{},{reflect:!0}],topLayerDisabled:[7,{},{reflect:!0,type:Boolean}]}}static{this.styles=[K,V]}get closed(){return this._closed}set closed(e){let a=this._closed;e!==a&&this.setClosedState(e)}async scrollContentTo(e){this.panelScrollEl?.scrollTo(e)}async setFocus(e){return this.focusSetter(()=>this.containerRef.value,e)}async updateFocusTrapElements(e){this.focusTrapController.setExtraContainers(e),this.focusTrapController.updateContainerElements()}willUpdate(e){e.has("collapsed")&&this.hasUpdated&&(this.collapsed?this.calcitePanelCollapse.emit():this.calcitePanelExpand.emit())}updated(e){(e.has("focusTrapEnabled")||e.has("closable")||e.has("closed"))&&(!this.closed&&this.closable&&this.focusTrapEnabled?this.focusTrapController.activate():this.focusTrapController.deactivate())}disconnectedCallback(){super.disconnectedCallback(),this.resizeObserver?.disconnect()}focusTrapDisabledOverride(){return!this.focusTrapEnabled||!this.closable||this.closed}async setClosedState(e){if(this.beforeClose&&e)try{await this.beforeClose?.()}catch{return}this._closed=e}resizeHandler(){let{panelScrollEl:e}=this;if(!e||typeof e.scrollHeight!="number"||typeof e.offsetHeight!="number")return;e.scrollHeight>e.offsetHeight?e.setAttribute("tabindex","0"):e.removeAttribute("tabindex")}closeClickHandler(){this.emitCloseEvent()}emitCloseEvent(){this.calcitePanelClose.emit()}panelKeyDownHandler(e){e.key!=="Escape"||e.defaultPrevented||this.closed||!this.closable||(e.preventDefault(),this.emitCloseEvent())}panelCloseHandler(e){e.defaultPrevented||e.target!==this.el||(this.closed=!0)}collapse(){this.collapsed=!this.collapsed,this.calcitePanelToggle.emit()}panelScrollHandler(){this.calcitePanelScroll.emit()}handleHeaderActionsStartSlotChange(e){this.hasStartActions=h(e)}handleHeaderActionsEndSlotChange(e){this.hasEndActions=h(e)}handleHeaderMenuActionsSlotChange(e){this.hasMenuItems=h(e)}handleActionBarSlotChange(e){let a=x(e).filter(i=>i?.matches("calcite-action-bar"));a.forEach(i=>i.layout="horizontal"),this.hasActionBar=!!a.length}handleHeaderContentSlotChange(e){this.hasHeaderContent=h(e)}handleHeaderDescriptionSlotChange(e){this.hasHeaderDescription=A(e)||x(e).some(k)}handleHeaderHeadingSlotChange(e){this.hasHeaderHeading=A(e)||x(e).some(k)}handleFabSlotChange(e){this.hasFab=h(e)}handleFooterEndSlotChange(e){this.hasFooterEndContent=h(e)}handleFooterStartSlotChange(e){this.hasFooterStartContent=h(e)}handleFooterSlotChange(e){this.hasFooterContent=h(e)}contentBottomSlotChangeHandler(e){this.hasContentBottom=h(e)}contentTopSlotChangeHandler(e){this.hasContentTop=h(e)}setPanelScrollEl(e){N(this.resizeObserver,this.panelScrollEl,e),this.panelScrollEl=e}handleAlertsSlotChange(e){x(e)?.map(a=>{a.nodeName==="CALCITE-ALERT"&&(a.embedded=!0)})}renderHeaderContent(){let{heading:e,headingLevel:a,description:i,hasHeaderContent:s,hasHeaderDescription:r,hasHeaderHeading:c,icon:u,scale:d}=this,p=!!e||c,f=!!i||r,g=p||f,v=u?n`<calcite-icon class=${o(t.icon)} .flipRtl=${this.iconFlipRtl} .icon=${u} .scale=${O(d)}></calcite-icon>`:null,b=I({class:t.heading,hidden:!p,level:a,children:n`<slot .hidden=${!c} name=${l.heading} @slotchange=${this.handleHeaderHeadingSlotChange}></slot>${c?null:e}`}),H=n`<span class=${o(t.description)} .hidden=${!f}><slot .hidden=${!r} name=${l.description} @slotchange=${this.handleHeaderDescriptionSlotChange}></slot>${r?null:i}</span>`;return m("header-content",n`<div class=${o({[t.headerContent]:!0,[t.headerNonSlottedContent]:!0})} .hidden=${s||!g}>${v}<div class=${o(t.headingTextContent)}>${b}${H}</div></div>`)}renderActionBar(){return n`<div class=${o(t.actionBarContainer)} .hidden=${!this.hasActionBar}><slot name=${l.actionBar} @slotchange=${this.handleActionBarSlotChange}></slot></div>`}renderHeaderSlottedContent(){return m("slotted-header-content",n`<div class=${o({[t.headerContent]:!0,[t.headerSlottedContent]:!0})} .hidden=${!this.hasHeaderContent}><slot name=${l.headerContent} @slotchange=${this.handleHeaderContentSlotChange}></slot></div>`)}renderHeaderStartActions(){let{hasStartActions:e}=this;return m("header-actions-start",n`<div class=${o({[t.headerActionsStart]:!0,[t.headerActions]:!0})} .hidden=${!e}><slot name=${l.headerActionsStart} @slotchange=${this.handleHeaderActionsStartSlotChange}></slot></div>`)}renderHeaderActionsEnd(){let{hasEndActions:e,messages:a,closable:i,collapsed:s,collapseDirection:r,collapsible:c,hasMenuItems:u}=this,{collapse:d,expand:p,close:f}=a,g=[S.expand,S.collapse];r==="up"&&g.reverse();let v=c?n`<calcite-action .aria=${{expanded:!s}} .icon=${s?g[0]:g[1]} id=${z.collapse} .label=${d} @click=${this.collapse} .scale=${this.scale} .text=${d} title=${(s?p:d)??y}></calcite-action>`:null,b=i?n`<calcite-action .ariaLabel=${f} .icon=${S.close} id=${z.close} @click=${this.closeClickHandler} .scale=${this.scale} .text=${f} title=${f??y}></calcite-action>`:null,H=n`<slot name=${l.headerActionsEnd} @slotchange=${this.handleHeaderActionsEndSlotChange}></slot>`,$=e||v||b||u;return m("header-actions-end",n`<div class=${o({[t.headerActionsEnd]:!0,[t.headerActions]:!0})} .hidden=${!$}>${H}${this.renderMenu()}${v}${b}</div>`)}renderMenu(){let{hasMenuItems:e,messages:a,menuOpen:i,menuFlipPlacements:s,menuPlacement:r,scale:c}=this;return m("menu",n`<calcite-action-menu .flipPlacements=${s??["top","bottom"]} .hidden=${!e} .label=${a.options} .open=${i} .overlayPositioning=${this.overlayPositioning} .placement=${r} .scale=${c} .topLayerDisabled=${this.topLayerDisabled}><calcite-action class=${o(t.menuAction)} .icon=${S.menu} .scale=${c} slot=${j.trigger} .text=${a.options}></calcite-action><slot name=${l.headerMenuActions} @slotchange=${this.handleHeaderMenuActionsSlotChange}></slot></calcite-action-menu>`)}renderHeaderNode(){let{hasHeaderContent:e,hasHeaderDescription:a,hasHeaderHeading:i,hasStartActions:s,hasEndActions:r,closable:c,collapsible:u,hasMenuItems:d,hasActionBar:p,hasContentTop:f,heading:g,description:v}=this,b=this.renderHeaderContent(),$=e||(!!g||!!v||i||a)||s||r||u||c||d||p||f;return this.showHeaderContent=$,n`<header class=${o(t.header)} .hidden=${!($||p||f)}><div class=${o({[t.headerContainer]:!0,[t.headerContainerBorderEnd]:p})} .hidden=${!$}>${this.renderHeaderStartActions()}${this.renderHeaderSlottedContent()}${b}${this.renderHeaderActionsEnd()}</div>${this.renderActionBar()}${this.renderContentTop()}</header>`}renderFooterNode(){let{hasFooterEndContent:e,hasFooterStartContent:a,hasFooterContent:i}=this,s=a||e||i;return n`<footer class=${o(t.footer)} .hidden=${!s}><div class=${o(t.footerContent)} .hidden=${!i}><slot name=${l.footer} @slotchange=${this.handleFooterSlotChange}></slot></div><div class=${o(t.footerStart)} .hidden=${i||!a}><slot name=${l.footerStart} @slotchange=${this.handleFooterStartSlotChange}></slot></div><div class=${o(t.footerEnd)} .hidden=${i||!e}><slot name=${l.footerEnd} @slotchange=${this.handleFooterEndSlotChange}></slot></div></footer>`}renderContent(){return n`<div class=${o(t.contentWrapper)} .hidden=${this.collapsible&&this.collapsed} @scroll=${this.panelScrollHandler} ${E(this.setPanelScrollEl)}><slot></slot>${this.renderFab()}</div>`}renderContentBottom(){return n`<div class=${o(t.contentBottom)} .hidden=${!this.hasContentBottom}><slot name=${l.contentBottom} @slotchange=${this.contentBottomSlotChangeHandler}></slot></div>`}renderContentTop(){return n`<div class=${o(t.contentTop)} .hidden=${!this.hasContentTop}><slot name=${l.contentTop} @slotchange=${this.contentTopSlotChangeHandler}></slot></div>`}renderFab(){return n`<div class=${o(t.fabContainer)} .hidden=${!this.hasFab}><slot name=${l.fab} @slotchange=${this.handleFabSlotChange}></slot></div>`}render(){let{disabled:e,loading:a,closed:i,heading:s,description:r,focusTrapEnabled:c,closable:u}=this,d=c&&u,p=n`<div .ariaBusy=${a} .ariaDescription=${d&&r?r:void 0} .ariaLabel=${d&&s?s:void 0} .ariaLive=${d?"polite":void 0} class=${o(t.container)} .hidden=${i} .role=${d?"dialog":"article"} ${E(this.containerRef)}>${this.renderHeaderNode()}${this.renderContent()}${this.renderContentBottom()}${this.renderFooterNode()}${m("alerts",n`<slot name=${l.alerts} @slotchange=${this.handleAlertsSlotChange}></slot>`)}</div>`;return this.interactiveContainer({disabled:e,children:n`${a?n`<calcite-scrim .loading=${a}></calcite-scrim>`:null}${p}`})}};D("calcite-panel",w);export{w as Panel};
|
|
2
|
+
import{a as t,b as z,c as S,d as l}from"./BLWTCPBG.js";import{a as U}from"./RT3EYWNV.js";import{a as K}from"./P2S6K7H4.js";import{b as _}from"./BXZHLQWU.js";import{a as I}from"./ESLOUCHV.js";import"./ST5SCEF4.js";import{a as R}from"./GVQVBOVP.js";import{a as m}from"./RA3ZTRG2.js";import"./5EBGPCB7.js";import{a as P,b as N}from"./VI7SBYXT.js";import{a as M}from"./HIHNZASH.js";import{c as j}from"./DMK27J6W.js";import{a as L}from"./62XMTWRN.js";import{a as O}from"./ZWPNZ5XW.js";import"./XNTVXLSV.js";import"./S5W6RC6X.js";import{q as k,r as A,s as h,t as x}from"./QPZWBDRN.js";import{E as F,F as E,G as B,H as o,S as D,g as T,h as n,l as y,p as C}from"./5RP24S6I.js";var V=T`: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{position:relative;box-sizing:border-box;display:flex;block-size:100%;inline-size:100%;flex:1 1 auto;overflow:hidden;border-radius:var(--calcite-panel-corner-radius, var(--calcite-corner-radius-sharp))}slot[name=alerts]::slotted(calcite-alert){block-size:0}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}:host([scale=s]){--calcite-internal-panel-default-space: var(--calcite-spacing-sm);--calcite-internal-panel-header-vertical-padding: var(--calcite-spacing-sm-plus)}:host([scale=s]) .header-content .heading{font-size:var(--calcite-font-size--1)}:host([scale=s]) .header-content .description{font-size:var(--calcite-font-size--2)}:host([scale=s]) .header-content .icon{margin-inline-end:var(--calcite-spacing-sm)}:host([scale=m]){--calcite-internal-panel-default-space: var(--calcite-spacing-md);--calcite-internal-panel-header-vertical-padding: var(--calcite-spacing-md-plus)}:host([scale=m]) .header-content .heading{font-size:var(--calcite-font-size-0)}:host([scale=m]) .header-content .description{font-size:var(--calcite-font-size--1)}:host([scale=m]) .header-content .icon{margin-inline-end:var(--calcite-spacing-md)}:host(:is([scale=s],[scale=m])){--calcite-internal-panel-action-spacing: var(--calcite-spacing-xxs)}:host([scale=l]){--calcite-internal-panel-action-spacing: var(--calcite-spacing-xs);--calcite-internal-panel-default-space: var(--calcite-spacing-lg);--calcite-internal-panel-header-vertical-padding: var(--calcite-spacing-xl)}:host([scale=l]) .header-content .heading{font-size:var(--calcite-font-size-1)}:host([scale=l]) .header-content .description{font-size:var(--calcite-font-size-0)}:host([scale=l]) .header-content .icon{margin-inline-end:var(--calcite-spacing-lg)}.content-top,.content-bottom{display:flex;align-items:flex-start;align-self:stretch;border-block-start:1px solid var(--calcite-panel-border-color, var(--calcite-color-border-3));background-color:var(--calcite-panel-background-color, var(--calcite-color-foreground-1))}.content-top{padding:var(--calcite-panel-content-top-space, var(--calcite-internal-panel-default-space))}.content-bottom{padding:var(--calcite-panel-content-bottom-space, var(--calcite-internal-panel-default-space))}.container{position:relative;margin:0;display:flex;inline-size:100%;flex:1 1 auto;flex-direction:column;align-items:stretch;overflow:hidden;background-color:var(--calcite-color-background);padding:0;font-size:var(--calcite-font-size-relative-base);color:var(--calcite-color-text-2);transition:max-block-size var(--calcite-animation-timing),inline-size var(--calcite-animation-timing);box-sizing:border-box;font-size:var(--calcite-font-size--1)}.container *{box-sizing:border-box}.header{z-index:var(--calcite-z-index-header);display:flex;flex-direction:column;background-color:var(--calcite-panel-header-background-color, var(--calcite-color-foreground-1));border-block-end:1px solid var(--calcite-panel-border-color, var(--calcite-panel-header-border-block-end, var(--calcite-color-border-3)))}.header-container{display:flex;inline-size:100%;flex-direction:row;align-items:stretch;justify-content:flex-start;flex:0 0 auto}.header-container--border-end{border-block-end:1px solid var(--calcite-panel-border-color, var(--calcite-color-border-3))}.action-bar-container{inline-size:100%}.action-bar-container ::slotted(calcite-action-bar){inline-size:100%}.header-content{display:flex;flex-direction:column;overflow:hidden;padding-inline:.75rem;padding-block:.875rem;margin-inline-end:auto;justify-content:center}.header-content .heading-text-content{flex:1 1 auto;overflow:hidden}.header-content .heading,.header-content .description{display:block;flex:none;overflow-wrap:break-word;padding:0;line-height:var(--calcite-font-line-height-relative-snug)}.header-content .heading{font-weight:var(--calcite-font-weight-medium);color:var(--calcite-panel-heading-text-color, var(--calcite-color-text-1))}.header-content .heading:only-child{margin-block-end:0px}.header-content .description{color:var(--calcite-panel-description-text-color, var(--calcite-color-text-2))}#close,#collapse,calcite-action-menu{--calcite-action-background-color: var(--calcite-panel-header-action-background-color);--calcite-action-background-color-hover: var(--calcite-panel-header-action-background-color-hover);--calcite-action-background-color-press: var(--calcite-panel-header-action-background-color-press);--calcite-action-text-color: var(--calcite-panel-header-action-text-color);--calcite-action-text-color-press: var(--calcite-panel-header-action-text-color-press)}.header-actions{display:flex;flex-direction:row;flex-wrap:nowrap;margin:auto;gap:var(--calcite-internal-panel-action-spacing)}.header-actions--start{margin-inline-start:var(--calcite-internal-panel-action-spacing)}.header-actions--end{margin-inline-end:var(--calcite-internal-panel-action-spacing)}.content-wrapper{position:relative;display:flex;block-size:100%;flex:1 1 auto;flex-direction:column;flex-wrap:nowrap;align-items:stretch;overflow:auto;color:var(--calcite-color-text-2);outline-color:transparent;padding:var(--calcite-panel-space, var(--calcite-panel-content-space, 0));background:var(--calcite-panel-background-color, var(--calcite-color-background))}.content-wrapper: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(calc(-1 * var(--calcite-spacing-base)) * calc(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}.header-content{flex:1 1 auto;justify-content:center;padding-block:var(--calcite-internal-panel-header-vertical-padding);padding-inline:var(--calcite-internal-panel-default-space)}.header-content.header--slotted-content{padding:var(--calcite-panel-header-content-space, var(--calcite-internal-panel-header-vertical-padding) var(--calcite-internal-panel-default-space))}.header-content.header--non-slotted-content{align-items:center;flex-direction:row}.footer{margin-block-start:auto;display:flex;flex-direction:row;align-content:space-between;align-items:center;justify-content:center;font-size:var(--calcite-font-size-relative-sm);line-height:var(--calcite-font-line-height-relative-snug);border-block-start:1px solid var(--calcite-panel-border-color, var(--calcite-color-border-3));padding:var(--calcite-panel-footer-space, var(--calcite-panel-footer-padding, var(--calcite-internal-panel-default-space)));background-color:var(--calcite-panel-footer-background-color, var(--calcite-color-foreground-1))}.footer-content{display:flex;flex:1 1 0%;flex-direction:row;align-items:center;justify-content:center}.footer-start{display:flex;flex:1 1 0%;flex-direction:row;align-items:center;justify-content:flex-start;margin-inline-end:auto;gap:var(--calcite-internal-panel-default-space)}.footer-end{display:flex;flex:1 1 0%;flex-direction:row;align-items:center;justify-content:flex-end;margin-inline-start:auto;gap:var(--calcite-internal-panel-default-space)}.fab-container{position:sticky;inset-block-end:0px;z-index:var(--calcite-z-index-sticky);margin-block:0px;margin-inline:auto;display:block;padding:.5rem;inset-inline:0;inline-size:fit-content}calcite-icon{--calcite-icon-color: var(--calcite-panel-icon-color, var(--calcite-ui-icon-color, var(--calcite-color-text-1)))}:host([hidden]){display:none}[hidden]{display:none}`,w=class extends B{constructor(){super(),this.containerRef=F(),this.resizeObserver=P("resize",()=>this.resizeHandler()),this.messages=M(),this._closed=!1,this.focusSetter=L()(this),this.focusTrapController=U({focusTrapOptions:{allowOutsideClick:!0,escapeDeactivates:e=>(!e.defaultPrevented&&this.closable&&(this.emitCloseEvent(),e.preventDefault()),!1)}})(this),this.interactiveContainer=R(this),this.hasActionBar=!1,this.hasContentBottom=!1,this.hasContentTop=!1,this.hasEndActions=!1,this.hasFab=!1,this.hasFooterContent=!1,this.hasFooterEndContent=!1,this.hasFooterStartContent=!1,this.hasHeaderContent=!1,this.hasHeaderDescription=!1,this.hasHeaderHeading=!1,this.hasMenuItems=!1,this.hasStartActions=!1,this.showHeaderContent=!1,this.closable=!1,this.collapseDirection="down",this.collapsed=!1,this.collapsible=!1,this.disabled=!1,this.iconFlipRtl=!1,this.loading=!1,this.focusTrapEnabled=!1,this.menuOpen=!1,this.menuPlacement=_,this.overlayPositioning="absolute",this.scale="m",this.topLayerDisabled=!1,this.calcitePanelClose=C({cancelable:!0}),this.calcitePanelCollapse=C({cancelable:!1}),this.calcitePanelExpand=C({cancelable:!1}),this.calcitePanelScroll=C({cancelable:!1}),this.calcitePanelToggle=C({cancelable:!1}),this.listen("keydown",this.panelKeyDownHandler),this.listen("calcitePanelClose",this.panelCloseHandler)}static{this.properties={hasActionBar:[16,{},{state:!0}],hasContentBottom:[16,{},{state:!0}],hasContentTop:[16,{},{state:!0}],hasEndActions:[16,{},{state:!0}],hasFab:[16,{},{state:!0}],hasFooterContent:[16,{},{state:!0}],hasFooterEndContent:[16,{},{state:!0}],hasFooterStartContent:[16,{},{state:!0}],hasHeaderContent:[16,{},{state:!0}],hasHeaderDescription:[16,{},{state:!0}],hasHeaderHeading:[16,{},{state:!0}],hasMenuItems:[16,{},{state:!0}],hasStartActions:[16,{},{state:!0}],showHeaderContent:[16,{},{state:!0}],beforeClose:[0,{},{attribute:!1}],closable:[7,{},{reflect:!0,type:Boolean}],closed:[7,{},{reflect:!0,type:Boolean}],collapseDirection:1,collapsed:[7,{},{reflect:!0,type:Boolean}],collapsible:[7,{},{reflect:!0,type:Boolean}],description:1,disabled:[7,{},{reflect:!0,type:Boolean}],heading:1,headingLevel:[11,{},{type:Number,reflect:!0}],icon:[3,{type:String},{reflect:!0}],iconFlipRtl:[7,{},{reflect:!0,type:Boolean}],loading:[7,{},{reflect:!0,type:Boolean}],focusTrapEnabled:[7,{},{reflect:!0,type:Boolean}],focusTrapOptions:[0,{},{attribute:!1}],menuFlipPlacements:[0,{},{attribute:!1}],menuOpen:[7,{},{reflect:!0,type:Boolean}],menuPlacement:[3,{},{reflect:!0}],messageOverrides:[0,{},{attribute:!1}],overlayPositioning:[3,{},{reflect:!0}],scale:[3,{},{reflect:!0}],topLayerDisabled:[7,{},{reflect:!0,type:Boolean}]}}static{this.styles=[K,V]}get closed(){return this._closed}set closed(e){let a=this._closed;e!==a&&this.setClosedState(e)}async scrollContentTo(e){this.panelScrollEl?.scrollTo(e)}async setFocus(e){return this.focusSetter(()=>this.containerRef.value,e)}async updateFocusTrapElements(e){this.focusTrapController.setExtraContainers(e),this.focusTrapController.updateContainerElements()}willUpdate(e){e.has("collapsed")&&this.hasUpdated&&(this.collapsed?this.calcitePanelCollapse.emit():this.calcitePanelExpand.emit())}updated(e){(e.has("focusTrapEnabled")||e.has("closable")||e.has("closed"))&&(!this.closed&&this.closable&&this.focusTrapEnabled?this.focusTrapController.activate():this.focusTrapController.deactivate())}disconnectedCallback(){super.disconnectedCallback(),this.resizeObserver?.disconnect()}focusTrapDisabledOverride(){return!this.focusTrapEnabled||!this.closable||this.closed}async setClosedState(e){if(this.beforeClose&&e)try{await this.beforeClose?.()}catch{return}this._closed=e}resizeHandler(){let{panelScrollEl:e}=this;if(!e||typeof e.scrollHeight!="number"||typeof e.offsetHeight!="number")return;e.scrollHeight>e.offsetHeight?e.setAttribute("tabindex","0"):e.removeAttribute("tabindex")}closeClickHandler(){this.emitCloseEvent()}emitCloseEvent(){this.calcitePanelClose.emit()}panelKeyDownHandler(e){e.key!=="Escape"||e.defaultPrevented||this.closed||!this.closable||(e.preventDefault(),this.emitCloseEvent())}panelCloseHandler(e){e.defaultPrevented||e.target!==this.el||(this.closed=!0)}collapse(){this.collapsed=!this.collapsed,this.calcitePanelToggle.emit()}panelScrollHandler(){this.calcitePanelScroll.emit()}handleHeaderActionsStartSlotChange(e){this.hasStartActions=h(e)}handleHeaderActionsEndSlotChange(e){this.hasEndActions=h(e)}handleHeaderMenuActionsSlotChange(e){this.hasMenuItems=h(e)}handleActionBarSlotChange(e){let a=x(e).filter(i=>i?.matches("calcite-action-bar"));a.forEach(i=>i.layout="horizontal"),this.hasActionBar=!!a.length}handleHeaderContentSlotChange(e){this.hasHeaderContent=h(e)}handleHeaderDescriptionSlotChange(e){this.hasHeaderDescription=A(e)||x(e).some(k)}handleHeaderHeadingSlotChange(e){this.hasHeaderHeading=A(e)||x(e).some(k)}handleFabSlotChange(e){this.hasFab=h(e)}handleFooterEndSlotChange(e){this.hasFooterEndContent=h(e)}handleFooterStartSlotChange(e){this.hasFooterStartContent=h(e)}handleFooterSlotChange(e){this.hasFooterContent=h(e)}contentBottomSlotChangeHandler(e){this.hasContentBottom=h(e)}contentTopSlotChangeHandler(e){this.hasContentTop=h(e)}setPanelScrollEl(e){N(this.resizeObserver,this.panelScrollEl,e),this.panelScrollEl=e}handleAlertsSlotChange(e){x(e)?.map(a=>{a.nodeName==="CALCITE-ALERT"&&(a.embedded=!0)})}renderHeaderContent(){let{heading:e,headingLevel:a,description:i,hasHeaderContent:s,hasHeaderDescription:r,hasHeaderHeading:c,icon:u,scale:d}=this,p=!!e||c,f=!!i||r,g=p||f,v=u?n`<calcite-icon class=${o(t.icon)} .flipRtl=${this.iconFlipRtl} .icon=${u} .scale=${O(d)}></calcite-icon>`:null,b=I({class:t.heading,hidden:!p,level:a,children:n`<slot .hidden=${!c} name=${l.heading} @slotchange=${this.handleHeaderHeadingSlotChange}></slot>${c?null:e}`}),H=n`<span class=${o(t.description)} .hidden=${!f}><slot .hidden=${!r} name=${l.description} @slotchange=${this.handleHeaderDescriptionSlotChange}></slot>${r?null:i}</span>`;return m("header-content",n`<div class=${o({[t.headerContent]:!0,[t.headerNonSlottedContent]:!0})} .hidden=${s||!g}>${v}<div class=${o(t.headingTextContent)}>${b}${H}</div></div>`)}renderActionBar(){return n`<div class=${o(t.actionBarContainer)} .hidden=${!this.hasActionBar}><slot name=${l.actionBar} @slotchange=${this.handleActionBarSlotChange}></slot></div>`}renderHeaderSlottedContent(){return m("slotted-header-content",n`<div class=${o({[t.headerContent]:!0,[t.headerSlottedContent]:!0})} .hidden=${!this.hasHeaderContent}><slot name=${l.headerContent} @slotchange=${this.handleHeaderContentSlotChange}></slot></div>`)}renderHeaderStartActions(){let{hasStartActions:e}=this;return m("header-actions-start",n`<div class=${o({[t.headerActionsStart]:!0,[t.headerActions]:!0})} .hidden=${!e}><slot name=${l.headerActionsStart} @slotchange=${this.handleHeaderActionsStartSlotChange}></slot></div>`)}renderHeaderActionsEnd(){let{hasEndActions:e,messages:a,closable:i,collapsed:s,collapseDirection:r,collapsible:c,hasMenuItems:u}=this,{collapse:d,expand:p,close:f}=a,g=[S.expand,S.collapse];r==="up"&&g.reverse();let v=c?n`<calcite-action .aria=${{expanded:!s}} .icon=${s?g[0]:g[1]} id=${z.collapse} .label=${d} @click=${this.collapse} .scale=${this.scale} .text=${d} title=${(s?p:d)??y}></calcite-action>`:null,b=i?n`<calcite-action .ariaLabel=${f} .icon=${S.close} id=${z.close} @click=${this.closeClickHandler} .scale=${this.scale} .text=${f} title=${f??y}></calcite-action>`:null,H=n`<slot name=${l.headerActionsEnd} @slotchange=${this.handleHeaderActionsEndSlotChange}></slot>`,$=e||v||b||u;return m("header-actions-end",n`<div class=${o({[t.headerActionsEnd]:!0,[t.headerActions]:!0})} .hidden=${!$}>${H}${this.renderMenu()}${v}${b}</div>`)}renderMenu(){let{hasMenuItems:e,messages:a,menuOpen:i,menuFlipPlacements:s,menuPlacement:r,scale:c}=this;return m("menu",n`<calcite-action-menu .flipPlacements=${s??["top","bottom"]} .hidden=${!e} .label=${a.options} .open=${i} .overlayPositioning=${this.overlayPositioning} .placement=${r} .scale=${c} .topLayerDisabled=${this.topLayerDisabled}><calcite-action class=${o(t.menuAction)} .icon=${S.menu} .scale=${c} slot=${j.trigger} .text=${a.options}></calcite-action><slot name=${l.headerMenuActions} @slotchange=${this.handleHeaderMenuActionsSlotChange}></slot></calcite-action-menu>`)}renderHeaderNode(){let{hasHeaderContent:e,hasHeaderDescription:a,hasHeaderHeading:i,hasStartActions:s,hasEndActions:r,closable:c,collapsible:u,hasMenuItems:d,hasActionBar:p,hasContentTop:f,heading:g,description:v}=this,b=this.renderHeaderContent(),$=e||(!!g||!!v||i||a)||s||r||u||c||d||p||f;return this.showHeaderContent=$,n`<header class=${o(t.header)} .hidden=${!($||p||f)}><div class=${o({[t.headerContainer]:!0,[t.headerContainerBorderEnd]:p})} .hidden=${!$}>${this.renderHeaderStartActions()}${this.renderHeaderSlottedContent()}${b}${this.renderHeaderActionsEnd()}</div>${this.renderActionBar()}${this.renderContentTop()}</header>`}renderFooterNode(){let{hasFooterEndContent:e,hasFooterStartContent:a,hasFooterContent:i}=this,s=a||e||i;return n`<footer class=${o(t.footer)} .hidden=${!s}><div class=${o(t.footerContent)} .hidden=${!i}><slot name=${l.footer} @slotchange=${this.handleFooterSlotChange}></slot></div><div class=${o(t.footerStart)} .hidden=${i||!a}><slot name=${l.footerStart} @slotchange=${this.handleFooterStartSlotChange}></slot></div><div class=${o(t.footerEnd)} .hidden=${i||!e}><slot name=${l.footerEnd} @slotchange=${this.handleFooterEndSlotChange}></slot></div></footer>`}renderContent(){return n`<div class=${o(t.contentWrapper)} .hidden=${this.collapsible&&this.collapsed} @scroll=${this.panelScrollHandler} ${E(this.setPanelScrollEl)}><slot></slot>${this.renderFab()}</div>`}renderContentBottom(){return n`<div class=${o(t.contentBottom)} .hidden=${!this.hasContentBottom}><slot name=${l.contentBottom} @slotchange=${this.contentBottomSlotChangeHandler}></slot></div>`}renderContentTop(){return n`<div class=${o(t.contentTop)} .hidden=${!this.hasContentTop}><slot name=${l.contentTop} @slotchange=${this.contentTopSlotChangeHandler}></slot></div>`}renderFab(){return n`<div class=${o(t.fabContainer)} .hidden=${!this.hasFab}><slot name=${l.fab} @slotchange=${this.handleFabSlotChange}></slot></div>`}render(){let{disabled:e,loading:a,closed:i,heading:s,description:r,focusTrapEnabled:c,closable:u}=this,d=c&&u,p=n`<div .ariaBusy=${a} .ariaDescription=${d&&r?r:void 0} .ariaLabel=${d&&s?s:void 0} .ariaLive=${d?"polite":void 0} class=${o(t.container)} .hidden=${i} .role=${d?"dialog":"article"} ${E(this.containerRef)}>${this.renderHeaderNode()}${this.renderContent()}${this.renderContentBottom()}${this.renderFooterNode()}${m("alerts",n`<slot name=${l.alerts} @slotchange=${this.handleAlertsSlotChange}></slot>`)}</div>`;return this.interactiveContainer({disabled:e,children:n`${a?n`<calcite-scrim .loading=${a}></calcite-scrim>`:null}${p}`})}};D("calcite-panel",w);export{w as Panel};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{a as F}from"./UCKR6SFU.js";import{a as q}from"./KUWM3KH7.js";import{c as O}from"./G2VMVWVC.js";import{a as S}from"./DKJI4BME.js";import{a as T}from"./TJUGLK7F.js";import{a as z}from"./P6VCN6MX.js";import{a as I}from"./T6CCMW7H.js";import{a as C}from"./P5V7JFB5.js";import{a as L}from"./VLGXJHJZ.js";import"./ZWPNZ5XW.js";import"./U4CNMRWE.js";import"./V7CTUOE3.js";import"./QUZYKERC.js";import{D as $,G as x,H as s,I as k,J as c,L as w,S as V,g as f,h as l,p as y}from"./S5NVS4GZ.js";var E=({full:p,scale:e,partial:t})=>l`<calcite-icon class=${s(t?void 0:"icon")} .icon=${p?"star-f":"star"} .scale=${e}></calcite-icon>`,n={fieldSet:"fieldset",star:"star",fraction:"fraction",numberAverage:"number--average",numberCount:"number--count",wrapper:"wrapper",visuallyHidden:"visually-hidden"},A="calcite-ratings",v={validationMessage:"validationMessage",host:p=>`${A}-${p}`},D=f`:host([disabled]){cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-opacity-disabled)}:host([read-only]) *,:host([disabled]) *,:host([read-only]) ::slotted(*),:host([disabled]) ::slotted(*){pointer-events:none}:host{position:relative;display:flex;align-items:center;inline-size:fit-content}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}:host([scale=s]){min-block-size:var(--calcite-space-2xl);--calcite-internal-rating-spacing: .25rem}:host([scale=m]){min-block-size:var(--calcite-space-3xl);--calcite-internal-rating-spacing: .5rem}:host([scale=l]){min-block-size:var(--calcite-space-4xl);--calcite-internal-rating-spacing: .75rem}.fieldset{margin:0;display:flex;border-width:0;padding:0;align-items:center;gap:var(--calcite-rating-spacing, var(--calcite-internal-rating-spacing))}.wrapper{display:inline-block}.star{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;position:relative;display:flex;flex-direction:column;cursor:pointer;color:var(--calcite-rating-color, var(--calcite-color-border-input))}.star:hover{color:var(--calcite-rating-color-hover, var(--calcite-color-brand-hover))}.star:active{color:var(--calcite-rating-color-press, var(--calcite-color-brand-press))}.star:focus{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))))}.average,.fraction{color:var(--calcite-rating-average-color, var(--calcite-color-status-warning))}.hovered,.selected{color:var(--calcite-rating-color, var(--calcite-color-brand))}.fraction{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;position:absolute;pointer-events:none;inset-block-start:0;overflow:hidden;inset-inline-start:0}calcite-chip{pointer-events:none;cursor:default}.number--average{font-weight:700;color:var(--calcite-rating-average-text-color)}.number--count{color:var(--calcite-rating-count-text-color, var(--calcite-color-text-2));font-style:italic}.number--count:not(:first-child){margin-inline-start:var(--calcite-rating-spacing, var(--calcite-internal-rating-spacing))}.visually-hidden{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}.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}::slotted(input[slot=hidden-form-input]){margin:0!important;opacity:0!important;outline:none!important;padding:0!important;position:absolute!important;inset:0!important;transform:none!important;-webkit-appearance:none!important;z-index:-1!important}:host([hidden]){display:none}[hidden]{display:none}`,m=class extends x{constructor(){super(),this.emit=!1,this.formSupport=O({inputType:"number",getValue:()=>this.value===0?"":this.value})(this),this.guid=v.host(I()),this.isKeyboardInteraction=!0,this.labelElements=[],this.max=5,this._value=0,this.messages=C({blocking:!0}),this.focusSetter=L()(this),this.interactiveContainer=z(this),this.labelable=T(this),this.disabled=!1,this.readOnly=!1,this.required=!1,this.scale="m",this.showChip=!1,this.status="idle",this.calciteRatingChange=y({cancelable:!1}),this.listen("keydown",this.handleHostKeyDown),this.listen("pointerout",this.handleRatingPointerOut),this.listen("pointerover",this.handleRatingPointerOver)}static{this.properties={hoverValue:[16,{},{state:!0}],average:[11,{},{reflect:!0,type:Number}],count:[11,{},{reflect:!0,type:Number}],disabled:[7,{},{reflect:!0,type:Boolean}],form:[3,{},{reflect:!0}],labelText:1,messageOverrides:[0,{},{attribute:!1}],name:[3,{},{reflect:!0}],readOnly:[7,{},{reflect:!0,type:Boolean}],required:[7,{},{reflect:!0,type:Boolean}],scale:[3,{},{reflect:!0}],showChip:[7,{},{reflect:!0,type:Boolean}],status:[3,{},{reflect:!0}],validationIcon:[3,{converter:w,type:String},{reflect:!0}],validationMessage:1,validity:[32,{},{readOnly:!0,attribute:!1}],value:[11,{},{reflect:!0,type:Number}]}}static{this.formAssociated=!0}static{this.styles=D}get value(){return this._value}set value(e){let t=this._value;e!==t&&(this._value=e,this.hasUpdated&&this.handleValueUpdate(e))}async setFocus(e){return this.focusSetter(()=>this.el,e)}async load(){this.requestUpdate("value")}willUpdate(){this.starsMap=Array.from({length:this.max},(e,t)=>{let a=t+1,i=this.hoverValue??0,r=i>0,o=this.average!=null,h=this.average??0,g=!r&&o&&!this.value&&a<=h,d=a===this.value,u=o?h+1-a:0,b=r&&a<=i,N=`${this.guid}-${a}`,R=!r&&!this.value&&o&&!b&&u>0&&u<1,M=this.value>=a,P=this.getTabIndex(a);return{average:g,checked:d,fraction:u,hovered:b,id:N,partial:R,selected:M,value:a,tabIndex:P}})}loaded(){this.labelElements=Array.from(this.renderRoot.querySelectorAll("label"))}handleValueUpdate(e){this.hoverValue=e,this.emit&&this.calciteRatingChange.emit(),this.emit=!1}onLabelClick(){this.setFocus()}handleRatingPointerOver(){this.isKeyboardInteraction=!1}handleRatingPointerOut(){this.isKeyboardInteraction=!0,this.hoverValue=void 0}handleHostKeyDown(){this.isKeyboardInteraction=!0}handleLabelKeyDown(e){let t=this.getValueFromLabelEvent(e),a=e.key,i=a==" "?NaN:Number(a);if(this.emit=!0,isNaN(i))switch(a){case"Enter":case" ":this.value=!this.required&&this.value===t?0:t;break;case"ArrowLeft":this.value=this.getPreviousRatingValue(t),this.updateFocus(),e.preventDefault();break;case"ArrowRight":this.value=this.getNextRatingValue(t),this.updateFocus(),e.preventDefault();break;case"Tab":this.hoverValue=void 0;break}else!this.required&&i>=0&&i<=this.max?this.value=i:this.required&&i>0&&i<=this.max&&(this.value=i),this.updateFocus()}handleInputChange(e){if(this.isKeyboardInteraction===!0){let t=Number(e.target.value);this.hoverValue=t,this.value=t}}handleLabelPointerOver(e){this.hoverValue=this.getValueFromLabelEvent(e)}handleLabelPointerDown(e){let t=e.currentTarget,a=this.getValueFromLabelEvent(e);this.hoverValue=a,this.emit=!0,this.value=!this.required&&this.value===a?0:a,t.focus()}handleLabelClick(e){e.preventDefault()}handleLabelFocus(e){let t=this.getValueFromLabelEvent(e);this.hoverValue=t}updateFocus(){this.hoverValue=this.value,this.labelElements[this.value-1]?.focus()}getTabIndex(e){return this.readOnly||this.value!==e&&(this.value||e!==1)?-1:0}getValueFromLabelEvent(e){let t=e.currentTarget;return Number(t.getAttribute("data-value"))}getNextRatingValue(e){return e===5?1:e+1}getPreviousRatingValue(e){return e===1?5:e-1}render(){let e=this.count?.toString();return this.interactiveContainer({disabled:this.disabled,children:l`<span class=${s(n.wrapper)}>${this.labelText&&q({labelText:this.labelText,onClick:this.onLabelClick,required:this.required,tooltipText:this.messages.required})||""}<fieldset class=${s(n.fieldSet)} .disabled=${this.disabled}><legend class=${s(n.visuallyHidden)}>${this.messages.rating}</legend>${this.starsMap.map(({average:t,checked:a,fraction:i,hovered:r,id:o,partial:h,selected:g,value:d,tabIndex:u})=>l`<label class=${s({[n.star]:!0,selected:g,hovered:r,average:t,partial:h})} data-value=${d??c} for=${o??c} @click=${this.handleLabelClick} @focus=${this.handleLabelFocus} @keydown=${this.handleLabelKeyDown} @pointerdown=${this.handleLabelPointerDown} @pointerover=${this.handleLabelPointerOver} tabindex=${u??c}><input aria-errormessage=${v.validationMessage} .ariaInvalid=${this.status==="invalid"} .ariaLabel=${S(this)} .ariaRequired=${this.required} .checked=${a} class=${s(n.visuallyHidden)} .disabled=${this.disabled||this.readOnly} id=${o??c} name=${this.guid??c} @change=${this.handleInputChange} tabindex=-1 type=radio .value=${$(d??"")}>${E({full:g||t||r,scale:this.scale})}${h&&l`<div class=${s(n.fraction)} style=${k({width:`${i*100}%`})}>${E({full:!0,partial:!0,scale:this.scale})}</div>`||""}<span class=${s(n.visuallyHidden)}>${this.messages.stars.replace("{num}",`${d}`)}</span></label>`)}${(this.count||this.average)&&this.showChip?l`<calcite-chip .label=${e} .scale=${this.scale} .value=${e}>${!!this.average&&l`<span class=${s(n.numberAverage)}>${this.average.toString()}</span>`||""}${!!this.count&&l`<span class=${s(n.numberCount)}>(${e})</span>`||""}</calcite-chip>`:null}</fieldset>${this.validationMessage&&this.status==="invalid"?F({icon:this.validationIcon,id:v.validationMessage,message:this.validationMessage,scale:this.scale,status:this.status}):null}</span>`})}};V("calcite-rating",m);export{m as Rating};
|
|
2
|
+
import{a as F}from"./SRNYDEOY.js";import{a as q}from"./5WH4GGFT.js";import{c as O}from"./OAT4WOFR.js";import{a as S}from"./DKJI4BME.js";import{a as T}from"./6TS5ZWQ7.js";import{a as z}from"./GVQVBOVP.js";import{a as I}from"./T6CCMW7H.js";import{a as C}from"./HIHNZASH.js";import{a as L}from"./62XMTWRN.js";import"./ZWPNZ5XW.js";import"./XNTVXLSV.js";import"./S5W6RC6X.js";import"./QPZWBDRN.js";import{D as $,G as x,H as s,I as k,J as c,L as w,S as V,g as f,h as l,p as y}from"./5RP24S6I.js";var E=({full:p,scale:e,partial:t})=>l`<calcite-icon class=${s(t?void 0:"icon")} .icon=${p?"star-f":"star"} .scale=${e}></calcite-icon>`,n={fieldSet:"fieldset",star:"star",fraction:"fraction",numberAverage:"number--average",numberCount:"number--count",wrapper:"wrapper",visuallyHidden:"visually-hidden"},A="calcite-ratings",v={validationMessage:"validationMessage",host:p=>`${A}-${p}`},D=f`:host([disabled]){cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-opacity-disabled)}:host([read-only]) *,:host([disabled]) *,:host([read-only]) ::slotted(*),:host([disabled]) ::slotted(*){pointer-events:none}:host{position:relative;display:flex;align-items:center;inline-size:fit-content}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}:host([scale=s]){min-block-size:var(--calcite-space-2xl);--calcite-internal-rating-spacing: .25rem}:host([scale=m]){min-block-size:var(--calcite-space-3xl);--calcite-internal-rating-spacing: .5rem}:host([scale=l]){min-block-size:var(--calcite-space-4xl);--calcite-internal-rating-spacing: .75rem}.fieldset{margin:0;display:flex;border-width:0;padding:0;align-items:center;gap:var(--calcite-rating-spacing, var(--calcite-internal-rating-spacing))}.wrapper{display:inline-block}.star{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;position:relative;display:flex;flex-direction:column;cursor:pointer;color:var(--calcite-rating-color, var(--calcite-color-border-input))}.star:hover{color:var(--calcite-rating-color-hover, var(--calcite-color-brand-hover))}.star:active{color:var(--calcite-rating-color-press, var(--calcite-color-brand-press))}.star:focus{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))))}.average,.fraction{color:var(--calcite-rating-average-color, var(--calcite-color-status-warning))}.hovered,.selected{color:var(--calcite-rating-color, var(--calcite-color-brand))}.fraction{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;position:absolute;pointer-events:none;inset-block-start:0;overflow:hidden;inset-inline-start:0}calcite-chip{pointer-events:none;cursor:default}.number--average{font-weight:700;color:var(--calcite-rating-average-text-color)}.number--count{color:var(--calcite-rating-count-text-color, var(--calcite-color-text-2));font-style:italic}.number--count:not(:first-child){margin-inline-start:var(--calcite-rating-spacing, var(--calcite-internal-rating-spacing))}.visually-hidden{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}.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}::slotted(input[slot=hidden-form-input]){margin:0!important;opacity:0!important;outline:none!important;padding:0!important;position:absolute!important;inset:0!important;transform:none!important;-webkit-appearance:none!important;z-index:-1!important}:host([hidden]){display:none}[hidden]{display:none}`,m=class extends x{constructor(){super(),this.emit=!1,this.formSupport=O({inputType:"number",getValue:()=>this.value===0?"":this.value})(this),this.guid=v.host(I()),this.isKeyboardInteraction=!0,this.labelElements=[],this.max=5,this._value=0,this.messages=C({blocking:!0}),this.focusSetter=L()(this),this.interactiveContainer=z(this),this.labelable=T(this),this.disabled=!1,this.readOnly=!1,this.required=!1,this.scale="m",this.showChip=!1,this.status="idle",this.calciteRatingChange=y({cancelable:!1}),this.listen("keydown",this.handleHostKeyDown),this.listen("pointerout",this.handleRatingPointerOut),this.listen("pointerover",this.handleRatingPointerOver)}static{this.properties={hoverValue:[16,{},{state:!0}],average:[11,{},{reflect:!0,type:Number}],count:[11,{},{reflect:!0,type:Number}],disabled:[7,{},{reflect:!0,type:Boolean}],form:[3,{},{reflect:!0}],labelText:1,messageOverrides:[0,{},{attribute:!1}],name:[3,{},{reflect:!0}],readOnly:[7,{},{reflect:!0,type:Boolean}],required:[7,{},{reflect:!0,type:Boolean}],scale:[3,{},{reflect:!0}],showChip:[7,{},{reflect:!0,type:Boolean}],status:[3,{},{reflect:!0}],validationIcon:[3,{converter:w,type:String},{reflect:!0}],validationMessage:1,validity:[32,{},{readOnly:!0,attribute:!1}],value:[11,{},{reflect:!0,type:Number}]}}static{this.formAssociated=!0}static{this.styles=D}get value(){return this._value}set value(e){let t=this._value;e!==t&&(this._value=e,this.hasUpdated&&this.handleValueUpdate(e))}async setFocus(e){return this.focusSetter(()=>this.el,e)}async load(){this.requestUpdate("value")}willUpdate(){this.starsMap=Array.from({length:this.max},(e,t)=>{let a=t+1,i=this.hoverValue??0,r=i>0,o=this.average!=null,h=this.average??0,g=!r&&o&&!this.value&&a<=h,d=a===this.value,u=o?h+1-a:0,b=r&&a<=i,N=`${this.guid}-${a}`,R=!r&&!this.value&&o&&!b&&u>0&&u<1,M=this.value>=a,P=this.getTabIndex(a);return{average:g,checked:d,fraction:u,hovered:b,id:N,partial:R,selected:M,value:a,tabIndex:P}})}loaded(){this.labelElements=Array.from(this.renderRoot.querySelectorAll("label"))}handleValueUpdate(e){this.hoverValue=e,this.emit&&this.calciteRatingChange.emit(),this.emit=!1}onLabelClick(){this.setFocus()}handleRatingPointerOver(){this.isKeyboardInteraction=!1}handleRatingPointerOut(){this.isKeyboardInteraction=!0,this.hoverValue=void 0}handleHostKeyDown(){this.isKeyboardInteraction=!0}handleLabelKeyDown(e){let t=this.getValueFromLabelEvent(e),a=e.key,i=a==" "?NaN:Number(a);if(this.emit=!0,isNaN(i))switch(a){case"Enter":case" ":this.value=!this.required&&this.value===t?0:t;break;case"ArrowLeft":this.value=this.getPreviousRatingValue(t),this.updateFocus(),e.preventDefault();break;case"ArrowRight":this.value=this.getNextRatingValue(t),this.updateFocus(),e.preventDefault();break;case"Tab":this.hoverValue=void 0;break}else!this.required&&i>=0&&i<=this.max?this.value=i:this.required&&i>0&&i<=this.max&&(this.value=i),this.updateFocus()}handleInputChange(e){if(this.isKeyboardInteraction===!0){let t=Number(e.target.value);this.hoverValue=t,this.value=t}}handleLabelPointerOver(e){this.hoverValue=this.getValueFromLabelEvent(e)}handleLabelPointerDown(e){let t=e.currentTarget,a=this.getValueFromLabelEvent(e);this.hoverValue=a,this.emit=!0,this.value=!this.required&&this.value===a?0:a,t.focus()}handleLabelClick(e){e.preventDefault()}handleLabelFocus(e){let t=this.getValueFromLabelEvent(e);this.hoverValue=t}updateFocus(){this.hoverValue=this.value,this.labelElements[this.value-1]?.focus()}getTabIndex(e){return this.readOnly||this.value!==e&&(this.value||e!==1)?-1:0}getValueFromLabelEvent(e){let t=e.currentTarget;return Number(t.getAttribute("data-value"))}getNextRatingValue(e){return e===5?1:e+1}getPreviousRatingValue(e){return e===1?5:e-1}render(){let e=this.count?.toString();return this.interactiveContainer({disabled:this.disabled,children:l`<span class=${s(n.wrapper)}>${this.labelText&&q({labelText:this.labelText,onClick:this.onLabelClick,required:this.required,tooltipText:this.messages.required})||""}<fieldset class=${s(n.fieldSet)} .disabled=${this.disabled}><legend class=${s(n.visuallyHidden)}>${this.messages.rating}</legend>${this.starsMap.map(({average:t,checked:a,fraction:i,hovered:r,id:o,partial:h,selected:g,value:d,tabIndex:u})=>l`<label class=${s({[n.star]:!0,selected:g,hovered:r,average:t,partial:h})} data-value=${d??c} for=${o??c} @click=${this.handleLabelClick} @focus=${this.handleLabelFocus} @keydown=${this.handleLabelKeyDown} @pointerdown=${this.handleLabelPointerDown} @pointerover=${this.handleLabelPointerOver} tabindex=${u??c}><input aria-errormessage=${v.validationMessage} .ariaInvalid=${this.status==="invalid"} .ariaLabel=${S(this)} .ariaRequired=${this.required} .checked=${a} class=${s(n.visuallyHidden)} .disabled=${this.disabled||this.readOnly} id=${o??c} name=${this.guid??c} @change=${this.handleInputChange} tabindex=-1 type=radio .value=${$(d??"")}>${E({full:g||t||r,scale:this.scale})}${h&&l`<div class=${s(n.fraction)} style=${k({width:`${i*100}%`})}>${E({full:!0,partial:!0,scale:this.scale})}</div>`||""}<span class=${s(n.visuallyHidden)}>${this.messages.stars.replace("{num}",`${d}`)}</span></label>`)}${(this.count||this.average)&&this.showChip?l`<calcite-chip .label=${e} .scale=${this.scale} .value=${e}>${!!this.average&&l`<span class=${s(n.numberAverage)}>${this.average.toString()}</span>`||""}${!!this.count&&l`<span class=${s(n.numberCount)}>(${e})</span>`||""}</calcite-chip>`:null}</fieldset>${this.validationMessage&&this.status==="invalid"?F({icon:this.validationIcon,id:v.validationMessage,message:this.validationMessage,scale:this.scale,status:this.status}):null}</span>`})}};V("calcite-rating",m);export{m as Rating};
|
|
@@ -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"./GVQVBOVP.js";import{a as g}from"./UYUBR74C.js";import{a as m}from"./5EBGPCB7.js";import{a as b}from"./HIHNZASH.js";import{a as f}from"./62XMTWRN.js";import"./ZWPNZ5XW.js";import"./XNTVXLSV.js";import"./S5W6RC6X.js";import"./QPZWBDRN.js";import{E as o,F as n,G as d,H as u,N as h,S as p,g as s,h as c,p as r}from"./5RP24S6I.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}from"./T6CCMW7H.js";import{G as l,H as o,K as c,S as n,g as s,h as i}from"./
|
|
2
|
+
import{a}from"./T6CCMW7H.js";import{G as l,H as o,K as c,S as n,g as s,h as i}from"./5RP24S6I.js";var r={container:"container",selected:"selected"},h="calcite-carousel-item",p={host:t=>`${h}-${t}`},m=s`:host{display:flex}.container{display:none;inline-size:var(--calcite-container-size-content-fluid)}:host([selected]) .container{display:block}:host([hidden]){display:none}[hidden]{display:none}`,e=class extends l{constructor(){super(...arguments),this.guid=p.host(a()),this.selected=!1}static{this.properties={label:1,selected:[7,{},{reflect:!0,type:Boolean}]}}static{this.styles=m}render(){let d=this.el.id||this.guid;return c(this.el,"id",d),i`<div .ariaLabel=${this.label} class=${o({[r.container]:!0,[r.selected]:this.selected})} role=tabpanel><slot></slot></div>`}};n("calcite-carousel-item",e);export{e as CarouselItem};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{a as p}from"./T6CCMW7H.js";import{b as h}from"./
|
|
2
|
+
import{a as p}from"./T6CCMW7H.js";import{b as h}from"./QPZWBDRN.js";import{G as d,H as i,K as c,S as b,g as o,h as r}from"./5RP24S6I.js";var s={container:"container",content:"content",scale:t=>`scale-${t}`},m={tabTitleId:t=>`calcite-tab-title-${t}`},f=o`:host{display:none}:host,.container,.content{block-size:100%;inline-size:100%}:host([selected]),:host([selected]) .container{display:flex;flex-direction:column}.content{box-sizing:border-box;padding-block:var(--calcite-tab-content-space-y, var(--calcite-tab-content-block-padding, var(--calcite-internal-tab-content-space-y)))}.scale-s{--calcite-internal-tab-content-space-y: .25rem;font-size:var(--calcite-font-size-sm);line-height:1rem}.scale-m{--calcite-internal-tab-content-space-y: .5rem;font-size:var(--calcite-font-size);line-height:1rem}.scale-l{--calcite-internal-tab-content-space-y: var(--calcite-space-sm-plus);font-size:var(--calcite-font-size-md);line-height:1.25rem}.container{display:none;block-size:100%;inline-size:100%;overflow:auto;outline-color:transparent}.container: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))))}:host([hidden]){display:none}[hidden]{display:none}`,l=class extends d{constructor(){super(),this.guid=m.tabTitleId(p()),this.parentTabsEl=null,this.scale="m",this.selected=!1,this.listenOn(document.body,"calciteInternalTabChange",this.internalTabChangeHandler)}static{this.properties={labeledBy:[16,{},{state:!0}],scale:1,selected:[7,{},{reflect:!0,type:Boolean}],tab:[3,{},{reflect:!0}]}}static{this.styles=f}async getTabIndex(){return Array.prototype.indexOf.call(h(this.el.parentElement.children).filter(e=>e.matches("calcite-tab")),this.el)}_updateAriaInfo(e=[],n=[]){this.labeledBy=n[e.indexOf(this.el.id)]||void 0}connectedCallback(){super.connectedCallback(),this.parentTabsEl=this.el.closest("calcite-tabs")}disconnectedCallback(){super.disconnectedCallback(),document.body?.dispatchEvent(new CustomEvent("calciteTabUnregister",{detail:this.el}))}internalTabChangeHandler(e){e.composedPath().find(a=>a.tagName==="CALCITE-TABS")===this.parentTabsEl&&(this.tab?this.selected=this.tab===e.detail.tab:this.getTabIndex().then(a=>{this.selected=a===e.detail.tab}),e.stopPropagation())}render(){let e=this.el.id||this.guid;return c(this.el,"aria-labelledby",this.labeledBy),c(this.el,"id",e),r`<div class=${i({[s.container]:!0,[s.scale(this.scale)]:!0})} role=tabpanel .tabIndex=${this.selected?0:-1}><section class=${i(s.content)}><slot></slot></section></div>`}};b("calcite-tab",l);export{l as Tab};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{b as C}from"./GZZYSINJ.js";import{b as h,k as M,t as S}from"./
|
|
2
|
+
import{b as C}from"./GZZYSINJ.js";import{b as h,k as M,t as S}from"./QPZWBDRN.js";import{G as A,K as T,S as b,g as x,h as y,p as E}from"./5RP24S6I.js";function w(u){return u?.tagName==="CALCITE-TREE-ITEM"}function D(u){return Array.from(u.querySelectorAll("calcite-tree-item:not([disabled])")).filter(t=>{let e=t;for(;e!==u&&e!==null;){let i=e.parentElement??void 0;if(!(!w(i)||!i.hasChildren||i.expanded))return!1;e=e.parentElement}return!0})}var k=x`:host{display:block}:host(:focus){outline:2px solid transparent;outline-offset:2px}:host([hidden]){display:none}[hidden]{display:none}`,g=class extends A{constructor(){super(),this.items=[],this.child=!1,this.lines=!1,this.parentExpanded=!1,this.scale="m",this.selectedItems=[],this.selectionMode="single",this.calciteTreeSelect=E({cancelable:!1}),this.listen("focus",this.onFocus),this.listen("focusin",this.onFocusIn),this.listen("focusout",this.onFocusOut),this.listen("calciteInternalTreeItemSelect",this.onInternalTreeItemSelect),this.listen("keydown",this.keyDownHandler)}static{this.properties={child:[7,{},{reflect:!0,type:Boolean}],lines:[7,{},{reflect:!0,type:Boolean}],parentExpanded:[5,{},{type:Boolean}],scale:[3,{},{reflect:!0}],selectedItems:[0,{},{attribute:!1}],selectionMode:[3,{},{reflect:!0}]}}static{this.styles=k}willUpdate(t){t.has("parentExpanded")&&(this.hasUpdated||this.parentExpanded!==!1)&&this.updateItems();let e=this.el.parentElement?.closest("calcite-tree")??void 0;this.lines=e?e.lines:this.lines,this.scale=e?e.scale:this.scale,this.selectionMode=e?e.selectionMode:this.selectionMode,this.child=!!e}onFocus(){if(!this.child){let t=(this.el.querySelector("calcite-tree-item[selected]:not([disabled])")||this.el.querySelector("calcite-tree-item:not([disabled])"))??void 0;M(t,!0,"focusable")}}onFocusIn(t){(t.relatedTarget===this.el||!this.el.contains(t.relatedTarget))&&this.el.removeAttribute("tabindex")}onFocusOut(t){!this.el.contains(t.relatedTarget)&&(this.el.tabIndex=this.getRootTabIndex())}onInternalTreeItemSelect(t){if(this.child)return;let e=t.target,i=h(e.querySelectorAll("calcite-tree-item"));if(t.preventDefault(),t.stopPropagation(),this.selectionMode==="ancestors"){this.updateAncestorTree(t);return}let o=this.selectionMode==="none",n=this.selectionMode!==null&&(!e.hasChildren||e.hasChildren&&(this.selectionMode==="children"||this.selectionMode==="multichildren")),l=this.selectionMode==="multichildren"&&e.hasChildren,c=!o&&t.detail.modifyCurrentSelection&&(this.selectionMode==="multiple"||this.selectionMode==="multichildren"),f=!c&&((this.selectionMode==="single"||this.selectionMode==="multiple")&&i.length<=0||this.selectionMode==="children"||this.selectionMode==="multichildren"||this.selectionMode==="single-persist"&&!e.hasChildren),d=["multiple","none","single","single-persist"].includes(this.selectionMode)&&e.hasChildren,a=[];n&&a.push(e),f&&h(this.el.querySelectorAll("calcite-tree-item[selected]")).forEach(r=>{a.includes(r)||(r.selected=!1)}),d&&["multiple","none","single","single-persist"].includes(this.selectionMode)&&(e.expanded=!e.expanded),l&&i.forEach(s=>{s.selected=!1,s.hasChildren&&(s.expanded=!1)}),c&&window.getSelection().removeAllRanges(),c&&e.selected?a.forEach(s=>{s.disabled||(s.selected=!1)}):o||a.forEach(s=>{s.disabled||(s.selected=this.selectionMode!=="single"||!s.selected)}),this.selectedItems=o?[]:h(this.el.querySelectorAll("calcite-tree-item")).filter(s=>s.selected),this.calciteTreeSelect.emit(),t.stopPropagation()}keyDownHandler(t){if(this.child)return;let e=this.el,i=t.target,o=["ArrowRight","ArrowDown","ArrowLeft","ArrowUp","Home","End","Tab"];if(!(w(i)&&this.el.contains(i))||!o.includes(t.key))return;let n=D(e);if(t.key==="Tab"){n.forEach(l=>l.tabIndex=-1);return}if(t.key==="ArrowDown"){let l=n.indexOf(i);n[l+1]?.focus(),t.preventDefault();return}if(t.key==="ArrowUp"){let l=n.indexOf(i);n[l-1]?.focus(),t.preventDefault();return}if(t.key==="ArrowLeft"){if(i.hasChildren&&i.expanded){i.expanded=!1,t.preventDefault();return}n.slice(0,n.indexOf(i)).reverse().find(f=>f.depth===i.depth-1)?.focus(),t.preventDefault();return}if(t.key==="ArrowRight"){if(!i.disabled&&i.hasChildren)if(!i.expanded)i.expanded=!0,t.preventDefault();else{let l=n.indexOf(i);n[l+1]?.focus(),t.preventDefault()}return}if(t.key==="Home"){let l=n.shift();l&&(l.focus(),t.preventDefault());return}if(t.key==="End"){let l=n.pop();l&&(l.focus(),t.preventDefault());return}}updateAncestorTree(t){let e=t.target,i=t.detail.updateItem;if(e.disabled||e.indeterminate&&!i)return;let o=[],n=e.parentElement.closest("calcite-tree-item");for(;n;)o.push(n),n=n.parentElement.closest("calcite-tree-item");let l=Array.from(e.querySelectorAll("calcite-tree-item:not([disabled])")),c=l.filter(s=>!s.hasChildren),f=l.filter(s=>s.hasChildren),d;i?d=e.hasChildren?!(e.selected||e.indeterminate):!e.selected:d=e.selected,c.forEach(s=>{s.selected=d,s.indeterminate=!1});function a(s,r){let m=s.filter(p=>p.selected),I=s.filter(p=>!p.selected);r.selected=m.length===s.length,r.indeterminate=m.length>0&&I.length>0}f.reverse().forEach(s=>{let r=Array.from(s.querySelectorAll(":scope > calcite-tree > calcite-tree-item"));a(r,s)}),i&&(e.hasChildren?a(l,e):(e.selected=d,e.indeterminate=!1)),o.forEach(s=>{let r=h(s.querySelectorAll("calcite-tree-item")),m=r.filter(p=>p.selected);if(m.length===0){s.selected=!1,s.indeterminate=!1;return}let I=m.length<r.length;s.indeterminate=I,s.selected=!I}),this.selectedItems=h(this.el.querySelectorAll("calcite-tree-item")).filter(s=>s.selected),i&&this.calciteTreeSelect.emit()}updateItems(){this.items.forEach(t=>t.parentExpanded=this.parentExpanded)}handleDefaultSlotChange(t){let e=S(t).filter(i=>i.matches("calcite-tree-item"));this.items=e,this.updateItems()}getRootTabIndex(){return this.child?-1:0}render(){return this.el.ariaMultiSelectable=this.child?null:C(this.selectionMode==="multiple"||this.selectionMode==="multichildren"),this.el.role=this.child?null:"tree",T(this.el,"tabIndex",this.getRootTabIndex()),y`<slot @slotchange=${this.handleDefaultSlotChange}></slot>`}};b("calcite-tree",g);export{g as Tree};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{a as Tt}from"./5EBGPCB7.js";import{N as Lt}from"./S5NVS4GZ.js";var yt=["top","right","bottom","left"],Dt=["start","end"],vt=yt.reduce((t,e)=>t.concat(e,e+"-"+Dt[0],e+"-"+Dt[1]),[]),U=Math.min,B=Math.max,st=Math.round,rt=Math.floor,$=t=>({x:t,y:t}),Ae={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 Nt(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 Ft=["left","right"],Mt=["right","left"],Oe=["top","bottom"],Re=["bottom","top"];function Pe(t,e,n){switch(t){case"top":case"bottom":return n?e?Mt:Ft:e?Ft:Mt;case"left":case"right":return e?Oe:Re;default:return[]}}function $t(t,e,n,o){let i=F(t),s=Pe(_(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 Ae[e]+t.slice(e.length)}function Ce(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"?Ce(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 kt(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 _t(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 Se=50,Ht=async(t,e,n)=>{let{placement:o="bottom",strategy:i="absolute",middleware:s=[],platform:r}=n,c=r.detectOverflow?r:{...r,detectOverflow:_t},a=await(r.isRTL==null?void 0:r.isRTL(e)),l=await r.getElementRects({reference:t,floating:e,strategy:i}),{x:d,y:u}=kt(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<Se&&(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}=kt(l,m,a)),p=-1)}return{x:d,y:u,placement:m,strategy:i,middlewareData:g}},Vt=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 Ee(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 zt=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?Ee(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}}:{}}}},Ut=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)]:Nt(c)),A=g!=="none";!m&&A&&O.push(...$t(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,be)=>z+be,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 Wt(t,e){return{top:t.top-e.height,right:t.right-e.width,bottom:t.bottom-e.height,left:t.left-e.width}}function Bt(t){return yt.some(e=>t[e]>=0)}var It=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=Wt(r,n.reference);return{data:{referenceHiddenOffsets:c,referenceHidden:Bt(c)}}}case"escaped":{let r=await o.detectOverflow(e,{...s,altBoundary:!0}),c=Wt(r,n.floating);return{data:{escapedOffsets:c,escaped:Bt(c)}}}default:return{}}}}};var Le=new Set(["left","top"]);async function Te(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=Le.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 jt=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 Te(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}}}}},Xt=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 Kt(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=(Kt(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function Kt(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 Yt(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 qt(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 De=/transform|translate|scale|rotate|perspective|filter/,Fe=/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))||De.test(e.willChange||"")||Fe.test(e.contain||"")}function Gt(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||Yt(t)&&t.host||k(t);return Yt(e)?e.host:e}function Jt(t){let e=j(t);return et(e)?(t.ownerDocument||t).body:V(e)&&ct(e)?e:Jt(e)}function Z(t,e,n){var o;e===void 0&&(e=[]),n===void 0&&(n=!0);let i=Jt(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 te(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}=te(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 Me=$(0);function ee(t){let e=C(t);return!gt()||!e.visualViewport?Me:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function Ne(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=Ne(s,n,o)?ee(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 ne(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 $e(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?ne(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 ke(t){return t.getClientRects?Array.from(t.getClientRects()):[]}function We(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 Be=25;function _e(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<=Be&&(c-=h)}return{width:c,height:a,x:l,y:d}}function He(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 Qt(t,e,n){let o;if(e==="viewport"||e==="layoutViewport")o=_e(t,n,e);else if(e==="document")o=We(k(t));else if(M(e))o=He(e,n);else{let i=ee(t);o={x:e.x-i.x,y:e.y-i.y,width:e.width,height:e.height}}return q(o)}function Ve(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 ze(t){let{element:e,boundary:n,rootBoundary:o,strategy:i}=t,r=[...n==="clippingAncestors"?lt(e)?[]:Ve(e,this._c):[].concat(n),o],c=Qt(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=Qt(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 Ue(t){let{width:e,height:n}=te(t);return{width:e,height:n}}function Ie(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?ne(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 Zt(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 oe(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=Zt(t,e);for(;o&&qt(o)&&Ct(o);)o=Zt(o,e);return o&&et(o)&&Ct(o)&&!tt(o)?n:o||Gt(t)||n}var je=async function(t){let e=this.getOffsetParent||oe,n=this.getDimensions,o=await n(t.floating);return{reference:Ie(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function Xe(t){return N(t).direction==="rtl"}var wt={convertOffsetParentRelativeRectToViewportRelativeRect:$e,getDocumentElement:k,getClippingRect:ze,getOffsetParent:oe,getElementRects:je,getClientRects:ke,getDimensions:Ue,getScale:nt,isElement:M,isRTL:Xe};function ie(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function Ye(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(!ie(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 se(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?Ye(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&&!ie(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 re=jt,ce=zt,le=Xt,ae=Ut;var fe=It,ue=Vt;var de=(t,e,n)=>{let o=new Map,i=n??{},s={...wt,...i.platform,_c:o};return Ht(t,e,{...i,platform:s})};function me(t){return Ke(t)}function Et(t){return t.assignedSlot?t.assignedSlot:t.parentNode instanceof ShadowRoot?t.parentNode.host:t.parentNode}function Ke(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,me)}})();function ge(t){let e=window.devicePixelRatio||1;return Math.round(t*e)/e}var xe=(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 de(d,s,{strategy:a,placement:l==="auto"||l==="auto-start"||l==="auto-end"?void 0:he(l,m),middleware:Ge({placement:l,flipDisabled:o,flipPlacements:i?.map(O=>he(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=Ze[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(qe,p),Object.assign(s.style,{pointerEvents:b,position:w,transform:`translate(${ge(f)}px,${ge(g)}px)`,visibility:y})}),qe="data-placement",ye=["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"],An="bottom-start",On="bottom-end",Rn={animation:"calcite-floating-ui-anim",animationActive:"calcite-floating-ui-anim--active"};function Ge({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=[le({rootBoundary:c})];if(l.push(re({mainAxis:typeof o=="number"?o:0,crossAxis:typeof i=="number"?i:0})),a&&l.push(ce({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(ae(u?{fallbackPlacements:u,rootBoundary:c}:{rootBoundary:c}))}return s&&l.push(ue({element:s})),l.push(fe({rootBoundary:c})),l}function Je(t){return ye.includes(t)}function Pn(t,e){let n=t.filter(Je);return n.length!==t.length&&console.warn(`${e.tagName}: Invalid value found in: flipPlacements. Try any of these: ${ye.map(o=>`"${o}"`).join(", ").trim()}`,{el:e}),n}function he(t,e=!1){let n=["left","right"];return e&&n.reverse(),t.replace(/leading/gi,n[0]).replace(/trailing/gi,n[1])}async function Cn(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 ve(t);await(n?Qe(t):xe)(t,e)}function Qe(t){let e=xt.get(t);return e||(e=Tt(xe,Lt.reposition,{edges:["leading","trailing"]}),xt.set(t,e),e)}var Ze={top:"",left:"rotate(-90deg)",bottom:"rotate(180deg)",right:"rotate(90deg)"},ft=new WeakMap,xt=new WeakMap;async function ve(t){let{referenceEl:e,floatingEl:n}=t;if(!n?.isConnected)return;let o=se;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 tn(t){let{floatingEl:e}=t;e&&Object.assign(e.style,{display:"",left:"",pointerEvents:"",position:"",top:"",transform:"",visibility:""})}async function Sn(t){let{floatingEl:e,referenceEl:n}=t;if(tn(t),en(t),!(!e||!n||!t.open))return ve(t)}function en(t){let e=ft.get(t);e?.state==="active"&&e.cleanUp(),ft.delete(t),xt.get(t)?.cancel(),xt.delete(t)}var pe=4,En=Math.ceil(Math.hypot(pe,pe));export{An as a,On as b,Rn as c,Pn as d,Cn as e,tn as f,Sn as g,en as h,En as i};
|
|
2
|
+
import{a as Tt}from"./5EBGPCB7.js";import{N as Lt}from"./5RP24S6I.js";var yt=["top","right","bottom","left"],Dt=["start","end"],vt=yt.reduce((t,e)=>t.concat(e,e+"-"+Dt[0],e+"-"+Dt[1]),[]),U=Math.min,B=Math.max,st=Math.round,rt=Math.floor,$=t=>({x:t,y:t}),Ae={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 Nt(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 Ft=["left","right"],Mt=["right","left"],Oe=["top","bottom"],Re=["bottom","top"];function Pe(t,e,n){switch(t){case"top":case"bottom":return n?e?Mt:Ft:e?Ft:Mt;case"left":case"right":return e?Oe:Re;default:return[]}}function $t(t,e,n,o){let i=F(t),s=Pe(_(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 Ae[e]+t.slice(e.length)}function Ce(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"?Ce(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 kt(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 _t(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 Se=50,Ht=async(t,e,n)=>{let{placement:o="bottom",strategy:i="absolute",middleware:s=[],platform:r}=n,c=r.detectOverflow?r:{...r,detectOverflow:_t},a=await(r.isRTL==null?void 0:r.isRTL(e)),l=await r.getElementRects({reference:t,floating:e,strategy:i}),{x:d,y:u}=kt(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<Se&&(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}=kt(l,m,a)),p=-1)}return{x:d,y:u,placement:m,strategy:i,middlewareData:g}},Vt=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 Ee(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 zt=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?Ee(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}}:{}}}},Ut=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)]:Nt(c)),A=g!=="none";!m&&A&&O.push(...$t(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,be)=>z+be,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 Wt(t,e){return{top:t.top-e.height,right:t.right-e.width,bottom:t.bottom-e.height,left:t.left-e.width}}function Bt(t){return yt.some(e=>t[e]>=0)}var It=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=Wt(r,n.reference);return{data:{referenceHiddenOffsets:c,referenceHidden:Bt(c)}}}case"escaped":{let r=await o.detectOverflow(e,{...s,altBoundary:!0}),c=Wt(r,n.floating);return{data:{escapedOffsets:c,escaped:Bt(c)}}}default:return{}}}}};var Le=new Set(["left","top"]);async function Te(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=Le.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 jt=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 Te(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}}}}},Xt=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 Kt(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=(Kt(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function Kt(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 Yt(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 qt(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 De=/transform|translate|scale|rotate|perspective|filter/,Fe=/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))||De.test(e.willChange||"")||Fe.test(e.contain||"")}function Gt(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||Yt(t)&&t.host||k(t);return Yt(e)?e.host:e}function Jt(t){let e=j(t);return et(e)?(t.ownerDocument||t).body:V(e)&&ct(e)?e:Jt(e)}function Z(t,e,n){var o;e===void 0&&(e=[]),n===void 0&&(n=!0);let i=Jt(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 te(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}=te(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 Me=$(0);function ee(t){let e=C(t);return!gt()||!e.visualViewport?Me:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function Ne(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=Ne(s,n,o)?ee(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 ne(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 $e(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?ne(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 ke(t){return t.getClientRects?Array.from(t.getClientRects()):[]}function We(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 Be=25;function _e(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<=Be&&(c-=h)}return{width:c,height:a,x:l,y:d}}function He(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 Qt(t,e,n){let o;if(e==="viewport"||e==="layoutViewport")o=_e(t,n,e);else if(e==="document")o=We(k(t));else if(M(e))o=He(e,n);else{let i=ee(t);o={x:e.x-i.x,y:e.y-i.y,width:e.width,height:e.height}}return q(o)}function Ve(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 ze(t){let{element:e,boundary:n,rootBoundary:o,strategy:i}=t,r=[...n==="clippingAncestors"?lt(e)?[]:Ve(e,this._c):[].concat(n),o],c=Qt(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=Qt(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 Ue(t){let{width:e,height:n}=te(t);return{width:e,height:n}}function Ie(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?ne(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 Zt(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 oe(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=Zt(t,e);for(;o&&qt(o)&&Ct(o);)o=Zt(o,e);return o&&et(o)&&Ct(o)&&!tt(o)?n:o||Gt(t)||n}var je=async function(t){let e=this.getOffsetParent||oe,n=this.getDimensions,o=await n(t.floating);return{reference:Ie(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function Xe(t){return N(t).direction==="rtl"}var wt={convertOffsetParentRelativeRectToViewportRelativeRect:$e,getDocumentElement:k,getClippingRect:ze,getOffsetParent:oe,getElementRects:je,getClientRects:ke,getDimensions:Ue,getScale:nt,isElement:M,isRTL:Xe};function ie(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function Ye(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(!ie(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 se(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?Ye(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&&!ie(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 re=jt,ce=zt,le=Xt,ae=Ut;var fe=It,ue=Vt;var de=(t,e,n)=>{let o=new Map,i=n??{},s={...wt,...i.platform,_c:o};return Ht(t,e,{...i,platform:s})};function me(t){return Ke(t)}function Et(t){return t.assignedSlot?t.assignedSlot:t.parentNode instanceof ShadowRoot?t.parentNode.host:t.parentNode}function Ke(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,me)}})();function ge(t){let e=window.devicePixelRatio||1;return Math.round(t*e)/e}var xe=(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 de(d,s,{strategy:a,placement:l==="auto"||l==="auto-start"||l==="auto-end"?void 0:he(l,m),middleware:Ge({placement:l,flipDisabled:o,flipPlacements:i?.map(O=>he(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=Ze[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(qe,p),Object.assign(s.style,{pointerEvents:b,position:w,transform:`translate(${ge(f)}px,${ge(g)}px)`,visibility:y})}),qe="data-placement",ye=["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"],An="bottom-start",On="bottom-end",Rn={animation:"calcite-floating-ui-anim",animationActive:"calcite-floating-ui-anim--active"};function Ge({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=[le({rootBoundary:c})];if(l.push(re({mainAxis:typeof o=="number"?o:0,crossAxis:typeof i=="number"?i:0})),a&&l.push(ce({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(ae(u?{fallbackPlacements:u,rootBoundary:c}:{rootBoundary:c}))}return s&&l.push(ue({element:s})),l.push(fe({rootBoundary:c})),l}function Je(t){return ye.includes(t)}function Pn(t,e){let n=t.filter(Je);return n.length!==t.length&&console.warn(`${e.tagName}: Invalid value found in: flipPlacements. Try any of these: ${ye.map(o=>`"${o}"`).join(", ").trim()}`,{el:e}),n}function he(t,e=!1){let n=["left","right"];return e&&n.reverse(),t.replace(/leading/gi,n[0]).replace(/trailing/gi,n[1])}async function Cn(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 ve(t);await(n?Qe(t):xe)(t,e)}function Qe(t){let e=xt.get(t);return e||(e=Tt(xe,Lt.reposition,{edges:["leading","trailing"]}),xt.set(t,e),e)}var Ze={top:"",left:"rotate(-90deg)",bottom:"rotate(180deg)",right:"rotate(90deg)"},ft=new WeakMap,xt=new WeakMap;async function ve(t){let{referenceEl:e,floatingEl:n}=t;if(!n?.isConnected)return;let o=se;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 tn(t){let{floatingEl:e}=t;e&&Object.assign(e.style,{display:"",left:"",pointerEvents:"",position:"",top:"",transform:"",visibility:""})}async function Sn(t){let{floatingEl:e,referenceEl:n}=t;if(tn(t),en(t),!(!e||!n||!t.open))return ve(t)}function en(t){let e=ft.get(t);e?.state==="active"&&e.cleanUp(),ft.delete(t),xt.get(t)?.cancel(),xt.delete(t)}var pe=4,En=Math.ceil(Math.hypot(pe,pe));export{An as a,On as b,Rn as c,Pn as d,Cn as e,tn as f,Sn as g,en as h,En as i};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{a as s,b as o}from"./KWIC32XQ.js";import{a as i}from"./
|
|
2
|
+
import{a as s,b as o}from"./KWIC32XQ.js";import{a as i}from"./RA3ZTRG2.js";import{s as a}from"./QPZWBDRN.js";import{G as r,H as e,S as d,g as l,h as n}from"./5RP24S6I.js";var h=l`:host([disabled]) .content{cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-opacity-disabled)}:host([disabled]) .content *,:host([disabled]) .content ::slotted(*){pointer-events:none}:host{display:flex;flex:1 1 0%;flex-direction:column}.container{display:flex;flex:1 1 auto;align-items:stretch;font-weight:var(--calcite-font-weight-normal);color:var(--calcite-color-text-2)}.content{display:flex;flex:1 1 auto;flex-direction:column;justify-content:center;font-size:var(--calcite-font-size-relative-sm);line-height:var(--calcite-font-line-height-relative-snug);padding-inline:var(--calcite-stack-padding-inline, .75rem);padding-block:var(--calcite-stack-padding-block, .5rem)}.content-start{justify-content:flex-start}.content-end{justify-content:flex-end}.content-start,.content-end{flex:0 1 auto}.content-start ::slotted(calcite-icon),.content-end ::slotted(calcite-icon){margin-inline:.75rem;align-self:center}.actions-start,.actions-end,.content-start,.content-end{display:flex;align-items:center}.actions-start ::slotted(calcite-action),.actions-start ::slotted(calcite-action-menu),.actions-start ::slotted(calcite-handle),.actions-start ::slotted(calcite-dropdown),.actions-end ::slotted(calcite-action),.actions-end ::slotted(calcite-action-menu),.actions-end ::slotted(calcite-handle),.actions-end ::slotted(calcite-dropdown){align-self:stretch;color:inherit}:host([hidden]){display:none}[hidden]{display:none}`,c=class extends r{constructor(){super(...arguments),this.hasActionsEnd=!1,this.hasActionsStart=!1,this.hasContentEnd=!1,this.hasContentStart=!1,this.disabled=!1}static{this.properties={hasActionsEnd:[16,{},{state:!0}],hasActionsStart:[16,{},{state:!0}],hasContentEnd:[16,{},{state:!0}],hasContentStart:[16,{},{state:!0}],disabled:[7,{},{reflect:!0,type:Boolean}]}}static{this.styles=h}handleActionsStartSlotChange(t){this.hasActionsStart=a(t)}handleActionsEndSlotChange(t){this.hasActionsEnd=a(t)}handleContentStartSlotChange(t){this.hasContentStart=a(t)}handleContentEndSlotChange(t){this.hasContentEnd=a(t)}renderActionsStart(){let{hasActionsStart:t}=this;return i("actions-start-container",n`<div class=${e(s.actionsStart)} .hidden=${!t}><slot name=${o.actionsStart} @slotchange=${this.handleActionsStartSlotChange}></slot></div>`)}renderActionsEnd(){let{hasActionsEnd:t}=this;return i("actions-end-container",n`<div class=${e(s.actionsEnd)} .hidden=${!t}><slot name=${o.actionsEnd} @slotchange=${this.handleActionsEndSlotChange}></slot></div>`)}renderContentStart(){let{hasContentStart:t}=this;return n`<div class=${e(s.contentStart)} .hidden=${!t}><slot name=${o.contentStart} @slotchange=${this.handleContentStartSlotChange}></slot></div>`}renderDefaultContent(){return n`<div class=${e(s.content)}><slot></slot></div>`}renderContentEnd(){let{hasContentEnd:t}=this;return n`<div class=${e(s.contentEnd)} .hidden=${!t}><slot name=${o.contentEnd} @slotchange=${this.handleContentEndSlotChange}></slot></div>`}render(){return n`<div class=${e(s.container)}>${this.renderActionsStart()}${this.renderContentStart()}${this.renderDefaultContent()}${this.renderContentEnd()}${this.renderActionsEnd()}</div>`}};d("calcite-stack",c);export{c as Stack};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{a as h}from"./
|
|
2
|
+
import{a as h}from"./GVQVBOVP.js";import{a as b}from"./62XMTWRN.js";import"./ZWPNZ5XW.js";import"./XNTVXLSV.js";import"./S5W6RC6X.js";import"./QPZWBDRN.js";import{E as s,F as c,G as r,H as n,J as d,S as u,g as i,h as l}from"./5RP24S6I.js";var k={button:"button"},R={plus:"plus"},S=i`: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;background-color:transparent}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}calcite-button{--calcite-fab-shadow-internal: var(--calcite-shadow-md);box-shadow:var(--calcite-fab-shadow, var(--calcite-fab-shadow-internal));--calcite-button-background-color: var(--calcite-fab-background-color);--calcite-button-border-color: var(--calcite-fab-border-color);--calcite-button-corner-radius: var(--calcite-fab-corner-radius);--calcite-button-text-color: var(--calcite-fab-text-color);--calcite-button-loader-color: var(--calcite-fab-loader-color)}:host([hidden]){display:none}[hidden]{display:none}`,e=class extends r{constructor(){super(...arguments),this.buttonRef=s(),this.focusSetter=b()(this),this.interactiveContainer=h(this),this.appearance="solid",this.disabled=!1,this.icon=R.plus,this.iconFlipRtl=!1,this.kind="brand",this.loading=!1,this.scale="m",this.textEnabled=!1}static{this.properties={appearance:[3,{},{reflect:!0}],disabled:[7,{},{reflect:!0,type:Boolean}],icon:[3,{type:String},{reflect:!0}],iconFlipRtl:[7,{},{reflect:!0,type:Boolean}],kind:[3,{},{reflect:!0}],label:1,loading:[7,{},{reflect:!0,type:Boolean}],scale:[3,{},{reflect:!0}],text:1,textEnabled:[7,{},{reflect:!0,type:Boolean}]}}static{this.styles=S}async setFocus(t){return this.focusSetter(()=>this.buttonRef.value,t)}render(){let{appearance:t,kind:p,disabled:a,loading:f,scale:m,textEnabled:y,icon:v,label:o,text:x,iconFlipRtl:$}=this,g=y?void 0:o||x||void 0;return this.interactiveContainer({disabled:a,children:l`<calcite-button .appearance=${t==="solid"?"solid":"outline-fill"} class=${n(k.button)} .disabled=${a} .iconFlipRtl=${$?"start":void 0} .iconStart=${v} .kind=${p} .label=${o} .loading=${f} round .scale=${m} title=${g??d} type=button width=auto ${c(this.buttonRef)}>${this.textEnabled?this.text:null}</calcite-button>`})}};u("calcite-fab",e);export{e as Fab};
|
|
@@ -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"./GVQVBOVP.js";import{a as v}from"./YP3AYJH3.js";import{a as b}from"./62XMTWRN.js";import"./ZWPNZ5XW.js";import{e as p}from"./XNTVXLSV.js";import"./S5W6RC6X.js";import"./QPZWBDRN.js";import{E as l,F as d,G as h,H as r,J as i,L as u,M as f,S as m,g as s,h as n}from"./5RP24S6I.js";var y=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{display:inline}:host a{cursor:pointer;font-family:inherit;text-decoration-line:none;outline-color:transparent;font-size:inherit;-webkit-appearance:none;color:var(--calcite-link-text-color, var(--calcite-color-text-link));line-height:inherit;white-space:initial;background-image:linear-gradient(currentColor,currentColor),linear-gradient(var(--calcite-color-brand-underline),var(--calcite-color-brand-underline));background-position-x:0 100%;background-position-y:min(1.5em,100%);background-repeat:no-repeat;background-size:0% var(--calcite-border-width-sm),100% var(--calcite-border-width-sm)}:host a:hover,:host a:focus{background-size:100% var(--calcite-border-width-sm),100% var(--calcite-border-width-sm)}:host a:focus{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))))}:host a:active{background-size:100% var(--calcite-border-width-md),100% var(--calcite-border-width-md)}:host a:active.calcite--rtl{background-position:100% 100%,100% 100%}:host a{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,background-size;transition-duration:var(--calcite-animation-timing);transition-timing-function:ease-in-out}calcite-icon{inline-size:1em;block-size:1em;min-inline-size:unset;min-block-size:unset}.calcite-link--icon{vertical-align:middle;margin-block-start:-.25em}:host .calcite-link--icon.icon-start{margin-inline-end:.5rem}:host .calcite-link--icon.icon-end{margin-inline-start:.5rem}: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={calciteLinkIcon:"calcite-link--icon",iconStart:"icon-start",iconEnd:"icon-end"},a=class extends h{constructor(){super(),this.anchorRef=l(),this.direction=p(),this.focusSetter=b()(this),this.interactiveContainer=k(this),this.keyDownHandler=t=>{v(t.key)&&(t.preventDefault(),this.el.click())},this.anchorClickHandler=t=>{t.isTrusted||t.stopPropagation()},this.disabled=!1,this.download=!1,this.listen("click",this.clickHandler)}static{this.properties={disabled:[7,{},{reflect:!0,type:Boolean}],download:[3,{converter:u},{reflect:!0}],href:[3,{},{reflect:!0}],iconEnd:[3,{type:String},{reflect:!0}],iconFlipRtl:[3,{},{reflect:!0}],iconStart:[3,{type:String},{reflect:!0}],rel:1,target:1}}static{this.styles=y}async setFocus(t){return this.focusSetter(()=>this.anchorRef.value,t)}clickHandler(t){t.isTrusted||this.anchorRef.value?.click()}render(){let{download:t}=this,o=this.direction,e=!this.href;return this.el.role="presentation",this.interactiveContainer({disabled:this.disabled,children:n`<a class=${r({[f.rtl]:o==="rtl"})} download=${(t===!0||t===""?"":t||void 0)??i} href=${(this.href||void 0)??i} @click=${this.anchorClickHandler} @keydown=${e?this.keyDownHandler:void 0} rel=${this.rel??i} .role=${e?"button":void 0} tabindex=${(e?0:void 0)??i} target=${(this.href?this.target:void 0)??i} ${d(this.anchorRef)}>${n`${this.iconStart?this.renderIcon("start"):null}<slot></slot>${this.iconEnd?this.renderIcon("end"):null}`}</a>`})}renderIcon(t){let o=t==="start",e=o?this.iconStart:this.iconEnd,g=this.iconFlipRtl==="both"||this.iconFlipRtl===t;return n`<calcite-icon class=${r({[c.calciteLinkIcon]:!0,[o?c.iconStart:c.iconEnd]:!0})} .flipRtl=${g} .icon=${e} scale=s></calcite-icon>`}};m("calcite-link",a);export{a as Link};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{a as L}from"./4F7RPBMC.js";import{b as y}from"./YJPIZ6DX.js";import{b as d}from"./RIRQHOBE.js";import"./XCQQISIF.js";import"./YP3AYJH3.js";import{a as F}from"./P5V7JFB5.js";import{a as U}from"./VLGXJHJZ.js";import{a as E,c as C}from"./ZWPNZ5XW.js";import{e as R}from"./U4CNMRWE.js";import"./V7CTUOE3.js";import"./QUZYKERC.js";import{E as s,F as l,G as D,H as i,S as H,g as S,h as n,p as x}from"./S5NVS4GZ.js";var e={button:"button",buttonBottomLeft:"button--bottom-left",buttonBottomRight:"button--bottom-right",buttonFractionalSecondDown:"button--fractionalSecond-down",buttonFractionalSecondUp:"button--fractionalSecond-up",buttonHourDown:"button--hour-down",buttonHourUp:"button--hour-up",buttonMeridiemDown:"button--meridiem-down",buttonMeridiemUp:"button--meridiem-up",buttonMinuteDown:"button--minute-down",buttonMinuteUp:"button--minute-up",buttonSecondDown:"button--second-down",buttonSecondUp:"button--second-up",buttonTopLeft:"button--top-left",buttonTopRight:"button--top-right",column:"column",decimalSeparator:"decimal-separator",delimiter:"delimiter",fractionalSecond:"fractionalSecond",hour:"hour",hourSuffix:"hour-suffix",input:"input",inputFocus:"inputFocus",meridiem:"meridiem",minute:"minute",minuteSuffix:"minute-suffix",second:"second",secondSuffix:"second-suffix",showMeridiem:"show-meridiem",showSecond:"show-second",scale:v=>`scale-${v}`,timePicker:"time-picker",meridiemStart:"meridiem--start"},a={chevronUp:"chevron-up",chevronDown:"chevron-down"},Y=S`:host{display:inline-block}.time-picker{display:flex;-webkit-user-select:none;user-select:none;align-items:center;border-width:1px;border-style:solid;font-weight:var(--calcite-font-weight-medium);border-color:var(--calcite-time-picker-border-color, var(--calcite-color-border-3));border-radius:var(--calcite-time-picker-corner-radius, var(--calcite-border-radius-round));color:var(--calcite-time-picker-color, var(--calcite-color-text-1));background-color:var(--calcite-time-picker-background-color, var(--calcite-color-foreground-1));line-height:var(--calcite-font-line-height-md);overflow:hidden}.time-picker .column{display:flex;flex-direction:column}.time-picker .meridiem--start{order:-1}.time-picker .button{display:inline-flex;cursor:pointer;align-items:center;justify-content:center;background-color:var(--calcite-time-picker-background-color, var(--calcite-color-foreground-1))}.time-picker .button:hover,.time-picker .button:focus{outline:2px solid transparent;outline-offset:2px;z-index:var(--calcite-z-index-header);outline-offset:0;background-color:var(--calcite-time-picker-button-background-color-hover, var(--calcite-color-foreground-2))}.time-picker .button:active{background-color:var(--calcite-time-picker-button-background-color-press, var(--calcite-color-foreground-3))}.time-picker .button.top-left{border-start-start-radius:var(--calcite-time-picker-corner-radius, var(--calcite-border-radius-round))}.time-picker .button.bottom-left{border-end-start-radius:var(--calcite-time-picker-corner-radius, var(--calcite-border-radius-round))}.time-picker .button.top-right{border-start-end-radius:var(--calcite-time-picker-corner-radius, var(--calcite-border-radius-round))}.time-picker .button.bottom-right{border-end-end-radius:var(--calcite-time-picker-corner-radius, var(--calcite-border-radius-round))}.time-picker .button calcite-icon{color:var(--calcite-time-picker-icon-color, var(--calcite-color-text-3))}.time-picker .input{display:inline-flex;cursor:pointer;align-items:center;justify-content:center;font-weight:var(--calcite-font-weight-medium);background-color:var(--calcite-time-picker-background-color, var(--calcite-color-foreground-1))}.time-picker .input:hover{box-shadow:inset 0 0 0 2px var(--calcite-time-picker-input-border-color-hover, var(--calcite-color-foreground-2));z-index:var(--calcite-z-index-header)}.time-picker .input:focus,.time-picker .input:hover:focus{outline:2px solid transparent;outline-offset:2px;outline-offset:0}.time-picker .input.inputFocus,.time-picker .input:hover.inputFocus{box-shadow:inset 0 0 0 2px var(--calcite-time-picker-input-border-color-press, var(--calcite-color-brand));z-index:var(--calcite-z-index-header)}.time-picker.scale-s{font-size:var(--calcite-font-size-relative-base)}.time-picker.scale-s .button,.time-picker.scale-s .input{padding-inline:var(--calcite-spacing-sm);padding-block:var(--calcite-spacing-xxs)}.time-picker.scale-s:not(.show-meridiem) .delimiter:last-child{padding-inline-end:var(--calcite-spacing-md)}.time-picker.scale-m{font-size:var(--calcite-font-size-relative-md)}.time-picker.scale-m .button,.time-picker.scale-m .input{padding-inline:var(--calcite-spacing-md);padding-block:var(--calcite-spacing-sm)}.time-picker.scale-m:not(.show-meridiem) .delimiter:last-child{padding-inline-end:var(--calcite-spacing-xl)}.time-picker.scale-l{font-size:var(--calcite-font-size-relative-lg)}.time-picker.scale-l .button,.time-picker.scale-l .input{padding-inline:var(--calcite-spacing-lg);padding-block:var(--calcite-spacing-md)}.time-picker.scale-l:not(.show-meridiem) .delimiter:last-child{padding-inline-end:var(--calcite-spacing-xxl)}:host([hidden]){display:none}[hidden]{display:none}`,f=class extends D{constructor(){super(),this.direction=R(),this.fractionalSecondRef=s(),this.hourRef=s(),this.meridiemRef=s(),this.minuteRef=s(),this.pointerActivated=!1,this.secondRef=s(),this.messages=F(),this.focusSetter=U()(this),this.showFractionalSecond=!1,this.showSecond=!1,this.time=L(this),this.hourFormat="user",this.scale="m",this.step=60,this.value=null,this.calciteTimePickerChange=x({cancelable:!1}),this.listen("blur",this.blurHandler),this.listen("calciteTimeChange",this.timeChangeHandler),this.listen("keydown",this.keyDownHandler),this.listen("pointerdown",this.pointerDownHandler)}static{this.properties={activeEl:[16,{},{state:!0}],showFractionalSecond:[16,{},{state:!0}],showSecond:[16,{},{state:!0}],time:[0,{},{attribute:!1}],hourFormat:[3,{},{reflect:!0}],messageOverrides:[0,{},{attribute:!1}],numberingSystem:1,scale:[3,{},{reflect:!0}],step:[11,{},{reflect:!0,type:Number}],value:1}}static{this.shadowRootOptions={mode:"open",delegatesFocus:!0}}static{this.styles=Y}async setFocus(t){return this.focusSetter(()=>this.el,t)}connectedCallback(){super.connectedCallback(),this.toggleSecond()}willUpdate(t){t.has("step")&&(this.hasUpdated||this.step!==60)&&this.toggleSecond(),t.has("value")&&(this.hasUpdated||this.value!==null)&&this.time.setValue(this.value)}blurHandler(){this.activeEl=void 0,this.pointerActivated=!1}keyDownHandler(t){this.pointerActivated=!1;let{defaultPrevented:o,key:r}=t;if(o)return;let{hourFormat:u}=this.time;switch(this.activeEl){case this.hourRef.value:r==="ArrowRight"&&(this.focusPart("minute"),t.preventDefault());break;case this.minuteRef.value:switch(r){case"ArrowLeft":this.focusPart("hour"),t.preventDefault();break;case"ArrowRight":this.step!==60?(this.focusPart("second"),t.preventDefault()):u==="12"&&(this.focusPart("meridiem"),t.preventDefault());break}break;case this.secondRef.value:switch(r){case"ArrowLeft":this.focusPart("minute"),t.preventDefault();break;case"ArrowRight":this.showFractionalSecond?this.focusPart("fractionalSecond"):u==="12"&&(this.focusPart("meridiem"),t.preventDefault());break}break;case this.fractionalSecondRef.value:switch(r){case"ArrowLeft":this.focusPart("second"),t.preventDefault();break;case"ArrowRight":u==="12"&&(this.focusPart("meridiem"),t.preventDefault());break}break;case this.meridiemRef.value:r==="ArrowLeft"&&(this.showFractionalSecond?this.focusPart("fractionalSecond"):this.step!==60?(this.focusPart("second"),t.preventDefault()):(this.focusPart("minute"),t.preventDefault()));break}}pointerDownHandler(){this.pointerActivated=!0}async focusPart(t){await C(this),(t==="hour"?this.hourRef:t==="minute"?this.minuteRef:t==="second"?this.secondRef:t==="fractionalSecond"?this.fractionalSecondRef:this.meridiemRef).value?.focus()}focusHandler(t){this.pointerActivated||(this.activeEl=t.currentTarget)}fractionalSecondDownClickHandler(){this.activeEl=this.fractionalSecondRef.value,this.activeEl&&this.activeEl.focus(),this.time.nudgeFractionalSecond("down")}fractionalSecondUpClickHandler(){this.activeEl=this.fractionalSecondRef.value,this.activeEl&&this.activeEl.focus(),this.time.nudgeFractionalSecond("up")}hourDownClickHandler(){this.activeEl=this.hourRef.value,this.activeEl&&this.activeEl.focus(),this.time.decrementHour()}hourUpClickHandler(){this.activeEl=this.hourRef.value,this.activeEl&&this.activeEl.focus(),this.time.incrementHour()}inputClickHandler(t){this.activeEl=t.target}meridiemUpClickHandler(){this.activeEl=this.meridiemRef.value,this.activeEl&&this.activeEl.focus(),this.time.toggleMeridiem("up")}meridiemDownClickHandler(){this.activeEl=this.meridiemRef.value,this.activeEl&&this.activeEl.focus(),this.time.toggleMeridiem("down")}minuteDownClickHandler(){this.activeEl=this.minuteRef.value,this.activeEl&&this.activeEl.focus(),this.time.decrementMinute()}minuteUpClickHandler(){this.activeEl=this.minuteRef.value,this.activeEl&&this.activeEl.focus(),this.time.incrementMinute()}secondDownClickHandler(){this.activeEl=this.secondRef.value,this.activeEl&&this.activeEl.focus(),this.time.decrementSecond()}secondUpClickHandler(){this.activeEl=this.secondRef.value,this.activeEl?.focus(),this.time.incrementSecond()}timeChangeHandler(t){t.stopPropagation();let o=t.detail;o!==this.value&&(this.value=o),this.calciteTimePickerChange.emit()}toggleSecond(){this.showSecond=this.step<60,this.stepPrecision=y(this.step),this.showFractionalSecond=this.stepPrecision>0}render(){let{activeEl:t,messages:o,scale:r}=this,{_lang:u}=o,{fractionalSecond:b,handleFractionalSecondKeyDownEvent:P,handleHourKeyDownEvent:M,handleMeridiemKeyDownEvent:z,handleMinuteKeyDownEvent:T,handleSecondKeyDownEvent:A,hour:h,hourFormat:V,localizedDecimalSeparator:N,localizedFractionalSecond:k,localizedHour:I,localizedHourSuffix:K,localizedMeridiem:B,localizedMinute:O,localizedMinuteSuffix:j,localizedSecond:_,localizedSecondSuffix:$,meridiem:w,meridiemOrder:q,minute:m,second:p}=this.time,G=d(h),c=E(r),J=d(m),Q=d(p),W=d(b),X=u!=="bg"&&$,g=V==="12";return n`<div class=${i({[e.timePicker]:!0,[e.showMeridiem]:g,[e.showSecond]:this.showSecond,[e.scale(r)]:!0})} dir=ltr><div class=${i(e.column)} role=group><span .ariaLabel=${o.hourUp} class=${i({[e.button]:!0,[e.buttonHourUp]:!0,[e.buttonTopLeft]:!0})} @click=${this.hourUpClickHandler} role=button><calcite-icon .icon=${a.chevronUp} .scale=${c}></calcite-icon></span><span .ariaLabel=${o.hour} aria-valuemax=23 aria-valuemin=1 .ariaValueNow=${G&&parseInt(h,10)||"0"} .ariaValueText=${h??void 0} class=${i({[e.input]:!0,[e.hour]:!0,[e.inputFocus]:t&&t===this.hourRef.value})} @click=${this.inputClickHandler} @focus=${this.focusHandler} @keydown=${M} role=spinbutton tabindex=0 ${l(this.hourRef)}>${I||"--"}</span><span .ariaLabel=${o.hourDown} class=${i({[e.button]:!0,[e.buttonHourDown]:!0,[e.buttonBottomLeft]:!0})} @click=${this.hourDownClickHandler} role=button><calcite-icon .icon=${a.chevronDown} .scale=${c}></calcite-icon></span></div><span class=${i({[e.delimiter]:!0,[e.hourSuffix]:!0})}>${K}</span><div class=${i(e.column)} role=group><span .ariaLabel=${o.minuteUp} class=${i({[e.button]:!0,[e.buttonMinuteUp]:!0})} @click=${this.minuteUpClickHandler} role=button><calcite-icon .icon=${a.chevronUp} .scale=${c}></calcite-icon></span><span .ariaLabel=${o.minute} aria-valuemax=12 aria-valuemin=1 .ariaValueNow=${J&&parseInt(m,10)||"0"} .ariaValueText=${m??void 0} class=${i({[e.input]:!0,[e.minute]:!0,[e.inputFocus]:t&&t===this.minuteRef.value})} @click=${this.inputClickHandler} @focus=${this.focusHandler} @keydown=${T} role=spinbutton tabindex=0 ${l(this.minuteRef)}>${O||"--"}</span><span .ariaLabel=${o.minuteDown} class=${i({[e.button]:!0,[e.buttonMinuteDown]:!0})} @click=${this.minuteDownClickHandler} role=button><calcite-icon .icon=${a.chevronDown} .scale=${c}></calcite-icon></span></div>${this.showSecond&&n`<span class=${i({[e.delimiter]:!0,[e.minuteSuffix]:!0})}>${j}</span>`||""}${this.showSecond&&n`<div class=${i(e.column)} role=group><span .ariaLabel=${o.secondUp} class=${i({[e.button]:!0,[e.buttonSecondUp]:!0})} @click=${this.secondUpClickHandler} role=button><calcite-icon .icon=${a.chevronUp} .scale=${c}></calcite-icon></span><span .ariaLabel=${o.second} aria-valuemax=59 aria-valuemin=0 .ariaValueNow=${Q&&parseInt(p,10)||"0"} .ariaValueText=${p??void 0} class=${i({[e.input]:!0,[e.second]:!0,[e.inputFocus]:t&&t===this.secondRef.value})} @click=${this.inputClickHandler} @focus=${this.focusHandler} @keydown=${A} role=spinbutton tabindex=0 ${l(this.secondRef)}>${_||"--"}</span><span .ariaLabel=${o.secondDown} class=${i({[e.button]:!0,[e.buttonSecondDown]:!0})} @click=${this.secondDownClickHandler} role=button><calcite-icon .icon=${a.chevronDown} .scale=${c}></calcite-icon></span></div>`||""}${this.showFractionalSecond&&n`<span class=${i({[e.delimiter]:!0,[e.decimalSeparator]:!0})}>${N}</span>`||""}${this.showFractionalSecond&&n`<div class=${i(e.column)} role=group><span .ariaLabel=${o.fractionalSecondUp} class=${i({[e.button]:!0,[e.buttonFractionalSecondUp]:!0})} @click=${this.fractionalSecondUpClickHandler} role=button><calcite-icon .icon=${a.chevronUp} .scale=${c}></calcite-icon></span><span .ariaLabel=${o.fractionalSecond} aria-valuemax=999 aria-valuemin=1 .ariaValueNow=${W&&parseInt(b,10)||"0"} .ariaValueText=${k??void 0} class=${i({[e.input]:!0,[e.fractionalSecond]:!0,[e.inputFocus]:t&&t===this.fractionalSecondRef.value})} @click=${this.inputClickHandler} @focus=${this.focusHandler} @keydown=${P} role=spinbutton tabindex=0 ${l(this.fractionalSecondRef)}>${k||"".padStart(this.stepPrecision,"-")}</span><span .ariaLabel=${o.fractionalSecondDown} class=${i({[e.button]:!0,[e.buttonFractionalSecondDown]:!0})} @click=${this.fractionalSecondDownClickHandler} role=button><calcite-icon .icon=${a.chevronDown} .scale=${c}></calcite-icon></span></div>`||""}${X&&n`<span class=${i({[e.delimiter]:!0,[e.secondSuffix]:!0})}>${$}</span>`||""}${g&&n`<div class=${i({[e.column]:!0,[e.meridiemStart]:q===0||this.direction==="rtl"})} role=group><span .ariaLabel=${o.meridiemUp} class=${i({[e.button]:!0,[e.buttonMeridiemUp]:!0,[e.buttonTopRight]:!0})} @click=${this.meridiemUpClickHandler} role=button><calcite-icon .icon=${a.chevronUp} .scale=${c}></calcite-icon></span><span .ariaLabel=${o.meridiem} aria-valuemax=2 aria-valuemin=1 .ariaValueNow=${w==="PM"&&"2"||"1"} .ariaValueText=${w??void 0} class=${i({[e.input]:!0,[e.meridiem]:!0,[e.inputFocus]:t&&t===this.meridiemRef.value})} @click=${this.inputClickHandler} @focus=${this.focusHandler} @keydown=${z} role=spinbutton tabindex=0 ${l(this.meridiemRef)}>${B||"--"}</span><span .ariaLabel=${o.meridiemDown} class=${i({[e.button]:!0,[e.buttonMeridiemDown]:!0,[e.buttonBottomRight]:!0})} @click=${this.meridiemDownClickHandler} role=button><calcite-icon .icon=${a.chevronDown} .scale=${c}></calcite-icon></span></div>`||""}</div>`}};H("calcite-time-picker",f);export{f as TimePicker};
|
|
2
|
+
import{a as L}from"./HX5G6PEU.js";import{b as y}from"./YJPIZ6DX.js";import{b as d}from"./5IPGJCLD.js";import"./TSZKDMVH.js";import"./YP3AYJH3.js";import{a as F}from"./HIHNZASH.js";import{a as U}from"./62XMTWRN.js";import{a as E,c as C}from"./ZWPNZ5XW.js";import{e as R}from"./XNTVXLSV.js";import"./S5W6RC6X.js";import"./QPZWBDRN.js";import{E as s,F as l,G as D,H as i,S as H,g as S,h as n,p as x}from"./5RP24S6I.js";var e={button:"button",buttonBottomLeft:"button--bottom-left",buttonBottomRight:"button--bottom-right",buttonFractionalSecondDown:"button--fractionalSecond-down",buttonFractionalSecondUp:"button--fractionalSecond-up",buttonHourDown:"button--hour-down",buttonHourUp:"button--hour-up",buttonMeridiemDown:"button--meridiem-down",buttonMeridiemUp:"button--meridiem-up",buttonMinuteDown:"button--minute-down",buttonMinuteUp:"button--minute-up",buttonSecondDown:"button--second-down",buttonSecondUp:"button--second-up",buttonTopLeft:"button--top-left",buttonTopRight:"button--top-right",column:"column",decimalSeparator:"decimal-separator",delimiter:"delimiter",fractionalSecond:"fractionalSecond",hour:"hour",hourSuffix:"hour-suffix",input:"input",inputFocus:"inputFocus",meridiem:"meridiem",minute:"minute",minuteSuffix:"minute-suffix",second:"second",secondSuffix:"second-suffix",showMeridiem:"show-meridiem",showSecond:"show-second",scale:v=>`scale-${v}`,timePicker:"time-picker",meridiemStart:"meridiem--start"},a={chevronUp:"chevron-up",chevronDown:"chevron-down"},Y=S`:host{display:inline-block}.time-picker{display:flex;-webkit-user-select:none;user-select:none;align-items:center;border-width:1px;border-style:solid;font-weight:var(--calcite-font-weight-medium);border-color:var(--calcite-time-picker-border-color, var(--calcite-color-border-3));border-radius:var(--calcite-time-picker-corner-radius, var(--calcite-border-radius-round));color:var(--calcite-time-picker-color, var(--calcite-color-text-1));background-color:var(--calcite-time-picker-background-color, var(--calcite-color-foreground-1));line-height:var(--calcite-font-line-height-md);overflow:hidden}.time-picker .column{display:flex;flex-direction:column}.time-picker .meridiem--start{order:-1}.time-picker .button{display:inline-flex;cursor:pointer;align-items:center;justify-content:center;background-color:var(--calcite-time-picker-background-color, var(--calcite-color-foreground-1))}.time-picker .button:hover,.time-picker .button:focus{outline:2px solid transparent;outline-offset:2px;z-index:var(--calcite-z-index-header);outline-offset:0;background-color:var(--calcite-time-picker-button-background-color-hover, var(--calcite-color-foreground-2))}.time-picker .button:active{background-color:var(--calcite-time-picker-button-background-color-press, var(--calcite-color-foreground-3))}.time-picker .button.top-left{border-start-start-radius:var(--calcite-time-picker-corner-radius, var(--calcite-border-radius-round))}.time-picker .button.bottom-left{border-end-start-radius:var(--calcite-time-picker-corner-radius, var(--calcite-border-radius-round))}.time-picker .button.top-right{border-start-end-radius:var(--calcite-time-picker-corner-radius, var(--calcite-border-radius-round))}.time-picker .button.bottom-right{border-end-end-radius:var(--calcite-time-picker-corner-radius, var(--calcite-border-radius-round))}.time-picker .button calcite-icon{color:var(--calcite-time-picker-icon-color, var(--calcite-color-text-3))}.time-picker .input{display:inline-flex;cursor:pointer;align-items:center;justify-content:center;font-weight:var(--calcite-font-weight-medium);background-color:var(--calcite-time-picker-background-color, var(--calcite-color-foreground-1))}.time-picker .input:hover{box-shadow:inset 0 0 0 2px var(--calcite-time-picker-input-border-color-hover, var(--calcite-color-foreground-2));z-index:var(--calcite-z-index-header)}.time-picker .input:focus,.time-picker .input:hover:focus{outline:2px solid transparent;outline-offset:2px;outline-offset:0}.time-picker .input.inputFocus,.time-picker .input:hover.inputFocus{box-shadow:inset 0 0 0 2px var(--calcite-time-picker-input-border-color-press, var(--calcite-color-brand));z-index:var(--calcite-z-index-header)}.time-picker.scale-s{font-size:var(--calcite-font-size-relative-base)}.time-picker.scale-s .button,.time-picker.scale-s .input{padding-inline:var(--calcite-spacing-sm);padding-block:var(--calcite-spacing-xxs)}.time-picker.scale-s:not(.show-meridiem) .delimiter:last-child{padding-inline-end:var(--calcite-spacing-md)}.time-picker.scale-m{font-size:var(--calcite-font-size-relative-md)}.time-picker.scale-m .button,.time-picker.scale-m .input{padding-inline:var(--calcite-spacing-md);padding-block:var(--calcite-spacing-sm)}.time-picker.scale-m:not(.show-meridiem) .delimiter:last-child{padding-inline-end:var(--calcite-spacing-xl)}.time-picker.scale-l{font-size:var(--calcite-font-size-relative-lg)}.time-picker.scale-l .button,.time-picker.scale-l .input{padding-inline:var(--calcite-spacing-lg);padding-block:var(--calcite-spacing-md)}.time-picker.scale-l:not(.show-meridiem) .delimiter:last-child{padding-inline-end:var(--calcite-spacing-xxl)}:host([hidden]){display:none}[hidden]{display:none}`,f=class extends D{constructor(){super(),this.direction=R(),this.fractionalSecondRef=s(),this.hourRef=s(),this.meridiemRef=s(),this.minuteRef=s(),this.pointerActivated=!1,this.secondRef=s(),this.messages=F(),this.focusSetter=U()(this),this.showFractionalSecond=!1,this.showSecond=!1,this.time=L(this),this.hourFormat="user",this.scale="m",this.step=60,this.value=null,this.calciteTimePickerChange=x({cancelable:!1}),this.listen("blur",this.blurHandler),this.listen("calciteTimeChange",this.timeChangeHandler),this.listen("keydown",this.keyDownHandler),this.listen("pointerdown",this.pointerDownHandler)}static{this.properties={activeEl:[16,{},{state:!0}],showFractionalSecond:[16,{},{state:!0}],showSecond:[16,{},{state:!0}],time:[0,{},{attribute:!1}],hourFormat:[3,{},{reflect:!0}],messageOverrides:[0,{},{attribute:!1}],numberingSystem:1,scale:[3,{},{reflect:!0}],step:[11,{},{reflect:!0,type:Number}],value:1}}static{this.shadowRootOptions={mode:"open",delegatesFocus:!0}}static{this.styles=Y}async setFocus(t){return this.focusSetter(()=>this.el,t)}connectedCallback(){super.connectedCallback(),this.toggleSecond()}willUpdate(t){t.has("step")&&(this.hasUpdated||this.step!==60)&&this.toggleSecond(),t.has("value")&&(this.hasUpdated||this.value!==null)&&this.time.setValue(this.value)}blurHandler(){this.activeEl=void 0,this.pointerActivated=!1}keyDownHandler(t){this.pointerActivated=!1;let{defaultPrevented:o,key:r}=t;if(o)return;let{hourFormat:u}=this.time;switch(this.activeEl){case this.hourRef.value:r==="ArrowRight"&&(this.focusPart("minute"),t.preventDefault());break;case this.minuteRef.value:switch(r){case"ArrowLeft":this.focusPart("hour"),t.preventDefault();break;case"ArrowRight":this.step!==60?(this.focusPart("second"),t.preventDefault()):u==="12"&&(this.focusPart("meridiem"),t.preventDefault());break}break;case this.secondRef.value:switch(r){case"ArrowLeft":this.focusPart("minute"),t.preventDefault();break;case"ArrowRight":this.showFractionalSecond?this.focusPart("fractionalSecond"):u==="12"&&(this.focusPart("meridiem"),t.preventDefault());break}break;case this.fractionalSecondRef.value:switch(r){case"ArrowLeft":this.focusPart("second"),t.preventDefault();break;case"ArrowRight":u==="12"&&(this.focusPart("meridiem"),t.preventDefault());break}break;case this.meridiemRef.value:r==="ArrowLeft"&&(this.showFractionalSecond?this.focusPart("fractionalSecond"):this.step!==60?(this.focusPart("second"),t.preventDefault()):(this.focusPart("minute"),t.preventDefault()));break}}pointerDownHandler(){this.pointerActivated=!0}async focusPart(t){await C(this),(t==="hour"?this.hourRef:t==="minute"?this.minuteRef:t==="second"?this.secondRef:t==="fractionalSecond"?this.fractionalSecondRef:this.meridiemRef).value?.focus()}focusHandler(t){this.pointerActivated||(this.activeEl=t.currentTarget)}fractionalSecondDownClickHandler(){this.activeEl=this.fractionalSecondRef.value,this.activeEl&&this.activeEl.focus(),this.time.nudgeFractionalSecond("down")}fractionalSecondUpClickHandler(){this.activeEl=this.fractionalSecondRef.value,this.activeEl&&this.activeEl.focus(),this.time.nudgeFractionalSecond("up")}hourDownClickHandler(){this.activeEl=this.hourRef.value,this.activeEl&&this.activeEl.focus(),this.time.decrementHour()}hourUpClickHandler(){this.activeEl=this.hourRef.value,this.activeEl&&this.activeEl.focus(),this.time.incrementHour()}inputClickHandler(t){this.activeEl=t.target}meridiemUpClickHandler(){this.activeEl=this.meridiemRef.value,this.activeEl&&this.activeEl.focus(),this.time.toggleMeridiem("up")}meridiemDownClickHandler(){this.activeEl=this.meridiemRef.value,this.activeEl&&this.activeEl.focus(),this.time.toggleMeridiem("down")}minuteDownClickHandler(){this.activeEl=this.minuteRef.value,this.activeEl&&this.activeEl.focus(),this.time.decrementMinute()}minuteUpClickHandler(){this.activeEl=this.minuteRef.value,this.activeEl&&this.activeEl.focus(),this.time.incrementMinute()}secondDownClickHandler(){this.activeEl=this.secondRef.value,this.activeEl&&this.activeEl.focus(),this.time.decrementSecond()}secondUpClickHandler(){this.activeEl=this.secondRef.value,this.activeEl?.focus(),this.time.incrementSecond()}timeChangeHandler(t){t.stopPropagation();let o=t.detail;o!==this.value&&(this.value=o),this.calciteTimePickerChange.emit()}toggleSecond(){this.showSecond=this.step<60,this.stepPrecision=y(this.step),this.showFractionalSecond=this.stepPrecision>0}render(){let{activeEl:t,messages:o,scale:r}=this,{_lang:u}=o,{fractionalSecond:b,handleFractionalSecondKeyDownEvent:P,handleHourKeyDownEvent:M,handleMeridiemKeyDownEvent:z,handleMinuteKeyDownEvent:T,handleSecondKeyDownEvent:A,hour:h,hourFormat:V,localizedDecimalSeparator:N,localizedFractionalSecond:k,localizedHour:I,localizedHourSuffix:K,localizedMeridiem:B,localizedMinute:O,localizedMinuteSuffix:j,localizedSecond:_,localizedSecondSuffix:$,meridiem:w,meridiemOrder:q,minute:m,second:p}=this.time,G=d(h),c=E(r),J=d(m),Q=d(p),W=d(b),X=u!=="bg"&&$,g=V==="12";return n`<div class=${i({[e.timePicker]:!0,[e.showMeridiem]:g,[e.showSecond]:this.showSecond,[e.scale(r)]:!0})} dir=ltr><div class=${i(e.column)} role=group><span .ariaLabel=${o.hourUp} class=${i({[e.button]:!0,[e.buttonHourUp]:!0,[e.buttonTopLeft]:!0})} @click=${this.hourUpClickHandler} role=button><calcite-icon .icon=${a.chevronUp} .scale=${c}></calcite-icon></span><span .ariaLabel=${o.hour} aria-valuemax=23 aria-valuemin=1 .ariaValueNow=${G&&parseInt(h,10)||"0"} .ariaValueText=${h??void 0} class=${i({[e.input]:!0,[e.hour]:!0,[e.inputFocus]:t&&t===this.hourRef.value})} @click=${this.inputClickHandler} @focus=${this.focusHandler} @keydown=${M} role=spinbutton tabindex=0 ${l(this.hourRef)}>${I||"--"}</span><span .ariaLabel=${o.hourDown} class=${i({[e.button]:!0,[e.buttonHourDown]:!0,[e.buttonBottomLeft]:!0})} @click=${this.hourDownClickHandler} role=button><calcite-icon .icon=${a.chevronDown} .scale=${c}></calcite-icon></span></div><span class=${i({[e.delimiter]:!0,[e.hourSuffix]:!0})}>${K}</span><div class=${i(e.column)} role=group><span .ariaLabel=${o.minuteUp} class=${i({[e.button]:!0,[e.buttonMinuteUp]:!0})} @click=${this.minuteUpClickHandler} role=button><calcite-icon .icon=${a.chevronUp} .scale=${c}></calcite-icon></span><span .ariaLabel=${o.minute} aria-valuemax=12 aria-valuemin=1 .ariaValueNow=${J&&parseInt(m,10)||"0"} .ariaValueText=${m??void 0} class=${i({[e.input]:!0,[e.minute]:!0,[e.inputFocus]:t&&t===this.minuteRef.value})} @click=${this.inputClickHandler} @focus=${this.focusHandler} @keydown=${T} role=spinbutton tabindex=0 ${l(this.minuteRef)}>${O||"--"}</span><span .ariaLabel=${o.minuteDown} class=${i({[e.button]:!0,[e.buttonMinuteDown]:!0})} @click=${this.minuteDownClickHandler} role=button><calcite-icon .icon=${a.chevronDown} .scale=${c}></calcite-icon></span></div>${this.showSecond&&n`<span class=${i({[e.delimiter]:!0,[e.minuteSuffix]:!0})}>${j}</span>`||""}${this.showSecond&&n`<div class=${i(e.column)} role=group><span .ariaLabel=${o.secondUp} class=${i({[e.button]:!0,[e.buttonSecondUp]:!0})} @click=${this.secondUpClickHandler} role=button><calcite-icon .icon=${a.chevronUp} .scale=${c}></calcite-icon></span><span .ariaLabel=${o.second} aria-valuemax=59 aria-valuemin=0 .ariaValueNow=${Q&&parseInt(p,10)||"0"} .ariaValueText=${p??void 0} class=${i({[e.input]:!0,[e.second]:!0,[e.inputFocus]:t&&t===this.secondRef.value})} @click=${this.inputClickHandler} @focus=${this.focusHandler} @keydown=${A} role=spinbutton tabindex=0 ${l(this.secondRef)}>${_||"--"}</span><span .ariaLabel=${o.secondDown} class=${i({[e.button]:!0,[e.buttonSecondDown]:!0})} @click=${this.secondDownClickHandler} role=button><calcite-icon .icon=${a.chevronDown} .scale=${c}></calcite-icon></span></div>`||""}${this.showFractionalSecond&&n`<span class=${i({[e.delimiter]:!0,[e.decimalSeparator]:!0})}>${N}</span>`||""}${this.showFractionalSecond&&n`<div class=${i(e.column)} role=group><span .ariaLabel=${o.fractionalSecondUp} class=${i({[e.button]:!0,[e.buttonFractionalSecondUp]:!0})} @click=${this.fractionalSecondUpClickHandler} role=button><calcite-icon .icon=${a.chevronUp} .scale=${c}></calcite-icon></span><span .ariaLabel=${o.fractionalSecond} aria-valuemax=999 aria-valuemin=1 .ariaValueNow=${W&&parseInt(b,10)||"0"} .ariaValueText=${k??void 0} class=${i({[e.input]:!0,[e.fractionalSecond]:!0,[e.inputFocus]:t&&t===this.fractionalSecondRef.value})} @click=${this.inputClickHandler} @focus=${this.focusHandler} @keydown=${P} role=spinbutton tabindex=0 ${l(this.fractionalSecondRef)}>${k||"".padStart(this.stepPrecision,"-")}</span><span .ariaLabel=${o.fractionalSecondDown} class=${i({[e.button]:!0,[e.buttonFractionalSecondDown]:!0})} @click=${this.fractionalSecondDownClickHandler} role=button><calcite-icon .icon=${a.chevronDown} .scale=${c}></calcite-icon></span></div>`||""}${X&&n`<span class=${i({[e.delimiter]:!0,[e.secondSuffix]:!0})}>${$}</span>`||""}${g&&n`<div class=${i({[e.column]:!0,[e.meridiemStart]:q===0||this.direction==="rtl"})} role=group><span .ariaLabel=${o.meridiemUp} class=${i({[e.button]:!0,[e.buttonMeridiemUp]:!0,[e.buttonTopRight]:!0})} @click=${this.meridiemUpClickHandler} role=button><calcite-icon .icon=${a.chevronUp} .scale=${c}></calcite-icon></span><span .ariaLabel=${o.meridiem} aria-valuemax=2 aria-valuemin=1 .ariaValueNow=${w==="PM"&&"2"||"1"} .ariaValueText=${w??void 0} class=${i({[e.input]:!0,[e.meridiem]:!0,[e.inputFocus]:t&&t===this.meridiemRef.value})} @click=${this.inputClickHandler} @focus=${this.focusHandler} @keydown=${z} role=spinbutton tabindex=0 ${l(this.meridiemRef)}>${B||"--"}</span><span .ariaLabel=${o.meridiemDown} class=${i({[e.button]:!0,[e.buttonMeridiemDown]:!0,[e.buttonBottomRight]:!0})} @click=${this.meridiemDownClickHandler} role=button><calcite-icon .icon=${a.chevronDown} .scale=${c}></calcite-icon></span></div>`||""}</div>`}};H("calcite-time-picker",f);export{f as TimePicker};
|