@raspberrypifoundation/design-system-react 2.9.1 → 2.10.1
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/design-system-react.css +1 -1
- package/dist/design-system-react.js +627 -545
- package/dist/design-system-react.umd.cjs +14 -14
- package/dist/scss/components/switch.scss +27 -17
- package/dist/types/lib/main.d.ts +2 -0
- package/dist/types/lib/main.d.ts.map +1 -1
- package/dist/types/src/components/Form/PasswordInput/PasswordInput.spec.d.ts +2 -0
- package/dist/types/src/components/Form/PasswordInput/PasswordInput.spec.d.ts.map +1 -0
- package/dist/types/src/components/Form/PasswordInput/PasswordInput.types.d.ts +25 -0
- package/dist/types/src/components/Form/PasswordInput/PasswordInput.types.d.ts.map +1 -0
- package/dist/types/src/components/Form/PasswordInput/index.d.ts +6 -0
- package/dist/types/src/components/Form/PasswordInput/index.d.ts.map +1 -0
- package/dist/types/src/stories/forms/PasswordInput.stories.d.ts +30 -0
- package/dist/types/src/stories/forms/PasswordInput.stories.d.ts.map +1 -0
- package/package.json +2 -2
|
@@ -1,62 +1,62 @@
|
|
|
1
|
-
(function(V,
|
|
1
|
+
(function(V,d){typeof exports=="object"&&typeof module<"u"?d(exports,require("react/jsx-runtime"),require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime","react","react-dom"],d):(V=typeof globalThis<"u"?globalThis:V||self,d(V["RPF Design System React"]={},V.jsxRuntime,V.React,V.ReactDOM))})(this,(function(V,d,te,nr){"use strict";function $t(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const x=$t(te),rr=$t(nr);function jt(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var it={exports:{}};/*!
|
|
2
2
|
Copyright (c) 2018 Jed Watson.
|
|
3
3
|
Licensed under the MIT License (MIT), see
|
|
4
4
|
http://jedwatson.github.io/classnames
|
|
5
|
-
*/var Wt;function or(){return Wt||(Wt=1,(function(e){(function(){var t={}.hasOwnProperty;function r(){for(var
|
|
5
|
+
*/var Wt;function or(){return Wt||(Wt=1,(function(e){(function(){var t={}.hasOwnProperty;function r(){for(var s="",i=0;i<arguments.length;i++){var a=arguments[i];a&&(s=o(s,n(a)))}return s}function n(s){if(typeof s=="string"||typeof s=="number")return s;if(typeof s!="object")return"";if(Array.isArray(s))return r.apply(null,s);if(s.toString!==Object.prototype.toString&&!s.toString.toString().includes("[native code]"))return s.toString();var i="";for(var a in s)t.call(s,a)&&s[a]&&(i=o(i,a));return i}function o(s,i){return i?s?s+" "+i:s+i:s}e.exports?(r.default=r,e.exports=r):window.classNames=r})()})(it)),it.exports}var sr=or();const K=jt(sr);var Me={exports:{}},De={exports:{}},Y={};/** @license React v16.13.1
|
|
6
6
|
* react-is.production.min.js
|
|
7
7
|
*
|
|
8
8
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
9
9
|
*
|
|
10
10
|
* This source code is licensed under the MIT license found in the
|
|
11
11
|
* LICENSE file in the root directory of this source tree.
|
|
12
|
-
*/var Bt;function
|
|
12
|
+
*/var Bt;function ir(){if(Bt)return Y;Bt=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,r=e?Symbol.for("react.portal"):60106,n=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,s=e?Symbol.for("react.profiler"):60114,i=e?Symbol.for("react.provider"):60109,a=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,u=e?Symbol.for("react.forward_ref"):60112,p=e?Symbol.for("react.suspense"):60113,v=e?Symbol.for("react.suspense_list"):60120,f=e?Symbol.for("react.memo"):60115,b=e?Symbol.for("react.lazy"):60116,h=e?Symbol.for("react.block"):60121,A=e?Symbol.for("react.fundamental"):60117,P=e?Symbol.for("react.responder"):60118,k=e?Symbol.for("react.scope"):60119;function g(y){if(typeof y=="object"&&y!==null){var I=y.$$typeof;switch(I){case t:switch(y=y.type,y){case l:case c:case n:case s:case o:case p:return y;default:switch(y=y&&y.$$typeof,y){case a:case u:case b:case f:case i:return y;default:return I}}case r:return I}}}function S(y){return g(y)===c}return Y.AsyncMode=l,Y.ConcurrentMode=c,Y.ContextConsumer=a,Y.ContextProvider=i,Y.Element=t,Y.ForwardRef=u,Y.Fragment=n,Y.Lazy=b,Y.Memo=f,Y.Portal=r,Y.Profiler=s,Y.StrictMode=o,Y.Suspense=p,Y.isAsyncMode=function(y){return S(y)||g(y)===l},Y.isConcurrentMode=S,Y.isContextConsumer=function(y){return g(y)===a},Y.isContextProvider=function(y){return g(y)===i},Y.isElement=function(y){return typeof y=="object"&&y!==null&&y.$$typeof===t},Y.isForwardRef=function(y){return g(y)===u},Y.isFragment=function(y){return g(y)===n},Y.isLazy=function(y){return g(y)===b},Y.isMemo=function(y){return g(y)===f},Y.isPortal=function(y){return g(y)===r},Y.isProfiler=function(y){return g(y)===s},Y.isStrictMode=function(y){return g(y)===o},Y.isSuspense=function(y){return g(y)===p},Y.isValidElementType=function(y){return typeof y=="string"||typeof y=="function"||y===n||y===c||y===s||y===o||y===p||y===v||typeof y=="object"&&y!==null&&(y.$$typeof===b||y.$$typeof===f||y.$$typeof===i||y.$$typeof===a||y.$$typeof===u||y.$$typeof===A||y.$$typeof===P||y.$$typeof===k||y.$$typeof===h)},Y.typeOf=g,Y}var U={};/** @license React v16.13.1
|
|
13
13
|
* react-is.development.js
|
|
14
14
|
*
|
|
15
15
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
16
16
|
*
|
|
17
17
|
* This source code is licensed under the MIT license found in the
|
|
18
18
|
* LICENSE file in the root directory of this source tree.
|
|
19
|
-
*/var qt;function ar(){return qt||(qt=1,process.env.NODE_ENV!=="production"&&(function(){var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,r=e?Symbol.for("react.portal"):60106,n=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,
|
|
19
|
+
*/var qt;function ar(){return qt||(qt=1,process.env.NODE_ENV!=="production"&&(function(){var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,r=e?Symbol.for("react.portal"):60106,n=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,s=e?Symbol.for("react.profiler"):60114,i=e?Symbol.for("react.provider"):60109,a=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,u=e?Symbol.for("react.forward_ref"):60112,p=e?Symbol.for("react.suspense"):60113,v=e?Symbol.for("react.suspense_list"):60120,f=e?Symbol.for("react.memo"):60115,b=e?Symbol.for("react.lazy"):60116,h=e?Symbol.for("react.block"):60121,A=e?Symbol.for("react.fundamental"):60117,P=e?Symbol.for("react.responder"):60118,k=e?Symbol.for("react.scope"):60119;function g(_){return typeof _=="string"||typeof _=="function"||_===n||_===c||_===s||_===o||_===p||_===v||typeof _=="object"&&_!==null&&(_.$$typeof===b||_.$$typeof===f||_.$$typeof===i||_.$$typeof===a||_.$$typeof===u||_.$$typeof===A||_.$$typeof===P||_.$$typeof===k||_.$$typeof===h)}function S(_){if(typeof _=="object"&&_!==null){var oe=_.$$typeof;switch(oe){case t:var he=_.type;switch(he){case l:case c:case n:case s:case o:case p:return he;default:var le=he&&he.$$typeof;switch(le){case a:case u:case b:case f:case i:return le;default:return oe}}case r:return oe}}}var y=l,I=c,H=a,z=i,ee=t,J=u,Z=n,B=b,ne=f,X=r,F=s,j=o,q=p,M=!1;function T(_){return M||(M=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),m(_)||S(_)===l}function m(_){return S(_)===c}function E(_){return S(_)===a}function L(_){return S(_)===i}function W(_){return typeof _=="object"&&_!==null&&_.$$typeof===t}function C(_){return S(_)===u}function R(_){return S(_)===n}function w(_){return S(_)===b}function O(_){return S(_)===f}function N(_){return S(_)===r}function $(_){return S(_)===s}function D(_){return S(_)===o}function G(_){return S(_)===p}U.AsyncMode=y,U.ConcurrentMode=I,U.ContextConsumer=H,U.ContextProvider=z,U.Element=ee,U.ForwardRef=J,U.Fragment=Z,U.Lazy=B,U.Memo=ne,U.Portal=X,U.Profiler=F,U.StrictMode=j,U.Suspense=q,U.isAsyncMode=T,U.isConcurrentMode=m,U.isContextConsumer=E,U.isContextProvider=L,U.isElement=W,U.isForwardRef=C,U.isFragment=R,U.isLazy=w,U.isMemo=O,U.isPortal=N,U.isProfiler=$,U.isStrictMode=D,U.isSuspense=G,U.isValidElementType=g,U.typeOf=S})()),U}var Vt;function Yt(){return Vt||(Vt=1,process.env.NODE_ENV==="production"?De.exports=ir():De.exports=ar()),De.exports}/*
|
|
20
20
|
object-assign
|
|
21
21
|
(c) Sindre Sorhus
|
|
22
22
|
@license MIT
|
|
23
|
-
*/var at,Ut;function cr(){if(Ut)return at;Ut=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable;function n(
|
|
24
|
-
Valid keys: `+JSON.stringify(Object.keys(m),null," "));var _=X(O,D,C,P,w+"."+D,r);if(_)return _}return null}return A(E)}function z(m){switch(typeof m){case"number":case"string":case"undefined":return!0;case"boolean":return!m;case"object":if(Array.isArray(m))return m.every(z);if(m===null||a(m))return!0;var E=d(m);if(E){var F=E.call(m),W;if(E!==m.entries){for(;!(W=F.next()).done;)if(!z(W.value))return!1}else for(;!(W=F.next()).done;){var C=W.value;if(C&&!z(C[1]))return!1}}else return!1;return!0;default:return!1}}function L(m,E){return m==="symbol"?!0:E?E["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&E instanceof Symbol:!1}function j(m){var E=typeof m;return Array.isArray(m)?"array":m instanceof RegExp?"object":L(E,m)?"symbol":E}function q(m){if(typeof m>"u"||m===null)return""+m;var E=j(m);if(E==="object"){if(m instanceof Date)return"date";if(m instanceof RegExp)return"regexp"}return E}function k(m){var E=q(m);switch(E){case"array":case"object":return"an "+E;case"boolean":case"date":case"regexp":return"a "+E;default:return E}}function T(m){return!m.constructor||!m.constructor.name?v:m.constructor.name}return u.checkPropTypes=o,u.resetWarningCache=o.resetWarningCache,u.PropTypes=u,u},dt}var pt,Zt;function fr(){if(Zt)return pt;Zt=1;var e=lt();function t(){}function r(){}return r.resetWarningCache=t,pt=function(){function n(s,a,l,c,f,d){if(d!==e){var v=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw v.name="Invariant Violation",v}}n.isRequired=n;function o(){return n}var i={array:n,bigint:n,bool:n,func:n,number:n,object:n,string:n,symbol:n,any:n,arrayOf:o,element:n,elementType:n,instanceOf:o,node:n,objectOf:o,oneOf:o,oneOfType:o,shape:o,exact:o,checkPropTypes:r,resetWarningCache:t};return i.PropTypes=i,i},pt}var Jt;function dr(){if(Jt)return ke.exports;if(Jt=1,process.env.NODE_ENV!=="production"){var e=Yt(),t=!0;ke.exports=ur()(e.isElement,t)}else ke.exports=fr()();return ke.exports}var pr=dr();const Le=jt(pr),Qt=({content:e,title:t,className:r,id:n="accordion"})=>{const o=J("rpf-accordion",r),i=typeof e=="string"?"p":"div";return p.jsxs("details",{className:o,id:`${n}`,children:[p.jsxs("summary",{className:"rpf-accordion__title",role:"button",children:[t,p.jsx("span",{className:"rpf-accordion__icon"})]}),p.jsx(i,{className:"rpf-accordion__text",children:e})]})};Qt.propTypes={content:Le.node.isRequired,title:Le.string.isRequired,id:Le.string,className:Le.string};const me=({text:e,href:t,title:r,className:n,type:o="primary",variant:i="",size:s="default",icon:a="",iconOnly:l=!1,iconPosition:c="left",fullWidth:f=!1,disabled:d=!1,onClick:v=()=>{},"aria-label":u="",linkComponent:b})=>{const h=a&&l,A=J("rpf-button",{[`rpf-button--${o}`]:o,"rpf-button--danger":i==="danger","rpf-button--sm":s==="small","rpf-button--icon-only":h,"rpf-button--full-width":f,disabled:d},n);let R="rpf-button__icon";te.isValidElement(a)?R+=" icon":R+=" material-symbols-sharp";const M=(y,I)=>!I||c!==y?null:typeof I=="string"?p.jsx("span",{className:R,children:I}):I,g=()=>e&&!h&&p.jsx("span",{className:"text",children:e}),S=p.jsxs(p.Fragment,{children:[M("left",a),g(),M("right",a)]});if(t){const y=b||"a",I=b?{to:t}:{href:t,role:"button"};return p.jsx(y,{className:A,...I,onClick:v,"aria-label":u,children:S})}return p.jsx("button",{className:A,title:r,onClick:v,disabled:d,"aria-label":u,children:S})},hr=({title:e,text:t,titleChildren:r,children:n,type:o,actions:i,onClose:s})=>p.jsxs("div",{className:`rpf-alert rpf-alert--${o}`,children:[p.jsxs("div",{className:"rpf-alert__header",children:[p.jsx("span",{className:"rpf-alert__icon material-symbols-sharp"}),r?p.jsx("div",{className:"rpf-alert__title",children:r}):e?p.jsx("p",{className:"rpf-alert__title",children:e}):null,!!s&&p.jsx("div",{className:"rpf-alert__close",children:p.jsx(me,{type:"tertiary",icon:"close",size:"small",iconOnly:!0,onClick:s})})]}),(t||n||i)&&p.jsxs("div",{className:"rpf-alert__body",children:[t?p.jsx("p",{children:t}):n?p.jsx("div",{children:n}):null,i&&i.length>0&&p.jsx("div",{className:"rpf-alert__actions",children:i.map((a,l)=>p.jsx(me,{text:a.label,size:"small",type:"tertiary",href:a.href,onClick:a.onClick},l))})]})]}),mr=({label:e,id:t,name:r,error:n="",...o})=>{const{className:i,...s}=o;return p.jsxs(p.Fragment,{children:[p.jsxs("label",{className:J("rpf-input-checkbox",{"rpf-input-checkbox--error":n,className:i}),children:[p.jsx("input",{id:t,name:r,type:"checkbox",...s}),e]}),n&&p.jsxs("div",{className:"rpf-error-message",children:[p.jsx("span",{className:"rpf-error-message__icon material-symbols-sharp",children:"error"}),n]})]})},vr=({disabled:e=!1,errorText:t="",fullWidth:r=!1,legendText:n,legendHintText:o="",children:i})=>p.jsxs("fieldset",{className:J("rpf-fieldset",{"rpf-fieldset--disabled":e,"rpf-fieldset--full-width":r,"rpf-fieldset--error":t}),disabled:e,children:[p.jsxs("legend",{className:"rpf-label",children:[n,o.length>0?p.jsx("small",{className:"rpf-label__hint",children:o}):null]}),p.jsx("div",{className:"rpf-fieldset__inputs",children:i}),t.length>0?p.jsxs("div",{className:"rpf-error-message",children:[p.jsx("span",{className:"rpf-error-message__icon material-symbols-sharp",children:"error"}),t]}):null]}),Fe=({id:e,label:t,children:r,disabled:n=!1,error:o="",hint:i=""})=>p.jsxs("div",{className:"rpf-input-field",children:[(t||i)&&p.jsxs("label",{htmlFor:e,className:J("rpf-label",{"rpf-label--disabled":n}),children:[t,p.jsx("small",{className:"rpf-label__hint",children:i})]}),r,o&&p.jsxs("div",{className:"rpf-error-message",children:[p.jsx("span",{className:"rpf-error-message__icon material-symbols-sharp",children:"error"}),o]})]}),br=({label:e,inputFieldId:t,disabled:r=!1,hint:n=""})=>p.jsx("div",{className:"rpf-label",children:p.jsxs("label",{htmlFor:t,className:J("rpf-label",{"rpf-label--disabled":r}),children:[e,n&&p.jsx("div",{className:"rpf-label__hint",children:n})]})}),yr=({label:e,id:t,name:r,fullWidth:n=!1,...o})=>p.jsxs("label",{className:J("rpf-input-radio",{"rpf-input-radio--disabled":o.disabled,"rpf-input--full-width":n}),children:[p.jsx("input",{type:"radio",id:t,name:r,...o}),e]}),gr=({label:e,inputFieldId:t,disabled:r=!1,error:n="",hint:o="",placeholder:i="",defaultValue:s="",onClick:a=()=>{},onChange:l=()=>{}})=>p.jsx("search",{children:p.jsxs("form",{className:"rpf-input-field",onSubmit:a,children:[p.jsxs("label",{htmlFor:t,className:J("rpf-label",{"rpf-label--disabled":r}),children:[e,o&&p.jsx("small",{className:"rpf-label__hint",children:o})]}),p.jsxs("div",{className:"rpf-input-search-container",children:[p.jsx("input",{className:J("rpf-input rpf-input-search",{"rpf-input--disabled":r,"rpf-input--error":n}),disabled:r,id:t,name:"search",type:"search","aria-label":"Search",defaultValue:s,placeholder:i,onChange:l}),p.jsx("button",{type:"submit",className:J("rpf-button rpf-button-search",{"rpf-button--disabled":r,"rpf-button--error":n}),disabled:r,onClick:a,children:p.jsx("span",{className:"rpf-button__icon material-symbols-sharp",children:"search"})})]}),n&&p.jsxs("div",{className:"rpf-error-message",children:[p.jsx("span",{className:"rpf-error-message__icon material-symbols-sharp",children:"info"}),n]})]})}),wr=({id:e,label:t,name:r,options:n,disabled:o=!1,error:i="",fullWidth:s=!1,hint:a="",onChange:l=()=>{},placeholder:c="",value:f="",...d})=>p.jsx(Fe,{id:e,disabled:o,error:i,hint:a,label:t,children:p.jsxs("select",{className:J("rpf-input rpf-input-select",{"rpf-input--error":i,"rpf-input--full-width":s}),disabled:o,id:e,name:r,onChange:l,value:f,...d,children:[!f&&!!c&&p.jsx("option",{value:"",disabled:!0,children:c}),n.map(v=>p.jsx("option",{value:v.key,children:v.value},v.key))]})}),en=te.forwardRef(({label:e,id:t,name:r,error:n="",fullWidth:o=!1,reverse:i=!1,hint:s="",alignStart:a=!1,hideLabel:l=!1,icon:c=!1,className:f,disabled:d=!1,"aria-describedby":v,...u},b)=>{const h=n?`${t}-error`:void 0,A=[v,h].filter(Boolean).join(" ")||void 0;return p.jsxs("div",{className:"rpf-input-field",children:[p.jsxs("label",{className:J("rpf-switch",{"rpf-switch--full-width":o,"rpf-switch--reverse":i,"rpf-switch--align-start":a,"rpf-switch--icon":c,"rpf-switch--disabled":d,"rpf-switch--error":n},f),children:[p.jsxs("span",{className:"rpf-switch__track",children:[p.jsx("input",{ref:b,id:t,name:r,type:"checkbox",role:"switch",className:"rpf-switch__checkbox",disabled:d,"aria-invalid":n?!0:void 0,"aria-describedby":A,...u}),p.jsx("span",{className:"rpf-switch__handle",children:c?p.jsx("span",{className:"rpf-switch__icon","aria-hidden":"true"}):null})]}),p.jsxs("span",{className:J("rpf-label","rpf-switch__label",{"rpf-label--disabled":d,"rpf-visually-hidden":l}),children:[p.jsx("span",{children:e}),s?p.jsx("span",{className:"rpf-label__hint",children:s}):null]})]}),n?p.jsxs("div",{id:h,className:"rpf-error-message",children:[p.jsx("span",{className:"rpf-error-message__icon material-symbols-sharp",children:"error"}),n]}):null]})});en.displayName="Switch";const Er=({id:e,label:t,name:r,value:n,disabled:o=!1,readOnly:i=!1,error:s="",fullWidth:a=!1,hint:l="",onChange:c=()=>{}})=>p.jsx(Fe,{id:e,disabled:o,error:s,hint:l,label:t,children:p.jsx("textarea",{className:J("rpf-input rpf-input-textarea",{"rpf-input--error":s,"rpf-input--full-width":a,"rpf-input--disabled":o}),disabled:o,readOnly:i,id:e,name:r,onChange:c,value:n})}),xr=({id:e,name:t,label:r,error:n="",fullWidth:o=!1,hint:i="",type:s="text",...a})=>p.jsx(Fe,{id:e,disabled:a.disabled,error:n,hint:i,label:r,children:p.jsx("input",{className:J("rpf-input rpf-input-text",{"rpf-input--error":n,"rpf-input--full-width":o}),id:e,name:t,type:s,...a})});function Tr(e,t){const r=te.useRef(null),n=te.useRef(null);return te.useEffect(()=>{const o=r.current;o&&(e&&!o.open?o.showModal():!e&&o.open&&o.close())},[e]),te.useEffect(()=>{const o=r.current;if(!o)return;const i=()=>t(!1),s=a=>{a.preventDefault(),t(!1)};return o.addEventListener("close",i),o.addEventListener("cancel",s),()=>{o.removeEventListener("close",i),o.removeEventListener("cancel",s)}},[t]),te.useEffect(()=>{const o=r.current,i=n.current;if(!o||!i)return;const s=a=>{e&&!i.contains(a.target)&&t(!1)};return o.addEventListener("mousedown",s),()=>o.removeEventListener("mousedown",s)},[e,t]),{dialogRef:r,contentRef:n}}const Sr=({isOpen:e,setIsOpen:t,heading:r,children:n,primaryButtonLink:o,primaryButtonText:i,onClickPrimaryButton:s,secondaryButtonText:a,secondaryButtonLink:l,onClickSecondaryButton:c,tertiaryButtonText:f,tertiaryButtonLink:d,onClickTertiaryButton:v,showCloseButton:u=!0})=>{const{dialogRef:b,contentRef:h}=Tr(e,t);return p.jsx("dialog",{ref:b,className:"rpf-modal","aria-labelledby":"modal-heading","aria-describedby":"modal-description",children:p.jsxs("div",{ref:h,className:"rpf-modal__wrapper",children:[p.jsxs("div",{className:"rpf-modal__header",children:[p.jsx("h2",{className:"rpf-modal__title",id:"modal-heading",children:r}),u&&p.jsx(me,{icon:"close",iconOnly:!0,"aria-label":"Close modal",type:"tertiary",onClick:()=>t(!1)})]}),p.jsx("div",{id:"modal-description",className:"rpf-modal__content",tabIndex:0,children:n}),p.jsxs("div",{className:"rpf-modal__buttons",children:[p.jsx(me,{text:i,href:o,onClick:s,type:"primary"}),a&&p.jsx(me,{text:a,href:l,onClick:c,type:"secondary"}),f&&p.jsx(me,{text:f,href:d,onClick:v,type:"tertiary"})]})]})})},tn=({className:e,children:t})=>{const r=J("rpf-menu",e);return p.jsx("ul",{className:r,children:t})};function $e(){return typeof window<"u"}function ve(e){return nn(e)?(e.nodeName||"").toLowerCase():"#document"}function ie(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function ue(e){var t;return(t=(nn(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function nn(e){return $e()?e instanceof Node||e instanceof ie(e).Node:!1}function Q(e){return $e()?e instanceof Element||e instanceof ie(e).Element:!1}function re(e){return $e()?e instanceof HTMLElement||e instanceof ie(e).HTMLElement:!1}function ht(e){return!$e()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof ie(e).ShadowRoot}function Ie(e){const{overflow:t,overflowX:r,overflowY:n,display:o}=ae(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&o!=="inline"&&o!=="contents"}function Cr(e){return/^(table|td|th)$/.test(ve(e))}function je(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const _r=/transform|translate|scale|rotate|perspective|filter/,Or=/paint|layout|strict|content/,Ee=e=>!!e&&e!=="none";let mt;function vt(e){const t=Q(e)?ae(e):e;return Ee(t.transform)||Ee(t.translate)||Ee(t.scale)||Ee(t.rotate)||Ee(t.perspective)||!We()&&(Ee(t.backdropFilter)||Ee(t.filter))||_r.test(t.willChange||"")||Or.test(t.contain||"")}function Ar(e){let t=de(e);for(;re(t)&&!be(t);){if(vt(t))return t;if(je(t))return null;t=de(t)}return null}function We(){return mt==null&&(mt=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),mt}function be(e){return/^(html|body|#document)$/.test(ve(e))}function ae(e){return ie(e).getComputedStyle(e)}function Be(e){return Q(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function de(e){if(ve(e)==="html")return e;const t=e.assignedSlot||e.parentNode||ht(e)&&e.host||ue(e);return ht(t)?t.host:t}function rn(e){const t=de(e);return be(t)?e.ownerDocument?e.ownerDocument.body:e.body:re(t)&&Ie(t)?t:rn(t)}function ye(e,t,r){var n;t===void 0&&(t=[]),r===void 0&&(r=!0);const o=rn(e),i=o===((n=e.ownerDocument)==null?void 0:n.body),s=ie(o);if(i){const a=bt(s);return t.concat(s,s.visualViewport||[],Ie(o)?o:[],a&&r?ye(a):[])}else return t.concat(o,ye(o,[],r))}function bt(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function xe(e){let t=e.activeElement;for(;((r=t)==null||(r=r.shadowRoot)==null?void 0:r.activeElement)!=null;){var r;t=t.shadowRoot.activeElement}return t}function se(e,t){if(!e||!t)return!1;const r=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(r&&ht(r)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function Rr(){const e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform}function on(){const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(t=>{let{brand:r,version:n}=t;return r+"/"+n}).join(" "):navigator.userAgent}function Pr(e){return e.mozInputSource===0&&e.isTrusted?!0:yt()&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function Nr(e){return Mr()?!1:!yt()&&e.width===0&&e.height===0||yt()&&e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType==="mouse"||e.width<1&&e.height<1&&e.pressure===0&&e.detail===0&&e.pointerType==="touch"}function Ir(){return/apple/i.test(navigator.vendor)}function yt(){const e=/android/i;return e.test(Rr())||e.test(on())}function Mr(){return on().includes("jsdom/")}function sn(e,t){return["mouse","pen"].includes(e)}function kr(e){return"nativeEvent"in e}function Dr(e){return e.matches("html,body")}function ce(e){return(e==null?void 0:e.ownerDocument)||document}function gt(e,t){if(t==null)return!1;if("composedPath"in e)return e.composedPath().includes(t);const r=e;return r.target!=null&&t.contains(r.target)}function Te(e){return"composedPath"in e?e.composedPath()[0]:e.target}const Lr="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function an(e){return re(e)&&e.matches(Lr)}function wt(e){e.preventDefault(),e.stopPropagation()}function Fr(e){return e?e.getAttribute("role")==="combobox"&&an(e):!1}const qe=Math.min,Se=Math.max,Ve=Math.round,Ye=Math.floor,fe=e=>({x:e,y:e}),$r={left:"right",right:"left",bottom:"top",top:"bottom"};function cn(e,t,r){return Se(e,qe(t,r))}function Ue(e,t){return typeof e=="function"?e(t):e}function Ce(e){return e.split("-")[0]}function He(e){return e.split("-")[1]}function ln(e){return e==="x"?"y":"x"}function un(e){return e==="y"?"height":"width"}function ge(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function fn(e){return ln(ge(e))}function jr(e,t,r){r===void 0&&(r=!1);const n=He(e),o=fn(e),i=un(o);let s=o==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(s=Ke(s)),[s,Ke(s)]}function Wr(e){const t=Ke(e);return[Et(e),t,Et(t)]}function Et(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const dn=["left","right"],pn=["right","left"],Br=["top","bottom"],qr=["bottom","top"];function Vr(e,t,r){switch(e){case"top":case"bottom":return r?t?pn:dn:t?dn:pn;case"left":case"right":return t?Br:qr;default:return[]}}function Yr(e,t,r,n){const o=He(e);let i=Vr(Ce(e),r==="start",n);return o&&(i=i.map(s=>s+"-"+o),t&&(i=i.concat(i.map(Et)))),i}function Ke(e){const t=Ce(e);return $r[t]+e.slice(t.length)}function Ur(e){return{top:0,right:0,bottom:0,left:0,...e}}function Hr(e){return typeof e!="number"?Ur(e):{top:e,right:e,bottom:e,left:e}}function ze(e){const{x:t,y:r,width:n,height:o}=e;return{width:n,height:o,top:r,left:t,right:t+n,bottom:r+o,x:t,y:r}}/*!
|
|
23
|
+
*/var at,Ut;function cr(){if(Ut)return at;Ut=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable;function n(s){if(s==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(s)}function o(){try{if(!Object.assign)return!1;var s=new String("abc");if(s[5]="de",Object.getOwnPropertyNames(s)[0]==="5")return!1;for(var i={},a=0;a<10;a++)i["_"+String.fromCharCode(a)]=a;var l=Object.getOwnPropertyNames(i).map(function(u){return i[u]});if(l.join("")!=="0123456789")return!1;var c={};return"abcdefghijklmnopqrst".split("").forEach(function(u){c[u]=u}),Object.keys(Object.assign({},c)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return at=o()?Object.assign:function(s,i){for(var a,l=n(s),c,u=1;u<arguments.length;u++){a=Object(arguments[u]);for(var p in a)t.call(a,p)&&(l[p]=a[p]);if(e){c=e(a);for(var v=0;v<c.length;v++)r.call(a,c[v])&&(l[c[v]]=a[c[v]])}}return l},at}var ct,Ht;function lt(){if(Ht)return ct;Ht=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return ct=e,ct}var ft,Kt;function zt(){return Kt||(Kt=1,ft=Function.call.bind(Object.prototype.hasOwnProperty)),ft}var ut,Xt;function lr(){if(Xt)return ut;Xt=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=lt(),r={},n=zt();e=function(s){var i="Warning: "+s;typeof console<"u"&&console.error(i);try{throw new Error(i)}catch{}}}function o(s,i,a,l,c){if(process.env.NODE_ENV!=="production"){for(var u in s)if(n(s,u)){var p;try{if(typeof s[u]!="function"){var v=Error((l||"React class")+": "+a+" type `"+u+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof s[u]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw v.name="Invariant Violation",v}p=s[u](i,u,l,a,null,t)}catch(b){p=b}if(p&&!(p instanceof Error)&&e((l||"React class")+": type specification of "+a+" `"+u+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof p+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),p instanceof Error&&!(p.message in r)){r[p.message]=!0;var f=c?c():"";e("Failed "+a+" type: "+p.message+(f??""))}}}}return o.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(r={})},ut=o,ut}var dt,Gt;function fr(){if(Gt)return dt;Gt=1;var e=Yt(),t=cr(),r=lt(),n=zt(),o=lr(),s=function(){};process.env.NODE_ENV!=="production"&&(s=function(a){var l="Warning: "+a;typeof console<"u"&&console.error(l);try{throw new Error(l)}catch{}});function i(){return null}return dt=function(a,l){var c=typeof Symbol=="function"&&Symbol.iterator,u="@@iterator";function p(m){var E=m&&(c&&m[c]||m[u]);if(typeof E=="function")return E}var v="<<anonymous>>",f={array:P("array"),bigint:P("bigint"),bool:P("boolean"),func:P("function"),number:P("number"),object:P("object"),string:P("string"),symbol:P("symbol"),any:k(),arrayOf:g,element:S(),elementType:y(),instanceOf:I,node:J(),objectOf:z,oneOf:H,oneOfType:ee,shape:B,exact:ne};function b(m,E){return m===E?m!==0||1/m===1/E:m!==m&&E!==E}function h(m,E){this.message=m,this.data=E&&typeof E=="object"?E:{},this.stack=""}h.prototype=Error.prototype;function A(m){if(process.env.NODE_ENV!=="production")var E={},L=0;function W(R,w,O,N,$,D,G){if(N=N||v,D=D||O,G!==r){if(l){var _=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw _.name="Invariant Violation",_}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var oe=N+":"+O;!E[oe]&&L<3&&(s("You are manually calling a React.PropTypes validation function for the `"+D+"` prop on `"+N+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),E[oe]=!0,L++)}}return w[O]==null?R?w[O]===null?new h("The "+$+" `"+D+"` is marked as required "+("in `"+N+"`, but its value is `null`.")):new h("The "+$+" `"+D+"` is marked as required in "+("`"+N+"`, but its value is `undefined`.")):null:m(w,O,N,$,D)}var C=W.bind(null,!1);return C.isRequired=W.bind(null,!0),C}function P(m){function E(L,W,C,R,w,O){var N=L[W],$=j(N);if($!==m){var D=q(N);return new h("Invalid "+R+" `"+w+"` of type "+("`"+D+"` supplied to `"+C+"`, expected ")+("`"+m+"`."),{expectedType:m})}return null}return A(E)}function k(){return A(i)}function g(m){function E(L,W,C,R,w){if(typeof m!="function")return new h("Property `"+w+"` of component `"+C+"` has invalid PropType notation inside arrayOf.");var O=L[W];if(!Array.isArray(O)){var N=j(O);return new h("Invalid "+R+" `"+w+"` of type "+("`"+N+"` supplied to `"+C+"`, expected an array."))}for(var $=0;$<O.length;$++){var D=m(O,$,C,R,w+"["+$+"]",r);if(D instanceof Error)return D}return null}return A(E)}function S(){function m(E,L,W,C,R){var w=E[L];if(!a(w)){var O=j(w);return new h("Invalid "+C+" `"+R+"` of type "+("`"+O+"` supplied to `"+W+"`, expected a single ReactElement."))}return null}return A(m)}function y(){function m(E,L,W,C,R){var w=E[L];if(!e.isValidElementType(w)){var O=j(w);return new h("Invalid "+C+" `"+R+"` of type "+("`"+O+"` supplied to `"+W+"`, expected a single ReactElement type."))}return null}return A(m)}function I(m){function E(L,W,C,R,w){if(!(L[W]instanceof m)){var O=m.name||v,N=T(L[W]);return new h("Invalid "+R+" `"+w+"` of type "+("`"+N+"` supplied to `"+C+"`, expected ")+("instance of `"+O+"`."))}return null}return A(E)}function H(m){if(!Array.isArray(m))return process.env.NODE_ENV!=="production"&&(arguments.length>1?s("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):s("Invalid argument supplied to oneOf, expected an array.")),i;function E(L,W,C,R,w){for(var O=L[W],N=0;N<m.length;N++)if(b(O,m[N]))return null;var $=JSON.stringify(m,function(G,_){var oe=q(_);return oe==="symbol"?String(_):_});return new h("Invalid "+R+" `"+w+"` of value `"+String(O)+"` "+("supplied to `"+C+"`, expected one of "+$+"."))}return A(E)}function z(m){function E(L,W,C,R,w){if(typeof m!="function")return new h("Property `"+w+"` of component `"+C+"` has invalid PropType notation inside objectOf.");var O=L[W],N=j(O);if(N!=="object")return new h("Invalid "+R+" `"+w+"` of type "+("`"+N+"` supplied to `"+C+"`, expected an object."));for(var $ in O)if(n(O,$)){var D=m(O,$,C,R,w+"."+$,r);if(D instanceof Error)return D}return null}return A(E)}function ee(m){if(!Array.isArray(m))return process.env.NODE_ENV!=="production"&&s("Invalid argument supplied to oneOfType, expected an instance of array."),i;for(var E=0;E<m.length;E++){var L=m[E];if(typeof L!="function")return s("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+M(L)+" at index "+E+"."),i}function W(C,R,w,O,N){for(var $=[],D=0;D<m.length;D++){var G=m[D],_=G(C,R,w,O,N,r);if(_==null)return null;_.data&&n(_.data,"expectedType")&&$.push(_.data.expectedType)}var oe=$.length>0?", expected one of type ["+$.join(", ")+"]":"";return new h("Invalid "+O+" `"+N+"` supplied to "+("`"+w+"`"+oe+"."))}return A(W)}function J(){function m(E,L,W,C,R){return X(E[L])?null:new h("Invalid "+C+" `"+R+"` supplied to "+("`"+W+"`, expected a ReactNode."))}return A(m)}function Z(m,E,L,W,C){return new h((m||"React class")+": "+E+" type `"+L+"."+W+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+C+"`.")}function B(m){function E(L,W,C,R,w){var O=L[W],N=j(O);if(N!=="object")return new h("Invalid "+R+" `"+w+"` of type `"+N+"` "+("supplied to `"+C+"`, expected `object`."));for(var $ in m){var D=m[$];if(typeof D!="function")return Z(C,R,w,$,q(D));var G=D(O,$,C,R,w+"."+$,r);if(G)return G}return null}return A(E)}function ne(m){function E(L,W,C,R,w){var O=L[W],N=j(O);if(N!=="object")return new h("Invalid "+R+" `"+w+"` of type `"+N+"` "+("supplied to `"+C+"`, expected `object`."));var $=t({},L[W],m);for(var D in $){var G=m[D];if(n(m,D)&&typeof G!="function")return Z(C,R,w,D,q(G));if(!G)return new h("Invalid "+R+" `"+w+"` key `"+D+"` supplied to `"+C+"`.\nBad object: "+JSON.stringify(L[W],null," ")+`
|
|
24
|
+
Valid keys: `+JSON.stringify(Object.keys(m),null," "));var _=G(O,D,C,R,w+"."+D,r);if(_)return _}return null}return A(E)}function X(m){switch(typeof m){case"number":case"string":case"undefined":return!0;case"boolean":return!m;case"object":if(Array.isArray(m))return m.every(X);if(m===null||a(m))return!0;var E=p(m);if(E){var L=E.call(m),W;if(E!==m.entries){for(;!(W=L.next()).done;)if(!X(W.value))return!1}else for(;!(W=L.next()).done;){var C=W.value;if(C&&!X(C[1]))return!1}}else return!1;return!0;default:return!1}}function F(m,E){return m==="symbol"?!0:E?E["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&E instanceof Symbol:!1}function j(m){var E=typeof m;return Array.isArray(m)?"array":m instanceof RegExp?"object":F(E,m)?"symbol":E}function q(m){if(typeof m>"u"||m===null)return""+m;var E=j(m);if(E==="object"){if(m instanceof Date)return"date";if(m instanceof RegExp)return"regexp"}return E}function M(m){var E=q(m);switch(E){case"array":case"object":return"an "+E;case"boolean":case"date":case"regexp":return"a "+E;default:return E}}function T(m){return!m.constructor||!m.constructor.name?v:m.constructor.name}return f.checkPropTypes=o,f.resetWarningCache=o.resetWarningCache,f.PropTypes=f,f},dt}var pt,Zt;function ur(){if(Zt)return pt;Zt=1;var e=lt();function t(){}function r(){}return r.resetWarningCache=t,pt=function(){function n(i,a,l,c,u,p){if(p!==e){var v=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw v.name="Invariant Violation",v}}n.isRequired=n;function o(){return n}var s={array:n,bigint:n,bool:n,func:n,number:n,object:n,string:n,symbol:n,any:n,arrayOf:o,element:n,elementType:n,instanceOf:o,node:n,objectOf:o,oneOf:o,oneOfType:o,shape:o,exact:o,checkPropTypes:r,resetWarningCache:t};return s.PropTypes=s,s},pt}var Jt;function dr(){if(Jt)return Me.exports;if(Jt=1,process.env.NODE_ENV!=="production"){var e=Yt(),t=!0;Me.exports=fr()(e.isElement,t)}else Me.exports=ur()();return Me.exports}var pr=dr();const Fe=jt(pr),Qt=({content:e,title:t,className:r,id:n="accordion"})=>{const o=K("rpf-accordion",r),s=typeof e=="string"?"p":"div";return d.jsxs("details",{className:o,id:`${n}`,children:[d.jsxs("summary",{className:"rpf-accordion__title",role:"button",children:[t,d.jsx("span",{className:"rpf-accordion__icon"})]}),d.jsx(s,{className:"rpf-accordion__text",children:e})]})};Qt.propTypes={content:Fe.node.isRequired,title:Fe.string.isRequired,id:Fe.string,className:Fe.string};const me=({text:e,href:t,title:r,className:n,type:o="primary",variant:s="",size:i="default",icon:a="",iconOnly:l=!1,iconPosition:c="left",fullWidth:u=!1,disabled:p=!1,onClick:v=()=>{},"aria-label":f="",linkComponent:b})=>{const h=a&&l,A=K("rpf-button",{[`rpf-button--${o}`]:o,"rpf-button--danger":s==="danger","rpf-button--sm":i==="small","rpf-button--icon-only":h,"rpf-button--full-width":u,disabled:p},n);let P="rpf-button__icon";te.isValidElement(a)?P+=" icon":P+=" material-symbols-sharp";const k=(y,I)=>!I||c!==y?null:typeof I=="string"?d.jsx("span",{className:P,children:I}):I,g=()=>e&&!h&&d.jsx("span",{className:"text",children:e}),S=d.jsxs(d.Fragment,{children:[k("left",a),g(),k("right",a)]});if(t){const y=b||"a",I=b?{to:t}:{href:t,role:"button"};return d.jsx(y,{className:A,...I,onClick:v,"aria-label":f,children:S})}return d.jsx("button",{className:A,title:r,onClick:v,disabled:p,"aria-label":f,children:S})},hr=({title:e,text:t,titleChildren:r,children:n,type:o,actions:s,onClose:i})=>d.jsxs("div",{className:`rpf-alert rpf-alert--${o}`,children:[d.jsxs("div",{className:"rpf-alert__header",children:[d.jsx("span",{className:"rpf-alert__icon material-symbols-sharp"}),r?d.jsx("div",{className:"rpf-alert__title",children:r}):e?d.jsx("p",{className:"rpf-alert__title",children:e}):null,!!i&&d.jsx("div",{className:"rpf-alert__close",children:d.jsx(me,{type:"tertiary",icon:"close",size:"small",iconOnly:!0,onClick:i})})]}),(t||n||s)&&d.jsxs("div",{className:"rpf-alert__body",children:[t?d.jsx("p",{children:t}):n?d.jsx("div",{children:n}):null,s&&s.length>0&&d.jsx("div",{className:"rpf-alert__actions",children:s.map((a,l)=>d.jsx(me,{text:a.label,size:"small",type:"tertiary",href:a.href,onClick:a.onClick},l))})]})]}),mr=({label:e,id:t,name:r,error:n="",...o})=>{const{className:s,...i}=o;return d.jsxs(d.Fragment,{children:[d.jsxs("label",{className:K("rpf-input-checkbox",{"rpf-input-checkbox--error":n,className:s}),children:[d.jsx("input",{id:t,name:r,type:"checkbox",...i}),e]}),n&&d.jsxs("div",{className:"rpf-error-message",children:[d.jsx("span",{className:"rpf-error-message__icon material-symbols-sharp",children:"error"}),n]})]})},vr=({disabled:e=!1,errorText:t="",fullWidth:r=!1,legendText:n,legendHintText:o="",children:s})=>d.jsxs("fieldset",{className:K("rpf-fieldset",{"rpf-fieldset--disabled":e,"rpf-fieldset--full-width":r,"rpf-fieldset--error":t}),disabled:e,children:[d.jsxs("legend",{className:"rpf-label",children:[n,o.length>0?d.jsx("small",{className:"rpf-label__hint",children:o}):null]}),d.jsx("div",{className:"rpf-fieldset__inputs",children:s}),t.length>0?d.jsxs("div",{className:"rpf-error-message",children:[d.jsx("span",{className:"rpf-error-message__icon material-symbols-sharp",children:"error"}),t]}):null]}),Le=({id:e,label:t,children:r,disabled:n=!1,error:o="",hint:s=""})=>d.jsxs("div",{className:"rpf-input-field",children:[(t||s)&&d.jsxs("label",{htmlFor:e,className:K("rpf-label",{"rpf-label--disabled":n}),children:[t,d.jsx("small",{className:"rpf-label__hint",children:s})]}),r,o&&d.jsxs("div",{className:"rpf-error-message",children:[d.jsx("span",{className:"rpf-error-message__icon material-symbols-sharp",children:"error"}),o]})]}),br=({label:e,inputFieldId:t,disabled:r=!1,hint:n=""})=>d.jsx("div",{className:"rpf-label",children:d.jsxs("label",{htmlFor:t,className:K("rpf-label",{"rpf-label--disabled":r}),children:[e,n&&d.jsx("div",{className:"rpf-label__hint",children:n})]})}),yr=({disabled:e=!1,readOnly:t=!1,fullWidth:r=!1,error:n="",label:o,id:s,hint:i="",showPasswordLabel:a="Show",hidePasswordLabel:l="Hide",forgotPasswordLabel:c="Forgot password?",forgotPasswordHref:u,...p})=>{const[v,f]=te.useState(!1);return d.jsxs("div",{className:"rpf-input-field",children:[d.jsxs("label",{htmlFor:s,className:K("rpf-label",{"rpf-label--disabled":e,"rpf-label--readonly":t}),children:[o,i&&d.jsx("small",{className:"rpf-label__hint",children:i})]}),d.jsxs("div",{className:K("rpf-input-password__container",{"rpf-input-password__container--full-width":r,"rpf-input-password__container--error":n,"rpf-input-password__container--disabled":e,"rpf-input-password__container--readonly":t}),children:[d.jsx("input",{className:K("rpf-input rpf-input-password",{"rpf-input--disabled":e,"rpf-input--readonly":t,"rpf-input--error":n,"rpf-input--full-width":r}),disabled:e,id:s,type:v?"text":"password",readOnly:t,...p}),d.jsx("button",{type:"button",className:K("rpf-button rpf-button--tertiary rpf-input-password__button",{"rpf-button--disabled":e,"rpf-input-password__button--error":n}),disabled:e,onClick:()=>f(b=>!b),children:v?l:a})]}),n&&d.jsxs("div",{className:"rpf-error-message",children:[d.jsx("span",{className:"rpf-error-message__icon material-symbols-sharp",children:"info"}),n]}),u&&d.jsx("a",{href:u,className:"rpf-link rpf-link--block",children:c})]})},gr=({label:e,id:t,name:r,fullWidth:n=!1,...o})=>d.jsxs("label",{className:K("rpf-input-radio",{"rpf-input-radio--disabled":o.disabled,"rpf-input--full-width":n}),children:[d.jsx("input",{type:"radio",id:t,name:r,...o}),e]}),wr=({label:e,inputFieldId:t,disabled:r=!1,error:n="",hint:o="",placeholder:s="",defaultValue:i="",onClick:a=()=>{},onChange:l=()=>{}})=>d.jsx("search",{children:d.jsxs("form",{className:"rpf-input-field",onSubmit:a,children:[d.jsxs("label",{htmlFor:t,className:K("rpf-label",{"rpf-label--disabled":r}),children:[e,o&&d.jsx("small",{className:"rpf-label__hint",children:o})]}),d.jsxs("div",{className:"rpf-input-search-container",children:[d.jsx("input",{className:K("rpf-input rpf-input-search",{"rpf-input--disabled":r,"rpf-input--error":n}),disabled:r,id:t,name:"search",type:"search","aria-label":"Search",defaultValue:i,placeholder:s,onChange:l}),d.jsx("button",{type:"submit",className:K("rpf-button rpf-button-search",{"rpf-button--disabled":r,"rpf-button--error":n}),disabled:r,onClick:a,children:d.jsx("span",{className:"rpf-button__icon material-symbols-sharp",children:"search"})})]}),n&&d.jsxs("div",{className:"rpf-error-message",children:[d.jsx("span",{className:"rpf-error-message__icon material-symbols-sharp",children:"info"}),n]})]})}),Er=({id:e,label:t,name:r,options:n,disabled:o=!1,error:s="",fullWidth:i=!1,hint:a="",onChange:l=()=>{},placeholder:c="",value:u="",...p})=>d.jsx(Le,{id:e,disabled:o,error:s,hint:a,label:t,children:d.jsxs("select",{className:K("rpf-input rpf-input-select",{"rpf-input--error":s,"rpf-input--full-width":i}),disabled:o,id:e,name:r,onChange:l,value:u,...p,children:[!u&&!!c&&d.jsx("option",{value:"",disabled:!0,children:c}),n.map(v=>d.jsx("option",{value:v.key,children:v.value},v.key))]})}),en=te.forwardRef(({label:e,id:t,name:r,error:n="",fullWidth:o=!1,reverse:s=!1,hint:i="",alignStart:a=!1,hideLabel:l=!1,icon:c=!1,className:u,disabled:p=!1,"aria-describedby":v,...f},b)=>{const h=n?`${t}-error`:void 0,A=[v,h].filter(Boolean).join(" ")||void 0;return d.jsxs("div",{className:"rpf-input-field",children:[d.jsxs("label",{className:K("rpf-switch",{"rpf-switch--full-width":o,"rpf-switch--reverse":s,"rpf-switch--align-start":a,"rpf-switch--icon":c,"rpf-switch--disabled":p,"rpf-switch--error":n},u),children:[d.jsxs("span",{className:"rpf-switch__track",children:[d.jsx("input",{ref:b,id:t,name:r,type:"checkbox",role:"switch",className:"rpf-switch__checkbox",disabled:p,"aria-invalid":n?!0:void 0,"aria-describedby":A,...f}),d.jsx("span",{className:"rpf-switch__handle",children:c?d.jsx("span",{className:"rpf-switch__icon","aria-hidden":"true"}):null})]}),d.jsxs("span",{className:K("rpf-label","rpf-switch__label",{"rpf-label--disabled":p,"rpf-visually-hidden":l}),children:[d.jsx("span",{children:e}),i?d.jsx("span",{className:"rpf-label__hint",children:i}):null]})]}),n?d.jsxs("div",{id:h,className:"rpf-error-message",children:[d.jsx("span",{className:"rpf-error-message__icon material-symbols-sharp",children:"error"}),n]}):null]})});en.displayName="Switch";const xr=({id:e,label:t,name:r,value:n,disabled:o=!1,readOnly:s=!1,error:i="",fullWidth:a=!1,hint:l="",onChange:c=()=>{}})=>d.jsx(Le,{id:e,disabled:o,error:i,hint:l,label:t,children:d.jsx("textarea",{className:K("rpf-input rpf-input-textarea",{"rpf-input--error":i,"rpf-input--full-width":a,"rpf-input--disabled":o}),disabled:o,readOnly:s,id:e,name:r,onChange:c,value:n})}),Tr=({id:e,name:t,label:r,error:n="",fullWidth:o=!1,hint:s="",type:i="text",...a})=>d.jsx(Le,{id:e,disabled:a.disabled,error:n,hint:s,label:r,children:d.jsx("input",{className:K("rpf-input rpf-input-text",{"rpf-input--error":n,"rpf-input--full-width":o}),id:e,name:t,type:i,...a})});function Sr(e,t){const r=te.useRef(null),n=te.useRef(null);return te.useEffect(()=>{const o=r.current;o&&(e&&!o.open?o.showModal():!e&&o.open&&o.close())},[e]),te.useEffect(()=>{const o=r.current;if(!o)return;const s=()=>t(!1),i=a=>{a.preventDefault(),t(!1)};return o.addEventListener("close",s),o.addEventListener("cancel",i),()=>{o.removeEventListener("close",s),o.removeEventListener("cancel",i)}},[t]),te.useEffect(()=>{const o=r.current,s=n.current;if(!o||!s)return;const i=a=>{e&&!s.contains(a.target)&&t(!1)};return o.addEventListener("mousedown",i),()=>o.removeEventListener("mousedown",i)},[e,t]),{dialogRef:r,contentRef:n}}const Cr=({isOpen:e,setIsOpen:t,heading:r,children:n,primaryButtonLink:o,primaryButtonText:s,onClickPrimaryButton:i,secondaryButtonText:a,secondaryButtonLink:l,onClickSecondaryButton:c,tertiaryButtonText:u,tertiaryButtonLink:p,onClickTertiaryButton:v,showCloseButton:f=!0})=>{const{dialogRef:b,contentRef:h}=Sr(e,t);return d.jsx("dialog",{ref:b,className:"rpf-modal","aria-labelledby":"modal-heading","aria-describedby":"modal-description",children:d.jsxs("div",{ref:h,className:"rpf-modal__wrapper",children:[d.jsxs("div",{className:"rpf-modal__header",children:[d.jsx("h2",{className:"rpf-modal__title",id:"modal-heading",children:r}),f&&d.jsx(me,{icon:"close",iconOnly:!0,"aria-label":"Close modal",type:"tertiary",onClick:()=>t(!1)})]}),d.jsx("div",{id:"modal-description",className:"rpf-modal__content",tabIndex:0,children:n}),d.jsxs("div",{className:"rpf-modal__buttons",children:[d.jsx(me,{text:s,href:o,onClick:i,type:"primary"}),a&&d.jsx(me,{text:a,href:l,onClick:c,type:"secondary"}),u&&d.jsx(me,{text:u,href:p,onClick:v,type:"tertiary"})]})]})})},tn=({className:e,children:t})=>{const r=K("rpf-menu",e);return d.jsx("ul",{className:r,children:t})};function $e(){return typeof window<"u"}function ve(e){return nn(e)?(e.nodeName||"").toLowerCase():"#document"}function se(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function fe(e){var t;return(t=(nn(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function nn(e){return $e()?e instanceof Node||e instanceof se(e).Node:!1}function Q(e){return $e()?e instanceof Element||e instanceof se(e).Element:!1}function re(e){return $e()?e instanceof HTMLElement||e instanceof se(e).HTMLElement:!1}function ht(e){return!$e()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof se(e).ShadowRoot}function Ie(e){const{overflow:t,overflowX:r,overflowY:n,display:o}=ae(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&o!=="inline"&&o!=="contents"}function _r(e){return/^(table|td|th)$/.test(ve(e))}function je(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const Or=/transform|translate|scale|rotate|perspective|filter/,Ar=/paint|layout|strict|content/,Ee=e=>!!e&&e!=="none";let mt;function vt(e){const t=Q(e)?ae(e):e;return Ee(t.transform)||Ee(t.translate)||Ee(t.scale)||Ee(t.rotate)||Ee(t.perspective)||!We()&&(Ee(t.backdropFilter)||Ee(t.filter))||Or.test(t.willChange||"")||Ar.test(t.contain||"")}function Pr(e){let t=de(e);for(;re(t)&&!be(t);){if(vt(t))return t;if(je(t))return null;t=de(t)}return null}function We(){return mt==null&&(mt=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),mt}function be(e){return/^(html|body|#document)$/.test(ve(e))}function ae(e){return se(e).getComputedStyle(e)}function Be(e){return Q(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function de(e){if(ve(e)==="html")return e;const t=e.assignedSlot||e.parentNode||ht(e)&&e.host||fe(e);return ht(t)?t.host:t}function rn(e){const t=de(e);return be(t)?e.ownerDocument?e.ownerDocument.body:e.body:re(t)&&Ie(t)?t:rn(t)}function ye(e,t,r){var n;t===void 0&&(t=[]),r===void 0&&(r=!0);const o=rn(e),s=o===((n=e.ownerDocument)==null?void 0:n.body),i=se(o);if(s){const a=bt(i);return t.concat(i,i.visualViewport||[],Ie(o)?o:[],a&&r?ye(a):[])}else return t.concat(o,ye(o,[],r))}function bt(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function xe(e){let t=e.activeElement;for(;((r=t)==null||(r=r.shadowRoot)==null?void 0:r.activeElement)!=null;){var r;t=t.shadowRoot.activeElement}return t}function ie(e,t){if(!e||!t)return!1;const r=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(r&&ht(r)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function Rr(){const e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform}function on(){const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(t=>{let{brand:r,version:n}=t;return r+"/"+n}).join(" "):navigator.userAgent}function Nr(e){return e.mozInputSource===0&&e.isTrusted?!0:yt()&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function Ir(e){return Mr()?!1:!yt()&&e.width===0&&e.height===0||yt()&&e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType==="mouse"||e.width<1&&e.height<1&&e.pressure===0&&e.detail===0&&e.pointerType==="touch"}function kr(){return/apple/i.test(navigator.vendor)}function yt(){const e=/android/i;return e.test(Rr())||e.test(on())}function Mr(){return on().includes("jsdom/")}function sn(e,t){return["mouse","pen"].includes(e)}function Dr(e){return"nativeEvent"in e}function Fr(e){return e.matches("html,body")}function ce(e){return(e==null?void 0:e.ownerDocument)||document}function gt(e,t){if(t==null)return!1;if("composedPath"in e)return e.composedPath().includes(t);const r=e;return r.target!=null&&t.contains(r.target)}function Te(e){return"composedPath"in e?e.composedPath()[0]:e.target}const Lr="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function an(e){return re(e)&&e.matches(Lr)}function wt(e){e.preventDefault(),e.stopPropagation()}function $r(e){return e?e.getAttribute("role")==="combobox"&&an(e):!1}const qe=Math.min,Se=Math.max,Ve=Math.round,Ye=Math.floor,ue=e=>({x:e,y:e}),jr={left:"right",right:"left",bottom:"top",top:"bottom"};function cn(e,t,r){return Se(e,qe(t,r))}function Ue(e,t){return typeof e=="function"?e(t):e}function Ce(e){return e.split("-")[0]}function He(e){return e.split("-")[1]}function ln(e){return e==="x"?"y":"x"}function fn(e){return e==="y"?"height":"width"}function ge(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function un(e){return ln(ge(e))}function Wr(e,t,r){r===void 0&&(r=!1);const n=He(e),o=un(e),s=fn(o);let i=o==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(i=Ke(i)),[i,Ke(i)]}function Br(e){const t=Ke(e);return[Et(e),t,Et(t)]}function Et(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const dn=["left","right"],pn=["right","left"],qr=["top","bottom"],Vr=["bottom","top"];function Yr(e,t,r){switch(e){case"top":case"bottom":return r?t?pn:dn:t?dn:pn;case"left":case"right":return t?qr:Vr;default:return[]}}function Ur(e,t,r,n){const o=He(e);let s=Yr(Ce(e),r==="start",n);return o&&(s=s.map(i=>i+"-"+o),t&&(s=s.concat(s.map(Et)))),s}function Ke(e){const t=Ce(e);return jr[t]+e.slice(t.length)}function Hr(e){return{top:0,right:0,bottom:0,left:0,...e}}function Kr(e){return typeof e!="number"?Hr(e):{top:e,right:e,bottom:e,left:e}}function ze(e){const{x:t,y:r,width:n,height:o}=e;return{width:n,height:o,top:r,left:t,right:t+n,bottom:r+o,x:t,y:r}}/*!
|
|
25
25
|
* tabbable 6.4.0
|
|
26
26
|
* @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
|
|
27
|
-
*/var Kr=["input:not([inert]):not([inert] *)","select:not([inert]):not([inert] *)","textarea:not([inert]):not([inert] *)","a[href]:not([inert]):not([inert] *)","button:not([inert]):not([inert] *)","[tabindex]:not(slot):not([inert]):not([inert] *)","audio[controls]:not([inert]):not([inert] *)","video[controls]:not([inert]):not([inert] *)",'[contenteditable]:not([contenteditable="false"]):not([inert]):not([inert] *)',"details>summary:first-of-type:not([inert]):not([inert] *)","details:not([inert]):not([inert] *)"],Xe=Kr.join(","),hn=typeof Element>"u",Ae=hn?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Ge=!hn&&Element.prototype.getRootNode?function(e){var t;return e==null||(t=e.getRootNode)===null||t===void 0?void 0:t.call(e)}:function(e){return e==null?void 0:e.ownerDocument},Ze=function(t,r){var n;r===void 0&&(r=!0);var o=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"inert"),i=o===""||o==="true",s=i||r&&t&&(typeof t.closest=="function"?t.closest("[inert]"):Ze(t.parentNode));return s},zr=function(t){var r,n=t==null||(r=t.getAttribute)===null||r===void 0?void 0:r.call(t,"contenteditable");return n===""||n==="true"},Xr=function(t,r,n){if(Ze(t))return[];var o=Array.prototype.slice.apply(t.querySelectorAll(Xe));return r&&Ae.call(t,Xe)&&o.unshift(t),o=o.filter(n),o},xt=function(t,r,n){for(var o=[],i=Array.from(t);i.length;){var s=i.shift();if(!Ze(s,!1))if(s.tagName==="SLOT"){var a=s.assignedElements(),l=a.length?a:s.children,c=xt(l,!0,n);n.flatten?o.push.apply(o,c):o.push({scopeParent:s,candidates:c})}else{var f=Ae.call(s,Xe);f&&n.filter(s)&&(r||!t.includes(s))&&o.push(s);var d=s.shadowRoot||typeof n.getShadowRoot=="function"&&n.getShadowRoot(s),v=!Ze(d,!1)&&(!n.shadowRootFilter||n.shadowRootFilter(s));if(d&&v){var u=xt(d===!0?s.children:d.children,!0,n);n.flatten?o.push.apply(o,u):o.push({scopeParent:s,candidates:u})}else i.unshift.apply(i,s.children)}}return o},mn=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},vn=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||zr(t))&&!mn(t)?0:t.tabIndex},Gr=function(t,r){var n=vn(t);return n<0&&r&&!mn(t)?0:n},Zr=function(t,r){return t.tabIndex===r.tabIndex?t.documentOrder-r.documentOrder:t.tabIndex-r.tabIndex},bn=function(t){return t.tagName==="INPUT"},Jr=function(t){return bn(t)&&t.type==="hidden"},Qr=function(t){var r=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(n){return n.tagName==="SUMMARY"});return r},eo=function(t,r){for(var n=0;n<t.length;n++)if(t[n].checked&&t[n].form===r)return t[n]},to=function(t){if(!t.name)return!0;var r=t.form||Ge(t),n=function(a){return r.querySelectorAll('input[type="radio"][name="'+a+'"]')},o;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")o=n(window.CSS.escape(t.name));else try{o=n(t.name)}catch(s){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",s.message),!1}var i=eo(o,t.form);return!i||i===t},no=function(t){return bn(t)&&t.type==="radio"},ro=function(t){return no(t)&&!to(t)},oo=function(t){var r,n=t&&Ge(t),o=(r=n)===null||r===void 0?void 0:r.host,i=!1;if(n&&n!==t){var s,a,l;for(i=!!((s=o)!==null&&s!==void 0&&(a=s.ownerDocument)!==null&&a!==void 0&&a.contains(o)||t!=null&&(l=t.ownerDocument)!==null&&l!==void 0&&l.contains(t));!i&&o;){var c,f,d;n=Ge(o),o=(c=n)===null||c===void 0?void 0:c.host,i=!!((f=o)!==null&&f!==void 0&&(d=f.ownerDocument)!==null&&d!==void 0&&d.contains(o))}}return i},yn=function(t){var r=t.getBoundingClientRect(),n=r.width,o=r.height;return n===0&&o===0},io=function(t,r){var n=r.displayCheck,o=r.getShadowRoot;if(n==="full-native"&&"checkVisibility"in t){var i=t.checkVisibility({checkOpacity:!1,opacityProperty:!1,contentVisibilityAuto:!0,visibilityProperty:!0,checkVisibilityCSS:!0});return!i}if(getComputedStyle(t).visibility==="hidden")return!0;var s=Ae.call(t,"details>summary:first-of-type"),a=s?t.parentElement:t;if(Ae.call(a,"details:not([open]) *"))return!0;if(!n||n==="full"||n==="full-native"||n==="legacy-full"){if(typeof o=="function"){for(var l=t;t;){var c=t.parentElement,f=Ge(t);if(c&&!c.shadowRoot&&o(c)===!0)return yn(t);t.assignedSlot?t=t.assignedSlot:!c&&f!==t.ownerDocument?t=f.host:t=c}t=l}if(oo(t))return!t.getClientRects().length;if(n!=="legacy-full")return!0}else if(n==="non-zero-area")return yn(t);return!1},so=function(t){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(t.tagName))for(var r=t.parentElement;r;){if(r.tagName==="FIELDSET"&&r.disabled){for(var n=0;n<r.children.length;n++){var o=r.children.item(n);if(o.tagName==="LEGEND")return Ae.call(r,"fieldset[disabled] *")?!0:!o.contains(t)}return!0}r=r.parentElement}return!1},ao=function(t,r){return!(r.disabled||Jr(r)||io(r,t)||Qr(r)||so(r))},Tt=function(t,r){return!(ro(r)||vn(r)<0||!ao(t,r))},co=function(t){var r=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(r)||r>=0)},gn=function(t){var r=[],n=[];return t.forEach(function(o,i){var s=!!o.scopeParent,a=s?o.scopeParent:o,l=Gr(a,s),c=s?gn(o.candidates):a;l===0?s?r.push.apply(r,c):r.push(a):n.push({documentOrder:i,tabIndex:l,item:o,isScope:s,content:c})}),n.sort(Zr).reduce(function(o,i){return i.isScope?o.push.apply(o,i.content):o.push(i.content),o},[]).concat(r)},St=function(t,r){r=r||{};var n;return r.getShadowRoot?n=xt([t],r.includeContainer,{filter:Tt.bind(null,r),flatten:!1,getShadowRoot:r.getShadowRoot,shadowRootFilter:co}):n=Xr(t,r.includeContainer,Tt.bind(null,r)),gn(n)},lo=function(t,r){if(r=r||{},!t)throw new Error("No node provided");return Ae.call(t,Xe)===!1?!1:Tt(r,t)};function wn(e,t,r){let{reference:n,floating:o}=e;const i=ge(t),s=fn(t),a=un(s),l=Ce(t),c=i==="y",f=n.x+n.width/2-o.width/2,d=n.y+n.height/2-o.height/2,v=n[a]/2-o[a]/2;let u;switch(l){case"top":u={x:f,y:n.y-o.height};break;case"bottom":u={x:f,y:n.y+n.height};break;case"right":u={x:n.x+n.width,y:d};break;case"left":u={x:n.x-o.width,y:d};break;default:u={x:n.x,y:n.y}}switch(He(t)){case"start":u[s]-=v*(r&&c?-1:1);break;case"end":u[s]+=v*(r&&c?-1:1);break}return u}async function uo(e,t){var r;t===void 0&&(t={});const{x:n,y:o,platform:i,rects:s,elements:a,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:f="viewport",elementContext:d="floating",altBoundary:v=!1,padding:u=0}=Ue(t,e),b=Hr(u),A=a[v?d==="floating"?"reference":"floating":d],R=ze(await i.getClippingRect({element:(r=await(i.isElement==null?void 0:i.isElement(A)))==null||r?A:A.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(a.floating)),boundary:c,rootBoundary:f,strategy:l})),M=d==="floating"?{x:n,y:o,width:s.floating.width,height:s.floating.height}:s.reference,g=await(i.getOffsetParent==null?void 0:i.getOffsetParent(a.floating)),S=await(i.isElement==null?void 0:i.isElement(g))?await(i.getScale==null?void 0:i.getScale(g))||{x:1,y:1}:{x:1,y:1},y=ze(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:M,offsetParent:g,strategy:l}):M);return{top:(R.top-y.top+b.top)/S.y,bottom:(y.bottom-R.bottom+b.bottom)/S.y,left:(R.left-y.left+b.left)/S.x,right:(y.right-R.right+b.right)/S.x}}const fo=50,po=async(e,t,r)=>{const{placement:n="bottom",strategy:o="absolute",middleware:i=[],platform:s}=r,a=s.detectOverflow?s:{...s,detectOverflow:uo},l=await(s.isRTL==null?void 0:s.isRTL(t));let c=await s.getElementRects({reference:e,floating:t,strategy:o}),{x:f,y:d}=wn(c,n,l),v=n,u=0;const b={};for(let h=0;h<i.length;h++){const A=i[h];if(!A)continue;const{name:R,fn:M}=A,{x:g,y:S,data:y,reset:I}=await M({x:f,y:d,initialPlacement:n,placement:v,strategy:o,middlewareData:b,rects:c,platform:a,elements:{reference:e,floating:t}});f=g??f,d=S??d,b[R]={...b[R],...y},I&&u<fo&&(u++,typeof I=="object"&&(I.placement&&(v=I.placement),I.rects&&(c=I.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:o}):I.rects),{x:f,y:d}=wn(c,v,l)),h=-1)}return{x:f,y:d,placement:v,strategy:o,middlewareData:b}},ho=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var r,n;const{placement:o,middlewareData:i,rects:s,initialPlacement:a,platform:l,elements:c}=t,{mainAxis:f=!0,crossAxis:d=!0,fallbackPlacements:v,fallbackStrategy:u="bestFit",fallbackAxisSideDirection:b="none",flipAlignment:h=!0,...A}=Ue(e,t);if((r=i.arrow)!=null&&r.alignmentOffset)return{};const R=Ce(o),M=ge(a),g=Ce(a)===a,S=await(l.isRTL==null?void 0:l.isRTL(c.floating)),y=v||(g||!h?[Ke(a)]:Wr(a)),I=b!=="none";!v&&I&&y.push(...Yr(a,h,b,S));const H=[a,...y],K=await l.detectOverflow(t,A),ee=[];let Z=((n=i.flip)==null?void 0:n.overflows)||[];if(f&&ee.push(K[R]),d){const z=jr(o,s,S);ee.push(K[z[0]],K[z[1]])}if(Z=[...Z,{placement:o,overflows:ee}],!ee.every(z=>z<=0)){var G,B;const z=(((G=i.flip)==null?void 0:G.index)||0)+1,L=H[z];if(L&&(!(d==="alignment"?M!==ge(L):!1)||Z.every(k=>ge(k.placement)===M?k.overflows[0]>0:!0)))return{data:{index:z,overflows:Z},reset:{placement:L}};let j=(B=Z.filter(q=>q.overflows[0]<=0).sort((q,k)=>q.overflows[1]-k.overflows[1])[0])==null?void 0:B.placement;if(!j)switch(u){case"bestFit":{var ne;const q=(ne=Z.filter(k=>{if(I){const T=ge(k.placement);return T===M||T==="y"}return!0}).map(k=>[k.placement,k.overflows.filter(T=>T>0).reduce((T,m)=>T+m,0)]).sort((k,T)=>k[1]-T[1])[0])==null?void 0:ne[0];q&&(j=q);break}case"initialPlacement":j=a;break}if(o!==j)return{reset:{placement:j}}}return{}}}},mo=new Set(["left","top"]);async function vo(e,t){const{placement:r,platform:n,elements:o}=e,i=await(n.isRTL==null?void 0:n.isRTL(o.floating)),s=Ce(r),a=He(r),l=ge(r)==="y",c=mo.has(s)?-1:1,f=i&&l?-1:1,d=Ue(t,e);let{mainAxis:v,crossAxis:u,alignmentAxis:b}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return a&&typeof b=="number"&&(u=a==="end"?b*-1:b),l?{x:u*f,y:v*c}:{x:v*c,y:u*f}}const bo=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var r,n;const{x:o,y:i,placement:s,middlewareData:a}=t,l=await vo(t,e);return s===((r=a.offset)==null?void 0:r.placement)&&(n=a.arrow)!=null&&n.alignmentOffset?{}:{x:o+l.x,y:i+l.y,data:{...l,placement:s}}}}},yo=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:r,y:n,placement:o,platform:i}=t,{mainAxis:s=!0,crossAxis:a=!1,limiter:l={fn:R=>{let{x:M,y:g}=R;return{x:M,y:g}}},...c}=Ue(e,t),f={x:r,y:n},d=await i.detectOverflow(t,c),v=ge(Ce(o)),u=ln(v);let b=f[u],h=f[v];if(s){const R=u==="y"?"top":"left",M=u==="y"?"bottom":"right",g=b+d[R],S=b-d[M];b=cn(g,b,S)}if(a){const R=v==="y"?"top":"left",M=v==="y"?"bottom":"right",g=h+d[R],S=h-d[M];h=cn(g,h,S)}const A=l.fn({...t,[u]:b,[v]:h});return{...A,data:{x:A.x-r,y:A.y-n,enabled:{[u]:s,[v]:a}}}}}};function En(e){const t=ae(e);let r=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const o=re(e),i=o?e.offsetWidth:r,s=o?e.offsetHeight:n,a=Ve(r)!==i||Ve(n)!==s;return a&&(r=i,n=s),{width:r,height:n,$:a}}function Ct(e){return Q(e)?e:e.contextElement}function Re(e){const t=Ct(e);if(!re(t))return fe(1);const r=t.getBoundingClientRect(),{width:n,height:o,$:i}=En(t);let s=(i?Ve(r.width):r.width)/n,a=(i?Ve(r.height):r.height)/o;return(!s||!Number.isFinite(s))&&(s=1),(!a||!Number.isFinite(a))&&(a=1),{x:s,y:a}}const go=fe(0);function xn(e){const t=ie(e);return!We()||!t.visualViewport?go:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function wo(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==ie(e)?!1:t}function _e(e,t,r,n){t===void 0&&(t=!1),r===void 0&&(r=!1);const o=e.getBoundingClientRect(),i=Ct(e);let s=fe(1);t&&(n?Q(n)&&(s=Re(n)):s=Re(e));const a=wo(i,r,n)?xn(i):fe(0);let l=(o.left+a.x)/s.x,c=(o.top+a.y)/s.y,f=o.width/s.x,d=o.height/s.y;if(i){const v=ie(i),u=n&&Q(n)?ie(n):n;let b=v,h=bt(b);for(;h&&n&&u!==b;){const A=Re(h),R=h.getBoundingClientRect(),M=ae(h),g=R.left+(h.clientLeft+parseFloat(M.paddingLeft))*A.x,S=R.top+(h.clientTop+parseFloat(M.paddingTop))*A.y;l*=A.x,c*=A.y,f*=A.x,d*=A.y,l+=g,c+=S,b=ie(h),h=bt(b)}}return ze({width:f,height:d,x:l,y:c})}function Je(e,t){const r=Be(e).scrollLeft;return t?t.left+r:_e(ue(e)).left+r}function Tn(e,t){const r=e.getBoundingClientRect(),n=r.left+t.scrollLeft-Je(e,r),o=r.top+t.scrollTop;return{x:n,y:o}}function Eo(e){let{elements:t,rect:r,offsetParent:n,strategy:o}=e;const i=o==="fixed",s=ue(n),a=t?je(t.floating):!1;if(n===s||a&&i)return r;let l={scrollLeft:0,scrollTop:0},c=fe(1);const f=fe(0),d=re(n);if((d||!d&&!i)&&((ve(n)!=="body"||Ie(s))&&(l=Be(n)),d)){const u=_e(n);c=Re(n),f.x=u.x+n.clientLeft,f.y=u.y+n.clientTop}const v=s&&!d&&!i?Tn(s,l):fe(0);return{width:r.width*c.x,height:r.height*c.y,x:r.x*c.x-l.scrollLeft*c.x+f.x+v.x,y:r.y*c.y-l.scrollTop*c.y+f.y+v.y}}function xo(e){return Array.from(e.getClientRects())}function To(e){const t=ue(e),r=Be(e),n=e.ownerDocument.body,o=Se(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),i=Se(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let s=-r.scrollLeft+Je(e);const a=-r.scrollTop;return ae(n).direction==="rtl"&&(s+=Se(t.clientWidth,n.clientWidth)-o),{width:o,height:i,x:s,y:a}}const Sn=25;function So(e,t){const r=ie(e),n=ue(e),o=r.visualViewport;let i=n.clientWidth,s=n.clientHeight,a=0,l=0;if(o){i=o.width,s=o.height;const f=We();(!f||f&&t==="fixed")&&(a=o.offsetLeft,l=o.offsetTop)}const c=Je(n);if(c<=0){const f=n.ownerDocument,d=f.body,v=getComputedStyle(d),u=f.compatMode==="CSS1Compat"&&parseFloat(v.marginLeft)+parseFloat(v.marginRight)||0,b=Math.abs(n.clientWidth-d.clientWidth-u);b<=Sn&&(i-=b)}else c<=Sn&&(i+=c);return{width:i,height:s,x:a,y:l}}function Co(e,t){const r=_e(e,!0,t==="fixed"),n=r.top+e.clientTop,o=r.left+e.clientLeft,i=re(e)?Re(e):fe(1),s=e.clientWidth*i.x,a=e.clientHeight*i.y,l=o*i.x,c=n*i.y;return{width:s,height:a,x:l,y:c}}function Cn(e,t,r){let n;if(t==="viewport")n=So(e,r);else if(t==="document")n=To(ue(e));else if(Q(t))n=Co(t,r);else{const o=xn(e);n={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return ze(n)}function _n(e,t){const r=de(e);return r===t||!Q(r)||be(r)?!1:ae(r).position==="fixed"||_n(r,t)}function _o(e,t){const r=t.get(e);if(r)return r;let n=ye(e,[],!1).filter(a=>Q(a)&&ve(a)!=="body"),o=null;const i=ae(e).position==="fixed";let s=i?de(e):e;for(;Q(s)&&!be(s);){const a=ae(s),l=vt(s);!l&&a.position==="fixed"&&(o=null),(i?!l&&!o:!l&&a.position==="static"&&!!o&&(o.position==="absolute"||o.position==="fixed")||Ie(s)&&!l&&_n(e,s))?n=n.filter(f=>f!==s):o=a,s=de(s)}return t.set(e,n),n}function Oo(e){let{element:t,boundary:r,rootBoundary:n,strategy:o}=e;const s=[...r==="clippingAncestors"?je(t)?[]:_o(t,this._c):[].concat(r),n],a=Cn(t,s[0],o);let l=a.top,c=a.right,f=a.bottom,d=a.left;for(let v=1;v<s.length;v++){const u=Cn(t,s[v],o);l=Se(u.top,l),c=qe(u.right,c),f=qe(u.bottom,f),d=Se(u.left,d)}return{width:c-d,height:f-l,x:d,y:l}}function Ao(e){const{width:t,height:r}=En(e);return{width:t,height:r}}function Ro(e,t,r){const n=re(t),o=ue(t),i=r==="fixed",s=_e(e,!0,i,t);let a={scrollLeft:0,scrollTop:0};const l=fe(0);function c(){l.x=Je(o)}if(n||!n&&!i)if((ve(t)!=="body"||Ie(o))&&(a=Be(t)),n){const u=_e(t,!0,i,t);l.x=u.x+t.clientLeft,l.y=u.y+t.clientTop}else o&&c();i&&!n&&o&&c();const f=o&&!n&&!i?Tn(o,a):fe(0),d=s.left+a.scrollLeft-l.x-f.x,v=s.top+a.scrollTop-l.y-f.y;return{x:d,y:v,width:s.width,height:s.height}}function _t(e){return ae(e).position==="static"}function On(e,t){if(!re(e)||ae(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return ue(e)===r&&(r=r.ownerDocument.body),r}function An(e,t){const r=ie(e);if(je(e))return r;if(!re(e)){let o=de(e);for(;o&&!be(o);){if(Q(o)&&!_t(o))return o;o=de(o)}return r}let n=On(e,t);for(;n&&Cr(n)&&_t(n);)n=On(n,t);return n&&be(n)&&_t(n)&&!vt(n)?r:n||Ar(e)||r}const Po=async function(e){const t=this.getOffsetParent||An,r=this.getDimensions,n=await r(e.floating);return{reference:Ro(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function No(e){return ae(e).direction==="rtl"}const Io={convertOffsetParentRelativeRectToViewportRelativeRect:Eo,getDocumentElement:ue,getClippingRect:Oo,getOffsetParent:An,getElementRects:Po,getClientRects:xo,getDimensions:Ao,getScale:Re,isElement:Q,isRTL:No};function Rn(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Mo(e,t){let r=null,n;const o=ue(e);function i(){var a;clearTimeout(n),(a=r)==null||a.disconnect(),r=null}function s(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),i();const c=e.getBoundingClientRect(),{left:f,top:d,width:v,height:u}=c;if(a||t(),!v||!u)return;const b=Ye(d),h=Ye(o.clientWidth-(f+v)),A=Ye(o.clientHeight-(d+u)),R=Ye(f),g={rootMargin:-b+"px "+-h+"px "+-A+"px "+-R+"px",threshold:Se(0,qe(1,l))||1};let S=!0;function y(I){const H=I[0].intersectionRatio;if(H!==l){if(!S)return s();H?s(!1,H):n=setTimeout(()=>{s(!1,1e-7)},1e3)}H===1&&!Rn(c,e.getBoundingClientRect())&&s(),S=!1}try{r=new IntersectionObserver(y,{...g,root:o.ownerDocument})}catch{r=new IntersectionObserver(y,g)}r.observe(e)}return s(!0),i}function ko(e,t,r,n){n===void 0&&(n={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=n,c=Ct(e),f=o||i?[...c?ye(c):[],...t?ye(t):[]]:[];f.forEach(R=>{o&&R.addEventListener("scroll",r,{passive:!0}),i&&R.addEventListener("resize",r)});const d=c&&a?Mo(c,r):null;let v=-1,u=null;s&&(u=new ResizeObserver(R=>{let[M]=R;M&&M.target===c&&u&&t&&(u.unobserve(t),cancelAnimationFrame(v),v=requestAnimationFrame(()=>{var g;(g=u)==null||g.observe(t)})),r()}),c&&!l&&u.observe(c),t&&u.observe(t));let b,h=l?_e(e):null;l&&A();function A(){const R=_e(e);h&&!Rn(h,R)&&r(),h=R,b=requestAnimationFrame(A)}return r(),()=>{var R;f.forEach(M=>{o&&M.removeEventListener("scroll",r),i&&M.removeEventListener("resize",r)}),d==null||d(),(R=u)==null||R.disconnect(),u=null,l&&cancelAnimationFrame(b)}}const Do=bo,Lo=yo,Fo=ho,$o=(e,t,r)=>{const n=new Map,o={platform:Io,...r},i={...o.platform,_c:n};return po(e,t,{...o,platform:i})};var jo=typeof document<"u",Wo=function(){},Qe=jo?te.useLayoutEffect:Wo;function et(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let r,n,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(r=e.length,r!==t.length)return!1;for(n=r;n--!==0;)if(!et(e[n],t[n]))return!1;return!0}if(o=Object.keys(e),r=o.length,r!==Object.keys(t).length)return!1;for(n=r;n--!==0;)if(!{}.hasOwnProperty.call(t,o[n]))return!1;for(n=r;n--!==0;){const i=o[n];if(!(i==="_owner"&&e.$$typeof)&&!et(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function Pn(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Nn(e,t){const r=Pn(e);return Math.round(t*r)/r}function Ot(e){const t=x.useRef(e);return Qe(()=>{t.current=e}),t}function Bo(e){e===void 0&&(e={});const{placement:t="bottom",strategy:r="absolute",middleware:n=[],platform:o,elements:{reference:i,floating:s}={},transform:a=!0,whileElementsMounted:l,open:c}=e,[f,d]=x.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[v,u]=x.useState(n);et(v,n)||u(n);const[b,h]=x.useState(null),[A,R]=x.useState(null),M=x.useCallback(k=>{k!==I.current&&(I.current=k,h(k))},[]),g=x.useCallback(k=>{k!==H.current&&(H.current=k,R(k))},[]),S=i||b,y=s||A,I=x.useRef(null),H=x.useRef(null),K=x.useRef(f),ee=l!=null,Z=Ot(l),G=Ot(o),B=Ot(c),ne=x.useCallback(()=>{if(!I.current||!H.current)return;const k={placement:t,strategy:r,middleware:v};G.current&&(k.platform=G.current),$o(I.current,H.current,k).then(T=>{const m={...T,isPositioned:B.current!==!1};z.current&&!et(K.current,m)&&(K.current=m,rr.flushSync(()=>{d(m)}))})},[v,t,r,G,B]);Qe(()=>{c===!1&&K.current.isPositioned&&(K.current.isPositioned=!1,d(k=>({...k,isPositioned:!1})))},[c]);const z=x.useRef(!1);Qe(()=>(z.current=!0,()=>{z.current=!1}),[]),Qe(()=>{if(S&&(I.current=S),y&&(H.current=y),S&&y){if(Z.current)return Z.current(S,y,ne);ne()}},[S,y,ne,Z,ee]);const L=x.useMemo(()=>({reference:I,floating:H,setReference:M,setFloating:g}),[M,g]),j=x.useMemo(()=>({reference:S,floating:y}),[S,y]),q=x.useMemo(()=>{const k={position:r,left:0,top:0};if(!j.floating)return k;const T=Nn(j.floating,f.x),m=Nn(j.floating,f.y);return a?{...k,transform:"translate("+T+"px, "+m+"px)",...Pn(j.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:T,top:m}},[r,a,j.floating,f.x,f.y]);return x.useMemo(()=>({...f,update:ne,refs:L,elements:j,floatingStyles:q}),[f,ne,L,j,q])}const qo=(e,t)=>{const r=Do(e);return{name:r.name,fn:r.fn,options:[e,t]}},Vo=(e,t)=>{const r=Lo(e);return{name:r.name,fn:r.fn,options:[e,t]}},Yo=(e,t)=>{const r=Fo(e);return{name:r.name,fn:r.fn,options:[e,t]}},In={...x},Uo=In.useInsertionEffect||(e=>e());function we(e){const t=x.useRef(()=>{if(process.env.NODE_ENV!=="production")throw new Error("Cannot call an event handler while rendering.")});return Uo(()=>{t.current=e}),x.useCallback(function(){for(var r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];return t.current==null?void 0:t.current(...n)},[])}var pe=typeof document<"u"?te.useLayoutEffect:te.useEffect;function tt(){return tt=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},tt.apply(this,arguments)}let Mn=!1,Ho=0;const kn=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+Ho++;function Ko(){const[e,t]=x.useState(()=>Mn?kn():void 0);return pe(()=>{e==null&&t(kn())},[]),x.useEffect(()=>{Mn=!0},[]),e}const Dn=In.useId||Ko;let At;process.env.NODE_ENV!=="production"&&(At=new Set);function zo(){for(var e,t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];const o="Floating UI: "+r.join(" ");if(!((e=At)!=null&&e.has(o))){var i;(i=At)==null||i.add(o),console.error(o)}}function Xo(){const e=new Map;return{emit(t,r){var n;(n=e.get(t))==null||n.forEach(o=>o(r))},on(t,r){e.set(t,[...e.get(t)||[],r])},off(t,r){var n;e.set(t,((n=e.get(t))==null?void 0:n.filter(o=>o!==r))||[])}}}const Go=x.createContext(null),Zo=x.createContext(null),Ln=()=>{var e;return((e=x.useContext(Go))==null?void 0:e.id)||null},Rt=()=>x.useContext(Zo);function nt(e){return"data-floating-ui-"+e}function Pt(e){const t=te.useRef(e);return pe(()=>{t.current=e}),t}let Fn=0;function Pe(e,t){t===void 0&&(t={});const{preventScroll:r=!1,cancelPrevious:n=!0,sync:o=!1}=t;n&&cancelAnimationFrame(Fn);const i=()=>e==null?void 0:e.focus({preventScroll:r});o?i():Fn=requestAnimationFrame(i)}function Jo(e,t){var r;let n=[],o=(r=e.find(i=>i.id===t))==null?void 0:r.parentId;for(;o;){const i=e.find(s=>s.id===o);o=i==null?void 0:i.parentId,i&&(n=n.concat(i))}return n}function Me(e,t){let r=e.filter(o=>{var i;return o.parentId===t&&((i=o.context)==null?void 0:i.open)}),n=r;for(;n.length;)n=e.filter(o=>{var i;return(i=n)==null?void 0:i.some(s=>{var a;return o.parentId===s.id&&((a=o.context)==null?void 0:a.open)})}),r=r.concat(n);return r}let Ne=new WeakMap,rt=new WeakSet,ot={},Nt=0;const Qo=()=>typeof HTMLElement<"u"&&"inert"in HTMLElement.prototype,$n=e=>e&&(e.host||$n(e.parentNode)),ei=(e,t)=>t.map(r=>{if(e.contains(r))return r;const n=$n(r);return e.contains(n)?n:null}).filter(r=>r!=null);function ti(e,t,r,n){const o="data-floating-ui-inert",i=n?"inert":r?"aria-hidden":null,s=ei(t,e),a=new Set,l=new Set(s),c=[];ot[o]||(ot[o]=new WeakMap);const f=ot[o];s.forEach(d),v(t),a.clear();function d(u){!u||a.has(u)||(a.add(u),u.parentNode&&d(u.parentNode))}function v(u){!u||l.has(u)||[].forEach.call(u.children,b=>{if(ve(b)!=="script")if(a.has(b))v(b);else{const h=i?b.getAttribute(i):null,A=h!==null&&h!=="false",R=(Ne.get(b)||0)+1,M=(f.get(b)||0)+1;Ne.set(b,R),f.set(b,M),c.push(b),R===1&&A&&rt.add(b),M===1&&b.setAttribute(o,""),!A&&i&&b.setAttribute(i,"true")}})}return Nt++,()=>{c.forEach(u=>{const b=(Ne.get(u)||0)-1,h=(f.get(u)||0)-1;Ne.set(u,b),f.set(u,h),b||(!rt.has(u)&&i&&u.removeAttribute(i),rt.delete(u)),h||u.removeAttribute(o)}),Nt--,Nt||(Ne=new WeakMap,Ne=new WeakMap,rt=new WeakSet,ot={})}}function jn(e,t,r){t===void 0&&(t=!1),r===void 0&&(r=!1);const n=ce(e[0]).body;return ti(e.concat(Array.from(n.querySelectorAll("[aria-live]"))),n,t,r)}const it=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function Wn(e,t){const r=St(e,it());t==="prev"&&r.reverse();const n=r.indexOf(xe(ce(e)));return r.slice(n+1)[0]}function ni(){return Wn(document.body,"next")}function ri(){return Wn(document.body,"prev")}function Bn(e,t){const r=t||e.currentTarget,n=e.relatedTarget;return!n||!se(r,n)}const It={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"fixed",whiteSpace:"nowrap",width:"1px",top:0,left:0};let oi;function qn(e){e.key==="Tab"&&(e.target,clearTimeout(oi))}const Vn=x.forwardRef(function(t,r){const[n,o]=x.useState();pe(()=>(Ir()&&o("button"),document.addEventListener("keydown",qn),()=>{document.removeEventListener("keydown",qn)}),[]);const i={ref:r,tabIndex:0,role:n,"aria-hidden":n?void 0:!0,[nt("focus-guard")]:"",style:It};return x.createElement("span",tt({},t,i))}),ii=x.createContext(null),si=()=>x.useContext(ii),Mt="data-floating-ui-focusable";function ai(e){return e?e.hasAttribute(Mt)?e:e.querySelector("["+Mt+"]")||e:null}const Yn=20;let Oe=[];function kt(e){Oe=Oe.filter(r=>r.isConnected);let t=e;if(!(!t||ve(t)==="body")){if(!lo(t,it())){const r=St(t,it())[0];r&&(t=r)}Oe.push(t),Oe.length>Yn&&(Oe=Oe.slice(-Yn))}}function Un(){return Oe.slice().reverse().find(e=>e.isConnected)}const ci=x.forwardRef(function(t,r){return x.createElement("button",tt({},t,{type:"button",ref:r,tabIndex:-1,style:It}))});function li(e){const{context:t,children:r,disabled:n=!1,order:o=["content"],guards:i=!0,initialFocus:s=0,returnFocus:a=!0,restoreFocus:l=!1,modal:c=!0,visuallyHiddenDismiss:f=!1,closeOnFocusOut:d=!0}=e,{open:v,refs:u,nodeId:b,onOpenChange:h,events:A,dataRef:R,floatingId:M,elements:{domReference:g,floating:S}}=t,y=typeof s=="number"&&s<0,I=Fr(g)&&y,H=Qo()?i:!0,K=Pt(o),ee=Pt(s),Z=Pt(a),G=Rt(),B=si(),ne=x.useRef(null),z=x.useRef(null),L=x.useRef(!1),j=x.useRef(!1),q=x.useRef(-1),k=B!=null,T=ai(S),m=we(function(C){return C===void 0&&(C=T),C?St(C,it()):[]}),E=we(C=>{const P=m(C);return K.current.map(w=>g&&w==="reference"?g:T&&w==="floating"?T:P).filter(Boolean).flat()});x.useEffect(()=>{if(n||!c)return;function C(w){if(w.key==="Tab"){se(T,xe(ce(T)))&&m().length===0&&!I&&wt(w);const O=E(),N=Te(w);K.current[0]==="reference"&&N===g&&(wt(w),w.shiftKey?Pe(O[O.length-1]):Pe(O[1])),K.current[1]==="floating"&&N===T&&w.shiftKey&&(wt(w),Pe(O[0]))}}const P=ce(T);return P.addEventListener("keydown",C),()=>{P.removeEventListener("keydown",C)}},[n,g,T,c,K,I,m,E]),x.useEffect(()=>{if(n||!S)return;function C(P){const w=Te(P),N=m().indexOf(w);N!==-1&&(q.current=N)}return S.addEventListener("focusin",C),()=>{S.removeEventListener("focusin",C)}},[n,S,m]),x.useEffect(()=>{if(n||!d)return;function C(){j.current=!0,setTimeout(()=>{j.current=!1})}function P(w){const O=w.relatedTarget;queueMicrotask(()=>{const N=!(se(g,O)||se(S,O)||se(O,S)||se(B==null?void 0:B.portalNode,O)||O!=null&&O.hasAttribute(nt("focus-guard"))||G&&(Me(G.nodesRef.current,b).find($=>{var D,X;return se((D=$.context)==null?void 0:D.elements.floating,O)||se((X=$.context)==null?void 0:X.elements.domReference,O)})||Jo(G.nodesRef.current,b).find($=>{var D,X;return((D=$.context)==null?void 0:D.elements.floating)===O||((X=$.context)==null?void 0:X.elements.domReference)===O})));if(l&&N&&xe(ce(T))===ce(T).body){re(T)&&T.focus();const $=q.current,D=m(),X=D[$]||D[D.length-1]||T;re(X)&&X.focus()}(I||!c)&&O&&N&&!j.current&&O!==Un()&&(L.current=!0,h(!1,w,"focus-out"))})}if(S&&re(g))return g.addEventListener("focusout",P),g.addEventListener("pointerdown",C),S.addEventListener("focusout",P),()=>{g.removeEventListener("focusout",P),g.removeEventListener("pointerdown",C),S.removeEventListener("focusout",P)}},[n,g,S,T,c,b,G,B,h,d,l,m,I]),x.useEffect(()=>{var C;if(n)return;const P=Array.from((B==null||(C=B.portalNode)==null?void 0:C.querySelectorAll("["+nt("portal")+"]"))||[]);if(S){const w=[S,...P,ne.current,z.current,K.current.includes("reference")||I?g:null].filter(N=>N!=null),O=c||I?jn(w,H,!H):jn(w);return()=>{O()}}},[n,g,S,c,K,B,I,H]),pe(()=>{if(n||!re(T))return;const C=ce(T),P=xe(C);queueMicrotask(()=>{const w=E(T),O=ee.current,N=(typeof O=="number"?w[O]:O.current)||T,$=se(T,P);!y&&!$&&v&&Pe(N,{preventScroll:N===T})})},[n,v,T,y,E,ee]),pe(()=>{if(n||!T)return;let C=!1;const P=ce(T),w=xe(P);let N=R.current.openEvent;kt(w);function $(_){let{open:oe,reason:he,event:le,nested:Ft}=_;oe&&(N=le),he==="escape-key"&&u.domReference.current&&kt(u.domReference.current),he==="hover"&&le.type==="mouseleave"&&(L.current=!0),he==="outside-press"&&(Ft?(L.current=!1,C=!0):L.current=!(Pr(le)||Nr(le)))}A.on("openchange",$);const D=P.createElement("span");D.setAttribute("tabindex","-1"),D.setAttribute("aria-hidden","true"),Object.assign(D.style,It),k&&g&&g.insertAdjacentElement("afterend",D);function X(){return typeof Z.current=="boolean"?Un()||D:Z.current.current||D}return()=>{A.off("openchange",$);const _=xe(P),oe=se(S,_)||G&&Me(G.nodesRef.current,b).some(Ft=>{var tr;return se((tr=Ft.context)==null?void 0:tr.elements.floating,_)});(oe||N&&["click","mousedown"].includes(N.type))&&u.domReference.current&&kt(u.domReference.current);const le=X();queueMicrotask(()=>{Z.current&&!L.current&&re(le)&&(!(le!==_&&_!==P.body)||oe)&&le.focus({preventScroll:C}),D.remove()})}},[n,S,T,Z,R,u,A,G,b,k,g]),x.useEffect(()=>{queueMicrotask(()=>{L.current=!1})},[n]),pe(()=>{if(!n&&B)return B.setFocusManagerState({modal:c,closeOnFocusOut:d,open:v,onOpenChange:h,refs:u}),()=>{B.setFocusManagerState(null)}},[n,B,c,v,h,u,d]),pe(()=>{if(n||!T||typeof MutationObserver!="function"||y)return;const C=()=>{const w=T.getAttribute("tabindex"),O=m(),N=xe(ce(S)),$=O.indexOf(N);$!==-1&&(q.current=$),K.current.includes("floating")||N!==u.domReference.current&&O.length===0?w!=="0"&&T.setAttribute("tabindex","0"):w!=="-1"&&T.setAttribute("tabindex","-1")};C();const P=new MutationObserver(C);return P.observe(T,{childList:!0,subtree:!0,attributes:!0}),()=>{P.disconnect()}},[n,S,T,u,K,m,y]);function F(C){return n||!f||!c?null:x.createElement(ci,{ref:C==="start"?ne:z,onClick:P=>h(!1,P.nativeEvent)},typeof f=="string"?f:"Dismiss")}const W=!n&&H&&(c?!I:!0)&&(k||c);return x.createElement(x.Fragment,null,W&&x.createElement(Vn,{"data-type":"inside",ref:B==null?void 0:B.beforeInsideRef,onFocus:C=>{if(c){const w=E();Pe(o[0]==="reference"?w[0]:w[w.length-1])}else if(B!=null&&B.preserveTabOrder&&B.portalNode)if(L.current=!1,Bn(C,B.portalNode)){const w=ni()||g;w==null||w.focus()}else{var P;(P=B.beforeOutsideRef.current)==null||P.focus()}}}),!I&&F("start"),r,F("end"),W&&x.createElement(Vn,{"data-type":"inside",ref:B==null?void 0:B.afterInsideRef,onFocus:C=>{if(c)Pe(E()[0]);else if(B!=null&&B.preserveTabOrder&&B.portalNode)if(d&&(L.current=!0),Bn(C,B.portalNode)){const w=ri()||g;w==null||w.focus()}else{var P;(P=B.afterOutsideRef.current)==null||P.focus()}}}))}function Hn(e){return re(e.target)&&e.target.tagName==="BUTTON"}function Kn(e){return an(e)}function ui(e,t){t===void 0&&(t={});const{open:r,onOpenChange:n,dataRef:o,elements:{domReference:i}}=e,{enabled:s=!0,event:a="click",toggle:l=!0,ignoreMouse:c=!1,keyboardHandlers:f=!0,stickIfOpen:d=!0}=t,v=x.useRef(),u=x.useRef(!1),b=x.useMemo(()=>({onPointerDown(h){v.current=h.pointerType},onMouseDown(h){const A=v.current;h.button===0&&a!=="click"&&(sn(A)&&c||(r&&l&&(!(o.current.openEvent&&d)||o.current.openEvent.type==="mousedown")?n(!1,h.nativeEvent,"click"):(h.preventDefault(),n(!0,h.nativeEvent,"click"))))},onClick(h){const A=v.current;if(a==="mousedown"&&v.current){v.current=void 0;return}sn(A)&&c||(r&&l&&(!(o.current.openEvent&&d)||o.current.openEvent.type==="click")?n(!1,h.nativeEvent,"click"):n(!0,h.nativeEvent,"click"))},onKeyDown(h){v.current=void 0,!(h.defaultPrevented||!f||Hn(h))&&(h.key===" "&&!Kn(i)&&(h.preventDefault(),u.current=!0),h.key==="Enter"&&n(!(r&&l),h.nativeEvent,"click"))},onKeyUp(h){h.defaultPrevented||!f||Hn(h)||Kn(i)||h.key===" "&&u.current&&(u.current=!1,n(!(r&&l),h.nativeEvent,"click"))}}),[o,i,a,c,f,n,r,d,l]);return x.useMemo(()=>s?{reference:b}:{},[s,b])}const fi={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},di={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},zn=e=>{var t,r;return{escapeKey:typeof e=="boolean"?e:(t=e==null?void 0:e.escapeKey)!=null?t:!1,outsidePress:typeof e=="boolean"?e:(r=e==null?void 0:e.outsidePress)!=null?r:!0}};function pi(e,t){t===void 0&&(t={});const{open:r,onOpenChange:n,elements:o,dataRef:i}=e,{enabled:s=!0,escapeKey:a=!0,outsidePress:l=!0,outsidePressEvent:c="pointerdown",referencePress:f=!1,referencePressEvent:d="pointerdown",ancestorScroll:v=!1,bubbles:u,capture:b}=t,h=Rt(),A=we(typeof l=="function"?l:()=>!1),R=typeof l=="function"?A:l,M=x.useRef(!1),g=x.useRef(!1),{escapeKey:S,outsidePress:y}=zn(u),{escapeKey:I,outsidePress:H}=zn(b),K=x.useRef(!1),ee=we(L=>{var j;if(!r||!s||!a||L.key!=="Escape"||K.current)return;const q=(j=i.current.floatingContext)==null?void 0:j.nodeId,k=h?Me(h.nodesRef.current,q):[];if(!S&&(L.stopPropagation(),k.length>0)){let T=!0;if(k.forEach(m=>{var E;if((E=m.context)!=null&&E.open&&!m.context.dataRef.current.__escapeKeyBubbles){T=!1;return}}),!T)return}n(!1,kr(L)?L.nativeEvent:L,"escape-key")}),Z=we(L=>{var j;const q=()=>{var k;ee(L),(k=Te(L))==null||k.removeEventListener("keydown",q)};(j=Te(L))==null||j.addEventListener("keydown",q)}),G=we(L=>{var j;const q=M.current;M.current=!1;const k=g.current;if(g.current=!1,c==="click"&&k||q||typeof R=="function"&&!R(L))return;const T=Te(L),m="["+nt("inert")+"]",E=ce(o.floating).querySelectorAll(m);let F=Q(T)?T:null;for(;F&&!be(F);){const w=de(F);if(be(w)||!Q(w))break;F=w}if(E.length&&Q(T)&&!Dr(T)&&!se(T,o.floating)&&Array.from(E).every(w=>!se(F,w)))return;if(re(T)&&z){const w=T.clientWidth>0&&T.scrollWidth>T.clientWidth,O=T.clientHeight>0&&T.scrollHeight>T.clientHeight;let N=O&&L.offsetX>T.clientWidth;if(O&&ae(T).direction==="rtl"&&(N=L.offsetX<=T.offsetWidth-T.clientWidth),N||w&&L.offsetY>T.clientHeight)return}const W=(j=i.current.floatingContext)==null?void 0:j.nodeId,C=h&&Me(h.nodesRef.current,W).some(w=>{var O;return gt(L,(O=w.context)==null?void 0:O.elements.floating)});if(gt(L,o.floating)||gt(L,o.domReference)||C)return;const P=h?Me(h.nodesRef.current,W):[];if(P.length>0){let w=!0;if(P.forEach(O=>{var N;if((N=O.context)!=null&&N.open&&!O.context.dataRef.current.__outsidePressBubbles){w=!1;return}}),!w)return}n(!1,L,"outside-press")}),B=we(L=>{var j;const q=()=>{var k;G(L),(k=Te(L))==null||k.removeEventListener(c,q)};(j=Te(L))==null||j.addEventListener(c,q)});x.useEffect(()=>{if(!r||!s)return;i.current.__escapeKeyBubbles=S,i.current.__outsidePressBubbles=y;let L=-1;function j(E){n(!1,E,"ancestor-scroll")}function q(){window.clearTimeout(L),K.current=!0}function k(){L=window.setTimeout(()=>{K.current=!1},We()?5:0)}const T=ce(o.floating);a&&(T.addEventListener("keydown",I?Z:ee,I),T.addEventListener("compositionstart",q),T.addEventListener("compositionend",k)),R&&T.addEventListener(c,H?B:G,H);let m=[];return v&&(Q(o.domReference)&&(m=ye(o.domReference)),Q(o.floating)&&(m=m.concat(ye(o.floating))),!Q(o.reference)&&o.reference&&o.reference.contextElement&&(m=m.concat(ye(o.reference.contextElement)))),m=m.filter(E=>{var F;return E!==((F=T.defaultView)==null?void 0:F.visualViewport)}),m.forEach(E=>{E.addEventListener("scroll",j,{passive:!0})}),()=>{a&&(T.removeEventListener("keydown",I?Z:ee,I),T.removeEventListener("compositionstart",q),T.removeEventListener("compositionend",k)),R&&T.removeEventListener(c,H?B:G,H),m.forEach(E=>{E.removeEventListener("scroll",j)}),window.clearTimeout(L)}},[i,o,a,R,c,r,n,v,s,S,y,ee,I,Z,G,H,B]),x.useEffect(()=>{M.current=!1},[R,c]);const ne=x.useMemo(()=>({onKeyDown:ee,[fi[d]]:L=>{f&&n(!1,L.nativeEvent,"reference-press")}}),[ee,n,f,d]),z=x.useMemo(()=>({onKeyDown:ee,onMouseDown(){g.current=!0},onMouseUp(){g.current=!0},[di[c]]:()=>{M.current=!0}}),[ee,c]);return x.useMemo(()=>s?{reference:ne,floating:z}:{},[s,ne,z])}function hi(e){const{open:t=!1,onOpenChange:r,elements:n}=e,o=Dn(),i=x.useRef({}),[s]=x.useState(()=>Xo()),a=Ln()!=null;if(process.env.NODE_ENV!=="production"){const u=n.reference;u&&!Q(u)&&zo("Cannot pass a virtual element to the `elements.reference` option,","as it must be a real DOM element. Use `refs.setPositionReference()`","instead.")}const[l,c]=x.useState(n.reference),f=we((u,b,h)=>{i.current.openEvent=u?b:void 0,s.emit("openchange",{open:u,event:b,reason:h,nested:a}),r==null||r(u,b,h)}),d=x.useMemo(()=>({setPositionReference:c}),[]),v=x.useMemo(()=>({reference:l||n.reference||null,floating:n.floating||null,domReference:n.reference}),[l,n.reference,n.floating]);return x.useMemo(()=>({dataRef:i,open:t,onOpenChange:f,elements:v,events:s,floatingId:o,refs:d}),[t,f,v,s,o,d])}function mi(e){e===void 0&&(e={});const{nodeId:t}=e,r=hi({...e,elements:{reference:null,floating:null,...e.elements}}),n=e.rootContext||r,o=n.elements,[i,s]=x.useState(null),[a,l]=x.useState(null),f=(o==null?void 0:o.domReference)||i,d=x.useRef(null),v=Rt();pe(()=>{f&&(d.current=f)},[f]);const u=Bo({...e,elements:{...o,...a&&{reference:a}}}),b=x.useCallback(g=>{const S=Q(g)?{getBoundingClientRect:()=>g.getBoundingClientRect(),contextElement:g}:g;l(S),u.refs.setReference(S)},[u.refs]),h=x.useCallback(g=>{(Q(g)||g===null)&&(d.current=g,s(g)),(Q(u.refs.reference.current)||u.refs.reference.current===null||g!==null&&!Q(g))&&u.refs.setReference(g)},[u.refs]),A=x.useMemo(()=>({...u.refs,setReference:h,setPositionReference:b,domReference:d}),[u.refs,h,b]),R=x.useMemo(()=>({...u.elements,domReference:f}),[u.elements,f]),M=x.useMemo(()=>({...u,...n,refs:A,elements:R,nodeId:t}),[u,A,R,t,n]);return pe(()=>{n.dataRef.current.floatingContext=M;const g=v==null?void 0:v.nodesRef.current.find(S=>S.id===t);g&&(g.context=M)}),x.useMemo(()=>({...u,context:M,refs:A,elements:R}),[u,A,R,M])}const Xn="active",Gn="selected";function Dt(e,t,r){const n=new Map,o=r==="item";let i=e;if(o&&e){const{[Xn]:s,[Gn]:a,...l}=e;i=l}return{...r==="floating"&&{tabIndex:-1,[Mt]:""},...i,...t.map(s=>{const a=s?s[r]:null;return typeof a=="function"?e?a(e):null:a}).concat(e).reduce((s,a)=>(a&&Object.entries(a).forEach(l=>{let[c,f]=l;if(!(o&&[Xn,Gn].includes(c)))if(c.indexOf("on")===0){if(n.has(c)||n.set(c,[]),typeof f=="function"){var d;(d=n.get(c))==null||d.push(f),s[c]=function(){for(var v,u=arguments.length,b=new Array(u),h=0;h<u;h++)b[h]=arguments[h];return(v=n.get(c))==null?void 0:v.map(A=>A(...b)).find(A=>A!==void 0)}}}else s[c]=f}),s),{})}}function vi(e){e===void 0&&(e=[]);const t=e.map(a=>a==null?void 0:a.reference),r=e.map(a=>a==null?void 0:a.floating),n=e.map(a=>a==null?void 0:a.item),o=x.useCallback(a=>Dt(a,e,"reference"),t),i=x.useCallback(a=>Dt(a,e,"floating"),r),s=x.useCallback(a=>Dt(a,e,"item"),n);return x.useMemo(()=>({getReferenceProps:o,getFloatingProps:i,getItemProps:s}),[o,i,s])}const bi=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function yi(e,t){var r;t===void 0&&(t={});const{open:n,floatingId:o}=e,{enabled:i=!0,role:s="dialog"}=t,a=(r=bi.get(s))!=null?r:s,l=Dn(),f=Ln()!=null,d=x.useMemo(()=>a==="tooltip"||s==="label"?{["aria-"+(s==="label"?"labelledby":"describedby")]:n?o:void 0}:{"aria-expanded":n?"true":"false","aria-haspopup":a==="alertdialog"?"dialog":a,"aria-controls":n?o:void 0,...a==="listbox"&&{role:"combobox"},...a==="menu"&&{id:l},...a==="menu"&&f&&{role:"menuitem"},...s==="select"&&{"aria-autocomplete":"none"},...s==="combobox"&&{"aria-autocomplete":"list"}},[a,o,f,n,l,s]),v=x.useMemo(()=>{const b={id:o,...a&&{role:a}};return a==="tooltip"||s==="label"?b:{...b,...a==="menu"&&{"aria-labelledby":l}}},[a,o,l,s]),u=x.useCallback(b=>{let{active:h,selected:A}=b;const R={role:"option",...h&&{id:o+"-option"}};switch(s){case"select":return{...R,"aria-selected":h&&A};case"combobox":return{...R,...h&&{"aria-selected":!0}}}return{}},[o,s]);return x.useMemo(()=>i?{reference:d,floating:v,item:u}:{},[i,d,v,u])}function gi({className:e,children:t,buttonText:r}){const[n,o]=te.useState(!1),{refs:i,floatingStyles:s,context:a}=mi({open:n,onOpenChange:o,middleware:[qo(16),Yo(),Vo()],whileElementsMounted:ko,placement:"right"}),l=ui(a),c=pi(a),f=yi(a),{getReferenceProps:d,getFloatingProps:v}=vi([l,c,f]);return p.jsxs(p.Fragment,{children:[p.jsx("span",{ref:i.setReference,className:e,...d(),children:p.jsx(me,{text:r})}),n&&p.jsx(li,{context:a,modal:!1,children:p.jsx("div",{ref:i.setFloating,style:s,...v(),children:p.jsx(tn,{children:t})})})]})}const wi=({className:e,children:t,buttonText:r="Menu button"})=>{const n=J("rpf-menu-button",e);return p.jsx(gi,{className:n,buttonText:r,children:t})},Zn=e=>e?p.jsx("span",{className:"rpf-button__icon material-symbols-sharp",children:e}):null,Jn=({text:e,iconPosition:t,icon:r})=>p.jsxs(p.Fragment,{children:[t==="left"&&r!==""?Zn(r):null,e,t==="right"&&r!==""?Zn(r):null]}),Ei=({text:e,href:t,icon:r="",iconPosition:n="left",danger:o,className:i,onClick:s})=>{const a=J("rpf-menu__item",{"rpf-menu__item--danger":o},i);return p.jsx("li",{className:a,children:t?p.jsx("a",{href:t,children:p.jsx(Jn,{text:e,iconPosition:n,icon:r})}):p.jsx("button",{type:"button",onClick:s,children:p.jsx(Jn,{text:e,iconPosition:n,icon:r})})})},xi=({text:e})=>p.jsx("li",{className:"rpf-menu__title",children:p.jsx("span",{children:e})}),Ti=({text:e="",percent:t,complete:r=!1,className:n})=>p.jsx("div",{className:J("rpf-progress-bar",{"rpf-progress-bar--complete":r,className:n}),children:p.jsxs("label",{className:"rpf-progress-bar__label",children:[p.jsx("span",{children:e}),p.jsx("progress",{className:"rpf-progress-bar__bar",value:t,max:"100",children:`${t}%`})]})}),Si=({children:e})=>p.jsx("td",{className:"rpf-table-cell rpf-table-cell--body",children:p.jsx("div",{className:"rpf-table-cell__content",children:e})});/**
|
|
27
|
+
*/var zr=["input:not([inert]):not([inert] *)","select:not([inert]):not([inert] *)","textarea:not([inert]):not([inert] *)","a[href]:not([inert]):not([inert] *)","button:not([inert]):not([inert] *)","[tabindex]:not(slot):not([inert]):not([inert] *)","audio[controls]:not([inert]):not([inert] *)","video[controls]:not([inert]):not([inert] *)",'[contenteditable]:not([contenteditable="false"]):not([inert]):not([inert] *)',"details>summary:first-of-type:not([inert]):not([inert] *)","details:not([inert]):not([inert] *)"],Xe=zr.join(","),hn=typeof Element>"u",Ae=hn?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Ge=!hn&&Element.prototype.getRootNode?function(e){var t;return e==null||(t=e.getRootNode)===null||t===void 0?void 0:t.call(e)}:function(e){return e==null?void 0:e.ownerDocument},Ze=function(t,r){var n;r===void 0&&(r=!0);var o=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"inert"),s=o===""||o==="true",i=s||r&&t&&(typeof t.closest=="function"?t.closest("[inert]"):Ze(t.parentNode));return i},Xr=function(t){var r,n=t==null||(r=t.getAttribute)===null||r===void 0?void 0:r.call(t,"contenteditable");return n===""||n==="true"},Gr=function(t,r,n){if(Ze(t))return[];var o=Array.prototype.slice.apply(t.querySelectorAll(Xe));return r&&Ae.call(t,Xe)&&o.unshift(t),o=o.filter(n),o},xt=function(t,r,n){for(var o=[],s=Array.from(t);s.length;){var i=s.shift();if(!Ze(i,!1))if(i.tagName==="SLOT"){var a=i.assignedElements(),l=a.length?a:i.children,c=xt(l,!0,n);n.flatten?o.push.apply(o,c):o.push({scopeParent:i,candidates:c})}else{var u=Ae.call(i,Xe);u&&n.filter(i)&&(r||!t.includes(i))&&o.push(i);var p=i.shadowRoot||typeof n.getShadowRoot=="function"&&n.getShadowRoot(i),v=!Ze(p,!1)&&(!n.shadowRootFilter||n.shadowRootFilter(i));if(p&&v){var f=xt(p===!0?i.children:p.children,!0,n);n.flatten?o.push.apply(o,f):o.push({scopeParent:i,candidates:f})}else s.unshift.apply(s,i.children)}}return o},mn=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},vn=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||Xr(t))&&!mn(t)?0:t.tabIndex},Zr=function(t,r){var n=vn(t);return n<0&&r&&!mn(t)?0:n},Jr=function(t,r){return t.tabIndex===r.tabIndex?t.documentOrder-r.documentOrder:t.tabIndex-r.tabIndex},bn=function(t){return t.tagName==="INPUT"},Qr=function(t){return bn(t)&&t.type==="hidden"},eo=function(t){var r=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(n){return n.tagName==="SUMMARY"});return r},to=function(t,r){for(var n=0;n<t.length;n++)if(t[n].checked&&t[n].form===r)return t[n]},no=function(t){if(!t.name)return!0;var r=t.form||Ge(t),n=function(a){return r.querySelectorAll('input[type="radio"][name="'+a+'"]')},o;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")o=n(window.CSS.escape(t.name));else try{o=n(t.name)}catch(i){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",i.message),!1}var s=to(o,t.form);return!s||s===t},ro=function(t){return bn(t)&&t.type==="radio"},oo=function(t){return ro(t)&&!no(t)},so=function(t){var r,n=t&&Ge(t),o=(r=n)===null||r===void 0?void 0:r.host,s=!1;if(n&&n!==t){var i,a,l;for(s=!!((i=o)!==null&&i!==void 0&&(a=i.ownerDocument)!==null&&a!==void 0&&a.contains(o)||t!=null&&(l=t.ownerDocument)!==null&&l!==void 0&&l.contains(t));!s&&o;){var c,u,p;n=Ge(o),o=(c=n)===null||c===void 0?void 0:c.host,s=!!((u=o)!==null&&u!==void 0&&(p=u.ownerDocument)!==null&&p!==void 0&&p.contains(o))}}return s},yn=function(t){var r=t.getBoundingClientRect(),n=r.width,o=r.height;return n===0&&o===0},io=function(t,r){var n=r.displayCheck,o=r.getShadowRoot;if(n==="full-native"&&"checkVisibility"in t){var s=t.checkVisibility({checkOpacity:!1,opacityProperty:!1,contentVisibilityAuto:!0,visibilityProperty:!0,checkVisibilityCSS:!0});return!s}if(getComputedStyle(t).visibility==="hidden")return!0;var i=Ae.call(t,"details>summary:first-of-type"),a=i?t.parentElement:t;if(Ae.call(a,"details:not([open]) *"))return!0;if(!n||n==="full"||n==="full-native"||n==="legacy-full"){if(typeof o=="function"){for(var l=t;t;){var c=t.parentElement,u=Ge(t);if(c&&!c.shadowRoot&&o(c)===!0)return yn(t);t.assignedSlot?t=t.assignedSlot:!c&&u!==t.ownerDocument?t=u.host:t=c}t=l}if(so(t))return!t.getClientRects().length;if(n!=="legacy-full")return!0}else if(n==="non-zero-area")return yn(t);return!1},ao=function(t){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(t.tagName))for(var r=t.parentElement;r;){if(r.tagName==="FIELDSET"&&r.disabled){for(var n=0;n<r.children.length;n++){var o=r.children.item(n);if(o.tagName==="LEGEND")return Ae.call(r,"fieldset[disabled] *")?!0:!o.contains(t)}return!0}r=r.parentElement}return!1},co=function(t,r){return!(r.disabled||Qr(r)||io(r,t)||eo(r)||ao(r))},Tt=function(t,r){return!(oo(r)||vn(r)<0||!co(t,r))},lo=function(t){var r=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(r)||r>=0)},gn=function(t){var r=[],n=[];return t.forEach(function(o,s){var i=!!o.scopeParent,a=i?o.scopeParent:o,l=Zr(a,i),c=i?gn(o.candidates):a;l===0?i?r.push.apply(r,c):r.push(a):n.push({documentOrder:s,tabIndex:l,item:o,isScope:i,content:c})}),n.sort(Jr).reduce(function(o,s){return s.isScope?o.push.apply(o,s.content):o.push(s.content),o},[]).concat(r)},St=function(t,r){r=r||{};var n;return r.getShadowRoot?n=xt([t],r.includeContainer,{filter:Tt.bind(null,r),flatten:!1,getShadowRoot:r.getShadowRoot,shadowRootFilter:lo}):n=Gr(t,r.includeContainer,Tt.bind(null,r)),gn(n)},fo=function(t,r){if(r=r||{},!t)throw new Error("No node provided");return Ae.call(t,Xe)===!1?!1:Tt(r,t)};function wn(e,t,r){let{reference:n,floating:o}=e;const s=ge(t),i=un(t),a=fn(i),l=Ce(t),c=s==="y",u=n.x+n.width/2-o.width/2,p=n.y+n.height/2-o.height/2,v=n[a]/2-o[a]/2;let f;switch(l){case"top":f={x:u,y:n.y-o.height};break;case"bottom":f={x:u,y:n.y+n.height};break;case"right":f={x:n.x+n.width,y:p};break;case"left":f={x:n.x-o.width,y:p};break;default:f={x:n.x,y:n.y}}switch(He(t)){case"start":f[i]-=v*(r&&c?-1:1);break;case"end":f[i]+=v*(r&&c?-1:1);break}return f}async function uo(e,t){var r;t===void 0&&(t={});const{x:n,y:o,platform:s,rects:i,elements:a,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:p="floating",altBoundary:v=!1,padding:f=0}=Ue(t,e),b=Kr(f),A=a[v?p==="floating"?"reference":"floating":p],P=ze(await s.getClippingRect({element:(r=await(s.isElement==null?void 0:s.isElement(A)))==null||r?A:A.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(a.floating)),boundary:c,rootBoundary:u,strategy:l})),k=p==="floating"?{x:n,y:o,width:i.floating.width,height:i.floating.height}:i.reference,g=await(s.getOffsetParent==null?void 0:s.getOffsetParent(a.floating)),S=await(s.isElement==null?void 0:s.isElement(g))?await(s.getScale==null?void 0:s.getScale(g))||{x:1,y:1}:{x:1,y:1},y=ze(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:k,offsetParent:g,strategy:l}):k);return{top:(P.top-y.top+b.top)/S.y,bottom:(y.bottom-P.bottom+b.bottom)/S.y,left:(P.left-y.left+b.left)/S.x,right:(y.right-P.right+b.right)/S.x}}const po=50,ho=async(e,t,r)=>{const{placement:n="bottom",strategy:o="absolute",middleware:s=[],platform:i}=r,a=i.detectOverflow?i:{...i,detectOverflow:uo},l=await(i.isRTL==null?void 0:i.isRTL(t));let c=await i.getElementRects({reference:e,floating:t,strategy:o}),{x:u,y:p}=wn(c,n,l),v=n,f=0;const b={};for(let h=0;h<s.length;h++){const A=s[h];if(!A)continue;const{name:P,fn:k}=A,{x:g,y:S,data:y,reset:I}=await k({x:u,y:p,initialPlacement:n,placement:v,strategy:o,middlewareData:b,rects:c,platform:a,elements:{reference:e,floating:t}});u=g??u,p=S??p,b[P]={...b[P],...y},I&&f<po&&(f++,typeof I=="object"&&(I.placement&&(v=I.placement),I.rects&&(c=I.rects===!0?await i.getElementRects({reference:e,floating:t,strategy:o}):I.rects),{x:u,y:p}=wn(c,v,l)),h=-1)}return{x:u,y:p,placement:v,strategy:o,middlewareData:b}},mo=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var r,n;const{placement:o,middlewareData:s,rects:i,initialPlacement:a,platform:l,elements:c}=t,{mainAxis:u=!0,crossAxis:p=!0,fallbackPlacements:v,fallbackStrategy:f="bestFit",fallbackAxisSideDirection:b="none",flipAlignment:h=!0,...A}=Ue(e,t);if((r=s.arrow)!=null&&r.alignmentOffset)return{};const P=Ce(o),k=ge(a),g=Ce(a)===a,S=await(l.isRTL==null?void 0:l.isRTL(c.floating)),y=v||(g||!h?[Ke(a)]:Br(a)),I=b!=="none";!v&&I&&y.push(...Ur(a,h,b,S));const H=[a,...y],z=await l.detectOverflow(t,A),ee=[];let J=((n=s.flip)==null?void 0:n.overflows)||[];if(u&&ee.push(z[P]),p){const X=Wr(o,i,S);ee.push(z[X[0]],z[X[1]])}if(J=[...J,{placement:o,overflows:ee}],!ee.every(X=>X<=0)){var Z,B;const X=(((Z=s.flip)==null?void 0:Z.index)||0)+1,F=H[X];if(F&&(!(p==="alignment"?k!==ge(F):!1)||J.every(M=>ge(M.placement)===k?M.overflows[0]>0:!0)))return{data:{index:X,overflows:J},reset:{placement:F}};let j=(B=J.filter(q=>q.overflows[0]<=0).sort((q,M)=>q.overflows[1]-M.overflows[1])[0])==null?void 0:B.placement;if(!j)switch(f){case"bestFit":{var ne;const q=(ne=J.filter(M=>{if(I){const T=ge(M.placement);return T===k||T==="y"}return!0}).map(M=>[M.placement,M.overflows.filter(T=>T>0).reduce((T,m)=>T+m,0)]).sort((M,T)=>M[1]-T[1])[0])==null?void 0:ne[0];q&&(j=q);break}case"initialPlacement":j=a;break}if(o!==j)return{reset:{placement:j}}}return{}}}},vo=new Set(["left","top"]);async function bo(e,t){const{placement:r,platform:n,elements:o}=e,s=await(n.isRTL==null?void 0:n.isRTL(o.floating)),i=Ce(r),a=He(r),l=ge(r)==="y",c=vo.has(i)?-1:1,u=s&&l?-1:1,p=Ue(t,e);let{mainAxis:v,crossAxis:f,alignmentAxis:b}=typeof p=="number"?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:p.mainAxis||0,crossAxis:p.crossAxis||0,alignmentAxis:p.alignmentAxis};return a&&typeof b=="number"&&(f=a==="end"?b*-1:b),l?{x:f*u,y:v*c}:{x:v*c,y:f*u}}const yo=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var r,n;const{x:o,y:s,placement:i,middlewareData:a}=t,l=await bo(t,e);return i===((r=a.offset)==null?void 0:r.placement)&&(n=a.arrow)!=null&&n.alignmentOffset?{}:{x:o+l.x,y:s+l.y,data:{...l,placement:i}}}}},go=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:r,y:n,placement:o,platform:s}=t,{mainAxis:i=!0,crossAxis:a=!1,limiter:l={fn:P=>{let{x:k,y:g}=P;return{x:k,y:g}}},...c}=Ue(e,t),u={x:r,y:n},p=await s.detectOverflow(t,c),v=ge(Ce(o)),f=ln(v);let b=u[f],h=u[v];if(i){const P=f==="y"?"top":"left",k=f==="y"?"bottom":"right",g=b+p[P],S=b-p[k];b=cn(g,b,S)}if(a){const P=v==="y"?"top":"left",k=v==="y"?"bottom":"right",g=h+p[P],S=h-p[k];h=cn(g,h,S)}const A=l.fn({...t,[f]:b,[v]:h});return{...A,data:{x:A.x-r,y:A.y-n,enabled:{[f]:i,[v]:a}}}}}};function En(e){const t=ae(e);let r=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const o=re(e),s=o?e.offsetWidth:r,i=o?e.offsetHeight:n,a=Ve(r)!==s||Ve(n)!==i;return a&&(r=s,n=i),{width:r,height:n,$:a}}function Ct(e){return Q(e)?e:e.contextElement}function Pe(e){const t=Ct(e);if(!re(t))return ue(1);const r=t.getBoundingClientRect(),{width:n,height:o,$:s}=En(t);let i=(s?Ve(r.width):r.width)/n,a=(s?Ve(r.height):r.height)/o;return(!i||!Number.isFinite(i))&&(i=1),(!a||!Number.isFinite(a))&&(a=1),{x:i,y:a}}const wo=ue(0);function xn(e){const t=se(e);return!We()||!t.visualViewport?wo:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Eo(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==se(e)?!1:t}function _e(e,t,r,n){t===void 0&&(t=!1),r===void 0&&(r=!1);const o=e.getBoundingClientRect(),s=Ct(e);let i=ue(1);t&&(n?Q(n)&&(i=Pe(n)):i=Pe(e));const a=Eo(s,r,n)?xn(s):ue(0);let l=(o.left+a.x)/i.x,c=(o.top+a.y)/i.y,u=o.width/i.x,p=o.height/i.y;if(s){const v=se(s),f=n&&Q(n)?se(n):n;let b=v,h=bt(b);for(;h&&n&&f!==b;){const A=Pe(h),P=h.getBoundingClientRect(),k=ae(h),g=P.left+(h.clientLeft+parseFloat(k.paddingLeft))*A.x,S=P.top+(h.clientTop+parseFloat(k.paddingTop))*A.y;l*=A.x,c*=A.y,u*=A.x,p*=A.y,l+=g,c+=S,b=se(h),h=bt(b)}}return ze({width:u,height:p,x:l,y:c})}function Je(e,t){const r=Be(e).scrollLeft;return t?t.left+r:_e(fe(e)).left+r}function Tn(e,t){const r=e.getBoundingClientRect(),n=r.left+t.scrollLeft-Je(e,r),o=r.top+t.scrollTop;return{x:n,y:o}}function xo(e){let{elements:t,rect:r,offsetParent:n,strategy:o}=e;const s=o==="fixed",i=fe(n),a=t?je(t.floating):!1;if(n===i||a&&s)return r;let l={scrollLeft:0,scrollTop:0},c=ue(1);const u=ue(0),p=re(n);if((p||!p&&!s)&&((ve(n)!=="body"||Ie(i))&&(l=Be(n)),p)){const f=_e(n);c=Pe(n),u.x=f.x+n.clientLeft,u.y=f.y+n.clientTop}const v=i&&!p&&!s?Tn(i,l):ue(0);return{width:r.width*c.x,height:r.height*c.y,x:r.x*c.x-l.scrollLeft*c.x+u.x+v.x,y:r.y*c.y-l.scrollTop*c.y+u.y+v.y}}function To(e){return Array.from(e.getClientRects())}function So(e){const t=fe(e),r=Be(e),n=e.ownerDocument.body,o=Se(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),s=Se(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let i=-r.scrollLeft+Je(e);const a=-r.scrollTop;return ae(n).direction==="rtl"&&(i+=Se(t.clientWidth,n.clientWidth)-o),{width:o,height:s,x:i,y:a}}const Sn=25;function Co(e,t){const r=se(e),n=fe(e),o=r.visualViewport;let s=n.clientWidth,i=n.clientHeight,a=0,l=0;if(o){s=o.width,i=o.height;const u=We();(!u||u&&t==="fixed")&&(a=o.offsetLeft,l=o.offsetTop)}const c=Je(n);if(c<=0){const u=n.ownerDocument,p=u.body,v=getComputedStyle(p),f=u.compatMode==="CSS1Compat"&&parseFloat(v.marginLeft)+parseFloat(v.marginRight)||0,b=Math.abs(n.clientWidth-p.clientWidth-f);b<=Sn&&(s-=b)}else c<=Sn&&(s+=c);return{width:s,height:i,x:a,y:l}}function _o(e,t){const r=_e(e,!0,t==="fixed"),n=r.top+e.clientTop,o=r.left+e.clientLeft,s=re(e)?Pe(e):ue(1),i=e.clientWidth*s.x,a=e.clientHeight*s.y,l=o*s.x,c=n*s.y;return{width:i,height:a,x:l,y:c}}function Cn(e,t,r){let n;if(t==="viewport")n=Co(e,r);else if(t==="document")n=So(fe(e));else if(Q(t))n=_o(t,r);else{const o=xn(e);n={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return ze(n)}function _n(e,t){const r=de(e);return r===t||!Q(r)||be(r)?!1:ae(r).position==="fixed"||_n(r,t)}function Oo(e,t){const r=t.get(e);if(r)return r;let n=ye(e,[],!1).filter(a=>Q(a)&&ve(a)!=="body"),o=null;const s=ae(e).position==="fixed";let i=s?de(e):e;for(;Q(i)&&!be(i);){const a=ae(i),l=vt(i);!l&&a.position==="fixed"&&(o=null),(s?!l&&!o:!l&&a.position==="static"&&!!o&&(o.position==="absolute"||o.position==="fixed")||Ie(i)&&!l&&_n(e,i))?n=n.filter(u=>u!==i):o=a,i=de(i)}return t.set(e,n),n}function Ao(e){let{element:t,boundary:r,rootBoundary:n,strategy:o}=e;const i=[...r==="clippingAncestors"?je(t)?[]:Oo(t,this._c):[].concat(r),n],a=Cn(t,i[0],o);let l=a.top,c=a.right,u=a.bottom,p=a.left;for(let v=1;v<i.length;v++){const f=Cn(t,i[v],o);l=Se(f.top,l),c=qe(f.right,c),u=qe(f.bottom,u),p=Se(f.left,p)}return{width:c-p,height:u-l,x:p,y:l}}function Po(e){const{width:t,height:r}=En(e);return{width:t,height:r}}function Ro(e,t,r){const n=re(t),o=fe(t),s=r==="fixed",i=_e(e,!0,s,t);let a={scrollLeft:0,scrollTop:0};const l=ue(0);function c(){l.x=Je(o)}if(n||!n&&!s)if((ve(t)!=="body"||Ie(o))&&(a=Be(t)),n){const f=_e(t,!0,s,t);l.x=f.x+t.clientLeft,l.y=f.y+t.clientTop}else o&&c();s&&!n&&o&&c();const u=o&&!n&&!s?Tn(o,a):ue(0),p=i.left+a.scrollLeft-l.x-u.x,v=i.top+a.scrollTop-l.y-u.y;return{x:p,y:v,width:i.width,height:i.height}}function _t(e){return ae(e).position==="static"}function On(e,t){if(!re(e)||ae(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return fe(e)===r&&(r=r.ownerDocument.body),r}function An(e,t){const r=se(e);if(je(e))return r;if(!re(e)){let o=de(e);for(;o&&!be(o);){if(Q(o)&&!_t(o))return o;o=de(o)}return r}let n=On(e,t);for(;n&&_r(n)&&_t(n);)n=On(n,t);return n&&be(n)&&_t(n)&&!vt(n)?r:n||Pr(e)||r}const No=async function(e){const t=this.getOffsetParent||An,r=this.getDimensions,n=await r(e.floating);return{reference:Ro(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function Io(e){return ae(e).direction==="rtl"}const ko={convertOffsetParentRelativeRectToViewportRelativeRect:xo,getDocumentElement:fe,getClippingRect:Ao,getOffsetParent:An,getElementRects:No,getClientRects:To,getDimensions:Po,getScale:Pe,isElement:Q,isRTL:Io};function Pn(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Mo(e,t){let r=null,n;const o=fe(e);function s(){var a;clearTimeout(n),(a=r)==null||a.disconnect(),r=null}function i(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),s();const c=e.getBoundingClientRect(),{left:u,top:p,width:v,height:f}=c;if(a||t(),!v||!f)return;const b=Ye(p),h=Ye(o.clientWidth-(u+v)),A=Ye(o.clientHeight-(p+f)),P=Ye(u),g={rootMargin:-b+"px "+-h+"px "+-A+"px "+-P+"px",threshold:Se(0,qe(1,l))||1};let S=!0;function y(I){const H=I[0].intersectionRatio;if(H!==l){if(!S)return i();H?i(!1,H):n=setTimeout(()=>{i(!1,1e-7)},1e3)}H===1&&!Pn(c,e.getBoundingClientRect())&&i(),S=!1}try{r=new IntersectionObserver(y,{...g,root:o.ownerDocument})}catch{r=new IntersectionObserver(y,g)}r.observe(e)}return i(!0),s}function Do(e,t,r,n){n===void 0&&(n={});const{ancestorScroll:o=!0,ancestorResize:s=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=n,c=Ct(e),u=o||s?[...c?ye(c):[],...t?ye(t):[]]:[];u.forEach(P=>{o&&P.addEventListener("scroll",r,{passive:!0}),s&&P.addEventListener("resize",r)});const p=c&&a?Mo(c,r):null;let v=-1,f=null;i&&(f=new ResizeObserver(P=>{let[k]=P;k&&k.target===c&&f&&t&&(f.unobserve(t),cancelAnimationFrame(v),v=requestAnimationFrame(()=>{var g;(g=f)==null||g.observe(t)})),r()}),c&&!l&&f.observe(c),t&&f.observe(t));let b,h=l?_e(e):null;l&&A();function A(){const P=_e(e);h&&!Pn(h,P)&&r(),h=P,b=requestAnimationFrame(A)}return r(),()=>{var P;u.forEach(k=>{o&&k.removeEventListener("scroll",r),s&&k.removeEventListener("resize",r)}),p==null||p(),(P=f)==null||P.disconnect(),f=null,l&&cancelAnimationFrame(b)}}const Fo=yo,Lo=go,$o=mo,jo=(e,t,r)=>{const n=new Map,o={platform:ko,...r},s={...o.platform,_c:n};return ho(e,t,{...o,platform:s})};var Wo=typeof document<"u",Bo=function(){},Qe=Wo?te.useLayoutEffect:Bo;function et(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let r,n,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(r=e.length,r!==t.length)return!1;for(n=r;n--!==0;)if(!et(e[n],t[n]))return!1;return!0}if(o=Object.keys(e),r=o.length,r!==Object.keys(t).length)return!1;for(n=r;n--!==0;)if(!{}.hasOwnProperty.call(t,o[n]))return!1;for(n=r;n--!==0;){const s=o[n];if(!(s==="_owner"&&e.$$typeof)&&!et(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}function Rn(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Nn(e,t){const r=Rn(e);return Math.round(t*r)/r}function Ot(e){const t=x.useRef(e);return Qe(()=>{t.current=e}),t}function qo(e){e===void 0&&(e={});const{placement:t="bottom",strategy:r="absolute",middleware:n=[],platform:o,elements:{reference:s,floating:i}={},transform:a=!0,whileElementsMounted:l,open:c}=e,[u,p]=x.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[v,f]=x.useState(n);et(v,n)||f(n);const[b,h]=x.useState(null),[A,P]=x.useState(null),k=x.useCallback(M=>{M!==I.current&&(I.current=M,h(M))},[]),g=x.useCallback(M=>{M!==H.current&&(H.current=M,P(M))},[]),S=s||b,y=i||A,I=x.useRef(null),H=x.useRef(null),z=x.useRef(u),ee=l!=null,J=Ot(l),Z=Ot(o),B=Ot(c),ne=x.useCallback(()=>{if(!I.current||!H.current)return;const M={placement:t,strategy:r,middleware:v};Z.current&&(M.platform=Z.current),jo(I.current,H.current,M).then(T=>{const m={...T,isPositioned:B.current!==!1};X.current&&!et(z.current,m)&&(z.current=m,rr.flushSync(()=>{p(m)}))})},[v,t,r,Z,B]);Qe(()=>{c===!1&&z.current.isPositioned&&(z.current.isPositioned=!1,p(M=>({...M,isPositioned:!1})))},[c]);const X=x.useRef(!1);Qe(()=>(X.current=!0,()=>{X.current=!1}),[]),Qe(()=>{if(S&&(I.current=S),y&&(H.current=y),S&&y){if(J.current)return J.current(S,y,ne);ne()}},[S,y,ne,J,ee]);const F=x.useMemo(()=>({reference:I,floating:H,setReference:k,setFloating:g}),[k,g]),j=x.useMemo(()=>({reference:S,floating:y}),[S,y]),q=x.useMemo(()=>{const M={position:r,left:0,top:0};if(!j.floating)return M;const T=Nn(j.floating,u.x),m=Nn(j.floating,u.y);return a?{...M,transform:"translate("+T+"px, "+m+"px)",...Rn(j.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:T,top:m}},[r,a,j.floating,u.x,u.y]);return x.useMemo(()=>({...u,update:ne,refs:F,elements:j,floatingStyles:q}),[u,ne,F,j,q])}const Vo=(e,t)=>{const r=Fo(e);return{name:r.name,fn:r.fn,options:[e,t]}},Yo=(e,t)=>{const r=Lo(e);return{name:r.name,fn:r.fn,options:[e,t]}},Uo=(e,t)=>{const r=$o(e);return{name:r.name,fn:r.fn,options:[e,t]}},In={...x},Ho=In.useInsertionEffect||(e=>e());function we(e){const t=x.useRef(()=>{if(process.env.NODE_ENV!=="production")throw new Error("Cannot call an event handler while rendering.")});return Ho(()=>{t.current=e}),x.useCallback(function(){for(var r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];return t.current==null?void 0:t.current(...n)},[])}var pe=typeof document<"u"?te.useLayoutEffect:te.useEffect;function tt(){return tt=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},tt.apply(this,arguments)}let kn=!1,Ko=0;const Mn=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+Ko++;function zo(){const[e,t]=x.useState(()=>kn?Mn():void 0);return pe(()=>{e==null&&t(Mn())},[]),x.useEffect(()=>{kn=!0},[]),e}const Dn=In.useId||zo;let At;process.env.NODE_ENV!=="production"&&(At=new Set);function Xo(){for(var e,t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];const o="Floating UI: "+r.join(" ");if(!((e=At)!=null&&e.has(o))){var s;(s=At)==null||s.add(o),console.error(o)}}function Go(){const e=new Map;return{emit(t,r){var n;(n=e.get(t))==null||n.forEach(o=>o(r))},on(t,r){e.set(t,[...e.get(t)||[],r])},off(t,r){var n;e.set(t,((n=e.get(t))==null?void 0:n.filter(o=>o!==r))||[])}}}const Zo=x.createContext(null),Jo=x.createContext(null),Fn=()=>{var e;return((e=x.useContext(Zo))==null?void 0:e.id)||null},Pt=()=>x.useContext(Jo);function nt(e){return"data-floating-ui-"+e}function Rt(e){const t=te.useRef(e);return pe(()=>{t.current=e}),t}let Ln=0;function Re(e,t){t===void 0&&(t={});const{preventScroll:r=!1,cancelPrevious:n=!0,sync:o=!1}=t;n&&cancelAnimationFrame(Ln);const s=()=>e==null?void 0:e.focus({preventScroll:r});o?s():Ln=requestAnimationFrame(s)}function Qo(e,t){var r;let n=[],o=(r=e.find(s=>s.id===t))==null?void 0:r.parentId;for(;o;){const s=e.find(i=>i.id===o);o=s==null?void 0:s.parentId,s&&(n=n.concat(s))}return n}function ke(e,t){let r=e.filter(o=>{var s;return o.parentId===t&&((s=o.context)==null?void 0:s.open)}),n=r;for(;n.length;)n=e.filter(o=>{var s;return(s=n)==null?void 0:s.some(i=>{var a;return o.parentId===i.id&&((a=o.context)==null?void 0:a.open)})}),r=r.concat(n);return r}let Ne=new WeakMap,rt=new WeakSet,ot={},Nt=0;const es=()=>typeof HTMLElement<"u"&&"inert"in HTMLElement.prototype,$n=e=>e&&(e.host||$n(e.parentNode)),ts=(e,t)=>t.map(r=>{if(e.contains(r))return r;const n=$n(r);return e.contains(n)?n:null}).filter(r=>r!=null);function ns(e,t,r,n){const o="data-floating-ui-inert",s=n?"inert":r?"aria-hidden":null,i=ts(t,e),a=new Set,l=new Set(i),c=[];ot[o]||(ot[o]=new WeakMap);const u=ot[o];i.forEach(p),v(t),a.clear();function p(f){!f||a.has(f)||(a.add(f),f.parentNode&&p(f.parentNode))}function v(f){!f||l.has(f)||[].forEach.call(f.children,b=>{if(ve(b)!=="script")if(a.has(b))v(b);else{const h=s?b.getAttribute(s):null,A=h!==null&&h!=="false",P=(Ne.get(b)||0)+1,k=(u.get(b)||0)+1;Ne.set(b,P),u.set(b,k),c.push(b),P===1&&A&&rt.add(b),k===1&&b.setAttribute(o,""),!A&&s&&b.setAttribute(s,"true")}})}return Nt++,()=>{c.forEach(f=>{const b=(Ne.get(f)||0)-1,h=(u.get(f)||0)-1;Ne.set(f,b),u.set(f,h),b||(!rt.has(f)&&s&&f.removeAttribute(s),rt.delete(f)),h||f.removeAttribute(o)}),Nt--,Nt||(Ne=new WeakMap,Ne=new WeakMap,rt=new WeakSet,ot={})}}function jn(e,t,r){t===void 0&&(t=!1),r===void 0&&(r=!1);const n=ce(e[0]).body;return ns(e.concat(Array.from(n.querySelectorAll("[aria-live]"))),n,t,r)}const st=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function Wn(e,t){const r=St(e,st());t==="prev"&&r.reverse();const n=r.indexOf(xe(ce(e)));return r.slice(n+1)[0]}function rs(){return Wn(document.body,"next")}function os(){return Wn(document.body,"prev")}function Bn(e,t){const r=t||e.currentTarget,n=e.relatedTarget;return!n||!ie(r,n)}const It={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"fixed",whiteSpace:"nowrap",width:"1px",top:0,left:0};let ss;function qn(e){e.key==="Tab"&&(e.target,clearTimeout(ss))}const Vn=x.forwardRef(function(t,r){const[n,o]=x.useState();pe(()=>(kr()&&o("button"),document.addEventListener("keydown",qn),()=>{document.removeEventListener("keydown",qn)}),[]);const s={ref:r,tabIndex:0,role:n,"aria-hidden":n?void 0:!0,[nt("focus-guard")]:"",style:It};return x.createElement("span",tt({},t,s))}),is=x.createContext(null),as=()=>x.useContext(is),kt="data-floating-ui-focusable";function cs(e){return e?e.hasAttribute(kt)?e:e.querySelector("["+kt+"]")||e:null}const Yn=20;let Oe=[];function Mt(e){Oe=Oe.filter(r=>r.isConnected);let t=e;if(!(!t||ve(t)==="body")){if(!fo(t,st())){const r=St(t,st())[0];r&&(t=r)}Oe.push(t),Oe.length>Yn&&(Oe=Oe.slice(-Yn))}}function Un(){return Oe.slice().reverse().find(e=>e.isConnected)}const ls=x.forwardRef(function(t,r){return x.createElement("button",tt({},t,{type:"button",ref:r,tabIndex:-1,style:It}))});function fs(e){const{context:t,children:r,disabled:n=!1,order:o=["content"],guards:s=!0,initialFocus:i=0,returnFocus:a=!0,restoreFocus:l=!1,modal:c=!0,visuallyHiddenDismiss:u=!1,closeOnFocusOut:p=!0}=e,{open:v,refs:f,nodeId:b,onOpenChange:h,events:A,dataRef:P,floatingId:k,elements:{domReference:g,floating:S}}=t,y=typeof i=="number"&&i<0,I=$r(g)&&y,H=es()?s:!0,z=Rt(o),ee=Rt(i),J=Rt(a),Z=Pt(),B=as(),ne=x.useRef(null),X=x.useRef(null),F=x.useRef(!1),j=x.useRef(!1),q=x.useRef(-1),M=B!=null,T=cs(S),m=we(function(C){return C===void 0&&(C=T),C?St(C,st()):[]}),E=we(C=>{const R=m(C);return z.current.map(w=>g&&w==="reference"?g:T&&w==="floating"?T:R).filter(Boolean).flat()});x.useEffect(()=>{if(n||!c)return;function C(w){if(w.key==="Tab"){ie(T,xe(ce(T)))&&m().length===0&&!I&&wt(w);const O=E(),N=Te(w);z.current[0]==="reference"&&N===g&&(wt(w),w.shiftKey?Re(O[O.length-1]):Re(O[1])),z.current[1]==="floating"&&N===T&&w.shiftKey&&(wt(w),Re(O[0]))}}const R=ce(T);return R.addEventListener("keydown",C),()=>{R.removeEventListener("keydown",C)}},[n,g,T,c,z,I,m,E]),x.useEffect(()=>{if(n||!S)return;function C(R){const w=Te(R),N=m().indexOf(w);N!==-1&&(q.current=N)}return S.addEventListener("focusin",C),()=>{S.removeEventListener("focusin",C)}},[n,S,m]),x.useEffect(()=>{if(n||!p)return;function C(){j.current=!0,setTimeout(()=>{j.current=!1})}function R(w){const O=w.relatedTarget;queueMicrotask(()=>{const N=!(ie(g,O)||ie(S,O)||ie(O,S)||ie(B==null?void 0:B.portalNode,O)||O!=null&&O.hasAttribute(nt("focus-guard"))||Z&&(ke(Z.nodesRef.current,b).find($=>{var D,G;return ie((D=$.context)==null?void 0:D.elements.floating,O)||ie((G=$.context)==null?void 0:G.elements.domReference,O)})||Qo(Z.nodesRef.current,b).find($=>{var D,G;return((D=$.context)==null?void 0:D.elements.floating)===O||((G=$.context)==null?void 0:G.elements.domReference)===O})));if(l&&N&&xe(ce(T))===ce(T).body){re(T)&&T.focus();const $=q.current,D=m(),G=D[$]||D[D.length-1]||T;re(G)&&G.focus()}(I||!c)&&O&&N&&!j.current&&O!==Un()&&(F.current=!0,h(!1,w,"focus-out"))})}if(S&&re(g))return g.addEventListener("focusout",R),g.addEventListener("pointerdown",C),S.addEventListener("focusout",R),()=>{g.removeEventListener("focusout",R),g.removeEventListener("pointerdown",C),S.removeEventListener("focusout",R)}},[n,g,S,T,c,b,Z,B,h,p,l,m,I]),x.useEffect(()=>{var C;if(n)return;const R=Array.from((B==null||(C=B.portalNode)==null?void 0:C.querySelectorAll("["+nt("portal")+"]"))||[]);if(S){const w=[S,...R,ne.current,X.current,z.current.includes("reference")||I?g:null].filter(N=>N!=null),O=c||I?jn(w,H,!H):jn(w);return()=>{O()}}},[n,g,S,c,z,B,I,H]),pe(()=>{if(n||!re(T))return;const C=ce(T),R=xe(C);queueMicrotask(()=>{const w=E(T),O=ee.current,N=(typeof O=="number"?w[O]:O.current)||T,$=ie(T,R);!y&&!$&&v&&Re(N,{preventScroll:N===T})})},[n,v,T,y,E,ee]),pe(()=>{if(n||!T)return;let C=!1;const R=ce(T),w=xe(R);let N=P.current.openEvent;Mt(w);function $(_){let{open:oe,reason:he,event:le,nested:Lt}=_;oe&&(N=le),he==="escape-key"&&f.domReference.current&&Mt(f.domReference.current),he==="hover"&&le.type==="mouseleave"&&(F.current=!0),he==="outside-press"&&(Lt?(F.current=!1,C=!0):F.current=!(Nr(le)||Ir(le)))}A.on("openchange",$);const D=R.createElement("span");D.setAttribute("tabindex","-1"),D.setAttribute("aria-hidden","true"),Object.assign(D.style,It),M&&g&&g.insertAdjacentElement("afterend",D);function G(){return typeof J.current=="boolean"?Un()||D:J.current.current||D}return()=>{A.off("openchange",$);const _=xe(R),oe=ie(S,_)||Z&&ke(Z.nodesRef.current,b).some(Lt=>{var tr;return ie((tr=Lt.context)==null?void 0:tr.elements.floating,_)});(oe||N&&["click","mousedown"].includes(N.type))&&f.domReference.current&&Mt(f.domReference.current);const le=G();queueMicrotask(()=>{J.current&&!F.current&&re(le)&&(!(le!==_&&_!==R.body)||oe)&&le.focus({preventScroll:C}),D.remove()})}},[n,S,T,J,P,f,A,Z,b,M,g]),x.useEffect(()=>{queueMicrotask(()=>{F.current=!1})},[n]),pe(()=>{if(!n&&B)return B.setFocusManagerState({modal:c,closeOnFocusOut:p,open:v,onOpenChange:h,refs:f}),()=>{B.setFocusManagerState(null)}},[n,B,c,v,h,f,p]),pe(()=>{if(n||!T||typeof MutationObserver!="function"||y)return;const C=()=>{const w=T.getAttribute("tabindex"),O=m(),N=xe(ce(S)),$=O.indexOf(N);$!==-1&&(q.current=$),z.current.includes("floating")||N!==f.domReference.current&&O.length===0?w!=="0"&&T.setAttribute("tabindex","0"):w!=="-1"&&T.setAttribute("tabindex","-1")};C();const R=new MutationObserver(C);return R.observe(T,{childList:!0,subtree:!0,attributes:!0}),()=>{R.disconnect()}},[n,S,T,f,z,m,y]);function L(C){return n||!u||!c?null:x.createElement(ls,{ref:C==="start"?ne:X,onClick:R=>h(!1,R.nativeEvent)},typeof u=="string"?u:"Dismiss")}const W=!n&&H&&(c?!I:!0)&&(M||c);return x.createElement(x.Fragment,null,W&&x.createElement(Vn,{"data-type":"inside",ref:B==null?void 0:B.beforeInsideRef,onFocus:C=>{if(c){const w=E();Re(o[0]==="reference"?w[0]:w[w.length-1])}else if(B!=null&&B.preserveTabOrder&&B.portalNode)if(F.current=!1,Bn(C,B.portalNode)){const w=rs()||g;w==null||w.focus()}else{var R;(R=B.beforeOutsideRef.current)==null||R.focus()}}}),!I&&L("start"),r,L("end"),W&&x.createElement(Vn,{"data-type":"inside",ref:B==null?void 0:B.afterInsideRef,onFocus:C=>{if(c)Re(E()[0]);else if(B!=null&&B.preserveTabOrder&&B.portalNode)if(p&&(F.current=!0),Bn(C,B.portalNode)){const w=os()||g;w==null||w.focus()}else{var R;(R=B.afterOutsideRef.current)==null||R.focus()}}}))}function Hn(e){return re(e.target)&&e.target.tagName==="BUTTON"}function Kn(e){return an(e)}function us(e,t){t===void 0&&(t={});const{open:r,onOpenChange:n,dataRef:o,elements:{domReference:s}}=e,{enabled:i=!0,event:a="click",toggle:l=!0,ignoreMouse:c=!1,keyboardHandlers:u=!0,stickIfOpen:p=!0}=t,v=x.useRef(),f=x.useRef(!1),b=x.useMemo(()=>({onPointerDown(h){v.current=h.pointerType},onMouseDown(h){const A=v.current;h.button===0&&a!=="click"&&(sn(A)&&c||(r&&l&&(!(o.current.openEvent&&p)||o.current.openEvent.type==="mousedown")?n(!1,h.nativeEvent,"click"):(h.preventDefault(),n(!0,h.nativeEvent,"click"))))},onClick(h){const A=v.current;if(a==="mousedown"&&v.current){v.current=void 0;return}sn(A)&&c||(r&&l&&(!(o.current.openEvent&&p)||o.current.openEvent.type==="click")?n(!1,h.nativeEvent,"click"):n(!0,h.nativeEvent,"click"))},onKeyDown(h){v.current=void 0,!(h.defaultPrevented||!u||Hn(h))&&(h.key===" "&&!Kn(s)&&(h.preventDefault(),f.current=!0),h.key==="Enter"&&n(!(r&&l),h.nativeEvent,"click"))},onKeyUp(h){h.defaultPrevented||!u||Hn(h)||Kn(s)||h.key===" "&&f.current&&(f.current=!1,n(!(r&&l),h.nativeEvent,"click"))}}),[o,s,a,c,u,n,r,p,l]);return x.useMemo(()=>i?{reference:b}:{},[i,b])}const ds={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},ps={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},zn=e=>{var t,r;return{escapeKey:typeof e=="boolean"?e:(t=e==null?void 0:e.escapeKey)!=null?t:!1,outsidePress:typeof e=="boolean"?e:(r=e==null?void 0:e.outsidePress)!=null?r:!0}};function hs(e,t){t===void 0&&(t={});const{open:r,onOpenChange:n,elements:o,dataRef:s}=e,{enabled:i=!0,escapeKey:a=!0,outsidePress:l=!0,outsidePressEvent:c="pointerdown",referencePress:u=!1,referencePressEvent:p="pointerdown",ancestorScroll:v=!1,bubbles:f,capture:b}=t,h=Pt(),A=we(typeof l=="function"?l:()=>!1),P=typeof l=="function"?A:l,k=x.useRef(!1),g=x.useRef(!1),{escapeKey:S,outsidePress:y}=zn(f),{escapeKey:I,outsidePress:H}=zn(b),z=x.useRef(!1),ee=we(F=>{var j;if(!r||!i||!a||F.key!=="Escape"||z.current)return;const q=(j=s.current.floatingContext)==null?void 0:j.nodeId,M=h?ke(h.nodesRef.current,q):[];if(!S&&(F.stopPropagation(),M.length>0)){let T=!0;if(M.forEach(m=>{var E;if((E=m.context)!=null&&E.open&&!m.context.dataRef.current.__escapeKeyBubbles){T=!1;return}}),!T)return}n(!1,Dr(F)?F.nativeEvent:F,"escape-key")}),J=we(F=>{var j;const q=()=>{var M;ee(F),(M=Te(F))==null||M.removeEventListener("keydown",q)};(j=Te(F))==null||j.addEventListener("keydown",q)}),Z=we(F=>{var j;const q=k.current;k.current=!1;const M=g.current;if(g.current=!1,c==="click"&&M||q||typeof P=="function"&&!P(F))return;const T=Te(F),m="["+nt("inert")+"]",E=ce(o.floating).querySelectorAll(m);let L=Q(T)?T:null;for(;L&&!be(L);){const w=de(L);if(be(w)||!Q(w))break;L=w}if(E.length&&Q(T)&&!Fr(T)&&!ie(T,o.floating)&&Array.from(E).every(w=>!ie(L,w)))return;if(re(T)&&X){const w=T.clientWidth>0&&T.scrollWidth>T.clientWidth,O=T.clientHeight>0&&T.scrollHeight>T.clientHeight;let N=O&&F.offsetX>T.clientWidth;if(O&&ae(T).direction==="rtl"&&(N=F.offsetX<=T.offsetWidth-T.clientWidth),N||w&&F.offsetY>T.clientHeight)return}const W=(j=s.current.floatingContext)==null?void 0:j.nodeId,C=h&&ke(h.nodesRef.current,W).some(w=>{var O;return gt(F,(O=w.context)==null?void 0:O.elements.floating)});if(gt(F,o.floating)||gt(F,o.domReference)||C)return;const R=h?ke(h.nodesRef.current,W):[];if(R.length>0){let w=!0;if(R.forEach(O=>{var N;if((N=O.context)!=null&&N.open&&!O.context.dataRef.current.__outsidePressBubbles){w=!1;return}}),!w)return}n(!1,F,"outside-press")}),B=we(F=>{var j;const q=()=>{var M;Z(F),(M=Te(F))==null||M.removeEventListener(c,q)};(j=Te(F))==null||j.addEventListener(c,q)});x.useEffect(()=>{if(!r||!i)return;s.current.__escapeKeyBubbles=S,s.current.__outsidePressBubbles=y;let F=-1;function j(E){n(!1,E,"ancestor-scroll")}function q(){window.clearTimeout(F),z.current=!0}function M(){F=window.setTimeout(()=>{z.current=!1},We()?5:0)}const T=ce(o.floating);a&&(T.addEventListener("keydown",I?J:ee,I),T.addEventListener("compositionstart",q),T.addEventListener("compositionend",M)),P&&T.addEventListener(c,H?B:Z,H);let m=[];return v&&(Q(o.domReference)&&(m=ye(o.domReference)),Q(o.floating)&&(m=m.concat(ye(o.floating))),!Q(o.reference)&&o.reference&&o.reference.contextElement&&(m=m.concat(ye(o.reference.contextElement)))),m=m.filter(E=>{var L;return E!==((L=T.defaultView)==null?void 0:L.visualViewport)}),m.forEach(E=>{E.addEventListener("scroll",j,{passive:!0})}),()=>{a&&(T.removeEventListener("keydown",I?J:ee,I),T.removeEventListener("compositionstart",q),T.removeEventListener("compositionend",M)),P&&T.removeEventListener(c,H?B:Z,H),m.forEach(E=>{E.removeEventListener("scroll",j)}),window.clearTimeout(F)}},[s,o,a,P,c,r,n,v,i,S,y,ee,I,J,Z,H,B]),x.useEffect(()=>{k.current=!1},[P,c]);const ne=x.useMemo(()=>({onKeyDown:ee,[ds[p]]:F=>{u&&n(!1,F.nativeEvent,"reference-press")}}),[ee,n,u,p]),X=x.useMemo(()=>({onKeyDown:ee,onMouseDown(){g.current=!0},onMouseUp(){g.current=!0},[ps[c]]:()=>{k.current=!0}}),[ee,c]);return x.useMemo(()=>i?{reference:ne,floating:X}:{},[i,ne,X])}function ms(e){const{open:t=!1,onOpenChange:r,elements:n}=e,o=Dn(),s=x.useRef({}),[i]=x.useState(()=>Go()),a=Fn()!=null;if(process.env.NODE_ENV!=="production"){const f=n.reference;f&&!Q(f)&&Xo("Cannot pass a virtual element to the `elements.reference` option,","as it must be a real DOM element. Use `refs.setPositionReference()`","instead.")}const[l,c]=x.useState(n.reference),u=we((f,b,h)=>{s.current.openEvent=f?b:void 0,i.emit("openchange",{open:f,event:b,reason:h,nested:a}),r==null||r(f,b,h)}),p=x.useMemo(()=>({setPositionReference:c}),[]),v=x.useMemo(()=>({reference:l||n.reference||null,floating:n.floating||null,domReference:n.reference}),[l,n.reference,n.floating]);return x.useMemo(()=>({dataRef:s,open:t,onOpenChange:u,elements:v,events:i,floatingId:o,refs:p}),[t,u,v,i,o,p])}function vs(e){e===void 0&&(e={});const{nodeId:t}=e,r=ms({...e,elements:{reference:null,floating:null,...e.elements}}),n=e.rootContext||r,o=n.elements,[s,i]=x.useState(null),[a,l]=x.useState(null),u=(o==null?void 0:o.domReference)||s,p=x.useRef(null),v=Pt();pe(()=>{u&&(p.current=u)},[u]);const f=qo({...e,elements:{...o,...a&&{reference:a}}}),b=x.useCallback(g=>{const S=Q(g)?{getBoundingClientRect:()=>g.getBoundingClientRect(),contextElement:g}:g;l(S),f.refs.setReference(S)},[f.refs]),h=x.useCallback(g=>{(Q(g)||g===null)&&(p.current=g,i(g)),(Q(f.refs.reference.current)||f.refs.reference.current===null||g!==null&&!Q(g))&&f.refs.setReference(g)},[f.refs]),A=x.useMemo(()=>({...f.refs,setReference:h,setPositionReference:b,domReference:p}),[f.refs,h,b]),P=x.useMemo(()=>({...f.elements,domReference:u}),[f.elements,u]),k=x.useMemo(()=>({...f,...n,refs:A,elements:P,nodeId:t}),[f,A,P,t,n]);return pe(()=>{n.dataRef.current.floatingContext=k;const g=v==null?void 0:v.nodesRef.current.find(S=>S.id===t);g&&(g.context=k)}),x.useMemo(()=>({...f,context:k,refs:A,elements:P}),[f,A,P,k])}const Xn="active",Gn="selected";function Dt(e,t,r){const n=new Map,o=r==="item";let s=e;if(o&&e){const{[Xn]:i,[Gn]:a,...l}=e;s=l}return{...r==="floating"&&{tabIndex:-1,[kt]:""},...s,...t.map(i=>{const a=i?i[r]:null;return typeof a=="function"?e?a(e):null:a}).concat(e).reduce((i,a)=>(a&&Object.entries(a).forEach(l=>{let[c,u]=l;if(!(o&&[Xn,Gn].includes(c)))if(c.indexOf("on")===0){if(n.has(c)||n.set(c,[]),typeof u=="function"){var p;(p=n.get(c))==null||p.push(u),i[c]=function(){for(var v,f=arguments.length,b=new Array(f),h=0;h<f;h++)b[h]=arguments[h];return(v=n.get(c))==null?void 0:v.map(A=>A(...b)).find(A=>A!==void 0)}}}else i[c]=u}),i),{})}}function bs(e){e===void 0&&(e=[]);const t=e.map(a=>a==null?void 0:a.reference),r=e.map(a=>a==null?void 0:a.floating),n=e.map(a=>a==null?void 0:a.item),o=x.useCallback(a=>Dt(a,e,"reference"),t),s=x.useCallback(a=>Dt(a,e,"floating"),r),i=x.useCallback(a=>Dt(a,e,"item"),n);return x.useMemo(()=>({getReferenceProps:o,getFloatingProps:s,getItemProps:i}),[o,s,i])}const ys=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function gs(e,t){var r;t===void 0&&(t={});const{open:n,floatingId:o}=e,{enabled:s=!0,role:i="dialog"}=t,a=(r=ys.get(i))!=null?r:i,l=Dn(),u=Fn()!=null,p=x.useMemo(()=>a==="tooltip"||i==="label"?{["aria-"+(i==="label"?"labelledby":"describedby")]:n?o:void 0}:{"aria-expanded":n?"true":"false","aria-haspopup":a==="alertdialog"?"dialog":a,"aria-controls":n?o:void 0,...a==="listbox"&&{role:"combobox"},...a==="menu"&&{id:l},...a==="menu"&&u&&{role:"menuitem"},...i==="select"&&{"aria-autocomplete":"none"},...i==="combobox"&&{"aria-autocomplete":"list"}},[a,o,u,n,l,i]),v=x.useMemo(()=>{const b={id:o,...a&&{role:a}};return a==="tooltip"||i==="label"?b:{...b,...a==="menu"&&{"aria-labelledby":l}}},[a,o,l,i]),f=x.useCallback(b=>{let{active:h,selected:A}=b;const P={role:"option",...h&&{id:o+"-option"}};switch(i){case"select":return{...P,"aria-selected":h&&A};case"combobox":return{...P,...h&&{"aria-selected":!0}}}return{}},[o,i]);return x.useMemo(()=>s?{reference:p,floating:v,item:f}:{},[s,p,v,f])}function ws({className:e,children:t,buttonText:r}){const[n,o]=te.useState(!1),{refs:s,floatingStyles:i,context:a}=vs({open:n,onOpenChange:o,middleware:[Vo(16),Uo(),Yo()],whileElementsMounted:Do,placement:"right"}),l=us(a),c=hs(a),u=gs(a),{getReferenceProps:p,getFloatingProps:v}=bs([l,c,u]);return d.jsxs(d.Fragment,{children:[d.jsx("span",{ref:s.setReference,className:e,...p(),children:d.jsx(me,{text:r})}),n&&d.jsx(fs,{context:a,modal:!1,children:d.jsx("div",{ref:s.setFloating,style:i,...v(),children:d.jsx(tn,{children:t})})})]})}const Es=({className:e,children:t,buttonText:r="Menu button"})=>{const n=K("rpf-menu-button",e);return d.jsx(ws,{className:n,buttonText:r,children:t})},Zn=e=>e?d.jsx("span",{className:"rpf-button__icon material-symbols-sharp",children:e}):null,Jn=({text:e,iconPosition:t,icon:r})=>d.jsxs(d.Fragment,{children:[t==="left"&&r!==""?Zn(r):null,e,t==="right"&&r!==""?Zn(r):null]}),xs=({text:e,href:t,icon:r="",iconPosition:n="left",danger:o,className:s,onClick:i})=>{const a=K("rpf-menu__item",{"rpf-menu__item--danger":o},s);return d.jsx("li",{className:a,children:t?d.jsx("a",{href:t,children:d.jsx(Jn,{text:e,iconPosition:n,icon:r})}):d.jsx("button",{type:"button",onClick:i,children:d.jsx(Jn,{text:e,iconPosition:n,icon:r})})})},Ts=({text:e})=>d.jsx("li",{className:"rpf-menu__title",children:d.jsx("span",{children:e})}),Ss=({text:e="",percent:t,complete:r=!1,className:n})=>d.jsx("div",{className:K("rpf-progress-bar",{"rpf-progress-bar--complete":r,className:n}),children:d.jsxs("label",{className:"rpf-progress-bar__label",children:[d.jsx("span",{children:e}),d.jsx("progress",{className:"rpf-progress-bar__bar",value:t,max:"100",children:`${t}%`})]})}),Cs=({children:e})=>d.jsx("td",{className:"rpf-table-cell rpf-table-cell--body",children:d.jsx("div",{className:"rpf-table-cell__content",children:e})});/**
|
|
28
28
|
* @license lucide-react v0.553.0 - ISC
|
|
29
29
|
*
|
|
30
30
|
* This source code is licensed under the ISC license.
|
|
31
31
|
* See the LICENSE file in the root directory of this source tree.
|
|
32
|
-
*/const
|
|
32
|
+
*/const _s=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Os=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,r,n)=>n?n.toUpperCase():r.toLowerCase()),Qn=e=>{const t=Os(e);return t.charAt(0).toUpperCase()+t.slice(1)},er=(...e)=>e.filter((t,r,n)=>!!t&&t.trim()!==""&&n.indexOf(t)===r).join(" ").trim(),As=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0};/**
|
|
33
33
|
* @license lucide-react v0.553.0 - ISC
|
|
34
34
|
*
|
|
35
35
|
* This source code is licensed under the ISC license.
|
|
36
36
|
* See the LICENSE file in the root directory of this source tree.
|
|
37
|
-
*/var
|
|
37
|
+
*/var Ps={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
|
|
38
38
|
* @license lucide-react v0.553.0 - ISC
|
|
39
39
|
*
|
|
40
40
|
* This source code is licensed under the ISC license.
|
|
41
41
|
* See the LICENSE file in the root directory of this source tree.
|
|
42
|
-
*/const
|
|
42
|
+
*/const Rs=te.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:r=2,absoluteStrokeWidth:n,className:o="",children:s,iconNode:i,...a},l)=>te.createElement("svg",{ref:l,...Ps,width:t,height:t,stroke:e,strokeWidth:n?Number(r)*24/Number(t):r,className:er("lucide",o),...!s&&!As(a)&&{"aria-hidden":"true"},...a},[...i.map(([c,u])=>te.createElement(c,u)),...Array.isArray(s)?s:[s]]));/**
|
|
43
43
|
* @license lucide-react v0.553.0 - ISC
|
|
44
44
|
*
|
|
45
45
|
* This source code is licensed under the ISC license.
|
|
46
46
|
* See the LICENSE file in the root directory of this source tree.
|
|
47
|
-
*/const
|
|
47
|
+
*/const Ft=(e,t)=>{const r=te.forwardRef(({className:n,...o},s)=>te.createElement(Rs,{ref:s,iconNode:t,className:er(`lucide-${_s(Qn(e))}`,`lucide-${e}`,n),...o}));return r.displayName=Qn(e),r};/**
|
|
48
48
|
* @license lucide-react v0.553.0 - ISC
|
|
49
49
|
*
|
|
50
50
|
* This source code is licensed under the ISC license.
|
|
51
51
|
* See the LICENSE file in the root directory of this source tree.
|
|
52
|
-
*/const
|
|
52
|
+
*/const Ns=Ft("arrow-down-up",[["path",{d:"m3 16 4 4 4-4",key:"1co6wj"}],["path",{d:"M7 20V4",key:"1yoxec"}],["path",{d:"m21 8-4-4-4 4",key:"1c9v7m"}],["path",{d:"M17 4v16",key:"7dpous"}]]);/**
|
|
53
53
|
* @license lucide-react v0.553.0 - ISC
|
|
54
54
|
*
|
|
55
55
|
* This source code is licensed under the ISC license.
|
|
56
56
|
* See the LICENSE file in the root directory of this source tree.
|
|
57
|
-
*/const
|
|
57
|
+
*/const Is=Ft("arrow-down-wide-narrow",[["path",{d:"m3 16 4 4 4-4",key:"1co6wj"}],["path",{d:"M7 20V4",key:"1yoxec"}],["path",{d:"M11 4h10",key:"1w87gc"}],["path",{d:"M11 8h7",key:"djye34"}],["path",{d:"M11 12h4",key:"q8tih4"}]]);/**
|
|
58
58
|
* @license lucide-react v0.553.0 - ISC
|
|
59
59
|
*
|
|
60
60
|
* This source code is licensed under the ISC license.
|
|
61
61
|
* See the LICENSE file in the root directory of this source tree.
|
|
62
|
-
*/const
|
|
62
|
+
*/const ks=Ft("arrow-up-narrow-wide",[["path",{d:"m3 8 4-4 4 4",key:"11wl7u"}],["path",{d:"M7 4v16",key:"1glfcx"}],["path",{d:"M11 12h4",key:"q8tih4"}],["path",{d:"M11 16h7",key:"uosisv"}],["path",{d:"M11 20h10",key:"jvxblo"}]]),Ms=(e,t)=>{if(e)return t==="up"?"ascending":t==="down"?"descending":"none"},Ds=({sortDirection:e,children:t,onClick:r})=>{const n=!!r,o=e==="up"?ks:e==="down"?Is:Ns,s=Ms(n,e),i=n?"rpf-table-cell--sortable-header":"rpf-table-cell--header";return d.jsx("th",{className:`rpf-table-cell ${i}`,"aria-sort":s,children:d.jsx("div",{className:"rpf-table-cell__content",children:n?d.jsxs("button",{className:"rpf-table-cell__sort-header",onClick:r,children:[t,d.jsx(o,{size:20})]}):d.jsx(d.Fragment,{children:t})})})},Fs=({headerRow:e,bodyRows:t,fullWidth:r})=>d.jsx("div",{"data-testid":"table-container",className:K("rpf-table",{"rpf-table--full-width":r}),children:d.jsxs("table",{className:K("rpf-table__table",{"rpf-table__table--full-width":r}),children:[d.jsx("thead",{children:d.jsx("tr",{className:"rpf-table-row",children:e})}),d.jsx("tbody",{children:t.map((n,o)=>d.jsx("tr",{className:"rpf-table-row",children:n},o))})]})}),Ls=({text:e,variant:t,secondary:r,icon:n,iconPosition:o})=>{const s=n?d.jsx("span",{className:"rpf-tag__icon material-symbols-sharp",children:n}):null;n&&!o&&(o="left");const i=t&&t!=="default"?`rpf-tag--${t}`:null;return d.jsxs("span",{className:K("rpf-tag",i,{"rpf-tag--secondary":r}),children:[o==="left"&&s,e,o==="right"&&s]})};V.Accordion=Qt,V.Alert=hr,V.Button=me,V.CheckboxInput=mr,V.Fieldset=vr,V.InputField=Le,V.InputLabel=br,V.Menu=tn,V.MenuButton=Es,V.MenuItem=xs,V.MenuTitle=Ts,V.Modal=Cr,V.PasswordInput=yr,V.ProgressBar=Ss,V.RadioInput=gr,V.SearchInput=wr,V.SelectInput=Er,V.Switch=en,V.Table=Fs,V.TableBodyCell=Cs,V.TableHeaderCell=Ds,V.Tag=Ls,V.TextInput=Tr,V.TextareaInput=xr,Object.defineProperty(V,Symbol.toStringTag,{value:"Module"})}));
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
@forward '../properties/colors/decorative';
|
|
3
3
|
@forward '../properties/colors/greys';
|
|
4
4
|
@forward '../properties/colors/alert';
|
|
5
|
+
@forward '../properties/colors/inputs';
|
|
5
6
|
@forward '../properties/font-size';
|
|
6
7
|
@forward '../properties/font-weight';
|
|
7
8
|
@forward '../properties/border';
|
|
@@ -9,22 +10,6 @@
|
|
|
9
10
|
@forward '../properties/sizing';
|
|
10
11
|
|
|
11
12
|
.rpf-switch {
|
|
12
|
-
// Visually hide the checkbox but keep it accessible
|
|
13
|
-
|
|
14
|
-
.rpf-label {
|
|
15
|
-
padding: 0;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
.rpf-switch__checkbox {
|
|
19
|
-
position: absolute;
|
|
20
|
-
opacity: 0;
|
|
21
|
-
inline-size: 1px;
|
|
22
|
-
block-size: 1px;
|
|
23
|
-
overflow: hidden;
|
|
24
|
-
clip: rect(0, 0, 0, 0);
|
|
25
|
-
white-space: nowrap;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
13
|
// Sizing properties
|
|
29
14
|
--rpf-switch-width: 52px;
|
|
30
15
|
--rpf-switch-height: 32px;
|
|
@@ -52,6 +37,21 @@
|
|
|
52
37
|
cursor: pointer;
|
|
53
38
|
font-weight: var(--font-weight-bold);
|
|
54
39
|
|
|
40
|
+
// Visually hide the checkbox but keep it accessible
|
|
41
|
+
.rpf-label {
|
|
42
|
+
padding: 0;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.rpf-switch__checkbox {
|
|
46
|
+
position: absolute;
|
|
47
|
+
opacity: 0;
|
|
48
|
+
inline-size: 1px;
|
|
49
|
+
block-size: 1px;
|
|
50
|
+
overflow: hidden;
|
|
51
|
+
clip: rect(0, 0, 0, 0);
|
|
52
|
+
white-space: nowrap;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
55
|
// Track styles
|
|
56
56
|
.rpf-switch__track {
|
|
57
57
|
box-sizing: border-box;
|
|
@@ -114,12 +114,22 @@
|
|
|
114
114
|
opacity: 50%;
|
|
115
115
|
}
|
|
116
116
|
|
|
117
|
+
// Error state
|
|
118
|
+
.rpf-switch--error .rpf-switch__track {
|
|
119
|
+
border-color: var(--rpf-input-color-error);
|
|
120
|
+
}
|
|
121
|
+
|
|
117
122
|
// Focus state (specificity: 0,2,1)
|
|
118
123
|
.rpf-switch__track:has(.rpf-switch__checkbox:focus-visible) {
|
|
119
124
|
outline: 3px solid var(--rpf-input-outline-color);
|
|
120
125
|
outline-offset: 0;
|
|
121
126
|
}
|
|
122
127
|
|
|
128
|
+
.rpf-switch--error:has(.rpf-switch__checkbox:checked) .rpf-switch__track {
|
|
129
|
+
background-color: var(--rpf-input-color-error);
|
|
130
|
+
border-color: var(--rpf-input-color-error);
|
|
131
|
+
}
|
|
132
|
+
|
|
123
133
|
// Base hover states (specificity: 0,1,1)
|
|
124
134
|
.rpf-switch:hover .rpf-switch__handle {
|
|
125
135
|
box-shadow: 0px 0px 0px 14px color-mix(in srgb, var(--rpf-switch-off-color), transparent 90%);
|
|
@@ -176,4 +186,4 @@
|
|
|
176
186
|
// Checked disabled hover state (specificity: 0,3,1)
|
|
177
187
|
.rpf-switch:has(.rpf-switch__checkbox:disabled):hover .rpf-switch__handle {
|
|
178
188
|
box-shadow: none;
|
|
179
|
-
}
|
|
189
|
+
}
|
package/dist/types/lib/main.d.ts
CHANGED
|
@@ -11,6 +11,8 @@ export { default as InputField } from "../src/components/Form/InputField";
|
|
|
11
11
|
export type { InputFieldProps } from "../src/components/Form/InputField/InputField.types";
|
|
12
12
|
export { default as InputLabel } from "../src/components/Form/InputLabel";
|
|
13
13
|
export type { InputLabelProps } from "../src/components/Form/InputLabel/InputLabel.types";
|
|
14
|
+
export { default as PasswordInput } from "../src/components/Form/PasswordInput";
|
|
15
|
+
export type { PasswordInputProps } from "../src/components/Form/PasswordInput/PasswordInput.types";
|
|
14
16
|
export { default as RadioInput } from "../src/components/Form/RadioInput";
|
|
15
17
|
export type { RadioInputProps } from "../src/components/Form/RadioInput/RadioInput.types";
|
|
16
18
|
export { default as SearchInput } from "../src/components/Form/SearchInput";
|