@esri/calcite-components 5.1.0-next.30 → 5.1.0-next.32
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/{SAK5TSCY.js → 22MGLARN.js} +1 -1
- package/dist/cdn/{3LVPP52S.js → 24WUZLW2.js} +1 -1
- package/dist/cdn/{KW4BHBBW.js → 2VSJWHDS.js} +1 -1
- package/dist/cdn/{CJQWESQ2.js → 3DLX25VC.js} +1 -1
- package/dist/cdn/{IDJOHYLJ.js → 3HPSEXSM.js} +1 -1
- package/dist/cdn/{X62QRK2A.js → 3KOTDKQ3.js} +1 -1
- package/dist/cdn/{M6TXECYZ.js → 3UHHSRWM.js} +1 -1
- package/dist/cdn/{GBL55CBG.js → 3W2ACTQJ.js} +1 -1
- package/dist/cdn/{RFQSI4MJ.js → 3WPDI5JK.js} +1 -1
- package/dist/cdn/{UESKV37D.js → 3WYS2S6B.js} +1 -1
- package/dist/cdn/{WQOYAKXN.js → 3X6RHNK5.js} +1 -1
- package/dist/cdn/{3UU6PUEZ.js → 4EFGI436.js} +1 -1
- package/dist/cdn/{L7TOPWGR.js → 4HNTE372.js} +1 -1
- package/dist/cdn/4MYBJY3I.js +4 -0
- package/dist/cdn/{OLXLHWGL.js → 56JIVC5U.js} +1 -1
- package/dist/cdn/{ICNEOIAY.js → 5F7B5N7E.js} +1 -1
- package/dist/cdn/{LOJGQFL6.js → 5JPGHQAA.js} +1 -1
- package/dist/cdn/{5DEP6UL7.js → 5TCMVPWR.js} +1 -1
- package/dist/cdn/{LVZ24HEK.js → 5UBJXHQ4.js} +1 -1
- package/dist/cdn/{GEWRKDNT.js → 6BL3D5XF.js} +1 -1
- package/dist/cdn/{DSY7BOJJ.js → 6JBQNMWJ.js} +1 -1
- package/dist/cdn/72YFLRKF.js +2 -0
- package/dist/cdn/{EHTWHFIN.js → 7OM2LMJ6.js} +1 -1
- package/dist/cdn/{JEALIYFT.js → 7RVCYH5F.js} +1 -1
- package/dist/cdn/{VL7C7DUX.js → 7VJAQKRN.js} +1 -1
- package/dist/cdn/{7I5EKIDO.js → 7WMNQ2AP.js} +1 -1
- package/dist/cdn/{UQC63ORI.js → A6UISKQE.js} +1 -1
- package/dist/cdn/{FS3FIZQ7.js → AM5RGOMF.js} +1 -1
- package/dist/cdn/{TWHGJHW2.js → ATHQKVWN.js} +1 -1
- package/dist/cdn/{YSWTVICN.js → B2VI2OOM.js} +1 -1
- package/dist/cdn/{F6O2MDAB.js → B7OKLCOG.js} +1 -1
- package/dist/cdn/{AQNYPIPX.js → BHMEIS7R.js} +1 -1
- package/dist/cdn/{2I24Q6HG.js → BMTE6XSN.js} +1 -1
- package/dist/cdn/{KI33EXTI.js → BP6HIS6R.js} +1 -1
- package/dist/cdn/{H4ESHMLA.js → C35BJWGG.js} +1 -1
- package/dist/cdn/C4TO2II2.js +2 -0
- package/dist/cdn/{R3Z5LCK3.js → C572FRQJ.js} +1 -1
- package/dist/cdn/{D3G4KNL4.js → CCLIDJM7.js} +1 -1
- package/dist/cdn/{AJTOSFDH.js → CE7R3UYH.js} +1 -1
- package/dist/cdn/{HKSMMZUW.js → CEGA67IK.js} +1 -1
- package/dist/cdn/{6LODJ26H.js → D442OO5E.js} +1 -1
- package/dist/cdn/{2LUMWQZY.js → D5BVW533.js} +1 -1
- package/dist/cdn/{TXRNHBI5.js → D7MB2QYM.js} +1 -1
- package/dist/cdn/{ZC6A5OHK.js → DFIXTPNI.js} +1 -1
- package/dist/cdn/{CBWGCOIO.js → DHETEF64.js} +1 -1
- package/dist/cdn/{RRVD3RYN.js → DJK2S3RV.js} +1 -1
- package/dist/cdn/{AHEDZHQ2.js → E3M6BIGL.js} +1 -1
- package/dist/cdn/E43U2OA6.js +2 -0
- package/dist/cdn/{L7DEPZAJ.js → EW5ATY4Y.js} +1 -1
- package/dist/cdn/{7YQW7B7E.js → EZV7G672.js} +1 -1
- package/dist/cdn/{KJIYAJA4.js → FABQH2JN.js} +1 -1
- package/dist/cdn/{47ZWM6SP.js → FCY3I57A.js} +1 -1
- package/dist/cdn/{V4RO7LWG.js → FEJ3PGG6.js} +1 -1
- package/dist/cdn/{J3P6S2E2.js → FIY7C3JF.js} +1 -1
- package/dist/cdn/{JWEKZH6L.js → FMDKMRWT.js} +1 -1
- package/dist/cdn/{HXIVUHZU.js → FVEGUFRT.js} +1 -1
- package/dist/cdn/{MORUF5PU.js → FWUGB2BB.js} +1 -1
- package/dist/cdn/{DQJ3PS72.js → GQINKYUC.js} +1 -1
- package/dist/cdn/{GLYCZM27.js → GUKJ57CV.js} +1 -1
- package/dist/cdn/{5DEXYRFH.js → GX57PRUQ.js} +1 -1
- package/dist/cdn/{EUJFL2WJ.js → GXCRQHSS.js} +1 -1
- package/dist/cdn/{S6WMWFN7.js → GXZ5FHY6.js} +1 -1
- package/dist/cdn/{TZAUE2UM.js → GYGJFBY5.js} +1 -1
- package/dist/cdn/HD2DXK6Y.js +2 -0
- package/dist/cdn/{34WUOWO6.js → HYSIKQCM.js} +1 -1
- package/dist/cdn/{XS5BO3QC.js → I3KW3HKN.js} +1 -1
- package/dist/cdn/{OGQ6UAE2.js → I77OHY4O.js} +1 -1
- package/dist/cdn/{WUPDOPI3.js → IAZ3MNZ7.js} +1 -1
- package/dist/cdn/{CJTB2G5O.js → ILEBQG75.js} +1 -1
- package/dist/cdn/{AOQ34WQ6.js → JDX7ZPUX.js} +1 -1
- package/dist/cdn/{WN6LIOTB.js → JFZJLRVI.js} +1 -1
- package/dist/cdn/{QXFX3OAF.js → JSIX4HVD.js} +1 -1
- package/dist/cdn/{UYAS53RY.js → JVF4V3AC.js} +1 -1
- package/dist/cdn/{STISOSDG.js → KBGP6FTE.js} +1 -1
- package/dist/cdn/{VIB4WBRW.js → KMPSVXAM.js} +1 -1
- package/dist/cdn/{AVYPI52K.js → KR4UGOJE.js} +1 -1
- package/dist/cdn/{XWGKICAS.js → KRNJYAX3.js} +1 -1
- package/dist/cdn/{NWIU5L4M.js → KUIELW24.js} +1 -1
- package/dist/cdn/L5N2HOX2.js +2 -0
- package/dist/cdn/{3FXLCXEF.js → L6VNEZBN.js} +1 -1
- package/dist/cdn/{SMHE5GTR.js → LAXSCOAI.js} +1 -1
- package/dist/cdn/LKABIZFY.js +2 -0
- package/dist/cdn/{MXDC3OC2.js → LLMPJQRC.js} +1 -1
- package/dist/cdn/{HWBVGZHG.js → LY63K7W7.js} +1 -1
- package/dist/cdn/{CNQVNMR7.js → LZ6XXGIN.js} +1 -1
- package/dist/cdn/{C32S4HGX.js → LZGEY4CG.js} +1 -1
- package/dist/cdn/{BXIBMOE6.js → MA5JGZLO.js} +1 -1
- package/dist/cdn/{6KMNIG3H.js → MDCWKO4U.js} +1 -1
- package/dist/cdn/{6742QPEE.js → MKEO3RT5.js} +1 -1
- package/dist/cdn/{YRHSBDX4.js → MKRRWTRR.js} +1 -1
- package/dist/cdn/{QVMVZTAX.js → MNPGZ56P.js} +1 -1
- package/dist/cdn/{A7RILTOO.js → MQNCDT57.js} +1 -1
- package/dist/cdn/{DDDUIVNA.js → NAFJZDY7.js} +1 -1
- package/dist/cdn/{LTDQ3KMS.js → NEWDEBHJ.js} +1 -1
- package/dist/cdn/{B3EBGYCI.js → NGYZCI3Q.js} +1 -1
- package/dist/cdn/{ODAV2DWN.js → NLE3IGTP.js} +1 -1
- package/dist/cdn/{FBBEDCIC.js → NO7AP46X.js} +1 -1
- package/dist/cdn/{X4CROIR6.js → NOFIMGT3.js} +1 -1
- package/dist/cdn/{FIGNBXC4.js → NPPN4VAI.js} +1 -1
- package/dist/cdn/{XOT64MSN.js → O7E3UPWU.js} +1 -1
- package/dist/cdn/{RNFEU4JP.js → OIIDGMQ2.js} +1 -1
- package/dist/cdn/{DUYCNBSR.js → OL5A3R4E.js} +1 -1
- package/dist/cdn/{NWCFNDM2.js → P4Y5TOCE.js} +1 -1
- package/dist/cdn/{WMWPUGOP.js → POFJC7MO.js} +1 -1
- package/dist/cdn/{4RP3OGCP.js → QGJFKLSO.js} +1 -1
- package/dist/cdn/{7GTG7SUF.js → QIW76AT5.js} +1 -1
- package/dist/cdn/{HDQ72ZNE.js → QMRG7YHX.js} +1 -1
- package/dist/cdn/{4CGPBRFI.js → QTN3FWYT.js} +1 -1
- package/dist/cdn/{7ZBXJRPO.js → RCNE5VLN.js} +1 -1
- package/dist/cdn/RF426G67.js +2 -0
- package/dist/cdn/{ARNANVZZ.js → RZLOI7W3.js} +1 -1
- package/dist/cdn/{G5IYZRZD.js → S4KKKZVG.js} +1 -1
- package/dist/cdn/SE7UYZ7T.js +2 -0
- package/dist/cdn/{P2ZPFKR7.js → SQVO3YEM.js} +1 -1
- package/dist/cdn/{JPDWZDO2.js → ST7CWXBK.js} +1 -1
- package/dist/cdn/{QAG6VFG2.js → SWCWZGPR.js} +1 -1
- package/dist/cdn/{ITD5YGM3.js → T5CPYRS5.js} +1 -1
- package/dist/cdn/{GNUO7A4Y.js → T6LYGQKH.js} +1 -1
- package/dist/cdn/{MWS2HEQR.js → U7YJIWTP.js} +1 -1
- package/dist/cdn/{46XYBXSA.js → UBML5ZUP.js} +1 -1
- package/dist/cdn/{DJ5TODX7.js → UJ5RBUVT.js} +1 -1
- package/dist/cdn/{CPIWY5GX.js → V6O3HMX6.js} +1 -1
- package/dist/cdn/VD2ENH2H.js +2 -0
- package/dist/cdn/{HIHNC2W6.js → VHWWXU2W.js} +1 -1
- package/dist/cdn/{BS547LGW.js → VQJKSG53.js} +1 -1
- package/dist/cdn/{R2DCCWBB.js → VSCUMT6U.js} +1 -1
- package/dist/cdn/{6FSL67XJ.js → WVONGP7X.js} +1 -1
- package/dist/cdn/{AFGHAQUQ.js → X3E4ZIEH.js} +1 -1
- package/dist/cdn/{H43C4DT4.js → XQFOK4M2.js} +1 -1
- package/dist/cdn/XZXKOU5D.js +2 -0
- package/dist/cdn/{H5G45SF4.js → Y3U2RR6Y.js} +1 -1
- package/dist/cdn/{74EOXSPH.js → Y5DZNG67.js} +1 -1
- package/dist/cdn/{QRH3LFLT.js → YK5D7HIQ.js} +1 -1
- package/dist/cdn/{E3OAYCPO.js → YOAMCITX.js} +1 -1
- package/dist/cdn/{NYL2Z7AD.js → YZHMIP23.js} +1 -1
- package/dist/cdn/{P32KQQAD.js → Z5LWVUNY.js} +1 -1
- package/dist/cdn/{ZHZF3WW4.js → ZCUJCRF6.js} +1 -1
- package/dist/cdn/{DWIB4FVP.js → ZGTMZDF4.js} +1 -1
- package/dist/cdn/ZL464KHC.js +2 -0
- package/dist/cdn/{O5WPS55F.js → ZLJGXS2O.js} +1 -1
- package/dist/cdn/{66BQUAEF.js → ZPPRQ4E2.js} +1 -1
- package/dist/cdn/{MPGZXCBO.js → ZTIFFVWT.js} +1 -1
- package/dist/cdn/{AOP3NH2U.js → ZVPVSCBT.js} +1 -1
- package/dist/cdn/index.js +1 -1
- package/dist/chunks/ClearButton.js +16 -0
- package/dist/chunks/dom.js +40 -21
- package/dist/chunks/runtime.js +4 -4
- package/dist/components/calcite-action/customElement.js +1 -1
- package/dist/components/calcite-chip/customElement.js +1 -1
- package/dist/components/calcite-combobox/customElement.js +44 -52
- package/dist/components/calcite-combobox/index.js +2 -1
- package/dist/components/calcite-dialog/customElement.d.ts +1 -1
- package/dist/components/calcite-dropdown/customElement.d.ts +1 -1
- package/dist/components/calcite-input/customElement.js +11 -11
- package/dist/components/calcite-input/index.js +1 -0
- package/dist/components/calcite-input-number/customElement.js +10 -10
- package/dist/components/calcite-input-number/index.js +1 -0
- package/dist/components/calcite-input-text/customElement.js +5 -4
- package/dist/components/calcite-input-text/index.js +1 -0
- package/dist/components/calcite-menu/customElement.js +1 -1
- package/dist/components/calcite-shell-panel/customElement.d.ts +2 -2
- package/dist/components/calcite-tab-title/customElement.js +1 -1
- package/dist/components/calcite-text-area/customElement.js +1 -1
- package/dist/components/calcite-time-picker/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/supported-browsers.json +1 -1
- package/dist/docs/vscode.html-custom-data.json +1 -1
- package/dist/docs/web-types.json +1 -1
- package/package.json +7 -7
- package/dist/cdn/57CIL36H.js +0 -2
- package/dist/cdn/7Q6FVOSE.js +0 -2
- package/dist/cdn/7WMQKIBY.js +0 -2
- package/dist/cdn/BYS4GNCX.js +0 -2
- package/dist/cdn/JPE6LVAD.js +0 -2
- package/dist/cdn/LK7OAPDO.js +0 -2
- package/dist/cdn/TRMTKJYB.js +0 -2
- package/dist/cdn/TTFYMTZC.js +0 -2
- package/dist/cdn/VE3ULCBL.js +0 -2
- package/dist/cdn/Z445ZVWS.js +0 -2
- package/dist/cdn/Z5FNOUD3.js +0 -3
package/dist/cdn/Z5FNOUD3.js
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{b as ne}from"./ZC6A5OHK.js";import{a as ie,l as oe}from"./BYS4GNCX.js";import{Q as re}from"./CJQWESQ2.js";var se=["input:not([inert])","select:not([inert])","textarea:not([inert])","a[href]:not([inert])","button:not([inert])","[tabindex]:not(slot):not([inert])","audio[controls]:not([inert])","video[controls]:not([inert])",'[contenteditable]:not([contenteditable="false"]):not([inert])',"details>summary:first-of-type:not([inert])","details:not([inert])"],B=se.join(","),ce=typeof Element>"u",D=ce?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,K=!ce&&Element.prototype.getRootNode?function(a){var e;return a==null||(e=a.getRootNode)===null||e===void 0?void 0:e.call(a)}:function(a){return a?.ownerDocument},j=function a(e,t){var r;t===void 0&&(t=!0);var u=e==null||(r=e.getAttribute)===null||r===void 0?void 0:r.call(e,"inert"),s=u===""||u==="true",n=s||t&&e&&a(e.parentNode);return n},Se=function(e){var t,r=e==null||(t=e.getAttribute)===null||t===void 0?void 0:t.call(e,"contenteditable");return r===""||r==="true"},le=function(e,t,r){if(j(e))return[];var u=Array.prototype.slice.apply(e.querySelectorAll(B));return t&&D.call(e,B)&&u.unshift(e),u=u.filter(r),u},fe=function a(e,t,r){for(var u=[],s=Array.from(e);s.length;){var n=s.shift();if(!j(n,!1))if(n.tagName==="SLOT"){var d=n.assignedElements(),l=d.length?d:n.children,y=a(l,!0,r);r.flatten?u.push.apply(u,y):u.push({scopeParent:n,candidates:y})}else{var T=D.call(n,B);T&&r.filter(n)&&(t||!e.includes(n))&&u.push(n);var w=n.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(n),S=!j(w,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(n));if(w&&S){var C=a(w===!0?n.children:w.children,!0,r);r.flatten?u.push.apply(u,C):u.push({scopeParent:n,candidates:C})}else s.unshift.apply(s,n.children)}}return u},de=function(e){return!isNaN(parseInt(e.getAttribute("tabindex"),10))},E=function(e){if(!e)throw new Error("No node provided");return e.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||Se(e))&&!de(e)?0:e.tabIndex},ke=function(e,t){var r=E(e);return r<0&&t&&!de(e)?0:r},De=function(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex},ve=function(e){return e.tagName==="INPUT"},Re=function(e){return ve(e)&&e.type==="hidden"},Ce=function(e){var t=e.tagName==="DETAILS"&&Array.prototype.slice.apply(e.children).some(function(r){return r.tagName==="SUMMARY"});return t},Oe=function(e,t){for(var r=0;r<e.length;r++)if(e[r].checked&&e[r].form===t)return e[r]},Ae=function(e){if(!e.name)return!0;var t=e.form||K(e),r=function(d){return t.querySelectorAll('input[type="radio"][name="'+d+'"]')},u;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")u=r(window.CSS.escape(e.name));else try{u=r(e.name)}catch(n){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",n.message),!1}var s=Oe(u,e.form);return!s||s===e},Ie=function(e){return ve(e)&&e.type==="radio"},Pe=function(e){return Ie(e)&&!Ae(e)},xe=function(e){var t,r=e&&K(e),u=(t=r)===null||t===void 0?void 0:t.host,s=!1;if(r&&r!==e){var n,d,l;for(s=!!((n=u)!==null&&n!==void 0&&(d=n.ownerDocument)!==null&&d!==void 0&&d.contains(u)||e!=null&&(l=e.ownerDocument)!==null&&l!==void 0&&l.contains(e));!s&&u;){var y,T,w;r=K(u),u=(y=r)===null||y===void 0?void 0:y.host,s=!!((T=u)!==null&&T!==void 0&&(w=T.ownerDocument)!==null&&w!==void 0&&w.contains(u))}}return s},ue=function(e){var t=e.getBoundingClientRect(),r=t.width,u=t.height;return r===0&&u===0},Le=function(e,t){var r=t.displayCheck,u=t.getShadowRoot;if(getComputedStyle(e).visibility==="hidden")return!0;var s=D.call(e,"details>summary:first-of-type"),n=s?e.parentElement:e;if(D.call(n,"details:not([open]) *"))return!0;if(!r||r==="full"||r==="legacy-full"){if(typeof u=="function"){for(var d=e;e;){var l=e.parentElement,y=K(e);if(l&&!l.shadowRoot&&u(l)===!0)return ue(e);e.assignedSlot?e=e.assignedSlot:!l&&y!==e.ownerDocument?e=y.host:e=l}e=d}if(xe(e))return!e.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return ue(e);return!1},Be=function(e){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))for(var t=e.parentElement;t;){if(t.tagName==="FIELDSET"&&t.disabled){for(var r=0;r<t.children.length;r++){var u=t.children.item(r);if(u.tagName==="LEGEND")return D.call(t,"fieldset[disabled] *")?!0:!u.contains(e)}return!0}t=t.parentElement}return!1},M=function(e,t){return!(t.disabled||j(t)||Re(t)||Le(t,e)||Ce(t)||Be(t))},$=function(e,t){return!(Pe(t)||E(t)<0||!M(e,t))},Ke=function(e){var t=parseInt(e.getAttribute("tabindex"),10);return!!(isNaN(t)||t>=0)},je=function a(e){var t=[],r=[];return e.forEach(function(u,s){var n=!!u.scopeParent,d=n?u.scopeParent:u,l=ke(d,n),y=n?a(u.candidates):d;l===0?n?t.push.apply(t,y):t.push(d):r.push({documentOrder:s,tabIndex:l,item:u,isScope:n,content:y})}),r.sort(De).reduce(function(u,s){return s.isScope?u.push.apply(u,s.content):u.push(s.content),u},[]).concat(t)},be=function(e,t){t=t||{};var r;return t.getShadowRoot?r=fe([e],t.includeContainer,{filter:$.bind(null,t),flatten:!1,getShadowRoot:t.getShadowRoot,shadowRootFilter:Ke}):r=le(e,t.includeContainer,$.bind(null,t)),je(r)},he=function(e,t){t=t||{};var r;return t.getShadowRoot?r=fe([e],t.includeContainer,{filter:M.bind(null,t),flatten:!0,getShadowRoot:t.getShadowRoot}):r=le(e,t.includeContainer,M.bind(null,t)),r},R=function(e,t){if(t=t||{},!e)throw new Error("No node provided");return D.call(e,B)===!1?!1:$(t,e)},Me=se.concat("iframe").join(","),G=function(e,t){if(t=t||{},!e)throw new Error("No node provided");return D.call(e,Me)===!1?!1:M(t,e)};function Y(a,e){(e==null||e>a.length)&&(e=a.length);for(var t=0,r=Array(e);t<e;t++)r[t]=a[t];return r}function Ge(a){if(Array.isArray(a))return Y(a)}function _e(a,e,t){return(e=$e(e))in a?Object.defineProperty(a,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):a[e]=t,a}function qe(a){if(typeof Symbol<"u"&&a[Symbol.iterator]!=null||a["@@iterator"]!=null)return Array.from(a)}function Ve(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
3
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function pe(a,e){var t=Object.keys(a);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(a);e&&(r=r.filter(function(u){return Object.getOwnPropertyDescriptor(a,u).enumerable})),t.push.apply(t,r)}return t}function ye(a){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?pe(Object(t),!0).forEach(function(r){_e(a,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(t)):pe(Object(t)).forEach(function(r){Object.defineProperty(a,r,Object.getOwnPropertyDescriptor(t,r))})}return a}function Ue(a){return Ge(a)||qe(a)||Ye(a)||Ve()}function We(a,e){if(typeof a!="object"||!a)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var r=t.call(a,e);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(a)}function $e(a){var e=We(a,"string");return typeof e=="symbol"?e:e+""}function Ye(a,e){if(a){if(typeof a=="string")return Y(a,e);var t={}.toString.call(a).slice(8,-1);return t==="Object"&&a.constructor&&(t=a.constructor.name),t==="Map"||t==="Set"?Array.from(a):t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?Y(a,e):void 0}}var ge={activateTrap:function(e,t){if(e.length>0){var r=e[e.length-1];r!==t&&r._setPausedState(!0)}var u=e.indexOf(t);u===-1||e.splice(u,1),e.push(t)},deactivateTrap:function(e,t){var r=e.indexOf(t);r!==-1&&e.splice(r,1),e.length>0&&!e[e.length-1]._isManuallyPaused()&&e[e.length-1]._setPausedState(!1)}},Ze=function(e){return e.tagName&&e.tagName.toLowerCase()==="input"&&typeof e.select=="function"},ze=function(e){return e?.key==="Escape"||e?.key==="Esc"||e?.keyCode===27},x=function(e){return e?.key==="Tab"||e?.keyCode===9},Xe=function(e){return x(e)&&!e.shiftKey},He=function(e){return x(e)&&e.shiftKey},me=function(e){return setTimeout(e,0)},P=function(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),u=1;u<t;u++)r[u-1]=arguments[u];return typeof e=="function"?e.apply(void 0,r):e},_=function(e){return e.target.shadowRoot&&typeof e.composedPath=="function"?e.composedPath()[0]:e.target},Je=[],we=function(e,t){var r=t?.document||document,u=t?.trapStack||Je,s=ye({returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0,isKeyForward:Xe,isKeyBackward:He},t),n={containers:[],containerGroups:[],tabbableGroups:[],nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,manuallyPaused:!1,delayInitialFocusTimer:void 0,recentNavEvent:void 0},d,l=function(i,o,c){return i&&i[o]!==void 0?i[o]:s[c||o]},y=function(i,o){var c=typeof o?.composedPath=="function"?o.composedPath():void 0;return n.containerGroups.findIndex(function(v){var b=v.container,p=v.tabbableNodes;return b.contains(i)||c?.includes(b)||p.find(function(f){return f===i})})},T=function(i){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},c=o.hasFallback,v=c===void 0?!1:c,b=o.params,p=b===void 0?[]:b,f=s[i];if(typeof f=="function"&&(f=f.apply(void 0,Ue(p))),f===!0&&(f=void 0),!f){if(f===void 0||f===!1)return f;throw new Error("`".concat(i,"` was specified but was not a node, or did not return a node"))}var g=f;if(typeof f=="string"){try{g=r.querySelector(f)}catch(m){throw new Error("`".concat(i,'` appears to be an invalid selector; error="').concat(m.message,'"'))}if(!g&&!v)throw new Error("`".concat(i,"` as selector refers to no known node"))}return g},w=function(){var i=T("initialFocus",{hasFallback:!0});if(i===!1)return!1;if(i===void 0||i&&!G(i,s.tabbableOptions))if(y(r.activeElement)>=0)i=r.activeElement;else{var o=n.tabbableGroups[0],c=o&&o.firstTabbableNode;i=c||T("fallbackFocus")}else i===null&&(i=T("fallbackFocus"));if(!i)throw new Error("Your focus-trap needs to have at least one focusable element");return i},S=function(){if(n.containerGroups=n.containers.map(function(i){var o=be(i,s.tabbableOptions),c=he(i,s.tabbableOptions),v=o.length>0?o[0]:void 0,b=o.length>0?o[o.length-1]:void 0,p=c.find(function(m){return R(m)}),f=c.slice().reverse().find(function(m){return R(m)}),g=!!o.find(function(m){return E(m)>0});return{container:i,tabbableNodes:o,focusableNodes:c,posTabIndexesFound:g,firstTabbableNode:v,lastTabbableNode:b,firstDomTabbableNode:p,lastDomTabbableNode:f,nextTabbableNode:function(k){var A=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,N=o.indexOf(k);return N<0?A?c.slice(c.indexOf(k)+1).find(function(I){return R(I)}):c.slice(0,c.indexOf(k)).reverse().find(function(I){return R(I)}):o[N+(A?1:-1)]}}}),n.tabbableGroups=n.containerGroups.filter(function(i){return i.tabbableNodes.length>0}),n.tabbableGroups.length<=0&&!T("fallbackFocus"))throw new Error("Your focus-trap must have at least one container with at least one tabbable node in it at all times");if(n.containerGroups.find(function(i){return i.posTabIndexesFound})&&n.containerGroups.length>1)throw new Error("At least one node with a positive tabindex was found in one of your focus-trap's multiple containers. Positive tabindexes are only supported in single-container focus-traps.")},C=function(i){var o=i.activeElement;if(o)return o.shadowRoot&&o.shadowRoot.activeElement!==null?C(o.shadowRoot):o},F=function(i){if(i!==!1&&i!==C(document)){if(!i||!i.focus){F(w());return}i.focus({preventScroll:!!s.preventScroll}),n.mostRecentlyFocusedNode=i,Ze(i)&&i.select()}},Z=function(i){var o=T("setReturnFocus",{params:[i]});return o||(o===!1?!1:i)},z=function(i){var o=i.target,c=i.event,v=i.isBackward,b=v===void 0?!1:v;o=o||_(c),S();var p=null;if(n.tabbableGroups.length>0){var f=y(o,c),g=f>=0?n.containerGroups[f]:void 0;if(f<0)b?p=n.tabbableGroups[n.tabbableGroups.length-1].lastTabbableNode:p=n.tabbableGroups[0].firstTabbableNode;else if(b){var m=n.tabbableGroups.findIndex(function(U){var W=U.firstTabbableNode;return o===W});if(m<0&&(g.container===o||G(o,s.tabbableOptions)&&!R(o,s.tabbableOptions)&&!g.nextTabbableNode(o,!1))&&(m=f),m>=0){var k=m===0?n.tabbableGroups.length-1:m-1,A=n.tabbableGroups[k];p=E(o)>=0?A.lastTabbableNode:A.lastDomTabbableNode}else x(c)||(p=g.nextTabbableNode(o,!1))}else{var N=n.tabbableGroups.findIndex(function(U){var W=U.lastTabbableNode;return o===W});if(N<0&&(g.container===o||G(o,s.tabbableOptions)&&!R(o,s.tabbableOptions)&&!g.nextTabbableNode(o))&&(N=f),N>=0){var I=N===n.tabbableGroups.length-1?0:N+1,ae=n.tabbableGroups[I];p=E(o)>=0?ae.firstTabbableNode:ae.firstDomTabbableNode}else x(c)||(p=g.nextTabbableNode(o))}}else p=T("fallbackFocus");return p},L=function(i){var o=_(i);if(!(y(o,i)>=0)){if(P(s.clickOutsideDeactivates,i)){d.deactivate({returnFocus:s.returnFocusOnDeactivate});return}P(s.allowOutsideClick,i)||i.preventDefault()}},X=function(i){var o=_(i),c=y(o,i)>=0;if(c||o instanceof Document)c&&(n.mostRecentlyFocusedNode=o);else{i.stopImmediatePropagation();var v,b=!0;if(n.mostRecentlyFocusedNode)if(E(n.mostRecentlyFocusedNode)>0){var p=y(n.mostRecentlyFocusedNode),f=n.containerGroups[p].tabbableNodes;if(f.length>0){var g=f.findIndex(function(m){return m===n.mostRecentlyFocusedNode});g>=0&&(s.isKeyForward(n.recentNavEvent)?g+1<f.length&&(v=f[g+1],b=!1):g-1>=0&&(v=f[g-1],b=!1))}}else n.containerGroups.some(function(m){return m.tabbableNodes.some(function(k){return E(k)>0})})||(b=!1);else b=!1;b&&(v=z({target:n.mostRecentlyFocusedNode,isBackward:s.isKeyBackward(n.recentNavEvent)})),F(v||n.mostRecentlyFocusedNode||w())}n.recentNavEvent=void 0},Ne=function(i){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;n.recentNavEvent=i;var c=z({event:i,isBackward:o});c&&(x(i)&&i.preventDefault(),F(c))},H=function(i){(s.isKeyForward(i)||s.isKeyBackward(i))&&Ne(i,s.isKeyBackward(i))},J=function(i){ze(i)&&P(s.escapeDeactivates,i)!==!1&&(i.preventDefault(),d.deactivate())},Q=function(i){var o=_(i);y(o,i)>=0||P(s.clickOutsideDeactivates,i)||P(s.allowOutsideClick,i)||(i.preventDefault(),i.stopImmediatePropagation())},ee=function(){if(n.active)return ge.activateTrap(u,d),n.delayInitialFocusTimer=s.delayInitialFocus?me(function(){F(w())}):F(w()),r.addEventListener("focusin",X,!0),r.addEventListener("mousedown",L,{capture:!0,passive:!1}),r.addEventListener("touchstart",L,{capture:!0,passive:!1}),r.addEventListener("click",Q,{capture:!0,passive:!1}),r.addEventListener("keydown",H,{capture:!0,passive:!1}),r.addEventListener("keydown",J),d},te=function(){if(n.active)return r.removeEventListener("focusin",X,!0),r.removeEventListener("mousedown",L,!0),r.removeEventListener("touchstart",L,!0),r.removeEventListener("click",Q,!0),r.removeEventListener("keydown",H,!0),r.removeEventListener("keydown",J),d},Ee=function(i){var o=i.some(function(c){var v=Array.from(c.removedNodes);return v.some(function(b){return b===n.mostRecentlyFocusedNode})});o&&F(w())},V=typeof window<"u"&&"MutationObserver"in window?new MutationObserver(Ee):void 0,O=function(){V&&(V.disconnect(),n.active&&!n.paused&&n.containers.map(function(i){V.observe(i,{subtree:!0,childList:!0})}))};return d={get active(){return n.active},get paused(){return n.paused},activate:function(i){if(n.active)return this;var o=l(i,"onActivate"),c=l(i,"onPostActivate"),v=l(i,"checkCanFocusTrap");v||S(),n.active=!0,n.paused=!1,n.nodeFocusedBeforeActivation=C(r),o?.();var b=function(){v&&S(),ee(),O(),c?.()};return v?(v(n.containers.concat()).then(b,b),this):(b(),this)},deactivate:function(i){if(!n.active)return this;var o=ye({onDeactivate:s.onDeactivate,onPostDeactivate:s.onPostDeactivate,checkCanReturnFocus:s.checkCanReturnFocus},i);clearTimeout(n.delayInitialFocusTimer),n.delayInitialFocusTimer=void 0,te(),n.active=!1,n.paused=!1,O(),ge.deactivateTrap(u,d);var c=l(o,"onDeactivate"),v=l(o,"onPostDeactivate"),b=l(o,"checkCanReturnFocus"),p=l(o,"returnFocus","returnFocusOnDeactivate");c?.();var f=function(){me(function(){p&&F(Z(n.nodeFocusedBeforeActivation)),v?.()})};return p&&b?(b(Z(n.nodeFocusedBeforeActivation)).then(f,f),this):(f(),this)},pause:function(i){return n.active?(n.manuallyPaused=!0,this._setPausedState(!0,i)):this},unpause:function(i){return n.active?(n.manuallyPaused=!1,u[u.length-1]!==this?this:this._setPausedState(!1,i)):this},updateContainerElements:function(i){var o=[].concat(i).filter(Boolean);return n.containers=o.map(function(c){return typeof c=="string"?r.querySelector(c):c}),n.active&&S(),O(),this}},Object.defineProperties(d,{_isManuallyPaused:{value:function(){return n.manuallyPaused}},_setPausedState:{value:function(i,o){if(n.paused===i)return this;if(n.paused=i,i){var c=l(o,"onPause"),v=l(o,"onPostPause");c?.(),te(),O(),v?.()}else{var b=l(o,"onUnpause"),p=l(o,"onPostUnpause");b?.(),S(),ee(),O(),p?.()}return this}}}),d.updateContainerElements(e),d};function Te(a,{focusTrapOptions:e},t){return!e?.extraContainers&&!t?a:[a,...Fe(e?.extraContainers),...Fe(t)]}function Fe(a=[]){return Array.isArray(a)?a:[a]}var q=new WeakSet;function Qe(a,e){let t=e&&e!==document.body&&e!==document.documentElement;return!q.has(a)&&t&&oe(e),!1}function et(a,e){let t=e?.fallbackFocus||a,r=e?.clickOutsideDeactivates??!0;return{fallbackFocus:t,...e,document:a.ownerDocument,tabbableOptions:ie,trapStack:re().focusTrapStack,clickOutsideDeactivates:u=>(q.has(a)||q.add(a),typeof r=="function"?r(u):r),onPostDeactivate:()=>{q.delete(a)},setReturnFocus:u=>{let s=typeof e?.setReturnFocus=="function"?e.setReturnFocus(u):e?.setReturnFocus;return s===void 0?Qe(a,u):s}}}var st=a=>ne((e,t)=>{let r,u,s,n=a.focusTrapOptions;t.onConnected(()=>{e[a.triggerProp]&&r&&d.activate()}),t.onUpdate(l=>{e.hasUpdated&&l.has("focusTrapDisabled")&&(e.focusTrapDisabled?d.deactivate():d.activate())}),t.onDisconnected(()=>d.deactivate());let d={get _instance(){},activate:()=>{let l=u||e.el;l.isConnected&&(r||(s||=Te(l,e),r=we(s,et(l,{...n,...e.focusTrapOptions}))),(typeof e.focusTrapDisabledOverride=="function"?!e.focusTrapDisabledOverride():!e.focusTrapDisabled)&&r.activate())},deactivate:()=>r?.deactivate(),overrideFocusTrapEl:l=>{if(r)throw new Error("Focus trap already created");u=l},setExtraContainers:l=>{let y=u||e.el;s=Te(y,e,l)},updateContainerElements:()=>r?.updateContainerElements(s)};return d});export{st as a};
|