@segmentify/ui 0.0.43 → 0.0.45
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/segmentify-ui.cjs
CHANGED
|
@@ -57,13 +57,13 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
57
57
|
maybe you don't need to use a ResponsiveContainer.`,s,l),Ac(!n||n>0,"The aspect(%s) must be greater than zero.",n);var j=Hu(s)?O:s,D=Hu(l)?B:l;n&&n>0&&(j?D=j/n:D&&(j=D*n),f&&D>f&&(D=f)),Ac(j>0||D>0,`The width(%s) and height(%s) of chart should be greater than 0,
|
|
58
58
|
please check the style of container, or the props width(%s) and height(%s),
|
|
59
59
|
or add a minWidth(%s) or minHeight(%s) or use aspect(%s) to control the
|
|
60
|
-
height and width.`,j,D,s,l,c,d,n);var V=!Array.isArray(p)&&r6(p.type).endsWith("Chart");return N.Children.map(p,function(G){return N.isValidElement(G)?N.cloneElement(G,qu({width:j,height:D},V?{style:qu({height:"100%",width:"100%",maxHeight:D,maxWidth:j},G.props.style)}:{})):G})},[n,p,l,f,d,c,_,s]);return N.createElement("div",{id:v?"".concat(v):void 0,className:_o("recharts-responsive-container",y),style:qu(qu({},C),{},{width:s,height:l,minWidth:c,minHeight:d,maxHeight:f}),ref:S},M)}),Uu={exports:{}},xt={};var vE;function DX(){if(vE)return xt;vE=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,s=e?Symbol.for("react.provider"):60109,a=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,u=e?Symbol.for("react.concurrent_mode"):60111,c=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,f=e?Symbol.for("react.suspense_list"):60120,p=e?Symbol.for("react.memo"):60115,g=e?Symbol.for("react.lazy"):60116,m=e?Symbol.for("react.block"):60121,v=e?Symbol.for("react.fundamental"):60117,y=e?Symbol.for("react.responder"):60118,x=e?Symbol.for("react.scope"):60119;function w(S){if(typeof S=="object"&&S!==null){var R=S.$$typeof;switch(R){case t:switch(S=S.type,S){case l:case u:case r:case i:case o:case d:return S;default:switch(S=S&&S.$$typeof,S){case a:case c:case g:case p:case s:return S;default:return R}}case n:return R}}}function C(S){return w(S)===u}return xt.AsyncMode=l,xt.ConcurrentMode=u,xt.ContextConsumer=a,xt.ContextProvider=s,xt.Element=t,xt.ForwardRef=c,xt.Fragment=r,xt.Lazy=g,xt.Memo=p,xt.Portal=n,xt.Profiler=i,xt.StrictMode=o,xt.Suspense=d,xt.isAsyncMode=function(S){return C(S)||w(S)===l},xt.isConcurrentMode=C,xt.isContextConsumer=function(S){return w(S)===a},xt.isContextProvider=function(S){return w(S)===s},xt.isElement=function(S){return typeof S=="object"&&S!==null&&S.$$typeof===t},xt.isForwardRef=function(S){return w(S)===c},xt.isFragment=function(S){return w(S)===r},xt.isLazy=function(S){return w(S)===g},xt.isMemo=function(S){return w(S)===p},xt.isPortal=function(S){return w(S)===n},xt.isProfiler=function(S){return w(S)===i},xt.isStrictMode=function(S){return w(S)===o},xt.isSuspense=function(S){return w(S)===d},xt.isValidElementType=function(S){return typeof S=="string"||typeof S=="function"||S===r||S===u||S===i||S===o||S===d||S===f||typeof S=="object"&&S!==null&&(S.$$typeof===g||S.$$typeof===p||S.$$typeof===s||S.$$typeof===a||S.$$typeof===c||S.$$typeof===v||S.$$typeof===y||S.$$typeof===x||S.$$typeof===m)},xt.typeOf=w,xt}var wt={};var yE;function kX(){return yE||(yE=1,process.env.NODE_ENV!=="production"&&(function(){var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,s=e?Symbol.for("react.provider"):60109,a=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,u=e?Symbol.for("react.concurrent_mode"):60111,c=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,f=e?Symbol.for("react.suspense_list"):60120,p=e?Symbol.for("react.memo"):60115,g=e?Symbol.for("react.lazy"):60116,m=e?Symbol.for("react.block"):60121,v=e?Symbol.for("react.fundamental"):60117,y=e?Symbol.for("react.responder"):60118,x=e?Symbol.for("react.scope"):60119;function w(L){return typeof L=="string"||typeof L=="function"||L===r||L===u||L===i||L===o||L===d||L===f||typeof L=="object"&&L!==null&&(L.$$typeof===g||L.$$typeof===p||L.$$typeof===s||L.$$typeof===a||L.$$typeof===c||L.$$typeof===v||L.$$typeof===y||L.$$typeof===x||L.$$typeof===m)}function C(L){if(typeof L=="object"&&L!==null){var Z=L.$$typeof;switch(Z){case t:var k=L.type;switch(k){case l:case u:case r:case i:case o:case d:return k;default:var ie=k&&k.$$typeof;switch(ie){case a:case c:case g:case p:case s:return ie;default:return Z}}case n:return Z}}}var S=l,R=u,I=a,T=s,_=t,$=c,A=r,M=g,O=p,B=n,j=i,D=o,V=d,G=!1;function z(L){return G||(G=!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.")),H(L)||C(L)===l}function H(L){return C(L)===u}function ne(L){return C(L)===a}function W(L){return C(L)===s}function J(L){return typeof L=="object"&&L!==null&&L.$$typeof===t}function K(L){return C(L)===c}function U(L){return C(L)===r}function oe(L){return C(L)===g}function X(L){return C(L)===p}function te(L){return C(L)===n}function Q(L){return C(L)===i}function se(L){return C(L)===o}function ae(L){return C(L)===d}wt.AsyncMode=S,wt.ConcurrentMode=R,wt.ContextConsumer=I,wt.ContextProvider=T,wt.Element=_,wt.ForwardRef=$,wt.Fragment=A,wt.Lazy=M,wt.Memo=O,wt.Portal=B,wt.Profiler=j,wt.StrictMode=D,wt.Suspense=V,wt.isAsyncMode=z,wt.isConcurrentMode=H,wt.isContextConsumer=ne,wt.isContextProvider=W,wt.isElement=J,wt.isForwardRef=K,wt.isFragment=U,wt.isLazy=oe,wt.isMemo=X,wt.isPortal=te,wt.isProfiler=Q,wt.isStrictMode=se,wt.isSuspense=ae,wt.isValidElementType=w,wt.typeOf=C})()),wt}var xE;function jX(){return xE||(xE=1,process.env.NODE_ENV==="production"?Uu.exports=DX():Uu.exports=kX()),Uu.exports}function He(){return He=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},He.apply(null,arguments)}function LX(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function ev(e,t){return ev=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},ev(e,t)}function FX(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}const BX={light:"",dark:".dark"},RM=b.createContext(null);function AM(){const e=b.useContext(RM);if(!e)throw new Error("useChart must be used within a <ChartContainer />");return e}function VX({id:e,className:t,children:n,config:r,...o}){const i=b.useId(),s=`chart-${e||i.replace(/:/g,"")}`;return h.jsx(RM.Provider,{value:{config:r},children:h.jsxs("div",{"data-slot":"chart","data-chart":s,className:F("ui:[&_.recharts-cartesian-axis-tick_text]:fill-muted-foreground ui:[&_.recharts-cartesian-grid_line[stroke='#ccc']]:stroke-border/50 ui:[&_.recharts-curve.recharts-tooltip-cursor]:stroke-border ui:[&_.recharts-polar-grid_[stroke='#ccc']]:stroke-border ui:[&_.recharts-radial-bar-background-sector]:fill-muted ui:[&_.recharts-rectangle.recharts-tooltip-cursor]:fill-muted ui:[&_.recharts-reference-line_[stroke='#ccc']]:stroke-border ui:flex ui:aspect-video ui:justify-center ui:text-xs ui:[&_.recharts-dot[stroke='#fff']]:stroke-transparent ui:[&_.recharts-layer]:outline-hidden ui:[&_.recharts-sector]:outline-hidden ui:[&_.recharts-sector[stroke='#fff']]:stroke-transparent ui:
|
|
60
|
+
height and width.`,j,D,s,l,c,d,n);var V=!Array.isArray(p)&&r6(p.type).endsWith("Chart");return N.Children.map(p,function(G){return N.isValidElement(G)?N.cloneElement(G,qu({width:j,height:D},V?{style:qu({height:"100%",width:"100%",maxHeight:D,maxWidth:j},G.props.style)}:{})):G})},[n,p,l,f,d,c,_,s]);return N.createElement("div",{id:v?"".concat(v):void 0,className:_o("recharts-responsive-container",y),style:qu(qu({},C),{},{width:s,height:l,minWidth:c,minHeight:d,maxHeight:f}),ref:S},M)}),Uu={exports:{}},xt={};var vE;function DX(){if(vE)return xt;vE=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,s=e?Symbol.for("react.provider"):60109,a=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,u=e?Symbol.for("react.concurrent_mode"):60111,c=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,f=e?Symbol.for("react.suspense_list"):60120,p=e?Symbol.for("react.memo"):60115,g=e?Symbol.for("react.lazy"):60116,m=e?Symbol.for("react.block"):60121,v=e?Symbol.for("react.fundamental"):60117,y=e?Symbol.for("react.responder"):60118,x=e?Symbol.for("react.scope"):60119;function w(S){if(typeof S=="object"&&S!==null){var R=S.$$typeof;switch(R){case t:switch(S=S.type,S){case l:case u:case r:case i:case o:case d:return S;default:switch(S=S&&S.$$typeof,S){case a:case c:case g:case p:case s:return S;default:return R}}case n:return R}}}function C(S){return w(S)===u}return xt.AsyncMode=l,xt.ConcurrentMode=u,xt.ContextConsumer=a,xt.ContextProvider=s,xt.Element=t,xt.ForwardRef=c,xt.Fragment=r,xt.Lazy=g,xt.Memo=p,xt.Portal=n,xt.Profiler=i,xt.StrictMode=o,xt.Suspense=d,xt.isAsyncMode=function(S){return C(S)||w(S)===l},xt.isConcurrentMode=C,xt.isContextConsumer=function(S){return w(S)===a},xt.isContextProvider=function(S){return w(S)===s},xt.isElement=function(S){return typeof S=="object"&&S!==null&&S.$$typeof===t},xt.isForwardRef=function(S){return w(S)===c},xt.isFragment=function(S){return w(S)===r},xt.isLazy=function(S){return w(S)===g},xt.isMemo=function(S){return w(S)===p},xt.isPortal=function(S){return w(S)===n},xt.isProfiler=function(S){return w(S)===i},xt.isStrictMode=function(S){return w(S)===o},xt.isSuspense=function(S){return w(S)===d},xt.isValidElementType=function(S){return typeof S=="string"||typeof S=="function"||S===r||S===u||S===i||S===o||S===d||S===f||typeof S=="object"&&S!==null&&(S.$$typeof===g||S.$$typeof===p||S.$$typeof===s||S.$$typeof===a||S.$$typeof===c||S.$$typeof===v||S.$$typeof===y||S.$$typeof===x||S.$$typeof===m)},xt.typeOf=w,xt}var wt={};var yE;function kX(){return yE||(yE=1,process.env.NODE_ENV!=="production"&&(function(){var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,s=e?Symbol.for("react.provider"):60109,a=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,u=e?Symbol.for("react.concurrent_mode"):60111,c=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,f=e?Symbol.for("react.suspense_list"):60120,p=e?Symbol.for("react.memo"):60115,g=e?Symbol.for("react.lazy"):60116,m=e?Symbol.for("react.block"):60121,v=e?Symbol.for("react.fundamental"):60117,y=e?Symbol.for("react.responder"):60118,x=e?Symbol.for("react.scope"):60119;function w(L){return typeof L=="string"||typeof L=="function"||L===r||L===u||L===i||L===o||L===d||L===f||typeof L=="object"&&L!==null&&(L.$$typeof===g||L.$$typeof===p||L.$$typeof===s||L.$$typeof===a||L.$$typeof===c||L.$$typeof===v||L.$$typeof===y||L.$$typeof===x||L.$$typeof===m)}function C(L){if(typeof L=="object"&&L!==null){var Z=L.$$typeof;switch(Z){case t:var k=L.type;switch(k){case l:case u:case r:case i:case o:case d:return k;default:var ie=k&&k.$$typeof;switch(ie){case a:case c:case g:case p:case s:return ie;default:return Z}}case n:return Z}}}var S=l,R=u,I=a,T=s,_=t,$=c,A=r,M=g,O=p,B=n,j=i,D=o,V=d,G=!1;function z(L){return G||(G=!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.")),H(L)||C(L)===l}function H(L){return C(L)===u}function ne(L){return C(L)===a}function W(L){return C(L)===s}function J(L){return typeof L=="object"&&L!==null&&L.$$typeof===t}function K(L){return C(L)===c}function U(L){return C(L)===r}function oe(L){return C(L)===g}function X(L){return C(L)===p}function te(L){return C(L)===n}function Q(L){return C(L)===i}function se(L){return C(L)===o}function ae(L){return C(L)===d}wt.AsyncMode=S,wt.ConcurrentMode=R,wt.ContextConsumer=I,wt.ContextProvider=T,wt.Element=_,wt.ForwardRef=$,wt.Fragment=A,wt.Lazy=M,wt.Memo=O,wt.Portal=B,wt.Profiler=j,wt.StrictMode=D,wt.Suspense=V,wt.isAsyncMode=z,wt.isConcurrentMode=H,wt.isContextConsumer=ne,wt.isContextProvider=W,wt.isElement=J,wt.isForwardRef=K,wt.isFragment=U,wt.isLazy=oe,wt.isMemo=X,wt.isPortal=te,wt.isProfiler=Q,wt.isStrictMode=se,wt.isSuspense=ae,wt.isValidElementType=w,wt.typeOf=C})()),wt}var xE;function jX(){return xE||(xE=1,process.env.NODE_ENV==="production"?Uu.exports=DX():Uu.exports=kX()),Uu.exports}function He(){return He=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},He.apply(null,arguments)}function LX(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function ev(e,t){return ev=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},ev(e,t)}function FX(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}const BX={light:"",dark:".dark"},RM=b.createContext(null);function AM(){const e=b.useContext(RM);if(!e)throw new Error("useChart must be used within a <ChartContainer />");return e}function VX({id:e,className:t,children:n,config:r,...o}){const i=b.useId(),s=`chart-${e||i.replace(/:/g,"")}`;return h.jsx(RM.Provider,{value:{config:r},children:h.jsxs("div",{"data-slot":"chart","data-chart":s,className:F("ui:[&_.recharts-cartesian-axis-tick_text]:fill-muted-foreground ui:[&_.recharts-cartesian-grid_line[stroke='#ccc']]:stroke-border/50 ui:[&_.recharts-curve.recharts-tooltip-cursor]:stroke-border ui:[&_.recharts-polar-grid_[stroke='#ccc']]:stroke-border ui:[&_.recharts-radial-bar-background-sector]:fill-muted ui:[&_.recharts-rectangle.recharts-tooltip-cursor]:fill-muted ui:[&_.recharts-reference-line_[stroke='#ccc']]:stroke-border ui:flex ui:aspect-video ui:justify-center ui:text-xs ui:[&_.recharts-dot[stroke='#fff']]:stroke-transparent ui:[&_.recharts-layer]:outline-hidden ui:[&_.recharts-sector]:outline-hidden ui:[&_.recharts-sector[stroke='#fff']]:stroke-transparent ui:[&_.recharts-surface]:outline-hidden",t),...o,children:[h.jsx(TM,{id:s,config:r}),h.jsx(MX,{children:n})]})})}const TM=({id:e,config:t})=>{const n=Object.entries(t).filter(([,r])=>r.theme||r.color);return n.length?h.jsx("style",{dangerouslySetInnerHTML:{__html:Object.entries(BX).map(([r,o])=>`
|
|
61
61
|
${o} [data-chart=${e}] {
|
|
62
62
|
${n.map(([i,s])=>{const a=s.theme?.[r]||s.color;return a?` --color-${i}: ${a};`:null}).join(`
|
|
63
63
|
`)}
|
|
64
64
|
}
|
|
65
65
|
`).join(`
|
|
66
|
-
`)}}):null},$X=w0;function GX({active:e,payload:t,className:n,indicator:r="dot",hideLabel:o=!1,hideIndicator:i=!1,label:s,labelFormatter:a,labelClassName:l,formatter:u,color:c,nameKey:d,labelKey:f}){const{config:p}=AM(),g=b.useMemo(()=>{if(o||!t?.length)return null;const[v]=t,y=`${f||v?.dataKey||v?.name||"value"}`,x=tv(p,v,y),w=!f&&typeof s=="string"?p[s]?.label||s:x?.label;return a?h.jsx("div",{className:F("ui:font-medium",l),children:a(w,t)}):w?h.jsx("div",{className:F("ui:font-medium",l),children:w}):null},[s,a,t,o,l,p,f]);if(!e||!t?.length)return null;const m=t.length===1&&r!=="dot";return h.jsxs("div",{className:F("ui:border-border/50 ui:bg-background ui:grid ui:min-w-[8rem] ui:items-start ui:gap-1.5 ui:rounded-lg ui:border ui:px-2.5 ui:py-1.5 ui:text-xs ui:shadow-xl",n),children:[m?null:g,h.jsx("div",{className:"ui:grid ui:gap-1.5",children:t.filter(v=>v.type!=="none").map((v,y)=>{const x=`${d||v.name||v.dataKey||"value"}`,w=tv(p,v,x),C=c||v.payload.fill||v.color;return h.jsx("div",{className:F("ui:[&>svg]:text-muted-foreground ui:flex ui:w-full ui:flex-wrap ui:items-stretch ui:gap-2 ui:[&>svg]:h-2.5 ui:[&>svg]:w-2.5",r==="dot"&&"ui:items-center"),children:u&&v?.value!==void 0&&v.name?u(v.value,v.name,v,y,v.payload):h.jsxs(h.Fragment,{children:[w?.icon?h.jsx(w.icon,{}):!i&&h.jsx("div",{className:F("ui:shrink-0 ui:rounded-[2px] ui:border-(--color-border) ui:bg-(--color-bg)",{"ui:h-2.5 ui:w-2.5":r==="dot","ui:w-1":r==="line","ui:w-0 ui:border-[1.5px] ui:border-dashed ui:bg-transparent":r==="dashed","ui:my-0.5":m&&r==="dashed"}),style:{"--color-bg":C,"--color-border":C}}),h.jsxs("div",{className:F("ui:flex ui:flex-1 ui:justify-between ui:leading-none",m?"ui:items-end":"ui:items-center"),children:[h.jsxs("div",{className:"ui:grid ui:gap-1.5",children:[m?g:null,h.jsx("span",{className:"ui:text-muted-foreground",children:w?.label||v.name})]}),v.value&&h.jsx("span",{className:"ui:text-foreground ui:font-mono ui:font-medium ui:tabular-nums",children:v.value.toLocaleString()})]})]})},v.dataKey)})})]})}const HX=y0;function WX({className:e,hideIcon:t=!1,payload:n,verticalAlign:r="bottom",nameKey:o}){const{config:i}=AM();return n?.length?h.jsx("div",{className:F("ui:flex ui:items-center ui:justify-center ui:gap-4",r==="top"?"ui:pb-3":"ui:pt-3",e),children:n.filter(s=>s.type!=="none").map(s=>{const a=`${o||s.dataKey||"value"}`,l=tv(i,s,a);return h.jsxs("div",{className:F("ui:[&>svg]:text-muted-foreground ui:flex ui:items-center ui:gap-1.5 ui:[&>svg]:h-3 ui:[&>svg]:w-3"),children:[l?.icon&&!t?h.jsx(l.icon,{}):h.jsx("div",{className:"ui:h-2 ui:w-2 ui:shrink-0 ui:rounded-[2px]",style:{backgroundColor:s.color}}),l?.label]},s.value)})}):null}function tv(e,t,n){if(typeof t!="object"||t===null)return;const r="payload"in t&&typeof t.payload=="object"&&t.payload!==null?t.payload:void 0;let o=n;return n in t&&typeof t[n]=="string"?o=t[n]:r&&n in r&&typeof r[n]=="string"&&(o=r[n]),o in e?e[o]:e[n]}function OM({className:e,...t}){return h.jsx(IT,{"data-slot":"checkbox",className:F("ui:peer ui:border-input ui:dark:bg-input/30 ui:data-[state=checked]:bg-primary ui:data-[state=checked]:text-primary-foreground ui:dark:data-[state=checked]:bg-primary ui:data-[state=checked]:border-primary ui:focus-visible:border-ring ui:focus-visible:ring-ring/50 ui:aria-invalid:ring-destructive/20 ui:dark:aria-invalid:ring-destructive/40 ui:aria-invalid:border-destructive ui:size-4 ui:shrink-0 ui:rounded-[4px] ui:border ui:shadow-xs ui:transition-shadow ui:outline-none ui:focus-visible:ring-[3px] ui:disabled:cursor-not-allowed ui:disabled:opacity-50",e),...t,children:h.jsx(AT,{"data-slot":"checkbox-indicator",className:"ui:grid ui:place-content-center ui:text-current ui:transition-none",children:h.jsx(_e.CheckIcon,{className:"ui:size-3.5"})})})}function zX({...e}){return h.jsx(YR,{"data-slot":"collapsible",...e})}function qX({...e}){return h.jsx(Qv,{"data-slot":"collapsible-trigger",...e})}function UX({...e}){return h.jsx(ty,{"data-slot":"collapsible-content",...e})}var wE=1,YX=.9,XX=.8,ZX=.17,Sm=.1,Em=.999,JX=.9999,KX=.99,QX=/[\\\/_+.#"@\[\(\{&]/,e8=/[\\\/_+.#"@\[\(\{&]/g,t8=/[\s-]/,NM=/[\s-]/g;function nv(e,t,n,r,o,i,s){if(i===t.length)return o===e.length?wE:KX;var a=`${o},${i}`;if(s[a]!==void 0)return s[a];for(var l=r.charAt(i),u=n.indexOf(l,o),c=0,d,f,p,g;u>=0;)d=nv(e,t,n,r,u+1,i+1,s),d>c&&(u===o?d*=wE:QX.test(e.charAt(u-1))?(d*=XX,p=e.slice(o,u-1).match(e8),p&&o>0&&(d*=Math.pow(Em,p.length))):t8.test(e.charAt(u-1))?(d*=YX,g=e.slice(o,u-1).match(NM),g&&o>0&&(d*=Math.pow(Em,g.length))):(d*=ZX,o>0&&(d*=Math.pow(Em,u-o))),e.charAt(u)!==t.charAt(i)&&(d*=JX)),(d<Sm&&n.charAt(u-1)===r.charAt(i+1)||r.charAt(i+1)===r.charAt(i)&&n.charAt(u-1)!==r.charAt(i))&&(f=nv(e,t,n,r,u+1,i+2,s),f*Sm>d&&(d=f*Sm)),d>c&&(c=d),u=n.indexOf(l,u+1);return s[a]=c,c}function CE(e){return e.toLowerCase().replace(NM," ")}function n8(e,t,n){return e=n&&n.length>0?`${e+" "+n.join(" ")}`:e,nv(e,t,CE(e),CE(t),0,0,{})}var Fa='[cmdk-group=""]',Im='[cmdk-group-items=""]',r8='[cmdk-group-heading=""]',PM='[cmdk-item=""]',SE=`${PM}:not([aria-disabled="true"])`,rv="cmdk-item-select",ks="data-value",o8=(e,t,n)=>n8(e,t,n),_M=b.createContext(void 0),hu=()=>b.useContext(_M),MM=b.createContext(void 0),C0=()=>b.useContext(MM),DM=b.createContext(void 0),kM=b.forwardRef((e,t)=>{let n=js(()=>{var W,J;return{search:"",value:(J=(W=e.value)!=null?W:e.defaultValue)!=null?J:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),r=js(()=>new Set),o=js(()=>new Map),i=js(()=>new Map),s=js(()=>new Set),a=jM(e),{label:l,children:u,value:c,onValueChange:d,filter:f,shouldFilter:p,loop:g,disablePointerSelection:m=!1,vimBindings:v=!0,...y}=e,x=Vt(),w=Vt(),C=Vt(),S=b.useRef(null),R=g8();es(()=>{if(c!==void 0){let W=c.trim();n.current.value=W,I.emit()}},[c]),es(()=>{R(6,O)},[]);let I=b.useMemo(()=>({subscribe:W=>(s.current.add(W),()=>s.current.delete(W)),snapshot:()=>n.current,setState:(W,J,K)=>{var U,oe,X,te;if(!Object.is(n.current[W],J)){if(n.current[W]=J,W==="search")M(),$(),R(1,A);else if(W==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let Q=document.getElementById(C);Q?Q.focus():(U=document.getElementById(x))==null||U.focus()}if(R(7,()=>{var Q;n.current.selectedItemId=(Q=B())==null?void 0:Q.id,I.emit()}),K||R(5,O),((oe=a.current)==null?void 0:oe.value)!==void 0){let Q=J??"";(te=(X=a.current).onValueChange)==null||te.call(X,Q);return}}I.emit()}},emit:()=>{s.current.forEach(W=>W())}}),[]),T=b.useMemo(()=>({value:(W,J,K)=>{var U;J!==((U=i.current.get(W))==null?void 0:U.value)&&(i.current.set(W,{value:J,keywords:K}),n.current.filtered.items.set(W,_(J,K)),R(2,()=>{$(),I.emit()}))},item:(W,J)=>(r.current.add(W),J&&(o.current.has(J)?o.current.get(J).add(W):o.current.set(J,new Set([W]))),R(3,()=>{M(),$(),n.current.value||A(),I.emit()}),()=>{i.current.delete(W),r.current.delete(W),n.current.filtered.items.delete(W);let K=B();R(4,()=>{M(),K?.getAttribute("id")===W&&A(),I.emit()})}),group:W=>(o.current.has(W)||o.current.set(W,new Set),()=>{i.current.delete(W),o.current.delete(W)}),filter:()=>a.current.shouldFilter,label:l||e["aria-label"],getDisablePointerSelection:()=>a.current.disablePointerSelection,listId:x,inputId:C,labelId:w,listInnerRef:S}),[]);function _(W,J){var K,U;let oe=(U=(K=a.current)==null?void 0:K.filter)!=null?U:o8;return W?oe(W,n.current.search,J):0}function $(){if(!n.current.search||a.current.shouldFilter===!1)return;let W=n.current.filtered.items,J=[];n.current.filtered.groups.forEach(U=>{let oe=o.current.get(U),X=0;oe.forEach(te=>{let Q=W.get(te);X=Math.max(Q,X)}),J.push([U,X])});let K=S.current;j().sort((U,oe)=>{var X,te;let Q=U.getAttribute("id"),se=oe.getAttribute("id");return((X=W.get(se))!=null?X:0)-((te=W.get(Q))!=null?te:0)}).forEach(U=>{let oe=U.closest(Im);oe?oe.appendChild(U.parentElement===oe?U:U.closest(`${Im} > *`)):K.appendChild(U.parentElement===K?U:U.closest(`${Im} > *`))}),J.sort((U,oe)=>oe[1]-U[1]).forEach(U=>{var oe;let X=(oe=S.current)==null?void 0:oe.querySelector(`${Fa}[${ks}="${encodeURIComponent(U[0])}"]`);X?.parentElement.appendChild(X)})}function A(){let W=j().find(K=>K.getAttribute("aria-disabled")!=="true"),J=W?.getAttribute(ks);I.setState("value",J||void 0)}function M(){var W,J,K,U;if(!n.current.search||a.current.shouldFilter===!1){n.current.filtered.count=r.current.size;return}n.current.filtered.groups=new Set;let oe=0;for(let X of r.current){let te=(J=(W=i.current.get(X))==null?void 0:W.value)!=null?J:"",Q=(U=(K=i.current.get(X))==null?void 0:K.keywords)!=null?U:[],se=_(te,Q);n.current.filtered.items.set(X,se),se>0&&oe++}for(let[X,te]of o.current)for(let Q of te)if(n.current.filtered.items.get(Q)>0){n.current.filtered.groups.add(X);break}n.current.filtered.count=oe}function O(){var W,J,K;let U=B();U&&(((W=U.parentElement)==null?void 0:W.firstChild)===U&&((K=(J=U.closest(Fa))==null?void 0:J.querySelector(r8))==null||K.scrollIntoView({block:"nearest"})),U.scrollIntoView({block:"nearest"}))}function B(){var W;return(W=S.current)==null?void 0:W.querySelector(`${PM}[aria-selected="true"]`)}function j(){var W;return Array.from(((W=S.current)==null?void 0:W.querySelectorAll(SE))||[])}function D(W){let J=j()[W];J&&I.setState("value",J.getAttribute(ks))}function V(W){var J;let K=B(),U=j(),oe=U.findIndex(te=>te===K),X=U[oe+W];(J=a.current)!=null&&J.loop&&(X=oe+W<0?U[U.length-1]:oe+W===U.length?U[0]:U[oe+W]),X&&I.setState("value",X.getAttribute(ks))}function G(W){let J=B(),K=J?.closest(Fa),U;for(;K&&!U;)K=W>0?p8(K,Fa):h8(K,Fa),U=K?.querySelector(SE);U?I.setState("value",U.getAttribute(ks)):V(W)}let z=()=>D(j().length-1),H=W=>{W.preventDefault(),W.metaKey?z():W.altKey?G(1):V(1)},ne=W=>{W.preventDefault(),W.metaKey?D(0):W.altKey?G(-1):V(-1)};return b.createElement(_n.div,{ref:t,tabIndex:-1,...y,"cmdk-root":"",onKeyDown:W=>{var J;(J=y.onKeyDown)==null||J.call(y,W);let K=W.nativeEvent.isComposing||W.keyCode===229;if(!(W.defaultPrevented||K))switch(W.key){case"n":case"j":{v&&W.ctrlKey&&H(W);break}case"ArrowDown":{H(W);break}case"p":case"k":{v&&W.ctrlKey&&ne(W);break}case"ArrowUp":{ne(W);break}case"Home":{W.preventDefault(),D(0);break}case"End":{W.preventDefault(),z();break}case"Enter":{W.preventDefault();let U=B();if(U){let oe=new Event(rv);U.dispatchEvent(oe)}}}}},b.createElement("label",{"cmdk-label":"",htmlFor:T.inputId,id:T.labelId,style:b8},l),Ef(e,W=>b.createElement(MM.Provider,{value:I},b.createElement(_M.Provider,{value:T},W))))}),i8=b.forwardRef((e,t)=>{var n,r;let o=Vt(),i=b.useRef(null),s=b.useContext(DM),a=hu(),l=jM(e),u=(r=(n=l.current)==null?void 0:n.forceMount)!=null?r:s?.forceMount;es(()=>{if(!u)return a.item(o,s?.id)},[u]);let c=LM(o,i,[e.value,e.children,i],e.keywords),d=C0(),f=fi(R=>R.value&&R.value===c.current),p=fi(R=>u||a.filter()===!1?!0:R.search?R.filtered.items.get(o)>0:!0);b.useEffect(()=>{let R=i.current;if(!(!R||e.disabled))return R.addEventListener(rv,g),()=>R.removeEventListener(rv,g)},[p,e.onSelect,e.disabled]);function g(){var R,I;m(),(I=(R=l.current).onSelect)==null||I.call(R,c.current)}function m(){d.setState("value",c.current,!0)}if(!p)return null;let{disabled:v,value:y,onSelect:x,forceMount:w,keywords:C,...S}=e;return b.createElement(_n.div,{ref:no(i,t),...S,id:o,"cmdk-item":"",role:"option","aria-disabled":!!v,"aria-selected":!!f,"data-disabled":!!v,"data-selected":!!f,onPointerMove:v||a.getDisablePointerSelection()?void 0:m,onClick:v?void 0:g},e.children)}),s8=b.forwardRef((e,t)=>{let{heading:n,children:r,forceMount:o,...i}=e,s=Vt(),a=b.useRef(null),l=b.useRef(null),u=Vt(),c=hu(),d=fi(p=>o||c.filter()===!1?!0:p.search?p.filtered.groups.has(s):!0);es(()=>c.group(s),[]),LM(s,a,[e.value,e.heading,l]);let f=b.useMemo(()=>({id:s,forceMount:o}),[o]);return b.createElement(_n.div,{ref:no(a,t),...i,"cmdk-group":"",role:"presentation",hidden:d?void 0:!0},n&&b.createElement("div",{ref:l,"cmdk-group-heading":"","aria-hidden":!0,id:u},n),Ef(e,p=>b.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":n?u:void 0},b.createElement(DM.Provider,{value:f},p))))}),a8=b.forwardRef((e,t)=>{let{alwaysRender:n,...r}=e,o=b.useRef(null),i=fi(s=>!s.search);return!n&&!i?null:b.createElement(_n.div,{ref:no(o,t),...r,"cmdk-separator":"",role:"separator"})}),l8=b.forwardRef((e,t)=>{let{onValueChange:n,...r}=e,o=e.value!=null,i=C0(),s=fi(u=>u.search),a=fi(u=>u.selectedItemId),l=hu();return b.useEffect(()=>{e.value!=null&&i.setState("search",e.value)},[e.value]),b.createElement(_n.input,{ref:t,...r,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":l.listId,"aria-labelledby":l.labelId,"aria-activedescendant":a,id:l.inputId,type:"text",value:o?e.value:s,onChange:u=>{o||i.setState("search",u.target.value),n?.(u.target.value)}})}),u8=b.forwardRef((e,t)=>{let{children:n,label:r="Suggestions",...o}=e,i=b.useRef(null),s=b.useRef(null),a=fi(u=>u.selectedItemId),l=hu();return b.useEffect(()=>{if(s.current&&i.current){let u=s.current,c=i.current,d,f=new ResizeObserver(()=>{d=requestAnimationFrame(()=>{let p=u.offsetHeight;c.style.setProperty("--cmdk-list-height",p.toFixed(1)+"px")})});return f.observe(u),()=>{cancelAnimationFrame(d),f.unobserve(u)}}},[]),b.createElement(_n.div,{ref:no(i,t),...o,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":a,"aria-label":r,id:l.listId},Ef(e,u=>b.createElement("div",{ref:no(s,l.listInnerRef),"cmdk-list-sizer":""},u)))}),c8=b.forwardRef((e,t)=>{let{open:n,onOpenChange:r,overlayClassName:o,contentClassName:i,container:s,...a}=e;return b.createElement(Xl,{open:n,onOpenChange:r},b.createElement(Zl,{container:s},b.createElement(Jl,{"cmdk-overlay":"",className:o}),b.createElement(Kl,{"aria-label":e.label,"cmdk-dialog":"",className:i},b.createElement(kM,{ref:t,...a}))))}),d8=b.forwardRef((e,t)=>fi(n=>n.filtered.count===0)?b.createElement(_n.div,{ref:t,...e,"cmdk-empty":"",role:"presentation"}):null),f8=b.forwardRef((e,t)=>{let{progress:n,children:r,label:o="Loading...",...i}=e;return b.createElement(_n.div,{ref:t,...i,"cmdk-loading":"",role:"progressbar","aria-valuenow":n,"aria-valuemin":0,"aria-valuemax":100,"aria-label":o},Ef(e,s=>b.createElement("div",{"aria-hidden":!0},s)))}),ms=Object.assign(kM,{List:u8,Item:i8,Input:l8,Group:s8,Separator:a8,Dialog:c8,Empty:d8,Loading:f8});function p8(e,t){let n=e.nextElementSibling;for(;n;){if(n.matches(t))return n;n=n.nextElementSibling}}function h8(e,t){let n=e.previousElementSibling;for(;n;){if(n.matches(t))return n;n=n.previousElementSibling}}function jM(e){let t=b.useRef(e);return es(()=>{t.current=e}),t}var es=typeof window>"u"?b.useEffect:b.useLayoutEffect;function js(e){let t=b.useRef();return t.current===void 0&&(t.current=e()),t}function fi(e){let t=C0(),n=()=>e(t.snapshot());return b.useSyncExternalStore(t.subscribe,n,n)}function LM(e,t,n,r=[]){let o=b.useRef(),i=hu();return es(()=>{var s;let a=(()=>{var u;for(let c of n){if(typeof c=="string")return c.trim();if(typeof c=="object"&&"current"in c)return c.current?(u=c.current.textContent)==null?void 0:u.trim():o.current}})(),l=r.map(u=>u.trim());i.value(e,a,l),(s=t.current)==null||s.setAttribute(ks,a),o.current=a}),o}var g8=()=>{let[e,t]=b.useState(),n=js(()=>new Map);return es(()=>{n.current.forEach(r=>r()),n.current=new Map},[e]),(r,o)=>{n.current.set(r,o),t({})}};function m8(e){let t=e.type;return typeof t=="function"?t(e.props):"render"in t?t.render(e.props):e}function Ef({asChild:e,children:t},n){return e&&b.isValidElement(t)?b.cloneElement(m8(t),{ref:t.ref},n(t.props.children)):n(t)}var b8={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};function S0({...e}){return h.jsx(Xl,{"data-slot":"dialog",...e})}function FM({...e}){return h.jsx(jd,{"data-slot":"dialog-trigger",...e})}function BM({...e}){return h.jsx(Zl,{"data-slot":"dialog-portal",...e})}function v8({...e}){return h.jsx(ds,{"data-slot":"dialog-close",...e})}function VM({className:e,...t}){return h.jsx(Jl,{"data-slot":"dialog-overlay",className:F("ui:data-[state=open]:animate-in ui:data-[state=closed]:animate-out ui:data-[state=closed]:fade-out-0 ui:data-[state=open]:fade-in-0 ui:fixed ui:inset-0 ui:z-50 ui:bg-black/50",e),...t})}function E0({className:e,children:t,showCloseButton:n=!0,...r}){return h.jsxs(BM,{"data-slot":"dialog-portal",children:[h.jsx(VM,{}),h.jsxs(Kl,{"data-slot":"dialog-content",className:F("ui:bg-background ui:data-[state=open]:animate-in ui:data-[state=closed]:animate-out ui:data-[state=closed]:fade-out-0 ui:data-[state=open]:fade-in-0 ui:data-[state=closed]:zoom-out-95 ui:data-[state=open]:zoom-in-95 ui:fixed ui:top-[50%] ui:left-[50%] ui:z-50 ui:grid ui:w-full ui:max-w-[calc(100%-2rem)] ui:translate-x-[-50%] ui:translate-y-[-50%] ui:gap-4 ui:rounded-lg ui:border ui:p-6 ui:shadow-lg ui:duration-200 ui:outline-none ui:sm:max-w-lg",e),...r,children:[t,n&&h.jsxs(ds,{"data-slot":"dialog-close",className:"ui:ring-offset-background ui:focus:ring-ring ui:data-[state=open]:bg-accent ui:data-[state=open]:text-muted-foreground ui:absolute ui:top-4 ui:right-4 ui:rounded-xs ui:opacity-70 ui:transition-opacity ui:hover:opacity-100 ui:focus:ring-2 ui:focus:ring-offset-2 ui:focus:outline-hidden ui:disabled:pointer-events-none ui:[&_svg]:pointer-events-none ui:[&_svg]:shrink-0 ui:[&_svg:not([class*='size-'])]:size-4",children:[h.jsx(_e.XIcon,{}),h.jsx("span",{className:"ui:sr-only",children:"Close"})]})]})]})}function I0({className:e,...t}){return h.jsx("div",{"data-slot":"dialog-header",className:F("ui:flex ui:flex-col ui:gap-2 ui:text-center ui:sm:text-left",e),...t})}function y8({className:e,...t}){return h.jsx("div",{"data-slot":"dialog-footer",className:F("ui:flex ui:flex-col-reverse ui:gap-2 ui:sm:flex-row ui:sm:justify-end",e),...t})}function R0({className:e,...t}){return h.jsx(Ld,{"data-slot":"dialog-title",className:F("ui:text-lg ui:leading-none ui:font-semibold",e),...t})}function $M({className:e,...t}){return h.jsx(Fd,{"data-slot":"dialog-description",className:F("ui:text-muted-foreground ui:text-sm",e),...t})}function GM({className:e,...t}){return h.jsx(ms,{shouldFilter:!1,"data-slot":"command",className:F("ui:bg-popover ui:text-popover-foreground ui:flex ui:h-full ui:w-full ui:flex-col ui:overflow-hidden ui:rounded-md",e),...t})}function x8({title:e="Command Palette",description:t="Search for a command to run...",children:n,className:r,showCloseButton:o=!0,...i}){return h.jsxs(S0,{...i,children:[h.jsxs(I0,{className:"ui:sr-only",children:[h.jsx(R0,{children:e}),h.jsx($M,{children:t})]}),h.jsx(E0,{className:F("ui:overflow-hidden ui:p-0",r),showCloseButton:o,children:h.jsx(GM,{className:"ui:[&_[cmdk-group-heading]]:text-muted-foreground ui:**:data-[slot=command-input-wrapper]:h-12 ui:[&_[cmdk-group-heading]]:px-2 ui:[&_[cmdk-group-heading]]:font-medium ui:[&_[cmdk-group]]:px-2 ui:[&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 ui:[&_[cmdk-input-wrapper]_svg]:h-5 ui:[&_[cmdk-input-wrapper]_svg]:w-5 ui:[&_[cmdk-input]]:h-12 ui:[&_[cmdk-item]]:px-2 ui:[&_[cmdk-item]]:py-3 ui:[&_[cmdk-item]_svg]:h-5 ui:[&_[cmdk-item]_svg]:w-5",children:n})})]})}function w8({containerClassName:e,className:t,...n}){return h.jsxs("div",{"data-slot":"command-input-wrapper",className:F("ui:flex ui:h-9 ui:items-center ui:gap-2 ui:border-b ui:px-3",e),children:[h.jsx(_e.SearchIcon,{className:"ui:size-4 ui:shrink-0 ui:opacity-50"}),h.jsx(ms.Input,{"data-slot":"command-input",className:F("ui:placeholder:text-muted-foreground ui:flex ui:h-10 ui:w-full ui:rounded-md ui:bg-transparent ui:py-3 ui:text-sm ui:outline-hidden ui:disabled:cursor-not-allowed ui:disabled:opacity-50",t),...n})]})}function C8({className:e,...t}){return h.jsx(ms.List,{"data-slot":"command-list",className:F("ui:max-h-[300px] ui:scroll-py-1 ui:overflow-x-hidden ui:overflow-y-auto",e),...t})}function S8({...e}){return h.jsx(ms.Empty,{"data-slot":"command-empty",className:"ui:py-6 ui:text-center ui:text-sm",...e})}function E8({className:e,...t}){return h.jsx(ms.Group,{"data-slot":"command-group",className:F("ui:text-foreground ui:[&_[cmdk-group-heading]]:text-muted-foreground ui:overflow-hidden ui:p-1 ui:[&_[cmdk-group-heading]]:px-2 ui:[&_[cmdk-group-heading]]:py-1.5 ui:[&_[cmdk-group-heading]]:text-xs ui:[&_[cmdk-group-heading]]:font-medium",e),...t})}function I8({className:e,...t}){return h.jsx(ms.Separator,{"data-slot":"command-separator",className:F("ui:bg-border ui:-mx-1 ui:h-px",e),...t})}function R8({className:e,...t}){return h.jsx(ms.Item,{"data-slot":"command-item",className:F("ui:data-[selected=true]:bg-accent ui:data-[selected=true]:text-accent-foreground ui:[&_svg:not([class*='text-'])]:text-muted-foreground ui:relative ui:flex ui:cursor-default ui:items-center ui:gap-2 ui:rounded-sm ui:px-2 ui:py-1.5 ui:text-sm ui:outline-hidden ui:select-none ui:data-[disabled=true]:pointer-events-none ui:data-[disabled=true]:opacity-50 ui:[&_svg]:pointer-events-none ui:[&_svg]:shrink-0 ui:[&_svg:not([class*='size-'])]:size-4",e),...t})}function A8({className:e,...t}){return h.jsx("span",{"data-slot":"command-shortcut",className:F("ui:text-muted-foreground ui:ml-auto ui:text-xs ui:tracking-widest",e),...t})}const HM=({title:e,className:t,titleClassName:n,header:r="",children:o})=>h.jsxs("div",{className:F("ui:bg-white ui:border ui:border-gray-200 ui:rounded-lg ui:shadow",e?"ui:p-4 ui:mt-4":"ui:p-2 ui:items-center",t),children:[r,!r&&e&&h.jsx("h3",{className:F("ui:text-xl ui:text-black-900 ui:font-semibold",n),children:e}),o]}),T8=({onCreate:e,onDelete:t,showCreate:n=!0,className:r})=>h.jsxs("div",{className:F("ui:h-full ui:mt-6 ui:flex ui:gap-2",r),children:[h.jsxs(_r,{children:[h.jsx(rn,{condition:n,children:h.jsx(_e.PlusCircle,{color:"green",size:20,onClick:e,className:"ui:cursor-pointer ui:h-full"})}),h.jsx(Ki,{children:h.jsx("div",{className:"ui:size-5"})})]}),h.jsx(_e.CircleX,{color:"red",size:20,onClick:t,className:"ui:cursor-pointer ui:h-full"})]});var O8="Label",WM=b.forwardRef((e,t)=>h.jsx(_n.label,{...e,ref:t,onMouseDown:n=>{n.target.closest("button, input, select, textarea")||(e.onMouseDown?.(n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));WM.displayName=O8;var N8=WM;function gr({className:e,variant:t="default",...n}){return h.jsx(N8,{"data-slot":"label",className:F(l9({variant:t}),e),...n})}function If({description:e,className:t}){return h.jsx("p",{className:F("ui:text-gray-500 ui:text-xs ui:mt-1",t),children:e})}const zM=({label:e,name:t,description:n,onCheckedChange:r,...o})=>h.jsxs("article",{children:[h.jsxs("div",{className:"ui:flex ui:items-center ui:gap-2",children:[h.jsx(OM,{...o,id:t,onCheckedChange:r}),h.jsx(gr,{htmlFor:t,children:e})]}),n&&h.jsx(If,{description:n})]});function Rm({controlled:e,default:t,name:n,state:r="value"}){const{current:o}=b.useRef(e!==void 0),[i,s]=b.useState(t),a=o?e:i;if(process.env.NODE_ENV!=="production"){b.useEffect(()=>{o!==(e!==void 0)&&console.error([`Base UI: A component is changing the ${o?"":"un"}controlled ${r} state of ${n} to be ${o?"un":""}controlled.`,"Elements should not switch from uncontrolled to controlled (or vice versa).",`Decide between using a controlled or uncontrolled ${n} element for the lifetime of the component.`,"The nature of the state is determined during the first render. It's considered controlled if the value is not `undefined`.","More info: https://fb.me/react-controlled-components"].join(`
|
|
66
|
+
`)}}):null},$X=w0;function GX({active:e,payload:t,className:n,indicator:r="dot",hideLabel:o=!1,hideIndicator:i=!1,label:s,labelFormatter:a,labelClassName:l,formatter:u,color:c,nameKey:d,labelKey:f}){const{config:p}=AM(),g=b.useMemo(()=>{if(o||!t?.length)return null;const[v]=t,y=`${f||v?.dataKey||v?.name||"value"}`,x=tv(p,v,y),w=!f&&typeof s=="string"?p[s]?.label||s:x?.label;return a?h.jsx("div",{className:F("ui:font-medium",l),children:a(w,t)}):w?h.jsx("div",{className:F("ui:font-medium",l),children:w}):null},[s,a,t,o,l,p,f]);if(!e||!t?.length)return null;const m=t.length===1&&r!=="dot";return h.jsxs("div",{className:F("ui:border-border/50 ui:bg-background ui:grid ui:min-w-[8rem] ui:items-start ui:gap-1.5 ui:rounded-lg ui:border ui:px-2.5 ui:py-1.5 ui:text-xs ui:shadow-xl",n),children:[m?null:g,h.jsx("div",{className:"ui:grid ui:gap-1.5",children:t.filter(v=>v.type!=="none").map((v,y)=>{const x=`${d||v.name||v.dataKey||"value"}`,w=tv(p,v,x),C=c||v.payload.fill||v.color;return h.jsx("div",{className:F("ui:[&>svg]:text-muted-foreground ui:flex ui:w-full ui:flex-wrap ui:items-stretch ui:gap-2 ui:[&>svg]:h-2.5 ui:[&>svg]:w-2.5",r==="dot"&&"ui:items-center"),children:u&&v?.value!==void 0&&v.name?u(v.value,v.name,v,y,v.payload):h.jsxs(h.Fragment,{children:[w?.icon?h.jsx(w.icon,{}):!i&&h.jsx("div",{className:F("ui:shrink-0 ui:rounded-[2px] ui:border-(--color-border) ui:bg-(--color-bg)",{"ui:h-2.5 ui:w-2.5":r==="dot","ui:w-1":r==="line","ui:w-0 ui:border-[1.5px] ui:border-dashed ui:bg-transparent":r==="dashed","ui:my-0.5":m&&r==="dashed"}),style:{"--color-bg":C,"--color-border":C}}),h.jsxs("div",{className:F("ui:flex ui:flex-1 ui:justify-between ui:leading-none ui:gap-2",m?"ui:items-end":"ui:items-center"),children:[h.jsxs("div",{className:"ui:grid ui:gap-1.5",children:[m?g:null,h.jsx("span",{className:"ui:text-muted-foreground",children:w?.label||v.name})]}),v.value&&h.jsx("span",{className:"ui:text-foreground ui:font-mono ui:font-medium ui:tabular-nums",children:v.value.toLocaleString()})]})]})},v.dataKey)})})]})}const HX=y0;function WX({className:e,hideIcon:t=!1,payload:n,verticalAlign:r="bottom",nameKey:o}){const{config:i}=AM();return n?.length?h.jsx("div",{className:F("ui:flex ui:items-center ui:justify-center ui:gap-4",r==="top"?"ui:pb-3":"ui:pt-3",e),children:n.filter(s=>s.type!=="none").map(s=>{const a=`${o||s.dataKey||"value"}`,l=tv(i,s,a);return h.jsxs("div",{className:F("ui:[&>svg]:text-muted-foreground ui:flex ui:items-center ui:gap-1.5 ui:[&>svg]:h-3 ui:[&>svg]:w-3"),children:[l?.icon&&!t?h.jsx(l.icon,{}):h.jsx("div",{className:"ui:h-2 ui:w-2 ui:shrink-0 ui:rounded-[2px]",style:{backgroundColor:s.color}}),l?.label]},s.value)})}):null}function tv(e,t,n){if(typeof t!="object"||t===null)return;const r="payload"in t&&typeof t.payload=="object"&&t.payload!==null?t.payload:void 0;let o=n;return n in t&&typeof t[n]=="string"?o=t[n]:r&&n in r&&typeof r[n]=="string"&&(o=r[n]),o in e?e[o]:e[n]}function OM({className:e,...t}){return h.jsx(IT,{"data-slot":"checkbox",className:F("ui:peer ui:border-input ui:dark:bg-input/30 ui:data-[state=checked]:bg-primary ui:data-[state=checked]:text-primary-foreground ui:dark:data-[state=checked]:bg-primary ui:data-[state=checked]:border-primary ui:focus-visible:border-ring ui:focus-visible:ring-ring/50 ui:aria-invalid:ring-destructive/20 ui:dark:aria-invalid:ring-destructive/40 ui:aria-invalid:border-destructive ui:size-4 ui:shrink-0 ui:rounded-[4px] ui:border ui:shadow-xs ui:transition-shadow ui:outline-none ui:focus-visible:ring-[3px] ui:disabled:cursor-not-allowed ui:disabled:opacity-50",e),...t,children:h.jsx(AT,{"data-slot":"checkbox-indicator",className:"ui:grid ui:place-content-center ui:text-current ui:transition-none",children:h.jsx(_e.CheckIcon,{className:"ui:size-3.5"})})})}function zX({...e}){return h.jsx(YR,{"data-slot":"collapsible",...e})}function qX({...e}){return h.jsx(Qv,{"data-slot":"collapsible-trigger",...e})}function UX({...e}){return h.jsx(ty,{"data-slot":"collapsible-content",...e})}var wE=1,YX=.9,XX=.8,ZX=.17,Sm=.1,Em=.999,JX=.9999,KX=.99,QX=/[\\\/_+.#"@\[\(\{&]/,e8=/[\\\/_+.#"@\[\(\{&]/g,t8=/[\s-]/,NM=/[\s-]/g;function nv(e,t,n,r,o,i,s){if(i===t.length)return o===e.length?wE:KX;var a=`${o},${i}`;if(s[a]!==void 0)return s[a];for(var l=r.charAt(i),u=n.indexOf(l,o),c=0,d,f,p,g;u>=0;)d=nv(e,t,n,r,u+1,i+1,s),d>c&&(u===o?d*=wE:QX.test(e.charAt(u-1))?(d*=XX,p=e.slice(o,u-1).match(e8),p&&o>0&&(d*=Math.pow(Em,p.length))):t8.test(e.charAt(u-1))?(d*=YX,g=e.slice(o,u-1).match(NM),g&&o>0&&(d*=Math.pow(Em,g.length))):(d*=ZX,o>0&&(d*=Math.pow(Em,u-o))),e.charAt(u)!==t.charAt(i)&&(d*=JX)),(d<Sm&&n.charAt(u-1)===r.charAt(i+1)||r.charAt(i+1)===r.charAt(i)&&n.charAt(u-1)!==r.charAt(i))&&(f=nv(e,t,n,r,u+1,i+2,s),f*Sm>d&&(d=f*Sm)),d>c&&(c=d),u=n.indexOf(l,u+1);return s[a]=c,c}function CE(e){return e.toLowerCase().replace(NM," ")}function n8(e,t,n){return e=n&&n.length>0?`${e+" "+n.join(" ")}`:e,nv(e,t,CE(e),CE(t),0,0,{})}var Fa='[cmdk-group=""]',Im='[cmdk-group-items=""]',r8='[cmdk-group-heading=""]',PM='[cmdk-item=""]',SE=`${PM}:not([aria-disabled="true"])`,rv="cmdk-item-select",ks="data-value",o8=(e,t,n)=>n8(e,t,n),_M=b.createContext(void 0),hu=()=>b.useContext(_M),MM=b.createContext(void 0),C0=()=>b.useContext(MM),DM=b.createContext(void 0),kM=b.forwardRef((e,t)=>{let n=js(()=>{var W,J;return{search:"",value:(J=(W=e.value)!=null?W:e.defaultValue)!=null?J:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),r=js(()=>new Set),o=js(()=>new Map),i=js(()=>new Map),s=js(()=>new Set),a=jM(e),{label:l,children:u,value:c,onValueChange:d,filter:f,shouldFilter:p,loop:g,disablePointerSelection:m=!1,vimBindings:v=!0,...y}=e,x=Vt(),w=Vt(),C=Vt(),S=b.useRef(null),R=g8();es(()=>{if(c!==void 0){let W=c.trim();n.current.value=W,I.emit()}},[c]),es(()=>{R(6,O)},[]);let I=b.useMemo(()=>({subscribe:W=>(s.current.add(W),()=>s.current.delete(W)),snapshot:()=>n.current,setState:(W,J,K)=>{var U,oe,X,te;if(!Object.is(n.current[W],J)){if(n.current[W]=J,W==="search")M(),$(),R(1,A);else if(W==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let Q=document.getElementById(C);Q?Q.focus():(U=document.getElementById(x))==null||U.focus()}if(R(7,()=>{var Q;n.current.selectedItemId=(Q=B())==null?void 0:Q.id,I.emit()}),K||R(5,O),((oe=a.current)==null?void 0:oe.value)!==void 0){let Q=J??"";(te=(X=a.current).onValueChange)==null||te.call(X,Q);return}}I.emit()}},emit:()=>{s.current.forEach(W=>W())}}),[]),T=b.useMemo(()=>({value:(W,J,K)=>{var U;J!==((U=i.current.get(W))==null?void 0:U.value)&&(i.current.set(W,{value:J,keywords:K}),n.current.filtered.items.set(W,_(J,K)),R(2,()=>{$(),I.emit()}))},item:(W,J)=>(r.current.add(W),J&&(o.current.has(J)?o.current.get(J).add(W):o.current.set(J,new Set([W]))),R(3,()=>{M(),$(),n.current.value||A(),I.emit()}),()=>{i.current.delete(W),r.current.delete(W),n.current.filtered.items.delete(W);let K=B();R(4,()=>{M(),K?.getAttribute("id")===W&&A(),I.emit()})}),group:W=>(o.current.has(W)||o.current.set(W,new Set),()=>{i.current.delete(W),o.current.delete(W)}),filter:()=>a.current.shouldFilter,label:l||e["aria-label"],getDisablePointerSelection:()=>a.current.disablePointerSelection,listId:x,inputId:C,labelId:w,listInnerRef:S}),[]);function _(W,J){var K,U;let oe=(U=(K=a.current)==null?void 0:K.filter)!=null?U:o8;return W?oe(W,n.current.search,J):0}function $(){if(!n.current.search||a.current.shouldFilter===!1)return;let W=n.current.filtered.items,J=[];n.current.filtered.groups.forEach(U=>{let oe=o.current.get(U),X=0;oe.forEach(te=>{let Q=W.get(te);X=Math.max(Q,X)}),J.push([U,X])});let K=S.current;j().sort((U,oe)=>{var X,te;let Q=U.getAttribute("id"),se=oe.getAttribute("id");return((X=W.get(se))!=null?X:0)-((te=W.get(Q))!=null?te:0)}).forEach(U=>{let oe=U.closest(Im);oe?oe.appendChild(U.parentElement===oe?U:U.closest(`${Im} > *`)):K.appendChild(U.parentElement===K?U:U.closest(`${Im} > *`))}),J.sort((U,oe)=>oe[1]-U[1]).forEach(U=>{var oe;let X=(oe=S.current)==null?void 0:oe.querySelector(`${Fa}[${ks}="${encodeURIComponent(U[0])}"]`);X?.parentElement.appendChild(X)})}function A(){let W=j().find(K=>K.getAttribute("aria-disabled")!=="true"),J=W?.getAttribute(ks);I.setState("value",J||void 0)}function M(){var W,J,K,U;if(!n.current.search||a.current.shouldFilter===!1){n.current.filtered.count=r.current.size;return}n.current.filtered.groups=new Set;let oe=0;for(let X of r.current){let te=(J=(W=i.current.get(X))==null?void 0:W.value)!=null?J:"",Q=(U=(K=i.current.get(X))==null?void 0:K.keywords)!=null?U:[],se=_(te,Q);n.current.filtered.items.set(X,se),se>0&&oe++}for(let[X,te]of o.current)for(let Q of te)if(n.current.filtered.items.get(Q)>0){n.current.filtered.groups.add(X);break}n.current.filtered.count=oe}function O(){var W,J,K;let U=B();U&&(((W=U.parentElement)==null?void 0:W.firstChild)===U&&((K=(J=U.closest(Fa))==null?void 0:J.querySelector(r8))==null||K.scrollIntoView({block:"nearest"})),U.scrollIntoView({block:"nearest"}))}function B(){var W;return(W=S.current)==null?void 0:W.querySelector(`${PM}[aria-selected="true"]`)}function j(){var W;return Array.from(((W=S.current)==null?void 0:W.querySelectorAll(SE))||[])}function D(W){let J=j()[W];J&&I.setState("value",J.getAttribute(ks))}function V(W){var J;let K=B(),U=j(),oe=U.findIndex(te=>te===K),X=U[oe+W];(J=a.current)!=null&&J.loop&&(X=oe+W<0?U[U.length-1]:oe+W===U.length?U[0]:U[oe+W]),X&&I.setState("value",X.getAttribute(ks))}function G(W){let J=B(),K=J?.closest(Fa),U;for(;K&&!U;)K=W>0?p8(K,Fa):h8(K,Fa),U=K?.querySelector(SE);U?I.setState("value",U.getAttribute(ks)):V(W)}let z=()=>D(j().length-1),H=W=>{W.preventDefault(),W.metaKey?z():W.altKey?G(1):V(1)},ne=W=>{W.preventDefault(),W.metaKey?D(0):W.altKey?G(-1):V(-1)};return b.createElement(_n.div,{ref:t,tabIndex:-1,...y,"cmdk-root":"",onKeyDown:W=>{var J;(J=y.onKeyDown)==null||J.call(y,W);let K=W.nativeEvent.isComposing||W.keyCode===229;if(!(W.defaultPrevented||K))switch(W.key){case"n":case"j":{v&&W.ctrlKey&&H(W);break}case"ArrowDown":{H(W);break}case"p":case"k":{v&&W.ctrlKey&&ne(W);break}case"ArrowUp":{ne(W);break}case"Home":{W.preventDefault(),D(0);break}case"End":{W.preventDefault(),z();break}case"Enter":{W.preventDefault();let U=B();if(U){let oe=new Event(rv);U.dispatchEvent(oe)}}}}},b.createElement("label",{"cmdk-label":"",htmlFor:T.inputId,id:T.labelId,style:b8},l),Ef(e,W=>b.createElement(MM.Provider,{value:I},b.createElement(_M.Provider,{value:T},W))))}),i8=b.forwardRef((e,t)=>{var n,r;let o=Vt(),i=b.useRef(null),s=b.useContext(DM),a=hu(),l=jM(e),u=(r=(n=l.current)==null?void 0:n.forceMount)!=null?r:s?.forceMount;es(()=>{if(!u)return a.item(o,s?.id)},[u]);let c=LM(o,i,[e.value,e.children,i],e.keywords),d=C0(),f=fi(R=>R.value&&R.value===c.current),p=fi(R=>u||a.filter()===!1?!0:R.search?R.filtered.items.get(o)>0:!0);b.useEffect(()=>{let R=i.current;if(!(!R||e.disabled))return R.addEventListener(rv,g),()=>R.removeEventListener(rv,g)},[p,e.onSelect,e.disabled]);function g(){var R,I;m(),(I=(R=l.current).onSelect)==null||I.call(R,c.current)}function m(){d.setState("value",c.current,!0)}if(!p)return null;let{disabled:v,value:y,onSelect:x,forceMount:w,keywords:C,...S}=e;return b.createElement(_n.div,{ref:no(i,t),...S,id:o,"cmdk-item":"",role:"option","aria-disabled":!!v,"aria-selected":!!f,"data-disabled":!!v,"data-selected":!!f,onPointerMove:v||a.getDisablePointerSelection()?void 0:m,onClick:v?void 0:g},e.children)}),s8=b.forwardRef((e,t)=>{let{heading:n,children:r,forceMount:o,...i}=e,s=Vt(),a=b.useRef(null),l=b.useRef(null),u=Vt(),c=hu(),d=fi(p=>o||c.filter()===!1?!0:p.search?p.filtered.groups.has(s):!0);es(()=>c.group(s),[]),LM(s,a,[e.value,e.heading,l]);let f=b.useMemo(()=>({id:s,forceMount:o}),[o]);return b.createElement(_n.div,{ref:no(a,t),...i,"cmdk-group":"",role:"presentation",hidden:d?void 0:!0},n&&b.createElement("div",{ref:l,"cmdk-group-heading":"","aria-hidden":!0,id:u},n),Ef(e,p=>b.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":n?u:void 0},b.createElement(DM.Provider,{value:f},p))))}),a8=b.forwardRef((e,t)=>{let{alwaysRender:n,...r}=e,o=b.useRef(null),i=fi(s=>!s.search);return!n&&!i?null:b.createElement(_n.div,{ref:no(o,t),...r,"cmdk-separator":"",role:"separator"})}),l8=b.forwardRef((e,t)=>{let{onValueChange:n,...r}=e,o=e.value!=null,i=C0(),s=fi(u=>u.search),a=fi(u=>u.selectedItemId),l=hu();return b.useEffect(()=>{e.value!=null&&i.setState("search",e.value)},[e.value]),b.createElement(_n.input,{ref:t,...r,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":l.listId,"aria-labelledby":l.labelId,"aria-activedescendant":a,id:l.inputId,type:"text",value:o?e.value:s,onChange:u=>{o||i.setState("search",u.target.value),n?.(u.target.value)}})}),u8=b.forwardRef((e,t)=>{let{children:n,label:r="Suggestions",...o}=e,i=b.useRef(null),s=b.useRef(null),a=fi(u=>u.selectedItemId),l=hu();return b.useEffect(()=>{if(s.current&&i.current){let u=s.current,c=i.current,d,f=new ResizeObserver(()=>{d=requestAnimationFrame(()=>{let p=u.offsetHeight;c.style.setProperty("--cmdk-list-height",p.toFixed(1)+"px")})});return f.observe(u),()=>{cancelAnimationFrame(d),f.unobserve(u)}}},[]),b.createElement(_n.div,{ref:no(i,t),...o,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":a,"aria-label":r,id:l.listId},Ef(e,u=>b.createElement("div",{ref:no(s,l.listInnerRef),"cmdk-list-sizer":""},u)))}),c8=b.forwardRef((e,t)=>{let{open:n,onOpenChange:r,overlayClassName:o,contentClassName:i,container:s,...a}=e;return b.createElement(Xl,{open:n,onOpenChange:r},b.createElement(Zl,{container:s},b.createElement(Jl,{"cmdk-overlay":"",className:o}),b.createElement(Kl,{"aria-label":e.label,"cmdk-dialog":"",className:i},b.createElement(kM,{ref:t,...a}))))}),d8=b.forwardRef((e,t)=>fi(n=>n.filtered.count===0)?b.createElement(_n.div,{ref:t,...e,"cmdk-empty":"",role:"presentation"}):null),f8=b.forwardRef((e,t)=>{let{progress:n,children:r,label:o="Loading...",...i}=e;return b.createElement(_n.div,{ref:t,...i,"cmdk-loading":"",role:"progressbar","aria-valuenow":n,"aria-valuemin":0,"aria-valuemax":100,"aria-label":o},Ef(e,s=>b.createElement("div",{"aria-hidden":!0},s)))}),ms=Object.assign(kM,{List:u8,Item:i8,Input:l8,Group:s8,Separator:a8,Dialog:c8,Empty:d8,Loading:f8});function p8(e,t){let n=e.nextElementSibling;for(;n;){if(n.matches(t))return n;n=n.nextElementSibling}}function h8(e,t){let n=e.previousElementSibling;for(;n;){if(n.matches(t))return n;n=n.previousElementSibling}}function jM(e){let t=b.useRef(e);return es(()=>{t.current=e}),t}var es=typeof window>"u"?b.useEffect:b.useLayoutEffect;function js(e){let t=b.useRef();return t.current===void 0&&(t.current=e()),t}function fi(e){let t=C0(),n=()=>e(t.snapshot());return b.useSyncExternalStore(t.subscribe,n,n)}function LM(e,t,n,r=[]){let o=b.useRef(),i=hu();return es(()=>{var s;let a=(()=>{var u;for(let c of n){if(typeof c=="string")return c.trim();if(typeof c=="object"&&"current"in c)return c.current?(u=c.current.textContent)==null?void 0:u.trim():o.current}})(),l=r.map(u=>u.trim());i.value(e,a,l),(s=t.current)==null||s.setAttribute(ks,a),o.current=a}),o}var g8=()=>{let[e,t]=b.useState(),n=js(()=>new Map);return es(()=>{n.current.forEach(r=>r()),n.current=new Map},[e]),(r,o)=>{n.current.set(r,o),t({})}};function m8(e){let t=e.type;return typeof t=="function"?t(e.props):"render"in t?t.render(e.props):e}function Ef({asChild:e,children:t},n){return e&&b.isValidElement(t)?b.cloneElement(m8(t),{ref:t.ref},n(t.props.children)):n(t)}var b8={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};function S0({...e}){return h.jsx(Xl,{"data-slot":"dialog",...e})}function FM({...e}){return h.jsx(jd,{"data-slot":"dialog-trigger",...e})}function BM({...e}){return h.jsx(Zl,{"data-slot":"dialog-portal",...e})}function v8({...e}){return h.jsx(ds,{"data-slot":"dialog-close",...e})}function VM({className:e,...t}){return h.jsx(Jl,{"data-slot":"dialog-overlay",className:F("ui:data-[state=open]:animate-in ui:data-[state=closed]:animate-out ui:data-[state=closed]:fade-out-0 ui:data-[state=open]:fade-in-0 ui:fixed ui:inset-0 ui:z-50 ui:bg-black/50",e),...t})}function E0({className:e,children:t,showCloseButton:n=!0,overlayClassName:r,...o}){return h.jsxs(BM,{"data-slot":"dialog-portal",children:[h.jsx(VM,{className:r}),h.jsxs(Kl,{"data-slot":"dialog-content",className:F("ui:bg-background ui:data-[state=open]:animate-in ui:data-[state=closed]:animate-out ui:data-[state=closed]:fade-out-0 ui:data-[state=open]:fade-in-0 ui:data-[state=closed]:zoom-out-95 ui:data-[state=open]:zoom-in-95 ui:fixed ui:top-[50%] ui:left-[50%] ui:z-50 ui:grid ui:w-full ui:max-w-[calc(100%-2rem)] ui:translate-x-[-50%] ui:translate-y-[-50%] ui:gap-4 ui:rounded-lg ui:border ui:p-6 ui:shadow-lg ui:duration-200 ui:outline-none ui:sm:max-w-lg",e),...o,children:[t,n&&h.jsxs(ds,{"data-slot":"dialog-close",className:"ui:ring-offset-background ui:focus:ring-ring ui:data-[state=open]:bg-accent ui:data-[state=open]:text-muted-foreground ui:absolute ui:top-4 ui:right-4 ui:rounded-xs ui:opacity-70 ui:transition-opacity ui:hover:opacity-100 ui:focus:ring-2 ui:focus:ring-offset-2 ui:focus:outline-hidden ui:disabled:pointer-events-none ui:[&_svg]:pointer-events-none ui:[&_svg]:shrink-0 ui:[&_svg:not([class*='size-'])]:size-4",children:[h.jsx(_e.XIcon,{}),h.jsx("span",{className:"ui:sr-only",children:"Close"})]})]})]})}function I0({className:e,...t}){return h.jsx("div",{"data-slot":"dialog-header",className:F("ui:flex ui:flex-col ui:gap-2 ui:text-center ui:sm:text-left",e),...t})}function y8({className:e,...t}){return h.jsx("div",{"data-slot":"dialog-footer",className:F("ui:flex ui:flex-col-reverse ui:gap-2 ui:sm:flex-row ui:sm:justify-end",e),...t})}function R0({className:e,...t}){return h.jsx(Ld,{"data-slot":"dialog-title",className:F("ui:text-lg ui:leading-none ui:font-semibold",e),...t})}function $M({className:e,...t}){return h.jsx(Fd,{"data-slot":"dialog-description",className:F("ui:text-muted-foreground ui:text-sm",e),...t})}function GM({className:e,...t}){return h.jsx(ms,{shouldFilter:!1,"data-slot":"command",className:F("ui:bg-popover ui:text-popover-foreground ui:flex ui:h-full ui:w-full ui:flex-col ui:overflow-hidden ui:rounded-md",e),...t})}function x8({title:e="Command Palette",description:t="Search for a command to run...",children:n,className:r,showCloseButton:o=!0,...i}){return h.jsxs(S0,{...i,children:[h.jsxs(I0,{className:"ui:sr-only",children:[h.jsx(R0,{children:e}),h.jsx($M,{children:t})]}),h.jsx(E0,{className:F("ui:overflow-hidden ui:p-0",r),showCloseButton:o,children:h.jsx(GM,{className:"ui:[&_[cmdk-group-heading]]:text-muted-foreground ui:**:data-[slot=command-input-wrapper]:h-12 ui:[&_[cmdk-group-heading]]:px-2 ui:[&_[cmdk-group-heading]]:font-medium ui:[&_[cmdk-group]]:px-2 ui:[&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 ui:[&_[cmdk-input-wrapper]_svg]:h-5 ui:[&_[cmdk-input-wrapper]_svg]:w-5 ui:[&_[cmdk-input]]:h-12 ui:[&_[cmdk-item]]:px-2 ui:[&_[cmdk-item]]:py-3 ui:[&_[cmdk-item]_svg]:h-5 ui:[&_[cmdk-item]_svg]:w-5",children:n})})]})}function w8({containerClassName:e,className:t,...n}){return h.jsxs("div",{"data-slot":"command-input-wrapper",className:F("ui:flex ui:h-9 ui:items-center ui:gap-2 ui:border-b ui:px-3",e),children:[h.jsx(_e.SearchIcon,{className:"ui:size-4 ui:shrink-0 ui:opacity-50"}),h.jsx(ms.Input,{"data-slot":"command-input",className:F("ui:placeholder:text-muted-foreground ui:flex ui:h-10 ui:w-full ui:rounded-md ui:bg-transparent ui:py-3 ui:text-sm ui:outline-hidden ui:disabled:cursor-not-allowed ui:disabled:opacity-50",t),...n})]})}function C8({className:e,...t}){return h.jsx(ms.List,{"data-slot":"command-list",className:F("ui:max-h-[300px] ui:scroll-py-1 ui:overflow-x-hidden ui:overflow-y-auto",e),...t})}function S8({...e}){return h.jsx(ms.Empty,{"data-slot":"command-empty",className:"ui:py-6 ui:text-center ui:text-sm",...e})}function E8({className:e,...t}){return h.jsx(ms.Group,{"data-slot":"command-group",className:F("ui:text-foreground ui:[&_[cmdk-group-heading]]:text-muted-foreground ui:overflow-hidden ui:p-1 ui:[&_[cmdk-group-heading]]:px-2 ui:[&_[cmdk-group-heading]]:py-1.5 ui:[&_[cmdk-group-heading]]:text-xs ui:[&_[cmdk-group-heading]]:font-medium",e),...t})}function I8({className:e,...t}){return h.jsx(ms.Separator,{"data-slot":"command-separator",className:F("ui:bg-border ui:-mx-1 ui:h-px",e),...t})}function R8({className:e,...t}){return h.jsx(ms.Item,{"data-slot":"command-item",className:F("ui:data-[selected=true]:bg-accent ui:data-[selected=true]:text-accent-foreground ui:[&_svg:not([class*='text-'])]:text-muted-foreground ui:relative ui:flex ui:cursor-default ui:items-center ui:gap-2 ui:rounded-sm ui:px-2 ui:py-1.5 ui:text-sm ui:outline-hidden ui:select-none ui:data-[disabled=true]:pointer-events-none ui:data-[disabled=true]:opacity-50 ui:[&_svg]:pointer-events-none ui:[&_svg]:shrink-0 ui:[&_svg:not([class*='size-'])]:size-4",e),...t})}function A8({className:e,...t}){return h.jsx("span",{"data-slot":"command-shortcut",className:F("ui:text-muted-foreground ui:ml-auto ui:text-xs ui:tracking-widest",e),...t})}const HM=({title:e,className:t,titleClassName:n,header:r="",children:o})=>h.jsxs("div",{className:F("ui:bg-white ui:border ui:border-gray-200 ui:rounded-lg ui:shadow",e?"ui:p-4 ui:mt-4":"ui:p-2 ui:items-center",t),children:[r,!r&&e&&h.jsx("h3",{className:F("ui:text-xl ui:text-black-900 ui:font-semibold",n),children:e}),o]}),T8=({onCreate:e,onDelete:t,showCreate:n=!0,className:r})=>h.jsxs("div",{className:F("ui:h-full ui:mt-6 ui:flex ui:gap-2",r),children:[h.jsxs(_r,{children:[h.jsx(rn,{condition:n,children:h.jsx(_e.PlusCircle,{color:"green",size:20,onClick:e,className:"ui:cursor-pointer ui:h-full"})}),h.jsx(Ki,{children:h.jsx("div",{className:"ui:size-5"})})]}),h.jsx(_e.CircleX,{color:"red",size:20,onClick:t,className:"ui:cursor-pointer ui:h-full"})]});var O8="Label",WM=b.forwardRef((e,t)=>h.jsx(_n.label,{...e,ref:t,onMouseDown:n=>{n.target.closest("button, input, select, textarea")||(e.onMouseDown?.(n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));WM.displayName=O8;var N8=WM;function gr({className:e,variant:t="default",...n}){return h.jsx(N8,{"data-slot":"label",className:F(l9({variant:t}),e),...n})}function If({description:e,className:t}){return h.jsx("p",{className:F("ui:text-gray-500 ui:text-xs ui:mt-1",t),children:e})}const zM=({label:e,name:t,description:n,onCheckedChange:r,...o})=>h.jsxs("article",{children:[h.jsxs("div",{className:"ui:flex ui:items-center ui:gap-2",children:[h.jsx(OM,{...o,id:t,onCheckedChange:r}),h.jsx(gr,{htmlFor:t,children:e})]}),n&&h.jsx(If,{description:n})]});function Rm({controlled:e,default:t,name:n,state:r="value"}){const{current:o}=b.useRef(e!==void 0),[i,s]=b.useState(t),a=o?e:i;if(process.env.NODE_ENV!=="production"){b.useEffect(()=>{o!==(e!==void 0)&&console.error([`Base UI: A component is changing the ${o?"":"un"}controlled ${r} state of ${n} to be ${o?"un":""}controlled.`,"Elements should not switch from uncontrolled to controlled (or vice versa).",`Decide between using a controlled or uncontrolled ${n} element for the lifetime of the component.`,"The nature of the state is determined during the first render. It's considered controlled if the value is not `undefined`.","More info: https://fb.me/react-controlled-components"].join(`
|
|
67
67
|
`))},[r,n,e]);const{current:u}=b.useRef(t);b.useEffect(()=>{!o&&JSON.stringify(u)!==JSON.stringify(t)&&console.error([`Base UI: A component is changing the default ${r} state of an uncontrolled ${n} after being initialized. To suppress this warning opt to use a controlled ${n}.`].join(`
|
|
68
68
|
`))},[JSON.stringify(t)])}const l=b.useCallback(u=>{o||s(u)},[]);return[a,l]}const EE={};function cr(e,t){const n=b.useRef(EE);return n.current===EE&&(n.current=e(t)),n}const Am=b[`useInsertionEffect${Math.random().toFixed(1)}`.slice(0,-3)],P8=Am&&Am!==b.useLayoutEffect?Am:e=>e();function ke(e){const t=cr(_8).current;return t.next=e,P8(t.effect),t.trampoline}function _8(){const e={next:void 0,callback:M8,trampoline:(...t)=>e.callback?.(...t),effect:()=>{e.callback=e.next}};return e}function M8(){if(process.env.NODE_ENV!=="production")throw new Error("Base UI: Cannot call an event handler while rendering.")}const D8=()=>{},Ge=typeof document<"u"?b.useLayoutEffect:D8,A0=b.createContext({register:()=>{},unregister:()=>{},subscribeMapChange:()=>()=>{},elementsRef:{current:[]},nextIndexRef:{current:0}});process.env.NODE_ENV!=="production"&&(A0.displayName="CompositeListContext");function k8(){return b.useContext(A0)}function qM(e){const{children:t,elementsRef:n,labelsRef:r,onMapChange:o}=e,i=ke(o),s=b.useRef(0),a=cr(L8).current,l=cr(j8).current,[u,c]=b.useState(0),d=b.useRef(u),f=ke((y,x)=>{l.set(y,x??null),d.current+=1,c(d.current)}),p=ke(y=>{l.delete(y),d.current+=1,c(d.current)}),g=b.useMemo(()=>{const y=new Map;return Array.from(l.keys()).filter(w=>w.isConnected).sort(F8).forEach((w,C)=>{const S=l.get(w)??{};y.set(w,{...S,index:C})}),y},[l,u]);Ge(()=>{if(typeof MutationObserver!="function"||g.size===0)return;const y=new MutationObserver(x=>{const w=new Set,C=S=>w.has(S)?w.delete(S):w.add(S);x.forEach(S=>{S.removedNodes.forEach(C),S.addedNodes.forEach(C)}),w.size===0&&(d.current+=1,c(d.current))});return g.forEach((x,w)=>{w.parentElement&&y.observe(w.parentElement,{childList:!0})}),()=>{y.disconnect()}},[g]),Ge(()=>{d.current===u&&(n.current.length!==g.size&&(n.current.length=g.size),r&&r.current.length!==g.size&&(r.current.length=g.size),s.current=g.size),i(g)},[i,g,n,r,u]),Ge(()=>()=>{n.current=[]},[n]),Ge(()=>()=>{r&&(r.current=[])},[r]);const m=ke(y=>(a.add(y),()=>{a.delete(y)}));Ge(()=>{a.forEach(y=>y(g))},[a,g]);const v=b.useMemo(()=>({register:f,unregister:p,subscribeMapChange:m,elementsRef:n,labelsRef:r,nextIndexRef:s}),[f,p,m,n,r,s]);return h.jsx(A0.Provider,{value:v,children:t})}function j8(){return new Map}function L8(){return new Set}function F8(e,t){const n=e.compareDocumentPosition(t);return n&Node.DOCUMENT_POSITION_FOLLOWING||n&Node.DOCUMENT_POSITION_CONTAINED_BY?-1:n&Node.DOCUMENT_POSITION_PRECEDING||n&Node.DOCUMENT_POSITION_CONTAINS?1:0}const UM=b.createContext(void 0);process.env.NODE_ENV!=="production"&&(UM.displayName="DirectionContext");function YM(){return b.useContext(UM)?.direction??"ltr"}function Fr(e,...t){const n=new URL("https://base-ui.com/production-error");return n.searchParams.set("code",e.toString()),t.forEach(r=>n.searchParams.append("args[]",r)),`Base UI error #${e}; visit ${n} for the full message.`}function Ml(e,t,n,r){const o=cr(XM).current;return V8(o,e,t,n,r)&&ZM(o,[e,t,n,r]),o.callback}function B8(e){const t=cr(XM).current;return $8(t,e)&&ZM(t,e),t.callback}function XM(){return{callback:null,cleanup:null,refs:[]}}function V8(e,t,n,r,o){return e.refs[0]!==t||e.refs[1]!==n||e.refs[2]!==r||e.refs[3]!==o}function $8(e,t){return e.refs.length!==t.length||e.refs.some((n,r)=>n!==t[r])}function ZM(e,t){if(e.refs=t,t.every(n=>n==null)){e.callback=null;return}e.callback=n=>{if(e.cleanup&&(e.cleanup(),e.cleanup=null),n!=null){const r=Array(t.length).fill(null);for(let o=0;o<t.length;o+=1){const i=t[o];if(i!=null)switch(typeof i){case"function":{const s=i(n);typeof s=="function"&&(r[o]=s);break}case"object":{i.current=n;break}}}e.cleanup=()=>{for(let o=0;o<t.length;o+=1){const i=t[o];if(i!=null)switch(typeof i){case"function":{const s=r[o];typeof s=="function"?s():i(null);break}case"object":{i.current=null;break}}}}}}}const G8=parseInt(b.version,10);function T0(e){return G8>=e}function IE(e){if(!b.isValidElement(e))return null;const t=e,n=t.props;return(T0(19)?n?.ref:t.ref)??null}function ov(e,t){if(e&&!t)return e;if(!e&&t)return t;if(e||t)return{...e,...t}}function H8(e,t){const n={};for(const r in e){const o=e[r];if(t?.hasOwnProperty(r)){const i=t[r](o);i!=null&&Object.assign(n,i);continue}o===!0?n[`data-${r.toLowerCase()}`]="":o&&(n[`data-${r.toLowerCase()}`]=o.toString())}return n}function W8(e,t){return typeof e=="function"?e(t):e}function z8(e,t){return typeof e=="function"?e(t):e}const cl={};function JM(e,t,n,r,o){let i={...iv(e,cl)};return t&&(i=Tc(i,t)),n&&(i=Tc(i,n)),r&&(i=Tc(i,r)),i}function q8(e){if(e.length===0)return cl;if(e.length===1)return iv(e[0],cl);let t={...iv(e[0],cl)};for(let n=1;n<e.length;n+=1)t=Tc(t,e[n]);return t}function Tc(e,t){return KM(t)?t(e):U8(e,t)}function U8(e,t){if(!t)return e;for(const n in t){const r=t[n];switch(n){case"style":{e[n]=ov(e.style,r);break}case"className":{e[n]=QM(e.className,r);break}default:Y8(n,r)?e[n]=X8(e[n],r):e[n]=r}}return e}function Y8(e,t){const n=e.charCodeAt(0),r=e.charCodeAt(1),o=e.charCodeAt(2);return n===111&&r===110&&o>=65&&o<=90&&(typeof t=="function"||typeof t>"u")}function KM(e){return typeof e=="function"}function iv(e,t){return KM(e)?e(t):e??cl}function X8(e,t){return t?e?n=>{if(Z8(n)){const o=n;sv(o);const i=t(o);return o.baseUIHandlerPrevented||e?.(o),i}const r=t(n);return e?.(n),r}:t:e}function sv(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function QM(e,t){return t?e?t+" "+e:t:e}function Z8(e){return e!=null&&typeof e=="object"&&"nativeEvent"in e}function Lt(){}const Yu=Object.freeze([]),En=Object.freeze({}),J8={style:{transition:"none"}},K8="data-base-ui-click-trigger",Q8={fallbackAxisSide:"none"},e7={clipPath:"inset(50%)",position:"fixed",top:0,left:0};function Mn(e,t,n={}){const r=t.render,o=t7(t,n);if(n.enabled===!1)return null;const i=n.state??En;return r7(e,r,o,i)}function t7(e,t={}){const{className:n,style:r,render:o}=e,{state:i=En,ref:s,props:a,stateAttributesMapping:l,enabled:u=!0}=t,c=u?W8(n,i):void 0,d=u?z8(r,i):void 0,f=u?H8(i,l):En,p=u?ov(f,Array.isArray(a)?q8(a):a)??En:En;return typeof document<"u"&&(u?Array.isArray(s)?p.ref=B8([p.ref,IE(o),...s]):p.ref=Ml(p.ref,IE(o),s):Ml(null,null)),u?(c!==void 0&&(p.className=QM(p.className,c)),d!==void 0&&(p.style=ov(p.style,d)),p):En}const n7=Symbol.for("react.lazy");function r7(e,t,n,r){if(t){if(typeof t=="function")return t(n,r);const o=JM(n,t.props);o.ref=n.ref;let i=t;if(i?.$$typeof===n7&&(i=b.Children.toArray(t)[0]),process.env.NODE_ENV!=="production"&&!b.isValidElement(i))throw new Error(["Base UI: The `render` prop was provided an invalid React element as `React.isValidElement(render)` is `false`.","A valid React element must be provided to the `render` prop because it is cloned with props to replace the default element.","https://base-ui.com/r/invalid-render-prop"].join(`
|
|
69
69
|
`));return b.cloneElement(i,o)}if(e&&typeof e=="string")return o7(e,n);throw new Error(process.env.NODE_ENV!=="production"?"Base UI: Render element or function are not defined.":Fr(8))}function o7(e,t){return e==="button"?N.createElement("button",{type:"button",...t,key:t.key}):e==="img"?N.createElement("img",{alt:"",...t,key:t.key}):b.createElement(e,t)}const er="none",av="trigger-press",i7="trigger-hover",O0="outside-press",s7="item-press",RE="clear-press",a7="chip-remove-press",Hs="input-change",ei="input-clear",l7="input-press",Rf="focus-out",eD="escape-key",dl="list-navigation";function Qe(e,t,n,r){let o=!1,i=!1;const s=En;return{reason:e,event:t??new Event("base-ui"),cancel(){o=!0},allowPropagation(){i=!0},get isCanceled(){return o},get isPropagationAllowed(){return i},trigger:n,...s}}function Ba(e,t,n){const r=n??En;return{reason:e,event:t??new Event("base-ui"),...r}}const lv={...b};let AE=0;function u7(e,t="mui"){const[n,r]=b.useState(e),o=e||n;return b.useEffect(()=>{n==null&&(AE+=1,r(`${t}-${AE}`))},[n,t]),o}const TE=lv.useId;function N0(e,t){if(TE!==void 0){const n=TE();return e??(t?`${t}-${n}`:n)}return u7(e,t)}function tD(e){return N0(e,"base-ui")}const c7=[];function nD(e){b.useEffect(e,c7)}const Xu=null;let OE=globalThis.requestAnimationFrame;class d7{callbacks=[];callbacksCount=0;nextId=1;startId=1;isScheduled=!1;tick=t=>{this.isScheduled=!1;const n=this.callbacks,r=this.callbacksCount;if(this.callbacks=[],this.callbacksCount=0,this.startId=this.nextId,r>0)for(let o=0;o<n.length;o+=1)n[o]?.(t)};request(t){const n=this.nextId;this.nextId+=1,this.callbacks.push(t),this.callbacksCount+=1;const r=process.env.NODE_ENV!=="production"&&OE!==requestAnimationFrame&&(OE=requestAnimationFrame,!0);return(!this.isScheduled||r)&&(requestAnimationFrame(this.tick),this.isScheduled=!0),n}cancel(t){const n=t-this.startId;n<0||n>=this.callbacks.length||(this.callbacks[n]=null,this.callbacksCount-=1)}}const Zu=new d7;class Yr{static create(){return new Yr}static request(t){return Zu.request(t)}static cancel(t){return Zu.cancel(t)}currentId=Xu;request(t){this.cancel(),this.currentId=Zu.request(()=>{this.currentId=Xu,t()})}cancel=()=>{this.currentId!==Xu&&(Zu.cancel(this.currentId),this.currentId=Xu)};disposeEffect=()=>this.cancel}function P0(){const e=cr(Yr.create).current;return nD(e.disposeEffect),e}function Io(e){return e==null?e:"current"in e?e.current:e}let Dl=(function(e){return e.startingStyle="data-starting-style",e.endingStyle="data-ending-style",e})({});const f7={[Dl.startingStyle]:""},p7={[Dl.endingStyle]:""},_0={transitionStatus(e){return e==="starting"?f7:e==="ending"?p7:null}};function h7(e,t=!1,n=!0){const r=P0();return ke((o,i=null)=>{r.cancel();function s(){so.flushSync(o)}const a=Io(e);if(a==null)return;const l=a;if(typeof l.getAnimations!="function"||globalThis.BASE_UI_ANIMATIONS_DISABLED)o();else{let u=function(){const d=Dl.startingStyle;if(!l.hasAttribute(d)){r.request(c);return}const f=new MutationObserver(()=>{l.hasAttribute(d)||(f.disconnect(),c())});f.observe(l,{attributes:!0,attributeFilter:[d]}),i?.addEventListener("abort",()=>f.disconnect(),{once:!0})},c=function(){Promise.all(l.getAnimations().map(d=>d.finished)).then(()=>{i?.aborted||s()}).catch(()=>{const d=l.getAnimations();if(n){if(i?.aborted)return;s()}else d.length>0&&d.some(f=>f.pending||f.playState!=="finished")&&c()})};if(t){u();return}r.request(c)}})}function M0(e,t=!1,n=!1){const[r,o]=b.useState(e&&t?"idle":void 0),[i,s]=b.useState(e);return e&&!i&&(s(!0),o("starting")),!e&&i&&r!=="ending"&&!n&&o("ending"),!e&&!i&&r==="ending"&&o(void 0),Ge(()=>{if(!e&&i&&r!=="ending"&&n){const a=Yr.request(()=>{o("ending")});return()=>{Yr.cancel(a)}}},[e,i,r,n]),Ge(()=>{if(!e||t)return;const a=Yr.request(()=>{o(void 0)});return()=>{Yr.cancel(a)}},[t,e]),Ge(()=>{if(!e||!t)return;e&&i&&r!=="idle"&&o("starting");const a=Yr.request(()=>{o("idle")});return()=>{Yr.cancel(a)}},[t,e,i,o,r]),b.useMemo(()=>({mounted:i,setMounted:s,transitionStatus:r}),[i,r])}let rD=(function(e){return e[e.None=0]="None",e[e.GuessFromOrder=1]="GuessFromOrder",e})({});function oD(e={}){const{label:t,metadata:n,textRef:r,indexGuessBehavior:o,index:i}=e,{register:s,unregister:a,subscribeMapChange:l,elementsRef:u,labelsRef:c,nextIndexRef:d}=k8(),f=b.useRef(-1),[p,g]=b.useState(i??(o===rD.GuessFromOrder?()=>{if(f.current===-1){const y=d.current;d.current+=1,f.current=y}return f.current}:-1)),m=b.useRef(null),v=b.useCallback(y=>{if(m.current=y,p!==-1&&y!==null&&(u.current[p]=y,c)){const x=t!==void 0;c.current[p]=x?t:r?.current?.textContent??y.textContent}},[p,u,c,t,r]);return Ge(()=>{if(i!=null)return;const y=m.current;if(y)return s(y,n),()=>{a(y)}},[i,s,a,n]),Ge(()=>{if(i==null)return l(y=>{const x=m.current?y.get(m.current)?.index:null;x!=null&&g(x)})},[i,l,g]),b.useMemo(()=>({ref:v,index:p}),[p,v])}let uv;process.env.NODE_ENV!=="production"&&(uv=new Set);function NE(...e){if(process.env.NODE_ENV!=="production"){const t=e.join(" ");uv.has(t)||(uv.add(t),console.error(`Base UI: ${t}`))}}const iD=b.createContext(void 0);process.env.NODE_ENV!=="production"&&(iD.displayName="CompositeRootContext");function g7(e=!1){const t=b.useContext(iD);if(t===void 0&&!e)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: CompositeRootContext is missing. Composite parts must be placed within <Composite.Root>.":Fr(16));return t}function m7(e){const{focusableWhenDisabled:t,disabled:n,composite:r=!1,tabIndex:o=0,isNativeButton:i}=e,s=r&&t!==!1,a=r&&t===!1;return{props:b.useMemo(()=>{const u={onKeyDown(c){n&&t&&c.key!=="Tab"&&c.preventDefault()}};return r||(u.tabIndex=o,!i&&n&&(u.tabIndex=t?o:-1)),(i&&(t||s)||!i&&n)&&(u["aria-disabled"]=n),i&&(!t||a)&&(u.disabled=n),u},[r,n,t,s,a,i,o])}}function Af(e={}){const{disabled:t=!1,focusableWhenDisabled:n,tabIndex:r=0,native:o=!0}=e,i=b.useRef(null),s=g7(!0)!==void 0,a=ke(()=>{const f=i.current;return!!(f?.tagName==="A"&&f?.href)}),{props:l}=m7({focusableWhenDisabled:n,disabled:t,composite:s,tabIndex:r,isNativeButton:o});process.env.NODE_ENV!=="production"&&b.useEffect(()=>{if(!i.current)return;const f=i.current.tagName==="BUTTON";if(o){if(!f){const p=lv.captureOwnerStack?.()||"";NE(`A component that acts as a button expected a native <button> because the \`nativeButton\` prop is true. Rendering a non-<button> removes native button semantics, which can impact forms and accessibility. Use a real <button> in the \`render\` prop, or set \`nativeButton\` to \`false\`.${p}`)}}else if(f){const p=lv.captureOwnerStack?.()||"";NE(`A component that acts as a button expected a non-<button> because the \`nativeButton\` prop is false. Rendering a <button> keeps native behavior while Base UI applies non-native attributes and handlers, which can add unintended extra attributes (such as \`role\` or \`aria-disabled\`). Use a non-<button> in the \`render\` prop, or set \`nativeButton\` to \`true\`.${p}`)}},[o]);const u=b.useCallback(()=>{const f=i.current;b7(f)&&s&&t&&l.disabled===void 0&&f.disabled&&(f.disabled=!1)},[t,l.disabled,s]);Ge(u,[u]);const c=b.useCallback((f={})=>{const{onClick:p,onMouseDown:g,onKeyUp:m,onKeyDown:v,onPointerDown:y,...x}=f;return JM({type:o?"button":void 0,onClick(C){if(t){C.preventDefault();return}p?.(C)},onMouseDown(C){t||g?.(C)},onKeyDown(C){if(t||(sv(C),v?.(C)),C.baseUIHandlerPrevented)return;const S=C.target===C.currentTarget&&!o&&!a()&&!t,R=C.key==="Enter",I=C.key===" ";S&&((I||R)&&C.preventDefault(),R&&p?.(C))},onKeyUp(C){t||(sv(C),m?.(C)),!C.baseUIHandlerPrevented&&C.target===C.currentTarget&&!o&&!t&&C.key===" "&&p?.(C)},onPointerDown(C){if(t){C.preventDefault();return}y?.(C)}},o?void 0:{role:"button"},l,x)},[t,l,o,a]),d=ke(f=>{i.current=f,u()});return{getButtonProps:c,buttonRef:d}}function b7(e){return Wt(e)&&e.tagName==="BUTTON"}const bs=typeof navigator<"u",Tm=x7(),sD=C7(),D0=w7(),aD=typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter:none"),lD=Tm.platform==="MacIntel"&&Tm.maxTouchPoints>1?!0:/iP(hone|ad|od)|iOS/.test(Tm.platform),PE=bs&&/firefox/i.test(D0),v7=bs&&/apple/i.test(navigator.vendor),ld=bs&&/android/i.test(sD)||/android/i.test(D0);bs&&sD.toLowerCase().startsWith("mac")&&navigator.maxTouchPoints;const y7=D0.includes("jsdom/");function x7(){if(!bs)return{platform:"",maxTouchPoints:-1};const e=navigator.userAgentData;return e?.platform?{platform:e.platform,maxTouchPoints:navigator.maxTouchPoints}:{platform:navigator.platform??"",maxTouchPoints:navigator.maxTouchPoints??-1}}function w7(){if(!bs)return"";const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(({brand:t,version:n})=>`${t}/${n}`).join(" "):navigator.userAgent}function C7(){if(!bs)return"";const e=navigator.userAgentData;return e?.platform?e.platform:navigator.platform??""}const cv="data-base-ui-focusable",uD="active",cD="selected",S7="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])",ai="ArrowLeft",li="ArrowRight",k0="ArrowUp",gu="ArrowDown";function Ao(e){let t=e.activeElement;for(;t?.shadowRoot?.activeElement!=null;)t=t.shadowRoot.activeElement;return t}function ft(e,t){if(!e||!t)return!1;const n=t.getRootNode?.();if(e.contains(t))return!0;if(n&&Eb(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function Nn(e){return"composedPath"in e?e.composedPath()[0]:e.target}function wr(e,t){if(t==null)return!1;if("composedPath"in e)return e.composedPath().includes(t);const n=e;return n.target!=null&&t.contains(n.target)}function E7(e){return e.matches("html,body")}function j0(e){return Wt(e)&&e.matches(S7)}function dv(e){return e?e.getAttribute("role")==="combobox"&&j0(e):!1}function fv(e){return e?e.hasAttribute(cv)?e:e.querySelector(`[${cv}]`)||e:null}function Ys(e,t,n=!0){return e.filter(o=>o.parentId===t&&(!n||o.context?.open)).flatMap(o=>[o,...Ys(e,o.id,n)])}function _E(e,t){let n=[],r=e.find(o=>o.id===t)?.parentId;for(;r;){const o=e.find(i=>i.id===r);r=o?.parentId,o&&(n=n.concat(o))}return n}function Tt(e){e.preventDefault(),e.stopPropagation()}function I7(e){return"nativeEvent"in e}function dD(e){return e.pointerType===""&&e.isTrusted?!0:ld&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function fD(e){return y7?!1:!ld&&e.width===0&&e.height===0||ld&&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 ME(e,t){return["mouse","pen"].includes(e)}function pD(e){const t=e.type;return t==="click"||t==="mousedown"||t==="keydown"||t==="keyup"}function Ju(e,t,n){return Math.floor(e/t)!==n}function fl(e,t){return t<0||t>=e.current.length}function Om(e,t){return vn(e,{disabledIndices:t})}function DE(e,t){return vn(e,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function vn(e,{startingIndex:t=-1,decrement:n=!1,disabledIndices:r,amount:o=1}={}){let i=t;do i+=n?-o:o;while(i>=0&&i<=e.current.length-1&&pl(e,i,r));return i}function R7(e,{event:t,orientation:n,loopFocus:r,rtl:o,cols:i,disabledIndices:s,minIndex:a,maxIndex:l,prevIndex:u,stopEvent:c=!1}){let d=u;const f=[],p={};let g=!1;{let y=null,x=-1;e.current.forEach((w,C)=>{if(w==null)return;const S=w.closest('[role="row"]');S&&(g=!0),(S!==y||x===-1)&&(y=S,x+=1,f[x]=[]),f[x].push(C),p[C]=x})}const m=g&&f.length>0&&f.some(y=>y.length!==i);function v(y){if(!m||u===-1)return;const x=p[u];if(x==null)return;const w=f[x].indexOf(u);let C=y==="up"?x-1:x+1;r&&(C<0?C=f.length-1:C>=f.length&&(C=0));const S=new Set;for(;C>=0&&C<f.length&&!S.has(C);){S.add(C);const R=f[C];if(R.length===0){C=y==="up"?C-1:C+1;continue}const I=Math.min(w,R.length-1);for(let T=I;T>=0;T-=1){const _=R[T];if(!pl(e,_,s))return _}C=y==="up"?C-1:C+1,r&&(C<0?C=f.length-1:C>=f.length&&(C=0))}}if(t.key===k0){const y=v("up");if(y!==void 0)c&&Tt(t),d=y;else{if(c&&Tt(t),u===-1)d=l;else if(d=vn(e,{startingIndex:d,amount:i,decrement:!0,disabledIndices:s}),r&&(u-i<a||d<0)){const x=u%i,w=l%i,C=l-(w-x);w===x?d=l:d=w>x?C:C-i}fl(e,d)&&(d=u)}}if(t.key===gu){const y=v("down");y!==void 0?(c&&Tt(t),d=y):(c&&Tt(t),u===-1?d=a:(d=vn(e,{startingIndex:u,amount:i,disabledIndices:s}),r&&u+i>l&&(d=vn(e,{startingIndex:u%i-i,amount:i,disabledIndices:s}))),fl(e,d)&&(d=u))}if(n==="both"){const y=Gs(u/i);t.key===(o?ai:li)&&(c&&Tt(t),u%i!==i-1?(d=vn(e,{startingIndex:u,disabledIndices:s}),r&&Ju(d,i,y)&&(d=vn(e,{startingIndex:u-u%i-1,disabledIndices:s}))):r&&(d=vn(e,{startingIndex:u-u%i-1,disabledIndices:s})),Ju(d,i,y)&&(d=u)),t.key===(o?li:ai)&&(c&&Tt(t),u%i!==0?(d=vn(e,{startingIndex:u,decrement:!0,disabledIndices:s}),r&&Ju(d,i,y)&&(d=vn(e,{startingIndex:u+(i-u%i),decrement:!0,disabledIndices:s}))):r&&(d=vn(e,{startingIndex:u+(i-u%i),decrement:!0,disabledIndices:s})),Ju(d,i,y)&&(d=u));const x=Gs(l/i)===y;fl(e,d)&&(r&&x?d=t.key===(o?li:ai)?l:vn(e,{startingIndex:u-u%i-1,disabledIndices:s}):d=u)}return d}function A7(e,t,n){const r=[];let o=0;return e.forEach(({width:i,height:s},a)=>{if(i>t&&process.env.NODE_ENV!=="production")throw new Error(`[Floating UI]: Invalid grid - item width at index ${a} is greater than grid columns`);let l=!1;for(;!l;){const u=[];for(let c=0;c<i;c+=1)for(let d=0;d<s;d+=1)u.push(o+c+d*t);o%t+i<=t&&u.every(c=>r[c]==null)?(u.forEach(c=>{r[c]=a}),l=!0):o+=1}}),[...r]}function T7(e,t,n,r,o){if(e===-1)return-1;const i=n.indexOf(e),s=t[e];switch(o){case"tl":return i;case"tr":return s?i+s.width-1:i;case"bl":return s?i+(s.height-1)*r:i;case"br":return n.lastIndexOf(e);default:return-1}}function O7(e,t){return t.flatMap((n,r)=>e.includes(n)?[r]:[])}function pl(e,t,n){if(typeof n=="function")return n(t);if(n)return n.includes(t);const r=e.current[t];return r?r.hasAttribute("disabled")||r.getAttribute("aria-disabled")==="true":!1}var N7=["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] *)"],ud=N7.join(","),hD=typeof Element>"u",la=hD?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,cd=!hD&&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?.ownerDocument},dd=function(t,n){var r;n===void 0&&(n=!0);var o=t==null||(r=t.getAttribute)===null||r===void 0?void 0:r.call(t,"inert"),i=o===""||o==="true",s=i||n&&t&&(typeof t.closest=="function"?t.closest("[inert]"):dd(t.parentNode));return s},P7=function(t){var n,r=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"contenteditable");return r===""||r==="true"},gD=function(t,n,r){if(dd(t))return[];var o=Array.prototype.slice.apply(t.querySelectorAll(ud));return n&&la.call(t,ud)&&o.unshift(t),o=o.filter(r),o},fd=function(t,n,r){for(var o=[],i=Array.from(t);i.length;){var s=i.shift();if(!dd(s,!1))if(s.tagName==="SLOT"){var a=s.assignedElements(),l=a.length?a:s.children,u=fd(l,!0,r);r.flatten?o.push.apply(o,u):o.push({scopeParent:s,candidates:u})}else{var c=la.call(s,ud);c&&r.filter(s)&&(n||!t.includes(s))&&o.push(s);var d=s.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(s),f=!dd(d,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(s));if(d&&f){var p=fd(d===!0?s.children:d.children,!0,r);r.flatten?o.push.apply(o,p):o.push({scopeParent:s,candidates:p})}else i.unshift.apply(i,s.children)}}return o},mD=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},bD=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||P7(t))&&!mD(t)?0:t.tabIndex},_7=function(t,n){var r=bD(t);return r<0&&n&&!mD(t)?0:r},M7=function(t,n){return t.tabIndex===n.tabIndex?t.documentOrder-n.documentOrder:t.tabIndex-n.tabIndex},vD=function(t){return t.tagName==="INPUT"},D7=function(t){return vD(t)&&t.type==="hidden"},k7=function(t){var n=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(r){return r.tagName==="SUMMARY"});return n},j7=function(t,n){for(var r=0;r<t.length;r++)if(t[r].checked&&t[r].form===n)return t[r]},L7=function(t){if(!t.name)return!0;var n=t.form||cd(t),r=function(a){return n.querySelectorAll('input[type="radio"][name="'+a+'"]')},o;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")o=r(window.CSS.escape(t.name));else try{o=r(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=j7(o,t.form);return!i||i===t},F7=function(t){return vD(t)&&t.type==="radio"},B7=function(t){return F7(t)&&!L7(t)},V7=function(t){var n,r=t&&cd(t),o=(n=r)===null||n===void 0?void 0:n.host,i=!1;if(r&&r!==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 u,c,d;r=cd(o),o=(u=r)===null||u===void 0?void 0:u.host,i=!!((c=o)!==null&&c!==void 0&&(d=c.ownerDocument)!==null&&d!==void 0&&d.contains(o))}}return i},kE=function(t){var n=t.getBoundingClientRect(),r=n.width,o=n.height;return r===0&&o===0},$7=function(t,n){var r=n.displayCheck,o=n.getShadowRoot;if(r==="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=la.call(t,"details>summary:first-of-type"),a=s?t.parentElement:t;if(la.call(a,"details:not([open]) *"))return!0;if(!r||r==="full"||r==="full-native"||r==="legacy-full"){if(typeof o=="function"){for(var l=t;t;){var u=t.parentElement,c=cd(t);if(u&&!u.shadowRoot&&o(u)===!0)return kE(t);t.assignedSlot?t=t.assignedSlot:!u&&c!==t.ownerDocument?t=c.host:t=u}t=l}if(V7(t))return!t.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return kE(t);return!1},G7=function(t){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(t.tagName))for(var n=t.parentElement;n;){if(n.tagName==="FIELDSET"&&n.disabled){for(var r=0;r<n.children.length;r++){var o=n.children.item(r);if(o.tagName==="LEGEND")return la.call(n,"fieldset[disabled] *")?!0:!o.contains(t)}return!0}n=n.parentElement}return!1},pv=function(t,n){return!(n.disabled||D7(n)||$7(n,t)||k7(n)||G7(n))},hv=function(t,n){return!(B7(n)||bD(n)<0||!pv(t,n))},H7=function(t){var n=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},yD=function(t){var n=[],r=[];return t.forEach(function(o,i){var s=!!o.scopeParent,a=s?o.scopeParent:o,l=_7(a,s),u=s?yD(o.candidates):a;l===0?s?n.push.apply(n,u):n.push(a):r.push({documentOrder:i,tabIndex:l,item:o,isScope:s,content:u})}),r.sort(M7).reduce(function(o,i){return i.isScope?o.push.apply(o,i.content):o.push(i.content),o},[]).concat(n)},Tf=function(t,n){n=n||{};var r;return n.getShadowRoot?r=fd([t],n.includeContainer,{filter:hv.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:H7}):r=gD(t,n.includeContainer,hv.bind(null,n)),yD(r)},W7=function(t,n){n=n||{};var r;return n.getShadowRoot?r=fd([t],n.includeContainer,{filter:pv.bind(null,n),flatten:!0,getShadowRoot:n.getShadowRoot}):r=gD(t,n.includeContainer,pv.bind(null,n)),r},xD=function(t,n){if(n=n||{},!t)throw new Error("No node provided");return la.call(t,ud)===!1?!1:hv(n,t)};function Ht(e){return e?.ownerDocument||document}const mu=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function wD(e,t){const n=Tf(e,mu()),r=n.length;if(r===0)return;const o=Ao(Ht(e)),i=n.indexOf(o),s=i===-1?t===1?0:r-1:i+t;return n[s]}function CD(e){return wD(Ht(e).body,1)||e}function SD(e){return wD(Ht(e).body,-1)||e}function hl(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!ft(n,r)}function z7(e){Tf(e,mu()).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function jE(e){e.querySelectorAll("[data-tabindex]").forEach(n=>{const r=n.dataset.tabindex;delete n.dataset.tabindex,r?n.setAttribute("tabindex",r):n.removeAttribute("tabindex")})}function Of(e){const{enabled:t=!0,open:n,ref:r,onComplete:o}=e,i=ke(o),s=h7(r,n,!1);b.useEffect(()=>{if(!t)return;const a=new AbortController;return s(i,a.signal),()=>{a.abort()}},[t,n,i,s])}const Va=0;class ua{static create(){return new ua}currentId=Va;start(t,n){this.clear(),this.currentId=setTimeout(()=>{this.currentId=Va,n()},t)}isStarted(){return this.currentId!==Va}clear=()=>{this.currentId!==Va&&(clearTimeout(this.currentId),this.currentId=Va)};disposeEffect=()=>this.clear}function ts(){const e=cr(ua.create).current;return nD(e.disposeEffect),e}let LE={},FE={},BE="";function q7(e){if(typeof document>"u")return!1;const t=Ht(e);return cn(t).innerWidth-t.documentElement.clientWidth>0}function U7(e){if(!(typeof CSS<"u"&&CSS.supports&&CSS.supports("scrollbar-gutter","stable"))||typeof document>"u")return!1;const n=Ht(e),r=n.documentElement,o=n.body,i=vi(r)?r:o,s=i.style.overflowY,a=r.style.scrollbarGutter;r.style.scrollbarGutter="stable",i.style.overflowY="scroll";const l=i.offsetWidth;i.style.overflowY="hidden";const u=i.offsetWidth;return i.style.overflowY=s,r.style.scrollbarGutter=a,l===u}function Y7(e){const t=Ht(e),n=t.documentElement,r=t.body,o=vi(n)?n:r,i={overflowY:o.style.overflowY,overflowX:o.style.overflowX};return Object.assign(o.style,{overflowY:"hidden",overflowX:"hidden"}),()=>{Object.assign(o.style,i)}}function X7(e){const t=Ht(e),n=t.documentElement,r=t.body,o=cn(n);let i=0,s=0,a=!1;const l=Yr.create();if(aD&&(o.visualViewport?.scale??1)!==1)return()=>{};function u(){const f=o.getComputedStyle(n),p=o.getComputedStyle(r),v=(f.scrollbarGutter||"").includes("both-edges")?"stable both-edges":"stable";i=n.scrollTop,s=n.scrollLeft,LE={scrollbarGutter:n.style.scrollbarGutter,overflowY:n.style.overflowY,overflowX:n.style.overflowX},BE=n.style.scrollBehavior,FE={position:r.style.position,height:r.style.height,width:r.style.width,boxSizing:r.style.boxSizing,overflowY:r.style.overflowY,overflowX:r.style.overflowX,scrollBehavior:r.style.scrollBehavior};const y=n.scrollHeight>n.clientHeight,x=n.scrollWidth>n.clientWidth,w=f.overflowY==="scroll"||p.overflowY==="scroll",C=f.overflowX==="scroll"||p.overflowX==="scroll",S=Math.max(0,o.innerWidth-r.clientWidth),R=Math.max(0,o.innerHeight-r.clientHeight),I=parseFloat(p.marginTop)+parseFloat(p.marginBottom),T=parseFloat(p.marginLeft)+parseFloat(p.marginRight),_=vi(n)?n:r;if(a=U7(e),a){n.style.scrollbarGutter=v,_.style.overflowY="hidden",_.style.overflowX="hidden";return}Object.assign(n.style,{scrollbarGutter:v,overflowY:"hidden",overflowX:"hidden"}),(y||w)&&(n.style.overflowY="scroll"),(x||C)&&(n.style.overflowX="scroll"),Object.assign(r.style,{position:"relative",height:I||R?`calc(100dvh - ${I+R}px)`:"100dvh",width:T||S?`calc(100vw - ${T+S}px)`:"100vw",boxSizing:"border-box",overflow:"hidden",scrollBehavior:"unset"}),r.scrollTop=i,r.scrollLeft=s,n.setAttribute("data-base-ui-scroll-locked",""),n.style.scrollBehavior="unset"}function c(){Object.assign(n.style,LE),Object.assign(r.style,FE),a||(n.scrollTop=i,n.scrollLeft=s,n.removeAttribute("data-base-ui-scroll-locked"),n.style.scrollBehavior=BE)}function d(){c(),l.request(u)}return u(),o.addEventListener("resize",d),()=>{l.cancel(),c(),typeof o.removeEventListener=="function"&&o.removeEventListener("resize",d)}}class Z7{lockCount=0;restore=null;timeoutLock=ua.create();timeoutUnlock=ua.create();acquire(t){return this.lockCount+=1,this.lockCount===1&&this.restore===null&&this.timeoutLock.start(0,()=>this.lock(t)),this.release}release=()=>{this.lockCount-=1,this.lockCount===0&&this.restore&&this.timeoutUnlock.start(0,this.unlock)};unlock=()=>{this.lockCount===0&&this.restore&&(this.restore?.(),this.restore=null)};lock(t){if(this.lockCount===0||this.restore!==null)return;const r=Ht(t).documentElement,o=cn(r).getComputedStyle(r).overflowY;if(o==="hidden"||o==="clip"){this.restore=Lt;return}const i=lD||!q7(t);this.restore=i?Y7(t):X7(t)}}const J7=new Z7;function K7(e=!0,t=null){Ge(()=>{if(e)return J7.acquire(t)},[e,t])}function rr(e){const t=cr(Q7,e).current;return t.next=e,Ge(t.effect),t}function Q7(e){const t={current:e,next:e,effect:()=>{t.current=t.next}};return t}function eZ(){const e=new Map;return{emit(t,n){e.get(t)?.forEach(r=>r(n))},on(t,n){e.has(t)||e.set(t,new Set),e.get(t).add(n)},off(t,n){e.get(t)?.delete(n)}}}const ED=b.createContext(null);process.env.NODE_ENV!=="production"&&(ED.displayName="FloatingNodeContext");const ID=b.createContext(null);process.env.NODE_ENV!=="production"&&(ID.displayName="FloatingTreeContext");const RD=()=>b.useContext(ED)?.id||null,Nf=e=>{const t=b.useContext(ID);return e??t};function pd(e){return`data-base-ui-${e}`}const AD={clipPath:"inset(50%)",overflow:"hidden",whiteSpace:"nowrap",border:0,padding:0,width:1,height:1,margin:-1},L0={...AD,position:"fixed",top:0,left:0},tZ={...AD,position:"absolute"},kl=b.forwardRef(function(t,n){const[r,o]=b.useState();Ge(()=>{v7&&o("button")},[]);const i={tabIndex:0,role:r};return h.jsx("span",{...t,ref:n,style:L0,"aria-hidden":r?void 0:!0,...i,"data-base-ui-focus-guard":""})});process.env.NODE_ENV!=="production"&&(kl.displayName="FocusGuard");let VE=0;function gl(e,t={}){const{preventScroll:n=!1,cancelPrevious:r=!0,sync:o=!1}=t;r&&cancelAnimationFrame(VE);const i=()=>e?.focus({preventScroll:n});o?i():VE=requestAnimationFrame(i)}const Xs={inert:new WeakMap,"aria-hidden":new WeakMap,none:new WeakMap};function $E(e){return e==="inert"?Xs.inert:e==="aria-hidden"?Xs["aria-hidden"]:Xs.none}let Ku=new WeakSet,Qu={},Nm=0;const TD=e=>e&&(e.host||TD(e.parentNode)),nZ=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=TD(n);return e.contains(r)?r:null}).filter(n=>n!=null);function rZ(e,t,n,r){const o="data-base-ui-inert",i=r?"inert":n?"aria-hidden":null,s=nZ(t,e),a=new Set,l=new Set(s),u=[];Qu[o]||(Qu[o]=new WeakMap);const c=Qu[o];s.forEach(d),f(t),a.clear();function d(p){!p||a.has(p)||(a.add(p),p.parentNode&&d(p.parentNode))}function f(p){!p||l.has(p)||[].forEach.call(p.children,g=>{if(bi(g)!=="script")if(a.has(g))f(g);else{const m=i?g.getAttribute(i):null,v=m!==null&&m!=="false",y=$E(i),x=(y.get(g)||0)+1,w=(c.get(g)||0)+1;y.set(g,x),c.set(g,w),u.push(g),x===1&&v&&Ku.add(g),w===1&&g.setAttribute(o,""),!v&&i&&g.setAttribute(i,i==="inert"?"":"true")}})}return Nm+=1,()=>{u.forEach(p=>{const g=$E(i),v=(g.get(p)||0)-1,y=(c.get(p)||0)-1;g.set(p,v),c.set(p,y),v||(!Ku.has(p)&&i&&p.removeAttribute(i),Ku.delete(p)),y||p.removeAttribute(o)}),Nm-=1,Nm||(Xs.inert=new WeakMap,Xs["aria-hidden"]=new WeakMap,Xs.none=new WeakMap,Ku=new WeakSet,Qu={})}}function oZ(e,t=!1,n=!1){const r=Ht(e[0]).body;return rZ(e.concat(Array.from(r.querySelectorAll("[aria-live]"))),r,t,n)}const F0=b.createContext(null);process.env.NODE_ENV!=="production"&&(F0.displayName="PortalContext");const OD=()=>b.useContext(F0),iZ=pd("portal");function sZ(e={}){const{ref:t,container:n,componentProps:r=En,elementProps:o}=e,i=N0(),a=OD()?.portalNode,[l,u]=b.useState(null),[c,d]=b.useState(null),f=ke(v=>{v!==null&&d(v)}),p=b.useRef(null);Ge(()=>{if(n===null){p.current&&(p.current=null,d(null),u(null));return}if(i==null)return;const v=(n&&(xy(n)?n:n.current))??a??document.body;if(v==null){p.current&&(p.current=null,d(null),u(null));return}p.current!==v&&(p.current=v,d(null),u(v))},[n,a,i]);const g=Mn("div",r,{ref:[t,f],props:[{id:i,[iZ]:""},o]});return{portalNode:c,portalSubtree:l&&g?so.createPortal(g,l):null}}const ND=b.forwardRef(function(t,n){const{children:r,container:o,className:i,render:s,renderGuards:a,...l}=t,{portalNode:u,portalSubtree:c}=sZ({container:o,ref:n,componentProps:t,elementProps:l}),d=b.useRef(null),f=b.useRef(null),p=b.useRef(null),g=b.useRef(null),[m,v]=b.useState(null),y=m?.modal,x=m?.open,w=typeof a=="boolean"?a:!!m&&!m.modal&&m.open&&!!u;b.useEffect(()=>{if(!u||y)return;function S(R){u&&R.relatedTarget&&hl(R)&&(R.type==="focusin"?jE:z7)(u)}return u.addEventListener("focusin",S,!0),u.addEventListener("focusout",S,!0),()=>{u.removeEventListener("focusin",S,!0),u.removeEventListener("focusout",S,!0)}},[u,y]),b.useEffect(()=>{!u||x||jE(u)},[x,u]);const C=b.useMemo(()=>({beforeOutsideRef:d,afterOutsideRef:f,beforeInsideRef:p,afterInsideRef:g,portalNode:u,setFocusManagerState:v}),[u]);return h.jsxs(b.Fragment,{children:[c,h.jsxs(F0.Provider,{value:C,children:[w&&u&&h.jsx(kl,{"data-type":"outside",ref:d,onFocus:S=>{if(hl(S,u))p.current?.focus();else{const R=m?m.domReference:null;SD(R)?.focus()}}}),w&&u&&h.jsx("span",{"aria-owns":u.id,style:e7}),u&&so.createPortal(r,u),w&&u&&h.jsx(kl,{"data-type":"outside",ref:f,onFocus:S=>{if(hl(S,u))g.current?.focus();else{const R=m?m.domReference:null;CD(R)?.focus(),m?.closeOnFocusOut&&m?.onOpenChange(!1,Qe(Rf,S.nativeEvent))}}})]})]})});process.env.NODE_ENV!=="production"&&(ND.displayName="FloatingPortal");function aZ(e,t){const n=cn(e.target);return e instanceof n.KeyboardEvent?"keyboard":e instanceof n.FocusEvent?t||"keyboard":"pointerType"in e?e.pointerType||"keyboard":"touches"in e?"touch":e instanceof n.MouseEvent?t||(e.detail===0?"keyboard":"mouse"):""}const GE=20;let ni=[];function B0(){ni=ni.filter(e=>e.deref()?.isConnected)}function lZ(e){B0(),e&&bi(e)!=="body"&&(ni.push(new WeakRef(e)),ni.length>GE&&(ni=ni.slice(-GE)))}function Pm(){return B0(),ni[ni.length-1]?.deref()}function uZ(e){if(!e)return null;const t=mu();return xD(e,t)?e:Tf(e,t)[0]||e}function cZ(e){return!e||!e.isConnected?!1:typeof e.checkVisibility=="function"?e.checkVisibility():Bn(e).display!=="none"}function HE(e,t){if(!t.current.includes("floating")&&!e.getAttribute("role")?.includes("dialog"))return;const n=mu(),o=W7(e,n).filter(s=>{const a=s.getAttribute("data-tabindex")||"";return xD(s,n)||s.hasAttribute("data-tabindex")&&!a.startsWith("-")}),i=e.getAttribute("tabindex");t.current.includes("floating")||o.length===0?i!=="0"&&e.setAttribute("tabindex","0"):(i!=="-1"||e.hasAttribute("data-tabindex")&&e.getAttribute("data-tabindex")!=="-1")&&(e.setAttribute("tabindex","-1"),e.setAttribute("data-tabindex","-1"))}function dZ(e){const{context:t,children:n,disabled:r=!1,initialFocus:o=!0,returnFocus:i=!0,restoreFocus:s=!1,modal:a=!0,closeOnFocusOut:l=!0,openInteractionType:u="",nextFocusableElement:c,previousFocusableElement:d,beforeContentFocusGuardRef:f,externalTree:p}=e,g="rootStore"in t?t.rootStore:t,m=g.useState("open"),v=g.useState("domReferenceElement"),y=g.useState("floatingElement"),{events:x,dataRef:w}=g.context,C=ke(()=>w.current.floatingContext?.nodeId),S=o===!1,R=dv(v)&&S,I=b.useRef(["content"]),T=rr(o),_=rr(i),$=rr(u),A=Nf(p),M=OD(),O=b.useRef(null),B=b.useRef(null),j=b.useRef(!1),D=b.useRef(!1),V=b.useRef(!1),G=b.useRef(-1),z=b.useRef(""),H=b.useRef(""),ne=b.useRef(null),W=b.useRef(null),J=Ml(ne,f,M?.beforeInsideRef),K=Ml(W,M?.afterInsideRef),U=ts(),oe=ts(),X=P0(),te=M!=null,Q=fv(y),se=ke((Z=Q)=>Z?Tf(Z,mu()):[]),ae=ke(Z=>{const k=se(Z);return I.current.map(()=>k).filter(Boolean).flat()});b.useEffect(()=>{if(r||!a)return;function Z(ie){ie.key==="Tab"&&ft(Q,Ao(Ht(Q)))&&se().length===0&&!R&&Tt(ie)}const k=Ht(Q);return k.addEventListener("keydown",Z),()=>{k.removeEventListener("keydown",Z)}},[r,v,Q,a,I,R,se,ae]),b.useEffect(()=>{if(r||!m)return;const Z=Ht(Q);function k(){V.current=!1}function ie(le){const pe=Nn(le),re=ft(y,pe)||ft(v,pe)||ft(M?.portalNode,pe);V.current=!re,H.current=le.pointerType||"keyboard",pe?.closest(`[${K8}]`)&&(D.current=!0)}function Y(){H.current="keyboard"}return Z.addEventListener("pointerdown",ie,!0),Z.addEventListener("pointerup",k,!0),Z.addEventListener("pointercancel",k,!0),Z.addEventListener("keydown",Y,!0),()=>{Z.removeEventListener("pointerdown",ie,!0),Z.removeEventListener("pointerup",k,!0),Z.removeEventListener("pointercancel",k,!0),Z.removeEventListener("keydown",Y,!0)}},[r,y,v,Q,m,M]),b.useEffect(()=>{if(r||!l)return;const Z=Ht(Q);function k(){D.current=!0,oe.start(0,()=>{D.current=!1})}function ie(fe){const de=Nn(fe),we=se().indexOf(de);we!==-1&&(G.current=we)}function Y(fe){const de=fe.relatedTarget,ve=fe.currentTarget,we=Nn(fe);queueMicrotask(()=>{const Se=C(),Ye=g.context.triggerElements,at=de?.hasAttribute(pd("focus-guard"))&&[ne.current,W.current,M?.beforeInsideRef.current,M?.afterInsideRef.current,M?.beforeOutsideRef.current,M?.afterOutsideRef.current,Io(d),Io(c)].includes(de),Xe=!(ft(v,de)||ft(y,de)||ft(de,y)||ft(M?.portalNode,de)||de!=null&&Ye.hasElement(de)||Ye.hasMatchingElement(Ue=>ft(Ue,de))||at||A&&(Ys(A.nodesRef.current,Se).find(Ue=>ft(Ue.context?.elements.floating,de)||ft(Ue.context?.elements.domReference,de))||_E(A.nodesRef.current,Se).find(Ue=>[Ue.context?.elements.floating,fv(Ue.context?.elements.floating)].includes(de)||Ue.context?.elements.domReference===de)));if(ve===v&&Q&&HE(Q,I),s&&ve!==v&&!cZ(we)&&Ao(Z)===Z.body){if(Wt(Q)&&(Q.focus(),s==="popup")){X.request(()=>{Q.focus()});return}const Ue=G.current,rt=se(),et=rt[Ue]||rt[rt.length-1]||Q;Wt(et)&&et.focus()}if(w.current.insideReactTree){w.current.insideReactTree=!1;return}(R||!a)&&de&&Xe&&!D.current&&(R||de!==Pm())&&(j.current=!0,g.setOpen(!1,Qe(Rf,fe)))})}function le(){V.current||(w.current.insideReactTree=!0,U.start(0,()=>{w.current.insideReactTree=!1}))}const pe=Wt(v)?v:null,re=[];if(!(!y&&!pe))return pe&&(pe.addEventListener("focusout",Y),pe.addEventListener("pointerdown",k),re.push(()=>{pe.removeEventListener("focusout",Y),pe.removeEventListener("pointerdown",k)})),y&&(y.addEventListener("focusin",ie),y.addEventListener("focusout",Y),M&&(y.addEventListener("focusout",le,!0),re.push(()=>{y.removeEventListener("focusout",le,!0)})),re.push(()=>{y.removeEventListener("focusin",ie),y.removeEventListener("focusout",Y)})),()=>{re.forEach(fe=>{fe()})}},[r,v,y,Q,a,A,M,g,l,s,se,R,C,I,w,U,oe,X,c,d]),b.useEffect(()=>{if(r||!y||!m)return;const Z=Array.from(M?.portalNode?.querySelectorAll(`[${pd("portal")}]`)||[]),ie=(A?_E(A.nodesRef.current,C()):[]).find(le=>dv(le.context?.elements.domReference||null))?.context?.elements.domReference,Y=[y,ie,...Z,O.current,B.current,ne.current,W.current,M?.beforeOutsideRef.current,M?.afterOutsideRef.current,Io(d),Io(c),R?v:null].filter(le=>le!=null);return oZ(Y,a||R)},[m,r,v,y,a,I,M,R,A,C,c,d]),Ge(()=>{if(!m||r||!Wt(Q))return;const Z=Ht(Q),k=Ao(Z);queueMicrotask(()=>{const ie=ae(Q),Y=T.current,le=typeof Y=="function"?Y($.current||""):Y;if(le===void 0||le===!1)return;let pe;le===!0||le===null?pe=ie[0]||Q:pe=Io(le),pe=pe||ie[0]||Q,!ft(Q,k)&&gl(pe,{preventScroll:pe===Q})})},[r,m,Q,S,ae,T,$]),Ge(()=>{if(r||!Q)return;const Z=Ht(Q),k=Ao(Z);lZ(k);function ie(pe){if(pe.open||(z.current=aZ(pe.nativeEvent,H.current)),pe.reason===i7&&pe.nativeEvent.type==="mouseleave"&&(j.current=!0),pe.reason===O0)if(pe.nested)j.current=!1;else if(dD(pe.nativeEvent)||fD(pe.nativeEvent))j.current=!1;else{let re=!1;document.createElement("div").focus({get preventScroll(){return re=!0,!1}}),re?j.current=!1:j.current=!0}}x.on("openchange",ie);const Y=Z.createElement("span");Y.setAttribute("tabindex","-1"),Y.setAttribute("aria-hidden","true"),Object.assign(Y.style,L0),te&&v&&v.insertAdjacentElement("afterend",Y);function le(){const pe=_.current;let re=typeof pe=="function"?pe(z.current):pe;if(re===void 0||re===!1)return null;if(re===null&&(re=!0),typeof re=="boolean"){const de=v||Pm();return de&&de.isConnected?de:Y}const fe=v||Pm()||Y;return Io(re)||fe}return()=>{x.off("openchange",ie);const pe=Ao(Z),re=ft(y,pe)||A&&Ys(A.nodesRef.current,C(),!1).some(de=>ft(de.context?.elements.floating,pe)),fe=le();queueMicrotask(()=>{const de=uZ(fe),ve=typeof _.current!="boolean";_.current&&!j.current&&Wt(de)&&(!(!ve&&de!==pe&&pe!==Z.body)||re)&&de.focus({preventScroll:!0}),Y.remove(),j.current=!1})}},[r,y,Q,_,w,x,A,te,v,C]),Ge(()=>{if(!aD||m||!y)return;const Z=Ao(Ht(y));!Wt(Z)||!j0(Z)||ft(y,Z)&&Z.blur()},[m,y]),Ge(()=>{if(!(r||!M))return M.setFocusManagerState({modal:a,closeOnFocusOut:l,open:m,onOpenChange:g.setOpen,domReference:v}),()=>{M.setFocusManagerState(null)}},[r,M,a,m,g,l,v]),Ge(()=>{if(!(r||!Q))return HE(Q,I),()=>{queueMicrotask(B0)}},[r,Q,I]);const L=!r&&(a?!R:!0)&&(te||a);return h.jsxs(b.Fragment,{children:[L&&h.jsx(kl,{"data-type":"inside",ref:J,onFocus:Z=>{if(a){const k=ae();gl(k[k.length-1])}else M?.portalNode&&(j.current=!1,hl(Z,M.portalNode)?CD(v)?.focus():Io(d??M.beforeOutsideRef)?.focus())}}),n,L&&h.jsx(kl,{"data-type":"inside",ref:K,onFocus:Z=>{a?gl(ae()[0]):M?.portalNode&&(l&&(j.current=!0),hl(Z,M.portalNode)?SD(v)?.focus():Io(c??M.afterOutsideRef)?.focus())}})]})}function PD(e,t={}){const n="rootStore"in e?e.rootStore:e,r=n.context.dataRef,{enabled:o=!0,event:i="click",toggle:s=!0,ignoreMouse:a=!1,stickIfOpen:l=!0,touchOpenDelay:u=0,reason:c=av}=t,d=b.useRef(void 0),f=P0(),p=ts(),g=b.useMemo(()=>({onPointerDown(m){d.current=m.pointerType},onMouseDown(m){const v=d.current,y=m.nativeEvent,x=n.select("open");if(m.button!==0||i==="click"||ME(v)&&a)return;const w=r.current.openEvent,C=w?.type,S=n.select("domReferenceElement")!==m.currentTarget,R=x&&S||!(x&&s&&(!(w&&l)||C==="click"||C==="mousedown"));if(j0(y.target)){const T=Qe(c,y,y.target);R&&v==="touch"&&u>0?p.start(u,()=>{n.setOpen(!0,T)}):n.setOpen(R,T);return}const I=m.currentTarget;f.request(()=>{const T=Qe(c,y,I);R&&v==="touch"&&u>0?p.start(u,()=>{n.setOpen(!0,T)}):n.setOpen(R,T)})},onClick(m){if(i==="mousedown-only")return;const v=d.current;if(i==="mousedown"&&v){d.current=void 0;return}if(ME(v)&&a)return;const y=n.select("open"),x=r.current.openEvent,w=n.select("domReferenceElement")!==m.currentTarget,C=y&&w||!(y&&s&&(!(x&&l)||pD(x))),S=Qe(c,m.nativeEvent,m.currentTarget);C&&v==="touch"&&u>0?p.start(u,()=>{n.setOpen(!0,S)}):n.setOpen(C,S)},onKeyDown(){d.current=void 0}}),[r,i,a,n,l,s,f,p,u,c]);return b.useMemo(()=>o?{reference:g}:En,[o,g])}const fZ={intentional:"onClick",sloppy:"onPointerDown"};function pZ(e){return{escapeKey:typeof e=="boolean"?e:e?.escapeKey??!1,outsidePress:typeof e=="boolean"?e:e?.outsidePress??!0}}function hZ(e,t={}){const n="rootStore"in e?e.rootStore:e,r=n.useState("open"),o=n.useState("floatingElement"),i=n.useState("referenceElement"),s=n.useState("domReferenceElement"),{onOpenChange:a,dataRef:l}=n.context,{enabled:u=!0,escapeKey:c=!0,outsidePress:d=!0,outsidePressEvent:f="sloppy",referencePress:p=!1,referencePressEvent:g="sloppy",ancestorScroll:m=!1,bubbles:v,externalTree:y}=t,x=Nf(y),w=ke(typeof d=="function"?d:()=>!1),C=typeof d=="function"?w:d,S=b.useRef(!1),{escapeKey:R,outsidePress:I}=pZ(v),T=b.useRef(null),_=ts(),$=ts(),A=ke(()=>{$.clear(),l.current.insideReactTree=!1}),M=b.useRef(!1),O=b.useRef(""),B=ke(L=>{O.current=L.pointerType}),j=ke(()=>{const L=O.current,Z=L==="pen"||!L?"mouse":L,k=typeof f=="function"?f():f;return typeof k=="string"?k:k[Z]}),D=ke(L=>{if(!r||!u||!c||L.key!=="Escape"||M.current)return;const Z=l.current.floatingContext?.nodeId,k=x?Ys(x.nodesRef.current,Z):[];if(!R&&k.length>0){let le=!0;if(k.forEach(pe=>{pe.context?.open&&!pe.context.dataRef.current.__escapeKeyBubbles&&(le=!1)}),!le)return}const ie=I7(L)?L.nativeEvent:L,Y=Qe(eD,ie);n.setOpen(!1,Y),!R&&!Y.isPropagationAllowed&&L.stopPropagation()}),V=ke(L=>{const Z=j();return Z==="intentional"&&L.type!=="click"||Z==="sloppy"&&L.type==="click"}),G=ke(()=>{l.current.insideReactTree=!0,$.start(0,A)}),z=ke((L,Z=!1)=>{if(V(L)){A();return}if(l.current.insideReactTree){A();return}if(j()==="intentional"&&Z||typeof C=="function"&&!C(L))return;const k=Nn(L),ie=`[${pd("inert")}]`,Y=Ht(n.select("floatingElement")).querySelectorAll(ie),le=n.context.triggerElements;if(k&&(le.hasElement(k)||le.hasMatchingElement(ve=>ft(ve,k))))return;let pe=Ot(k)?k:null;for(;pe&&!No(pe);){const ve=Mo(pe);if(No(ve)||!Ot(ve))break;pe=ve}if(Y.length&&Ot(k)&&!E7(k)&&!ft(k,n.select("floatingElement"))&&Array.from(Y).every(ve=>!ft(pe,ve)))return;if(Wt(k)&&!("touches"in L)){const ve=No(k),we=Bn(k),Se=/auto|scroll/,Ye=ve||Se.test(we.overflowX),at=ve||Se.test(we.overflowY),Xe=Ye&&k.clientWidth>0&&k.scrollWidth>k.clientWidth,Ue=at&&k.clientHeight>0&&k.scrollHeight>k.clientHeight,rt=we.direction==="rtl",et=Ue&&(rt?L.offsetX<=k.offsetWidth-k.clientWidth:L.offsetX>k.clientWidth),gt=Xe&&L.offsetY>k.clientHeight;if(et||gt)return}const re=l.current.floatingContext?.nodeId,fe=x&&Ys(x.nodesRef.current,re).some(ve=>wr(L,ve.context?.elements.floating));if(wr(L,n.select("floatingElement"))||wr(L,n.select("domReferenceElement"))||fe)return;const de=x?Ys(x.nodesRef.current,re):[];if(de.length>0){let ve=!0;if(de.forEach(we=>{we.context?.open&&!we.context.dataRef.current.__outsidePressBubbles&&(ve=!1)}),!ve)return}n.setOpen(!1,Qe(O0,L)),A()}),H=ke(L=>{j()!=="sloppy"||L.pointerType==="touch"||!n.select("open")||!u||wr(L,n.select("floatingElement"))||wr(L,n.select("domReferenceElement"))||z(L)}),ne=ke(L=>{if(j()!=="sloppy"||!n.select("open")||!u||wr(L,n.select("floatingElement"))||wr(L,n.select("domReferenceElement")))return;const Z=L.touches[0];Z&&(T.current={startTime:Date.now(),startX:Z.clientX,startY:Z.clientY,dismissOnTouchEnd:!1,dismissOnMouseDown:!0},_.start(1e3,()=>{T.current&&(T.current.dismissOnTouchEnd=!1,T.current.dismissOnMouseDown=!1)}))}),W=ke(L=>{const Z=Nn(L);function k(){ne(L),Z?.removeEventListener(L.type,k)}Z?.addEventListener(L.type,k)}),J=ke(L=>{const Z=S.current;if(S.current=!1,_.clear(),L.type==="mousedown"&&T.current&&!T.current.dismissOnMouseDown)return;const k=Nn(L);function ie(){L.type==="pointerdown"?H(L):z(L,Z),k?.removeEventListener(L.type,ie)}k?.addEventListener(L.type,ie)}),K=ke(L=>{if(j()!=="sloppy"||!T.current||wr(L,n.select("floatingElement"))||wr(L,n.select("domReferenceElement")))return;const Z=L.touches[0];if(!Z)return;const k=Math.abs(Z.clientX-T.current.startX),ie=Math.abs(Z.clientY-T.current.startY),Y=Math.sqrt(k*k+ie*ie);Y>5&&(T.current.dismissOnTouchEnd=!0),Y>10&&(z(L),_.clear(),T.current=null)}),U=ke(L=>{const Z=Nn(L);function k(){K(L),Z?.removeEventListener(L.type,k)}Z?.addEventListener(L.type,k)}),oe=ke(L=>{j()!=="sloppy"||!T.current||wr(L,n.select("floatingElement"))||wr(L,n.select("domReferenceElement"))||(T.current.dismissOnTouchEnd&&z(L),_.clear(),T.current=null)}),X=ke(L=>{const Z=Nn(L);function k(){oe(L),Z?.removeEventListener(L.type,k)}Z?.addEventListener(L.type,k)});b.useEffect(()=>{if(!r||!u)return;l.current.__escapeKeyBubbles=R,l.current.__outsidePressBubbles=I;const L=new ua;function Z(pe){n.setOpen(!1,Qe(er,pe))}function k(){L.clear(),M.current=!0}function ie(){L.start(Wd()?5:0,()=>{M.current=!1})}const Y=Ht(o);Y.addEventListener("pointerdown",B,!0),c&&(Y.addEventListener("keydown",D),Y.addEventListener("compositionstart",k),Y.addEventListener("compositionend",ie)),C&&(Y.addEventListener("click",J,!0),Y.addEventListener("pointerdown",J,!0),Y.addEventListener("touchstart",W,!0),Y.addEventListener("touchmove",U,!0),Y.addEventListener("touchend",X,!0),Y.addEventListener("mousedown",J,!0));let le=[];return m&&(Ot(s)&&(le=si(s)),Ot(o)&&(le=le.concat(si(o))),!Ot(i)&&i&&i.contextElement&&(le=le.concat(si(i.contextElement)))),le=le.filter(pe=>pe!==Y.defaultView?.visualViewport),le.forEach(pe=>{pe.addEventListener("scroll",Z,{passive:!0})}),()=>{Y.removeEventListener("pointerdown",B,!0),c&&(Y.removeEventListener("keydown",D),Y.removeEventListener("compositionstart",k),Y.removeEventListener("compositionend",ie)),C&&(Y.removeEventListener("click",J,!0),Y.removeEventListener("pointerdown",J,!0),Y.removeEventListener("touchstart",W,!0),Y.removeEventListener("touchmove",U,!0),Y.removeEventListener("touchend",X,!0),Y.removeEventListener("mousedown",J,!0)),le.forEach(pe=>{pe.removeEventListener("scroll",Z)}),L.clear(),S.current=!1}},[l,o,i,s,c,C,r,a,m,u,R,I,D,z,J,H,W,U,X,B,n]),b.useEffect(A,[C,A]);const te=b.useMemo(()=>({onKeyDown:D,...p&&{[fZ[g]]:L=>{n.setOpen(!1,Qe(av,L.nativeEvent))},...g!=="intentional"&&{onClick(L){n.setOpen(!1,Qe(av,L.nativeEvent))}}}}),[D,n,p,g]),Q=ke(L=>{const Z=Nn(L.nativeEvent);!ft(n.select("floatingElement"),Z)||L.button!==0||(S.current=!0)}),se=ke(L=>{!r||!u||L.button!==0||(S.current=!0)}),ae=b.useMemo(()=>({onKeyDown:D,onPointerDown:Q,onMouseDown:Q,onMouseUp:Q,onClickCapture:G,onMouseDownCapture(L){G(),se(L)},onPointerDownCapture(L){G(),se(L)},onMouseUpCapture:G,onTouchEndCapture:G,onTouchMoveCapture:G}),[D,Q,G,se]);return b.useMemo(()=>u?{reference:te,floating:ae,trigger:te}:{},[u,te,ae])}var gZ=(e,t,n)=>{if(t.length===1&&t[0]===n){let r=!1;try{const o={};e(o)===o&&(r=!0)}catch{}if(r){let o;try{throw new Error}catch(i){({stack:o}=i)}console.warn(`The result function returned its own inputs without modification. e.g
|
|
@@ -83,7 +83,7 @@ Avoid returning a new reference inside your input selector, e.g.
|
|
|
83
83
|
${s.right}px ${s.bottom}px,
|
|
84
84
|
${s.right}px ${s.top}px,
|
|
85
85
|
${s.left}px ${s.top}px
|
|
86
|
-
)`}return h.jsx("div",{ref:n,role:"presentation","data-base-ui-inert":"",...o,style:{position:"fixed",inset:0,userSelect:"none",WebkitUserSelect:"none",clipPath:i}})});process.env.NODE_ENV!=="production"&&(LD.displayName="InternalBackdrop");function uJ(e){const t=b.useRef(!0);t.current&&(t.current=!1,e())}const $0=b.createContext(void 0);process.env.NODE_ENV!=="production"&&($0.displayName="ComboboxRootContext");const G0=b.createContext(void 0);process.env.NODE_ENV!=="production"&&(G0.displayName="ComboboxFloatingContext");const H0=b.createContext(void 0);process.env.NODE_ENV!=="production"&&(H0.displayName="ComboboxDerivedItemsContext");const W0=b.createContext("");process.env.NODE_ENV!=="production"&&(W0.displayName="ComboboxInputValueContext");function Gn(){const e=b.useContext($0);if(!e)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: ComboboxRootContext is missing. Combobox parts must be placed within <Combobox.Root>.":Fr(22));return e}function _f(){const e=b.useContext(G0);if(!e)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: ComboboxFloatingContext is missing. Combobox parts must be placed within <Combobox.Root>.":Fr(23));return e}function Ii(){const e=b.useContext(H0);if(!e)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: ComboboxItemsContext is missing. Combobox parts must be placed within <Combobox.Root>.":Fr(24));return e}function z0(){return b.useContext(W0)}const cJ=(e,t)=>Object.is(e,t);function ns(e,t,n){return e==null||t==null?Object.is(e,t):n(e,t)}function dJ(e,t,n){return!e||e.length===0?!1:e.some(r=>r===void 0?!1:ns(t,r,n))}function gd(e,t,n){return!e||e.length===0?-1:e.findIndex(r=>r===void 0?!1:ns(r,t,n))}function fJ(e,t,n){return e.filter(r=>!ns(t,r,n))}function mv(e){if(e==null)return"";if(typeof e=="string")return e;try{return JSON.stringify(e)}catch{return String(e)}}function q0(e){return e!=null&&e.length>0&&typeof e[0]=="object"&&e[0]!=null&&"items"in e[0]}function pJ(e){if(!Array.isArray(e))return e!=null&&!("null"in e);if(q0(e)){for(const t of e)for(const n of t.items)if(n&&n.value==null&&n.label!=null)return!0;return!1}for(const t of e)if(t&&t.value==null&&t.label!=null)return!0;return!1}function On(e,t){if(t&&e!=null)return t(e)??"";if(e&&typeof e=="object"){if("label"in e&&e.label!=null)return String(e.label);if("value"in e)return String(e.value)}return mv(e)}function $a(e,t){return t&&e!=null?t(e)??"":e&&typeof e=="object"&&"value"in e&&"label"in e?mv(e.value):mv(e)}function FD(e,t,n){function r(){return On(e,n)}if(n&&e!=null)return n(e);if(e&&typeof e=="object"&&"label"in e&&e.label!=null)return e.label;if(t&&!Array.isArray(t))return t[e]??r();if(Array.isArray(t)){const o=q0(t)?t.flatMap(i=>i.items):t;if(e==null||typeof e!="object"){const i=o.find(s=>s.value===e);return i&&i.label!=null?i.label:r()}if("value"in e){const i=o.find(s=>s&&s.value===e.value);if(i&&i.label!=null)return i.label}}return r()}function hJ(e,t,n){return e.reduce((r,o,i)=>(i>0&&r.push(", "),r.push(h.jsx(b.Fragment,{children:FD(o,t,n)},i)),r),[])}const be={id:De(e=>e.id),query:De(e=>e.query),items:De(e=>e.items),selectedValue:De(e=>e.selectedValue),hasSelectionChips:De(e=>{const t=e.selectedValue;return Array.isArray(t)&&t.length>0}),hasSelectedValue:De(e=>{const{selectedValue:t,selectionMode:n}=e;return t==null?!1:n==="multiple"&&Array.isArray(t)?t.length>0:!0}),hasNullItemLabel:De((e,t)=>t?pJ(e.items):!1),open:De(e=>e.open),mounted:De(e=>e.mounted),forceMounted:De(e=>e.forceMounted),inline:De(e=>e.inline),activeIndex:De(e=>e.activeIndex),selectedIndex:De(e=>e.selectedIndex),isActive:De((e,t)=>e.activeIndex===t),isSelected:De((e,t)=>{const n=e.isItemEqualToValue,r=e.selectedValue;return Array.isArray(r)?r.some(o=>ns(t,o,n)):ns(t,r,n)}),transitionStatus:De(e=>e.transitionStatus),popupProps:De(e=>e.popupProps),inputProps:De(e=>e.inputProps),triggerProps:De(e=>e.triggerProps),getItemProps:De(e=>e.getItemProps),positionerElement:De(e=>e.positionerElement),listElement:De(e=>e.listElement),triggerElement:De(e=>e.triggerElement),inputElement:De(e=>e.inputElement),popupSide:De(e=>e.popupSide),openMethod:De(e=>e.openMethod),inputInsidePopup:De(e=>e.inputInsidePopup),selectionMode:De(e=>e.selectionMode),listRef:De(e=>e.listRef),labelsRef:De(e=>e.labelsRef),popupRef:De(e=>e.popupRef),emptyRef:De(e=>e.emptyRef),inputRef:De(e=>e.inputRef),keyboardActiveRef:De(e=>e.keyboardActiveRef),chipsContainerRef:De(e=>e.chipsContainerRef),clearRef:De(e=>e.clearRef),valuesRef:De(e=>e.valuesRef),allValuesRef:De(e=>e.allValuesRef),name:De(e=>e.name),disabled:De(e=>e.disabled),readOnly:De(e=>e.readOnly),required:De(e=>e.required),grid:De(e=>e.grid),isGrouped:De(e=>e.isGrouped),virtualized:De(e=>e.virtualized),onOpenChangeComplete:De(e=>e.onOpenChangeComplete),openOnInputClick:De(e=>e.openOnInputClick),itemToStringLabel:De(e=>e.itemToStringLabel),isItemEqualToValue:De(e=>e.isItemEqualToValue),modal:De(e=>e.modal),autoHighlight:De(e=>e.autoHighlight),submitOnItemClick:De(e=>e.submitOnItemClick)};let JE=(function(e){return e.disabled="data-disabled",e.valid="data-valid",e.invalid="data-invalid",e.touched="data-touched",e.dirty="data-dirty",e.filled="data-filled",e.focused="data-focused",e})({});const gJ={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valid:null,valueMissing:!1},mJ={valid(e){return e===null?null:e?{[JE.valid]:""}:{[JE.invalid]:""}}},BD=b.createContext({invalid:void 0,name:void 0,validityData:{state:gJ,errors:[],error:"",value:"",initialValue:null},setValidityData:Lt,disabled:void 0,touched:!1,setTouched:Lt,dirty:!1,setDirty:Lt,filled:!1,setFilled:Lt,focused:!1,setFocused:Lt,validate:()=>null,validationMode:"onSubmit",validationDebounceTime:0,shouldValidateOnChange:()=>!1,state:{disabled:!1,valid:null,touched:!1,dirty:!1,filled:!1,focused:!1},markedDirtyRef:{current:!1},validation:{getValidationProps:(e=En)=>e,getInputValidationProps:(e=En)=>e,inputRef:{current:null},commit:async()=>{}}});process.env.NODE_ENV!=="production"&&(BD.displayName="FieldRootContext");function bu(e=!0){const t=b.useContext(BD);if(t.setValidityData===Lt&&!e)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: FieldRootContext is missing. Field parts must be placed within <Field.Root>.":Fr(28));return t}function bJ(e,t){return{...e,state:{...e.state,valid:!t&&e.state.valid}}}const VD=b.createContext({formRef:{current:{fields:new Map}},errors:{},clearErrors:Lt,validationMode:"onSubmit",submitAttemptedRef:{current:!1}});process.env.NODE_ENV!=="production"&&(VD.displayName="FormContext");function $D(){return b.useContext(VD)}function vJ(e){const{enabled:t=!0,value:n,id:r,name:o,controlRef:i,commit:s}=e,{formRef:a}=$D(),{invalid:l,markedDirtyRef:u,validityData:c,setValidityData:d}=bu(),f=ke(e.getValue);Ge(()=>{if(!t)return;let p=n;p===void 0&&(p=f()),c.initialValue===null&&p!==null&&d(g=>({...g,initialValue:p}))},[t,d,n,c.initialValue,f]),Ge(()=>{!t||!r||a.current.fields.set(r,{getValue:f,name:o,controlRef:i,validityData:bJ(c,l),validate(p=!0){let g=n;g===void 0&&(g=f()),u.current=!0,p?so.flushSync(()=>s(g)):s(g)}})},[s,i,t,a,f,r,l,u,o,c,n]),Ge(()=>{const p=a.current.fields;return()=>{r&&p.delete(r)}},[a,r])}const GD=b.createContext({controlId:void 0,registerControlId:Lt,labelId:void 0,setLabelId:Lt,messageIds:[],setMessageIds:Lt,getDescriptionProps:e=>e});process.env.NODE_ENV!=="production"&&(GD.displayName="LabelableContext");function U0(){return b.useContext(GD)}function HD(e={}){const{id:t,implicit:n=!1,controlRef:r}=e,{controlId:o,registerControlId:i}=U0(),s=tD(t),a=n?o:void 0,l=cr(()=>Symbol("labelable-control")),u=b.useRef(!1),c=b.useRef(t!=null),d=ke(()=>{!u.current||i===Lt||(u.current=!1,i(l.current,void 0))});return Ge(()=>{if(i===Lt)return;let f;if(n){const p=r?.current;Ot(p)&&p.closest("label")!=null?f=t??null:f=a??s}else if(t!=null)c.current=!0,f=t;else if(c.current)f=s;else{d();return}if(f===void 0){d();return}u.current=!0,i(l.current,f)},[t,r,a,i,n,s,l,d]),b.useEffect(()=>d,[d]),o??s}function yJ(e,t){return(n,r)=>{if(n==null)return!1;const o=On(n,t);return e.contains(o,r)}}function xJ(e,t,n){return(r,o)=>{if(r==null)return!1;if(!o)return!0;const i=On(r,t),s=n!=null?On(n,t):"";return s&&e.contains(s,o)&&s.length===o.length?!0:e.contains(i,o)}}const KE=new Map;function WD(e){return Array.isArray(e)?e.map(t=>WD(t)).join(","):e==null?"":String(e)}function wJ(e={}){const t={usage:"search",sensitivity:"base",ignorePunctuation:!0,...e},n=`${WD(e.locale)}|${JSON.stringify(t)}`,r=KE.get(n);if(r)return r;const o=new Intl.Collator(e.locale,t),i={contains(s,a,l){if(!a)return!0;const u=On(s,l);for(let c=0;c<=u.length-a.length;c+=1)if(o.compare(u.slice(c,c+a.length),a)===0)return!0;return!1},startsWith(s,a,l){if(!a)return!0;const u=On(s,l);return o.compare(u.slice(0,a.length),a)===0},endsWith(s,a,l){if(!a)return!0;const u=On(s,l),c=a.length;return u.length>=c&&o.compare(u.slice(u.length-c),a)===0}};return KE.set(n,i),i}const CJ=wJ;function oc(e,t){const n=b.useRef(e),r=ke(t);Ge(()=>{n.current!==e&&r(n.current)},[e,r]),Ge(()=>{n.current=e},[e])}const zD=Symbol("none"),$i={value:zD,index:-1};function SJ(e){const{id:t,onOpenChangeComplete:n,defaultSelectedValue:r=null,selectedValue:o,onSelectedValueChange:i,defaultInputValue:s,inputValue:a,selectionMode:l="none",onItemHighlighted:u,name:c,disabled:d=!1,readOnly:f=!1,required:p=!1,inputRef:g,grid:m=!1,items:v,filteredItems:y,filter:x,openOnInputClick:w=!0,autoHighlight:C=!1,keepHighlight:S=!1,highlightItemOnHover:R=!0,loopFocus:I=!0,itemToStringLabel:T,itemToStringValue:_,isItemEqualToValue:$=cJ,virtualized:A=!1,inline:M=!1,fillInputOnItemPress:O=!0,modal:B=!1,limit:j=-1,autoComplete:D="list",formAutoComplete:V,locale:G,submitOnItemClick:z=!1}=e,{clearErrors:H}=$D(),{setDirty:ne,validityData:W,shouldValidateOnChange:J,setFilled:K,name:U,disabled:oe,setTouched:X,setFocused:te,validationMode:Q,validation:se}=bu(),ae=HD({id:t}),L=CJ({locale:G}),[Z,k]=b.useState(!1),[ie,Y]=b.useState(null),le=b.useRef([]),pe=b.useRef([]),re=b.useRef(null),fe=b.useRef(null),de=b.useRef(null),ve=b.useRef(!0),we=b.useRef(!1),Se=b.useRef(null),Ye=b.useRef(null),at=b.useRef(null),Xe=b.useRef($i),Ue=b.useRef(null),rt=b.useRef([]),et=b.useRef([]),gt=oe||d,ct=U??c,ot=l==="multiple",mt=l==="single",Nt=a!==void 0||s!==void 0,Bt=v!==void 0,tt=y!==void 0;let Ze;C==="always"?Ze="always":Ze=C?"input-change":!1;const[ee,ye]=Rm({controlled:o,default:ot?r??Yu:r,name:"Combobox",state:"selectedValue"}),ge=b.useMemo(()=>x===null?()=>!0:x!==void 0?x:mt&&!Z?xJ(L,T,ee):yJ(L,T),[x,mt,ee,Z,L,T]),xe=cr(()=>Nt?s??"":mt?On(ee,T):"").current,[Ae,Ie]=Rm({controlled:a,default:xe,name:"Combobox",state:"inputValue"}),[qe,Pt]=Rm({controlled:e.open,default:e.defaultOpen,name:"Combobox",state:"open"}),lt=q0(v),it=ie??(Ae===""?"":String(Ae).trim()),_t=mt?On(ee,T):"",Et=mt&&!Z&&it!==""&&_t!==""&&_t.length===it.length&&L.contains(_t,it),sn=Et?"":it,mr=Bt&&tt&&Et,Wn=b.useMemo(()=>v?lt?v.flatMap(Ce=>Ce.items):v:Yu,[v,lt]),pn=b.useMemo(()=>{if(y&&!mr)return y;if(!v)return Yu;if(lt){const Me=v,Ke=[];let It=0;for(const st of Me){if(j>-1&&It>=j)break;const Dt=sn===""?st.items:st.items.filter(zr=>ge(zr,sn,T));if(Dt.length===0)continue;const Xn=j>-1?j-It:1/0,An=Dt.slice(0,Xn);if(An.length>0){const zr={...st,items:An};Ke.push(zr),It+=An.length}}return Ke}if(sn==="")return j>-1?Wn.slice(0,j):Wn;const Ce=[];for(const Me of Wn){if(j>-1&&Ce.length>=j)break;ge(Me,sn,T)&&Ce.push(Me)}return Ce},[y,mr,v,lt,sn,j,ge,T,Wn]),Jt=b.useMemo(()=>lt?pn.flatMap(Me=>Me.items):pn,[pn,lt]),Ve=cr(()=>new DD({id:ae,selectedValue:ee,open:qe,filter:ge,query:it,items:v,selectionMode:l,listRef:le,labelsRef:pe,popupRef:re,emptyRef:de,inputRef:fe,keyboardActiveRef:ve,chipsContainerRef:Se,clearRef:Ye,valuesRef:rt,allValuesRef:et,selectionEventRef:at,name:ct,disabled:gt,readOnly:f,required:p,grid:m,isGrouped:lt,virtualized:A,openOnInputClick:w,itemToStringLabel:T,isItemEqualToValue:$,modal:B,autoHighlight:Ze,submitOnItemClick:z,hasInputValue:Nt,mounted:!1,forceMounted:!1,transitionStatus:"idle",inline:M,activeIndex:null,selectedIndex:null,popupProps:{},inputProps:{},triggerProps:{},positionerElement:null,listElement:null,triggerElement:null,inputElement:null,popupSide:null,openMethod:null,inputInsidePopup:!0,onOpenChangeComplete:n||Lt,setOpen:Lt,setInputValue:Lt,setSelectedValue:Lt,setIndices:Lt,onItemHighlighted:Lt,handleSelection:Lt,getItemProps:()=>En,forceMount:Lt,requestSubmit:Lt})).current,zn=l==="none"?Ae:ee,Sa=b.useMemo(()=>l==="none"?zn:Array.isArray(ee)?ee.map(Ce=>$a(Ce,_)):$a(ee,_),[zn,_,l,ee]),Oi=ke(u),Ni=ke(n),Go=me(Ve,be.activeIndex),nn=me(Ve,be.selectedIndex),Ho=me(Ve,be.positionerElement),Es=me(Ve,be.listElement),bo=me(Ve,be.triggerElement),Pi=me(Ve,be.inputElement),Cn=me(Ve,be.inline),Mt=me(Ve,be.inputInsidePopup),Ea=rr(bo),{mounted:Is,setMounted:Ia,transitionStatus:_i}=M0(qe),{openMethod:Rs,triggerProps:Hr,reset:As}=eJ(qe);vJ({id:ae,name:ct,commit:se.commit,value:zn,controlRef:Mt?Ea:fe,getValue:()=>Sa});const br=ke(()=>{v?pe.current=Jt.map(Ce=>On(Ce,T)):Ve.set("forceMounted",!0)}),qn=b.useRef(ee);Ge(()=>{ee!==qn.current&&br()},[br,ee]);const an=ke(Ce=>{Ve.update(Ce);const Me=Ce.type||"none";if(Ce.activeIndex!==void 0)if(Ce.activeIndex===null)Xe.current!==$i&&(Xe.current=$i,Oi(void 0,Ba(Me,void 0,{index:-1})));else{const Ke=rt.current[Ce.activeIndex];Xe.current={value:Ke,index:Ce.activeIndex},Oi(Ke,Ba(Me,void 0,{index:Ce.activeIndex}))}}),Rn=ke((Ce,Me)=>{if(we.current=Me.reason===ei,e.onInputValueChange?.(Ce,Me),!Me.isCanceled){if(Me.reason===Hs){const Ke=Me.event,It=Ke.inputType;if(Ke.type==="compositionend"||It!=null&&It!==""&&It!=="insertReplacementText"){const Dt=Ce.trim()!=="";Dt&&k(!0),Ue.current={hasQuery:Dt},Dt&&Ze&&Ve.state.activeIndex==null&&Ve.set("activeIndex",0)}}Ie(Ce)}}),vo=ke((Ce,Me)=>{if(qe!==Ce&&(Me.reason==="escape-key"&&Bt&&Jt.length===0&&!Ve.state.emptyRef.current&&Me.allowPropagation(),e.onOpenChange?.(Ce,Me),!Me.isCanceled&&(!Ce&&Z&&(mt?(Cn||Y(it),it===""&&k(!1)):ot&&(Cn||Mt?an({activeIndex:null}):Y(it),Rn("",Qe(ei,Me.event)))),Pt(Ce),!Ce&&Mt&&(Me.reason===Rf||Me.reason===O0)&&(X(!0),te(!1),Q==="onBlur")))){const Ke=l==="none"?Ae:ee;se.commit(Ke)}}),Wo=ke((Ce,Me)=>{if(i?.(Ce,Me),Me.isCanceled)return;ye(Ce),(l==="none"&&re.current&&O||mt&&!Ve.state.inputInsidePopup)&&Rn(On(Ce,T),Qe(Me.reason,Me.event)),mt&&Ce!=null&&Me.reason!==Hs&&Z&&!Cn&&Y(it)}),Ra=ke((Ce,Me)=>{let Ke=Me;if(Ke===void 0){if(Go===null)return;Ke=rt.current[Go]}const It=Nn(Ce),st=at.current??Ce;at.current=null;const Dt=Qe(s7,st),Xn=It?.closest("a")?.getAttribute("href");if(Xn){Xn.startsWith("#")&&vo(!1,Dt);return}if(ot){const An=Array.isArray(ee)?ee:[],Uo=dJ(An,Ke,Ve.state.isItemEqualToValue)?fJ(An,Ke,Ve.state.isItemEqualToValue):[...An,Ke];if(Wo(Uo,Dt),!(fe.current?fe.current.value.trim()!=="":!1))return;Ve.state.inputInsidePopup?Rn("",Qe(ei,Dt.event)):vo(!1,Dt)}else Wo(Ke,Dt),vo(!1,Dt)}),Mi=ke(()=>{if(!Ve.state.submitOnItemClick)return;const Ce=Ve.state.inputElement?.form;Ce&&typeof Ce.requestSubmit=="function"&&Ce.requestSubmit()}),Wr=ke(()=>{if(Ia(!1),Ni?.(!1),k(!1),As(),Y(null),an(l==="none"?{activeIndex:null,selectedIndex:null}:{activeIndex:null}),ot&&fe.current&&fe.current.value!==""&&!we.current&&Rn("",Qe(ei)),mt)if(Ve.state.inputInsidePopup)fe.current&&fe.current.value!==""&&Rn("",Qe(ei));else{const Ce=On(ee,T);fe.current&&fe.current.value!==Ce&&Rn(Ce,Qe(Ce===""?ei:er))}}),Di=b.useMemo(()=>Cn&&Ho?{current:Ho.closest('[role="dialog"]')}:re,[Cn,Ho]);Of({enabled:!e.actionsRef,open:qe,ref:Di,onComplete(){qe||Wr()}}),b.useImperativeHandle(e.actionsRef,()=>({unmount:Wr}),[Wr]),Ge(function(){if(qe||l==="none")return;const Me=v?Wn:et.current;if(ot){const Ke=Array.isArray(ee)?ee:[],It=Ke[Ke.length-1],st=gd(Me,It,$);an({selectedIndex:st===-1?null:st})}else{const Ke=gd(Me,ee,$);an({selectedIndex:Ke===-1?null:Ke})}},[qe,ee,v,l,Wn,ot,$,an]),Ge(()=>{v&&(rt.current=Jt,le.current.length=Jt.length)},[v,Jt]),Ge(()=>{const Ce=Ue.current;if(Ce&&(Ce.hasQuery?Ze&&Ve.set("activeIndex",0):Ze==="always"&&Ve.set("activeIndex",0),Ue.current=null),!qe&&!Cn)return;const Ke=Bt||tt?Jt:rt.current,It=Ve.state.activeIndex;if(It==null){if(Ze==="always"&&Ke.length>0){Ve.set("activeIndex",0);return}Xe.current!==$i&&(Xe.current=$i,Ve.state.onItemHighlighted(void 0,Ba(er,void 0,{index:-1})));return}if(It>=Ke.length){Xe.current!==$i&&(Xe.current=$i,Ve.state.onItemHighlighted(void 0,Ba(er,void 0,{index:-1}))),Ve.set("activeIndex",null);return}const st=Ke[It],Dt=Xe.current.value,Xn=Dt!==zD&&ns(st,Dt,Ve.state.isItemEqualToValue);(Xe.current.index!==It||!Xn)&&(Xe.current={value:st,index:It},Ve.state.onItemHighlighted(st,Ba(er,void 0,{index:It})))},[Go,Ze,tt,Bt,Jt,Cn,qe,Ve]),Ge(()=>{if(l==="none"){K(String(Ae)!=="");return}K(ot?Array.isArray(ee)&&ee.length>0:ee!=null)},[K,l,Ae,ee,ot]),b.useEffect(()=>{Bt&&Ze&&Jt.length===0&&an({activeIndex:null})},[Bt,Ze,Jt.length,an]),oc(it,()=>{!qe||it===""||it===String(xe)||k(!0)}),oc(ee,()=>{if(l!=="none"&&(H(ct),ne(ee!==W.initialValue),J()?se.commit(ee):se.commit(ee,!0),mt&&!Nt&&!Mt)){const Ce=On(ee,T);Ae!==Ce&&Rn(Ce,Qe(er))}}),oc(Ae,()=>{l==="none"&&(H(ct),ne(Ae!==W.initialValue),J()?se.commit(Ae):se.commit(Ae,!0))}),oc(v,()=>{if(!mt||Nt||Mt||Z)return;const Ce=On(ee,T);Ae!==Ce&&Rn(Ce,Qe(er))});const Un=kD({open:Cn?!0:qe,onOpenChange:vo,elements:{reference:Mt?bo:Pi,floating:Ho}});let zo,qo;Cn||(zo=m?"grid":"listbox",qo=qe?"true":"false");const Aa=b.useMemo(()=>{const Ce=Pi?.tagName==="INPUT",Me=Ce||qe,Ke=Ce?{autoComplete:"off",spellCheck:"false",autoCorrect:"off",autoCapitalize:"none"}:{};return Me&&(Ke.role="combobox",Ke["aria-expanded"]=qo,Ke["aria-haspopup"]=zo,Ke["aria-controls"]=qe?Es?.id:void 0,Ke["aria-autocomplete"]=D),{reference:Ke,floating:{role:"presentation"}}},[Pi,qe,qo,zo,Es?.id,D]),Ta=PD(Un,{enabled:!f&&!gt&&w,event:"mousedown-only",toggle:!1,touchOpenDelay:Mt?0:50,reason:l7}),Oa=hZ(Un,{enabled:!f&&!gt&&!Cn,outsidePressEvent:{mouse:"sloppy",touch:"intentional"},bubbles:Cn?!0:void 0,outsidePress(Ce){const Me=Nn(Ce);return!ft(bo,Me)&&!ft(Ye.current,Me)&&!ft(Se.current,Me)}}),Na=JZ(Un,{enabled:!f&&!gt,id:ae,listRef:le,activeIndex:Go,selectedIndex:nn,virtual:!0,loopFocus:I,allowEscape:I&&!Ze,focusItemOnOpen:Z||l==="none"&&!Ze?!1:"auto",focusItemOnHover:R,resetOnPointerLeave:!S,cols:m?2:1,orientation:m?"horizontal":void 0,disabledIndices:Yu,onNavigate(Ce,Me){!Me&&!qe||_i==="ending"||an(Me?{activeIndex:Ce,type:ve.current?"keyboard":"pointer"}:{activeIndex:Ce})}}),{getReferenceProps:yo,getFloatingProps:ki,getItemProps:ji}=UZ([Aa,Ta,Oa,Na]);uJ(()=>{Ve.update({inline:M,popupProps:ki(),inputProps:yo(),triggerProps:Hr,getItemProps:ji,setOpen:vo,setInputValue:Rn,setSelectedValue:Wo,setIndices:an,onItemHighlighted:Oi,handleSelection:Ra,forceMount:br,requestSubmit:Mi})}),Ge(()=>{Ve.update({id:ae,selectedValue:ee,open:qe,mounted:Is,transitionStatus:_i,items:v,inline:M,popupProps:ki(),inputProps:yo(),triggerProps:Hr,openMethod:Rs,getItemProps:ji,selectionMode:l,name:ct,disabled:gt,readOnly:f,required:p,grid:m,isGrouped:lt,virtualized:A,onOpenChangeComplete:Ni,openOnInputClick:w,itemToStringLabel:T,modal:B,autoHighlight:Ze,isItemEqualToValue:$,submitOnItemClick:z,hasInputValue:Nt,requestSubmit:Mi})},[Ve,ae,ee,qe,Is,_i,v,ki,yo,ji,Rs,Hr,l,ct,gt,f,p,se,m,lt,A,Ni,w,T,B,$,z,Nt,M,Mi,Ze]);const xo=Ml(g,se.inputRef),Dn=b.useMemo(()=>({query:it,hasItems:Bt,filteredItems:pn,flatFilteredItems:Jt}),[it,Bt,pn,Jt]),vr=b.useMemo(()=>Array.isArray(zn)?"":$a(zn,_),[zn,_]),yr=ot&&Array.isArray(ee)&&ee.length>0,Li=ot||l==="none"?void 0:ct,Yn=b.useMemo(()=>!ot||!Array.isArray(ee)||!ct?null:ee.map(Ce=>{const Me=$a(Ce,_);return h.jsx("input",{type:"hidden",name:ct,value:Me},Me)}),[ot,ee,ct,_]),Pa=h.jsxs(b.Fragment,{children:[e.children,h.jsx("input",{...se.getInputValidationProps({onFocus(){if(Mt){bo?.focus();return}(fe.current||bo)?.focus()},onChange(Ce){if(Ce.nativeEvent.defaultPrevented)return;const Me=Ce.target.value,Ke=Qe(er,Ce.nativeEvent);function It(){if(ot)return;if(l==="none"){ne(Me!==W.initialValue),Rn(Me,Ke),J()&&se.commit(Me);return}const st=rt.current.find(Dt=>$a(Dt,_).toLowerCase()===Me.toLowerCase());st!=null&&(ne(st!==W.initialValue),Wo?.(st,Ke),J()&&se.commit(st))}v?It():(br(),queueMicrotask(It))}}),id:ae&&Li==null?`${ae}-hidden-input`:void 0,name:Li,autoComplete:V,disabled:gt,required:p&&!yr,readOnly:f,value:vr,ref:xo,style:Li?tZ:L0,tabIndex:-1,"aria-hidden":!0}),Yn]});return h.jsx($0.Provider,{value:Ve,children:h.jsx(G0.Provider,{value:Un,children:h.jsx(H0.Provider,{value:Dn,children:h.jsx(W0.Provider,{value:Ae,children:Pa})})})})}const qD={...aJ,...mJ,popupSide:e=>e?{"data-popup-side":e}:null,listEmpty:e=>e?{"data-list-empty":""}:null};function EJ(e){const t=e.getBoundingClientRect();if(process.env.NODE_ENV!=="production")return t;const n=window.getComputedStyle(e,"::before"),r=window.getComputedStyle(e,"::after");if(!(n.content!=="none"||r.content!=="none"))return t;const i=parseFloat(n.width)||0,s=parseFloat(n.height)||0,a=parseFloat(r.width)||0,l=parseFloat(r.height)||0,u=Math.max(t.width,i,a),c=Math.max(t.height,s,l),d=u-t.width,f=c-t.height;return{left:t.left-d/2,right:t.right+d/2,top:t.top-f/2,bottom:t.bottom+f/2}}const ic=2,UD=b.forwardRef(function(t,n){const{render:r,className:o,nativeButton:i=!0,disabled:s=!1,id:a,...l}=t,{state:u,disabled:c,setTouched:d,setFocused:f,validationMode:p,validation:g}=bu(),{labelId:m}=U0(),v=Gn(),{filteredItems:y}=Ii(),x=me(v,be.selectionMode),w=me(v,be.disabled),C=me(v,be.readOnly),S=me(v,be.required),R=me(v,be.mounted),I=me(v,be.popupSide),T=me(v,be.positionerElement),_=me(v,be.listElement),$=me(v,be.triggerProps),A=me(v,be.triggerElement),M=me(v,be.inputInsidePopup),O=me(v,be.id),B=me(v,be.open),j=me(v,be.selectedValue),D=me(v,be.activeIndex),V=me(v,be.selectedIndex),G=me(v,be.hasSelectedValue),z=_f(),H=z0(),ne=ts(),W=c||w||s,J=y.length===0,K=R&&T?I:null;HD({id:M?a:void 0});const U=M?a??O:a,oe=b.useRef("");function X(Y){oe.current=Y.pointerType}const te=z.useState("domReferenceElement");b.useEffect(()=>{M&&A&&A!==te&&z.set("domReferenceElement",A)},[A,te,z,M]);const{reference:Q}=KZ(z,{enabled:!B&&!C&&!w&&x==="single",listRef:v.state.labelsRef,activeIndex:D,selectedIndex:V,onMatch(Y){const le=v.state.valuesRef.current[Y];le!==void 0&&v.state.setSelectedValue(le,Qe("none"))}}),{reference:se}=PD(z,{enabled:!C&&!w,event:"mousedown"}),{buttonRef:ae,getButtonProps:L}=Af({native:i,disabled:W}),Z={...u,open:B,disabled:W,popupSide:K,listEmpty:J,placeholder:!G},k=ke(Y=>{v.set("triggerElement",Y)});return Mn("button",t,{ref:[n,ae,k],state:Z,props:[$,se,Q,{id:U,tabIndex:M?0:-1,role:M?"combobox":void 0,"aria-expanded":B?"true":"false","aria-haspopup":M?"dialog":"listbox","aria-controls":B?_?.id:void 0,"aria-required":M&&S||void 0,"aria-labelledby":m,onPointerDown:X,onPointerEnter:X,onFocus(){f(!0),!(W||C)&&ne.start(0,v.state.forceMount)},onBlur(Y){if(!ft(T,Y.relatedTarget)&&(d(!0),f(!1),p==="onBlur")){const le=x==="none"?H:j;g.commit(le)}},onMouseDown(Y){if(W||C||(M||z.set("domReferenceElement",Y.currentTarget),v.state.forceMount(),oe.current!=="touch"&&(v.state.inputRef.current?.focus(),M||Y.preventDefault()),B))return;const le=Ht(Y.currentTarget);function pe(re){if(!A)return;const fe=Nn(re),de=v.state.positionerElement,ve=v.state.listElement;if(ft(A,fe)||ft(de,fe)||ft(ve,fe)||fe===A)return;const we=EJ(A),Se=re.clientX>=we.left-ic&&re.clientX<=we.right+ic,Ye=re.clientY>=we.top-ic&&re.clientY<=we.bottom+ic;Se&&Ye||v.state.setOpen(!1,Qe("cancel-open",re))}M&&le.addEventListener("mouseup",pe,{once:!0})},onKeyDown(Y){W||C||(Y.key==="ArrowDown"||Y.key==="ArrowUp")&&(Tt(Y),v.state.setOpen(!0,Qe(dl,Y.nativeEvent)),v.state.inputRef.current?.focus())}},g?g.getValidationProps(l):l,L],stateAttributesMapping:qD})});process.env.NODE_ENV!=="production"&&(UD.displayName="ComboboxTrigger");const Y0=b.createContext(void 0);process.env.NODE_ENV!=="production"&&(Y0.displayName="ComboboxChipsContext");function YD(){return b.useContext(Y0)}const X0=b.createContext(void 0);process.env.NODE_ENV!=="production"&&(X0.displayName="ComboboxPositionerContext");function Z0(e){const t=b.useContext(X0);if(t===void 0&&!e)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: <Combobox.Popup> and <Combobox.Arrow> must be used within the <Combobox.Positioner> component":Fr(21));return t}const J0=b.forwardRef(function(t,n){const{render:r,className:o,disabled:i=!1,id:s,...a}=t,{state:l,disabled:u,setTouched:c,setFocused:d,validationMode:f,validation:p}=bu(),{labelId:g}=U0(),m=YD(),y=!!Z0(!0),x=Gn(),{filteredItems:w}=Ii(),C=z0(),S=YM(),R=me(x,be.required),I=me(x,be.disabled),T=me(x,be.readOnly),_=me(x,be.name),$=me(x,be.selectionMode),A=me(x,be.autoHighlight),M=me(x,be.inputProps),O=me(x,be.triggerProps),B=me(x,be.open),j=me(x,be.mounted),D=me(x,be.selectedValue),V=me(x,be.popupSide),G=me(x,be.positionerElement),z=me(x,be.id),H=me(x,be.inline),ne=!!A,W=j&&G?V:null,J=u||I||i,K=w.length===0,oe=tD(s??(y||H?void 0:z)),[X,te]=b.useState(null),Q=b.useRef(!1),se=b.useRef(null),ae=b.useRef(!1),L=ke(Y=>{const le=y||x.state.inline;le&&!x.state.hasInputValue&&x.state.setInputValue("",Qe(er)),x.update({inputElement:Y,inputInsidePopup:le})}),Z={...l,open:B,disabled:J,readOnly:T,popupSide:W,listEmpty:K};function k(Y){if(!m)return;let le;const{highlightedChipIndex:pe}=m;if(pe!==void 0){if(Y.key==="ArrowLeft")Y.preventDefault(),pe>0?le=pe-1:le=void 0;else if(Y.key==="ArrowRight")Y.preventDefault(),pe<D.length-1?le=pe+1:le=void 0;else if(Y.key==="Backspace"||Y.key==="Delete"){Y.preventDefault();const re=pe>=D.length-1?D.length-2:pe;le=re>=0?re:void 0,x.state.setIndices({activeIndex:null,selectedIndex:null,type:"keyboard"})}return le}return Y.key==="ArrowLeft"&&(Y.currentTarget.selectionStart??0)===0&&D.length>0?(Y.preventDefault(),le=Math.max(D.length-1,0)):Y.key==="Backspace"&&Y.currentTarget.value===""&&D.length>0&&(x.state.setIndices({activeIndex:null,selectedIndex:null,type:"keyboard"}),Y.preventDefault()),le}return Mn("input",t,{state:Z,ref:[n,x.state.inputRef,L],props:[M,O,{type:"text",value:t.value??X??C,"aria-readonly":T||void 0,"aria-required":R||void 0,"aria-labelledby":g,disabled:J,readOnly:T,required:$==="none"?R:void 0,...$==="none"&&_&&{name:_},id:oe,onFocus(){if(d(!0),!H||!ae.current)return;ae.current=!1;const Y=se.current;Y==null||!Object.hasOwn(x.state.valuesRef.current,Y)||x.state.setIndices({activeIndex:Y})},onBlur(){c(!0),d(!1);const Y=x.state.activeIndex;if(H&&Y!==null&&A!=="always"&&(se.current=Y,ae.current=!0,x.state.setIndices({activeIndex:null})),f==="onBlur"){const le=$==="none"?C:D;p.commit(le)}},onCompositionStart(Y){ld||(Q.current=!0,te(Y.currentTarget.value))},onCompositionEnd(Y){Q.current=!1;const le=Y.currentTarget.value;te(null),x.state.setInputValue(le,Qe(Hs,Y.nativeEvent))},onChange(Y){const le=Y.nativeEvent.inputType,pe=!le||le==="insertReplacementText",re=Q.current||!pe;if(Q.current){const we=Y.currentTarget.value;te(we),we===""&&!x.state.openOnInputClick&&!x.state.inputInsidePopup&&x.state.setOpen(!1,Qe(ei,Y.nativeEvent));const Se=we.trim(),Ye=ne&&Se!=="";!T&&!J&&Se&&re&&(x.state.setOpen(!0,Qe(Hs,Y.nativeEvent)),ne||x.state.setIndices({activeIndex:null,selectedIndex:null,type:x.state.keyboardActiveRef.current?"keyboard":"pointer"})),B&&x.state.activeIndex!==null&&!Ye&&x.state.setIndices({activeIndex:null,selectedIndex:null,type:x.state.keyboardActiveRef.current?"keyboard":"pointer"});return}x.state.setInputValue(Y.currentTarget.value,Qe(Hs,Y.nativeEvent));const fe=Y.currentTarget.value==="",de=Qe(ei,Y.nativeEvent);fe&&!x.state.inputInsidePopup&&($==="single"&&x.state.setSelectedValue(null,de),x.state.openOnInputClick||x.state.setOpen(!1,de));const ve=Y.currentTarget.value.trim();!T&&!J&&ve&&re&&(x.state.setOpen(!0,Qe(Hs,Y.nativeEvent)),ne||x.state.setIndices({activeIndex:null,selectedIndex:null,type:x.state.keyboardActiveRef.current?"keyboard":"pointer"})),B&&x.state.activeIndex!==null&&!ne&&x.state.setIndices({activeIndex:null,selectedIndex:null,type:x.state.keyboardActiveRef.current?"keyboard":"pointer"})},onKeyDown(Y){if(J||T||Y.ctrlKey||Y.shiftKey||Y.altKey||Y.metaKey)return;x.state.keyboardActiveRef.current=!0;const le=Y.currentTarget,pe=le.scrollWidth-le.clientWidth,re=S==="rtl";if(Y.key==="Home"){Tt(Y);const ve=PE&&re?le.value.length:0;le.setSelectionRange(ve,ve),le.scrollLeft=0;return}if(Y.key==="End"){Tt(Y);const ve=PE&&re?0:le.value.length;le.setSelectionRange(ve,ve),le.scrollLeft=re?-pe:pe;return}if(!j&&Y.key==="Escape"){const ve=$==="multiple"&&Array.isArray(D)?D.length===0:D===null,we=Qe(eD,Y.nativeEvent),Se=$==="multiple"?[]:null;x.state.setInputValue("",we),x.state.setSelectedValue(Se,we),!ve&&!x.state.inline&&!we.isPropagationAllowed&&Y.stopPropagation();return}if(m&&Y.key==="Backspace"&&le.value===""&&m.highlightedChipIndex===void 0&&Array.isArray(D)&&D.length>0){const ve=D.slice(0,-1);x.state.setIndices({activeIndex:null,selectedIndex:null,type:x.state.keyboardActiveRef.current?"keyboard":"pointer"}),x.state.setSelectedValue(ve,Qe(er,Y.nativeEvent));return}const fe=m?.highlightedChipIndex!==void 0,de=k(Y);if(m?.setHighlightedChipIndex(de),de!==void 0?m?.chipsRef.current[de]?.focus():fe&&x.state.inputRef.current?.focus(),Y.which!==229&&Y.key==="Enter"&&B){const ve=x.state.activeIndex,we=Y.nativeEvent;if(ve===null){x.state.setOpen(!1,Qe(er,we));return}Tt(Y);const Se=x.state.listRef.current[ve];Se&&(x.state.selectionEventRef.current=we,Se.click(),x.state.selectionEventRef.current=null)}},onPointerMove(){x.state.keyboardActiveRef.current=!1},onPointerDown(){x.state.keyboardActiveRef.current=!1}},p?p.getValidationProps(a):a],stateAttributesMapping:qD})});process.env.NODE_ENV!=="production"&&(J0.displayName="ComboboxInput");const IJ={..._0,...sJ},XD=b.forwardRef(function(t,n){const{render:r,className:o,disabled:i=!1,nativeButton:s=!0,keepMounted:a=!1,...l}=t,{disabled:u}=bu(),c=Gn(),d=me(c,be.selectionMode),f=me(c,be.disabled),p=me(c,be.readOnly),g=me(c,be.open),m=me(c,be.selectedValue),v=me(c,be.hasSelectionChips),y=z0();let x=!1;d==="none"?x=y!=="":d==="single"?x=m!=null:x=v;const w=u||f||i,{buttonRef:C,getButtonProps:S}=Af({native:s,disabled:w}),{mounted:R,transitionStatus:I,setMounted:T}=M0(x),_={disabled:w,open:g,transitionStatus:I};Of({open:x,ref:c.state.clearRef,onComplete(){x||T(!1)}});const $=Mn("button",t,{state:_,ref:[n,C,c.state.clearRef],props:[{tabIndex:-1,children:"x",onMouseDown(M){M.preventDefault()},onClick(M){if(w||p)return;const O=c.state.keyboardActiveRef;c.state.setInputValue("",Qe(RE,M.nativeEvent)),d!=="none"?(c.state.setSelectedValue(Array.isArray(m)?[]:null,Qe(RE,M.nativeEvent)),c.state.setIndices({activeIndex:null,selectedIndex:null,type:O.current?"keyboard":"pointer"})):c.state.setIndices({activeIndex:null,type:O.current?"keyboard":"pointer"}),c.state.inputRef.current?.focus()}},l,S],stateAttributesMapping:IJ});return a||R?$:null});process.env.NODE_ENV!=="production"&&(XD.displayName="ComboboxClear");const ZD=b.createContext(null);process.env.NODE_ENV!=="production"&&(ZD.displayName="GroupCollectionContext");function RJ(){return b.useContext(ZD)}function AJ(e){const{children:t}=e,{filteredItems:n}=Ii(),r=RJ(),o=r?r.items:n;return o?h.jsx(b.Fragment,{children:o.map(t)}):null}const JD=b.forwardRef(function(t,n){var r;const{render:o,className:i,children:s,...a}=t,l=Gn(),u=_f(),c=!!Z0(!0),{filteredItems:d}=Ii(),f=me(l,be.items),p=me(l,be.labelsRef),g=me(l,be.listRef),m=me(l,be.selectionMode),v=me(l,be.grid),y=me(l,be.popupProps),x=me(l,be.disabled),w=me(l,be.readOnly),C=me(l,be.virtualized),S=m==="multiple",R=d.length===0,I=ke(O=>{l.set("positionerElement",O)}),T=ke(O=>{l.set("listElement",O)}),_=b.useMemo(()=>typeof s=="function"?r||(r=h.jsx(AJ,{children:s})):s,[s]),$={empty:R},A=u.useState("floatingId"),M=Mn("div",t,{state:$,ref:[n,T,c?null:I],props:[y,{children:_,tabIndex:-1,id:A,role:v?"grid":"listbox","aria-multiselectable":S?"true":void 0,onKeyDown(O){if(!(x||w)&&O.key==="Enter"){const B=l.state.activeIndex;if(B==null)return;Tt(O);const j=O.nativeEvent,D=l.state.listRef.current[B];D&&(l.state.selectionEventRef.current=j,D.click(),l.state.selectionEventRef.current=null)}},onKeyDownCapture(){l.state.keyboardActiveRef.current=!0},onPointerMoveCapture(){l.state.keyboardActiveRef.current=!1}},a]});return C?M:h.jsx(qM,{elementsRef:g,labelsRef:f?void 0:p,children:M})});process.env.NODE_ENV!=="production"&&(JD.displayName="ComboboxList");const K0=b.createContext(void 0);process.env.NODE_ENV!=="production"&&(K0.displayName="ComboboxPortalContext");function TJ(){const e=b.useContext(K0);if(e===void 0)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: <Combobox.Portal> is missing.":Fr(20));return e}const KD=b.forwardRef(function(t,n){const{keepMounted:r=!1,...o}=t,i=Gn(),s=me(i,be.mounted),a=me(i,be.forceMounted);return s||r||a?h.jsx(K0.Provider,{value:r,children:h.jsx(ND,{ref:n,...o})}):null});process.env.NODE_ENV!=="production"&&(KD.displayName="ComboboxPortal");const OJ=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:i,platform:s,elements:a,middlewareData:l}=t,{element:u,padding:c=0,offsetParent:d="real"}=ro(e,t)||{};if(u==null)return{};const f=yy(c),p={x:n,y:r},g=$d(o),m=Vd(g),v=await s.getDimensions(u),y=g==="y",x=y?"top":"left",w=y?"bottom":"right",C=y?"clientHeight":"clientWidth",S=i.reference[m]+i.reference[g]-p[g]-i.floating[m],R=p[g]-i.reference[g],I=d==="real"?await s.getOffsetParent?.(u):a.floating;let T=a.floating[C]||i.floating[m];(!T||!await s.isElement?.(I))&&(T=a.floating[C]||i.floating[m]);const _=S/2-R/2,$=T/2-v[m]/2-1,A=Math.min(f[x],$),M=Math.min(f[w],$),O=A,B=T-v[m]-M,j=T/2-v[m]/2+_,D=Bc(O,j,B),V=!l.arrow&&Fo(o)!=null&&j!==D&&i.reference[m]/2-(j<O?A:M)-v[m]/2<0,G=V?j<O?j-O:j-B:0;return{[g]:p[g]+G,data:{[g]:D,centerOffset:j-D-G,...V&&{alignmentOffset:G}},reset:V}}}),NJ=(e,t)=>({...OJ(e),options:[e,t]}),PJ={name:"hide",async fn(e){const{width:t,height:n,x:r,y:o}=e.rects.reference,i=t===0&&n===0&&r===0&&o===0;return{data:{referenceHidden:(await qT().fn(e)).data?.referenceHidden||i}}}},_J={sideX:"left",sideY:"top"};function QD(e,t,n){const r=e==="inline-start"||e==="inline-end";return{top:"top",right:r?n?"inline-start":"inline-end":"right",bottom:"bottom",left:r?n?"inline-end":"inline-start":"left"}[t]}function QE(e,t,n){const{rects:r,placement:o}=e;return{side:QD(t,Ln(o),n),align:Fo(o)||"center",anchor:{width:r.reference.width,height:r.reference.height},positioner:{width:r.floating.width,height:r.floating.height}}}function MJ(e){const{anchor:t,positionMethod:n="absolute",side:r="bottom",sideOffset:o=0,align:i="center",alignOffset:s=0,collisionBoundary:a,collisionPadding:l=5,sticky:u=!1,arrowPadding:c=5,disableAnchorTracking:d=!1,keepMounted:f=!1,floatingRootContext:p,mounted:g,collisionAvoidance:m,shiftCrossAxis:v=!1,nodeId:y,adaptiveOrigin:x,lazyFlip:w=!1,externalTree:C}=e,[S,R]=b.useState(null);!g&&S!==null&&R(null);const I=m.side||"flip",T=m.align||"flip",_=m.fallbackAxisSide||"end",$=typeof t=="function"?t:void 0,A=ke($),M=$?A:t,O=rr(t),j=YM()==="rtl",D=S||{top:"top",right:"right",bottom:"bottom",left:"left","inline-end":j?"left":"right","inline-start":j?"right":"left"}[r],V=i==="center"?D:`${D}-${i}`;let G=l;const z=1,H=r==="bottom"?z:0,ne=r==="top"?z:0,W=r==="right"?z:0,J=r==="left"?z:0;typeof G=="number"?G={top:G+H,right:G+J,bottom:G+ne,left:G+W}:G&&(G={top:(G.top||0)+H,right:(G.right||0)+J,bottom:(G.bottom||0)+ne,left:(G.left||0)+W});const K={boundary:a==="clipping-ancestors"?"clippingAncestors":a,padding:G},U=b.useRef(null),oe=rr(o),X=rr(s),se=[$T(tt=>{const Ze=QE(tt,r,j),ee=typeof oe.current=="function"?oe.current(Ze):oe.current,ye=typeof X.current=="function"?X.current(Ze):X.current;return{mainAxis:ee,crossAxis:ye,alignmentAxis:ye}},[typeof o!="function"?o:0,typeof s!="function"?s:0,j,r])],ae=T==="none"&&I!=="shift",L=!ae&&(u||v||I==="shift"),Z=I==="none"?null:WT({...K,padding:{top:G.top+z,right:G.right+z,bottom:G.bottom+z,left:G.left+z},mainAxis:!v&&I==="flip",crossAxis:T==="flip"?"alignment":!1,fallbackAxisSideDirection:_}),k=ae?null:GT(tt=>{const Ze=Ht(tt.elements.floating).documentElement;return{...K,rootBoundary:v?{x:0,y:0,width:Ze.clientWidth,height:Ze.clientHeight}:void 0,mainAxis:T!=="none",crossAxis:L,limiter:u||v?void 0:HT(ee=>{if(!U.current)return{};const{width:ye,height:ge}=U.current.getBoundingClientRect(),xe=sr(Ln(ee.placement)),Ae=xe==="y"?ye:ge,Ie=xe==="y"?G.left+G.right:G.top+G.bottom;return{offset:Ae/2+Ie/2}})}},[K,u,v,G,T]);I==="shift"||T==="shift"||i==="center"?se.push(k,Z):se.push(Z,k),se.push(zT({...K,apply({elements:{floating:tt},rects:{reference:Ze},availableWidth:ee,availableHeight:ye}){const ge=tt.style;ge.setProperty("--available-width",`${ee}px`),ge.setProperty("--available-height",`${ye}px`),ge.setProperty("--anchor-width",`${Ze.width}px`),ge.setProperty("--anchor-height",`${Ze.height}px`)}}),NJ(()=>({element:U.current||document.createElement("div"),padding:c,offsetParent:"floating"}),[c]),{name:"transformOrigin",fn(tt){const{elements:Ze,middlewareData:ee,placement:ye,rects:ge,y:xe}=tt,Ae=Ln(ye),Ie=sr(Ae),qe=U.current,Pt=ee.arrow?.x||0,lt=ee.arrow?.y||0,it=qe?.clientWidth||0,_t=qe?.clientHeight||0,Et=Pt+it/2,sn=lt+_t/2,mr=Math.abs(ee.shift?.y||0),Wn=ge.reference.height/2,pn=typeof o=="function"?o(QE(tt,r,j)):o,Jt=mr>pn,Ve={top:`${Et}px calc(100% + ${pn}px)`,bottom:`${Et}px ${-pn}px`,left:`calc(100% + ${pn}px) ${sn}px`,right:`${-pn}px ${sn}px`}[Ae],zn=`${Et}px ${ge.reference.y+Wn-xe}px`;return Ze.floating.style.setProperty("--transform-origin",L&&Ie==="y"&&Jt?zn:Ve),{}}},PJ,x),Ge(()=>{!g&&p&&p.update({referenceElement:null,floatingElement:null,domReferenceElement:null})},[g,p]);const ie=b.useMemo(()=>({elementResize:!d&&typeof ResizeObserver<"u",layoutShift:!d&&typeof IntersectionObserver<"u"}),[d]),{refs:Y,elements:le,x:pe,y:re,middlewareData:fe,update:de,placement:ve,context:we,isPositioned:Se,floatingStyles:Ye}=qZ({rootContext:p,placement:V,middleware:se,strategy:n,whileElementsMounted:f?void 0:(...tt)=>Gc(...tt,ie),nodeId:y,externalTree:C}),{sideX:at,sideY:Xe}=fe.adaptiveOrigin||_J,Ue=Se?n:"fixed",rt=b.useMemo(()=>{const tt=x?{position:Ue,[at]:pe,[Xe]:re}:{position:Ue,...Ye};return Se||(tt.opacity=0),tt},[x,Ue,at,pe,Xe,re,Ye,Se]),et=b.useRef(null);Ge(()=>{if(!g)return;const tt=O.current,Ze=typeof tt=="function"?tt():tt,ye=(eI(Ze)?Ze.current:Ze)||null||null;ye!==et.current&&(Y.setPositionReference(ye),et.current=ye)},[g,Y,M,O]),b.useEffect(()=>{if(!g)return;const tt=O.current;typeof tt!="function"&&eI(tt)&&tt.current!==et.current&&(Y.setPositionReference(tt.current),et.current=tt.current)},[g,Y,M,O]),b.useEffect(()=>{if(f&&g&&le.domReference&&le.floating)return Gc(le.domReference,le.floating,de,ie)},[f,g,le,de,ie]);const gt=Ln(ve),ct=QD(r,gt,j),ot=Fo(ve)||"center",mt=!!fe.hide?.referenceHidden;Ge(()=>{w&&g&&Se&&R(gt)},[w,g,Se,gt]);const Nt=b.useMemo(()=>({position:"absolute",top:fe.arrow?.y,left:fe.arrow?.x}),[fe.arrow]),Bt=fe.arrow?.centerOffset!==0;return b.useMemo(()=>({positionerStyles:rt,arrowStyles:Nt,arrowRef:U,arrowUncentered:Bt,side:ct,align:ot,physicalSide:gt,anchorHidden:mt,refs:Y,context:we,isPositioned:Se,update:de}),[rt,Nt,U,Bt,ct,ot,gt,mt,Y,we,Se,de])}function eI(e){return e!=null&&"current"in e}function ek(e){return e==="starting"?J8:En}const tk=b.forwardRef(function(t,n){const{render:r,className:o,anchor:i,positionMethod:s="absolute",side:a="bottom",align:l="center",sideOffset:u=0,alignOffset:c=0,collisionBoundary:d="clipping-ancestors",collisionPadding:f=5,arrowPadding:p=5,sticky:g=!1,disableAnchorTracking:m=!1,collisionAvoidance:v=Q8,...y}=t,x=Gn(),{filteredItems:w}=Ii(),C=_f(),S=TJ(),R=me(x,be.modal),I=me(x,be.open),T=me(x,be.mounted),_=me(x,be.openMethod),$=me(x,be.triggerElement),A=me(x,be.inputElement),M=me(x,be.inputInsidePopup),O=me(x,be.transitionStatus),B=w.length===0,D=MJ({anchor:i??(M?$:A),floatingRootContext:C,positionMethod:s,mounted:T,side:a,sideOffset:u,align:l,alignOffset:c,arrowPadding:p,collisionBoundary:d,collisionPadding:f,sticky:g,disableAnchorTracking:m,keepMounted:S,collisionAvoidance:v,lazyFlip:!0});K7(I&&R&&_!=="touch",$);const V=b.useMemo(()=>{const W={...D.positionerStyles};return I||(W.pointerEvents="none"),{role:"presentation",hidden:!T,style:W}},[I,T,D.positionerStyles]),G={open:I,side:D.side,align:D.align,anchorHidden:D.anchorHidden,empty:B};Ge(()=>{x.set("popupSide",D.side)},[x,D.side]);const z=b.useMemo(()=>({side:D.side,align:D.align,arrowRef:D.arrowRef,arrowUncentered:D.arrowUncentered,arrowStyles:D.arrowStyles,anchorHidden:D.anchorHidden,isPositioned:D.isPositioned}),[D.side,D.align,D.arrowRef,D.arrowUncentered,D.arrowStyles,D.anchorHidden,D.isPositioned]),H=ke(W=>{x.set("positionerElement",W)}),ne=Mn("div",t,{state:G,ref:[n,H],props:[V,ek(O),y],stateAttributesMapping:jD});return h.jsxs(X0.Provider,{value:z,children:[T&&R&&h.jsx(LD,{inert:lJ(!I),cutout:A??$}),ne]})});process.env.NODE_ENV!=="production"&&(tk.displayName="ComboboxPositioner");const DJ={...jD,..._0},nk=b.forwardRef(function(t,n){const{render:r,className:o,initialFocus:i,finalFocus:s,...a}=t,l=Gn(),u=Z0(),c=_f(),{filteredItems:d}=Ii(),f=me(l,be.mounted),p=me(l,be.open),g=me(l,be.openMethod),m=me(l,be.transitionStatus),v=me(l,be.inputInsidePopup),y=me(l,be.inputElement),x=d.length===0;Of({open:p,ref:l.state.popupRef,onComplete(){p&&l.state.onOpenChangeComplete(!0)}});const w={open:p,side:u.side,align:u.align,anchorHidden:u.anchorHidden,transitionStatus:m,empty:x},C=Mn("div",t,{state:w,ref:[n,l.state.popupRef],props:[{role:v?"dialog":"presentation",tabIndex:-1,onFocus(T){const _=Nn(T.nativeEvent);g!=="touch"&&(ft(l.state.listElement,_)||_===T.currentTarget)&&l.state.inputRef.current?.focus()}},ek(m),a],stateAttributesMapping:DJ}),R=i===void 0?v?T=>T==="touch"?l.state.popupRef.current:y:!1:i;let I;return s!=null?I=s:I=v?void 0:!1,h.jsx(dZ,{context:c,disabled:!f,modal:!v,openInteractionType:g,initialFocus:R,returnFocus:I,children:C})});process.env.NODE_ENV!=="production"&&(nk.displayName="ComboboxPopup");const Q0=b.createContext(void 0);process.env.NODE_ENV!=="production"&&(Q0.displayName="ComboboxItemContext");function rk(){const e=b.useContext(Q0);if(!e)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: ComboboxItemContext is missing. ComboboxItem parts must be placed within <Combobox.Item>.":Fr(19));return e}const ok=b.createContext(!1);process.env.NODE_ENV!=="production"&&(ok.displayName="ComboboxRowContext");function kJ(){return b.useContext(ok)}const ik=b.memo(b.forwardRef(function(t,n){const{render:r,className:o,value:i=null,index:s,disabled:a=!1,nativeButton:l=!1,...u}=t,c=b.useRef(!1),d=b.useRef(null),f=oD({index:s,textRef:d,indexGuessBehavior:rD.GuessFromOrder}),p=Gn(),g=kJ(),{flatFilteredItems:m,hasItems:v}=Ii(),y=me(p,be.open),x=me(p,be.selectionMode),w=me(p,be.readOnly),C=me(p,be.virtualized),S=me(p,be.isItemEqualToValue),R=x!=="none",I=s??(C?gd(m,i,S):f.index),T=f.index!==-1,_=me(p,be.id),$=me(p,be.isActive,I),A=me(p,be.isSelected,i),M=me(p,be.getItemProps),O=b.useRef(null),B=_!=null&&T?`${_}-${I}`:void 0,j=A&&R;Ge(()=>{if(!(T&&(C||s!=null)))return;const U=p.state.listRef.current;return U[I]=O.current,()=>{delete U[I]}},[T,C,I,s,p]),Ge(()=>{if(!T||v)return;const K=p.state.valuesRef.current;return K[I]=i,x!=="none"&&p.state.allValuesRef.current.push(i),()=>{delete K[I]}},[T,v,I,i,p,x]),Ge(()=>{if(!y){c.current=!1;return}if(!T||v)return;const K=p.state.selectedValue,U=Array.isArray(K)?K[K.length-1]:K;ns(i,U,S)&&p.set("selectedIndex",I)},[T,v,y,p,I,i,S]);const D={disabled:a,selected:j,highlighted:$},V=M({active:$,selected:j});V.id=void 0,V.onFocus=void 0;const{getButtonProps:G,buttonRef:z}=Af({disabled:a,focusableWhenDisabled:!0,native:l});function H(K){function U(){p.state.handleSelection(K,i)}p.state.submitOnItemClick?(so.flushSync(U),p.state.requestSubmit()):U()}const ne={id:B,role:g?"gridcell":"option","aria-selected":R?j:void 0,tabIndex:void 0,onPointerDownCapture(K){c.current=!0,K.preventDefault()},onClick(K){a||w||H(K.nativeEvent)},onMouseUp(K){const U=c.current;c.current=!1,!(a||w||K.button!==0||U||!$)&&H(K.nativeEvent)}},W=Mn("div",t,{ref:[z,n,f.ref,O],state:D,props:[V,ne,u,G]}),J=b.useMemo(()=>({selected:j,textRef:d}),[j,d]);return h.jsx(Q0.Provider,{value:J,children:W})}));process.env.NODE_ENV!=="production"&&(ik.displayName="ComboboxItem");const sk=b.forwardRef(function(t,n){const{render:r,className:o,children:i,...s}=t,{filteredItems:a}=Ii(),l=Gn(),u=a.length===0?i:null;return Mn("div",t,{ref:[n,l.state.emptyRef],props:[{children:u,role:"status","aria-live":"polite","aria-atomic":!0},s]})});process.env.NODE_ENV!=="production"&&(sk.displayName="ComboboxEmpty");const ak=b.forwardRef(function(t,n){const{className:r,render:o,orientation:i="horizontal",...s}=t;return Mn("div",t,{state:{orientation:i},ref:n,props:[{role:"separator","aria-orientation":i},s]})});process.env.NODE_ENV!=="production"&&(ak.displayName="Separator");function jJ(e){const{multiple:t=!1,defaultValue:n,value:r,onValueChange:o,autoComplete:i,...s}=e;return h.jsx(SJ,{...s,selectionMode:t?"multiple":"single",selectedValue:r,defaultSelectedValue:n,onSelectedValueChange:o,formAutoComplete:i})}function LJ(e){const{children:t,placeholder:n}=e,r=Gn(),o=me(r,be.itemToStringLabel),i=me(r,be.selectedValue),s=me(r,be.items),a=me(r,be.selectionMode)==="multiple",l=me(r,be.hasSelectedValue),u=!l&&n!=null&&t==null,c=me(r,be.hasNullItemLabel,u);let d=null;return typeof t=="function"?d=t(i):t!=null?d=t:!l&&n!=null&&!c?d=n:a&&Array.isArray(i)?d=hJ(i,s,o):d=FD(i,s,o),h.jsx(b.Fragment,{children:d})}const lk=b.forwardRef(function(t,n){const r=t.keepMounted??!1,{selected:o}=rk();return r||o?h.jsx(uk,{...t,ref:n}):null});process.env.NODE_ENV!=="production"&&(lk.displayName="ComboboxItemIndicator");const uk=b.memo(b.forwardRef((e,t)=>{const{render:n,className:r,keepMounted:o,...i}=e,{selected:s}=rk(),a=b.useRef(null),{transitionStatus:l,setMounted:u}=M0(s),d=Mn("span",e,{ref:[t,a],state:{selected:s,transitionStatus:l},props:[{"aria-hidden":!0,children:"✔️"},i],stateAttributesMapping:_0});return Of({open:s,ref:a,onComplete(){s||u(!1)}}),d}));process.env.NODE_ENV!=="production"&&(uk.displayName="Inner");const ck=b.forwardRef(function(t,n){const{render:r,className:o,...i}=t,s=Gn(),a=me(s,be.open),l=me(s,be.hasSelectionChips),[u,c]=b.useState(void 0);a&&u!==void 0&&c(void 0);const d=b.useRef([]),f=Mn("div",t,{ref:[n,s.state.chipsContainerRef],props:[l?{role:"toolbar"}:En,i]}),p=b.useMemo(()=>({highlightedChipIndex:u,setHighlightedChipIndex:c,chipsRef:d}),[u,c,d]);return h.jsx(Y0.Provider,{value:p,children:h.jsx(qM,{elementsRef:d,children:f})})});process.env.NODE_ENV!=="production"&&(ck.displayName="ComboboxChips");const ex=b.createContext(void 0);process.env.NODE_ENV!=="production"&&(ex.displayName="ComboboxChipContext");function FJ(){const e=b.useContext(ex);if(!e)throw new Error(process.env.NODE_ENV!=="production"?"useComboboxChipContext must be used within a ComboboxChip":Fr(17));return e}const dk=b.forwardRef(function(t,n){const{render:r,className:o,...i}=t,s=Gn(),{setHighlightedChipIndex:a,chipsRef:l}=YD(),u=me(s,be.disabled),c=me(s,be.readOnly),d=me(s,be.selectedValue),{ref:f,index:p}=oD();function g(x){let w=p;if(x.key==="ArrowLeft")x.preventDefault(),p>0?w=p-1:w=void 0;else if(x.key==="ArrowRight")x.preventDefault(),p<d.length-1?w=p+1:w=void 0;else if(x.key==="Backspace"||x.key==="Delete"){const C=p>=d.length-1?d.length-2:p;w=C>=0?C:void 0,Tt(x),s.state.setIndices({activeIndex:null,selectedIndex:null,type:"keyboard"}),s.state.setSelectedValue(d.filter((S,R)=>R!==p),Qe(er,x.nativeEvent))}else x.key==="Enter"||x.key===" "?(Tt(x),w=void 0):x.key==="ArrowDown"||x.key==="ArrowUp"?(Tt(x),s.state.setOpen(!0,Qe(dl,x.nativeEvent)),w=void 0):x.key.length===1&&!x.ctrlKey&&!x.metaKey&&!x.altKey&&(w=void 0);return w}const v=Mn("div",t,{ref:[n,f],state:{disabled:u},props:[{tabIndex:-1,"aria-disabled":u||void 0,"aria-readonly":c||void 0,onKeyDown(x){if(u||c)return;const w=g(x);so.flushSync(()=>{a(w)}),w===void 0?s.state.inputRef.current?.focus():l.current[w]?.focus()},onMouseDown(x){c||(x.preventDefault(),!u&&s.state.inputRef.current?.focus())}},i]}),y=b.useMemo(()=>({index:p}),[p]);return h.jsx(ex.Provider,{value:y,children:v})});process.env.NODE_ENV!=="production"&&(dk.displayName="ComboboxChip");const fk=b.forwardRef(function(t,n){const{render:r,className:o,disabled:i=!1,nativeButton:s=!0,...a}=t,l=Gn(),{index:u}=FJ(),c=me(l,be.disabled),d=me(l,be.readOnly),f=me(l,be.selectedValue),p=me(l,be.isItemEqualToValue),g=c||i,{buttonRef:m,getButtonProps:v}=Af({native:s,disabled:g||d,focusableWhenDisabled:!0}),y={disabled:g};function x(S){const R=l.state.activeIndex;if(R==null)return;const I=gd(l.state.valuesRef.current,S,p);I!==-1&&R===I&&l.state.setIndices({activeIndex:null,type:l.state.keyboardActiveRef.current?"keyboard":"pointer"})}function w(S){const R=Qe(a7,S.nativeEvent),I=f[u];return x(I),l.state.setSelectedValue(f.filter((T,_)=>_!==u),R),l.state.inputRef.current?.focus(),R}return Mn("button",t,{ref:[n,m],state:y,props:[{tabIndex:-1,onClick(S){if(g||d)return;w(S).isPropagationAllowed||S.stopPropagation()},onKeyDown(S){g||d||(S.key==="Enter"||S.key===" ")&&(w(S).isPropagationAllowed||Tt(S))}},a,v]})});process.env.NODE_ENV!=="production"&&(fk.displayName="ComboboxChipRemove");function vu({className:e,type:t,...n}){return h.jsx("input",{type:t,"data-slot":"input",className:F("ui:file:text-foreground ui:placeholder:text-muted-foreground ui:selection:bg-primary ui:selection:text-primary-foreground ui:dark:bg-input/30 ui:border-input ui:h-10 ui:w-full ui:min-w-0 ui:rounded-md ui:border ui:bg-transparent ui:px-3 ui:py-1 ui:text-base ui:shadow-xs ui:transition-[color,box-shadow] ui:outline-none ui:file:inline-flex ui:file:h-7 ui:file:border-0 ui:file:bg-transparent ui:file:text-sm ui:file:font-medium ui:disabled:pointer-events-none ui:disabled:cursor-not-allowed ui:disabled:opacity-50 ui:md:text-sm","ui:focus-visible:border-ring ui:focus-visible:ring-ring/50 ui:focus-visible:ring-[3px]","ui:aria-invalid:ring-destructive/20 ui:dark:aria-invalid:ring-destructive/40 ui:aria-invalid:border-destructive",e),...n})}function pk({className:e,...t}){return h.jsx("textarea",{"data-slot":"textarea",className:F("ui:border-input ui:placeholder:text-muted-foreground ui:focus-visible:border-ring ui:focus-visible:ring-ring/50 ui:aria-invalid:ring-destructive/20 ui:dark:aria-invalid:ring-destructive/40 ui:aria-invalid:border-destructive ui:dark:bg-input/30 ui:flex ui:field-sizing-content ui:min-h-16 ui:w-full ui:rounded-md ui:border ui:bg-transparent ui:px-3 ui:py-2 ui:text-base ui:shadow-xs ui:transition-[color,box-shadow] ui:outline-none ui:focus-visible:ring-[3px] ui:disabled:cursor-not-allowed ui:disabled:opacity-50 ui:md:text-sm",e),...t})}function BJ({className:e,...t}){return h.jsx("div",{"data-slot":"input-group",role:"group",className:F("ui:group/input-group ui:border-input ui:dark:bg-input/30 ui:relative ui:flex ui:w-full ui:items-center ui:rounded-md ui:border ui:shadow-xs ui:transition-[color,box-shadow] ui:outline-none","ui:h-9 ui:min-w-0 ui:has-[>textarea]:h-auto","ui:has-[>[data-align=inline-start]]:[&>input]:pl-2","ui:has-[>[data-align=inline-end]]:[&>input]:pr-2","ui:has-[>[data-align=block-start]]:h-auto ui:has-[>[data-align=block-start]]:flex-col ui:has-[>[data-align=block-start]]:[&>input]:pb-3","ui:has-[>[data-align=block-end]]:h-auto ui:has-[>[data-align=block-end]]:flex-col ui:has-[>[data-align=block-end]]:[&>input]:pt-3","ui:has-[[data-slot=input-group-control]:focus-visible]:border-ring ui:has-[[data-slot=input-group-control]:focus-visible]:ring-ring/50 ui:has-[[data-slot=input-group-control]:focus-visible]:ring-[3px]","ui:has-[[data-slot][aria-invalid=true]]:ring-destructive/20 ui:has-[[data-slot][aria-invalid=true]]:border-destructive ui:dark:has-[[data-slot][aria-invalid=true]]:ring-destructive/40",e),...t})}const VJ=Si("ui:text-muted-foreground ui:flex ui:h-auto ui:cursor-text ui:items-center ui:justify-center ui:gap-2 ui:py-1.5 ui:text-sm ui:font-medium ui:select-none ui:[&>svg:not([class*=size-])]:size-4 ui:[&>kbd]:rounded-[calc(var(--radius)-5px)] ui:group-data-[disabled=true]/input-group:opacity-50",{variants:{align:{"inline-start":"ui:order-first ui:pl-3 ui:has-[>button]:ml-[-0.45rem] ui:has-[>kbd]:ml-[-0.35rem]","inline-end":"ui:order-last ui:pr-3 ui:has-[>button]:mr-[-0.45rem] ui:has-[>kbd]:mr-[-0.35rem]","block-start":"ui:order-first ui:w-full ui:justify-start ui:px-3 ui:pt-3 ui:[.border-b]:pb-3 ui:group-has-[>input]/input-group:pt-2.5","block-end":"ui:order-last ui:w-full ui:justify-start ui:px-3 ui:pb-3 ui:[.border-t]:pt-3 ui:group-has-[>input]/input-group:pb-2.5"}},defaultVariants:{align:"inline-start"}});function $J({className:e,align:t="inline-start",...n}){return h.jsx("div",{role:"group","data-slot":"input-group-addon","data-align":t,className:F(VJ({align:t}),e),onClick:r=>{r.target.closest("button")||r.currentTarget.parentElement?.querySelector("input")?.focus()},...n})}const GJ=Si("ui:text-sm ui:shadow-none ui:flex ui:gap-2 ui:items-center",{variants:{size:{xs:"ui:h-6 ui:gap-1 ui:px-2 ui:rounded-[calc(var(--radius)-5px)] ui:[&>svg:not([class*=size-])]:size-3.5 ui:has-[>svg]:px-2",sm:"ui:h-8 ui:px-2.5 ui:gap-1.5 ui:rounded-md ui:has-[>svg]:px-2.5","icon-xs":"ui:size-6 ui:rounded-[calc(var(--radius)-5px)] ui:p-0 ui:has-[>svg]:p-0","icon-sm":"ui:size-8 ui:p-0 ui:has-[>svg]:p-0"}},defaultVariants:{size:"xs"}});function hk({className:e,type:t="button",variant:n="ghost",size:r="xs",...o}){return h.jsx(on,{type:t,"data-size":r,variant:n,className:F(GJ({size:r}),e),...o})}function HJ({className:e,...t}){return h.jsx(vu,{"data-slot":"input-group-control",className:F("ui:flex-1 ui:rounded-none ui:border-0 ui:bg-transparent ui:shadow-none ui:focus-visible:ring-0 ui:dark:bg-transparent",e),...t})}const WJ=jJ;function km({...e}){return h.jsx(LJ,{"data-slot":"combobox-value",...e})}function gk({className:e,children:t,...n}){return h.jsxs(UD,{"data-slot":"combobox-trigger",className:F("ui:[&_svg:not([class*=size-])]:size-4",e),...n,children:[t,h.jsx(_e.ChevronDownIcon,{"data-slot":"combobox-trigger-icon",className:"ui:text-muted-foreground ui:pointer-events-none ui:size-4"})]})}function zJ({className:e,...t}){return h.jsx(XD,{"data-slot":"combobox-clear",render:h.jsx(hk,{variant:"ghost",size:"icon-xs",className:"ui:rounded-md"}),className:F(e),...t,children:h.jsx(_e.XIcon,{className:"ui:pointer-events-none"})})}function tI({className:e,children:t,disabled:n=!1,showTrigger:r=!0,showClear:o=!1,...i}){return h.jsxs(BJ,{className:F("ui:w-auto",e),children:[h.jsx(J0,{render:h.jsx(HJ,{disabled:n}),...i}),h.jsxs($J,{align:"inline-end",children:[r&&h.jsx(hk,{size:"icon-xs",variant:"ghost",asChild:!0,"data-slot":"input-group-button",className:"ui:group-has-data-[slot=combobox-clear]/input-group:hidden ui:data-pressed:bg-transparent",disabled:n,children:h.jsx(gk,{className:"ui:rounded-md"})}),o&&h.jsx(zJ,{disabled:n})]}),t]})}function qJ({className:e,side:t="bottom",sideOffset:n=6,align:r="start",alignOffset:o=0,anchor:i,...s}){return h.jsx(KD,{children:h.jsx(tk,{side:t,sideOffset:n,align:r,alignOffset:o,anchor:i,className:"ui:isolate ui:z-50",children:h.jsx(nk,{"data-slot":"combobox-content","data-chips":!!i,className:F("ui:bg-popover ui:text-popover-foreground ui:data-open:animate-in ui:data-closed:animate-out ui:data-closed:fade-out-0 ui:data-open:fade-in-0 ui:data-closed:zoom-out-95 ui:data-open:zoom-in-95 ui:data-[side=bottom]:slide-in-from-top-2 ui:data-[side=left]:slide-in-from-right-2 ui:data-[side=right]:slide-in-from-left-2 ui:data-[side=top]:slide-in-from-bottom-2 ui:ring-foreground/10 ui:*:data-[slot=input-group]:bg-input/30 ui:*:data-[slot=input-group]:border-input/30 ui:group/combobox-content ui:relative ui:max-h-96 ui:w-(--anchor-width) ui:max-w-(--available-width) ui:min-w-[calc(var(--anchor-width)+--spacing(7))] ui:origin-(--transform-origin) ui:overflow-hidden ui:rounded-md ui:shadow-md ui:ring-1 ui:duration-100 ui:data-[chips=true]:min-w-(--anchor-width) ui:*:data-[slot=input-group]:m-1 ui:*:data-[slot=input-group]:mb-0 ui:*:data-[slot=input-group]:h-8 ui:*:data-[slot=input-group]:shadow-none",e),...s})})})}function UJ({className:e,...t}){return h.jsx(JD,{"data-slot":"combobox-list",className:F("ui:max-h-[min(calc(--spacing(96)---spacing(9)),calc(var(--available-height)---spacing(9)))] ui:scroll-py-1 ui:overflow-y-auto ui:p-1 ui:data-empty:p-0",e),...t})}function YJ({className:e,children:t,...n}){return h.jsxs(ik,{"data-slot":"combobox-item",className:F("ui:data-highlighted:bg-accent ui:data-highlighted:text-accent-foreground ui:relative ui:flex ui:w-full ui:cursor-default ui:items-center ui:gap-2 ui:rounded-sm ui:py-1.5 ui:pr-8 ui:pl-2 ui:text-sm ui:outline-hidden ui:select-none ui:data-[disabled]:pointer-events-none ui:data-[disabled]:opacity-50 ui:[&_svg]:pointer-events-none ui:[&_svg]:shrink-0 ui:[&_svg:not([class*=size-])]:size-4",e),...n,children:[t,h.jsx(lk,{"data-slot":"combobox-item-indicator",render:h.jsx("span",{className:"ui:pointer-events-none ui:absolute ui:right-2 ui:flex ui:size-4 ui:items-center ui:justify-center"}),children:h.jsx(_e.CheckIcon,{className:"ui:pointer-events-none ui:size-4 ui:pointer-coarse:size-5"})})]})}function XJ({className:e,...t}){return h.jsx(sk,{"data-slot":"combobox-empty",className:F("ui:text-muted-foreground ui:hidden ui:w-full ui:justify-center ui:py-2 ui:text-center ui:text-sm ui:group-data-empty/combobox-content:flex",e),...t})}function ZJ({className:e,...t}){return h.jsx(ak,{"data-slot":"combobox-separator",className:F("ui:bg-border ui:-mx-1 ui:my-1 ui:h-px",e),...t})}function JJ({className:e,...t}){return h.jsx(ck,{"data-slot":"combobox-chips",className:F("ui:dark:bg-input/30 ui:border-input ui:focus-within:border-ring ui:focus-within:ring-ring/50 ui:has-aria-invalid:ring-destructive/20 ui:dark:has-aria-invalid:ring-destructive/40 ui:has-aria-invalid:border-destructive ui:dark:has-aria-invalid:border-destructive/50 ui:flex ui:min-h-9 ui:flex-wrap ui:items-center ui:gap-1.5 ui:rounded-md ui:border ui:bg-transparent ui:bg-clip-padding ui:px-2.5 ui:py-1.5 ui:text-sm ui:shadow-xs ui:transition-[color,box-shadow] ui:focus-within:ring-[3px] ui:has-aria-invalid:ring-[3px] ui:has-data-[slot=combobox-chip]:px-1.5",e),...t})}function KJ({className:e,children:t,showRemove:n=!0,...r}){return h.jsxs(dk,{"data-slot":"combobox-chip",className:F("ui:bg-muted ui:text-foreground ui:flex ui:h-[calc(--spacing(5.5))] ui:w-fit ui:items-center ui:justify-center ui:gap-1 ui:rounded-sm ui:px-1.5 ui:text-xs ui:font-medium ui:whitespace-nowrap ui:has-disabled:pointer-events-none ui:has-disabled:cursor-not-allowed ui:has-disabled:opacity-50 ui:has-data-[slot=combobox-chip-remove]:pr-0",e),...r,children:[t,n&&h.jsx(fk,{render:h.jsx(on,{variant:"ghost",size:"xs",className:"ui:hover:bg-transparent"}),className:"ui:-ml-1 ui:opacity-50 ui:hover:opacity-100","data-slot":"combobox-chip-remove",children:h.jsx(_e.XIcon,{className:"ui:pointer-events-none"})})]})}function QJ({className:e,...t}){return h.jsx(J0,{"data-slot":"combobox-chip-input",className:F("ui:min-w-16 ui:flex-1 ui:outline-none",e),...t})}function eK(){return b.useRef(null)}const tK=e=>e.label,nK=(e,t)=>e.value===t.value,tx=({items:e,label:t,multiple:n=!1,hasClearButton:r=!1,disabled:o=!1,placeholder:i="Select...",containerClassName:s,emptyMessage:a="No results found.",hasAllOption:l=!1,allOptionLabel:u="All",inputMode:c="input",renderPopupTrigger:d,onInputChange:f,value:p,onValueChange:g})=>{const m=eK(),v=p??[],y=N.useMemo(()=>e.filter(R=>!R.disabled),[e]),x=n&&v.length===y.length&&y.length>0,w=N.useCallback(()=>{const I=v.length===y.length&&y.length>0?[]:y;g(I)},[y,v.length,g]),C=N.useCallback(R=>{Array.isArray(R)?g(R):g(R===null?[]:[R])},[g]),S=N.useCallback(R=>{f?.(R.target.value)},[f]);return h.jsxs("article",{className:s,children:[t&&h.jsx(gr,{className:"ui:mb-2",children:t}),h.jsxs(WJ,{multiple:n,autoHighlight:!0,items:e,itemToStringValue:tK,isItemEqualToValue:nK,disabled:o,value:n?v:v[0]??null,onValueChange:C,children:[h.jsxs(_r,{children:[h.jsx(rn,{condition:c==="popup",children:h.jsx(gk,{render:d?d(h.jsx(km,{placeholder:i}),v):h.jsx(on,{variant:"outline",className:"ui:w-full ui:font-normal ui:text-left ui:overflow-hidden ui:truncate ui:line-clamp-1",children:h.jsx(km,{placeholder:i})})})}),h.jsx(rn,{condition:n&&c==="input",children:h.jsx(JJ,{ref:m,className:"ui:w-full",children:h.jsx(km,{children:R=>h.jsxs(N.Fragment,{children:[R.map(I=>h.jsx(KJ,{children:I.label},I.value)),h.jsx(QJ,{placeholder:R.length?"":i,onChange:S})]})})})}),h.jsx(rn,{condition:!n&&c==="input",children:h.jsx(tI,{className:"ui:w-full",placeholder:i,showClear:r,disabled:o,onChange:S})})]}),h.jsxs(qJ,{className:"ui:min-w-64",anchor:m&&n&&c==="input"?m:void 0,children:[c==="popup"&&h.jsx(tI,{showTrigger:!1,placeholder:"Search...",onChange:S}),h.jsx(XJ,{children:a}),l&&n&&h.jsxs("div",{className:"ui:group-data-empty/combobox-content:hidden",children:[h.jsx("div",{className:F("ui:p-1 ui:pb-0",c==="popup"?"ui:mt-1":""),children:h.jsxs("div",{role:"option","aria-selected":x,onClick:w,className:F("ui:relative ui:flex ui:w-full ui:cursor-default ui:items-center ui:gap-2 ui:rounded-sm ui:py-1.5 ui:pr-8 ui:pl-2 ui:text-sm ui:outline-hidden ui:select-none","ui:hover:bg-accent ui:hover:text-accent-foreground"),children:[u,x&&h.jsx("span",{className:"ui:pointer-events-none ui:absolute ui:right-2 ui:flex ui:size-4 ui:items-center ui:justify-center",children:h.jsx(_e.CheckIcon,{className:"ui:pointer-events-none ui:size-4"})})]})}),h.jsx(ZJ,{})]}),h.jsx(UJ,{children:R=>h.jsx(YJ,{value:R,disabled:!!R?.disabled,children:R.label},R.value)})]})]})]})},rK="dd/MM/yyyy",oK=({date:e,format:t=rK})=>e?h.jsx(h.Fragment,{children:Ws(e,t)}):null;function nx({...e}){return h.jsx(Z3,{"data-slot":"popover",...e})}const Mf=b.forwardRef(({...e},t)=>h.jsx(mN,{"data-slot":"popover-trigger",ref:t,...e}));Mf.displayName=mN.displayName;const Df=b.forwardRef(({className:e,align:t="center",sideOffset:n=4,...r},o)=>h.jsx(J3,{children:h.jsx(bN,{ref:o,"data-slot":"popover-content",align:t,sideOffset:n,className:F("ui-lib-root ui:z-[102] ui:w-72 ui:rounded-md ui:border ui:bg-popover ui:p-4 ui:text-popover-foreground ui:shadow-md ui:outline-none ui:data-[state=open]:animate-in ui:data-[state=closed]:animate-out ui:data-[state=closed]:fade-out-0 ui:data-[state=open]:fade-in-0 ui:data-[state=closed]:zoom-out-95 ui:data-[state=open]:zoom-in-95 ui:data-[side=bottom]:slide-in-from-top-2 ui:data-[side=left]:slide-in-from-right-2 ui:data-[side=right]:slide-in-from-left-2 ui:data-[side=top]:slide-in-from-bottom-2",e),...r})}));Df.displayName=bN.displayName;const mk=b.forwardRef(({...e},t)=>h.jsx(gN,{"data-slot":"popover-anchor",ref:t,...e}));mk.displayName=gN.displayName;const bk=({start:e,end:t,onConfirm:n,className:r,triggerButtonClassName:o,label:i,placeholder:s,confirmLabel:a="Confirm",disabledCondition:l,dateLocale:u})=>{const[c,d]=N.useState(!1),[f,p]=N.useState(e&&t?{from:e,to:t}:void 0),g=()=>{!f?.from||!f?.to||(n({from:f.from,to:f.to}),d(!1))};return h.jsxs("div",{className:F("ui:grid ui:gap-2",r),children:[i&&h.jsx(gr,{children:i}),h.jsxs(nx,{open:c,onOpenChange:d,children:[h.jsx(Mf,{asChild:!0,children:h.jsxs(on,{id:"date",variant:"outline",className:F("ui:h-auto ui:text-muted-foreground ui:justify-start ui:text-left ui:font-normal",!f&&"ui:text-muted-foreground",o),children:[h.jsx(_e.Calendar,{className:"ui:mr-2 ui:h-4 ui:w-4"}),f?.from?f.to?h.jsxs(h.Fragment,{children:[Ws(f.from,"LLL dd, y",{locale:u})," -",Ws(f.to,"LLL dd, y",{locale:u})]}):Ws(f.from,"LLL dd, y",{locale:u}):h.jsx("span",{children:s})]})}),h.jsxs(Df,{className:"ui:w-auto ui:p-0",align:"start",children:[h.jsx(e0,{mode:"range",defaultMonth:f?.from??new Date,selected:f,onSelect:p,numberOfMonths:2,disabled:l,locale:u}),h.jsx("div",{className:F("ui:px-3 ui:pb-4 ui:pt-2","ui:flex ui:justify-start ui:md:justify-end"),children:h.jsx(on,{variant:"success",onClick:g,className:"ui:w-full ui:md:w-max",children:a})})]})]})]})};function vk({value:e,onChange:t,className:n,inputClassName:r,name:o,placeholder:i,label:s}){const[a,l]=N.useState(e),u=N.useRef(null),c=N.useRef(t);N.useEffect(()=>{c.current=t},[t]);const d=N.useCallback(p=>{u.current&&clearTimeout(u.current),u.current=setTimeout(()=>{p.length>=3?c.current(p):c.current("")},300)},[]),f=p=>{const g=decodeURIComponent(p);l(g),d(g)};return h.jsxs("search",{className:F("ui:w-full",n),children:[s&&h.jsx(gr,{htmlFor:o,className:"ui:leading-6 ui:w-full",children:s}),h.jsx(vu,{type:"search",name:o,id:o,"data-test-id":o,placeholder:i,value:a,onChange:({target:p})=>f(p.value),className:F("ui:max-h-10",r),autoFocus:!0})]})}const iK=({banner:e,campaignName:t,isControlled:n,open:r,setOpen:o,imageClassName:i})=>h.jsxs(S0,{...n&&{open:r,onOpenChange:o},children:[!n&&h.jsx(FM,{asChild:!0,children:h.jsx("div",{className:"ui:cursor-pointer",children:h.jsx("img",{className:F("ui:w-full ui:max-w-80 ui:mx-auto ui:mt-4! ui:scale-100 ui:hover:scale-110 ui:transition-all ui:duration-300 ui:aspect-video",i),src:e,alt:t})})}),h.jsxs(E0,{className:"ui:max-w-2xl",children:[h.jsx(I0,{children:h.jsx(R0,{children:t})}),h.jsx("img",{className:F("ui:w-full ui:aspect-video",i),src:e,alt:t})]})]});function sK(e){if(typeof document>"u")return;let t=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",t.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}const yk=N.createContext({drawerRef:{current:null},overlayRef:{current:null},onPress:()=>{},onRelease:()=>{},onDrag:()=>{},onNestedDrag:()=>{},onNestedOpenChange:()=>{},onNestedRelease:()=>{},openProp:void 0,dismissible:!1,isOpen:!1,isDragging:!1,keyboardIsOpen:{current:!1},snapPointsOffset:null,snapPoints:null,handleOnly:!1,modal:!1,shouldFade:!1,activeSnapPoint:null,onOpenChange:()=>{},setActiveSnapPoint:()=>{},closeDrawer:()=>{},direction:"bottom",shouldAnimate:{current:!0},shouldScaleBackground:!1,setBackgroundColorOnScale:!0,noBodyStyles:!1,container:null,autoFocus:!1}),yu=()=>{const e=N.useContext(yk);if(!e)throw new Error("useDrawerContext must be used within a Drawer.Root");return e};sK(`[data-vaul-drawer]{touch-action:none;will-change:transform;transition:transform .5s cubic-bezier(.32, .72, 0, 1);animation-duration:.5s;animation-timing-function:cubic-bezier(0.32,0.72,0,1)}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=bottom][data-state=open]{animation-name:slideFromBottom}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=bottom][data-state=closed]{animation-name:slideToBottom}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=top][data-state=open]{animation-name:slideFromTop}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=top][data-state=closed]{animation-name:slideToTop}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=left][data-state=open]{animation-name:slideFromLeft}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=left][data-state=closed]{animation-name:slideToLeft}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=right][data-state=open]{animation-name:slideFromRight}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=right][data-state=closed]{animation-name:slideToRight}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=bottom]{transform:translate3d(0,var(--initial-transform,100%),0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=top]{transform:translate3d(0,calc(var(--initial-transform,100%) * -1),0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=left]{transform:translate3d(calc(var(--initial-transform,100%) * -1),0,0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=right]{transform:translate3d(var(--initial-transform,100%),0,0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=top]{transform:translate3d(0,var(--snap-point-height,0),0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=bottom]{transform:translate3d(0,var(--snap-point-height,0),0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=left]{transform:translate3d(var(--snap-point-height,0),0,0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=right]{transform:translate3d(var(--snap-point-height,0),0,0)}[data-vaul-overlay][data-vaul-snap-points=false]{animation-duration:.5s;animation-timing-function:cubic-bezier(0.32,0.72,0,1)}[data-vaul-overlay][data-vaul-snap-points=false][data-state=open]{animation-name:fadeIn}[data-vaul-overlay][data-state=closed]{animation-name:fadeOut}[data-vaul-animate=false]{animation:none!important}[data-vaul-overlay][data-vaul-snap-points=true]{opacity:0;transition:opacity .5s cubic-bezier(.32, .72, 0, 1)}[data-vaul-overlay][data-vaul-snap-points=true]{opacity:1}[data-vaul-drawer]:not([data-vaul-custom-container=true])::after{content:'';position:absolute;background:inherit;background-color:inherit}[data-vaul-drawer][data-vaul-drawer-direction=top]::after{top:initial;bottom:100%;left:0;right:0;height:200%}[data-vaul-drawer][data-vaul-drawer-direction=bottom]::after{top:100%;bottom:initial;left:0;right:0;height:200%}[data-vaul-drawer][data-vaul-drawer-direction=left]::after{left:initial;right:100%;top:0;bottom:0;width:200%}[data-vaul-drawer][data-vaul-drawer-direction=right]::after{left:100%;right:initial;top:0;bottom:0;width:200%}[data-vaul-overlay][data-vaul-snap-points=true]:not([data-vaul-snap-points-overlay=true]):not(
|
|
86
|
+
)`}return h.jsx("div",{ref:n,role:"presentation","data-base-ui-inert":"",...o,style:{position:"fixed",inset:0,userSelect:"none",WebkitUserSelect:"none",clipPath:i}})});process.env.NODE_ENV!=="production"&&(LD.displayName="InternalBackdrop");function uJ(e){const t=b.useRef(!0);t.current&&(t.current=!1,e())}const $0=b.createContext(void 0);process.env.NODE_ENV!=="production"&&($0.displayName="ComboboxRootContext");const G0=b.createContext(void 0);process.env.NODE_ENV!=="production"&&(G0.displayName="ComboboxFloatingContext");const H0=b.createContext(void 0);process.env.NODE_ENV!=="production"&&(H0.displayName="ComboboxDerivedItemsContext");const W0=b.createContext("");process.env.NODE_ENV!=="production"&&(W0.displayName="ComboboxInputValueContext");function Gn(){const e=b.useContext($0);if(!e)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: ComboboxRootContext is missing. Combobox parts must be placed within <Combobox.Root>.":Fr(22));return e}function _f(){const e=b.useContext(G0);if(!e)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: ComboboxFloatingContext is missing. Combobox parts must be placed within <Combobox.Root>.":Fr(23));return e}function Ii(){const e=b.useContext(H0);if(!e)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: ComboboxItemsContext is missing. Combobox parts must be placed within <Combobox.Root>.":Fr(24));return e}function z0(){return b.useContext(W0)}const cJ=(e,t)=>Object.is(e,t);function ns(e,t,n){return e==null||t==null?Object.is(e,t):n(e,t)}function dJ(e,t,n){return!e||e.length===0?!1:e.some(r=>r===void 0?!1:ns(t,r,n))}function gd(e,t,n){return!e||e.length===0?-1:e.findIndex(r=>r===void 0?!1:ns(r,t,n))}function fJ(e,t,n){return e.filter(r=>!ns(t,r,n))}function mv(e){if(e==null)return"";if(typeof e=="string")return e;try{return JSON.stringify(e)}catch{return String(e)}}function q0(e){return e!=null&&e.length>0&&typeof e[0]=="object"&&e[0]!=null&&"items"in e[0]}function pJ(e){if(!Array.isArray(e))return e!=null&&!("null"in e);if(q0(e)){for(const t of e)for(const n of t.items)if(n&&n.value==null&&n.label!=null)return!0;return!1}for(const t of e)if(t&&t.value==null&&t.label!=null)return!0;return!1}function On(e,t){if(t&&e!=null)return t(e)??"";if(e&&typeof e=="object"){if("label"in e&&e.label!=null)return String(e.label);if("value"in e)return String(e.value)}return mv(e)}function $a(e,t){return t&&e!=null?t(e)??"":e&&typeof e=="object"&&"value"in e&&"label"in e?mv(e.value):mv(e)}function FD(e,t,n){function r(){return On(e,n)}if(n&&e!=null)return n(e);if(e&&typeof e=="object"&&"label"in e&&e.label!=null)return e.label;if(t&&!Array.isArray(t))return t[e]??r();if(Array.isArray(t)){const o=q0(t)?t.flatMap(i=>i.items):t;if(e==null||typeof e!="object"){const i=o.find(s=>s.value===e);return i&&i.label!=null?i.label:r()}if("value"in e){const i=o.find(s=>s&&s.value===e.value);if(i&&i.label!=null)return i.label}}return r()}function hJ(e,t,n){return e.reduce((r,o,i)=>(i>0&&r.push(", "),r.push(h.jsx(b.Fragment,{children:FD(o,t,n)},i)),r),[])}const be={id:De(e=>e.id),query:De(e=>e.query),items:De(e=>e.items),selectedValue:De(e=>e.selectedValue),hasSelectionChips:De(e=>{const t=e.selectedValue;return Array.isArray(t)&&t.length>0}),hasSelectedValue:De(e=>{const{selectedValue:t,selectionMode:n}=e;return t==null?!1:n==="multiple"&&Array.isArray(t)?t.length>0:!0}),hasNullItemLabel:De((e,t)=>t?pJ(e.items):!1),open:De(e=>e.open),mounted:De(e=>e.mounted),forceMounted:De(e=>e.forceMounted),inline:De(e=>e.inline),activeIndex:De(e=>e.activeIndex),selectedIndex:De(e=>e.selectedIndex),isActive:De((e,t)=>e.activeIndex===t),isSelected:De((e,t)=>{const n=e.isItemEqualToValue,r=e.selectedValue;return Array.isArray(r)?r.some(o=>ns(t,o,n)):ns(t,r,n)}),transitionStatus:De(e=>e.transitionStatus),popupProps:De(e=>e.popupProps),inputProps:De(e=>e.inputProps),triggerProps:De(e=>e.triggerProps),getItemProps:De(e=>e.getItemProps),positionerElement:De(e=>e.positionerElement),listElement:De(e=>e.listElement),triggerElement:De(e=>e.triggerElement),inputElement:De(e=>e.inputElement),popupSide:De(e=>e.popupSide),openMethod:De(e=>e.openMethod),inputInsidePopup:De(e=>e.inputInsidePopup),selectionMode:De(e=>e.selectionMode),listRef:De(e=>e.listRef),labelsRef:De(e=>e.labelsRef),popupRef:De(e=>e.popupRef),emptyRef:De(e=>e.emptyRef),inputRef:De(e=>e.inputRef),keyboardActiveRef:De(e=>e.keyboardActiveRef),chipsContainerRef:De(e=>e.chipsContainerRef),clearRef:De(e=>e.clearRef),valuesRef:De(e=>e.valuesRef),allValuesRef:De(e=>e.allValuesRef),name:De(e=>e.name),disabled:De(e=>e.disabled),readOnly:De(e=>e.readOnly),required:De(e=>e.required),grid:De(e=>e.grid),isGrouped:De(e=>e.isGrouped),virtualized:De(e=>e.virtualized),onOpenChangeComplete:De(e=>e.onOpenChangeComplete),openOnInputClick:De(e=>e.openOnInputClick),itemToStringLabel:De(e=>e.itemToStringLabel),isItemEqualToValue:De(e=>e.isItemEqualToValue),modal:De(e=>e.modal),autoHighlight:De(e=>e.autoHighlight),submitOnItemClick:De(e=>e.submitOnItemClick)};let JE=(function(e){return e.disabled="data-disabled",e.valid="data-valid",e.invalid="data-invalid",e.touched="data-touched",e.dirty="data-dirty",e.filled="data-filled",e.focused="data-focused",e})({});const gJ={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valid:null,valueMissing:!1},mJ={valid(e){return e===null?null:e?{[JE.valid]:""}:{[JE.invalid]:""}}},BD=b.createContext({invalid:void 0,name:void 0,validityData:{state:gJ,errors:[],error:"",value:"",initialValue:null},setValidityData:Lt,disabled:void 0,touched:!1,setTouched:Lt,dirty:!1,setDirty:Lt,filled:!1,setFilled:Lt,focused:!1,setFocused:Lt,validate:()=>null,validationMode:"onSubmit",validationDebounceTime:0,shouldValidateOnChange:()=>!1,state:{disabled:!1,valid:null,touched:!1,dirty:!1,filled:!1,focused:!1},markedDirtyRef:{current:!1},validation:{getValidationProps:(e=En)=>e,getInputValidationProps:(e=En)=>e,inputRef:{current:null},commit:async()=>{}}});process.env.NODE_ENV!=="production"&&(BD.displayName="FieldRootContext");function bu(e=!0){const t=b.useContext(BD);if(t.setValidityData===Lt&&!e)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: FieldRootContext is missing. Field parts must be placed within <Field.Root>.":Fr(28));return t}function bJ(e,t){return{...e,state:{...e.state,valid:!t&&e.state.valid}}}const VD=b.createContext({formRef:{current:{fields:new Map}},errors:{},clearErrors:Lt,validationMode:"onSubmit",submitAttemptedRef:{current:!1}});process.env.NODE_ENV!=="production"&&(VD.displayName="FormContext");function $D(){return b.useContext(VD)}function vJ(e){const{enabled:t=!0,value:n,id:r,name:o,controlRef:i,commit:s}=e,{formRef:a}=$D(),{invalid:l,markedDirtyRef:u,validityData:c,setValidityData:d}=bu(),f=ke(e.getValue);Ge(()=>{if(!t)return;let p=n;p===void 0&&(p=f()),c.initialValue===null&&p!==null&&d(g=>({...g,initialValue:p}))},[t,d,n,c.initialValue,f]),Ge(()=>{!t||!r||a.current.fields.set(r,{getValue:f,name:o,controlRef:i,validityData:bJ(c,l),validate(p=!0){let g=n;g===void 0&&(g=f()),u.current=!0,p?so.flushSync(()=>s(g)):s(g)}})},[s,i,t,a,f,r,l,u,o,c,n]),Ge(()=>{const p=a.current.fields;return()=>{r&&p.delete(r)}},[a,r])}const GD=b.createContext({controlId:void 0,registerControlId:Lt,labelId:void 0,setLabelId:Lt,messageIds:[],setMessageIds:Lt,getDescriptionProps:e=>e});process.env.NODE_ENV!=="production"&&(GD.displayName="LabelableContext");function U0(){return b.useContext(GD)}function HD(e={}){const{id:t,implicit:n=!1,controlRef:r}=e,{controlId:o,registerControlId:i}=U0(),s=tD(t),a=n?o:void 0,l=cr(()=>Symbol("labelable-control")),u=b.useRef(!1),c=b.useRef(t!=null),d=ke(()=>{!u.current||i===Lt||(u.current=!1,i(l.current,void 0))});return Ge(()=>{if(i===Lt)return;let f;if(n){const p=r?.current;Ot(p)&&p.closest("label")!=null?f=t??null:f=a??s}else if(t!=null)c.current=!0,f=t;else if(c.current)f=s;else{d();return}if(f===void 0){d();return}u.current=!0,i(l.current,f)},[t,r,a,i,n,s,l,d]),b.useEffect(()=>d,[d]),o??s}function yJ(e,t){return(n,r)=>{if(n==null)return!1;const o=On(n,t);return e.contains(o,r)}}function xJ(e,t,n){return(r,o)=>{if(r==null)return!1;if(!o)return!0;const i=On(r,t),s=n!=null?On(n,t):"";return s&&e.contains(s,o)&&s.length===o.length?!0:e.contains(i,o)}}const KE=new Map;function WD(e){return Array.isArray(e)?e.map(t=>WD(t)).join(","):e==null?"":String(e)}function wJ(e={}){const t={usage:"search",sensitivity:"base",ignorePunctuation:!0,...e},n=`${WD(e.locale)}|${JSON.stringify(t)}`,r=KE.get(n);if(r)return r;const o=new Intl.Collator(e.locale,t),i={contains(s,a,l){if(!a)return!0;const u=On(s,l);for(let c=0;c<=u.length-a.length;c+=1)if(o.compare(u.slice(c,c+a.length),a)===0)return!0;return!1},startsWith(s,a,l){if(!a)return!0;const u=On(s,l);return o.compare(u.slice(0,a.length),a)===0},endsWith(s,a,l){if(!a)return!0;const u=On(s,l),c=a.length;return u.length>=c&&o.compare(u.slice(u.length-c),a)===0}};return KE.set(n,i),i}const CJ=wJ;function oc(e,t){const n=b.useRef(e),r=ke(t);Ge(()=>{n.current!==e&&r(n.current)},[e,r]),Ge(()=>{n.current=e},[e])}const zD=Symbol("none"),$i={value:zD,index:-1};function SJ(e){const{id:t,onOpenChangeComplete:n,defaultSelectedValue:r=null,selectedValue:o,onSelectedValueChange:i,defaultInputValue:s,inputValue:a,selectionMode:l="none",onItemHighlighted:u,name:c,disabled:d=!1,readOnly:f=!1,required:p=!1,inputRef:g,grid:m=!1,items:v,filteredItems:y,filter:x,openOnInputClick:w=!0,autoHighlight:C=!1,keepHighlight:S=!1,highlightItemOnHover:R=!0,loopFocus:I=!0,itemToStringLabel:T,itemToStringValue:_,isItemEqualToValue:$=cJ,virtualized:A=!1,inline:M=!1,fillInputOnItemPress:O=!0,modal:B=!1,limit:j=-1,autoComplete:D="list",formAutoComplete:V,locale:G,submitOnItemClick:z=!1}=e,{clearErrors:H}=$D(),{setDirty:ne,validityData:W,shouldValidateOnChange:J,setFilled:K,name:U,disabled:oe,setTouched:X,setFocused:te,validationMode:Q,validation:se}=bu(),ae=HD({id:t}),L=CJ({locale:G}),[Z,k]=b.useState(!1),[ie,Y]=b.useState(null),le=b.useRef([]),pe=b.useRef([]),re=b.useRef(null),fe=b.useRef(null),de=b.useRef(null),ve=b.useRef(!0),we=b.useRef(!1),Se=b.useRef(null),Ye=b.useRef(null),at=b.useRef(null),Xe=b.useRef($i),Ue=b.useRef(null),rt=b.useRef([]),et=b.useRef([]),gt=oe||d,ct=U??c,ot=l==="multiple",mt=l==="single",Nt=a!==void 0||s!==void 0,Bt=v!==void 0,tt=y!==void 0;let Ze;C==="always"?Ze="always":Ze=C?"input-change":!1;const[ee,ye]=Rm({controlled:o,default:ot?r??Yu:r,name:"Combobox",state:"selectedValue"}),ge=b.useMemo(()=>x===null?()=>!0:x!==void 0?x:mt&&!Z?xJ(L,T,ee):yJ(L,T),[x,mt,ee,Z,L,T]),xe=cr(()=>Nt?s??"":mt?On(ee,T):"").current,[Ae,Ie]=Rm({controlled:a,default:xe,name:"Combobox",state:"inputValue"}),[qe,Pt]=Rm({controlled:e.open,default:e.defaultOpen,name:"Combobox",state:"open"}),lt=q0(v),it=ie??(Ae===""?"":String(Ae).trim()),_t=mt?On(ee,T):"",Et=mt&&!Z&&it!==""&&_t!==""&&_t.length===it.length&&L.contains(_t,it),sn=Et?"":it,mr=Bt&&tt&&Et,Wn=b.useMemo(()=>v?lt?v.flatMap(Ce=>Ce.items):v:Yu,[v,lt]),pn=b.useMemo(()=>{if(y&&!mr)return y;if(!v)return Yu;if(lt){const Me=v,Ke=[];let It=0;for(const st of Me){if(j>-1&&It>=j)break;const Dt=sn===""?st.items:st.items.filter(zr=>ge(zr,sn,T));if(Dt.length===0)continue;const Xn=j>-1?j-It:1/0,An=Dt.slice(0,Xn);if(An.length>0){const zr={...st,items:An};Ke.push(zr),It+=An.length}}return Ke}if(sn==="")return j>-1?Wn.slice(0,j):Wn;const Ce=[];for(const Me of Wn){if(j>-1&&Ce.length>=j)break;ge(Me,sn,T)&&Ce.push(Me)}return Ce},[y,mr,v,lt,sn,j,ge,T,Wn]),Jt=b.useMemo(()=>lt?pn.flatMap(Me=>Me.items):pn,[pn,lt]),Ve=cr(()=>new DD({id:ae,selectedValue:ee,open:qe,filter:ge,query:it,items:v,selectionMode:l,listRef:le,labelsRef:pe,popupRef:re,emptyRef:de,inputRef:fe,keyboardActiveRef:ve,chipsContainerRef:Se,clearRef:Ye,valuesRef:rt,allValuesRef:et,selectionEventRef:at,name:ct,disabled:gt,readOnly:f,required:p,grid:m,isGrouped:lt,virtualized:A,openOnInputClick:w,itemToStringLabel:T,isItemEqualToValue:$,modal:B,autoHighlight:Ze,submitOnItemClick:z,hasInputValue:Nt,mounted:!1,forceMounted:!1,transitionStatus:"idle",inline:M,activeIndex:null,selectedIndex:null,popupProps:{},inputProps:{},triggerProps:{},positionerElement:null,listElement:null,triggerElement:null,inputElement:null,popupSide:null,openMethod:null,inputInsidePopup:!0,onOpenChangeComplete:n||Lt,setOpen:Lt,setInputValue:Lt,setSelectedValue:Lt,setIndices:Lt,onItemHighlighted:Lt,handleSelection:Lt,getItemProps:()=>En,forceMount:Lt,requestSubmit:Lt})).current,zn=l==="none"?Ae:ee,Sa=b.useMemo(()=>l==="none"?zn:Array.isArray(ee)?ee.map(Ce=>$a(Ce,_)):$a(ee,_),[zn,_,l,ee]),Oi=ke(u),Ni=ke(n),Go=me(Ve,be.activeIndex),nn=me(Ve,be.selectedIndex),Ho=me(Ve,be.positionerElement),Es=me(Ve,be.listElement),bo=me(Ve,be.triggerElement),Pi=me(Ve,be.inputElement),Cn=me(Ve,be.inline),Mt=me(Ve,be.inputInsidePopup),Ea=rr(bo),{mounted:Is,setMounted:Ia,transitionStatus:_i}=M0(qe),{openMethod:Rs,triggerProps:Hr,reset:As}=eJ(qe);vJ({id:ae,name:ct,commit:se.commit,value:zn,controlRef:Mt?Ea:fe,getValue:()=>Sa});const br=ke(()=>{v?pe.current=Jt.map(Ce=>On(Ce,T)):Ve.set("forceMounted",!0)}),qn=b.useRef(ee);Ge(()=>{ee!==qn.current&&br()},[br,ee]);const an=ke(Ce=>{Ve.update(Ce);const Me=Ce.type||"none";if(Ce.activeIndex!==void 0)if(Ce.activeIndex===null)Xe.current!==$i&&(Xe.current=$i,Oi(void 0,Ba(Me,void 0,{index:-1})));else{const Ke=rt.current[Ce.activeIndex];Xe.current={value:Ke,index:Ce.activeIndex},Oi(Ke,Ba(Me,void 0,{index:Ce.activeIndex}))}}),Rn=ke((Ce,Me)=>{if(we.current=Me.reason===ei,e.onInputValueChange?.(Ce,Me),!Me.isCanceled){if(Me.reason===Hs){const Ke=Me.event,It=Ke.inputType;if(Ke.type==="compositionend"||It!=null&&It!==""&&It!=="insertReplacementText"){const Dt=Ce.trim()!=="";Dt&&k(!0),Ue.current={hasQuery:Dt},Dt&&Ze&&Ve.state.activeIndex==null&&Ve.set("activeIndex",0)}}Ie(Ce)}}),vo=ke((Ce,Me)=>{if(qe!==Ce&&(Me.reason==="escape-key"&&Bt&&Jt.length===0&&!Ve.state.emptyRef.current&&Me.allowPropagation(),e.onOpenChange?.(Ce,Me),!Me.isCanceled&&(!Ce&&Z&&(mt?(Cn||Y(it),it===""&&k(!1)):ot&&(Cn||Mt?an({activeIndex:null}):Y(it),Rn("",Qe(ei,Me.event)))),Pt(Ce),!Ce&&Mt&&(Me.reason===Rf||Me.reason===O0)&&(X(!0),te(!1),Q==="onBlur")))){const Ke=l==="none"?Ae:ee;se.commit(Ke)}}),Wo=ke((Ce,Me)=>{if(i?.(Ce,Me),Me.isCanceled)return;ye(Ce),(l==="none"&&re.current&&O||mt&&!Ve.state.inputInsidePopup)&&Rn(On(Ce,T),Qe(Me.reason,Me.event)),mt&&Ce!=null&&Me.reason!==Hs&&Z&&!Cn&&Y(it)}),Ra=ke((Ce,Me)=>{let Ke=Me;if(Ke===void 0){if(Go===null)return;Ke=rt.current[Go]}const It=Nn(Ce),st=at.current??Ce;at.current=null;const Dt=Qe(s7,st),Xn=It?.closest("a")?.getAttribute("href");if(Xn){Xn.startsWith("#")&&vo(!1,Dt);return}if(ot){const An=Array.isArray(ee)?ee:[],Uo=dJ(An,Ke,Ve.state.isItemEqualToValue)?fJ(An,Ke,Ve.state.isItemEqualToValue):[...An,Ke];if(Wo(Uo,Dt),!(fe.current?fe.current.value.trim()!=="":!1))return;Ve.state.inputInsidePopup?Rn("",Qe(ei,Dt.event)):vo(!1,Dt)}else Wo(Ke,Dt),vo(!1,Dt)}),Mi=ke(()=>{if(!Ve.state.submitOnItemClick)return;const Ce=Ve.state.inputElement?.form;Ce&&typeof Ce.requestSubmit=="function"&&Ce.requestSubmit()}),Wr=ke(()=>{if(Ia(!1),Ni?.(!1),k(!1),As(),Y(null),an(l==="none"?{activeIndex:null,selectedIndex:null}:{activeIndex:null}),ot&&fe.current&&fe.current.value!==""&&!we.current&&Rn("",Qe(ei)),mt)if(Ve.state.inputInsidePopup)fe.current&&fe.current.value!==""&&Rn("",Qe(ei));else{const Ce=On(ee,T);fe.current&&fe.current.value!==Ce&&Rn(Ce,Qe(Ce===""?ei:er))}}),Di=b.useMemo(()=>Cn&&Ho?{current:Ho.closest('[role="dialog"]')}:re,[Cn,Ho]);Of({enabled:!e.actionsRef,open:qe,ref:Di,onComplete(){qe||Wr()}}),b.useImperativeHandle(e.actionsRef,()=>({unmount:Wr}),[Wr]),Ge(function(){if(qe||l==="none")return;const Me=v?Wn:et.current;if(ot){const Ke=Array.isArray(ee)?ee:[],It=Ke[Ke.length-1],st=gd(Me,It,$);an({selectedIndex:st===-1?null:st})}else{const Ke=gd(Me,ee,$);an({selectedIndex:Ke===-1?null:Ke})}},[qe,ee,v,l,Wn,ot,$,an]),Ge(()=>{v&&(rt.current=Jt,le.current.length=Jt.length)},[v,Jt]),Ge(()=>{const Ce=Ue.current;if(Ce&&(Ce.hasQuery?Ze&&Ve.set("activeIndex",0):Ze==="always"&&Ve.set("activeIndex",0),Ue.current=null),!qe&&!Cn)return;const Ke=Bt||tt?Jt:rt.current,It=Ve.state.activeIndex;if(It==null){if(Ze==="always"&&Ke.length>0){Ve.set("activeIndex",0);return}Xe.current!==$i&&(Xe.current=$i,Ve.state.onItemHighlighted(void 0,Ba(er,void 0,{index:-1})));return}if(It>=Ke.length){Xe.current!==$i&&(Xe.current=$i,Ve.state.onItemHighlighted(void 0,Ba(er,void 0,{index:-1}))),Ve.set("activeIndex",null);return}const st=Ke[It],Dt=Xe.current.value,Xn=Dt!==zD&&ns(st,Dt,Ve.state.isItemEqualToValue);(Xe.current.index!==It||!Xn)&&(Xe.current={value:st,index:It},Ve.state.onItemHighlighted(st,Ba(er,void 0,{index:It})))},[Go,Ze,tt,Bt,Jt,Cn,qe,Ve]),Ge(()=>{if(l==="none"){K(String(Ae)!=="");return}K(ot?Array.isArray(ee)&&ee.length>0:ee!=null)},[K,l,Ae,ee,ot]),b.useEffect(()=>{Bt&&Ze&&Jt.length===0&&an({activeIndex:null})},[Bt,Ze,Jt.length,an]),oc(it,()=>{!qe||it===""||it===String(xe)||k(!0)}),oc(ee,()=>{if(l!=="none"&&(H(ct),ne(ee!==W.initialValue),J()?se.commit(ee):se.commit(ee,!0),mt&&!Nt&&!Mt)){const Ce=On(ee,T);Ae!==Ce&&Rn(Ce,Qe(er))}}),oc(Ae,()=>{l==="none"&&(H(ct),ne(Ae!==W.initialValue),J()?se.commit(Ae):se.commit(Ae,!0))}),oc(v,()=>{if(!mt||Nt||Mt||Z)return;const Ce=On(ee,T);Ae!==Ce&&Rn(Ce,Qe(er))});const Un=kD({open:Cn?!0:qe,onOpenChange:vo,elements:{reference:Mt?bo:Pi,floating:Ho}});let zo,qo;Cn||(zo=m?"grid":"listbox",qo=qe?"true":"false");const Aa=b.useMemo(()=>{const Ce=Pi?.tagName==="INPUT",Me=Ce||qe,Ke=Ce?{autoComplete:"off",spellCheck:"false",autoCorrect:"off",autoCapitalize:"none"}:{};return Me&&(Ke.role="combobox",Ke["aria-expanded"]=qo,Ke["aria-haspopup"]=zo,Ke["aria-controls"]=qe?Es?.id:void 0,Ke["aria-autocomplete"]=D),{reference:Ke,floating:{role:"presentation"}}},[Pi,qe,qo,zo,Es?.id,D]),Ta=PD(Un,{enabled:!f&&!gt&&w,event:"mousedown-only",toggle:!1,touchOpenDelay:Mt?0:50,reason:l7}),Oa=hZ(Un,{enabled:!f&&!gt&&!Cn,outsidePressEvent:{mouse:"sloppy",touch:"intentional"},bubbles:Cn?!0:void 0,outsidePress(Ce){const Me=Nn(Ce);return!ft(bo,Me)&&!ft(Ye.current,Me)&&!ft(Se.current,Me)}}),Na=JZ(Un,{enabled:!f&&!gt,id:ae,listRef:le,activeIndex:Go,selectedIndex:nn,virtual:!0,loopFocus:I,allowEscape:I&&!Ze,focusItemOnOpen:Z||l==="none"&&!Ze?!1:"auto",focusItemOnHover:R,resetOnPointerLeave:!S,cols:m?2:1,orientation:m?"horizontal":void 0,disabledIndices:Yu,onNavigate(Ce,Me){!Me&&!qe||_i==="ending"||an(Me?{activeIndex:Ce,type:ve.current?"keyboard":"pointer"}:{activeIndex:Ce})}}),{getReferenceProps:yo,getFloatingProps:ki,getItemProps:ji}=UZ([Aa,Ta,Oa,Na]);uJ(()=>{Ve.update({inline:M,popupProps:ki(),inputProps:yo(),triggerProps:Hr,getItemProps:ji,setOpen:vo,setInputValue:Rn,setSelectedValue:Wo,setIndices:an,onItemHighlighted:Oi,handleSelection:Ra,forceMount:br,requestSubmit:Mi})}),Ge(()=>{Ve.update({id:ae,selectedValue:ee,open:qe,mounted:Is,transitionStatus:_i,items:v,inline:M,popupProps:ki(),inputProps:yo(),triggerProps:Hr,openMethod:Rs,getItemProps:ji,selectionMode:l,name:ct,disabled:gt,readOnly:f,required:p,grid:m,isGrouped:lt,virtualized:A,onOpenChangeComplete:Ni,openOnInputClick:w,itemToStringLabel:T,modal:B,autoHighlight:Ze,isItemEqualToValue:$,submitOnItemClick:z,hasInputValue:Nt,requestSubmit:Mi})},[Ve,ae,ee,qe,Is,_i,v,ki,yo,ji,Rs,Hr,l,ct,gt,f,p,se,m,lt,A,Ni,w,T,B,$,z,Nt,M,Mi,Ze]);const xo=Ml(g,se.inputRef),Dn=b.useMemo(()=>({query:it,hasItems:Bt,filteredItems:pn,flatFilteredItems:Jt}),[it,Bt,pn,Jt]),vr=b.useMemo(()=>Array.isArray(zn)?"":$a(zn,_),[zn,_]),yr=ot&&Array.isArray(ee)&&ee.length>0,Li=ot||l==="none"?void 0:ct,Yn=b.useMemo(()=>!ot||!Array.isArray(ee)||!ct?null:ee.map(Ce=>{const Me=$a(Ce,_);return h.jsx("input",{type:"hidden",name:ct,value:Me},Me)}),[ot,ee,ct,_]),Pa=h.jsxs(b.Fragment,{children:[e.children,h.jsx("input",{...se.getInputValidationProps({onFocus(){if(Mt){bo?.focus();return}(fe.current||bo)?.focus()},onChange(Ce){if(Ce.nativeEvent.defaultPrevented)return;const Me=Ce.target.value,Ke=Qe(er,Ce.nativeEvent);function It(){if(ot)return;if(l==="none"){ne(Me!==W.initialValue),Rn(Me,Ke),J()&&se.commit(Me);return}const st=rt.current.find(Dt=>$a(Dt,_).toLowerCase()===Me.toLowerCase());st!=null&&(ne(st!==W.initialValue),Wo?.(st,Ke),J()&&se.commit(st))}v?It():(br(),queueMicrotask(It))}}),id:ae&&Li==null?`${ae}-hidden-input`:void 0,name:Li,autoComplete:V,disabled:gt,required:p&&!yr,readOnly:f,value:vr,ref:xo,style:Li?tZ:L0,tabIndex:-1,"aria-hidden":!0}),Yn]});return h.jsx($0.Provider,{value:Ve,children:h.jsx(G0.Provider,{value:Un,children:h.jsx(H0.Provider,{value:Dn,children:h.jsx(W0.Provider,{value:Ae,children:Pa})})})})}const qD={...aJ,...mJ,popupSide:e=>e?{"data-popup-side":e}:null,listEmpty:e=>e?{"data-list-empty":""}:null};function EJ(e){const t=e.getBoundingClientRect();if(process.env.NODE_ENV!=="production")return t;const n=window.getComputedStyle(e,"::before"),r=window.getComputedStyle(e,"::after");if(!(n.content!=="none"||r.content!=="none"))return t;const i=parseFloat(n.width)||0,s=parseFloat(n.height)||0,a=parseFloat(r.width)||0,l=parseFloat(r.height)||0,u=Math.max(t.width,i,a),c=Math.max(t.height,s,l),d=u-t.width,f=c-t.height;return{left:t.left-d/2,right:t.right+d/2,top:t.top-f/2,bottom:t.bottom+f/2}}const ic=2,UD=b.forwardRef(function(t,n){const{render:r,className:o,nativeButton:i=!0,disabled:s=!1,id:a,...l}=t,{state:u,disabled:c,setTouched:d,setFocused:f,validationMode:p,validation:g}=bu(),{labelId:m}=U0(),v=Gn(),{filteredItems:y}=Ii(),x=me(v,be.selectionMode),w=me(v,be.disabled),C=me(v,be.readOnly),S=me(v,be.required),R=me(v,be.mounted),I=me(v,be.popupSide),T=me(v,be.positionerElement),_=me(v,be.listElement),$=me(v,be.triggerProps),A=me(v,be.triggerElement),M=me(v,be.inputInsidePopup),O=me(v,be.id),B=me(v,be.open),j=me(v,be.selectedValue),D=me(v,be.activeIndex),V=me(v,be.selectedIndex),G=me(v,be.hasSelectedValue),z=_f(),H=z0(),ne=ts(),W=c||w||s,J=y.length===0,K=R&&T?I:null;HD({id:M?a:void 0});const U=M?a??O:a,oe=b.useRef("");function X(Y){oe.current=Y.pointerType}const te=z.useState("domReferenceElement");b.useEffect(()=>{M&&A&&A!==te&&z.set("domReferenceElement",A)},[A,te,z,M]);const{reference:Q}=KZ(z,{enabled:!B&&!C&&!w&&x==="single",listRef:v.state.labelsRef,activeIndex:D,selectedIndex:V,onMatch(Y){const le=v.state.valuesRef.current[Y];le!==void 0&&v.state.setSelectedValue(le,Qe("none"))}}),{reference:se}=PD(z,{enabled:!C&&!w,event:"mousedown"}),{buttonRef:ae,getButtonProps:L}=Af({native:i,disabled:W}),Z={...u,open:B,disabled:W,popupSide:K,listEmpty:J,placeholder:!G},k=ke(Y=>{v.set("triggerElement",Y)});return Mn("button",t,{ref:[n,ae,k],state:Z,props:[$,se,Q,{id:U,tabIndex:M?0:-1,role:M?"combobox":void 0,"aria-expanded":B?"true":"false","aria-haspopup":M?"dialog":"listbox","aria-controls":B?_?.id:void 0,"aria-required":M&&S||void 0,"aria-labelledby":m,onPointerDown:X,onPointerEnter:X,onFocus(){f(!0),!(W||C)&&ne.start(0,v.state.forceMount)},onBlur(Y){if(!ft(T,Y.relatedTarget)&&(d(!0),f(!1),p==="onBlur")){const le=x==="none"?H:j;g.commit(le)}},onMouseDown(Y){if(W||C||(M||z.set("domReferenceElement",Y.currentTarget),v.state.forceMount(),oe.current!=="touch"&&(v.state.inputRef.current?.focus(),M||Y.preventDefault()),B))return;const le=Ht(Y.currentTarget);function pe(re){if(!A)return;const fe=Nn(re),de=v.state.positionerElement,ve=v.state.listElement;if(ft(A,fe)||ft(de,fe)||ft(ve,fe)||fe===A)return;const we=EJ(A),Se=re.clientX>=we.left-ic&&re.clientX<=we.right+ic,Ye=re.clientY>=we.top-ic&&re.clientY<=we.bottom+ic;Se&&Ye||v.state.setOpen(!1,Qe("cancel-open",re))}M&&le.addEventListener("mouseup",pe,{once:!0})},onKeyDown(Y){W||C||(Y.key==="ArrowDown"||Y.key==="ArrowUp")&&(Tt(Y),v.state.setOpen(!0,Qe(dl,Y.nativeEvent)),v.state.inputRef.current?.focus())}},g?g.getValidationProps(l):l,L],stateAttributesMapping:qD})});process.env.NODE_ENV!=="production"&&(UD.displayName="ComboboxTrigger");const Y0=b.createContext(void 0);process.env.NODE_ENV!=="production"&&(Y0.displayName="ComboboxChipsContext");function YD(){return b.useContext(Y0)}const X0=b.createContext(void 0);process.env.NODE_ENV!=="production"&&(X0.displayName="ComboboxPositionerContext");function Z0(e){const t=b.useContext(X0);if(t===void 0&&!e)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: <Combobox.Popup> and <Combobox.Arrow> must be used within the <Combobox.Positioner> component":Fr(21));return t}const J0=b.forwardRef(function(t,n){const{render:r,className:o,disabled:i=!1,id:s,...a}=t,{state:l,disabled:u,setTouched:c,setFocused:d,validationMode:f,validation:p}=bu(),{labelId:g}=U0(),m=YD(),y=!!Z0(!0),x=Gn(),{filteredItems:w}=Ii(),C=z0(),S=YM(),R=me(x,be.required),I=me(x,be.disabled),T=me(x,be.readOnly),_=me(x,be.name),$=me(x,be.selectionMode),A=me(x,be.autoHighlight),M=me(x,be.inputProps),O=me(x,be.triggerProps),B=me(x,be.open),j=me(x,be.mounted),D=me(x,be.selectedValue),V=me(x,be.popupSide),G=me(x,be.positionerElement),z=me(x,be.id),H=me(x,be.inline),ne=!!A,W=j&&G?V:null,J=u||I||i,K=w.length===0,oe=tD(s??(y||H?void 0:z)),[X,te]=b.useState(null),Q=b.useRef(!1),se=b.useRef(null),ae=b.useRef(!1),L=ke(Y=>{const le=y||x.state.inline;le&&!x.state.hasInputValue&&x.state.setInputValue("",Qe(er)),x.update({inputElement:Y,inputInsidePopup:le})}),Z={...l,open:B,disabled:J,readOnly:T,popupSide:W,listEmpty:K};function k(Y){if(!m)return;let le;const{highlightedChipIndex:pe}=m;if(pe!==void 0){if(Y.key==="ArrowLeft")Y.preventDefault(),pe>0?le=pe-1:le=void 0;else if(Y.key==="ArrowRight")Y.preventDefault(),pe<D.length-1?le=pe+1:le=void 0;else if(Y.key==="Backspace"||Y.key==="Delete"){Y.preventDefault();const re=pe>=D.length-1?D.length-2:pe;le=re>=0?re:void 0,x.state.setIndices({activeIndex:null,selectedIndex:null,type:"keyboard"})}return le}return Y.key==="ArrowLeft"&&(Y.currentTarget.selectionStart??0)===0&&D.length>0?(Y.preventDefault(),le=Math.max(D.length-1,0)):Y.key==="Backspace"&&Y.currentTarget.value===""&&D.length>0&&(x.state.setIndices({activeIndex:null,selectedIndex:null,type:"keyboard"}),Y.preventDefault()),le}return Mn("input",t,{state:Z,ref:[n,x.state.inputRef,L],props:[M,O,{type:"text",value:t.value??X??C,"aria-readonly":T||void 0,"aria-required":R||void 0,"aria-labelledby":g,disabled:J,readOnly:T,required:$==="none"?R:void 0,...$==="none"&&_&&{name:_},id:oe,onFocus(){if(d(!0),!H||!ae.current)return;ae.current=!1;const Y=se.current;Y==null||!Object.hasOwn(x.state.valuesRef.current,Y)||x.state.setIndices({activeIndex:Y})},onBlur(){c(!0),d(!1);const Y=x.state.activeIndex;if(H&&Y!==null&&A!=="always"&&(se.current=Y,ae.current=!0,x.state.setIndices({activeIndex:null})),f==="onBlur"){const le=$==="none"?C:D;p.commit(le)}},onCompositionStart(Y){ld||(Q.current=!0,te(Y.currentTarget.value))},onCompositionEnd(Y){Q.current=!1;const le=Y.currentTarget.value;te(null),x.state.setInputValue(le,Qe(Hs,Y.nativeEvent))},onChange(Y){const le=Y.nativeEvent.inputType,pe=!le||le==="insertReplacementText",re=Q.current||!pe;if(Q.current){const we=Y.currentTarget.value;te(we),we===""&&!x.state.openOnInputClick&&!x.state.inputInsidePopup&&x.state.setOpen(!1,Qe(ei,Y.nativeEvent));const Se=we.trim(),Ye=ne&&Se!=="";!T&&!J&&Se&&re&&(x.state.setOpen(!0,Qe(Hs,Y.nativeEvent)),ne||x.state.setIndices({activeIndex:null,selectedIndex:null,type:x.state.keyboardActiveRef.current?"keyboard":"pointer"})),B&&x.state.activeIndex!==null&&!Ye&&x.state.setIndices({activeIndex:null,selectedIndex:null,type:x.state.keyboardActiveRef.current?"keyboard":"pointer"});return}x.state.setInputValue(Y.currentTarget.value,Qe(Hs,Y.nativeEvent));const fe=Y.currentTarget.value==="",de=Qe(ei,Y.nativeEvent);fe&&!x.state.inputInsidePopup&&($==="single"&&x.state.setSelectedValue(null,de),x.state.openOnInputClick||x.state.setOpen(!1,de));const ve=Y.currentTarget.value.trim();!T&&!J&&ve&&re&&(x.state.setOpen(!0,Qe(Hs,Y.nativeEvent)),ne||x.state.setIndices({activeIndex:null,selectedIndex:null,type:x.state.keyboardActiveRef.current?"keyboard":"pointer"})),B&&x.state.activeIndex!==null&&!ne&&x.state.setIndices({activeIndex:null,selectedIndex:null,type:x.state.keyboardActiveRef.current?"keyboard":"pointer"})},onKeyDown(Y){if(J||T||Y.ctrlKey||Y.shiftKey||Y.altKey||Y.metaKey)return;x.state.keyboardActiveRef.current=!0;const le=Y.currentTarget,pe=le.scrollWidth-le.clientWidth,re=S==="rtl";if(Y.key==="Home"){Tt(Y);const ve=PE&&re?le.value.length:0;le.setSelectionRange(ve,ve),le.scrollLeft=0;return}if(Y.key==="End"){Tt(Y);const ve=PE&&re?0:le.value.length;le.setSelectionRange(ve,ve),le.scrollLeft=re?-pe:pe;return}if(!j&&Y.key==="Escape"){const ve=$==="multiple"&&Array.isArray(D)?D.length===0:D===null,we=Qe(eD,Y.nativeEvent),Se=$==="multiple"?[]:null;x.state.setInputValue("",we),x.state.setSelectedValue(Se,we),!ve&&!x.state.inline&&!we.isPropagationAllowed&&Y.stopPropagation();return}if(m&&Y.key==="Backspace"&&le.value===""&&m.highlightedChipIndex===void 0&&Array.isArray(D)&&D.length>0){const ve=D.slice(0,-1);x.state.setIndices({activeIndex:null,selectedIndex:null,type:x.state.keyboardActiveRef.current?"keyboard":"pointer"}),x.state.setSelectedValue(ve,Qe(er,Y.nativeEvent));return}const fe=m?.highlightedChipIndex!==void 0,de=k(Y);if(m?.setHighlightedChipIndex(de),de!==void 0?m?.chipsRef.current[de]?.focus():fe&&x.state.inputRef.current?.focus(),Y.which!==229&&Y.key==="Enter"&&B){const ve=x.state.activeIndex,we=Y.nativeEvent;if(ve===null){x.state.setOpen(!1,Qe(er,we));return}Tt(Y);const Se=x.state.listRef.current[ve];Se&&(x.state.selectionEventRef.current=we,Se.click(),x.state.selectionEventRef.current=null)}},onPointerMove(){x.state.keyboardActiveRef.current=!1},onPointerDown(){x.state.keyboardActiveRef.current=!1}},p?p.getValidationProps(a):a],stateAttributesMapping:qD})});process.env.NODE_ENV!=="production"&&(J0.displayName="ComboboxInput");const IJ={..._0,...sJ},XD=b.forwardRef(function(t,n){const{render:r,className:o,disabled:i=!1,nativeButton:s=!0,keepMounted:a=!1,...l}=t,{disabled:u}=bu(),c=Gn(),d=me(c,be.selectionMode),f=me(c,be.disabled),p=me(c,be.readOnly),g=me(c,be.open),m=me(c,be.selectedValue),v=me(c,be.hasSelectionChips),y=z0();let x=!1;d==="none"?x=y!=="":d==="single"?x=m!=null:x=v;const w=u||f||i,{buttonRef:C,getButtonProps:S}=Af({native:s,disabled:w}),{mounted:R,transitionStatus:I,setMounted:T}=M0(x),_={disabled:w,open:g,transitionStatus:I};Of({open:x,ref:c.state.clearRef,onComplete(){x||T(!1)}});const $=Mn("button",t,{state:_,ref:[n,C,c.state.clearRef],props:[{tabIndex:-1,children:"x",onMouseDown(M){M.preventDefault()},onClick(M){if(w||p)return;const O=c.state.keyboardActiveRef;c.state.setInputValue("",Qe(RE,M.nativeEvent)),d!=="none"?(c.state.setSelectedValue(Array.isArray(m)?[]:null,Qe(RE,M.nativeEvent)),c.state.setIndices({activeIndex:null,selectedIndex:null,type:O.current?"keyboard":"pointer"})):c.state.setIndices({activeIndex:null,type:O.current?"keyboard":"pointer"}),c.state.inputRef.current?.focus()}},l,S],stateAttributesMapping:IJ});return a||R?$:null});process.env.NODE_ENV!=="production"&&(XD.displayName="ComboboxClear");const ZD=b.createContext(null);process.env.NODE_ENV!=="production"&&(ZD.displayName="GroupCollectionContext");function RJ(){return b.useContext(ZD)}function AJ(e){const{children:t}=e,{filteredItems:n}=Ii(),r=RJ(),o=r?r.items:n;return o?h.jsx(b.Fragment,{children:o.map(t)}):null}const JD=b.forwardRef(function(t,n){var r;const{render:o,className:i,children:s,...a}=t,l=Gn(),u=_f(),c=!!Z0(!0),{filteredItems:d}=Ii(),f=me(l,be.items),p=me(l,be.labelsRef),g=me(l,be.listRef),m=me(l,be.selectionMode),v=me(l,be.grid),y=me(l,be.popupProps),x=me(l,be.disabled),w=me(l,be.readOnly),C=me(l,be.virtualized),S=m==="multiple",R=d.length===0,I=ke(O=>{l.set("positionerElement",O)}),T=ke(O=>{l.set("listElement",O)}),_=b.useMemo(()=>typeof s=="function"?r||(r=h.jsx(AJ,{children:s})):s,[s]),$={empty:R},A=u.useState("floatingId"),M=Mn("div",t,{state:$,ref:[n,T,c?null:I],props:[y,{children:_,tabIndex:-1,id:A,role:v?"grid":"listbox","aria-multiselectable":S?"true":void 0,onKeyDown(O){if(!(x||w)&&O.key==="Enter"){const B=l.state.activeIndex;if(B==null)return;Tt(O);const j=O.nativeEvent,D=l.state.listRef.current[B];D&&(l.state.selectionEventRef.current=j,D.click(),l.state.selectionEventRef.current=null)}},onKeyDownCapture(){l.state.keyboardActiveRef.current=!0},onPointerMoveCapture(){l.state.keyboardActiveRef.current=!1}},a]});return C?M:h.jsx(qM,{elementsRef:g,labelsRef:f?void 0:p,children:M})});process.env.NODE_ENV!=="production"&&(JD.displayName="ComboboxList");const K0=b.createContext(void 0);process.env.NODE_ENV!=="production"&&(K0.displayName="ComboboxPortalContext");function TJ(){const e=b.useContext(K0);if(e===void 0)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: <Combobox.Portal> is missing.":Fr(20));return e}const KD=b.forwardRef(function(t,n){const{keepMounted:r=!1,...o}=t,i=Gn(),s=me(i,be.mounted),a=me(i,be.forceMounted);return s||r||a?h.jsx(K0.Provider,{value:r,children:h.jsx(ND,{ref:n,...o})}):null});process.env.NODE_ENV!=="production"&&(KD.displayName="ComboboxPortal");const OJ=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:i,platform:s,elements:a,middlewareData:l}=t,{element:u,padding:c=0,offsetParent:d="real"}=ro(e,t)||{};if(u==null)return{};const f=yy(c),p={x:n,y:r},g=$d(o),m=Vd(g),v=await s.getDimensions(u),y=g==="y",x=y?"top":"left",w=y?"bottom":"right",C=y?"clientHeight":"clientWidth",S=i.reference[m]+i.reference[g]-p[g]-i.floating[m],R=p[g]-i.reference[g],I=d==="real"?await s.getOffsetParent?.(u):a.floating;let T=a.floating[C]||i.floating[m];(!T||!await s.isElement?.(I))&&(T=a.floating[C]||i.floating[m]);const _=S/2-R/2,$=T/2-v[m]/2-1,A=Math.min(f[x],$),M=Math.min(f[w],$),O=A,B=T-v[m]-M,j=T/2-v[m]/2+_,D=Bc(O,j,B),V=!l.arrow&&Fo(o)!=null&&j!==D&&i.reference[m]/2-(j<O?A:M)-v[m]/2<0,G=V?j<O?j-O:j-B:0;return{[g]:p[g]+G,data:{[g]:D,centerOffset:j-D-G,...V&&{alignmentOffset:G}},reset:V}}}),NJ=(e,t)=>({...OJ(e),options:[e,t]}),PJ={name:"hide",async fn(e){const{width:t,height:n,x:r,y:o}=e.rects.reference,i=t===0&&n===0&&r===0&&o===0;return{data:{referenceHidden:(await qT().fn(e)).data?.referenceHidden||i}}}},_J={sideX:"left",sideY:"top"};function QD(e,t,n){const r=e==="inline-start"||e==="inline-end";return{top:"top",right:r?n?"inline-start":"inline-end":"right",bottom:"bottom",left:r?n?"inline-end":"inline-start":"left"}[t]}function QE(e,t,n){const{rects:r,placement:o}=e;return{side:QD(t,Ln(o),n),align:Fo(o)||"center",anchor:{width:r.reference.width,height:r.reference.height},positioner:{width:r.floating.width,height:r.floating.height}}}function MJ(e){const{anchor:t,positionMethod:n="absolute",side:r="bottom",sideOffset:o=0,align:i="center",alignOffset:s=0,collisionBoundary:a,collisionPadding:l=5,sticky:u=!1,arrowPadding:c=5,disableAnchorTracking:d=!1,keepMounted:f=!1,floatingRootContext:p,mounted:g,collisionAvoidance:m,shiftCrossAxis:v=!1,nodeId:y,adaptiveOrigin:x,lazyFlip:w=!1,externalTree:C}=e,[S,R]=b.useState(null);!g&&S!==null&&R(null);const I=m.side||"flip",T=m.align||"flip",_=m.fallbackAxisSide||"end",$=typeof t=="function"?t:void 0,A=ke($),M=$?A:t,O=rr(t),j=YM()==="rtl",D=S||{top:"top",right:"right",bottom:"bottom",left:"left","inline-end":j?"left":"right","inline-start":j?"right":"left"}[r],V=i==="center"?D:`${D}-${i}`;let G=l;const z=1,H=r==="bottom"?z:0,ne=r==="top"?z:0,W=r==="right"?z:0,J=r==="left"?z:0;typeof G=="number"?G={top:G+H,right:G+J,bottom:G+ne,left:G+W}:G&&(G={top:(G.top||0)+H,right:(G.right||0)+J,bottom:(G.bottom||0)+ne,left:(G.left||0)+W});const K={boundary:a==="clipping-ancestors"?"clippingAncestors":a,padding:G},U=b.useRef(null),oe=rr(o),X=rr(s),se=[$T(tt=>{const Ze=QE(tt,r,j),ee=typeof oe.current=="function"?oe.current(Ze):oe.current,ye=typeof X.current=="function"?X.current(Ze):X.current;return{mainAxis:ee,crossAxis:ye,alignmentAxis:ye}},[typeof o!="function"?o:0,typeof s!="function"?s:0,j,r])],ae=T==="none"&&I!=="shift",L=!ae&&(u||v||I==="shift"),Z=I==="none"?null:WT({...K,padding:{top:G.top+z,right:G.right+z,bottom:G.bottom+z,left:G.left+z},mainAxis:!v&&I==="flip",crossAxis:T==="flip"?"alignment":!1,fallbackAxisSideDirection:_}),k=ae?null:GT(tt=>{const Ze=Ht(tt.elements.floating).documentElement;return{...K,rootBoundary:v?{x:0,y:0,width:Ze.clientWidth,height:Ze.clientHeight}:void 0,mainAxis:T!=="none",crossAxis:L,limiter:u||v?void 0:HT(ee=>{if(!U.current)return{};const{width:ye,height:ge}=U.current.getBoundingClientRect(),xe=sr(Ln(ee.placement)),Ae=xe==="y"?ye:ge,Ie=xe==="y"?G.left+G.right:G.top+G.bottom;return{offset:Ae/2+Ie/2}})}},[K,u,v,G,T]);I==="shift"||T==="shift"||i==="center"?se.push(k,Z):se.push(Z,k),se.push(zT({...K,apply({elements:{floating:tt},rects:{reference:Ze},availableWidth:ee,availableHeight:ye}){const ge=tt.style;ge.setProperty("--available-width",`${ee}px`),ge.setProperty("--available-height",`${ye}px`),ge.setProperty("--anchor-width",`${Ze.width}px`),ge.setProperty("--anchor-height",`${Ze.height}px`)}}),NJ(()=>({element:U.current||document.createElement("div"),padding:c,offsetParent:"floating"}),[c]),{name:"transformOrigin",fn(tt){const{elements:Ze,middlewareData:ee,placement:ye,rects:ge,y:xe}=tt,Ae=Ln(ye),Ie=sr(Ae),qe=U.current,Pt=ee.arrow?.x||0,lt=ee.arrow?.y||0,it=qe?.clientWidth||0,_t=qe?.clientHeight||0,Et=Pt+it/2,sn=lt+_t/2,mr=Math.abs(ee.shift?.y||0),Wn=ge.reference.height/2,pn=typeof o=="function"?o(QE(tt,r,j)):o,Jt=mr>pn,Ve={top:`${Et}px calc(100% + ${pn}px)`,bottom:`${Et}px ${-pn}px`,left:`calc(100% + ${pn}px) ${sn}px`,right:`${-pn}px ${sn}px`}[Ae],zn=`${Et}px ${ge.reference.y+Wn-xe}px`;return Ze.floating.style.setProperty("--transform-origin",L&&Ie==="y"&&Jt?zn:Ve),{}}},PJ,x),Ge(()=>{!g&&p&&p.update({referenceElement:null,floatingElement:null,domReferenceElement:null})},[g,p]);const ie=b.useMemo(()=>({elementResize:!d&&typeof ResizeObserver<"u",layoutShift:!d&&typeof IntersectionObserver<"u"}),[d]),{refs:Y,elements:le,x:pe,y:re,middlewareData:fe,update:de,placement:ve,context:we,isPositioned:Se,floatingStyles:Ye}=qZ({rootContext:p,placement:V,middleware:se,strategy:n,whileElementsMounted:f?void 0:(...tt)=>Gc(...tt,ie),nodeId:y,externalTree:C}),{sideX:at,sideY:Xe}=fe.adaptiveOrigin||_J,Ue=Se?n:"fixed",rt=b.useMemo(()=>{const tt=x?{position:Ue,[at]:pe,[Xe]:re}:{position:Ue,...Ye};return Se||(tt.opacity=0),tt},[x,Ue,at,pe,Xe,re,Ye,Se]),et=b.useRef(null);Ge(()=>{if(!g)return;const tt=O.current,Ze=typeof tt=="function"?tt():tt,ye=(eI(Ze)?Ze.current:Ze)||null||null;ye!==et.current&&(Y.setPositionReference(ye),et.current=ye)},[g,Y,M,O]),b.useEffect(()=>{if(!g)return;const tt=O.current;typeof tt!="function"&&eI(tt)&&tt.current!==et.current&&(Y.setPositionReference(tt.current),et.current=tt.current)},[g,Y,M,O]),b.useEffect(()=>{if(f&&g&&le.domReference&&le.floating)return Gc(le.domReference,le.floating,de,ie)},[f,g,le,de,ie]);const gt=Ln(ve),ct=QD(r,gt,j),ot=Fo(ve)||"center",mt=!!fe.hide?.referenceHidden;Ge(()=>{w&&g&&Se&&R(gt)},[w,g,Se,gt]);const Nt=b.useMemo(()=>({position:"absolute",top:fe.arrow?.y,left:fe.arrow?.x}),[fe.arrow]),Bt=fe.arrow?.centerOffset!==0;return b.useMemo(()=>({positionerStyles:rt,arrowStyles:Nt,arrowRef:U,arrowUncentered:Bt,side:ct,align:ot,physicalSide:gt,anchorHidden:mt,refs:Y,context:we,isPositioned:Se,update:de}),[rt,Nt,U,Bt,ct,ot,gt,mt,Y,we,Se,de])}function eI(e){return e!=null&&"current"in e}function ek(e){return e==="starting"?J8:En}const tk=b.forwardRef(function(t,n){const{render:r,className:o,anchor:i,positionMethod:s="absolute",side:a="bottom",align:l="center",sideOffset:u=0,alignOffset:c=0,collisionBoundary:d="clipping-ancestors",collisionPadding:f=5,arrowPadding:p=5,sticky:g=!1,disableAnchorTracking:m=!1,collisionAvoidance:v=Q8,...y}=t,x=Gn(),{filteredItems:w}=Ii(),C=_f(),S=TJ(),R=me(x,be.modal),I=me(x,be.open),T=me(x,be.mounted),_=me(x,be.openMethod),$=me(x,be.triggerElement),A=me(x,be.inputElement),M=me(x,be.inputInsidePopup),O=me(x,be.transitionStatus),B=w.length===0,D=MJ({anchor:i??(M?$:A),floatingRootContext:C,positionMethod:s,mounted:T,side:a,sideOffset:u,align:l,alignOffset:c,arrowPadding:p,collisionBoundary:d,collisionPadding:f,sticky:g,disableAnchorTracking:m,keepMounted:S,collisionAvoidance:v,lazyFlip:!0});K7(I&&R&&_!=="touch",$);const V=b.useMemo(()=>{const W={...D.positionerStyles};return I||(W.pointerEvents="none"),{role:"presentation",hidden:!T,style:W}},[I,T,D.positionerStyles]),G={open:I,side:D.side,align:D.align,anchorHidden:D.anchorHidden,empty:B};Ge(()=>{x.set("popupSide",D.side)},[x,D.side]);const z=b.useMemo(()=>({side:D.side,align:D.align,arrowRef:D.arrowRef,arrowUncentered:D.arrowUncentered,arrowStyles:D.arrowStyles,anchorHidden:D.anchorHidden,isPositioned:D.isPositioned}),[D.side,D.align,D.arrowRef,D.arrowUncentered,D.arrowStyles,D.anchorHidden,D.isPositioned]),H=ke(W=>{x.set("positionerElement",W)}),ne=Mn("div",t,{state:G,ref:[n,H],props:[V,ek(O),y],stateAttributesMapping:jD});return h.jsxs(X0.Provider,{value:z,children:[T&&R&&h.jsx(LD,{inert:lJ(!I),cutout:A??$}),ne]})});process.env.NODE_ENV!=="production"&&(tk.displayName="ComboboxPositioner");const DJ={...jD,..._0},nk=b.forwardRef(function(t,n){const{render:r,className:o,initialFocus:i,finalFocus:s,...a}=t,l=Gn(),u=Z0(),c=_f(),{filteredItems:d}=Ii(),f=me(l,be.mounted),p=me(l,be.open),g=me(l,be.openMethod),m=me(l,be.transitionStatus),v=me(l,be.inputInsidePopup),y=me(l,be.inputElement),x=d.length===0;Of({open:p,ref:l.state.popupRef,onComplete(){p&&l.state.onOpenChangeComplete(!0)}});const w={open:p,side:u.side,align:u.align,anchorHidden:u.anchorHidden,transitionStatus:m,empty:x},C=Mn("div",t,{state:w,ref:[n,l.state.popupRef],props:[{role:v?"dialog":"presentation",tabIndex:-1,onFocus(T){const _=Nn(T.nativeEvent);g!=="touch"&&(ft(l.state.listElement,_)||_===T.currentTarget)&&l.state.inputRef.current?.focus()}},ek(m),a],stateAttributesMapping:DJ}),R=i===void 0?v?T=>T==="touch"?l.state.popupRef.current:y:!1:i;let I;return s!=null?I=s:I=v?void 0:!1,h.jsx(dZ,{context:c,disabled:!f,modal:!v,openInteractionType:g,initialFocus:R,returnFocus:I,children:C})});process.env.NODE_ENV!=="production"&&(nk.displayName="ComboboxPopup");const Q0=b.createContext(void 0);process.env.NODE_ENV!=="production"&&(Q0.displayName="ComboboxItemContext");function rk(){const e=b.useContext(Q0);if(!e)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: ComboboxItemContext is missing. ComboboxItem parts must be placed within <Combobox.Item>.":Fr(19));return e}const ok=b.createContext(!1);process.env.NODE_ENV!=="production"&&(ok.displayName="ComboboxRowContext");function kJ(){return b.useContext(ok)}const ik=b.memo(b.forwardRef(function(t,n){const{render:r,className:o,value:i=null,index:s,disabled:a=!1,nativeButton:l=!1,...u}=t,c=b.useRef(!1),d=b.useRef(null),f=oD({index:s,textRef:d,indexGuessBehavior:rD.GuessFromOrder}),p=Gn(),g=kJ(),{flatFilteredItems:m,hasItems:v}=Ii(),y=me(p,be.open),x=me(p,be.selectionMode),w=me(p,be.readOnly),C=me(p,be.virtualized),S=me(p,be.isItemEqualToValue),R=x!=="none",I=s??(C?gd(m,i,S):f.index),T=f.index!==-1,_=me(p,be.id),$=me(p,be.isActive,I),A=me(p,be.isSelected,i),M=me(p,be.getItemProps),O=b.useRef(null),B=_!=null&&T?`${_}-${I}`:void 0,j=A&&R;Ge(()=>{if(!(T&&(C||s!=null)))return;const U=p.state.listRef.current;return U[I]=O.current,()=>{delete U[I]}},[T,C,I,s,p]),Ge(()=>{if(!T||v)return;const K=p.state.valuesRef.current;return K[I]=i,x!=="none"&&p.state.allValuesRef.current.push(i),()=>{delete K[I]}},[T,v,I,i,p,x]),Ge(()=>{if(!y){c.current=!1;return}if(!T||v)return;const K=p.state.selectedValue,U=Array.isArray(K)?K[K.length-1]:K;ns(i,U,S)&&p.set("selectedIndex",I)},[T,v,y,p,I,i,S]);const D={disabled:a,selected:j,highlighted:$},V=M({active:$,selected:j});V.id=void 0,V.onFocus=void 0;const{getButtonProps:G,buttonRef:z}=Af({disabled:a,focusableWhenDisabled:!0,native:l});function H(K){function U(){p.state.handleSelection(K,i)}p.state.submitOnItemClick?(so.flushSync(U),p.state.requestSubmit()):U()}const ne={id:B,role:g?"gridcell":"option","aria-selected":R?j:void 0,tabIndex:void 0,onPointerDownCapture(K){c.current=!0,K.preventDefault()},onClick(K){a||w||H(K.nativeEvent)},onMouseUp(K){const U=c.current;c.current=!1,!(a||w||K.button!==0||U||!$)&&H(K.nativeEvent)}},W=Mn("div",t,{ref:[z,n,f.ref,O],state:D,props:[V,ne,u,G]}),J=b.useMemo(()=>({selected:j,textRef:d}),[j,d]);return h.jsx(Q0.Provider,{value:J,children:W})}));process.env.NODE_ENV!=="production"&&(ik.displayName="ComboboxItem");const sk=b.forwardRef(function(t,n){const{render:r,className:o,children:i,...s}=t,{filteredItems:a}=Ii(),l=Gn(),u=a.length===0?i:null;return Mn("div",t,{ref:[n,l.state.emptyRef],props:[{children:u,role:"status","aria-live":"polite","aria-atomic":!0},s]})});process.env.NODE_ENV!=="production"&&(sk.displayName="ComboboxEmpty");const ak=b.forwardRef(function(t,n){const{className:r,render:o,orientation:i="horizontal",...s}=t;return Mn("div",t,{state:{orientation:i},ref:n,props:[{role:"separator","aria-orientation":i},s]})});process.env.NODE_ENV!=="production"&&(ak.displayName="Separator");function jJ(e){const{multiple:t=!1,defaultValue:n,value:r,onValueChange:o,autoComplete:i,...s}=e;return h.jsx(SJ,{...s,selectionMode:t?"multiple":"single",selectedValue:r,defaultSelectedValue:n,onSelectedValueChange:o,formAutoComplete:i})}function LJ(e){const{children:t,placeholder:n}=e,r=Gn(),o=me(r,be.itemToStringLabel),i=me(r,be.selectedValue),s=me(r,be.items),a=me(r,be.selectionMode)==="multiple",l=me(r,be.hasSelectedValue),u=!l&&n!=null&&t==null,c=me(r,be.hasNullItemLabel,u);let d=null;return typeof t=="function"?d=t(i):t!=null?d=t:!l&&n!=null&&!c?d=n:a&&Array.isArray(i)?d=hJ(i,s,o):d=FD(i,s,o),h.jsx(b.Fragment,{children:d})}const lk=b.forwardRef(function(t,n){const r=t.keepMounted??!1,{selected:o}=rk();return r||o?h.jsx(uk,{...t,ref:n}):null});process.env.NODE_ENV!=="production"&&(lk.displayName="ComboboxItemIndicator");const uk=b.memo(b.forwardRef((e,t)=>{const{render:n,className:r,keepMounted:o,...i}=e,{selected:s}=rk(),a=b.useRef(null),{transitionStatus:l,setMounted:u}=M0(s),d=Mn("span",e,{ref:[t,a],state:{selected:s,transitionStatus:l},props:[{"aria-hidden":!0,children:"✔️"},i],stateAttributesMapping:_0});return Of({open:s,ref:a,onComplete(){s||u(!1)}}),d}));process.env.NODE_ENV!=="production"&&(uk.displayName="Inner");const ck=b.forwardRef(function(t,n){const{render:r,className:o,...i}=t,s=Gn(),a=me(s,be.open),l=me(s,be.hasSelectionChips),[u,c]=b.useState(void 0);a&&u!==void 0&&c(void 0);const d=b.useRef([]),f=Mn("div",t,{ref:[n,s.state.chipsContainerRef],props:[l?{role:"toolbar"}:En,i]}),p=b.useMemo(()=>({highlightedChipIndex:u,setHighlightedChipIndex:c,chipsRef:d}),[u,c,d]);return h.jsx(Y0.Provider,{value:p,children:h.jsx(qM,{elementsRef:d,children:f})})});process.env.NODE_ENV!=="production"&&(ck.displayName="ComboboxChips");const ex=b.createContext(void 0);process.env.NODE_ENV!=="production"&&(ex.displayName="ComboboxChipContext");function FJ(){const e=b.useContext(ex);if(!e)throw new Error(process.env.NODE_ENV!=="production"?"useComboboxChipContext must be used within a ComboboxChip":Fr(17));return e}const dk=b.forwardRef(function(t,n){const{render:r,className:o,...i}=t,s=Gn(),{setHighlightedChipIndex:a,chipsRef:l}=YD(),u=me(s,be.disabled),c=me(s,be.readOnly),d=me(s,be.selectedValue),{ref:f,index:p}=oD();function g(x){let w=p;if(x.key==="ArrowLeft")x.preventDefault(),p>0?w=p-1:w=void 0;else if(x.key==="ArrowRight")x.preventDefault(),p<d.length-1?w=p+1:w=void 0;else if(x.key==="Backspace"||x.key==="Delete"){const C=p>=d.length-1?d.length-2:p;w=C>=0?C:void 0,Tt(x),s.state.setIndices({activeIndex:null,selectedIndex:null,type:"keyboard"}),s.state.setSelectedValue(d.filter((S,R)=>R!==p),Qe(er,x.nativeEvent))}else x.key==="Enter"||x.key===" "?(Tt(x),w=void 0):x.key==="ArrowDown"||x.key==="ArrowUp"?(Tt(x),s.state.setOpen(!0,Qe(dl,x.nativeEvent)),w=void 0):x.key.length===1&&!x.ctrlKey&&!x.metaKey&&!x.altKey&&(w=void 0);return w}const v=Mn("div",t,{ref:[n,f],state:{disabled:u},props:[{tabIndex:-1,"aria-disabled":u||void 0,"aria-readonly":c||void 0,onKeyDown(x){if(u||c)return;const w=g(x);so.flushSync(()=>{a(w)}),w===void 0?s.state.inputRef.current?.focus():l.current[w]?.focus()},onMouseDown(x){c||(x.preventDefault(),!u&&s.state.inputRef.current?.focus())}},i]}),y=b.useMemo(()=>({index:p}),[p]);return h.jsx(ex.Provider,{value:y,children:v})});process.env.NODE_ENV!=="production"&&(dk.displayName="ComboboxChip");const fk=b.forwardRef(function(t,n){const{render:r,className:o,disabled:i=!1,nativeButton:s=!0,...a}=t,l=Gn(),{index:u}=FJ(),c=me(l,be.disabled),d=me(l,be.readOnly),f=me(l,be.selectedValue),p=me(l,be.isItemEqualToValue),g=c||i,{buttonRef:m,getButtonProps:v}=Af({native:s,disabled:g||d,focusableWhenDisabled:!0}),y={disabled:g};function x(S){const R=l.state.activeIndex;if(R==null)return;const I=gd(l.state.valuesRef.current,S,p);I!==-1&&R===I&&l.state.setIndices({activeIndex:null,type:l.state.keyboardActiveRef.current?"keyboard":"pointer"})}function w(S){const R=Qe(a7,S.nativeEvent),I=f[u];return x(I),l.state.setSelectedValue(f.filter((T,_)=>_!==u),R),l.state.inputRef.current?.focus(),R}return Mn("button",t,{ref:[n,m],state:y,props:[{tabIndex:-1,onClick(S){if(g||d)return;w(S).isPropagationAllowed||S.stopPropagation()},onKeyDown(S){g||d||(S.key==="Enter"||S.key===" ")&&(w(S).isPropagationAllowed||Tt(S))}},a,v]})});process.env.NODE_ENV!=="production"&&(fk.displayName="ComboboxChipRemove");function vu({className:e,type:t,...n}){return h.jsx("input",{type:t,"data-slot":"input",className:F("ui:file:text-foreground ui:placeholder:text-muted-foreground ui:selection:bg-primary ui:selection:text-primary-foreground ui:dark:bg-input/30 ui:border-input ui:h-10 ui:w-full ui:min-w-0 ui:rounded-md ui:border ui:bg-transparent ui:px-3 ui:py-1 ui:text-base ui:shadow-xs ui:transition-[color,box-shadow] ui:outline-none ui:file:inline-flex ui:file:h-7 ui:file:border-0 ui:file:bg-transparent ui:file:text-sm ui:file:font-medium ui:disabled:pointer-events-none ui:disabled:cursor-not-allowed ui:disabled:opacity-50 ui:md:text-sm","ui:focus-visible:border-ring ui:focus-visible:ring-ring/50 ui:focus-visible:ring-[3px]","ui:aria-invalid:ring-destructive/20 ui:dark:aria-invalid:ring-destructive/40 ui:aria-invalid:border-destructive",e),...n})}function pk({className:e,...t}){return h.jsx("textarea",{"data-slot":"textarea",className:F("ui:border-input ui:placeholder:text-muted-foreground ui:focus-visible:border-ring ui:focus-visible:ring-ring/50 ui:aria-invalid:ring-destructive/20 ui:dark:aria-invalid:ring-destructive/40 ui:aria-invalid:border-destructive ui:dark:bg-input/30 ui:flex ui:field-sizing-content ui:min-h-16 ui:w-full ui:rounded-md ui:border ui:bg-transparent ui:px-3 ui:py-2 ui:text-base ui:shadow-xs ui:transition-[color,box-shadow] ui:outline-none ui:focus-visible:ring-[3px] ui:disabled:cursor-not-allowed ui:disabled:opacity-50 ui:md:text-sm",e),...t})}function BJ({className:e,...t}){return h.jsx("div",{"data-slot":"input-group",role:"group",className:F("ui:group/input-group ui:border-input ui:dark:bg-input/30 ui:relative ui:flex ui:w-full ui:items-center ui:rounded-md ui:border ui:shadow-xs ui:transition-[color,box-shadow] ui:outline-none","ui:h-9 ui:min-w-0 ui:has-[>textarea]:h-auto","ui:has-[>[data-align=inline-start]]:[&>input]:pl-2","ui:has-[>[data-align=inline-end]]:[&>input]:pr-2","ui:has-[>[data-align=block-start]]:h-auto ui:has-[>[data-align=block-start]]:flex-col ui:has-[>[data-align=block-start]]:[&>input]:pb-3","ui:has-[>[data-align=block-end]]:h-auto ui:has-[>[data-align=block-end]]:flex-col ui:has-[>[data-align=block-end]]:[&>input]:pt-3","ui:has-[[data-slot=input-group-control]:focus-visible]:border-ring ui:has-[[data-slot=input-group-control]:focus-visible]:ring-ring/50 ui:has-[[data-slot=input-group-control]:focus-visible]:ring-[3px]","ui:has-[[data-slot][aria-invalid=true]]:ring-destructive/20 ui:has-[[data-slot][aria-invalid=true]]:border-destructive ui:dark:has-[[data-slot][aria-invalid=true]]:ring-destructive/40",e),...t})}const VJ=Si("ui:text-muted-foreground ui:flex ui:h-auto ui:cursor-text ui:items-center ui:justify-center ui:gap-2 ui:py-1.5 ui:text-sm ui:font-medium ui:select-none ui:[&>svg:not([class*=size-])]:size-4 ui:[&>kbd]:rounded-[calc(var(--radius)-5px)] ui:group-data-[disabled=true]/input-group:opacity-50",{variants:{align:{"inline-start":"ui:order-first ui:pl-3 ui:has-[>button]:ml-[-0.45rem] ui:has-[>kbd]:ml-[-0.35rem]","inline-end":"ui:order-last ui:pr-3 ui:has-[>button]:mr-[-0.45rem] ui:has-[>kbd]:mr-[-0.35rem]","block-start":"ui:order-first ui:w-full ui:justify-start ui:px-3 ui:pt-3 ui:[.border-b]:pb-3 ui:group-has-[>input]/input-group:pt-2.5","block-end":"ui:order-last ui:w-full ui:justify-start ui:px-3 ui:pb-3 ui:[.border-t]:pt-3 ui:group-has-[>input]/input-group:pb-2.5"}},defaultVariants:{align:"inline-start"}});function $J({className:e,align:t="inline-start",...n}){return h.jsx("div",{role:"group","data-slot":"input-group-addon","data-align":t,className:F(VJ({align:t}),e),onClick:r=>{r.target.closest("button")||r.currentTarget.parentElement?.querySelector("input")?.focus()},...n})}const GJ=Si("ui:text-sm ui:shadow-none ui:flex ui:gap-2 ui:items-center",{variants:{size:{xs:"ui:h-6 ui:gap-1 ui:px-2 ui:rounded-[calc(var(--radius)-5px)] ui:[&>svg:not([class*=size-])]:size-3.5 ui:has-[>svg]:px-2",sm:"ui:h-8 ui:px-2.5 ui:gap-1.5 ui:rounded-md ui:has-[>svg]:px-2.5","icon-xs":"ui:size-6 ui:rounded-[calc(var(--radius)-5px)] ui:p-0 ui:has-[>svg]:p-0","icon-sm":"ui:size-8 ui:p-0 ui:has-[>svg]:p-0"}},defaultVariants:{size:"xs"}});function hk({className:e,type:t="button",variant:n="ghost",size:r="xs",...o}){return h.jsx(on,{type:t,"data-size":r,variant:n,className:F(GJ({size:r}),e),...o})}function HJ({className:e,...t}){return h.jsx(vu,{"data-slot":"input-group-control",className:F("ui:flex-1 ui:rounded-none ui:border-0 ui:bg-transparent ui:shadow-none ui:focus-visible:ring-0 ui:dark:bg-transparent",e),...t})}const WJ=jJ;function km({...e}){return h.jsx(LJ,{"data-slot":"combobox-value",...e})}function gk({className:e,children:t,...n}){return h.jsxs(UD,{"data-slot":"combobox-trigger",className:F("ui:[&_svg:not([class*=size-])]:size-4",e),...n,children:[t,h.jsx(_e.ChevronDownIcon,{"data-slot":"combobox-trigger-icon",className:"ui:text-muted-foreground ui:pointer-events-none ui:size-4"})]})}function zJ({className:e,...t}){return h.jsx(XD,{"data-slot":"combobox-clear",render:h.jsx(hk,{variant:"ghost",size:"icon-xs",className:"ui:rounded-md"}),className:F(e),...t,children:h.jsx(_e.XIcon,{className:"ui:pointer-events-none"})})}function tI({className:e,children:t,disabled:n=!1,showTrigger:r=!0,showClear:o=!1,...i}){return h.jsxs(BJ,{className:F("ui:w-auto",e),children:[h.jsx(J0,{render:h.jsx(HJ,{disabled:n}),...i}),h.jsxs($J,{align:"inline-end",children:[r&&h.jsx(hk,{size:"icon-xs",variant:"ghost",asChild:!0,"data-slot":"input-group-button",className:"ui:group-has-data-[slot=combobox-clear]/input-group:hidden ui:data-pressed:bg-transparent",disabled:n,children:h.jsx(gk,{className:"ui:rounded-md"})}),o&&h.jsx(zJ,{disabled:n})]}),t]})}function qJ({className:e,side:t="bottom",sideOffset:n=6,align:r="start",alignOffset:o=0,anchor:i,...s}){return h.jsx(KD,{children:h.jsx(tk,{side:t,sideOffset:n,align:r,alignOffset:o,anchor:i,className:"ui:isolate ui:z-50",children:h.jsx(nk,{"data-slot":"combobox-content","data-chips":!!i,className:F("ui:bg-popover ui:text-popover-foreground ui:data-open:animate-in ui:data-closed:animate-out ui:data-closed:fade-out-0 ui:data-open:fade-in-0 ui:data-closed:zoom-out-95 ui:data-open:zoom-in-95 ui:data-[side=bottom]:slide-in-from-top-2 ui:data-[side=left]:slide-in-from-right-2 ui:data-[side=right]:slide-in-from-left-2 ui:data-[side=top]:slide-in-from-bottom-2 ui:ring-foreground/10 ui:*:data-[slot=input-group]:bg-input/30 ui:*:data-[slot=input-group]:border-input/30 ui:group/combobox-content ui:relative ui:max-h-96 ui:w-(--anchor-width) ui:max-w-(--available-width) ui:min-w-[calc(var(--anchor-width)+--spacing(7))] ui:origin-(--transform-origin) ui:overflow-hidden ui:rounded-md ui:shadow-md ui:ring-1 ui:duration-100 ui:data-[chips=true]:min-w-(--anchor-width) ui:*:data-[slot=input-group]:m-1 ui:*:data-[slot=input-group]:mb-0 ui:*:data-[slot=input-group]:h-8 ui:*:data-[slot=input-group]:shadow-none",e),...s})})})}function UJ({className:e,...t}){return h.jsx(JD,{"data-slot":"combobox-list",className:F("ui:max-h-[min(calc(--spacing(96)---spacing(9)),calc(var(--available-height)---spacing(9)))] ui:scroll-py-1 ui:overflow-y-auto ui:p-1 ui:data-empty:p-0",e),...t})}function YJ({className:e,children:t,...n}){return h.jsxs(ik,{"data-slot":"combobox-item",className:F("ui:data-highlighted:bg-accent ui:data-highlighted:text-accent-foreground ui:relative ui:flex ui:w-full ui:cursor-default ui:items-center ui:gap-2 ui:rounded-sm ui:py-1.5 ui:pr-8 ui:pl-2 ui:text-sm ui:outline-hidden ui:select-none ui:data-[disabled]:pointer-events-none ui:data-[disabled]:opacity-50 ui:[&_svg]:pointer-events-none ui:[&_svg]:shrink-0 ui:[&_svg:not([class*=size-])]:size-4",e),...n,children:[t,h.jsx(lk,{"data-slot":"combobox-item-indicator",render:h.jsx("span",{className:"ui:pointer-events-none ui:absolute ui:right-2 ui:flex ui:size-4 ui:items-center ui:justify-center"}),children:h.jsx(_e.CheckIcon,{className:"ui:pointer-events-none ui:size-4 ui:pointer-coarse:size-5"})})]})}function XJ({className:e,...t}){return h.jsx(sk,{"data-slot":"combobox-empty",className:F("ui:text-muted-foreground ui:hidden ui:w-full ui:justify-center ui:py-2 ui:text-center ui:text-sm ui:group-data-empty/combobox-content:flex",e),...t})}function ZJ({className:e,...t}){return h.jsx(ak,{"data-slot":"combobox-separator",className:F("ui:bg-border ui:-mx-1 ui:my-1 ui:h-px",e),...t})}function JJ({className:e,...t}){return h.jsx(ck,{"data-slot":"combobox-chips",className:F("ui:dark:bg-input/30 ui:border-input ui:focus-within:border-ring ui:focus-within:ring-ring/50 ui:has-aria-invalid:ring-destructive/20 ui:dark:has-aria-invalid:ring-destructive/40 ui:has-aria-invalid:border-destructive ui:dark:has-aria-invalid:border-destructive/50 ui:flex ui:min-h-9 ui:flex-wrap ui:items-center ui:gap-1.5 ui:rounded-md ui:border ui:bg-transparent ui:bg-clip-padding ui:px-2.5 ui:py-1.5 ui:text-sm ui:shadow-xs ui:transition-[color,box-shadow] ui:focus-within:ring-[3px] ui:has-aria-invalid:ring-[3px] ui:has-data-[slot=combobox-chip]:px-1.5",e),...t})}function KJ({className:e,children:t,showRemove:n=!0,...r}){return h.jsxs(dk,{"data-slot":"combobox-chip",className:F("ui:bg-muted ui:text-foreground ui:flex ui:h-[calc(--spacing(5.5))] ui:w-fit ui:items-center ui:justify-center ui:gap-1 ui:rounded-sm ui:px-1.5 ui:text-xs ui:font-medium ui:whitespace-nowrap ui:has-disabled:pointer-events-none ui:has-disabled:cursor-not-allowed ui:has-disabled:opacity-50 ui:has-data-[slot=combobox-chip-remove]:pr-0",e),...r,children:[t,n&&h.jsx(fk,{render:h.jsx(on,{variant:"ghost",size:"xs",className:"ui:hover:bg-transparent"}),className:"ui:-ml-1 ui:opacity-50 ui:hover:opacity-100","data-slot":"combobox-chip-remove",children:h.jsx(_e.XIcon,{className:"ui:pointer-events-none"})})]})}function QJ({className:e,...t}){return h.jsx(J0,{"data-slot":"combobox-chip-input",className:F("ui:min-w-16 ui:flex-1 ui:outline-none",e),...t})}function eK(){return b.useRef(null)}const tK=e=>e.label,nK=(e,t)=>e.value===t.value,tx=({items:e,label:t,multiple:n=!1,hasClearButton:r=!1,disabled:o=!1,placeholder:i="Select...",containerClassName:s,emptyMessage:a="No results found.",hasAllOption:l=!1,allOptionLabel:u="All",inputMode:c="input",renderPopupTrigger:d,onInputChange:f,value:p,onValueChange:g})=>{const m=eK(),v=p??[],y=N.useMemo(()=>e.filter(R=>!R.disabled),[e]),x=n&&v.length===y.length&&y.length>0,w=N.useCallback(()=>{const I=v.length===y.length&&y.length>0?[]:y;g(I)},[y,v.length,g]),C=N.useCallback(R=>{Array.isArray(R)?g(R):g(R===null?[]:[R])},[g]),S=N.useCallback(R=>{f?.(R.target.value)},[f]);return h.jsxs("article",{className:s,children:[t&&h.jsx(gr,{className:"ui:mb-2",children:t}),h.jsxs(WJ,{multiple:n,autoHighlight:!0,items:e,itemToStringValue:tK,isItemEqualToValue:nK,disabled:o,value:n?v:v[0]??null,onValueChange:C,children:[h.jsxs(_r,{children:[h.jsx(rn,{condition:c==="popup",children:h.jsx(gk,{render:d?d(h.jsx(km,{placeholder:i}),v):h.jsx(on,{variant:"outline",className:"ui:w-full ui:font-normal ui:text-left ui:overflow-hidden ui:truncate ui:line-clamp-1",children:h.jsx(km,{placeholder:i})})})}),h.jsx(rn,{condition:n&&c==="input",children:h.jsx(JJ,{ref:m,className:"ui:w-full",children:h.jsx(km,{children:R=>h.jsxs(N.Fragment,{children:[R.map(I=>h.jsx(KJ,{children:I.label},I.value)),h.jsx(QJ,{placeholder:R.length?"":i,onChange:S})]})})})}),h.jsx(rn,{condition:!n&&c==="input",children:h.jsx(tI,{className:"ui:w-full",placeholder:i,showClear:r,disabled:o,onChange:S})})]}),h.jsxs(qJ,{className:"ui:min-w-64",anchor:m&&n&&c==="input"?m:void 0,children:[c==="popup"&&h.jsx(tI,{showTrigger:!1,placeholder:"Search...",onChange:S}),h.jsx(XJ,{children:a}),l&&n&&h.jsxs("div",{className:"ui:group-data-empty/combobox-content:hidden",children:[h.jsx("div",{className:F("ui:p-1 ui:pb-0",c==="popup"?"ui:mt-1":""),children:h.jsxs("div",{role:"option","aria-selected":x,onClick:w,className:F("ui:relative ui:flex ui:w-full ui:cursor-default ui:items-center ui:gap-2 ui:rounded-sm ui:py-1.5 ui:pr-8 ui:pl-2 ui:text-sm ui:outline-hidden ui:select-none","ui:hover:bg-accent ui:hover:text-accent-foreground"),children:[u,x&&h.jsx("span",{className:"ui:pointer-events-none ui:absolute ui:right-2 ui:flex ui:size-4 ui:items-center ui:justify-center",children:h.jsx(_e.CheckIcon,{className:"ui:pointer-events-none ui:size-4"})})]})}),h.jsx(ZJ,{})]}),h.jsx(UJ,{children:R=>h.jsx(YJ,{value:R,disabled:!!R?.disabled,children:R.label},R.value)})]})]})]})},rK="dd/MM/yyyy",oK=({date:e,format:t=rK})=>e?h.jsx(h.Fragment,{children:Ws(e,t)}):null;function nx({...e}){return h.jsx(Z3,{"data-slot":"popover",...e})}const Mf=b.forwardRef(({...e},t)=>h.jsx(mN,{"data-slot":"popover-trigger",ref:t,...e}));Mf.displayName=mN.displayName;const Df=b.forwardRef(({className:e,align:t="center",sideOffset:n=4,...r},o)=>h.jsx(J3,{children:h.jsx(bN,{ref:o,"data-slot":"popover-content",align:t,sideOffset:n,className:F("ui-lib-root ui:z-[102] ui:w-72 ui:rounded-md ui:border ui:bg-popover ui:p-4 ui:text-popover-foreground ui:shadow-md ui:outline-none ui:data-[state=open]:animate-in ui:data-[state=closed]:animate-out ui:data-[state=closed]:fade-out-0 ui:data-[state=open]:fade-in-0 ui:data-[state=closed]:zoom-out-95 ui:data-[state=open]:zoom-in-95 ui:data-[side=bottom]:slide-in-from-top-2 ui:data-[side=left]:slide-in-from-right-2 ui:data-[side=right]:slide-in-from-left-2 ui:data-[side=top]:slide-in-from-bottom-2",e),...r})}));Df.displayName=bN.displayName;const mk=b.forwardRef(({...e},t)=>h.jsx(gN,{"data-slot":"popover-anchor",ref:t,...e}));mk.displayName=gN.displayName;const bk=({start:e,end:t,onConfirm:n,className:r,triggerButtonClassName:o,label:i,placeholder:s,confirmLabel:a="Confirm",disabledCondition:l,dateLocale:u})=>{const[c,d]=N.useState(!1),[f,p]=N.useState(e&&t?{from:e,to:t}:void 0),g=()=>{!f?.from||!f?.to||(n({from:f.from,to:f.to}),d(!1))};return h.jsxs("div",{className:F("ui:grid ui:gap-2",r),children:[i&&h.jsx(gr,{children:i}),h.jsxs(nx,{open:c,onOpenChange:d,children:[h.jsx(Mf,{asChild:!0,children:h.jsxs(on,{id:"date",variant:"outline",className:F("ui:h-auto ui:text-muted-foreground ui:justify-start ui:text-left ui:font-normal",!f&&"ui:text-muted-foreground",o),children:[h.jsx(_e.Calendar,{className:"ui:h-4 ui:w-4"}),f?.from?f.to?h.jsxs(h.Fragment,{children:[Ws(f.from,"LLL dd, y",{locale:u})," -",Ws(f.to,"LLL dd, y",{locale:u})]}):Ws(f.from,"LLL dd, y",{locale:u}):h.jsx("span",{children:s})]})}),h.jsxs(Df,{className:"ui:w-auto ui:p-0",align:"start",children:[h.jsx(e0,{mode:"range",defaultMonth:f?.from??new Date,selected:f,onSelect:p,numberOfMonths:2,disabled:l,locale:u}),h.jsx("div",{className:F("ui:px-3 ui:pb-4 ui:pt-2","ui:flex ui:justify-start ui:md:justify-end"),children:h.jsx(on,{variant:"success",onClick:g,className:"ui:w-full ui:md:w-max",children:a})})]})]})]})};function vk({value:e,onChange:t,className:n,inputClassName:r,name:o,placeholder:i,label:s}){const[a,l]=N.useState(e),u=N.useRef(null),c=N.useRef(t);N.useEffect(()=>{c.current=t},[t]);const d=N.useCallback(p=>{u.current&&clearTimeout(u.current),u.current=setTimeout(()=>{p.length>=3?c.current(p):c.current("")},300)},[]),f=p=>{const g=decodeURIComponent(p);l(g),d(g)};return h.jsxs("search",{className:F("ui:w-full",n),children:[s&&h.jsx(gr,{htmlFor:o,className:"ui:leading-6 ui:w-full",children:s}),h.jsx(vu,{type:"search",name:o,id:o,"data-test-id":o,placeholder:i,value:a,onChange:({target:p})=>f(p.value),className:F("ui:max-h-10",r),autoFocus:!0})]})}const iK=({banner:e,campaignName:t,isControlled:n,open:r,setOpen:o,imageClassName:i})=>h.jsxs(S0,{...n&&{open:r,onOpenChange:o},children:[!n&&h.jsx(FM,{asChild:!0,children:h.jsx("div",{className:"ui:cursor-pointer",children:h.jsx("img",{className:F("ui:w-full ui:max-w-80 ui:mx-auto ui:mt-4! ui:scale-100 ui:hover:scale-110 ui:transition-all ui:duration-300 ui:aspect-video",i),src:e,alt:t})})}),h.jsxs(E0,{className:"ui:max-w-2xl",children:[h.jsx(I0,{children:h.jsx(R0,{children:t})}),h.jsx("img",{className:F("ui:w-full ui:aspect-video",i),src:e,alt:t})]})]});function sK(e){if(typeof document>"u")return;let t=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",t.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}const yk=N.createContext({drawerRef:{current:null},overlayRef:{current:null},onPress:()=>{},onRelease:()=>{},onDrag:()=>{},onNestedDrag:()=>{},onNestedOpenChange:()=>{},onNestedRelease:()=>{},openProp:void 0,dismissible:!1,isOpen:!1,isDragging:!1,keyboardIsOpen:{current:!1},snapPointsOffset:null,snapPoints:null,handleOnly:!1,modal:!1,shouldFade:!1,activeSnapPoint:null,onOpenChange:()=>{},setActiveSnapPoint:()=>{},closeDrawer:()=>{},direction:"bottom",shouldAnimate:{current:!0},shouldScaleBackground:!1,setBackgroundColorOnScale:!0,noBodyStyles:!1,container:null,autoFocus:!1}),yu=()=>{const e=N.useContext(yk);if(!e)throw new Error("useDrawerContext must be used within a Drawer.Root");return e};sK(`[data-vaul-drawer]{touch-action:none;will-change:transform;transition:transform .5s cubic-bezier(.32, .72, 0, 1);animation-duration:.5s;animation-timing-function:cubic-bezier(0.32,0.72,0,1)}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=bottom][data-state=open]{animation-name:slideFromBottom}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=bottom][data-state=closed]{animation-name:slideToBottom}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=top][data-state=open]{animation-name:slideFromTop}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=top][data-state=closed]{animation-name:slideToTop}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=left][data-state=open]{animation-name:slideFromLeft}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=left][data-state=closed]{animation-name:slideToLeft}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=right][data-state=open]{animation-name:slideFromRight}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=right][data-state=closed]{animation-name:slideToRight}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=bottom]{transform:translate3d(0,var(--initial-transform,100%),0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=top]{transform:translate3d(0,calc(var(--initial-transform,100%) * -1),0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=left]{transform:translate3d(calc(var(--initial-transform,100%) * -1),0,0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=right]{transform:translate3d(var(--initial-transform,100%),0,0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=top]{transform:translate3d(0,var(--snap-point-height,0),0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=bottom]{transform:translate3d(0,var(--snap-point-height,0),0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=left]{transform:translate3d(var(--snap-point-height,0),0,0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=right]{transform:translate3d(var(--snap-point-height,0),0,0)}[data-vaul-overlay][data-vaul-snap-points=false]{animation-duration:.5s;animation-timing-function:cubic-bezier(0.32,0.72,0,1)}[data-vaul-overlay][data-vaul-snap-points=false][data-state=open]{animation-name:fadeIn}[data-vaul-overlay][data-state=closed]{animation-name:fadeOut}[data-vaul-animate=false]{animation:none!important}[data-vaul-overlay][data-vaul-snap-points=true]{opacity:0;transition:opacity .5s cubic-bezier(.32, .72, 0, 1)}[data-vaul-overlay][data-vaul-snap-points=true]{opacity:1}[data-vaul-drawer]:not([data-vaul-custom-container=true])::after{content:'';position:absolute;background:inherit;background-color:inherit}[data-vaul-drawer][data-vaul-drawer-direction=top]::after{top:initial;bottom:100%;left:0;right:0;height:200%}[data-vaul-drawer][data-vaul-drawer-direction=bottom]::after{top:100%;bottom:initial;left:0;right:0;height:200%}[data-vaul-drawer][data-vaul-drawer-direction=left]::after{left:initial;right:100%;top:0;bottom:0;width:200%}[data-vaul-drawer][data-vaul-drawer-direction=right]::after{left:100%;right:initial;top:0;bottom:0;width:200%}[data-vaul-overlay][data-vaul-snap-points=true]:not([data-vaul-snap-points-overlay=true]):not(
|
|
87
87
|
[data-state=closed]
|
|
88
88
|
){opacity:0}[data-vaul-overlay][data-vaul-snap-points-overlay=true]{opacity:1}[data-vaul-handle]{display:block;position:relative;opacity:.7;background:#e2e2e4;margin-left:auto;margin-right:auto;height:5px;width:32px;border-radius:1rem;touch-action:pan-y}[data-vaul-handle]:active,[data-vaul-handle]:hover{opacity:1}[data-vaul-handle-hitarea]{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:max(100%,2.75rem);height:max(100%,2.75rem);touch-action:inherit}@media (hover:hover) and (pointer:fine){[data-vaul-drawer]{user-select:none}}@media (pointer:fine){[data-vaul-handle-hitarea]:{width:100%;height:100%}}@keyframes fadeIn{from{opacity:0}to{opacity:1}}@keyframes fadeOut{to{opacity:0}}@keyframes slideFromBottom{from{transform:translate3d(0,var(--initial-transform,100%),0)}to{transform:translate3d(0,0,0)}}@keyframes slideToBottom{to{transform:translate3d(0,var(--initial-transform,100%),0)}}@keyframes slideFromTop{from{transform:translate3d(0,calc(var(--initial-transform,100%) * -1),0)}to{transform:translate3d(0,0,0)}}@keyframes slideToTop{to{transform:translate3d(0,calc(var(--initial-transform,100%) * -1),0)}}@keyframes slideFromLeft{from{transform:translate3d(calc(var(--initial-transform,100%) * -1),0,0)}to{transform:translate3d(0,0,0)}}@keyframes slideToLeft{to{transform:translate3d(calc(var(--initial-transform,100%) * -1),0,0)}}@keyframes slideFromRight{from{transform:translate3d(var(--initial-transform,100%),0,0)}to{transform:translate3d(0,0,0)}}@keyframes slideToRight{to{transform:translate3d(var(--initial-transform,100%),0,0)}}`);function aK(){const e=navigator.userAgent;return typeof window<"u"&&(/Firefox/.test(e)&&/Mobile/.test(e)||/FxiOS/.test(e))}function lK(){return rx(/^Mac/)}function uK(){return rx(/^iPhone/)}function nI(){return/^((?!chrome|android).)*safari/i.test(navigator.userAgent)}function cK(){return rx(/^iPad/)||lK()&&navigator.maxTouchPoints>1}function xk(){return uK()||cK()}function rx(e){return typeof window<"u"&&window.navigator!=null?e.test(window.navigator.platform):void 0}const dK=24,fK=typeof window<"u"?N.useLayoutEffect:N.useEffect;function rI(...e){return(...t)=>{for(let n of e)typeof n=="function"&&n(...t)}}const jm=typeof document<"u"&&window.visualViewport;function oI(e){let t=window.getComputedStyle(e);return/(auto|scroll)/.test(t.overflow+t.overflowX+t.overflowY)}function wk(e){for(oI(e)&&(e=e.parentElement);e&&!oI(e);)e=e.parentElement;return e||document.scrollingElement||document.documentElement}const pK=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);let sc=0,Lm;function hK(e={}){let{isDisabled:t}=e;fK(()=>{if(!t)return sc++,sc===1&&xk()&&(Lm=gK()),()=>{sc--,sc===0&&Lm?.()}},[t])}function gK(){let e,t=0,n=d=>{e=wk(d.target),!(e===document.documentElement&&e===document.body)&&(t=d.changedTouches[0].pageY)},r=d=>{if(!e||e===document.documentElement||e===document.body){d.preventDefault();return}let f=d.changedTouches[0].pageY,p=e.scrollTop,g=e.scrollHeight-e.clientHeight;g!==0&&((p<=0&&f>t||p>=g&&f<t)&&d.preventDefault(),t=f)},o=d=>{let f=d.target;bv(f)&&f!==document.activeElement&&(d.preventDefault(),f.style.transform="translateY(-2000px)",f.focus(),requestAnimationFrame(()=>{f.style.transform=""}))},i=d=>{let f=d.target;bv(f)&&(f.style.transform="translateY(-2000px)",requestAnimationFrame(()=>{f.style.transform="",jm&&(jm.height<window.innerHeight?requestAnimationFrame(()=>{iI(f)}):jm.addEventListener("resize",()=>iI(f),{once:!0}))}))},s=()=>{window.scrollTo(0,0)},a=window.pageXOffset,l=window.pageYOffset,u=rI(mK(document.documentElement,"paddingRight",`${window.innerWidth-document.documentElement.clientWidth}px`));window.scrollTo(0,0);let c=rI(Ga(document,"touchstart",n,{passive:!1,capture:!0}),Ga(document,"touchmove",r,{passive:!1,capture:!0}),Ga(document,"touchend",o,{passive:!1,capture:!0}),Ga(document,"focus",i,!0),Ga(window,"scroll",s));return()=>{u(),c(),window.scrollTo(a,l)}}function mK(e,t,n){let r=e.style[t];return e.style[t]=n,()=>{e.style[t]=r}}function Ga(e,t,n,r){return e.addEventListener(t,n,r),()=>{e.removeEventListener(t,n,r)}}function iI(e){let t=document.scrollingElement||document.documentElement;for(;e&&e!==t;){let n=wk(e);if(n!==document.documentElement&&n!==document.body&&n!==e){let r=n.getBoundingClientRect().top,o=e.getBoundingClientRect().top,i=e.getBoundingClientRect().bottom;const s=n.getBoundingClientRect().bottom+dK;i>s&&(n.scrollTop+=o-r)}e=n.parentElement}}function bv(e){return e instanceof HTMLInputElement&&!pK.has(e.type)||e instanceof HTMLTextAreaElement||e instanceof HTMLElement&&e.isContentEditable}function bK(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function vK(...e){return t=>e.forEach(n=>bK(n,t))}function Ck(...e){return b.useCallback(vK(...e),e)}const Sk=new WeakMap;function en(e,t,n=!1){if(!e||!(e instanceof HTMLElement))return;let r={};Object.entries(t).forEach(([o,i])=>{if(o.startsWith("--")){e.style.setProperty(o,i);return}r[o]=e.style[o],e.style[o]=i}),!n&&Sk.set(e,r)}function yK(e,t){if(!e||!(e instanceof HTMLElement))return;let n=Sk.get(e);n&&(e.style[t]=n[t])}const Ut=e=>{switch(e){case"top":case"bottom":return!0;case"left":case"right":return!1;default:return e}};function ac(e,t){if(!e)return null;const n=window.getComputedStyle(e),r=n.transform||n.webkitTransform||n.mozTransform;let o=r.match(/^matrix3d\((.+)\)$/);return o?parseFloat(o[1].split(", ")[Ut(t)?13:12]):(o=r.match(/^matrix\((.+)\)$/),o?parseFloat(o[1].split(", ")[Ut(t)?5:4]):null)}function xK(e){return 8*(Math.log(e+1)-2)}function Fm(e,t){if(!e)return()=>{};const n=e.style.cssText;return Object.assign(e.style,t),()=>{e.style.cssText=n}}function wK(...e){return(...t)=>{for(const n of e)typeof n=="function"&&n(...t)}}const kt={DURATION:.5,EASE:[.32,.72,0,1]},Ek=.4,CK=.25,SK=100,Ik=8,Gi=16,vv=26,Bm="vaul-dragging";function Rk(e){const t=N.useRef(e);return N.useEffect(()=>{t.current=e}),N.useMemo(()=>(...n)=>t.current==null?void 0:t.current.call(t,...n),[])}function EK({defaultProp:e,onChange:t}){const n=N.useState(e),[r]=n,o=N.useRef(r),i=Rk(t);return N.useEffect(()=>{o.current!==r&&(i(r),o.current=r)},[r,o,i]),n}function Ak({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,o]=EK({defaultProp:t,onChange:n}),i=e!==void 0,s=i?e:r,a=Rk(n),l=N.useCallback(u=>{if(i){const d=typeof u=="function"?u(e):u;d!==e&&a(d)}else o(u)},[i,e,o,a]);return[s,l]}function IK({activeSnapPointProp:e,setActiveSnapPointProp:t,snapPoints:n,drawerRef:r,overlayRef:o,fadeFromIndex:i,onSnapPointChange:s,direction:a="bottom",container:l,snapToSequentialPoint:u}){const[c,d]=Ak({prop:e,defaultProp:n?.[0],onChange:t}),[f,p]=N.useState(typeof window<"u"?{innerWidth:window.innerWidth,innerHeight:window.innerHeight}:void 0);N.useEffect(()=>{function I(){p({innerWidth:window.innerWidth,innerHeight:window.innerHeight})}return window.addEventListener("resize",I),()=>window.removeEventListener("resize",I)},[]);const g=N.useMemo(()=>c===n?.[n.length-1]||null,[n,c]),m=N.useMemo(()=>{var I;return(I=n?.findIndex(T=>T===c))!=null?I:null},[n,c]),v=n&&n.length>0&&(i||i===0)&&!Number.isNaN(i)&&n[i]===c||!n,y=N.useMemo(()=>{const I=l?{width:l.getBoundingClientRect().width,height:l.getBoundingClientRect().height}:typeof window<"u"?{width:window.innerWidth,height:window.innerHeight}:{width:0,height:0};var T;return(T=n?.map(_=>{const $=typeof _=="string";let A=0;if($&&(A=parseInt(_,10)),Ut(a)){const O=$?A:f?_*I.height:0;return f?a==="bottom"?I.height-O:-I.height+O:O}const M=$?A:f?_*I.width:0;return f?a==="right"?I.width-M:-I.width+M:M}))!=null?T:[]},[n,f,l]),x=N.useMemo(()=>m!==null?y?.[m]:null,[y,m]),w=N.useCallback(I=>{var T;const _=(T=y?.findIndex($=>$===I))!=null?T:null;s(_),en(r.current,{transition:`transform ${kt.DURATION}s cubic-bezier(${kt.EASE.join(",")})`,transform:Ut(a)?`translate3d(0, ${I}px, 0)`:`translate3d(${I}px, 0, 0)`}),y&&_!==y.length-1&&i!==void 0&&_!==i&&_<i?en(o.current,{transition:`opacity ${kt.DURATION}s cubic-bezier(${kt.EASE.join(",")})`,opacity:"0"}):en(o.current,{transition:`opacity ${kt.DURATION}s cubic-bezier(${kt.EASE.join(",")})`,opacity:"1"}),d(n?.[Math.max(_,0)])},[r.current,n,y,i,o,d]);N.useEffect(()=>{if(c||e){var I;const T=(I=n?.findIndex(_=>_===e||_===c))!=null?I:-1;y&&T!==-1&&typeof y[T]=="number"&&w(y[T])}},[c,e,n,y,w]);function C({draggedDistance:I,closeDrawer:T,velocity:_,dismissible:$}){if(i===void 0)return;const A=a==="bottom"||a==="right"?(x??0)-I:(x??0)+I,M=m===i-1,O=m===0,B=I>0;if(M&&en(o.current,{transition:`opacity ${kt.DURATION}s cubic-bezier(${kt.EASE.join(",")})`}),!u&&_>2&&!B){$?T():w(y[0]);return}if(!u&&_>2&&B&&y&&n){w(y[n.length-1]);return}const j=y?.reduce((V,G)=>typeof V!="number"||typeof G!="number"?V:Math.abs(G-A)<Math.abs(V-A)?G:V),D=Ut(a)?window.innerHeight:window.innerWidth;if(_>Ek&&Math.abs(I)<D*.4){const V=B?1:-1;if(V>0&&g&&n){w(y[n.length-1]);return}if(O&&V<0&&$&&T(),m===null)return;w(y[m+V]);return}w(j)}function S({draggedDistance:I}){if(x===null)return;const T=a==="bottom"||a==="right"?x-I:x+I;(a==="bottom"||a==="right")&&T<y[y.length-1]||(a==="top"||a==="left")&&T>y[y.length-1]||en(r.current,{transform:Ut(a)?`translate3d(0, ${T}px, 0)`:`translate3d(${T}px, 0, 0)`})}function R(I,T){if(!n||typeof m!="number"||!y||i===void 0)return null;const _=m===i-1;if(m>=i&&T)return 0;if(_&&!T)return 1;if(!v&&!_)return null;const A=_?m+1:m-1,M=_?y[A]-y[A-1]:y[A+1]-y[A],O=I/Math.abs(M);return _?1-O:O}return{isLastSnapPoint:g,activeSnapPoint:c,shouldFade:v,getPercentageDragged:R,setActiveSnapPoint:d,activeSnapPointIndex:m,onRelease:C,onDrag:S,snapPointsOffset:y}}const RK=()=>()=>{};function AK(){const{direction:e,isOpen:t,shouldScaleBackground:n,setBackgroundColorOnScale:r,noBodyStyles:o}=yu(),i=N.useRef(null),s=N.useMemo(()=>document.body.style.backgroundColor,[]);function a(){return(window.innerWidth-vv)/window.innerWidth}N.useEffect(()=>{if(t&&n){i.current&&clearTimeout(i.current);const l=document.querySelector("[data-vaul-drawer-wrapper]")||document.querySelector("[vaul-drawer-wrapper]");if(!l)return;wK(r&&!o?Fm(document.body,{background:"black"}):RK,Fm(l,{transformOrigin:Ut(e)?"top":"left",transitionProperty:"transform, border-radius",transitionDuration:`${kt.DURATION}s`,transitionTimingFunction:`cubic-bezier(${kt.EASE.join(",")})`}));const u=Fm(l,{borderRadius:`${Ik}px`,overflow:"hidden",...Ut(e)?{transform:`scale(${a()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`}:{transform:`scale(${a()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)`}});return()=>{u(),i.current=window.setTimeout(()=>{s?document.body.style.background=s:document.body.style.removeProperty("background")},kt.DURATION*1e3)}}},[t,n,s])}let Ha=null;function TK({isOpen:e,modal:t,nested:n,hasBeenOpened:r,preventScrollRestoration:o,noBodyStyles:i}){const[s,a]=N.useState(()=>typeof window<"u"?window.location.href:""),l=N.useRef(0),u=N.useCallback(()=>{if(nI()&&Ha===null&&e&&!i){Ha={position:document.body.style.position,top:document.body.style.top,left:document.body.style.left,height:document.body.style.height,right:"unset"};const{scrollX:d,innerHeight:f}=window;document.body.style.setProperty("position","fixed","important"),Object.assign(document.body.style,{top:`${-l.current}px`,left:`${-d}px`,right:"0px",height:"auto"}),window.setTimeout(()=>window.requestAnimationFrame(()=>{const p=f-window.innerHeight;p&&l.current>=f&&(document.body.style.top=`${-(l.current+p)}px`)}),300)}},[e]),c=N.useCallback(()=>{if(nI()&&Ha!==null&&!i){const d=-parseInt(document.body.style.top,10),f=-parseInt(document.body.style.left,10);Object.assign(document.body.style,Ha),window.requestAnimationFrame(()=>{if(o&&s!==window.location.href){a(window.location.href);return}window.scrollTo(f,d)}),Ha=null}},[s]);return N.useEffect(()=>{function d(){l.current=window.scrollY}return d(),window.addEventListener("scroll",d),()=>{window.removeEventListener("scroll",d)}},[]),N.useEffect(()=>{if(t)return()=>{typeof document>"u"||document.querySelector("[data-vaul-drawer]")||c()}},[t,c]),N.useEffect(()=>{n||!r||(e?(!window.matchMedia("(display-mode: standalone)").matches&&u(),t||window.setTimeout(()=>{c()},500)):c())},[e,r,s,t,n,u,c]),{restorePositionSetting:c}}function OK({open:e,onOpenChange:t,children:n,onDrag:r,onRelease:o,snapPoints:i,shouldScaleBackground:s=!1,setBackgroundColorOnScale:a=!0,closeThreshold:l=CK,scrollLockTimeout:u=SK,dismissible:c=!0,handleOnly:d=!1,fadeFromIndex:f=i&&i.length-1,activeSnapPoint:p,setActiveSnapPoint:g,fixed:m,modal:v=!0,onClose:y,nested:x,noBodyStyles:w=!1,direction:C="bottom",defaultOpen:S=!1,disablePreventScroll:R=!0,snapToSequentialPoint:I=!1,preventScrollRestoration:T=!1,repositionInputs:_=!0,onAnimationEnd:$,container:A,autoFocus:M=!1}){var O,B;const[j=!1,D]=Ak({defaultProp:S,prop:e,onChange:ee=>{t?.(ee),!ee&&!x&&Xe(),setTimeout(()=>{$?.(ee)},kt.DURATION*1e3),ee&&!v&&typeof window<"u"&&window.requestAnimationFrame(()=>{document.body.style.pointerEvents="auto"}),ee||(document.body.style.pointerEvents="auto")}}),[V,G]=N.useState(!1),[z,H]=N.useState(!1),[ne,W]=N.useState(!1),J=N.useRef(null),K=N.useRef(null),U=N.useRef(null),oe=N.useRef(null),X=N.useRef(null),te=N.useRef(!1),Q=N.useRef(null),se=N.useRef(0),ae=N.useRef(!1),L=N.useRef(!S),Z=N.useRef(0),k=N.useRef(null),ie=N.useRef(((O=k.current)==null?void 0:O.getBoundingClientRect().height)||0),Y=N.useRef(((B=k.current)==null?void 0:B.getBoundingClientRect().width)||0),le=N.useRef(0),pe=N.useCallback(ee=>{i&&ee===we.length-1&&(K.current=new Date)},[]),{activeSnapPoint:re,activeSnapPointIndex:fe,setActiveSnapPoint:de,onRelease:ve,snapPointsOffset:we,onDrag:Se,shouldFade:Ye,getPercentageDragged:at}=IK({snapPoints:i,activeSnapPointProp:p,setActiveSnapPointProp:g,drawerRef:k,fadeFromIndex:f,overlayRef:J,onSnapPointChange:pe,direction:C,container:A,snapToSequentialPoint:I});hK({isDisabled:!j||z||!v||ne||!V||!_||!R});const{restorePositionSetting:Xe}=TK({isOpen:j,modal:v,nested:x??!1,hasBeenOpened:V,preventScrollRestoration:T,noBodyStyles:w});function Ue(){return(window.innerWidth-vv)/window.innerWidth}function rt(ee){var ye,ge;!c&&!i||k.current&&!k.current.contains(ee.target)||(ie.current=((ye=k.current)==null?void 0:ye.getBoundingClientRect().height)||0,Y.current=((ge=k.current)==null?void 0:ge.getBoundingClientRect().width)||0,H(!0),U.current=new Date,xk()&&window.addEventListener("touchend",()=>te.current=!1,{once:!0}),ee.target.setPointerCapture(ee.pointerId),se.current=Ut(C)?ee.pageY:ee.pageX)}function et(ee,ye){var ge;let xe=ee;const Ae=(ge=window.getSelection())==null?void 0:ge.toString(),Ie=k.current?ac(k.current,C):null,qe=new Date;if(xe.tagName==="SELECT"||xe.hasAttribute("data-vaul-no-drag")||xe.closest("[data-vaul-no-drag]"))return!1;if(C==="right"||C==="left")return!0;if(K.current&&qe.getTime()-K.current.getTime()<500)return!1;if(Ie!==null&&(C==="bottom"?Ie>0:Ie<0))return!0;if(Ae&&Ae.length>0)return!1;if(X.current&&qe.getTime()-X.current.getTime()<u&&Ie===0||ye)return X.current=qe,!1;for(;xe;){if(xe.scrollHeight>xe.clientHeight){if(xe.scrollTop!==0)return X.current=new Date,!1;if(xe.getAttribute("role")==="dialog")return!0}xe=xe.parentNode}return!0}function gt(ee){if(k.current&&z){const ye=C==="bottom"||C==="right"?1:-1,ge=(se.current-(Ut(C)?ee.pageY:ee.pageX))*ye,xe=ge>0,Ae=i&&!c&&!xe;if(Ae&&fe===0)return;const Ie=Math.abs(ge),qe=document.querySelector("[data-vaul-drawer-wrapper]"),Pt=C==="bottom"||C==="top"?ie.current:Y.current;let lt=Ie/Pt;const it=at(Ie,xe);if(it!==null&&(lt=it),Ae&<>=1||!te.current&&!et(ee.target,xe))return;if(k.current.classList.add(Bm),te.current=!0,en(k.current,{transition:"none"}),en(J.current,{transition:"none"}),i&&Se({draggedDistance:ge}),xe&&!i){const Et=xK(ge),sn=Math.min(Et*-1,0)*ye;en(k.current,{transform:Ut(C)?`translate3d(0, ${sn}px, 0)`:`translate3d(${sn}px, 0, 0)`});return}const _t=1-lt;if((Ye||f&&fe===f-1)&&(r?.(ee,lt),en(J.current,{opacity:`${_t}`,transition:"none"},!0)),qe&&J.current&&s){const Et=Math.min(Ue()+lt*(1-Ue()),1),sn=8-lt*8,mr=Math.max(0,14-lt*14);en(qe,{borderRadius:`${sn}px`,transform:Ut(C)?`scale(${Et}) translate3d(0, ${mr}px, 0)`:`scale(${Et}) translate3d(${mr}px, 0, 0)`,transition:"none"},!0)}if(!i){const Et=Ie*ye;en(k.current,{transform:Ut(C)?`translate3d(0, ${Et}px, 0)`:`translate3d(${Et}px, 0, 0)`})}}}N.useEffect(()=>{window.requestAnimationFrame(()=>{L.current=!0})},[]),N.useEffect(()=>{var ee;function ye(){if(!k.current||!_)return;const ge=document.activeElement;if(bv(ge)||ae.current){var xe;const Ae=((xe=window.visualViewport)==null?void 0:xe.height)||0,Ie=window.innerHeight;let qe=Ie-Ae;const Pt=k.current.getBoundingClientRect().height||0,lt=Pt>Ie*.8;le.current||(le.current=Pt);const it=k.current.getBoundingClientRect().top;if(Math.abs(Z.current-qe)>60&&(ae.current=!ae.current),i&&i.length>0&&we&&fe){const _t=we[fe]||0;qe+=_t}if(Z.current=qe,Pt>Ae||ae.current){const _t=k.current.getBoundingClientRect().height;let Et=_t;_t>Ae&&(Et=Ae-(lt?it:vv)),m?k.current.style.height=`${_t-Math.max(qe,0)}px`:k.current.style.height=`${Math.max(Et,Ae-it)}px`}else aK()||(k.current.style.height=`${le.current}px`);i&&i.length>0&&!ae.current?k.current.style.bottom="0px":k.current.style.bottom=`${Math.max(qe,0)}px`}}return(ee=window.visualViewport)==null||ee.addEventListener("resize",ye),()=>{var ge;return(ge=window.visualViewport)==null?void 0:ge.removeEventListener("resize",ye)}},[fe,i,we]);function ct(ee){mt(),y?.(),ee||D(!1),setTimeout(()=>{i&&de(i[0])},kt.DURATION*1e3)}function ot(){if(!k.current)return;const ee=document.querySelector("[data-vaul-drawer-wrapper]"),ye=ac(k.current,C);en(k.current,{transform:"translate3d(0, 0, 0)",transition:`transform ${kt.DURATION}s cubic-bezier(${kt.EASE.join(",")})`}),en(J.current,{transition:`opacity ${kt.DURATION}s cubic-bezier(${kt.EASE.join(",")})`,opacity:"1"}),s&&ye&&ye>0&&j&&en(ee,{borderRadius:`${Ik}px`,overflow:"hidden",...Ut(C)?{transform:`scale(${Ue()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`,transformOrigin:"top"}:{transform:`scale(${Ue()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)`,transformOrigin:"left"},transitionProperty:"transform, border-radius",transitionDuration:`${kt.DURATION}s`,transitionTimingFunction:`cubic-bezier(${kt.EASE.join(",")})`},!0)}function mt(){!z||!k.current||(k.current.classList.remove(Bm),te.current=!1,H(!1),oe.current=new Date)}function Nt(ee){if(!z||!k.current)return;k.current.classList.remove(Bm),te.current=!1,H(!1),oe.current=new Date;const ye=ac(k.current,C);if(!ee||!et(ee.target,!1)||!ye||Number.isNaN(ye)||U.current===null)return;const ge=oe.current.getTime()-U.current.getTime(),xe=se.current-(Ut(C)?ee.pageY:ee.pageX),Ae=Math.abs(xe)/ge;if(Ae>.05&&(W(!0),setTimeout(()=>{W(!1)},200)),i){ve({draggedDistance:xe*(C==="bottom"||C==="right"?1:-1),closeDrawer:ct,velocity:Ae,dismissible:c}),o?.(ee,!0);return}if(C==="bottom"||C==="right"?xe>0:xe<0){ot(),o?.(ee,!0);return}if(Ae>Ek){ct(),o?.(ee,!1);return}var Ie;const qe=Math.min((Ie=k.current.getBoundingClientRect().height)!=null?Ie:0,window.innerHeight);var Pt;const lt=Math.min((Pt=k.current.getBoundingClientRect().width)!=null?Pt:0,window.innerWidth),it=C==="left"||C==="right";if(Math.abs(ye)>=(it?lt:qe)*l){ct(),o?.(ee,!1);return}o?.(ee,!0),ot()}N.useEffect(()=>(j&&(en(document.documentElement,{scrollBehavior:"auto"}),K.current=new Date),()=>{yK(document.documentElement,"scrollBehavior")}),[j]);function Bt(ee){const ye=ee?(window.innerWidth-Gi)/window.innerWidth:1,ge=ee?-Gi:0;Q.current&&window.clearTimeout(Q.current),en(k.current,{transition:`transform ${kt.DURATION}s cubic-bezier(${kt.EASE.join(",")})`,transform:Ut(C)?`scale(${ye}) translate3d(0, ${ge}px, 0)`:`scale(${ye}) translate3d(${ge}px, 0, 0)`}),!ee&&k.current&&(Q.current=setTimeout(()=>{const xe=ac(k.current,C);en(k.current,{transition:"none",transform:Ut(C)?`translate3d(0, ${xe}px, 0)`:`translate3d(${xe}px, 0, 0)`})},500))}function tt(ee,ye){if(ye<0)return;const ge=(window.innerWidth-Gi)/window.innerWidth,xe=ge+ye*(1-ge),Ae=-Gi+ye*Gi;en(k.current,{transform:Ut(C)?`scale(${xe}) translate3d(0, ${Ae}px, 0)`:`scale(${xe}) translate3d(${Ae}px, 0, 0)`,transition:"none"})}function Ze(ee,ye){const ge=Ut(C)?window.innerHeight:window.innerWidth,xe=ye?(ge-Gi)/ge:1,Ae=ye?-Gi:0;ye&&en(k.current,{transition:`transform ${kt.DURATION}s cubic-bezier(${kt.EASE.join(",")})`,transform:Ut(C)?`scale(${xe}) translate3d(0, ${Ae}px, 0)`:`scale(${xe}) translate3d(${Ae}px, 0, 0)`})}return N.useEffect(()=>{v||window.requestAnimationFrame(()=>{document.body.style.pointerEvents="auto"})},[v]),N.createElement(Xl,{defaultOpen:S,onOpenChange:ee=>{!c&&!ee||(ee?G(!0):ct(!0),D(ee))},open:j},N.createElement(yk.Provider,{value:{activeSnapPoint:re,snapPoints:i,setActiveSnapPoint:de,drawerRef:k,overlayRef:J,onOpenChange:t,onPress:rt,onRelease:Nt,onDrag:gt,dismissible:c,shouldAnimate:L,handleOnly:d,isOpen:j,isDragging:z,shouldFade:Ye,closeDrawer:ct,onNestedDrag:tt,onNestedOpenChange:Bt,onNestedRelease:Ze,keyboardIsOpen:ae,modal:v,snapPointsOffset:we,activeSnapPointIndex:fe,direction:C,shouldScaleBackground:s,setBackgroundColorOnScale:a,noBodyStyles:w,container:A,autoFocus:M}},n))}const Tk=N.forwardRef(function({...e},t){const{overlayRef:n,snapPoints:r,onRelease:o,shouldFade:i,isOpen:s,modal:a,shouldAnimate:l}=yu(),u=Ck(t,n),c=r&&r.length>0;if(!a)return null;const d=N.useCallback(f=>o(f),[o]);return N.createElement(Jl,{onMouseUp:d,ref:u,"data-vaul-overlay":"","data-vaul-snap-points":s&&c?"true":"false","data-vaul-snap-points-overlay":s&&i?"true":"false","data-vaul-animate":l?.current?"true":"false",...e})});Tk.displayName="Drawer.Overlay";const Ok=N.forwardRef(function({onPointerDownOutside:e,style:t,onOpenAutoFocus:n,...r},o){const{drawerRef:i,onPress:s,onRelease:a,onDrag:l,keyboardIsOpen:u,snapPointsOffset:c,activeSnapPointIndex:d,modal:f,isOpen:p,direction:g,snapPoints:m,container:v,handleOnly:y,shouldAnimate:x,autoFocus:w}=yu(),[C,S]=N.useState(!1),R=Ck(o,i),I=N.useRef(null),T=N.useRef(null),_=N.useRef(!1),$=m&&m.length>0;AK();const A=(O,B,j=0)=>{if(_.current)return!0;const D=Math.abs(O.y),V=Math.abs(O.x),G=V>D,z=["bottom","right"].includes(B)?1:-1;if(B==="left"||B==="right"){if(!(O.x*z<0)&&V>=0&&V<=j)return G}else if(!(O.y*z<0)&&D>=0&&D<=j)return!G;return _.current=!0,!0};N.useEffect(()=>{$&&window.requestAnimationFrame(()=>{S(!0)})},[]);function M(O){I.current=null,_.current=!1,a(O)}return N.createElement(Kl,{"data-vaul-drawer-direction":g,"data-vaul-drawer":"","data-vaul-delayed-snap-points":C?"true":"false","data-vaul-snap-points":p&&$?"true":"false","data-vaul-custom-container":v?"true":"false","data-vaul-animate":x?.current?"true":"false",...r,ref:R,style:c&&c.length>0?{"--snap-point-height":`${c[d??0]}px`,...t}:t,onPointerDown:O=>{y||(r.onPointerDown==null||r.onPointerDown.call(r,O),I.current={x:O.pageX,y:O.pageY},s(O))},onOpenAutoFocus:O=>{n?.(O),w||O.preventDefault()},onPointerDownOutside:O=>{if(e?.(O),!f||O.defaultPrevented){O.preventDefault();return}u.current&&(u.current=!1)},onFocusOutside:O=>{if(!f){O.preventDefault();return}},onPointerMove:O=>{if(T.current=O,y||(r.onPointerMove==null||r.onPointerMove.call(r,O),!I.current))return;const B=O.pageY-I.current.y,j=O.pageX-I.current.x,D=O.pointerType==="touch"?10:2;A({x:j,y:B},g,D)?l(O):(Math.abs(j)>D||Math.abs(B)>D)&&(I.current=null)},onPointerUp:O=>{r.onPointerUp==null||r.onPointerUp.call(r,O),I.current=null,_.current=!1,a(O)},onPointerOut:O=>{r.onPointerOut==null||r.onPointerOut.call(r,O),M(T.current)},onContextMenu:O=>{r.onContextMenu==null||r.onContextMenu.call(r,O),T.current&&M(T.current)}})});Ok.displayName="Drawer.Content";const NK=250,PK=120,_K=N.forwardRef(function({preventCycle:e=!1,children:t,...n},r){const{closeDrawer:o,isDragging:i,snapPoints:s,activeSnapPoint:a,setActiveSnapPoint:l,dismissible:u,handleOnly:c,isOpen:d,onPress:f,onDrag:p}=yu(),g=N.useRef(null),m=N.useRef(!1);function v(){if(m.current){w();return}window.setTimeout(()=>{y()},PK)}function y(){if(i||e||m.current){w();return}if(w(),!s||s.length===0){u||o();return}if(a===s[s.length-1]&&u){o();return}const S=s.findIndex(I=>I===a);if(S===-1)return;const R=s[S+1];l(R)}function x(){g.current=window.setTimeout(()=>{m.current=!0},NK)}function w(){g.current&&window.clearTimeout(g.current),m.current=!1}return N.createElement("div",{onClick:v,onPointerCancel:w,onPointerDown:C=>{c&&f(C),x()},onPointerMove:C=>{c&&p(C)},ref:r,"data-vaul-drawer-visible":d?"true":"false","data-vaul-handle":"","aria-hidden":"true",...n},N.createElement("span",{"data-vaul-handle-hitarea":"","aria-hidden":"true"},t))});_K.displayName="Drawer.Handle";function MK(e){const t=yu(),{container:n=t.container,...r}=e;return N.createElement(Zl,{container:n,...r})}const Ri={Root:OK,Content:Ok,Overlay:Tk,Trigger:jd,Portal:MK,Close:ds,Title:Ld,Description:Fd};function DK({...e}){return h.jsx(Ri.Root,{"data-slot":"drawer",...e})}function kK({...e}){return h.jsx(Ri.Trigger,{"data-slot":"drawer-trigger",...e})}function Nk({...e}){return h.jsx(Ri.Portal,{"data-slot":"drawer-portal",...e})}function jK({...e}){return h.jsx(Ri.Close,{"data-slot":"drawer-close",...e})}function Pk({className:e,...t}){return h.jsx(Ri.Overlay,{"data-slot":"drawer-overlay",className:F("ui:data-[state=open]:animate-in ui:data-[state=closed]:animate-out ui:data-[state=closed]:fade-out-0 ui:data-[state=open]:fade-in-0 ui:fixed ui:inset-0 ui:z-50 ui:bg-black/50",e),...t})}function LK({className:e,children:t,...n}){return h.jsxs(Nk,{"data-slot":"drawer-portal",children:[h.jsx(Pk,{}),h.jsxs(Ri.Content,{"data-slot":"drawer-content",className:F("ui:group/drawer-content ui:bg-background ui:fixed ui:flex ui:h-auto ui:flex-col ui:rounded-t-[10px] ui:z-100 ui:mt-24","ui:data-[vaul-drawer-direction=top]:inset-x-0 ui:data-[vaul-drawer-direction=top]:top-0 ui:data-[vaul-drawer-direction=top]:mb-24 ui:data-[vaul-drawer-direction=top]:max-h-[80vh] ui:data-[vaul-drawer-direction=top]:rounded-b-lg ui:data-[vaul-drawer-direction=top]:border-b","ui:data-[vaul-drawer-direction=bottom]:inset-x-0 ui:data-[vaul-drawer-direction=bottom]:bottom-0 ui:data-[vaul-drawer-direction=bottom]:mt-24 ui:data-[vaul-drawer-direction=bottom]:max-h-[80vh] ui:data-[vaul-drawer-direction=bottom]:rounded-t-lg ui:data-[vaul-drawer-direction=bottom]:border-t","ui:data-[vaul-drawer-direction=right]:inset-y-0 ui:data-[vaul-drawer-direction=right]:right-0 ui:data-[vaul-drawer-direction=right]:w-3/4 ui:data-[vaul-drawer-direction=right]:border-l ui:data-[vaul-drawer-direction=right]:sm:max-w-sm","ui:data-[vaul-drawer-direction=left]:inset-y-0 ui:data-[vaul-drawer-direction=left]:left-0 ui:data-[vaul-drawer-direction=left]:w-3/4 ui:data-[vaul-drawer-direction=left]:border-r ui:data-[vaul-drawer-direction=left]:sm:max-w-sm",e),...n,children:[h.jsx("div",{className:"ui:bg-muted ui:mx-auto ui:mt-4 ui:hidden ui:h-2 ui:w-[100px] ui:shrink-0 ui:rounded-full ui:group-data-[vaul-drawer-direction=bottom]/drawer-content:block"}),t]})]})}function FK({className:e,...t}){return h.jsx("div",{"data-slot":"drawer-header",className:F("ui:flex ui:flex-col ui:gap-0.5 ui:p-4 ui:group-data-[vaul-drawer-direction=bottom]/drawer-content:text-center ui:group-data-[vaul-drawer-direction=top]/drawer-content:text-center ui:md:gap-1.5 ui:md:text-left",e),...t})}function BK({className:e,...t}){return h.jsx("div",{"data-slot":"drawer-footer",className:F("ui:mt-auto ui:flex ui:flex-col ui:gap-2 ui:p-4",e),...t})}function VK({className:e,...t}){return h.jsx(Ri.Title,{"data-slot":"drawer-title",className:F("ui:text-foreground ui:font-semibold",e),...t})}function $K({className:e,...t}){return h.jsx(Ri.Description,{"data-slot":"drawer-description",className:F("ui:text-muted-foreground ui:text-sm",e),...t})}function ox({...e}){return h.jsx(b3,{"data-slot":"dropdown-menu",...e})}function GK({...e}){return h.jsx(ZO,{"data-slot":"dropdown-menu-portal",...e})}function ix({...e}){return h.jsx(v3,{"data-slot":"dropdown-menu-trigger",...e})}function sx({className:e,sideOffset:t=4,...n}){return h.jsx(ZO,{children:h.jsx(y3,{"data-slot":"dropdown-menu-content",sideOffset:t,className:F("ui:bg-popover ui:text-popover-foreground ui:data-[state=open]:animate-in ui:data-[state=closed]:animate-out ui:data-[state=closed]:fade-out-0 ui:data-[state=open]:fade-in-0 ui:data-[state=closed]:zoom-out-95 ui:data-[state=open]:zoom-in-95 ui:data-[side=bottom]:slide-in-from-top-2 ui:data-[side=left]:slide-in-from-right-2 ui:data-[side=right]:slide-in-from-left-2 ui:data-[side=top]:slide-in-from-bottom-2 ui:z-50 ui:max-h-(--radix-dropdown-menu-content-available-height) ui:min-w-[8rem] ui:origin-(--radix-dropdown-menu-content-transform-origin) ui:overflow-x-hidden ui:overflow-y-auto ui:rounded-md ui:border ui:p-1 ui:shadow-md",e),...n})})}function HK({...e}){return h.jsx(x3,{"data-slot":"dropdown-menu-group",...e})}function _k({className:e,inset:t,variant:n="default",...r}){return h.jsx(C3,{"data-slot":"dropdown-menu-item","data-inset":t,"data-variant":n,className:F("ui:focus:bg-accent ui:focus:text-accent-foreground ui:data-[variant=destructive]:text-destructive ui:data-[variant=destructive]:focus:bg-destructive/10 ui:dark:data-[variant=destructive]:focus:bg-destructive/20 ui:data-[variant=destructive]:focus:text-destructive ui:data-[variant=destructive]:*:[svg]:!text-destructive ui:[&_svg:not([class*='text-'])]:text-muted-foreground ui:relative ui:flex ui:cursor-default ui:items-center ui:gap-2 ui:rounded-sm ui:px-2 ui:py-1.5 ui:text-sm ui:outline-hidden ui:select-none ui:data-[disabled]:pointer-events-none ui:data-[disabled]:opacity-50 ui:data-[inset]:pl-8 ui:[&_svg]:pointer-events-none ui:[&_svg]:shrink-0 ui:[&_svg:not([class*='size-'])]:size-4",e),...r})}function yv({className:e,children:t,checked:n,...r}){return h.jsxs(S3,{"data-slot":"dropdown-menu-checkbox-item",className:F("ui:focus:bg-accent ui:focus:text-accent-foreground ui:relative ui:flex ui:cursor-default ui:items-center ui:gap-2 ui:rounded-sm ui:py-1.5 ui:pr-2 ui:pl-8 ui:text-sm ui:outline-hidden ui:select-none ui:data-[disabled]:pointer-events-none ui:data-[disabled]:opacity-50 ui:[&_svg]:pointer-events-none ui:[&_svg]:shrink-0 ui:[&_svg:not([class*='size-'])]:size-4",e),checked:n,...r,children:[h.jsx("span",{className:"ui:pointer-events-none ui:absolute ui:left-2 ui:flex size-3.5 ui:items-center ui:justify-center",children:h.jsx(JO,{children:h.jsx(_e.CheckIcon,{className:"ui:size-4"})})}),t]})}function WK({...e}){return h.jsx(E3,{"data-slot":"dropdown-menu-radio-group",...e})}function zK({className:e,children:t,...n}){return h.jsxs(I3,{"data-slot":"dropdown-menu-radio-item",className:F("ui:focus:bg-accent ui:focus:text-accent-foreground ui:relative ui:flex ui:cursor-default ui:items-center ui:gap-2 ui:rounded-sm ui:py-1.5 ui:pr-2 ui:pl-8 ui:text-sm ui:outline-hidden ui:select-none ui:data-[disabled]:pointer-events-none ui:data-[disabled]:opacity-50 ui:[&_svg]:pointer-events-none ui:[&_svg]:shrink-0 ui:[&_svg:not([class*='size-'])]:size-4",e),...n,children:[h.jsx("span",{className:"ui:pointer-events-none ui:absolute ui:left-2 ui:flex size-3.5 ui:items-center ui:justify-center",children:h.jsx(JO,{children:h.jsx(_e.CircleIcon,{className:"ui:size-2 ui:fill-current"})})}),t]})}function qK({className:e,inset:t,...n}){return h.jsx(w3,{"data-slot":"dropdown-menu-label","data-inset":t,className:F("ui:px-2 ui:py-1.5 ui:text-sm ui:font-medium ui:data-[inset]:pl-8",e),...n})}function UK({className:e,...t}){return h.jsx(R3,{"data-slot":"dropdown-menu-separator",className:F("ui:bg-border ui:-mx-1 ui:my-1 ui:h-px",e),...t})}function YK({className:e,...t}){return h.jsx("span",{"data-slot":"dropdown-menu-shortcut",className:F("ui:text-muted-foreground ui:ml-auto ui:text-xs ui:tracking-widest",e),...t})}function XK({...e}){return h.jsx(A3,{"data-slot":"dropdown-menu-sub",...e})}function ZK({className:e,inset:t,children:n,...r}){return h.jsxs(T3,{"data-slot":"dropdown-menu-sub-trigger","data-inset":t,className:F("ui:focus:bg-accent ui:focus:text-accent-foreground ui:data-[state=open]:bg-accent ui:data-[state=open]:text-accent-foreground ui:[&_svg:not([class*='text-'])]:text-muted-foreground ui:flex ui:cursor-default ui:items-center ui:gap-2 ui:rounded-sm ui:px-2 ui:py-1.5 ui:text-sm ui:outline-hidden ui:select-none ui:data-[inset]:pl-8 ui:[&_svg]:pointer-events-none ui:[&_svg]:shrink-0 ui:[&_svg:not([class*='size-'])]:size-4",e),...r,children:[n,h.jsx(_e.ChevronRightIcon,{className:"ui:ml-auto ui:size-4"})]})}function JK({className:e,...t}){return h.jsx(O3,{"data-slot":"dropdown-menu-sub-content",className:F("ui:bg-popover ui:text-popover-foreground ui:data-[state=open]:animate-in ui:data-[state=closed]:animate-out ui:data-[state=closed]:fade-out-0 ui:data-[state=open]:fade-in-0 ui:data-[state=closed]:zoom-out-95 ui:data-[state=open]:zoom-in-95 ui:data-[side=bottom]:slide-in-from-top-2 ui:data-[side=left]:slide-in-from-right-2 ui:data-[side=right]:slide-in-from-left-2 ui:data-[side=top]:slide-in-from-bottom-2 ui:z-50 ui:min-w-[8rem] ui:origin-(--radix-dropdown-menu-content-transform-origin) ui:overflow-hidden ui:rounded-md ui:border ui:p-1 ui:shadow-lg",e),...t})}function KK({className:e,...t}){return h.jsx("div",{"data-slot":"empty",className:F("ui:flex ui:min-w-0 ui:flex-1 ui:flex-col ui:items-center ui:justify-center ui:gap-6 ui:rounded-lg ui:border-dashed ui:p-6 ui:text-center ui:text-balance ui:md:p-12",e),...t})}function QK({className:e,...t}){return h.jsx("div",{"data-slot":"empty-header",className:F("ui:flex ui:max-w-sm ui:flex-col ui:items-center ui:gap-2 ui:text-center",e),...t})}const eQ=Si("ui:flex ui:shrink-0 ui:items-center ui:justify-center ui:mb-2 ui:[&_svg]:pointer-events-none ui:[&_svg]:shrink-0",{variants:{variant:{default:"ui:bg-transparent",icon:"ui:bg-muted ui:text-foreground ui:flex ui:size-10 ui:shrink-0 ui:items-center ui:justify-center ui:rounded-lg ui:[&_svg:not([class*='size-'])]:size-6"}},defaultVariants:{variant:"default"}});function tQ({className:e,variant:t="default",...n}){return h.jsx("div",{"data-slot":"empty-icon","data-variant":t,className:F(eQ({variant:t,className:e})),...n})}function nQ({className:e,...t}){return h.jsx("div",{"data-slot":"empty-title",className:F("ui:text-lg ui:font-medium ui:tracking-tight",e),...t})}function rQ({className:e,...t}){return h.jsx("div",{"data-slot":"empty-description",className:F("ui:text-muted-foreground ui:[&>a:hover]:text-primary ui:text-sm/relaxed ui:[&>a]:underline ui:[&>a]:underline-offset-4",e),...t})}function oQ({className:e,...t}){return h.jsx("div",{"data-slot":"empty-content",className:F("ui:flex ui:w-full ui:max-w-sm ui:min-w-0 ui:flex-col ui:items-center ui:gap-4 ui:text-sm ui:text-balance",e),...t})}function Mk({message:e,className:t}){return h.jsx("p",{className:F("ui:text-red-500 ui:text-xs ui:mt-2 ui:has-error",t),children:e})}const Dk=b.createContext(null),kk=b.createContext(null),kf=()=>{const e=b.useContext(Dk),t=b.useContext(kk);if(!e)throw new Error("useFormField must be used within <FormField>");if(!t)throw new Error("useFormField must be used within <FormItem>");const{id:n}=t,{name:r,error:o}=e;return{name:r,error:o,formItemId:`${n}-form-item`,formDescriptionId:`${n}-form-item-description`,formMessageId:`${n}-form-item-message`}},Br=e=>h.jsx(ur.Controller,{...e,render:t=>h.jsx(Dk.Provider,{value:{name:e.name,error:t.fieldState.error},children:e.render?.(t)})});function dr({className:e,...t}){const n=b.useId();return h.jsx(kk.Provider,{value:{id:n},children:h.jsx("div",{"data-slot":"form-item",className:F("ui:grid ui:gap-2",e),...t})})}function oo({className:e,required:t=!1,...n}){const{error:r,formItemId:o}=kf();return h.jsxs(gr,{"data-slot":"form-label","data-error":!!r,htmlFor:o,className:F("ui:text-sm",r?"ui:text-destructive":"ui:text-black-950",e),...n,children:[n.children,t&&h.jsx("span",{className:"ui:text-destructive ml-1",children:"*"})]})}function fr(e){const{error:t,formItemId:n,formDescriptionId:r,formMessageId:o}=kf();return h.jsx(Bo,{"data-slot":"form-control",id:n,"aria-invalid":!!t,"aria-describedby":t?`${r} ${o}`:r,...e})}function po({className:e,...t}){const{formDescriptionId:n}=kf();return h.jsx("p",{"data-slot":"form-description",id:n,className:F("ui:text-muted-foreground ui:text-sm",e),...t})}function Vr({className:e,showErrorPlaceholder:t,...n}){const{error:r,formMessageId:o}=kf(),i=r?String(r.message??""):n.children;return i?h.jsx("p",{"data-slot":"form-message",id:o,className:F("ui:text-destructive ui:text-sm",e),...n,children:i}):t?h.jsx("p",{className:"ui:h-4"}):null}const iQ=({name:e,control:t,formClassName:n,...r})=>{const o=ur.useFormContext(),i=t??o?.control;if(!i)throw new Error("FormCheckbox must be used within a FormProvider or receive a control prop");return h.jsx(Br,{control:i,name:e,render:({field:s})=>h.jsxs(dr,{className:n,children:[h.jsx(fr,{children:h.jsx(zM,{...s,checked:!!s.value,onCheckedChange:s.onChange,...r})}),h.jsx(Vr,{})]})})};function ax({delayDuration:e=0,...t}){return h.jsx(JH,{"data-slot":"tooltip-provider",delayDuration:e,...t})}function lx({...e}){return h.jsx(ax,{children:h.jsx(KH,{"data-slot":"tooltip",...e})})}function ux({...e}){return h.jsx(QH,{"data-slot":"tooltip-trigger",...e})}function jf({className:e,sideOffset:t=0,children:n,...r}){return h.jsx(n_,{children:h.jsxs(r_,{"data-slot":"tooltip-content",sideOffset:t,className:F("ui:bg-foreground ui:text-background ui:animate-in ui:fade-in-0 ui:zoom-in-95 ui:data-[state=closed]:animate-out ui:data-[state=closed]:fade-out-0 ui:data-[state=closed]:zoom-out-95 ui:data-[side=bottom]:slide-in-from-top-2 ui:data-[side=left]:slide-in-from-right-2 ui:data-[side=right]:slide-in-from-left-2 ui:data-[side=top]:slide-in-from-bottom-2 ui:z-50 ui:w-fit ui:origin-(--radix-tooltip-content-transform-origin) ui:rounded-md ui:px-3 ui:py-1.5 ui:text-xs ui:text-balance",e),...r,children:[n,h.jsx(e9,{className:"ui:bg-foreground ui:fill-foreground ui:z-50 ui:size-2.5 ui:translate-y-[calc(-50%-2px)] ui:rotate-45 ui:rounded-[2px]"})]})})}const jk=b.forwardRef(({children:e,...t},n)=>h.jsx(n_,{children:h.jsx(jf,{ref:n,...t,children:e})}));jk.displayName=r_.displayName;const ya=({trigger:e,content:t,asChild:n=!0,wrapTrigger:r=!0,triggerClassName:o="",contentClassName:i="ui:max-w-sm",disableContent:s=!1,isPortal:a=!1})=>s?e:h.jsxs(lx,{children:[h.jsx(ux,{asChild:n,children:r?h.jsx("div",{className:F("ui:truncate",o),children:e}):e}),a?h.jsx(jk,{className:i,children:t}):h.jsx(jf,{className:i,children:t})]}),sQ=({name:e,label:t,placeholder:n,items:r=[],description:o,multiple:i=!1,emptyMessage:s="No results found",containerClassName:a,hasClearButton:l=!1,hasAllOption:u=!1,allOptionLabel:c="All",disabled:d=!1,tooltipContent:f,control:p,inputMode:g="input"})=>{const m=ur.useFormContext(),v=p??m?.control;if(!v)throw new Error("FormCombobox must be used within a FormProvider or receive a control prop");return h.jsx(Br,{control:v,name:e,render:({field:y})=>h.jsxs(dr,{className:F("ui:flex ui:flex-col",a),children:[t&&h.jsxs(oo,{className:F({"ui:flex ui:items-center ui:gap-2":!!f}),children:[t,f&&h.jsx(ya,{triggerClassName:"ui:order-last",content:f,contentClassName:"ui:max-w-96",trigger:h.jsx(_e.Info,{size:16,className:"ui:cursor-pointer ui:text-segmentify-gray-500"})})]}),h.jsx(tx,{items:r,multiple:i,value:y.value,onValueChange:y.onChange,placeholder:n,emptyMessage:s,disabled:d,hasClearButton:l,hasAllOption:u,allOptionLabel:c,inputMode:g}),o&&h.jsx(po,{children:o}),h.jsx(Vr,{})]})})},aQ=({name:e,control:t,disabledCondition:n=!1,label:r,placeholder:o,description:i,containerClassName:s,triggerClassName:a,showErrorPlaceholder:l})=>{const u=ur.useFormContext(),c=t??u?.control;if(!c)throw new Error("FormDatePicker must be used within a FormProvider or receive a control prop");return h.jsx(Br,{control:c,name:e,render:({field:d})=>h.jsxs(dr,{className:F("ui:flex ui:flex-col",s),children:[h.jsx(_r,{children:h.jsx(rn,{condition:!!r,children:h.jsx(oo,{children:r})})}),h.jsxs(nx,{children:[h.jsx(Mf,{asChild:!0,children:h.jsx(fr,{children:h.jsxs(on,{variant:"outline",className:F("ui:w-[240px] ui:pl-3 ui:text-left ui:font-normal",!d.value&&"ui:text-muted-foreground",a),children:[d.value?ti(new Date(d.value),"dd/MM/yyyy"):h.jsx("span",{children:o}),h.jsx(_e.CalendarIcon,{className:"ui:ml-auto ui:h-4 ui:w-4 ui:opacity-50"})]})})}),h.jsx(Df,{className:"ui:w-auto ui:p-0",align:"start",children:h.jsx(e0,{mode:"single",selected:d.value?new Date(d.value):void 0,onSelect:f=>{f&&d.onChange(f)},disabled:n,initialFocus:!0})})]}),h.jsx(_r,{children:h.jsx(rn,{condition:!!i,children:h.jsx(po,{children:i})})}),h.jsx(Vr,{showErrorPlaceholder:l})]})})},lQ=e=>{if(e===0)return"0 Bytes";const t=1024,n=["Bytes","KB","MB","GB"],r=Math.floor(Math.log(e)/Math.log(t));return parseFloat((e/Math.pow(t,r)).toFixed(2))+" "+n[r]},uQ=e=>e.type.startsWith("image/"),cQ=({uploadedFile:e,onRemove:t})=>h.jsx("div",{className:"ui:p-3 ui:bg-muted/50 ui:border ui:border-border ui:rounded-lg",children:h.jsxs("div",{className:"ui:flex ui:items-center ui:justify-between ui:gap-3",children:[h.jsxs("div",{className:"ui:flex ui:items-center ui:gap-3 ui:min-w-0",children:[uQ(e.file)?h.jsx("img",{src:e.url,alt:e.file.name,className:"ui:shrink-0 ui:w-10 ui:h-10 ui:object-cover ui:rounded-md"}):h.jsx("div",{className:"ui:shrink-0 ui:p-2 ui:bg-primary/10 ui:rounded-md",children:h.jsx(_e.FileText,{size:20,className:"ui:text-primary"})}),h.jsxs("div",{className:"ui:min-w-0",children:[h.jsx("p",{className:"ui:text-sm ui:font-medium ui:text-foreground ui:truncate",children:e.file.name}),h.jsx("p",{className:"ui:text-xs ui:text-muted-foreground",children:lQ(e.file.size)})]})]}),h.jsx(Do,{variant:"ghost",size:"sm",isIconOnly:!0,onClick:t,icon:h.jsx(_e.X,{size:16}),className:F("ui:shrink-0 ui:text-muted-foreground","ui:hover:text-destructive ui:hover:bg-destructive/10")})]})}),Lk=({name:e,control:t,label:n,uploadButtonLabel:r="Upload File",uploadingLabel:o="Uploading...",uploadFailedMessage:i="Upload failed",description:s,accept:a="*",disabled:l=!1,multiple:u=!1,containerClassName:c,tooltipContent:d,hasRequiredIndicator:f=!1,onUpload:p})=>{const g=ur.useFormContext(),m=t??g?.control;if(!m)throw new Error("FormFileUpload must be used within a FormProvider or receive a control prop");const v=N.useRef(null),[y,x]=N.useState(!1),w=async(S,R,I)=>{const T=S.target.files;if(T?.length){x(!0);try{if(u){const _=Array.from(T),$=[];for(const M of _){const O=p?await p(M):URL.createObjectURL(M);$.push({file:M,url:O})}const A=Array.isArray(I)?I:[];R([...A,...$])}else{const _=T[0],$=p?await p(_):URL.createObjectURL(_);R({file:_,url:$})}}catch(_){const $=_ instanceof Error?_.message:i;Jv.toast.error($)}finally{x(!1),v.current&&(v.current.value="")}}},C=(S,R,I)=>{if(u&&Array.isArray(R)&&I){const T=R.filter(_=>_!==I);S(T.length>0?T:null)}else S(null);v.current&&(v.current.value="")};return h.jsx(Br,{control:m,name:e,render:({field:S})=>{const R=S.value,I=u?Array.isArray(R)?R:[]:R&&"file"in R?[R]:[];return h.jsxs(dr,{className:F("ui:w-full",c),children:[n&&h.jsxs(oo,{className:F({"ui:flex ui:items-center ui:gap-2":!!d}),children:[n,f&&h.jsx("span",{children:"*"}),d&&h.jsx(ya,{content:d,contentClassName:"ui:max-w-96",trigger:h.jsx(_e.Info,{size:16,className:"ui:text-muted-foreground ui:cursor-pointer"})})]}),h.jsx(fr,{children:h.jsxs("div",{className:"ui:space-y-3",children:[h.jsxs("div",{className:"ui:relative ui:inline-block",children:[h.jsx("input",{ref:v,type:"file",accept:a,multiple:u,onChange:T=>w(T,S.onChange,R),disabled:l||y,className:F("ui:absolute ui:inset-0 ui:w-full ui:h-full ui:opacity-0 ui:cursor-pointer","ui:disabled:cursor-not-allowed")}),h.jsx(Do,{variant:"outline",label:y?o:r,icon:y?h.jsx(_e.Loader2,{size:16,className:"ui:animate-spin"}):h.jsx(_e.Upload,{size:16}),disabled:l||y})]}),I.length>0&&h.jsx("div",{className:"ui:space-y-2",children:I.map((T,_)=>h.jsx(cQ,{uploadedFile:T,onRemove:()=>C(S.onChange,R,T)},`${T.file.name}-${T.file.size}-${_}`))})]})}),h.jsx(Vr,{}),s&&h.jsx(po,{children:s})]})}})};Lk.displayName="FormFileUpload";const cx=N.forwardRef(({name:e,label:t,labelVariant:n,type:r,value:o,onChange:i,description:s="",placeholder:a,className:l,inputClassName:u,isReadOnly:c=!1,hasRequiredIndicator:d=!1,...f},p)=>h.jsxs("article",{className:l,children:[t&&h.jsxs(gr,{variant:n,className:"ui:mb-2",children:[t,d&&h.jsx("span",{children:"*"})]}),h.jsx(vu,{ref:p,"data-test-id":e,placeholder:a,value:o,type:r,onChange:i,className:F({"ui:pointer-events-none ui:opacity-30":c},u),...f}),s&&h.jsx(If,{description:s})]})),dQ=({label:e,containerClassName:t,inputClassName:n,name:r,description:o,placeholder:i="",tooltipContent:s,hasRequiredIndicator:a=!1,control:l,...u})=>{const c=ur.useFormContext(),d=l??c?.control;if(!d)throw new Error("FormInput must be used within a FormProvider or receive a control prop");return h.jsx(Br,{control:d,name:r,render:({field:f})=>h.jsxs(dr,{className:F("ui:w-full",t),children:[h.jsxs(oo,{className:s?"ui:flex ui:items-center ui:gap-2":void 0,children:[e,a&&h.jsx("span",{children:"*"}),s&&h.jsx(ya,{content:s,contentClassName:"ui:max-w-96",trigger:h.jsx(_e.Info,{size:16,className:"ui:cursor-pointer ui:text-segmentify-gray-500"})})]}),h.jsx(fr,{children:h.jsx(cx,{...f,...u,placeholder:i,inputClassName:F(n)})}),o&&h.jsx(po,{children:o}),h.jsx(Vr,{})]})})},fQ=({label:e,name:t,containerClassName:n,description:r,placeholder:o,tooltipContent:i,control:s,hasRequiredIndicator:a=!1,...l})=>{const u=ur.useFormContext(),c=s??u?.control;if(!c)throw new Error("FormPassword must be used within a FormProvider or receive a control prop");const[d,f]=N.useState(!1),p=()=>{f(g=>!g)};return h.jsx(Br,{control:c,name:t,render:({field:g})=>h.jsxs(dr,{className:F("ui:w-full",n),children:[e&&h.jsxs(oo,{className:F({"ui:flex ui:items-center ui:gap-2":!!i}),children:[e,a&&h.jsx("span",{children:"*"}),i&&h.jsx(ya,{content:i,contentClassName:"ui:max-w-96",trigger:h.jsx(_e.Info,{size:16,className:"ui:cursor-pointer ui:text-segmentify-gray-500"})})]}),h.jsx(fr,{children:h.jsxs("div",{className:"ui:relative",children:[h.jsx(cx,{...g,...l,type:d?"text":"password",placeholder:o,hasRequiredIndicator:a,inputClassName:"pr-8"}),h.jsx("button",{type:"button",onClick:p,className:"ui:absolute ui:right-3 ui:top-1/2 ui:-translate-y-1/2 ui:text-muted-foreground ui:hover:text-foreground ui:transition-colors",tabIndex:-1,children:d?h.jsx(_e.EyeOff,{size:16,className:"ui:cursor-pointer"}):h.jsx(_e.Eye,{size:16,className:"ui:cursor-pointer"})})]})}),r&&h.jsx(po,{children:r}),h.jsx(Vr,{})]})})};function Fk({className:e,...t}){return h.jsx(aG,{"data-slot":"radio-group",className:F("ui:grid ui:gap-3",e),...t})}function Bk({className:e,...t}){return h.jsx(lG,{"data-slot":"radio-group-item",className:F("ui:p-0! ui:aspect-square ui:h-4 ui:w-4 ui:rounded-full ui:border ui:border-solid ui:border-primary ui:text-primary ui:bg-transparent ui:hover:bg-transparent ui:ring-offset-background ui:focus:outline-none ui:focus-visible:ring-2 ui:focus-visible:ring-ring ui:focus-visible:ring-offset-2 ui:disabled:cursor-not-allowed ui:disabled:opacity-50 ui:transition-none",e),...t,children:h.jsx(uG,{"data-slot":"radio-group-indicator",className:"ui:relative ui:flex ui:items-center ui:justify-center",children:h.jsx(_e.CircleIcon,{className:"ui:fill-primary ui:absolute ui:top-1/2 ui:left-1/2 ui:size-2 ui:-translate-x-1/2 ui:-translate-y-1/2"})})})}const pQ=({name:e,label:t,items:n,control:r,containerClassName:o,itemClassName:i,itemLabelClassName:s,selectedClassName:a,description:l})=>{const u=ur.useFormContext(),c=r??u?.control;if(!c)throw new Error("FormRadio must be used within a FormProvider or receive a control prop");return h.jsx(Br,{control:c,name:e,render:({field:d})=>h.jsxs(dr,{className:F("ui:space-y-3",o),children:[t&&h.jsx(oo,{children:t}),h.jsx(fr,{children:h.jsx(Fk,{onValueChange:d.onChange,defaultValue:d.value,className:"ui:flex ui:flex-col ui:space-y-1",children:n.map(f=>h.jsxs(dr,{className:F("ui:flex ui:items-center ui:space-y-0",i,d.value===f.value&&a),children:[h.jsx(fr,{children:h.jsx(Bk,{value:f.value})}),h.jsx(oo,{className:F("ui:font-normal",s),children:f.label})]},f.value))})}),h.jsx(Vr,{}),l&&h.jsx(po,{children:l})]})})};function Vk({className:e,defaultValue:t,value:n,min:r=0,max:o=100,...i}){const s=b.useMemo(()=>Array.isArray(n)?n:Array.isArray(t)?t:[r,o],[n,t,r,o]);return h.jsxs(xH,{"data-slot":"slider",defaultValue:t,value:n,min:r,max:o,className:F("ui:relative ui:flex ui:w-full ui:touch-none ui:items-center ui:select-none ui:data-[disabled]:opacity-50 ui:data-[orientation=vertical]:h-full ui:data-[orientation=vertical]:min-h-44 ui:data-[orientation=vertical]:w-auto ui:data-[orientation=vertical]:flex-col",e),...i,children:[h.jsx(wH,{"data-slot":"slider-track",className:F("ui:bg-muted ui:relative ui:grow ui:overflow-hidden ui:rounded-full ui:data-[orientation=horizontal]:h-1.5 ui:data-[orientation=horizontal]:w-full ui:data-[orientation=vertical]:h-full ui:data-[orientation=vertical]:w-1.5"),children:h.jsx(CH,{"data-slot":"slider-range",className:F("ui:bg-primary ui:absolute ui:data-[orientation=horizontal]:h-full ui:data-[orientation=vertical]:w-full")})}),Array.from({length:s.length},(a,l)=>h.jsx(SH,{"data-slot":"slider-thumb",className:"ui:border-primary ui:ring-ring/50 ui:block ui:size-4 ui:shrink-0 ui:rounded-full ui:border ui:bg-white ui:shadow-sm ui:transition-[color,box-shadow] ui:hover:ring-4 ui:focus-visible:ring-4 ui:focus-visible:outline-hidden ui:disabled:pointer-events-none ui:disabled:opacity-50"},l))]})}const hQ=({name:e,control:t,label:n,description:r,min:o=0,max:i=100,step:s=1,leftLabel:a,rightLabel:l,showLabels:u=!0,complementaryField:c,onValueChange:d,containerClassName:f,labelClassName:p,showErrorPlaceholder:g=!1,tooltipContent:m,...v})=>{const y=ur.useFormContext(),x=t??y?.control;if(!x)throw new Error("FormSlider must be used within a FormProvider or receive a control prop");const w=N.useRef(!1),C=ur.useWatch({control:x,name:e});return h.jsx(Br,{control:x,name:e,render:({field:S})=>{const R=T=>{if(w.current)return;const _=T[0];w.current=!0,S.onChange(String(_)),c&&y?.setValue&&y.setValue(c,String(i-_),{shouldValidate:!0}),d&&d(_),setTimeout(()=>{w.current=!1},0)},I=Number(C)||o+(i-o)/2;return h.jsxs(dr,{className:F("ui:w-full",f),children:[h.jsx(_r,{children:h.jsx(rn,{condition:!!n,children:h.jsxs(oo,{className:F(p,{"ui:flex ui:items-center ui:gap-2":!!m}),children:[n,m&&h.jsx(ya,{content:m,contentClassName:"ui:max-w-96",trigger:h.jsx(_e.Info,{size:16,color:"#737373",className:"ui:cursor-pointer"})})]})})}),h.jsx(fr,{children:h.jsxs("div",{className:"ui:space-y-2",children:[h.jsx(Vk,{value:[I],onValueChange:R,min:o,max:i,step:s,className:"ui:w-full",...v}),u&&h.jsxs("div",{className:"ui:flex ui:justify-between ui:text-sm ui:text-gray-600",children:[a&&h.jsxs("span",{children:[a,": ",I,i===100?"%":""]}),l&&h.jsxs("span",{children:[l,": ",c?i-I:I,i===100?"%":""]})]})]})}),h.jsx(_r,{children:h.jsx(rn,{condition:!!r,children:h.jsx(po,{className:"ui:text-xs",children:r})})}),h.jsx(Vr,{showErrorPlaceholder:g})]})}})};function $k({className:e,...t}){return h.jsx(TH,{"data-slot":"switch",className:F("ui:peer ui:data-[state=checked]:bg-primary ui:data-[state=unchecked]:bg-input ui:focus-visible:border-ring ui:focus-visible:ring-ring/50 ui:dark:data-[state=unchecked]:bg-input/80 ui:inline-flex ui:h-[1.15rem] ui:w-8 ui:shrink-0 ui:items-center ui:rounded-full ui:border ui:border-transparent ui:shadow-xs ui:transition-all ui:outline-none ui:focus-visible:ring-[3px] ui:disabled:cursor-not-allowed ui:disabled:opacity-50",e),...t,children:h.jsx(OH,{"data-slot":"switch-thumb",className:F("ui:bg-background ui:dark:data-[state=unchecked]:bg-foreground ui:dark:data-[state=checked]:bg-primary-foreground ui:pointer-events-none ui:block ui:size-4 ui:rounded-full ui:ring-0 ui:transition-transform ui:data-[state=checked]:translate-x-[calc(100%-2px)] ui:data-[state=unchecked]:translate-x-0")})})}const Gk=({label:e,name:t,...n})=>h.jsxs("article",{className:"ui:flex ui:items-center ui:gap-2",children:[h.jsx($k,{id:t,...n}),h.jsx(gr,{htmlFor:t,children:e})]}),gQ=({name:e,label:t,description:n,control:r,...o})=>{const i=ur.useFormContext(),s=r??i?.control;if(!s)throw new Error("FormSwitch must be used within a FormProvider or receive a control prop");return h.jsx(Br,{control:s,name:e,render:({field:a})=>h.jsxs(dr,{children:[h.jsx(fr,{children:h.jsx(Gk,{...a,...o,label:t})}),h.jsx(Vr,{}),n&&h.jsx(po,{children:n})]})})},Hk=({textAreaClassName:e,value:t,onChange:n,label:r,...o})=>h.jsxs("article",{children:[r&&h.jsx(gr,{className:"ui:mb-2 ui:block",children:r}),h.jsx(pk,{className:F("ui:w-full",e),value:t,onChange:n,...o})]}),mQ=({label:e,name:t,description:n,placeholder:r,containerClassName:o,control:i,...s})=>{const a=ur.useFormContext(),l=i??a?.control;if(!l)throw new Error("FormTextarea must be used within a FormProvider or receive a control prop");return h.jsx(Br,{control:l,name:t,render:({field:u})=>h.jsxs(dr,{className:F("ui:w-full",o),children:[h.jsx(oo,{children:e}),h.jsx(fr,{children:h.jsx(Hk,{placeholder:r,...u,...s})}),n&&h.jsx(po,{children:n}),h.jsx(Vr,{})]})})};function bQ({...e}){return h.jsx(L3,{"data-slot":"hover-card",...e})}function vQ({...e}){return h.jsx(F3,{"data-slot":"hover-card-trigger",...e})}function yQ({className:e,align:t="center",sideOffset:n=4,...r}){return h.jsx(B3,{"data-slot":"hover-card-portal",children:h.jsx(V3,{"data-slot":"hover-card-content",align:t,sideOffset:n,className:F("ui:bg-popover ui:text-popover-foreground ui:data-[state=open]:animate-in ui:data-[state=closed]:animate-out ui:data-[state=closed]:fade-out-0 ui:data-[state=open]:fade-in-0 ui:data-[state=closed]:zoom-out-95 ui:data-[state=open]:zoom-in-95 ui:data-[side=bottom]:slide-in-from-top-2 ui:data-[side=left]:slide-in-from-right-2 ui:data-[side=right]:slide-in-from-left-2 ui:data-[side=top]:slide-in-from-bottom-2 ui:z-50 ui:w-64 ui:origin-(--radix-hover-card-content-transform-origin) ui:rounded-md ui:border ui:p-4 ui:shadow-md ui:outline-hidden",e),...r})})}function xQ({name:e,className:t,...n}){return h.jsx("i",{className:F(`icon-${e}`,t),...n,children:h.jsxs("span",{className:"ui:for-screenreader-only",children:[e," icon"]})})}var wQ=Object.defineProperty,CQ=Object.defineProperties,SQ=Object.getOwnPropertyDescriptors,md=Object.getOwnPropertySymbols,Wk=Object.prototype.hasOwnProperty,zk=Object.prototype.propertyIsEnumerable,sI=(e,t,n)=>t in e?wQ(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,EQ=(e,t)=>{for(var n in t||(t={}))Wk.call(t,n)&&sI(e,n,t[n]);if(md)for(var n of md(t))zk.call(t,n)&&sI(e,n,t[n]);return e},IQ=(e,t)=>CQ(e,SQ(t)),RQ=(e,t)=>{var n={};for(var r in e)Wk.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&md)for(var r of md(e))t.indexOf(r)<0&&zk.call(e,r)&&(n[r]=e[r]);return n};function AQ(e){let t=setTimeout(e,0),n=setTimeout(e,10),r=setTimeout(e,50);return[t,n,r]}function TQ(e){let t=b.useRef();return b.useEffect(()=>{t.current=e}),t.current}var OQ=18,qk=40,NQ=`${qk}px`,PQ=["[data-lastpass-icon-root]","com-1password-button","[data-dashlanecreated]",'[style$="2147483647 !important;"]'].join(",");function _Q({containerRef:e,inputRef:t,pushPasswordManagerStrategy:n,isFocused:r}){let[o,i]=b.useState(!1),[s,a]=b.useState(!1),[l,u]=b.useState(!1),c=b.useMemo(()=>n==="none"?!1:(n==="increase-width"||n==="experimental-no-flickering")&&o&&s,[o,s,n]),d=b.useCallback(()=>{let f=e.current,p=t.current;if(!f||!p||l||n==="none")return;let g=f,m=g.getBoundingClientRect().left+g.offsetWidth,v=g.getBoundingClientRect().top+g.offsetHeight/2,y=m-OQ,x=v;document.querySelectorAll(PQ).length===0&&document.elementFromPoint(y,x)===f||(i(!0),u(!0))},[e,t,l,n]);return b.useEffect(()=>{let f=e.current;if(!f||n==="none")return;function p(){let m=window.innerWidth-f.getBoundingClientRect().right;a(m>=qk)}p();let g=setInterval(p,1e3);return()=>{clearInterval(g)}},[e,n]),b.useEffect(()=>{let f=r||document.activeElement===t.current;if(n==="none"||!f)return;let p=setTimeout(d,0),g=setTimeout(d,2e3),m=setTimeout(d,5e3),v=setTimeout(()=>{u(!0)},6e3);return()=>{clearTimeout(p),clearTimeout(g),clearTimeout(m),clearTimeout(v)}},[t,r,n,d]),{hasPWMBadge:o,willPushPWMBadge:c,PWM_BADGE_SPACE_WIDTH:NQ}}var MQ=b.createContext({}),Uk=b.forwardRef((e,t)=>{var n=e,{value:r,onChange:o,maxLength:i,textAlign:s="left",pattern:a,placeholder:l,inputMode:u="numeric",onComplete:c,pushPasswordManagerStrategy:d="increase-width",pasteTransformer:f,containerClassName:p,noScriptCSSFallback:g=DQ,render:m,children:v}=n,y=RQ(n,["value","onChange","maxLength","textAlign","pattern","placeholder","inputMode","onComplete","pushPasswordManagerStrategy","pasteTransformer","containerClassName","noScriptCSSFallback","render","children"]),x,w,C,S,R;let[I,T]=b.useState(typeof y.defaultValue=="string"?y.defaultValue:""),_=r??I,$=TQ(_),A=b.useCallback(k=>{o?.(k),T(k)},[o]),M=b.useMemo(()=>a?typeof a=="string"?new RegExp(a):a:null,[a]),O=b.useRef(null),B=b.useRef(null),j=b.useRef({value:_,onChange:A,isIOS:typeof window<"u"&&((w=(x=window?.CSS)==null?void 0:x.supports)==null?void 0:w.call(x,"-webkit-touch-callout","none"))}),D=b.useRef({prev:[(C=O.current)==null?void 0:C.selectionStart,(S=O.current)==null?void 0:S.selectionEnd,(R=O.current)==null?void 0:R.selectionDirection]});b.useImperativeHandle(t,()=>O.current,[]),b.useEffect(()=>{let k=O.current,ie=B.current;if(!k||!ie)return;j.current.value!==k.value&&j.current.onChange(k.value),D.current.prev=[k.selectionStart,k.selectionEnd,k.selectionDirection];function Y(){if(document.activeElement!==k){W(null),K(null);return}let re=k.selectionStart,fe=k.selectionEnd,de=k.selectionDirection,ve=k.maxLength,we=k.value,Se=D.current.prev,Ye=-1,at=-1,Xe;if(we.length!==0&&re!==null&&fe!==null){let gt=re===fe,ct=re===we.length&&we.length<ve;if(gt&&!ct){let ot=re;if(ot===0)Ye=0,at=1,Xe="forward";else if(ot===ve)Ye=ot-1,at=ot,Xe="backward";else if(ve>1&&we.length>1){let mt=0;if(Se[0]!==null&&Se[1]!==null){Xe=ot<Se[1]?"backward":"forward";let Nt=Se[0]===Se[1]&&Se[0]<ve;Xe==="backward"&&!Nt&&(mt=-1)}Ye=mt+ot,at=mt+ot+1}}Ye!==-1&&at!==-1&&Ye!==at&&O.current.setSelectionRange(Ye,at,Xe)}let Ue=Ye!==-1?Ye:re,rt=at!==-1?at:fe,et=Xe??de;W(Ue),K(rt),D.current.prev=[Ue,rt,et]}if(document.addEventListener("selectionchange",Y,{capture:!0}),Y(),document.activeElement===k&&H(!0),!document.getElementById("input-otp-style")){let re=document.createElement("style");if(re.id="input-otp-style",document.head.appendChild(re),re.sheet){let fe="background: transparent !important; color: transparent !important; border-color: transparent !important; opacity: 0 !important; box-shadow: none !important; -webkit-box-shadow: none !important; -webkit-text-fill-color: transparent !important;";Wa(re.sheet,"[data-input-otp]::selection { background: transparent !important; color: transparent !important; }"),Wa(re.sheet,`[data-input-otp]:autofill { ${fe} }`),Wa(re.sheet,`[data-input-otp]:-webkit-autofill { ${fe} }`),Wa(re.sheet,"@supports (-webkit-touch-callout: none) { [data-input-otp] { letter-spacing: -.6em !important; font-weight: 100 !important; font-stretch: ultra-condensed; font-optical-sizing: none !important; left: -1px !important; right: 1px !important; } }"),Wa(re.sheet,"[data-input-otp] + * { pointer-events: all !important; }")}}let le=()=>{ie&&ie.style.setProperty("--root-height",`${k.clientHeight}px`)};le();let pe=new ResizeObserver(le);return pe.observe(k),()=>{document.removeEventListener("selectionchange",Y,{capture:!0}),pe.disconnect()}},[]);let[V,G]=b.useState(!1),[z,H]=b.useState(!1),[ne,W]=b.useState(null),[J,K]=b.useState(null);b.useEffect(()=>{AQ(()=>{var k,ie,Y,le;(k=O.current)==null||k.dispatchEvent(new Event("input"));let pe=(ie=O.current)==null?void 0:ie.selectionStart,re=(Y=O.current)==null?void 0:Y.selectionEnd,fe=(le=O.current)==null?void 0:le.selectionDirection;pe!==null&&re!==null&&(W(pe),K(re),D.current.prev=[pe,re,fe])})},[_,z]),b.useEffect(()=>{$!==void 0&&_!==$&&$.length<i&&_.length===i&&c?.(_)},[i,c,$,_]);let U=_Q({containerRef:B,inputRef:O,pushPasswordManagerStrategy:d,isFocused:z}),oe=b.useCallback(k=>{let ie=k.currentTarget.value.slice(0,i);if(ie.length>0&&M&&!M.test(ie)){k.preventDefault();return}typeof $=="string"&&ie.length<$.length&&document.dispatchEvent(new Event("selectionchange")),A(ie)},[i,A,$,M]),X=b.useCallback(()=>{var k;if(O.current){let ie=Math.min(O.current.value.length,i-1),Y=O.current.value.length;(k=O.current)==null||k.setSelectionRange(ie,Y),W(ie),K(Y)}H(!0)},[i]),te=b.useCallback(k=>{var ie,Y;let le=O.current;if(!f&&(!j.current.isIOS||!k.clipboardData||!le))return;let pe=k.clipboardData.getData("text/plain"),re=f?f(pe):pe;k.preventDefault();let fe=(ie=O.current)==null?void 0:ie.selectionStart,de=(Y=O.current)==null?void 0:Y.selectionEnd,ve=(fe!==de?_.slice(0,fe)+re+_.slice(de):_.slice(0,fe)+re+_.slice(fe)).slice(0,i);if(ve.length>0&&M&&!M.test(ve))return;le.value=ve,A(ve);let we=Math.min(ve.length,i-1),Se=ve.length;le.setSelectionRange(we,Se),W(we),K(Se)},[i,A,M,_]),Q=b.useMemo(()=>({position:"relative",cursor:y.disabled?"default":"text",userSelect:"none",WebkitUserSelect:"none",pointerEvents:"none"}),[y.disabled]),se=b.useMemo(()=>({position:"absolute",inset:0,width:U.willPushPWMBadge?`calc(100% + ${U.PWM_BADGE_SPACE_WIDTH})`:"100%",clipPath:U.willPushPWMBadge?`inset(0 ${U.PWM_BADGE_SPACE_WIDTH} 0 0)`:void 0,height:"100%",display:"flex",textAlign:s,opacity:"1",color:"transparent",pointerEvents:"all",background:"transparent",caretColor:"transparent",border:"0 solid transparent",outline:"0 solid transparent",boxShadow:"none",lineHeight:"1",letterSpacing:"-.5em",fontSize:"var(--root-height)",fontFamily:"monospace",fontVariantNumeric:"tabular-nums"}),[U.PWM_BADGE_SPACE_WIDTH,U.willPushPWMBadge,s]),ae=b.useMemo(()=>b.createElement("input",IQ(EQ({autoComplete:y.autoComplete||"one-time-code"},y),{"data-input-otp":!0,"data-input-otp-placeholder-shown":_.length===0||void 0,"data-input-otp-mss":ne,"data-input-otp-mse":J,inputMode:u,pattern:M?.source,"aria-placeholder":l,style:se,maxLength:i,value:_,ref:O,onPaste:k=>{var ie;te(k),(ie=y.onPaste)==null||ie.call(y,k)},onChange:oe,onMouseOver:k=>{var ie;G(!0),(ie=y.onMouseOver)==null||ie.call(y,k)},onMouseLeave:k=>{var ie;G(!1),(ie=y.onMouseLeave)==null||ie.call(y,k)},onFocus:k=>{var ie;X(),(ie=y.onFocus)==null||ie.call(y,k)},onBlur:k=>{var ie;H(!1),(ie=y.onBlur)==null||ie.call(y,k)}})),[oe,X,te,u,se,i,J,ne,y,M?.source,_]),L=b.useMemo(()=>({slots:Array.from({length:i}).map((k,ie)=>{var Y;let le=z&&ne!==null&&J!==null&&(ne===J&&ie===ne||ie>=ne&&ie<J),pe=_[ie]!==void 0?_[ie]:null,re=_[0]!==void 0?null:(Y=l?.[ie])!=null?Y:null;return{char:pe,placeholderChar:re,isActive:le,hasFakeCaret:le&&pe===null}}),isFocused:z,isHovering:!y.disabled&&V}),[z,V,i,J,ne,y.disabled,_]),Z=b.useMemo(()=>m?m(L):b.createElement(MQ.Provider,{value:L},v),[v,L,m]);return b.createElement(b.Fragment,null,g!==null&&b.createElement("noscript",null,b.createElement("style",null,g)),b.createElement("div",{ref:B,"data-input-otp-container":!0,style:Q,className:p},Z,b.createElement("div",{style:{position:"absolute",inset:0,pointerEvents:"none"}},ae)))});Uk.displayName="Input";function Wa(e,t){try{e.insertRule(t)}catch{console.error("input-otp could not insert CSS rule:",t)}}var DQ=`
|
|
89
89
|
[data-input-otp] {
|
|
@@ -109,7 +109,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
109
109
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Zs(e){return pee(e)||hee(e)||s2(e)||gee()}function mee(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}function bee(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),e.nonce!==void 0&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}var vee=(function(){function e(n){var r=this;this._insertTag=function(o){var i;r.tags.length===0?r.insertionPoint?i=r.insertionPoint.nextSibling:r.prepend?i=r.container.firstChild:i=r.before:i=r.tags[r.tags.length-1].nextSibling,r.container.insertBefore(o,i),r.tags.push(o)},this.isSpeedy=n.speedy===void 0?!0:n.speedy,this.tags=[],this.ctr=0,this.nonce=n.nonce,this.key=n.key,this.container=n.container,this.prepend=n.prepend,this.insertionPoint=n.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(r){r.forEach(this._insertTag)},t.insert=function(r){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(bee(this));var o=this.tags[this.tags.length-1];if(this.isSpeedy){var i=mee(o);try{i.insertRule(r,i.cssRules.length)}catch{}}else o.appendChild(document.createTextNode(r));this.ctr++},t.flush=function(){this.tags.forEach(function(r){var o;return(o=r.parentNode)==null?void 0:o.removeChild(r)}),this.tags=[],this.ctr=0},e})(),bn="-ms-",vd="-moz-",pt="-webkit-",u2="comm",fx="rule",px="decl",yee="@import",c2="@keyframes",xee="@layer",wee=Math.abs,Lf=String.fromCharCode,Cee=Object.assign;function See(e,t){return un(e,0)^45?(((t<<2^un(e,0))<<2^un(e,1))<<2^un(e,2))<<2^un(e,3):0}function d2(e){return e.trim()}function Eee(e,t){return(e=t.exec(e))?e[0]:e}function ht(e,t,n){return e.replace(t,n)}function wv(e,t){return e.indexOf(t)}function un(e,t){return e.charCodeAt(t)|0}function jl(e,t,n){return e.slice(t,n)}function Xr(e){return e.length}function hx(e){return e.length}function lc(e,t){return t.push(e),e}function Iee(e,t){return e.map(t).join("")}var Ff=1,ca=1,f2=0,Pn=0,Yt=0,xa="";function Bf(e,t,n,r,o,i,s){return{value:e,root:t,parent:n,type:r,props:o,children:i,line:Ff,column:ca,length:s,return:""}}function za(e,t){return Cee(Bf("",null,null,"",null,null,0),e,{length:-e.length},t)}function Ree(){return Yt}function Aee(){return Yt=Pn>0?un(xa,--Pn):0,ca--,Yt===10&&(ca=1,Ff--),Yt}function Fn(){return Yt=Pn<f2?un(xa,Pn++):0,ca++,Yt===10&&(ca=1,Ff++),Yt}function eo(){return un(xa,Pn)}function Oc(){return Pn}function xu(e,t){return jl(xa,e,t)}function Ll(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function p2(e){return Ff=ca=1,f2=Xr(xa=e),Pn=0,[]}function h2(e){return xa="",e}function Nc(e){return d2(xu(Pn-1,Cv(e===91?e+2:e===40?e+1:e)))}function Tee(e){for(;(Yt=eo())&&Yt<33;)Fn();return Ll(e)>2||Ll(Yt)>3?"":" "}function Oee(e,t){for(;--t&&Fn()&&!(Yt<48||Yt>102||Yt>57&&Yt<65||Yt>70&&Yt<97););return xu(e,Oc()+(t<6&&eo()==32&&Fn()==32))}function Cv(e){for(;Fn();)switch(Yt){case e:return Pn;case 34:case 39:e!==34&&e!==39&&Cv(Yt);break;case 40:e===41&&Cv(e);break;case 92:Fn();break}return Pn}function Nee(e,t){for(;Fn()&&e+Yt!==57;)if(e+Yt===84&&eo()===47)break;return"/*"+xu(t,Pn-1)+"*"+Lf(e===47?e:Fn())}function Pee(e){for(;!Ll(eo());)Fn();return xu(e,Pn)}function _ee(e){return h2(Pc("",null,null,null,[""],e=p2(e),0,[0],e))}function Pc(e,t,n,r,o,i,s,a,l){for(var u=0,c=0,d=s,f=0,p=0,g=0,m=1,v=1,y=1,x=0,w="",C=o,S=i,R=r,I=w;v;)switch(g=x,x=Fn()){case 40:if(g!=108&&un(I,d-1)==58){wv(I+=ht(Nc(x),"&","&\f"),"&\f")!=-1&&(y=-1);break}case 34:case 39:case 91:I+=Nc(x);break;case 9:case 10:case 13:case 32:I+=Tee(g);break;case 92:I+=Oee(Oc()-1,7);continue;case 47:switch(eo()){case 42:case 47:lc(Mee(Nee(Fn(),Oc()),t,n),l);break;default:I+="/"}break;case 123*m:a[u++]=Xr(I)*y;case 125*m:case 59:case 0:switch(x){case 0:case 125:v=0;case 59+c:y==-1&&(I=ht(I,/\f/g,"")),p>0&&Xr(I)-d&&lc(p>32?dI(I+";",r,n,d-1):dI(ht(I," ","")+";",r,n,d-2),l);break;case 59:I+=";";default:if(lc(R=cI(I,t,n,u,c,o,a,w,C=[],S=[],d),i),x===123)if(c===0)Pc(I,t,R,R,C,i,d,a,S);else switch(f===99&&un(I,3)===110?100:f){case 100:case 108:case 109:case 115:Pc(e,R,R,r&&lc(cI(e,R,R,0,0,o,a,w,o,C=[],d),S),o,S,d,a,r?C:S);break;default:Pc(I,R,R,R,[""],S,0,a,S)}}u=c=p=0,m=y=1,w=I="",d=s;break;case 58:d=1+Xr(I),p=g;default:if(m<1){if(x==123)--m;else if(x==125&&m++==0&&Aee()==125)continue}switch(I+=Lf(x),x*m){case 38:y=c>0?1:(I+="\f",-1);break;case 44:a[u++]=(Xr(I)-1)*y,y=1;break;case 64:eo()===45&&(I+=Nc(Fn())),f=eo(),c=d=Xr(w=I+=Pee(Oc())),x++;break;case 45:g===45&&Xr(I)==2&&(m=0)}}return i}function cI(e,t,n,r,o,i,s,a,l,u,c){for(var d=o-1,f=o===0?i:[""],p=hx(f),g=0,m=0,v=0;g<r;++g)for(var y=0,x=jl(e,d+1,d=wee(m=s[g])),w=e;y<p;++y)(w=d2(m>0?f[y]+" "+x:ht(x,/&\f/g,f[y])))&&(l[v++]=w);return Bf(e,t,n,o===0?fx:a,l,u,c)}function Mee(e,t,n){return Bf(e,t,n,u2,Lf(Ree()),jl(e,2,-2),0)}function dI(e,t,n,r){return Bf(e,t,n,px,jl(e,0,r),jl(e,r+1,-1),r)}function Js(e,t){for(var n="",r=hx(e),o=0;o<r;o++)n+=t(e[o],o,e,t)||"";return n}function Dee(e,t,n,r){switch(e.type){case xee:if(e.children.length)break;case yee:case px:return e.return=e.return||e.value;case u2:return"";case c2:return e.return=e.value+"{"+Js(e.children,r)+"}";case fx:e.value=e.props.join(",")}return Xr(n=Js(e.children,r))?e.return=e.value+"{"+n+"}":""}function kee(e){var t=hx(e);return function(n,r,o,i){for(var s="",a=0;a<t;a++)s+=e[a](n,r,o,i)||"";return s}}function jee(e){return function(t){t.root||(t=t.return)&&e(t)}}function Lee(e){var t=Object.create(null);return function(n){return t[n]===void 0&&(t[n]=e(n)),t[n]}}var Fee=function(t,n,r){for(var o=0,i=0;o=i,i=eo(),o===38&&i===12&&(n[r]=1),!Ll(i);)Fn();return xu(t,Pn)},Bee=function(t,n){var r=-1,o=44;do switch(Ll(o)){case 0:o===38&&eo()===12&&(n[r]=1),t[r]+=Fee(Pn-1,n,r);break;case 2:t[r]+=Nc(o);break;case 4:if(o===44){t[++r]=eo()===58?"&\f":"",n[r]=t[r].length;break}default:t[r]+=Lf(o)}while(o=Fn());return t},Vee=function(t,n){return h2(Bee(p2(t),n))},fI=new WeakMap,$ee=function(t){if(!(t.type!=="rule"||!t.parent||t.length<1)){for(var n=t.value,r=t.parent,o=t.column===r.column&&t.line===r.line;r.type!=="rule";)if(r=r.parent,!r)return;if(!(t.props.length===1&&n.charCodeAt(0)!==58&&!fI.get(r))&&!o){fI.set(t,!0);for(var i=[],s=Vee(n,i),a=r.props,l=0,u=0;l<s.length;l++)for(var c=0;c<a.length;c++,u++)t.props[u]=i[l]?s[l].replace(/&\f/g,a[c]):a[c]+" "+s[l]}}},Gee=function(t){if(t.type==="decl"){var n=t.value;n.charCodeAt(0)===108&&n.charCodeAt(2)===98&&(t.return="",t.value="")}};function g2(e,t){switch(See(e,t)){case 5103:return pt+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return pt+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return pt+e+vd+e+bn+e+e;case 6828:case 4268:return pt+e+bn+e+e;case 6165:return pt+e+bn+"flex-"+e+e;case 5187:return pt+e+ht(e,/(\w+).+(:[^]+)/,pt+"box-$1$2"+bn+"flex-$1$2")+e;case 5443:return pt+e+bn+"flex-item-"+ht(e,/flex-|-self/,"")+e;case 4675:return pt+e+bn+"flex-line-pack"+ht(e,/align-content|flex-|-self/,"")+e;case 5548:return pt+e+bn+ht(e,"shrink","negative")+e;case 5292:return pt+e+bn+ht(e,"basis","preferred-size")+e;case 6060:return pt+"box-"+ht(e,"-grow","")+pt+e+bn+ht(e,"grow","positive")+e;case 4554:return pt+ht(e,/([^-])(transform)/g,"$1"+pt+"$2")+e;case 6187:return ht(ht(ht(e,/(zoom-|grab)/,pt+"$1"),/(image-set)/,pt+"$1"),e,"")+e;case 5495:case 3959:return ht(e,/(image-set\([^]*)/,pt+"$1$`$1");case 4968:return ht(ht(e,/(.+:)(flex-)?(.*)/,pt+"box-pack:$3"+bn+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+pt+e+e;case 4095:case 3583:case 4068:case 2532:return ht(e,/(.+)-inline(.+)/,pt+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(Xr(e)-1-t>6)switch(un(e,t+1)){case 109:if(un(e,t+4)!==45)break;case 102:return ht(e,/(.+:)(.+)-([^]+)/,"$1"+pt+"$2-$3$1"+vd+(un(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~wv(e,"stretch")?g2(ht(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(un(e,t+1)!==115)break;case 6444:switch(un(e,Xr(e)-3-(~wv(e,"!important")&&10))){case 107:return ht(e,":",":"+pt)+e;case 101:return ht(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+pt+(un(e,14)===45?"inline-":"")+"box$3$1"+pt+"$2$3$1"+bn+"$2box$3")+e}break;case 5936:switch(un(e,t+11)){case 114:return pt+e+bn+ht(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return pt+e+bn+ht(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return pt+e+bn+ht(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return pt+e+bn+e+e}return e}var Hee=function(t,n,r,o){if(t.length>-1&&!t.return)switch(t.type){case px:t.return=g2(t.value,t.length);break;case c2:return Js([za(t,{value:ht(t.value,"@","@"+pt)})],o);case fx:if(t.length)return Iee(t.props,function(i){switch(Eee(i,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return Js([za(t,{props:[ht(i,/:(read-\w+)/,":"+vd+"$1")]})],o);case"::placeholder":return Js([za(t,{props:[ht(i,/:(plac\w+)/,":"+pt+"input-$1")]}),za(t,{props:[ht(i,/:(plac\w+)/,":"+vd+"$1")]}),za(t,{props:[ht(i,/:(plac\w+)/,bn+"input-$1")]})],o)}return""})}},Wee=[Hee],zee=function(t){var n=t.key;if(n==="css"){var r=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(r,function(m){var v=m.getAttribute("data-emotion");v.indexOf(" ")!==-1&&(document.head.appendChild(m),m.setAttribute("data-s",""))})}var o=t.stylisPlugins||Wee,i={},s,a=[];s=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+n+' "]'),function(m){for(var v=m.getAttribute("data-emotion").split(" "),y=1;y<v.length;y++)i[v[y]]=!0;a.push(m)});var l,u=[$ee,Gee];{var c,d=[Dee,jee(function(m){c.insert(m)})],f=kee(u.concat(o,d)),p=function(v){return Js(_ee(v),f)};l=function(v,y,x,w){c=x,p(v?v+"{"+y.styles+"}":y.styles),w&&(g.inserted[y.name]=!0)}}var g={key:n,sheet:new vee({key:n,container:s,nonce:t.nonce,speedy:t.speedy,prepend:t.prepend,insertionPoint:t.insertionPoint}),nonce:t.nonce,inserted:i,registered:{},insert:l};return g.sheet.hydrate(a),g},Vm,pI;function qee(){if(pI)return Vm;pI=1;var e=jX(),t={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},n={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},r={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},o={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},i={};i[e.ForwardRef]=r,i[e.Memo]=o;function s(g){return e.isMemo(g)?o:i[g.$$typeof]||t}var a=Object.defineProperty,l=Object.getOwnPropertyNames,u=Object.getOwnPropertySymbols,c=Object.getOwnPropertyDescriptor,d=Object.getPrototypeOf,f=Object.prototype;function p(g,m,v){if(typeof m!="string"){if(f){var y=d(m);y&&y!==f&&p(g,y,v)}var x=l(m);u&&(x=x.concat(u(m)));for(var w=s(g),C=s(m),S=0;S<x.length;++S){var R=x[S];if(!n[R]&&!(v&&v[R])&&!(C&&C[R])&&!(w&&w[R])){var I=c(m,R);try{a(g,R,I)}catch{}}}}return g}return Vm=p,Vm}qee();var Uee=!0;function Yee(e,t,n){var r="";return n.split(" ").forEach(function(o){e[o]!==void 0?t.push(e[o]+";"):o&&(r+=o+" ")}),r}var m2=function(t,n,r){var o=t.key+"-"+n.name;(r===!1||Uee===!1)&&t.registered[o]===void 0&&(t.registered[o]=n.styles)},Xee=function(t,n,r){m2(t,n,r);var o=t.key+"-"+n.name;if(t.inserted[n.name]===void 0){var i=n;do t.insert(n===i?"."+o:"",i,t.sheet,!0),i=i.next;while(i!==void 0)}};function Zee(e){for(var t=0,n,r=0,o=e.length;o>=4;++r,o-=4)n=e.charCodeAt(r)&255|(e.charCodeAt(++r)&255)<<8|(e.charCodeAt(++r)&255)<<16|(e.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,t=(n&65535)*1540483477+((n>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(o){case 3:t^=(e.charCodeAt(r+2)&255)<<16;case 2:t^=(e.charCodeAt(r+1)&255)<<8;case 1:t^=e.charCodeAt(r)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var Jee={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},Kee=/[A-Z]|^ms/g,Qee=/_EMO_([^_]+?)_([^]*?)_EMO_/g,b2=function(t){return t.charCodeAt(1)===45},hI=function(t){return t!=null&&typeof t!="boolean"},$m=Lee(function(e){return b2(e)?e:e.replace(Kee,"-$&").toLowerCase()}),gI=function(t,n){switch(t){case"animation":case"animationName":if(typeof n=="string")return n.replace(Qee,function(r,o,i){return Zr={name:o,styles:i,next:Zr},o})}return Jee[t]!==1&&!b2(t)&&typeof n=="number"&&n!==0?n+"px":n};function Fl(e,t,n){if(n==null)return"";var r=n;if(r.__emotion_styles!==void 0)return r;switch(typeof n){case"boolean":return"";case"object":{var o=n;if(o.anim===1)return Zr={name:o.name,styles:o.styles,next:Zr},o.name;var i=n;if(i.styles!==void 0){var s=i.next;if(s!==void 0)for(;s!==void 0;)Zr={name:s.name,styles:s.styles,next:Zr},s=s.next;var a=i.styles+";";return a}return ete(e,t,n)}case"function":{if(e!==void 0){var l=Zr,u=n(e);return Zr=l,Fl(e,t,u)}break}}var c=n;return c}function ete(e,t,n){var r="";if(Array.isArray(n))for(var o=0;o<n.length;o++)r+=Fl(e,t,n[o])+";";else for(var i in n){var s=n[i];if(typeof s!="object"){var a=s;hI(a)&&(r+=$m(i)+":"+gI(i,a)+";")}else if(Array.isArray(s)&&typeof s[0]=="string"&&t==null)for(var l=0;l<s.length;l++)hI(s[l])&&(r+=$m(i)+":"+gI(i,s[l])+";");else{var u=Fl(e,t,s);switch(i){case"animation":case"animationName":{r+=$m(i)+":"+u+";";break}default:r+=i+"{"+u+"}"}}}return r}var mI=/label:\s*([^\s;{]+)\s*(;|$)/g,Zr;function v2(e,t,n){if(e.length===1&&typeof e[0]=="object"&&e[0]!==null&&e[0].styles!==void 0)return e[0];var r=!0,o="";Zr=void 0;var i=e[0];if(i==null||i.raw===void 0)r=!1,o+=Fl(n,t,i);else{var s=i;o+=s[0]}for(var a=1;a<e.length;a++)if(o+=Fl(n,t,e[a]),r){var l=i;o+=l[a]}mI.lastIndex=0;for(var u="",c;(c=mI.exec(o))!==null;)u+="-"+c[1];var d=Zee(o)+u;return{name:d,styles:o,next:Zr}}var tte=function(t){return t()},nte=b.useInsertionEffect?b.useInsertionEffect:!1,rte=nte||tte,y2=b.createContext(typeof HTMLElement<"u"?zee({key:"css"}):null);y2.Provider;var ote=function(t){return N.forwardRef(function(n,r){var o=N.useContext(y2);return t(n,o,r)})},ite=b.createContext({}),gx={}.hasOwnProperty,Sv="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",ste=function(t,n){var r={};for(var o in n)gx.call(n,o)&&(r[o]=n[o]);return r[Sv]=t,r},ate=function(t){var n=t.cache,r=t.serialized,o=t.isStringTag;return m2(n,r,o),rte(function(){return Xee(n,r,o)}),null},lte=ote(function(e,t,n){var r=e.css;typeof r=="string"&&t.registered[r]!==void 0&&(r=t.registered[r]);var o=e[Sv],i=[r],s="";typeof e.className=="string"?s=Yee(t.registered,i,e.className):e.className!=null&&(s=e.className+" ");var a=v2(i,void 0,b.useContext(ite));s+=t.key+"-"+a.name;var l={};for(var u in e)gx.call(e,u)&&u!=="css"&&u!==Sv&&(l[u]=e[u]);return l.className=s,n&&(l.ref=n),b.createElement(b.Fragment,null,b.createElement(ate,{cache:t,serialized:a,isStringTag:typeof o=="string"}),b.createElement(o,l))}),ute=lte,Fe=function(t,n){var r=arguments;if(n==null||!gx.call(n,"css"))return b.createElement.apply(void 0,r);var o=r.length,i=new Array(o);i[0]=ute,i[1]=ste(t,n);for(var s=2;s<o;s++)i[s]=r[s];return b.createElement.apply(null,i)};(function(e){var t;t||(t=e.JSX||(e.JSX={}))})(Fe||(Fe={}));function mx(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return v2(t)}function cte(){var e=mx.apply(void 0,arguments),t="animation-"+e.name;return{name:t,styles:"@keyframes "+t+"{"+e.styles+"}",anim:1,toString:function(){return"_EMO_"+this.name+"_"+this.styles+"_EMO_"}}}function dte(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var Ev=N.useLayoutEffect,fte=["className","clearValue","cx","getStyles","getClassNames","getValue","hasValue","isMulti","isRtl","options","selectOption","selectProps","setValue","theme"],yd=function(){};function pte(e,t){return t?t[0]==="-"?e+t:e+"__"+t:e}function hte(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),o=2;o<n;o++)r[o-2]=arguments[o];var i=[].concat(r);if(t&&e)for(var s in t)t.hasOwnProperty(s)&&t[s]&&i.push("".concat(pte(e,s)));return i.filter(function(a){return a}).map(function(a){return String(a).trim()}).join(" ")}var xd=function(t){return Ste(t)?t.filter(Boolean):rs(t)==="object"&&t!==null?[t]:[]},x2=function(t){t.className,t.clearValue,t.cx,t.getStyles,t.getClassNames,t.getValue,t.hasValue,t.isMulti,t.isRtl,t.options,t.selectOption,t.selectProps,t.setValue,t.theme;var n=ho(t,fte);return $e({},n)},$t=function(t,n,r){var o=t.cx,i=t.getStyles,s=t.getClassNames,a=t.className;return{css:i(n,t),className:o(r??{},s(n,t),a)}};function Vf(e){return[document.documentElement,document.body,window].indexOf(e)>-1}function gte(e){return Vf(e)?window.innerHeight:e.clientHeight}function w2(e){return Vf(e)?window.pageYOffset:e.scrollTop}function wd(e,t){if(Vf(e)){window.scrollTo(0,t);return}e.scrollTop=t}function mte(e){var t=getComputedStyle(e),n=t.position==="absolute",r=/(auto|scroll)/;if(t.position==="fixed")return document.documentElement;for(var o=e;o=o.parentElement;)if(t=getComputedStyle(o),!(n&&t.position==="static")&&r.test(t.overflow+t.overflowY+t.overflowX))return o;return document.documentElement}function bte(e,t,n,r){return n*((e=e/r-1)*e*e+1)+t}function uc(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:200,r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:yd,o=w2(e),i=t-o,s=10,a=0;function l(){a+=s;var u=bte(a,o,i,n);wd(e,u),a<n?window.requestAnimationFrame(l):r(e)}l()}function bI(e,t){var n=e.getBoundingClientRect(),r=t.getBoundingClientRect(),o=t.offsetHeight/3;r.bottom+o>n.bottom?wd(e,Math.min(t.offsetTop+t.clientHeight-e.offsetHeight+o,e.scrollHeight)):r.top-o<n.top&&wd(e,Math.max(t.offsetTop-o,0))}function vte(e){var t=e.getBoundingClientRect();return{bottom:t.bottom,height:t.height,left:t.left,right:t.right,top:t.top,width:t.width}}function vI(){try{return document.createEvent("TouchEvent"),!0}catch{return!1}}function yte(){try{return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)}catch{return!1}}var C2=!1,xte={get passive(){return C2=!0}},cc=typeof window<"u"?window:{};cc.addEventListener&&cc.removeEventListener&&(cc.addEventListener("p",yd,xte),cc.removeEventListener("p",yd,!1));var wte=C2;function Cte(e){return e!=null}function Ste(e){return Array.isArray(e)}function ol(e,t,n){return e?t:n}var Ete=function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];var i=Object.entries(t).filter(function(s){var a=Po(s,1),l=a[0];return!r.includes(l)});return i.reduce(function(s,a){var l=Po(a,2),u=l[0],c=l[1];return s[u]=c,s},{})},Ite=["children","innerProps"],Rte=["children","innerProps"];function Ate(e){var t=e.maxHeight,n=e.menuEl,r=e.minHeight,o=e.placement,i=e.shouldScroll,s=e.isFixedPosition,a=e.controlHeight,l=mte(n),u={placement:"bottom",maxHeight:t};if(!n||!n.offsetParent)return u;var c=l.getBoundingClientRect(),d=c.height,f=n.getBoundingClientRect(),p=f.bottom,g=f.height,m=f.top,v=n.offsetParent.getBoundingClientRect(),y=v.top,x=s?window.innerHeight:gte(l),w=w2(l),C=parseInt(getComputedStyle(n).marginBottom,10),S=parseInt(getComputedStyle(n).marginTop,10),R=y-S,I=x-m,T=R+w,_=d-w-m,$=p-x+w+C,A=w+m-S,M=160;switch(o){case"auto":case"bottom":if(I>=g)return{placement:"bottom",maxHeight:t};if(_>=g&&!s)return i&&uc(l,$,M),{placement:"bottom",maxHeight:t};if(!s&&_>=r||s&&I>=r){i&&uc(l,$,M);var O=s?I-C:_-C;return{placement:"bottom",maxHeight:O}}if(o==="auto"||s){var B=t,j=s?R:T;return j>=r&&(B=Math.min(j-C-a,t)),{placement:"top",maxHeight:B}}if(o==="bottom")return i&&wd(l,$),{placement:"bottom",maxHeight:t};break;case"top":if(R>=g)return{placement:"top",maxHeight:t};if(T>=g&&!s)return i&&uc(l,A,M),{placement:"top",maxHeight:t};if(!s&&T>=r||s&&R>=r){var D=t;return(!s&&T>=r||s&&R>=r)&&(D=s?R-S:T-S),i&&uc(l,A,M),{placement:"top",maxHeight:D}}return{placement:"bottom",maxHeight:t};default:throw new Error('Invalid placement provided "'.concat(o,'".'))}return u}function Tte(e){var t={bottom:"top",top:"bottom"};return e?t[e]:"bottom"}var S2=function(t){return t==="auto"?"bottom":t},Ote=function(t,n){var r,o=t.placement,i=t.theme,s=i.borderRadius,a=i.spacing,l=i.colors;return $e((r={label:"menu"},rl(r,Tte(o),"100%"),rl(r,"position","absolute"),rl(r,"width","100%"),rl(r,"zIndex",1),r),n?{}:{backgroundColor:l.neutral0,borderRadius:s,boxShadow:"0 0 0 1px hsla(0, 0%, 0%, 0.1), 0 4px 11px hsla(0, 0%, 0%, 0.1)",marginBottom:a.menuGutter,marginTop:a.menuGutter})},E2=N.createContext(null),Nte=function(t){var n=t.children,r=t.minMenuHeight,o=t.maxMenuHeight,i=t.menuPlacement,s=t.menuPosition,a=t.menuShouldScrollIntoView,l=t.theme,u=N.useContext(E2)||{},c=u.setPortalPlacement,d=N.useRef(null),f=N.useState(o),p=Po(f,2),g=p[0],m=p[1],v=N.useState(null),y=Po(v,2),x=y[0],w=y[1],C=l.spacing.controlHeight;return Ev(function(){var S=d.current;if(S){var R=s==="fixed",I=a&&!R,T=Ate({maxHeight:o,menuEl:S,minHeight:r,placement:i,shouldScroll:I,isFixedPosition:R,controlHeight:C});m(T.maxHeight),w(T.placement),c?.(T.placement)}},[o,i,s,a,r,c,C]),n({ref:d,placerProps:$e($e({},t),{},{placement:x||S2(i),maxHeight:g})})},Pte=function(t){var n=t.children,r=t.innerRef,o=t.innerProps;return Fe("div",He({},$t(t,"menu",{menu:!0}),{ref:r},o),n)},_te=Pte,Mte=function(t,n){var r=t.maxHeight,o=t.theme.spacing.baseUnit;return $e({maxHeight:r,overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},n?{}:{paddingBottom:o,paddingTop:o})},Dte=function(t){var n=t.children,r=t.innerProps,o=t.innerRef,i=t.isMulti;return Fe("div",He({},$t(t,"menuList",{"menu-list":!0,"menu-list--is-multi":i}),{ref:o},r),n)},I2=function(t,n){var r=t.theme,o=r.spacing.baseUnit,i=r.colors;return $e({textAlign:"center"},n?{}:{color:i.neutral40,padding:"".concat(o*2,"px ").concat(o*3,"px")})},kte=I2,jte=I2,Lte=function(t){var n=t.children,r=n===void 0?"No options":n,o=t.innerProps,i=ho(t,Ite);return Fe("div",He({},$t($e($e({},i),{},{children:r,innerProps:o}),"noOptionsMessage",{"menu-notice":!0,"menu-notice--no-options":!0}),o),r)},Fte=function(t){var n=t.children,r=n===void 0?"Loading...":n,o=t.innerProps,i=ho(t,Rte);return Fe("div",He({},$t($e($e({},i),{},{children:r,innerProps:o}),"loadingMessage",{"menu-notice":!0,"menu-notice--loading":!0}),o),r)},Bte=function(t){var n=t.rect,r=t.offset,o=t.position;return{left:n.left,position:o,top:r,width:n.width,zIndex:1}},Vte=function(t){var n=t.appendTo,r=t.children,o=t.controlElement,i=t.innerProps,s=t.menuPlacement,a=t.menuPosition,l=N.useRef(null),u=N.useRef(null),c=N.useState(S2(s)),d=Po(c,2),f=d[0],p=d[1],g=N.useMemo(function(){return{setPortalPlacement:p}},[]),m=N.useState(null),v=Po(m,2),y=v[0],x=v[1],w=N.useCallback(function(){if(o){var I=vte(o),T=a==="fixed"?0:window.pageYOffset,_=I[f]+T;(_!==y?.offset||I.left!==y?.rect.left||I.width!==y?.rect.width)&&x({offset:_,rect:I})}},[o,a,f,y?.offset,y?.rect.left,y?.rect.width]);Ev(function(){w()},[w]);var C=N.useCallback(function(){typeof u.current=="function"&&(u.current(),u.current=null),o&&l.current&&(u.current=Gc(o,l.current,w,{elementResize:"ResizeObserver"in window}))},[o,w]);Ev(function(){C()},[C]);var S=N.useCallback(function(I){l.current=I,C()},[C]);if(!n&&a!=="fixed"||!y)return null;var R=Fe("div",He({ref:S},$t($e($e({},t),{},{offset:y.offset,position:a,rect:y.rect}),"menuPortal",{"menu-portal":!0}),i),r);return Fe(E2.Provider,{value:g},n?Zv.createPortal(R,n):R)},$te=function(t){var n=t.isDisabled,r=t.isRtl;return{label:"container",direction:r?"rtl":void 0,pointerEvents:n?"none":void 0,position:"relative"}},Gte=function(t){var n=t.children,r=t.innerProps,o=t.isDisabled,i=t.isRtl;return Fe("div",He({},$t(t,"container",{"--is-disabled":o,"--is-rtl":i}),r),n)},Hte=function(t,n){var r=t.theme.spacing,o=t.isMulti,i=t.hasValue,s=t.selectProps.controlShouldRenderValue;return $e({alignItems:"center",display:o&&i&&s?"flex":"grid",flex:1,flexWrap:"wrap",WebkitOverflowScrolling:"touch",position:"relative",overflow:"hidden"},n?{}:{padding:"".concat(r.baseUnit/2,"px ").concat(r.baseUnit*2,"px")})},Wte=function(t){var n=t.children,r=t.innerProps,o=t.isMulti,i=t.hasValue;return Fe("div",He({},$t(t,"valueContainer",{"value-container":!0,"value-container--is-multi":o,"value-container--has-value":i}),r),n)},zte=function(){return{alignItems:"center",alignSelf:"stretch",display:"flex",flexShrink:0}},qte=function(t){var n=t.children,r=t.innerProps;return Fe("div",He({},$t(t,"indicatorsContainer",{indicators:!0}),r),n)},yI,Ute=["size"],Yte=["innerProps","isRtl","size"];function Xte(){return"You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."}var Zte=process.env.NODE_ENV==="production"?{name:"8mmkcg",styles:"display:inline-block;fill:currentColor;line-height:1;stroke:currentColor;stroke-width:0"}:{name:"tj5bde-Svg",styles:"display:inline-block;fill:currentColor;line-height:1;stroke:currentColor;stroke-width:0;label:Svg;",map:"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImluZGljYXRvcnMudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQXlCSSIsImZpbGUiOiJpbmRpY2F0b3JzLnRzeCIsInNvdXJjZXNDb250ZW50IjpbIi8qKiBAanN4IGpzeCAqL1xuaW1wb3J0IHsgSlNYLCBSZWFjdE5vZGUgfSBmcm9tICdyZWFjdCc7XG5pbXBvcnQgeyBqc3gsIGtleWZyYW1lcyB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcblxuaW1wb3J0IHtcbiAgQ29tbW9uUHJvcHNBbmRDbGFzc05hbWUsXG4gIENTU09iamVjdFdpdGhMYWJlbCxcbiAgR3JvdXBCYXNlLFxufSBmcm9tICcuLi90eXBlcyc7XG5pbXBvcnQgeyBnZXRTdHlsZVByb3BzIH0gZnJvbSAnLi4vdXRpbHMnO1xuXG4vLyA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT1cbi8vIERyb3Bkb3duICYgQ2xlYXIgSWNvbnNcbi8vID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PVxuXG5jb25zdCBTdmcgPSAoe1xuICBzaXplLFxuICAuLi5wcm9wc1xufTogSlNYLkludHJpbnNpY0VsZW1lbnRzWydzdmcnXSAmIHsgc2l6ZTogbnVtYmVyIH0pID0+IChcbiAgPHN2Z1xuICAgIGhlaWdodD17c2l6ZX1cbiAgICB3aWR0aD17c2l6ZX1cbiAgICB2aWV3Qm94PVwiMCAwIDIwIDIwXCJcbiAgICBhcmlhLWhpZGRlbj1cInRydWVcIlxuICAgIGZvY3VzYWJsZT1cImZhbHNlXCJcbiAgICBjc3M9e3tcbiAgICAgIGRpc3BsYXk6ICdpbmxpbmUtYmxvY2snLFxuICAgICAgZmlsbDogJ2N1cnJlbnRDb2xvcicsXG4gICAgICBsaW5lSGVpZ2h0OiAxLFxuICAgICAgc3Ryb2tlOiAnY3VycmVudENvbG9yJyxcbiAgICAgIHN0cm9rZVdpZHRoOiAwLFxuICAgIH19XG4gICAgey4uLnByb3BzfVxuICAvPlxuKTtcblxuZXhwb3J0IHR5cGUgQ3Jvc3NJY29uUHJvcHMgPSBKU1guSW50cmluc2ljRWxlbWVudHNbJ3N2ZyddICYgeyBzaXplPzogbnVtYmVyIH07XG5leHBvcnQgY29uc3QgQ3Jvc3NJY29uID0gKHByb3BzOiBDcm9zc0ljb25Qcm9wcykgPT4gKFxuICA8U3ZnIHNpemU9ezIwfSB7Li4ucHJvcHN9PlxuICAgIDxwYXRoIGQ9XCJNMTQuMzQ4IDE0Ljg0OWMtMC40NjkgMC40NjktMS4yMjkgMC40NjktMS42OTcgMGwtMi42NTEtMy4wMzAtMi42NTEgMy4wMjljLTAuNDY5IDAuNDY5LTEuMjI5IDAuNDY5LTEuNjk3IDAtMC40NjktMC40NjktMC40NjktMS4yMjkgMC0xLjY5N2wyLjc1OC0zLjE1LTIuNzU5LTMuMTUyYy0wLjQ2OS0wLjQ2OS0wLjQ2OS0xLjIyOCAwLTEuNjk3czEuMjI4LTAuNDY5IDEuNjk3IDBsMi42NTIgMy4wMzEgMi42NTEtMy4wMzFjMC40NjktMC40NjkgMS4yMjgtMC40NjkgMS42OTcgMHMwLjQ2OSAxLjIyOSAwIDEuNjk3bC0yLjc1OCAzLjE1MiAyLjc1OCAzLjE1YzAuNDY5IDAuNDY5IDAuNDY5IDEuMjI5IDAgMS42OTh6XCIgLz5cbiAgPC9Tdmc+XG4pO1xuZXhwb3J0IHR5cGUgRG93bkNoZXZyb25Qcm9wcyA9IEpTWC5JbnRyaW5zaWNFbGVtZW50c1snc3ZnJ10gJiB7IHNpemU/OiBudW1iZXIgfTtcbmV4cG9ydCBjb25zdCBEb3duQ2hldnJvbiA9IChwcm9wczogRG93bkNoZXZyb25Qcm9wcykgPT4gKFxuICA8U3ZnIHNpemU9ezIwfSB7Li4ucHJvcHN9PlxuICAgIDxwYXRoIGQ9XCJNNC41MTYgNy41NDhjMC40MzYtMC40NDYgMS4wNDMtMC40ODEgMS41NzYgMGwzLjkwOCAzLjc0NyAzLjkwOC0zLjc0N2MwLjUzMy0wLjQ4MSAxLjE0MS0wLjQ0NiAxLjU3NCAwIDAuNDM2IDAuNDQ1IDAuNDA4IDEuMTk3IDAgMS42MTUtMC40MDYgMC40MTgtNC42OTUgNC41MDItNC42OTUgNC41MDItMC4yMTcgMC4yMjMtMC41MDIgMC4zMzUtMC43ODcgMC4zMzVzLTAuNTctMC4xMTItMC43ODktMC4zMzVjMCAwLTQuMjg3LTQuMDg0LTQuNjk1LTQuNTAycy0wLjQzNi0xLjE3IDAtMS42MTV6XCIgLz5cbiAgPC9Tdmc+XG4pO1xuXG4vLyA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT1cbi8vIERyb3Bkb3duICYgQ2xlYXIgQnV0dG9uc1xuLy8gPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09XG5cbmV4cG9ydCBpbnRlcmZhY2UgRHJvcGRvd25JbmRpY2F0b3JQcm9wczxcbiAgT3B0aW9uID0gdW5rbm93bixcbiAgSXNNdWx0aSBleHRlbmRzIGJvb2xlYW4gPSBib29sZWFuLFxuICBHcm91cCBleHRlbmRzIEdyb3VwQmFzZTxPcHRpb24+ID0gR3JvdXBCYXNlPE9wdGlvbj5cbj4gZXh0ZW5kcyBDb21tb25Qcm9wc0FuZENsYXNzTmFtZTxPcHRpb24sIElzTXVsdGksIEdyb3VwPiB7XG4gIC8qKiBUaGUgY2hpbGRyZW4gdG8gYmUgcmVuZGVyZWQgaW5zaWRlIHRoZSBpbmRpY2F0b3IuICovXG4gIGNoaWxkcmVuPzogUmVhY3ROb2RlO1xuICAvKiogUHJvcHMgdGhhdCB3aWxsIGJlIHBhc3NlZCBvbiB0byB0aGUgY2hpbGRyZW4uICovXG4gIGlubmVyUHJvcHM6IEpTWC5JbnRyaW5zaWNFbGVtZW50c1snZGl2J107XG4gIC8qKiBUaGUgZm9jdXNlZCBzdGF0ZSBvZiB0aGUgc2VsZWN0LiAqL1xuICBpc0ZvY3VzZWQ6IGJvb2xlYW47XG4gIGlzRGlzYWJsZWQ6IGJvb2xlYW47XG59XG5cbmNvbnN0IGJhc2VDU1MgPSA8XG4gIE9wdGlvbixcbiAgSXNNdWx0aSBleHRlbmRzIGJvb2xlYW4sXG4gIEdyb3VwIGV4dGVuZHMgR3JvdXBCYXNlPE9wdGlvbj5cbj4oXG4gIHtcbiAgICBpc0ZvY3VzZWQsXG4gICAgdGhlbWU6IHtcbiAgICAgIHNwYWNpbmc6IHsgYmFzZVVuaXQgfSxcbiAgICAgIGNvbG9ycyxcbiAgICB9LFxuICB9OlxuICAgIHwgRHJvcGRvd25JbmRpY2F0b3JQcm9wczxPcHRpb24sIElzTXVsdGksIEdyb3VwPlxuICAgIHwgQ2xlYXJJbmRpY2F0b3JQcm9wczxPcHRpb24sIElzTXVsdGksIEdyb3VwPixcbiAgdW5zdHlsZWQ6IGJvb2xlYW5cbik6IENTU09iamVjdFdpdGhMYWJlbCA9PiAoe1xuICBsYWJlbDogJ2luZGljYXRvckNvbnRhaW5lcicsXG4gIGRpc3BsYXk6ICdmbGV4JyxcbiAgdHJhbnNpdGlvbjogJ2NvbG9yIDE1MG1zJyxcbiAgLi4uKHVuc3R5bGVkXG4gICAgPyB7fVxuICAgIDoge1xuICAgICAgICBjb2xvcjogaXNGb2N1c2VkID8gY29sb3JzLm5ldXRyYWw2MCA6IGNvbG9ycy5uZXV0cmFsMjAsXG4gICAgICAgIHBhZGRpbmc6IGJhc2VVbml0ICogMixcbiAgICAgICAgJzpob3Zlcic6IHtcbiAgICAgICAgICBjb2xvcjogaXNGb2N1c2VkID8gY29sb3JzLm5ldXRyYWw4MCA6IGNvbG9ycy5uZXV0cmFsNDAsXG4gICAgICAgIH0sXG4gICAgICB9KSxcbn0pO1xuXG5leHBvcnQgY29uc3QgZHJvcGRvd25JbmRpY2F0b3JDU1MgPSBiYXNlQ1NTO1xuZXhwb3J0IGNvbnN0IERyb3Bkb3duSW5kaWNhdG9yID0gPFxuICBPcHRpb24sXG4gIElzTXVsdGkgZXh0ZW5kcyBib29sZWFuLFxuICBHcm91cCBleHRlbmRzIEdyb3VwQmFzZTxPcHRpb24+XG4+KFxuICBwcm9wczogRHJvcGRvd25JbmRpY2F0b3JQcm9wczxPcHRpb24sIElzTXVsdGksIEdyb3VwPlxuKSA9PiB7XG4gIGNvbnN0IHsgY2hpbGRyZW4sIGlubmVyUHJvcHMgfSA9IHByb3BzO1xuICByZXR1cm4gKFxuICAgIDxkaXZcbiAgICAgIHsuLi5nZXRTdHlsZVByb3BzKHByb3BzLCAnZHJvcGRvd25JbmRpY2F0b3InLCB7XG4gICAgICAgIGluZGljYXRvcjogdHJ1ZSxcbiAgICAgICAgJ2Ryb3Bkb3duLWluZGljYXRvcic6IHRydWUsXG4gICAgICB9KX1cbiAgICAgIHsuLi5pbm5lclByb3BzfVxuICAgID5cbiAgICAgIHtjaGlsZHJlbiB8fCA8RG93bkNoZXZyb24gLz59XG4gICAgPC9kaXY+XG4gICk7XG59O1xuXG5leHBvcnQgaW50ZXJmYWNlIENsZWFySW5kaWNhdG9yUHJvcHM8XG4gIE9wdGlvbiA9IHVua25vd24sXG4gIElzTXVsdGkgZXh0ZW5kcyBib29sZWFuID0gYm9vbGVhbixcbiAgR3JvdXAgZXh0ZW5kcyBHcm91cEJhc2U8T3B0aW9uPiA9IEdyb3VwQmFzZTxPcHRpb24+XG4+IGV4dGVuZHMgQ29tbW9uUHJvcHNBbmRDbGFzc05hbWU8T3B0aW9uLCBJc011bHRpLCBHcm91cD4ge1xuICAvKiogVGhlIGNoaWxkcmVuIHRvIGJlIHJlbmRlcmVkIGluc2lkZSB0aGUgaW5kaWNhdG9yLiAqL1xuICBjaGlsZHJlbj86IFJlYWN0Tm9kZTtcbiAgLyoqIFByb3BzIHRoYXQgd2lsbCBiZSBwYXNzZWQgb24gdG8gdGhlIGNoaWxkcmVuLiAqL1xuICBpbm5lclByb3BzOiBKU1guSW50cmluc2ljRWxlbWVudHNbJ2RpdiddO1xuICAvKiogVGhlIGZvY3VzZWQgc3RhdGUgb2YgdGhlIHNlbGVjdC4gKi9cbiAgaXNGb2N1c2VkOiBib29sZWFuO1xufVxuXG5leHBvcnQgY29uc3QgY2xlYXJJbmRpY2F0b3JDU1MgPSBiYXNlQ1NTO1xuZXhwb3J0IGNvbnN0IENsZWFySW5kaWNhdG9yID0gPFxuICBPcHRpb24sXG4gIElzTXVsdGkgZXh0ZW5kcyBib29sZWFuLFxuICBHcm91cCBleHRlbmRzIEdyb3VwQmFzZTxPcHRpb24+XG4+KFxuICBwcm9wczogQ2xlYXJJbmRpY2F0b3JQcm9wczxPcHRpb24sIElzTXVsdGksIEdyb3VwPlxuKSA9PiB7XG4gIGNvbnN0IHsgY2hpbGRyZW4sIGlubmVyUHJvcHMgfSA9IHByb3BzO1xuICByZXR1cm4gKFxuICAgIDxkaXZcbiAgICAgIHsuLi5nZXRTdHlsZVByb3BzKHByb3BzLCAnY2xlYXJJbmRpY2F0b3InLCB7XG4gICAgICAgIGluZGljYXRvcjogdHJ1ZSxcbiAgICAgICAgJ2NsZWFyLWluZGljYXRvcic6IHRydWUsXG4gICAgICB9KX1cbiAgICAgIHsuLi5pbm5lclByb3BzfVxuICAgID5cbiAgICAgIHtjaGlsZHJlbiB8fCA8Q3Jvc3NJY29uIC8+fVxuICAgIDwvZGl2PlxuICApO1xufTtcblxuLy8gPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09XG4vLyBTZXBhcmF0b3Jcbi8vID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PVxuXG5leHBvcnQgaW50ZXJmYWNlIEluZGljYXRvclNlcGFyYXRvclByb3BzPFxuICBPcHRpb24gPSB1bmtub3duLFxuICBJc011bHRpIGV4dGVuZHMgYm9vbGVhbiA9IGJvb2xlYW4sXG4gIEdyb3VwIGV4dGVuZHMgR3JvdXBCYXNlPE9wdGlvbj4gPSBHcm91cEJhc2U8T3B0aW9uPlxuPiBleHRlbmRzIENvbW1vblByb3BzQW5kQ2xhc3NOYW1lPE9wdGlvbiwgSXNNdWx0aSwgR3JvdXA+IHtcbiAgaXNEaXNhYmxlZDogYm9vbGVhbjtcbiAgaXNGb2N1c2VkOiBib29sZWFuO1xuICBpbm5lclByb3BzPzogSlNYLkludHJpbnNpY0VsZW1lbnRzWydzcGFuJ107XG59XG5cbmV4cG9ydCBjb25zdCBpbmRpY2F0b3JTZXBhcmF0b3JDU1MgPSA8XG4gIE9wdGlvbixcbiAgSXNNdWx0aSBleHRlbmRzIGJvb2xlYW4sXG4gIEdyb3VwIGV4dGVuZHMgR3JvdXBCYXNlPE9wdGlvbj5cbj4oXG4gIHtcbiAgICBpc0Rpc2FibGVkLFxuICAgIHRoZW1lOiB7XG4gICAgICBzcGFjaW5nOiB7IGJhc2VVbml0IH0sXG4gICAgICBjb2xvcnMsXG4gICAgfSxcbiAgfTogSW5kaWNhdG9yU2VwYXJhdG9yUHJvcHM8T3B0aW9uLCBJc011bHRpLCBHcm91cD4sXG4gIHVuc3R5bGVkOiBib29sZWFuXG4pOiBDU1NPYmplY3RXaXRoTGFiZWwgPT4gKHtcbiAgbGFiZWw6ICdpbmRpY2F0b3JTZXBhcmF0b3InLFxuICBhbGlnblNlbGY6ICdzdHJldGNoJyxcbiAgd2lkdGg6IDEsXG4gIC4uLih1bnN0eWxlZFxuICAgID8ge31cbiAgICA6IHtcbiAgICAgICAgYmFja2dyb3VuZENvbG9yOiBpc0Rpc2FibGVkID8gY29sb3JzLm5ldXRyYWwxMCA6IGNvbG9ycy5uZXV0cmFsMjAsXG4gICAgICAgIG1hcmdpbkJvdHRvbTogYmFzZVVuaXQgKiAyLFxuICAgICAgICBtYXJnaW5Ub3A6IGJhc2VVbml0ICogMixcbiAgICAgIH0pLFxufSk7XG5cbmV4cG9ydCBjb25zdCBJbmRpY2F0b3JTZXBhcmF0b3IgPSA8XG4gIE9wdGlvbixcbiAgSXNNdWx0aSBleHRlbmRzIGJvb2xlYW4sXG4gIEdyb3VwIGV4dGVuZHMgR3JvdXBCYXNlPE9wdGlvbj5cbj4oXG4gIHByb3BzOiBJbmRpY2F0b3JTZXBhcmF0b3JQcm9wczxPcHRpb24sIElzTXVsdGksIEdyb3VwPlxuKSA9PiB7XG4gIGNvbnN0IHsgaW5uZXJQcm9wcyB9ID0gcHJvcHM7XG4gIHJldHVybiAoXG4gICAgPHNwYW5cbiAgICAgIHsuLi5pbm5lclByb3BzfVxuICAgICAgey4uLmdldFN0eWxlUHJvcHMocHJvcHMsICdpbmRpY2F0b3JTZXBhcmF0b3InLCB7XG4gICAgICAgICdpbmRpY2F0b3Itc2VwYXJhdG9yJzogdHJ1ZSxcbiAgICAgIH0pfVxuICAgIC8+XG4gICk7XG59O1xuXG4vLyA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT1cbi8vIExvYWRpbmdcbi8vID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PVxuXG5jb25zdCBsb2FkaW5nRG90QW5pbWF0aW9ucyA9IGtleWZyYW1lc2BcbiAgMCUsIDgwJSwgMTAwJSB7IG9wYWNpdHk6IDA7IH1cbiAgNDAlIHsgb3BhY2l0eTogMTsgfVxuYDtcblxuZXhwb3J0IGNvbnN0IGxvYWRpbmdJbmRpY2F0b3JDU1MgPSA8XG4gIE9wdGlvbixcbiAgSXNNdWx0aSBleHRlbmRzIGJvb2xlYW4sXG4gIEdyb3VwIGV4dGVuZHMgR3JvdXBCYXNlPE9wdGlvbj5cbj4oXG4gIHtcbiAgICBpc0ZvY3VzZWQsXG4gICAgc2l6ZSxcbiAgICB0aGVtZToge1xuICAgICAgY29sb3JzLFxuICAgICAgc3BhY2luZzogeyBiYXNlVW5pdCB9LFxuICAgIH0sXG4gIH06IExvYWRpbmdJbmRpY2F0b3JQcm9wczxPcHRpb24sIElzTXVsdGksIEdyb3VwPixcbiAgdW5zdHlsZWQ6IGJvb2xlYW5cbik6IENTU09iamVjdFdpdGhMYWJlbCA9PiAoe1xuICBsYWJlbDogJ2xvYWRpbmdJbmRpY2F0b3InLFxuICBkaXNwbGF5OiAnZmxleCcsXG4gIHRyYW5zaXRpb246ICdjb2xvciAxNTBtcycsXG4gIGFsaWduU2VsZjogJ2NlbnRlcicsXG4gIGZvbnRTaXplOiBzaXplLFxuICBsaW5lSGVpZ2h0OiAxLFxuICBtYXJnaW5SaWdodDogc2l6ZSxcbiAgdGV4dEFsaWduOiAnY2VudGVyJyxcbiAgdmVydGljYWxBbGlnbjogJ21pZGRsZScsXG4gIC4uLih1bnN0eWxlZFxuICAgID8ge31cbiAgICA6IHtcbiAgICAgICAgY29sb3I6IGlzRm9jdXNlZCA/IGNvbG9ycy5uZXV0cmFsNjAgOiBjb2xvcnMubmV1dHJhbDIwLFxuICAgICAgICBwYWRkaW5nOiBiYXNlVW5pdCAqIDIsXG4gICAgICB9KSxcbn0pO1xuXG5pbnRlcmZhY2UgTG9hZGluZ0RvdFByb3BzIHtcbiAgZGVsYXk6IG51bWJlcjtcbiAgb2Zmc2V0OiBib29sZWFuO1xufVxuY29uc3QgTG9hZGluZ0RvdCA9ICh7IGRlbGF5LCBvZmZzZXQgfTogTG9hZGluZ0RvdFByb3BzKSA9PiAoXG4gIDxzcGFuXG4gICAgY3NzPXt7XG4gICAgICBhbmltYXRpb246IGAke2xvYWRpbmdEb3RBbmltYXRpb25zfSAxcyBlYXNlLWluLW91dCAke2RlbGF5fW1zIGluZmluaXRlO2AsXG4gICAgICBiYWNrZ3JvdW5kQ29sb3I6ICdjdXJyZW50Q29sb3InLFxuICAgICAgYm9yZGVyUmFkaXVzOiAnMWVtJyxcbiAgICAgIGRpc3BsYXk6ICdpbmxpbmUtYmxvY2snLFxuICAgICAgbWFyZ2luTGVmdDogb2Zmc2V0ID8gJzFlbScgOiB1bmRlZmluZWQsXG4gICAgICBoZWlnaHQ6ICcxZW0nLFxuICAgICAgdmVydGljYWxBbGlnbjogJ3RvcCcsXG4gICAgICB3aWR0aDogJzFlbScsXG4gICAgfX1cbiAgLz5cbik7XG5cbmV4cG9ydCBpbnRlcmZhY2UgTG9hZGluZ0luZGljYXRvclByb3BzPFxuICBPcHRpb24gPSB1bmtub3duLFxuICBJc011bHRpIGV4dGVuZHMgYm9vbGVhbiA9IGJvb2xlYW4sXG4gIEdyb3VwIGV4dGVuZHMgR3JvdXBCYXNlPE9wdGlvbj4gPSBHcm91cEJhc2U8T3B0aW9uPlxuPiBleHRlbmRzIENvbW1vblByb3BzQW5kQ2xhc3NOYW1lPE9wdGlvbiwgSXNNdWx0aSwgR3JvdXA+IHtcbiAgLyoqIFByb3BzIHRoYXQgd2lsbCBiZSBwYXNzZWQgb24gdG8gdGhlIGNoaWxkcmVuLiAqL1xuICBpbm5lclByb3BzOiBKU1guSW50cmluc2ljRWxlbWVudHNbJ2RpdiddO1xuICAvKiogVGhlIGZvY3VzZWQgc3RhdGUgb2YgdGhlIHNlbGVjdC4gKi9cbiAgaXNGb2N1c2VkOiBib29sZWFuO1xuICBpc0Rpc2FibGVkOiBib29sZWFuO1xuICAvKiogU2V0IHNpemUgb2YgdGhlIGNvbnRhaW5lci4gKi9cbiAgc2l6ZTogbnVtYmVyO1xufVxuZXhwb3J0IGNvbnN0IExvYWRpbmdJbmRpY2F0b3IgPSA8XG4gIE9wdGlvbixcbiAgSXNNdWx0aSBleHRlbmRzIGJvb2xlYW4sXG4gIEdyb3VwIGV4dGVuZHMgR3JvdXBCYXNlPE9wdGlvbj5cbj4oe1xuICBpbm5lclByb3BzLFxuICBpc1J0bCxcbiAgc2l6ZSA9IDQsXG4gIC4uLnJlc3RQcm9wc1xufTogTG9hZGluZ0luZGljYXRvclByb3BzPE9wdGlvbiwgSXNNdWx0aSwgR3JvdXA+KSA9PiB7XG4gIHJldHVybiAoXG4gICAgPGRpdlxuICAgICAgey4uLmdldFN0eWxlUHJvcHMoXG4gICAgICAgIHsgLi4ucmVzdFByb3BzLCBpbm5lclByb3BzLCBpc1J0bCwgc2l6ZSB9LFxuICAgICAgICAnbG9hZGluZ0luZGljYXRvcicsXG4gICAgICAgIHtcbiAgICAgICAgICBpbmRpY2F0b3I6IHRydWUsXG4gICAgICAgICAgJ2xvYWRpbmctaW5kaWNhdG9yJzogdHJ1ZSxcbiAgICAgICAgfVxuICAgICAgKX1cbiAgICAgIHsuLi5pbm5lclByb3BzfVxuICAgID5cbiAgICAgIDxMb2FkaW5nRG90IGRlbGF5PXswfSBvZmZzZXQ9e2lzUnRsfSAvPlxuICAgICAgPExvYWRpbmdEb3QgZGVsYXk9ezE2MH0gb2Zmc2V0IC8+XG4gICAgICA8TG9hZGluZ0RvdCBkZWxheT17MzIwfSBvZmZzZXQ9eyFpc1J0bH0gLz5cbiAgICA8L2Rpdj5cbiAgKTtcbn07XG4iXX0= */",toString:Xte},R2=function(t){var n=t.size,r=ho(t,Ute);return Fe("svg",He({height:n,width:n,viewBox:"0 0 20 20","aria-hidden":"true",focusable:"false",css:Zte},r))},bx=function(t){return Fe(R2,He({size:20},t),Fe("path",{d:"M14.348 14.849c-0.469 0.469-1.229 0.469-1.697 0l-2.651-3.030-2.651 3.029c-0.469 0.469-1.229 0.469-1.697 0-0.469-0.469-0.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-0.469-0.469-0.469-1.228 0-1.697s1.228-0.469 1.697 0l2.652 3.031 2.651-3.031c0.469-0.469 1.228-0.469 1.697 0s0.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c0.469 0.469 0.469 1.229 0 1.698z"}))},A2=function(t){return Fe(R2,He({size:20},t),Fe("path",{d:"M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z"}))},T2=function(t,n){var r=t.isFocused,o=t.theme,i=o.spacing.baseUnit,s=o.colors;return $e({label:"indicatorContainer",display:"flex",transition:"color 150ms"},n?{}:{color:r?s.neutral60:s.neutral20,padding:i*2,":hover":{color:r?s.neutral80:s.neutral40}})},Jte=T2,Kte=function(t){var n=t.children,r=t.innerProps;return Fe("div",He({},$t(t,"dropdownIndicator",{indicator:!0,"dropdown-indicator":!0}),r),n||Fe(A2,null))},Qte=T2,ene=function(t){var n=t.children,r=t.innerProps;return Fe("div",He({},$t(t,"clearIndicator",{indicator:!0,"clear-indicator":!0}),r),n||Fe(bx,null))},tne=function(t,n){var r=t.isDisabled,o=t.theme,i=o.spacing.baseUnit,s=o.colors;return $e({label:"indicatorSeparator",alignSelf:"stretch",width:1},n?{}:{backgroundColor:r?s.neutral10:s.neutral20,marginBottom:i*2,marginTop:i*2})},nne=function(t){var n=t.innerProps;return Fe("span",He({},n,$t(t,"indicatorSeparator",{"indicator-separator":!0})))},rne=cte(yI||(yI=dte([`
|
|
110
110
|
0%, 80%, 100% { opacity: 0; }
|
|
111
111
|
40% { opacity: 1; }
|
|
112
|
-
`]))),one=function(t,n){var r=t.isFocused,o=t.size,i=t.theme,s=i.colors,a=i.spacing.baseUnit;return $e({label:"loadingIndicator",display:"flex",transition:"color 150ms",alignSelf:"center",fontSize:o,lineHeight:1,marginRight:o,textAlign:"center",verticalAlign:"middle"},n?{}:{color:r?s.neutral60:s.neutral20,padding:a*2})},Gm=function(t){var n=t.delay,r=t.offset;return Fe("span",{css:mx({animation:"".concat(rne," 1s ease-in-out ").concat(n,"ms infinite;"),backgroundColor:"currentColor",borderRadius:"1em",display:"inline-block",marginLeft:r?"1em":void 0,height:"1em",verticalAlign:"top",width:"1em"},process.env.NODE_ENV==="production"?"":";label:LoadingDot;",process.env.NODE_ENV==="production"?"":"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImluZGljYXRvcnMudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQW1RSSIsImZpbGUiOiJpbmRpY2F0b3JzLnRzeCIsInNvdXJjZXNDb250ZW50IjpbIi8qKiBAanN4IGpzeCAqL1xuaW1wb3J0IHsgSlNYLCBSZWFjdE5vZGUgfSBmcm9tICdyZWFjdCc7XG5pbXBvcnQgeyBqc3gsIGtleWZyYW1lcyB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcblxuaW1wb3J0IHtcbiAgQ29tbW9uUHJvcHNBbmRDbGFzc05hbWUsXG4gIENTU09iamVjdFdpdGhMYWJlbCxcbiAgR3JvdXBCYXNlLFxufSBmcm9tICcuLi90eXBlcyc7XG5pbXBvcnQgeyBnZXRTdHlsZVByb3BzIH0gZnJvbSAnLi4vdXRpbHMnO1xuXG4vLyA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT1cbi8vIERyb3Bkb3duICYgQ2xlYXIgSWNvbnNcbi8vID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PVxuXG5jb25zdCBTdmcgPSAoe1xuICBzaXplLFxuICAuLi5wcm9wc1xufTogSlNYLkludHJpbnNpY0VsZW1lbnRzWydzdmcnXSAmIHsgc2l6ZTogbnVtYmVyIH0pID0+IChcbiAgPHN2Z1xuICAgIGhlaWdodD17c2l6ZX1cbiAgICB3aWR0aD17c2l6ZX1cbiAgICB2aWV3Qm94PVwiMCAwIDIwIDIwXCJcbiAgICBhcmlhLWhpZGRlbj1cInRydWVcIlxuICAgIGZvY3VzYWJsZT1cImZhbHNlXCJcbiAgICBjc3M9e3tcbiAgICAgIGRpc3BsYXk6ICdpbmxpbmUtYmxvY2snLFxuICAgICAgZmlsbDogJ2N1cnJlbnRDb2xvcicsXG4gICAgICBsaW5lSGVpZ2h0OiAxLFxuICAgICAgc3Ryb2tlOiAnY3VycmVudENvbG9yJyxcbiAgICAgIHN0cm9rZVdpZHRoOiAwLFxuICAgIH19XG4gICAgey4uLnByb3BzfVxuICAvPlxuKTtcblxuZXhwb3J0IHR5cGUgQ3Jvc3NJY29uUHJvcHMgPSBKU1guSW50cmluc2ljRWxlbWVudHNbJ3N2ZyddICYgeyBzaXplPzogbnVtYmVyIH07XG5leHBvcnQgY29uc3QgQ3Jvc3NJY29uID0gKHByb3BzOiBDcm9zc0ljb25Qcm9wcykgPT4gKFxuICA8U3ZnIHNpemU9ezIwfSB7Li4ucHJvcHN9PlxuICAgIDxwYXRoIGQ9XCJNMTQuMzQ4IDE0Ljg0OWMtMC40NjkgMC40NjktMS4yMjkgMC40NjktMS42OTcgMGwtMi42NTEtMy4wMzAtMi42NTEgMy4wMjljLTAuNDY5IDAuNDY5LTEuMjI5IDAuNDY5LTEuNjk3IDAtMC40NjktMC40NjktMC40NjktMS4yMjkgMC0xLjY5N2wyLjc1OC0zLjE1LTIuNzU5LTMuMTUyYy0wLjQ2OS0wLjQ2OS0wLjQ2OS0xLjIyOCAwLTEuNjk3czEuMjI4LTAuNDY5IDEuNjk3IDBsMi42NTIgMy4wMzEgMi42NTEtMy4wMzFjMC40NjktMC40NjkgMS4yMjgtMC40NjkgMS42OTcgMHMwLjQ2OSAxLjIyOSAwIDEuNjk3bC0yLjc1OCAzLjE1MiAyLjc1OCAzLjE1YzAuNDY5IDAuNDY5IDAuNDY5IDEuMjI5IDAgMS42OTh6XCIgLz5cbiAgPC9Tdmc+XG4pO1xuZXhwb3J0IHR5cGUgRG93bkNoZXZyb25Qcm9wcyA9IEpTWC5JbnRyaW5zaWNFbGVtZW50c1snc3ZnJ10gJiB7IHNpemU/OiBudW1iZXIgfTtcbmV4cG9ydCBjb25zdCBEb3duQ2hldnJvbiA9IChwcm9wczogRG93bkNoZXZyb25Qcm9wcykgPT4gKFxuICA8U3ZnIHNpemU9ezIwfSB7Li4ucHJvcHN9PlxuICAgIDxwYXRoIGQ9XCJNNC41MTYgNy41NDhjMC40MzYtMC40NDYgMS4wNDMtMC40ODEgMS41NzYgMGwzLjkwOCAzLjc0NyAzLjkwOC0zLjc0N2MwLjUzMy0wLjQ4MSAxLjE0MS0wLjQ0NiAxLjU3NCAwIDAuNDM2IDAuNDQ1IDAuNDA4IDEuMTk3IDAgMS42MTUtMC40MDYgMC40MTgtNC42OTUgNC41MDItNC42OTUgNC41MDItMC4yMTcgMC4yMjMtMC41MDIgMC4zMzUtMC43ODcgMC4zMzVzLTAuNTctMC4xMTItMC43ODktMC4zMzVjMCAwLTQuMjg3LTQuMDg0LTQuNjk1LTQuNTAycy0wLjQzNi0xLjE3IDAtMS42MTV6XCIgLz5cbiAgPC9Tdmc+XG4pO1xuXG4vLyA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT1cbi8vIERyb3Bkb3duICYgQ2xlYXIgQnV0dG9uc1xuLy8gPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09XG5cbmV4cG9ydCBpbnRlcmZhY2UgRHJvcGRvd25JbmRpY2F0b3JQcm9wczxcbiAgT3B0aW9uID0gdW5rbm93bixcbiAgSXNNdWx0aSBleHRlbmRzIGJvb2xlYW4gPSBib29sZWFuLFxuICBHcm91cCBleHRlbmRzIEdyb3VwQmFzZTxPcHRpb24+ID0gR3JvdXBCYXNlPE9wdGlvbj5cbj4gZXh0ZW5kcyBDb21tb25Qcm9wc0FuZENsYXNzTmFtZTxPcHRpb24sIElzTXVsdGksIEdyb3VwPiB7XG4gIC8qKiBUaGUgY2hpbGRyZW4gdG8gYmUgcmVuZGVyZWQgaW5zaWRlIHRoZSBpbmRpY2F0b3IuICovXG4gIGNoaWxkcmVuPzogUmVhY3ROb2RlO1xuICAvKiogUHJvcHMgdGhhdCB3aWxsIGJlIHBhc3NlZCBvbiB0byB0aGUgY2hpbGRyZW4uICovXG4gIGlubmVyUHJvcHM6IEpTWC5JbnRyaW5zaWNFbGVtZW50c1snZGl2J107XG4gIC8qKiBUaGUgZm9jdXNlZCBzdGF0ZSBvZiB0aGUgc2VsZWN0LiAqL1xuICBpc0ZvY3VzZWQ6IGJvb2xlYW47XG4gIGlzRGlzYWJsZWQ6IGJvb2xlYW47XG59XG5cbmNvbnN0IGJhc2VDU1MgPSA8XG4gIE9wdGlvbixcbiAgSXNNdWx0aSBleHRlbmRzIGJvb2xlYW4sXG4gIEdyb3VwIGV4dGVuZHMgR3JvdXBCYXNlPE9wdGlvbj5cbj4oXG4gIHtcbiAgICBpc0ZvY3VzZWQsXG4gICAgdGhlbWU6IHtcbiAgICAgIHNwYWNpbmc6IHsgYmFzZVVuaXQgfSxcbiAgICAgIGNvbG9ycyxcbiAgICB9LFxuICB9OlxuICAgIHwgRHJvcGRvd25JbmRpY2F0b3JQcm9wczxPcHRpb24sIElzTXVsdGksIEdyb3VwPlxuICAgIHwgQ2xlYXJJbmRpY2F0b3JQcm9wczxPcHRpb24sIElzTXVsdGksIEdyb3VwPixcbiAgdW5zdHlsZWQ6IGJvb2xlYW5cbik6IENTU09iamVjdFdpdGhMYWJlbCA9PiAoe1xuICBsYWJlbDogJ2luZGljYXRvckNvbnRhaW5lcicsXG4gIGRpc3BsYXk6ICdmbGV4JyxcbiAgdHJhbnNpdGlvbjogJ2NvbG9yIDE1MG1zJyxcbiAgLi4uKHVuc3R5bGVkXG4gICAgPyB7fVxuICAgIDoge1xuICAgICAgICBjb2xvcjogaXNGb2N1c2VkID8gY29sb3JzLm5ldXRyYWw2MCA6IGNvbG9ycy5uZXV0cmFsMjAsXG4gICAgICAgIHBhZGRpbmc6IGJhc2VVbml0ICogMixcbiAgICAgICAgJzpob3Zlcic6IHtcbiAgICAgICAgICBjb2xvcjogaXNGb2N1c2VkID8gY29sb3JzLm5ldXRyYWw4MCA6IGNvbG9ycy5uZXV0cmFsNDAsXG4gICAgICAgIH0sXG4gICAgICB9KSxcbn0pO1xuXG5leHBvcnQgY29uc3QgZHJvcGRvd25JbmRpY2F0b3JDU1MgPSBiYXNlQ1NTO1xuZXhwb3J0IGNvbnN0IERyb3Bkb3duSW5kaWNhdG9yID0gPFxuICBPcHRpb24sXG4gIElzTXVsdGkgZXh0ZW5kcyBib29sZWFuLFxuICBHcm91cCBleHRlbmRzIEdyb3VwQmFzZTxPcHRpb24+XG4+KFxuICBwcm9wczogRHJvcGRvd25JbmRpY2F0b3JQcm9wczxPcHRpb24sIElzTXVsdGksIEdyb3VwPlxuKSA9PiB7XG4gIGNvbnN0IHsgY2hpbGRyZW4sIGlubmVyUHJvcHMgfSA9IHByb3BzO1xuICByZXR1cm4gKFxuICAgIDxkaXZcbiAgICAgIHsuLi5nZXRTdHlsZVByb3BzKHByb3BzLCAnZHJvcGRvd25JbmRpY2F0b3InLCB7XG4gICAgICAgIGluZGljYXRvcjogdHJ1ZSxcbiAgICAgICAgJ2Ryb3Bkb3duLWluZGljYXRvcic6IHRydWUsXG4gICAgICB9KX1cbiAgICAgIHsuLi5pbm5lclByb3BzfVxuICAgID5cbiAgICAgIHtjaGlsZHJlbiB8fCA8RG93bkNoZXZyb24gLz59XG4gICAgPC9kaXY+XG4gICk7XG59O1xuXG5leHBvcnQgaW50ZXJmYWNlIENsZWFySW5kaWNhdG9yUHJvcHM8XG4gIE9wdGlvbiA9IHVua25vd24sXG4gIElzTXVsdGkgZXh0ZW5kcyBib29sZWFuID0gYm9vbGVhbixcbiAgR3JvdXAgZXh0ZW5kcyBHcm91cEJhc2U8T3B0aW9uPiA9IEdyb3VwQmFzZTxPcHRpb24+XG4+IGV4dGVuZHMgQ29tbW9uUHJvcHNBbmRDbGFzc05hbWU8T3B0aW9uLCBJc011bHRpLCBHcm91cD4ge1xuICAvKiogVGhlIGNoaWxkcmVuIHRvIGJlIHJlbmRlcmVkIGluc2lkZSB0aGUgaW5kaWNhdG9yLiAqL1xuICBjaGlsZHJlbj86IFJlYWN0Tm9kZTtcbiAgLyoqIFByb3BzIHRoYXQgd2lsbCBiZSBwYXNzZWQgb24gdG8gdGhlIGNoaWxkcmVuLiAqL1xuICBpbm5lclByb3BzOiBKU1guSW50cmluc2ljRWxlbWVudHNbJ2RpdiddO1xuICAvKiogVGhlIGZvY3VzZWQgc3RhdGUgb2YgdGhlIHNlbGVjdC4gKi9cbiAgaXNGb2N1c2VkOiBib29sZWFuO1xufVxuXG5leHBvcnQgY29uc3QgY2xlYXJJbmRpY2F0b3JDU1MgPSBiYXNlQ1NTO1xuZXhwb3J0IGNvbnN0IENsZWFySW5kaWNhdG9yID0gPFxuICBPcHRpb24sXG4gIElzTXVsdGkgZXh0ZW5kcyBib29sZWFuLFxuICBHcm91cCBleHRlbmRzIEdyb3VwQmFzZTxPcHRpb24+XG4+KFxuICBwcm9wczogQ2xlYXJJbmRpY2F0b3JQcm9wczxPcHRpb24sIElzTXVsdGksIEdyb3VwPlxuKSA9PiB7XG4gIGNvbnN0IHsgY2hpbGRyZW4sIGlubmVyUHJvcHMgfSA9IHByb3BzO1xuICByZXR1cm4gKFxuICAgIDxkaXZcbiAgICAgIHsuLi5nZXRTdHlsZVByb3BzKHByb3BzLCAnY2xlYXJJbmRpY2F0b3InLCB7XG4gICAgICAgIGluZGljYXRvcjogdHJ1ZSxcbiAgICAgICAgJ2NsZWFyLWluZGljYXRvcic6IHRydWUsXG4gICAgICB9KX1cbiAgICAgIHsuLi5pbm5lclByb3BzfVxuICAgID5cbiAgICAgIHtjaGlsZHJlbiB8fCA8Q3Jvc3NJY29uIC8+fVxuICAgIDwvZGl2PlxuICApO1xufTtcblxuLy8gPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09XG4vLyBTZXBhcmF0b3Jcbi8vID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PVxuXG5leHBvcnQgaW50ZXJmYWNlIEluZGljYXRvclNlcGFyYXRvclByb3BzPFxuICBPcHRpb24gPSB1bmtub3duLFxuICBJc011bHRpIGV4dGVuZHMgYm9vbGVhbiA9IGJvb2xlYW4sXG4gIEdyb3VwIGV4dGVuZHMgR3JvdXBCYXNlPE9wdGlvbj4gPSBHcm91cEJhc2U8T3B0aW9uPlxuPiBleHRlbmRzIENvbW1vblByb3BzQW5kQ2xhc3NOYW1lPE9wdGlvbiwgSXNNdWx0aSwgR3JvdXA+IHtcbiAgaXNEaXNhYmxlZDogYm9vbGVhbjtcbiAgaXNGb2N1c2VkOiBib29sZWFuO1xuICBpbm5lclByb3BzPzogSlNYLkludHJpbnNpY0VsZW1lbnRzWydzcGFuJ107XG59XG5cbmV4cG9ydCBjb25zdCBpbmRpY2F0b3JTZXBhcmF0b3JDU1MgPSA8XG4gIE9wdGlvbixcbiAgSXNNdWx0aSBleHRlbmRzIGJvb2xlYW4sXG4gIEdyb3VwIGV4dGVuZHMgR3JvdXBCYXNlPE9wdGlvbj5cbj4oXG4gIHtcbiAgICBpc0Rpc2FibGVkLFxuICAgIHRoZW1lOiB7XG4gICAgICBzcGFjaW5nOiB7IGJhc2VVbml0IH0sXG4gICAgICBjb2xvcnMsXG4gICAgfSxcbiAgfTogSW5kaWNhdG9yU2VwYXJhdG9yUHJvcHM8T3B0aW9uLCBJc011bHRpLCBHcm91cD4sXG4gIHVuc3R5bGVkOiBib29sZWFuXG4pOiBDU1NPYmplY3RXaXRoTGFiZWwgPT4gKHtcbiAgbGFiZWw6ICdpbmRpY2F0b3JTZXBhcmF0b3InLFxuICBhbGlnblNlbGY6ICdzdHJldGNoJyxcbiAgd2lkdGg6IDEsXG4gIC4uLih1bnN0eWxlZFxuICAgID8ge31cbiAgICA6IHtcbiAgICAgICAgYmFja2dyb3VuZENvbG9yOiBpc0Rpc2FibGVkID8gY29sb3JzLm5ldXRyYWwxMCA6IGNvbG9ycy5uZXV0cmFsMjAsXG4gICAgICAgIG1hcmdpbkJvdHRvbTogYmFzZVVuaXQgKiAyLFxuICAgICAgICBtYXJnaW5Ub3A6IGJhc2VVbml0ICogMixcbiAgICAgIH0pLFxufSk7XG5cbmV4cG9ydCBjb25zdCBJbmRpY2F0b3JTZXBhcmF0b3IgPSA8XG4gIE9wdGlvbixcbiAgSXNNdWx0aSBleHRlbmRzIGJvb2xlYW4sXG4gIEdyb3VwIGV4dGVuZHMgR3JvdXBCYXNlPE9wdGlvbj5cbj4oXG4gIHByb3BzOiBJbmRpY2F0b3JTZXBhcmF0b3JQcm9wczxPcHRpb24sIElzTXVsdGksIEdyb3VwPlxuKSA9PiB7XG4gIGNvbnN0IHsgaW5uZXJQcm9wcyB9ID0gcHJvcHM7XG4gIHJldHVybiAoXG4gICAgPHNwYW5cbiAgICAgIHsuLi5pbm5lclByb3BzfVxuICAgICAgey4uLmdldFN0eWxlUHJvcHMocHJvcHMsICdpbmRpY2F0b3JTZXBhcmF0b3InLCB7XG4gICAgICAgICdpbmRpY2F0b3Itc2VwYXJhdG9yJzogdHJ1ZSxcbiAgICAgIH0pfVxuICAgIC8+XG4gICk7XG59O1xuXG4vLyA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT1cbi8vIExvYWRpbmdcbi8vID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PVxuXG5jb25zdCBsb2FkaW5nRG90QW5pbWF0aW9ucyA9IGtleWZyYW1lc2BcbiAgMCUsIDgwJSwgMTAwJSB7IG9wYWNpdHk6IDA7IH1cbiAgNDAlIHsgb3BhY2l0eTogMTsgfVxuYDtcblxuZXhwb3J0IGNvbnN0IGxvYWRpbmdJbmRpY2F0b3JDU1MgPSA8XG4gIE9wdGlvbixcbiAgSXNNdWx0aSBleHRlbmRzIGJvb2xlYW4sXG4gIEdyb3VwIGV4dGVuZHMgR3JvdXBCYXNlPE9wdGlvbj5cbj4oXG4gIHtcbiAgICBpc0ZvY3VzZWQsXG4gICAgc2l6ZSxcbiAgICB0aGVtZToge1xuICAgICAgY29sb3JzLFxuICAgICAgc3BhY2luZzogeyBiYXNlVW5pdCB9LFxuICAgIH0sXG4gIH06IExvYWRpbmdJbmRpY2F0b3JQcm9wczxPcHRpb24sIElzTXVsdGksIEdyb3VwPixcbiAgdW5zdHlsZWQ6IGJvb2xlYW5cbik6IENTU09iamVjdFdpdGhMYWJlbCA9PiAoe1xuICBsYWJlbDogJ2xvYWRpbmdJbmRpY2F0b3InLFxuICBkaXNwbGF5OiAnZmxleCcsXG4gIHRyYW5zaXRpb246ICdjb2xvciAxNTBtcycsXG4gIGFsaWduU2VsZjogJ2NlbnRlcicsXG4gIGZvbnRTaXplOiBzaXplLFxuICBsaW5lSGVpZ2h0OiAxLFxuICBtYXJnaW5SaWdodDogc2l6ZSxcbiAgdGV4dEFsaWduOiAnY2VudGVyJyxcbiAgdmVydGljYWxBbGlnbjogJ21pZGRsZScsXG4gIC4uLih1bnN0eWxlZFxuICAgID8ge31cbiAgICA6IHtcbiAgICAgICAgY29sb3I6IGlzRm9jdXNlZCA/IGNvbG9ycy5uZXV0cmFsNjAgOiBjb2xvcnMubmV1dHJhbDIwLFxuICAgICAgICBwYWRkaW5nOiBiYXNlVW5pdCAqIDIsXG4gICAgICB9KSxcbn0pO1xuXG5pbnRlcmZhY2UgTG9hZGluZ0RvdFByb3BzIHtcbiAgZGVsYXk6IG51bWJlcjtcbiAgb2Zmc2V0OiBib29sZWFuO1xufVxuY29uc3QgTG9hZGluZ0RvdCA9ICh7IGRlbGF5LCBvZmZzZXQgfTogTG9hZGluZ0RvdFByb3BzKSA9PiAoXG4gIDxzcGFuXG4gICAgY3NzPXt7XG4gICAgICBhbmltYXRpb246IGAke2xvYWRpbmdEb3RBbmltYXRpb25zfSAxcyBlYXNlLWluLW91dCAke2RlbGF5fW1zIGluZmluaXRlO2AsXG4gICAgICBiYWNrZ3JvdW5kQ29sb3I6ICdjdXJyZW50Q29sb3InLFxuICAgICAgYm9yZGVyUmFkaXVzOiAnMWVtJyxcbiAgICAgIGRpc3BsYXk6ICdpbmxpbmUtYmxvY2snLFxuICAgICAgbWFyZ2luTGVmdDogb2Zmc2V0ID8gJzFlbScgOiB1bmRlZmluZWQsXG4gICAgICBoZWlnaHQ6ICcxZW0nLFxuICAgICAgdmVydGljYWxBbGlnbjogJ3RvcCcsXG4gICAgICB3aWR0aDogJzFlbScsXG4gICAgfX1cbiAgLz5cbik7XG5cbmV4cG9ydCBpbnRlcmZhY2UgTG9hZGluZ0luZGljYXRvclByb3BzPFxuICBPcHRpb24gPSB1bmtub3duLFxuICBJc011bHRpIGV4dGVuZHMgYm9vbGVhbiA9IGJvb2xlYW4sXG4gIEdyb3VwIGV4dGVuZHMgR3JvdXBCYXNlPE9wdGlvbj4gPSBHcm91cEJhc2U8T3B0aW9uPlxuPiBleHRlbmRzIENvbW1vblByb3BzQW5kQ2xhc3NOYW1lPE9wdGlvbiwgSXNNdWx0aSwgR3JvdXA+IHtcbiAgLyoqIFByb3BzIHRoYXQgd2lsbCBiZSBwYXNzZWQgb24gdG8gdGhlIGNoaWxkcmVuLiAqL1xuICBpbm5lclByb3BzOiBKU1guSW50cmluc2ljRWxlbWVudHNbJ2RpdiddO1xuICAvKiogVGhlIGZvY3VzZWQgc3RhdGUgb2YgdGhlIHNlbGVjdC4gKi9cbiAgaXNGb2N1c2VkOiBib29sZWFuO1xuICBpc0Rpc2FibGVkOiBib29sZWFuO1xuICAvKiogU2V0IHNpemUgb2YgdGhlIGNvbnRhaW5lci4gKi9cbiAgc2l6ZTogbnVtYmVyO1xufVxuZXhwb3J0IGNvbnN0IExvYWRpbmdJbmRpY2F0b3IgPSA8XG4gIE9wdGlvbixcbiAgSXNNdWx0aSBleHRlbmRzIGJvb2xlYW4sXG4gIEdyb3VwIGV4dGVuZHMgR3JvdXBCYXNlPE9wdGlvbj5cbj4oe1xuICBpbm5lclByb3BzLFxuICBpc1J0bCxcbiAgc2l6ZSA9IDQsXG4gIC4uLnJlc3RQcm9wc1xufTogTG9hZGluZ0luZGljYXRvclByb3BzPE9wdGlvbiwgSXNNdWx0aSwgR3JvdXA+KSA9PiB7XG4gIHJldHVybiAoXG4gICAgPGRpdlxuICAgICAgey4uLmdldFN0eWxlUHJvcHMoXG4gICAgICAgIHsgLi4ucmVzdFByb3BzLCBpbm5lclByb3BzLCBpc1J0bCwgc2l6ZSB9LFxuICAgICAgICAnbG9hZGluZ0luZGljYXRvcicsXG4gICAgICAgIHtcbiAgICAgICAgICBpbmRpY2F0b3I6IHRydWUsXG4gICAgICAgICAgJ2xvYWRpbmctaW5kaWNhdG9yJzogdHJ1ZSxcbiAgICAgICAgfVxuICAgICAgKX1cbiAgICAgIHsuLi5pbm5lclByb3BzfVxuICAgID5cbiAgICAgIDxMb2FkaW5nRG90IGRlbGF5PXswfSBvZmZzZXQ9e2lzUnRsfSAvPlxuICAgICAgPExvYWRpbmdEb3QgZGVsYXk9ezE2MH0gb2Zmc2V0IC8+XG4gICAgICA8TG9hZGluZ0RvdCBkZWxheT17MzIwfSBvZmZzZXQ9eyFpc1J0bH0gLz5cbiAgICA8L2Rpdj5cbiAgKTtcbn07XG4iXX0= */")})},ine=function(t){var n=t.innerProps,r=t.isRtl,o=t.size,i=o===void 0?4:o,s=ho(t,Yte);return Fe("div",He({},$t($e($e({},s),{},{innerProps:n,isRtl:r,size:i}),"loadingIndicator",{indicator:!0,"loading-indicator":!0}),n),Fe(Gm,{delay:0,offset:r}),Fe(Gm,{delay:160,offset:!0}),Fe(Gm,{delay:320,offset:!r}))},sne=function(t,n){var r=t.isDisabled,o=t.isFocused,i=t.theme,s=i.colors,a=i.borderRadius,l=i.spacing;return $e({label:"control",alignItems:"center",cursor:"default",display:"flex",flexWrap:"wrap",justifyContent:"space-between",minHeight:l.controlHeight,outline:"0 !important",position:"relative",transition:"all 100ms"},n?{}:{backgroundColor:r?s.neutral5:s.neutral0,borderColor:r?s.neutral10:o?s.primary:s.neutral20,borderRadius:a,borderStyle:"solid",borderWidth:1,boxShadow:o?"0 0 0 1px ".concat(s.primary):void 0,"&:hover":{borderColor:o?s.primary:s.neutral30}})},ane=function(t){var n=t.children,r=t.isDisabled,o=t.isFocused,i=t.innerRef,s=t.innerProps,a=t.menuIsOpen;return Fe("div",He({ref:i},$t(t,"control",{control:!0,"control--is-disabled":r,"control--is-focused":o,"control--menu-is-open":a}),s,{"aria-disabled":r||void 0}),n)},lne=ane,une=["data"],cne=function(t,n){var r=t.theme.spacing;return n?{}:{paddingBottom:r.baseUnit*2,paddingTop:r.baseUnit*2}},dne=function(t){var n=t.children,r=t.cx,o=t.getStyles,i=t.getClassNames,s=t.Heading,a=t.headingProps,l=t.innerProps,u=t.label,c=t.theme,d=t.selectProps;return Fe("div",He({},$t(t,"group",{group:!0}),l),Fe(s,He({},a,{selectProps:d,theme:c,getStyles:o,getClassNames:i,cx:r}),u),Fe("div",null,n))},fne=function(t,n){var r=t.theme,o=r.colors,i=r.spacing;return $e({label:"group",cursor:"default",display:"block"},n?{}:{color:o.neutral40,fontSize:"75%",fontWeight:500,marginBottom:"0.25em",paddingLeft:i.baseUnit*3,paddingRight:i.baseUnit*3,textTransform:"uppercase"})},pne=function(t){var n=x2(t);n.data;var r=ho(n,une);return Fe("div",He({},$t(t,"groupHeading",{"group-heading":!0}),r))},hne=dne,gne=["innerRef","isDisabled","isHidden","inputClassName"],mne=function(t,n){var r=t.isDisabled,o=t.value,i=t.theme,s=i.spacing,a=i.colors;return $e($e({visibility:r?"hidden":"visible",transform:o?"translateZ(0)":""},bne),n?{}:{margin:s.baseUnit/2,paddingBottom:s.baseUnit/2,paddingTop:s.baseUnit/2,color:a.neutral80})},O2={gridArea:"1 / 2",font:"inherit",minWidth:"2px",border:0,margin:0,outline:0,padding:0},bne={flex:"1 1 auto",display:"inline-grid",gridArea:"1 / 1 / 2 / 3",gridTemplateColumns:"0 min-content","&:after":$e({content:'attr(data-value) " "',visibility:"hidden",whiteSpace:"pre"},O2)},vne=function(t){return $e({label:"input",color:"inherit",background:0,opacity:t?0:1,width:"100%"},O2)},yne=function(t){var n=t.cx,r=t.value,o=x2(t),i=o.innerRef,s=o.isDisabled,a=o.isHidden,l=o.inputClassName,u=ho(o,gne);return Fe("div",He({},$t(t,"input",{"input-container":!0}),{"data-value":r||""}),Fe("input",He({className:n({input:!0},l),ref:i,style:vne(a),disabled:s},u)))},xne=yne,wne=function(t,n){var r=t.theme,o=r.spacing,i=r.borderRadius,s=r.colors;return $e({label:"multiValue",display:"flex",minWidth:0},n?{}:{backgroundColor:s.neutral10,borderRadius:i/2,margin:o.baseUnit/2})},Cne=function(t,n){var r=t.theme,o=r.borderRadius,i=r.colors,s=t.cropWithEllipsis;return $e({overflow:"hidden",textOverflow:s||s===void 0?"ellipsis":void 0,whiteSpace:"nowrap"},n?{}:{borderRadius:o/2,color:i.neutral80,fontSize:"85%",padding:3,paddingLeft:6})},Sne=function(t,n){var r=t.theme,o=r.spacing,i=r.borderRadius,s=r.colors,a=t.isFocused;return $e({alignItems:"center",display:"flex"},n?{}:{borderRadius:i/2,backgroundColor:a?s.dangerLight:void 0,paddingLeft:o.baseUnit,paddingRight:o.baseUnit,":hover":{backgroundColor:s.dangerLight,color:s.danger}})},N2=function(t){var n=t.children,r=t.innerProps;return Fe("div",r,n)},Ene=N2,Ine=N2;function Rne(e){var t=e.children,n=e.innerProps;return Fe("div",He({role:"button"},n),t||Fe(bx,{size:14}))}var Ane=function(t){var n=t.children,r=t.components,o=t.data,i=t.innerProps,s=t.isDisabled,a=t.removeProps,l=t.selectProps,u=r.Container,c=r.Label,d=r.Remove;return Fe(u,{data:o,innerProps:$e($e({},$t(t,"multiValue",{"multi-value":!0,"multi-value--is-disabled":s})),i),selectProps:l},Fe(c,{data:o,innerProps:$e({},$t(t,"multiValueLabel",{"multi-value__label":!0})),selectProps:l},n),Fe(d,{data:o,innerProps:$e($e({},$t(t,"multiValueRemove",{"multi-value__remove":!0})),{},{"aria-label":"Remove ".concat(n||"option")},a),selectProps:l}))},Tne=Ane,One=function(t,n){var r=t.isDisabled,o=t.isFocused,i=t.isSelected,s=t.theme,a=s.spacing,l=s.colors;return $e({label:"option",cursor:"default",display:"block",fontSize:"inherit",width:"100%",userSelect:"none",WebkitTapHighlightColor:"rgba(0, 0, 0, 0)"},n?{}:{backgroundColor:i?l.primary:o?l.primary25:"transparent",color:r?l.neutral20:i?l.neutral0:"inherit",padding:"".concat(a.baseUnit*2,"px ").concat(a.baseUnit*3,"px"),":active":{backgroundColor:r?void 0:i?l.primary:l.primary50}})},Nne=function(t){var n=t.children,r=t.isDisabled,o=t.isFocused,i=t.isSelected,s=t.innerRef,a=t.innerProps;return Fe("div",He({},$t(t,"option",{option:!0,"option--is-disabled":r,"option--is-focused":o,"option--is-selected":i}),{ref:s,"aria-disabled":r},a),n)},Pne=Nne,_ne=function(t,n){var r=t.theme,o=r.spacing,i=r.colors;return $e({label:"placeholder",gridArea:"1 / 1 / 2 / 3"},n?{}:{color:i.neutral50,marginLeft:o.baseUnit/2,marginRight:o.baseUnit/2})},Mne=function(t){var n=t.children,r=t.innerProps;return Fe("div",He({},$t(t,"placeholder",{placeholder:!0}),r),n)},Dne=Mne,kne=function(t,n){var r=t.isDisabled,o=t.theme,i=o.spacing,s=o.colors;return $e({label:"singleValue",gridArea:"1 / 1 / 2 / 3",maxWidth:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},n?{}:{color:r?s.neutral40:s.neutral80,marginLeft:i.baseUnit/2,marginRight:i.baseUnit/2})},jne=function(t){var n=t.children,r=t.isDisabled,o=t.innerProps;return Fe("div",He({},$t(t,"singleValue",{"single-value":!0,"single-value--is-disabled":r}),o),n)},Lne=jne,Fne={ClearIndicator:ene,Control:lne,DropdownIndicator:Kte,DownChevron:A2,CrossIcon:bx,Group:hne,GroupHeading:pne,IndicatorsContainer:qte,IndicatorSeparator:nne,Input:xne,LoadingIndicator:ine,Menu:_te,MenuList:Dte,MenuPortal:Vte,LoadingMessage:Fte,NoOptionsMessage:Lte,MultiValue:Tne,MultiValueContainer:Ene,MultiValueLabel:Ine,MultiValueRemove:Rne,Option:Pne,Placeholder:Dne,SelectContainer:Gte,SingleValue:Lne,ValueContainer:Wte},Bne=function(t){return $e($e({},Fne),t.components)},xI=Number.isNaN||function(t){return typeof t=="number"&&t!==t};function Vne(e,t){return!!(e===t||xI(e)&&xI(t))}function $ne(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(!Vne(e[n],t[n]))return!1;return!0}function Gne(e,t){t===void 0&&(t=$ne);var n=null;function r(){for(var o=[],i=0;i<arguments.length;i++)o[i]=arguments[i];if(n&&n.lastThis===this&&t(o,n.lastArgs))return n.lastResult;var s=e.apply(this,o);return n={lastResult:s,lastArgs:o,lastThis:this},s}return r.clear=function(){n=null},r}function Hne(){return"You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."}var Wne=process.env.NODE_ENV==="production"?{name:"7pg0cj-a11yText",styles:"label:a11yText;z-index:9999;border:0;clip:rect(1px, 1px, 1px, 1px);height:1px;width:1px;position:absolute;overflow:hidden;padding:0;white-space:nowrap"}:{name:"1f43avz-a11yText-A11yText",styles:"label:a11yText;z-index:9999;border:0;clip:rect(1px, 1px, 1px, 1px);height:1px;width:1px;position:absolute;overflow:hidden;padding:0;white-space:nowrap;label:A11yText;",map:"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkExMXlUZXh0LnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFPSSIsImZpbGUiOiJBMTF5VGV4dC50c3giLCJzb3VyY2VzQ29udGVudCI6WyIvKiogQGpzeCBqc3ggKi9cbmltcG9ydCB7IEpTWCB9IGZyb20gJ3JlYWN0JztcbmltcG9ydCB7IGpzeCB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcblxuLy8gQXNzaXN0aXZlIHRleHQgdG8gZGVzY3JpYmUgdmlzdWFsIGVsZW1lbnRzLiBIaWRkZW4gZm9yIHNpZ2h0ZWQgdXNlcnMuXG5jb25zdCBBMTF5VGV4dCA9IChwcm9wczogSlNYLkludHJpbnNpY0VsZW1lbnRzWydzcGFuJ10pID0+IChcbiAgPHNwYW5cbiAgICBjc3M9e3tcbiAgICAgIGxhYmVsOiAnYTExeVRleHQnLFxuICAgICAgekluZGV4OiA5OTk5LFxuICAgICAgYm9yZGVyOiAwLFxuICAgICAgY2xpcDogJ3JlY3QoMXB4LCAxcHgsIDFweCwgMXB4KScsXG4gICAgICBoZWlnaHQ6IDEsXG4gICAgICB3aWR0aDogMSxcbiAgICAgIHBvc2l0aW9uOiAnYWJzb2x1dGUnLFxuICAgICAgb3ZlcmZsb3c6ICdoaWRkZW4nLFxuICAgICAgcGFkZGluZzogMCxcbiAgICAgIHdoaXRlU3BhY2U6ICdub3dyYXAnLFxuICAgIH19XG4gICAgey4uLnByb3BzfVxuICAvPlxuKTtcblxuZXhwb3J0IGRlZmF1bHQgQTExeVRleHQ7XG4iXX0= */",toString:Hne},zne=function(t){return Fe("span",He({css:Wne},t))},wI=zne,qne={guidance:function(t){var n=t.isSearchable,r=t.isMulti,o=t.tabSelectsValue,i=t.context,s=t.isInitialFocus;switch(i){case"menu":return"Use Up and Down to choose options, press Enter to select the currently focused option, press Escape to exit the menu".concat(o?", press Tab to select the option and exit the menu":"",".");case"input":return s?"".concat(t["aria-label"]||"Select"," is focused ").concat(n?",type to refine list":"",", press Down to open the menu, ").concat(r?" press left to focus selected values":""):"";case"value":return"Use left and right to toggle between focused values, press Backspace to remove the currently focused value";default:return""}},onChange:function(t){var n=t.action,r=t.label,o=r===void 0?"":r,i=t.labels,s=t.isDisabled;switch(n){case"deselect-option":case"pop-value":case"remove-value":return"option ".concat(o,", deselected.");case"clear":return"All selected options have been cleared.";case"initial-input-focus":return"option".concat(i.length>1?"s":""," ").concat(i.join(","),", selected.");case"select-option":return s?"option ".concat(o," is disabled. Select another option."):"option ".concat(o,", selected.");default:return""}},onFocus:function(t){var n=t.context,r=t.focused,o=t.options,i=t.label,s=i===void 0?"":i,a=t.selectValue,l=t.isDisabled,u=t.isSelected,c=t.isAppleDevice,d=function(m,v){return m&&m.length?"".concat(m.indexOf(v)+1," of ").concat(m.length):""};if(n==="value"&&a)return"value ".concat(s," focused, ").concat(d(a,r),".");if(n==="menu"&&c){var f=l?" disabled":"",p="".concat(u?" selected":"").concat(f);return"".concat(s).concat(p,", ").concat(d(o,r),".")}return""},onFilter:function(t){var n=t.inputValue,r=t.resultsMessage;return"".concat(r).concat(n?" for search term "+n:"",".")}},Une=function(t){var n=t.ariaSelection,r=t.focusedOption,o=t.focusedValue,i=t.focusableOptions,s=t.isFocused,a=t.selectValue,l=t.selectProps,u=t.id,c=t.isAppleDevice,d=l.ariaLiveMessages,f=l.getOptionLabel,p=l.inputValue,g=l.isMulti,m=l.isOptionDisabled,v=l.isSearchable,y=l.menuIsOpen,x=l.options,w=l.screenReaderStatus,C=l.tabSelectsValue,S=l.isLoading,R=l["aria-label"],I=l["aria-live"],T=N.useMemo(function(){return $e($e({},qne),d||{})},[d]),_=N.useMemo(function(){var j="";if(n&&T.onChange){var D=n.option,V=n.options,G=n.removedValue,z=n.removedValues,H=n.value,ne=function(te){return Array.isArray(te)?null:te},W=G||D||ne(H),J=W?f(W):"",K=V||z||void 0,U=K?K.map(f):[],oe=$e({isDisabled:W&&m(W,a),label:J,labels:U},n);j=T.onChange(oe)}return j},[n,T,m,a,f]),$=N.useMemo(function(){var j="",D=r||o,V=!!(r&&a&&a.includes(r));if(D&&T.onFocus){var G={focused:D,label:f(D),isDisabled:m(D,a),isSelected:V,options:i,context:D===r?"menu":"value",selectValue:a,isAppleDevice:c};j=T.onFocus(G)}return j},[r,o,f,m,T,i,a,c]),A=N.useMemo(function(){var j="";if(y&&x.length&&!S&&T.onFilter){var D=w({count:i.length});j=T.onFilter({inputValue:p,resultsMessage:D})}return j},[i,p,y,T,x,w,S]),M=n?.action==="initial-input-focus",O=N.useMemo(function(){var j="";if(T.guidance){var D=o?"value":y?"menu":"input";j=T.guidance({"aria-label":R,context:D,isDisabled:r&&m(r,a),isMulti:g,isSearchable:v,tabSelectsValue:C,isInitialFocus:M})}return j},[R,r,o,g,m,v,y,T,a,C,M]),B=Fe(N.Fragment,null,Fe("span",{id:"aria-selection"},_),Fe("span",{id:"aria-focused"},$),Fe("span",{id:"aria-results"},A),Fe("span",{id:"aria-guidance"},O));return Fe(N.Fragment,null,Fe(wI,{id:u},M&&B),Fe(wI,{"aria-live":I,"aria-atomic":"false","aria-relevant":"additions text",role:"log"},s&&!M&&B))},Yne=Une,Iv=[{base:"A",letters:"AⒶAÀÁÂẦẤẪẨÃĀĂẰẮẴẲȦǠÄǞẢÅǺǍȀȂẠẬẶḀĄȺⱯ"},{base:"AA",letters:"Ꜳ"},{base:"AE",letters:"ÆǼǢ"},{base:"AO",letters:"Ꜵ"},{base:"AU",letters:"Ꜷ"},{base:"AV",letters:"ꜸꜺ"},{base:"AY",letters:"Ꜽ"},{base:"B",letters:"BⒷBḂḄḆɃƂƁ"},{base:"C",letters:"CⒸCĆĈĊČÇḈƇȻꜾ"},{base:"D",letters:"DⒹDḊĎḌḐḒḎĐƋƊƉꝹ"},{base:"DZ",letters:"DZDŽ"},{base:"Dz",letters:"DzDž"},{base:"E",letters:"EⒺEÈÉÊỀẾỄỂẼĒḔḖĔĖËẺĚȄȆẸỆȨḜĘḘḚƐƎ"},{base:"F",letters:"FⒻFḞƑꝻ"},{base:"G",letters:"GⒼGǴĜḠĞĠǦĢǤƓꞠꝽꝾ"},{base:"H",letters:"HⒽHĤḢḦȞḤḨḪĦⱧⱵꞍ"},{base:"I",letters:"IⒾIÌÍÎĨĪĬİÏḮỈǏȈȊỊĮḬƗ"},{base:"J",letters:"JⒿJĴɈ"},{base:"K",letters:"KⓀKḰǨḲĶḴƘⱩꝀꝂꝄꞢ"},{base:"L",letters:"LⓁLĿĹĽḶḸĻḼḺŁȽⱢⱠꝈꝆꞀ"},{base:"LJ",letters:"LJ"},{base:"Lj",letters:"Lj"},{base:"M",letters:"MⓂMḾṀṂⱮƜ"},{base:"N",letters:"NⓃNǸŃÑṄŇṆŅṊṈȠƝꞐꞤ"},{base:"NJ",letters:"NJ"},{base:"Nj",letters:"Nj"},{base:"O",letters:"OⓄOÒÓÔỒỐỖỔÕṌȬṎŌṐṒŎȮȰÖȪỎŐǑȌȎƠỜỚỠỞỢỌỘǪǬØǾƆƟꝊꝌ"},{base:"OI",letters:"Ƣ"},{base:"OO",letters:"Ꝏ"},{base:"OU",letters:"Ȣ"},{base:"P",letters:"PⓅPṔṖƤⱣꝐꝒꝔ"},{base:"Q",letters:"QⓆQꝖꝘɊ"},{base:"R",letters:"RⓇRŔṘŘȐȒṚṜŖṞɌⱤꝚꞦꞂ"},{base:"S",letters:"SⓈSẞŚṤŜṠŠṦṢṨȘŞⱾꞨꞄ"},{base:"T",letters:"TⓉTṪŤṬȚŢṰṮŦƬƮȾꞆ"},{base:"TZ",letters:"Ꜩ"},{base:"U",letters:"UⓊUÙÚÛŨṸŪṺŬÜǛǗǕǙỦŮŰǓȔȖƯỪỨỮỬỰỤṲŲṶṴɄ"},{base:"V",letters:"VⓋVṼṾƲꝞɅ"},{base:"VY",letters:"Ꝡ"},{base:"W",letters:"WⓌWẀẂŴẆẄẈⱲ"},{base:"X",letters:"XⓍXẊẌ"},{base:"Y",letters:"YⓎYỲÝŶỸȲẎŸỶỴƳɎỾ"},{base:"Z",letters:"ZⓏZŹẐŻŽẒẔƵȤⱿⱫꝢ"},{base:"a",letters:"aⓐaẚàáâầấẫẩãāăằắẵẳȧǡäǟảåǻǎȁȃạậặḁąⱥɐ"},{base:"aa",letters:"ꜳ"},{base:"ae",letters:"æǽǣ"},{base:"ao",letters:"ꜵ"},{base:"au",letters:"ꜷ"},{base:"av",letters:"ꜹꜻ"},{base:"ay",letters:"ꜽ"},{base:"b",letters:"bⓑbḃḅḇƀƃɓ"},{base:"c",letters:"cⓒcćĉċčçḉƈȼꜿↄ"},{base:"d",letters:"dⓓdḋďḍḑḓḏđƌɖɗꝺ"},{base:"dz",letters:"dzdž"},{base:"e",letters:"eⓔeèéêềếễểẽēḕḗĕėëẻěȅȇẹệȩḝęḙḛɇɛǝ"},{base:"f",letters:"fⓕfḟƒꝼ"},{base:"g",letters:"gⓖgǵĝḡğġǧģǥɠꞡᵹꝿ"},{base:"h",letters:"hⓗhĥḣḧȟḥḩḫẖħⱨⱶɥ"},{base:"hv",letters:"ƕ"},{base:"i",letters:"iⓘiìíîĩīĭïḯỉǐȉȋịįḭɨı"},{base:"j",letters:"jⓙjĵǰɉ"},{base:"k",letters:"kⓚkḱǩḳķḵƙⱪꝁꝃꝅꞣ"},{base:"l",letters:"lⓛlŀĺľḷḹļḽḻſłƚɫⱡꝉꞁꝇ"},{base:"lj",letters:"lj"},{base:"m",letters:"mⓜmḿṁṃɱɯ"},{base:"n",letters:"nⓝnǹńñṅňṇņṋṉƞɲʼnꞑꞥ"},{base:"nj",letters:"nj"},{base:"o",letters:"oⓞoòóôồốỗổõṍȭṏōṑṓŏȯȱöȫỏőǒȍȏơờớỡởợọộǫǭøǿɔꝋꝍɵ"},{base:"oi",letters:"ƣ"},{base:"ou",letters:"ȣ"},{base:"oo",letters:"ꝏ"},{base:"p",letters:"pⓟpṕṗƥᵽꝑꝓꝕ"},{base:"q",letters:"qⓠqɋꝗꝙ"},{base:"r",letters:"rⓡrŕṙřȑȓṛṝŗṟɍɽꝛꞧꞃ"},{base:"s",letters:"sⓢsßśṥŝṡšṧṣṩșşȿꞩꞅẛ"},{base:"t",letters:"tⓣtṫẗťṭțţṱṯŧƭʈⱦꞇ"},{base:"tz",letters:"ꜩ"},{base:"u",letters:"uⓤuùúûũṹūṻŭüǜǘǖǚủůűǔȕȗưừứữửựụṳųṷṵʉ"},{base:"v",letters:"vⓥvṽṿʋꝟʌ"},{base:"vy",letters:"ꝡ"},{base:"w",letters:"wⓦwẁẃŵẇẅẘẉⱳ"},{base:"x",letters:"xⓧxẋẍ"},{base:"y",letters:"yⓨyỳýŷỹȳẏÿỷẙỵƴɏỿ"},{base:"z",letters:"zⓩzźẑżžẓẕƶȥɀⱬꝣ"}],Xne=new RegExp("["+Iv.map(function(e){return e.letters}).join("")+"]","g"),P2={};for(var Hm=0;Hm<Iv.length;Hm++)for(var Wm=Iv[Hm],zm=0;zm<Wm.letters.length;zm++)P2[Wm.letters[zm]]=Wm.base;var _2=function(t){return t.replace(Xne,function(n){return P2[n]})},Zne=Gne(_2),CI=function(t){return t.replace(/^\s+|\s+$/g,"")},Jne=function(t){return"".concat(t.label," ").concat(t.value)},Kne=function(t){return function(n,r){if(n.data.__isNew__)return!0;var o=$e({ignoreCase:!0,ignoreAccents:!0,stringify:Jne,trim:!0,matchFrom:"any"},t),i=o.ignoreCase,s=o.ignoreAccents,a=o.stringify,l=o.trim,u=o.matchFrom,c=l?CI(r):r,d=l?CI(a(n)):a(n);return i&&(c=c.toLowerCase(),d=d.toLowerCase()),s&&(c=Zne(c),d=_2(d)),u==="start"?d.substr(0,c.length)===c:d.indexOf(c)>-1}},Qne=["innerRef"];function ere(e){var t=e.innerRef,n=ho(e,Qne),r=Ete(n,"onExited","in","enter","exit","appear");return Fe("input",He({ref:t},r,{css:mx({label:"dummyInput",background:0,border:0,caretColor:"transparent",fontSize:"inherit",gridArea:"1 / 1 / 2 / 3",outline:0,padding:0,width:1,color:"transparent",left:-100,opacity:0,position:"relative",transform:"scale(.01)"},process.env.NODE_ENV==="production"?"":";label:DummyInput;",process.env.NODE_ENV==="production"?"":"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkR1bW15SW5wdXQudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQXlCTSIsImZpbGUiOiJEdW1teUlucHV0LnRzeCIsInNvdXJjZXNDb250ZW50IjpbIi8qKiBAanN4IGpzeCAqL1xuaW1wb3J0IHsgSlNYLCBSZWYgfSBmcm9tICdyZWFjdCc7XG5pbXBvcnQgeyBqc3ggfSBmcm9tICdAZW1vdGlvbi9yZWFjdCc7XG5pbXBvcnQgeyByZW1vdmVQcm9wcyB9IGZyb20gJy4uL3V0aWxzJztcblxuZXhwb3J0IGRlZmF1bHQgZnVuY3Rpb24gRHVtbXlJbnB1dCh7XG4gIGlubmVyUmVmLFxuICAuLi5wcm9wc1xufTogSlNYLkludHJpbnNpY0VsZW1lbnRzWydpbnB1dCddICYge1xuICByZWFkb25seSBpbm5lclJlZjogUmVmPEhUTUxJbnB1dEVsZW1lbnQ+O1xufSkge1xuICAvLyBSZW1vdmUgYW5pbWF0aW9uIHByb3BzIG5vdCBtZWFudCBmb3IgSFRNTCBlbGVtZW50c1xuICBjb25zdCBmaWx0ZXJlZFByb3BzID0gcmVtb3ZlUHJvcHMoXG4gICAgcHJvcHMsXG4gICAgJ29uRXhpdGVkJyxcbiAgICAnaW4nLFxuICAgICdlbnRlcicsXG4gICAgJ2V4aXQnLFxuICAgICdhcHBlYXInXG4gICk7XG5cbiAgcmV0dXJuIChcbiAgICA8aW5wdXRcbiAgICAgIHJlZj17aW5uZXJSZWZ9XG4gICAgICB7Li4uZmlsdGVyZWRQcm9wc31cbiAgICAgIGNzcz17e1xuICAgICAgICBsYWJlbDogJ2R1bW15SW5wdXQnLFxuICAgICAgICAvLyBnZXQgcmlkIG9mIGFueSBkZWZhdWx0IHN0eWxlc1xuICAgICAgICBiYWNrZ3JvdW5kOiAwLFxuICAgICAgICBib3JkZXI6IDAsXG4gICAgICAgIC8vIGltcG9ydGFudCEgdGhpcyBoaWRlcyB0aGUgZmxhc2hpbmcgY3Vyc29yXG4gICAgICAgIGNhcmV0Q29sb3I6ICd0cmFuc3BhcmVudCcsXG4gICAgICAgIGZvbnRTaXplOiAnaW5oZXJpdCcsXG4gICAgICAgIGdyaWRBcmVhOiAnMSAvIDEgLyAyIC8gMycsXG4gICAgICAgIG91dGxpbmU6IDAsXG4gICAgICAgIHBhZGRpbmc6IDAsXG4gICAgICAgIC8vIGltcG9ydGFudCEgd2l0aG91dCBgd2lkdGhgIGJyb3dzZXJzIHdvbid0IGFsbG93IGZvY3VzXG4gICAgICAgIHdpZHRoOiAxLFxuXG4gICAgICAgIC8vIHJlbW92ZSBjdXJzb3Igb24gZGVza3RvcFxuICAgICAgICBjb2xvcjogJ3RyYW5zcGFyZW50JyxcblxuICAgICAgICAvLyByZW1vdmUgY3Vyc29yIG9uIG1vYmlsZSB3aGlsc3QgbWFpbnRhaW5pbmcgXCJzY3JvbGwgaW50byB2aWV3XCIgYmVoYXZpb3VyXG4gICAgICAgIGxlZnQ6IC0xMDAsXG4gICAgICAgIG9wYWNpdHk6IDAsXG4gICAgICAgIHBvc2l0aW9uOiAncmVsYXRpdmUnLFxuICAgICAgICB0cmFuc2Zvcm06ICdzY2FsZSguMDEpJyxcbiAgICAgIH19XG4gICAgLz5cbiAgKTtcbn1cbiJdfQ== */")}))}var tre=function(t){t.cancelable&&t.preventDefault(),t.stopPropagation()};function nre(e){var t=e.isEnabled,n=e.onBottomArrive,r=e.onBottomLeave,o=e.onTopArrive,i=e.onTopLeave,s=N.useRef(!1),a=N.useRef(!1),l=N.useRef(0),u=N.useRef(null),c=N.useCallback(function(v,y){if(u.current!==null){var x=u.current,w=x.scrollTop,C=x.scrollHeight,S=x.clientHeight,R=u.current,I=y>0,T=C-S-w,_=!1;T>y&&s.current&&(r&&r(v),s.current=!1),I&&a.current&&(i&&i(v),a.current=!1),I&&y>T?(n&&!s.current&&n(v),R.scrollTop=C,_=!0,s.current=!0):!I&&-y>w&&(o&&!a.current&&o(v),R.scrollTop=0,_=!0,a.current=!0),_&&tre(v)}},[n,r,o,i]),d=N.useCallback(function(v){c(v,v.deltaY)},[c]),f=N.useCallback(function(v){l.current=v.changedTouches[0].clientY},[]),p=N.useCallback(function(v){var y=l.current-v.changedTouches[0].clientY;c(v,y)},[c]),g=N.useCallback(function(v){if(v){var y=wte?{passive:!1}:!1;v.addEventListener("wheel",d,y),v.addEventListener("touchstart",f,y),v.addEventListener("touchmove",p,y)}},[p,f,d]),m=N.useCallback(function(v){v&&(v.removeEventListener("wheel",d,!1),v.removeEventListener("touchstart",f,!1),v.removeEventListener("touchmove",p,!1))},[p,f,d]);return N.useEffect(function(){if(t){var v=u.current;return g(v),function(){m(v)}}},[t,g,m]),function(v){u.current=v}}var SI=["boxSizing","height","overflow","paddingRight","position"],EI={boxSizing:"border-box",overflow:"hidden",position:"relative",height:"100%"};function II(e){e.cancelable&&e.preventDefault()}function RI(e){e.stopPropagation()}function AI(){var e=this.scrollTop,t=this.scrollHeight,n=e+this.offsetHeight;e===0?this.scrollTop=1:n===t&&(this.scrollTop=e-1)}function TI(){return"ontouchstart"in window||navigator.maxTouchPoints}var OI=!!(typeof window<"u"&&window.document&&window.document.createElement),qa=0,Ms={capture:!1,passive:!1};function rre(e){var t=e.isEnabled,n=e.accountForScrollbars,r=n===void 0?!0:n,o=N.useRef({}),i=N.useRef(null),s=N.useCallback(function(l){if(OI){var u=document.body,c=u&&u.style;if(r&&SI.forEach(function(g){var m=c&&c[g];o.current[g]=m}),r&&qa<1){var d=parseInt(o.current.paddingRight,10)||0,f=document.body?document.body.clientWidth:0,p=window.innerWidth-f+d||0;Object.keys(EI).forEach(function(g){var m=EI[g];c&&(c[g]=m)}),c&&(c.paddingRight="".concat(p,"px"))}u&&TI()&&(u.addEventListener("touchmove",II,Ms),l&&(l.addEventListener("touchstart",AI,Ms),l.addEventListener("touchmove",RI,Ms))),qa+=1}},[r]),a=N.useCallback(function(l){if(OI){var u=document.body,c=u&&u.style;qa=Math.max(qa-1,0),r&&qa<1&&SI.forEach(function(d){var f=o.current[d];c&&(c[d]=f)}),u&&TI()&&(u.removeEventListener("touchmove",II,Ms),l&&(l.removeEventListener("touchstart",AI,Ms),l.removeEventListener("touchmove",RI,Ms)))}},[r]);return N.useEffect(function(){if(t){var l=i.current;return s(l),function(){a(l)}}},[t,s,a]),function(l){i.current=l}}function ore(){return"You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."}var ire=function(t){var n=t.target;return n.ownerDocument.activeElement&&n.ownerDocument.activeElement.blur()},sre=process.env.NODE_ENV==="production"?{name:"1kfdb0e",styles:"position:fixed;left:0;bottom:0;right:0;top:0"}:{name:"bp8cua-ScrollManager",styles:"position:fixed;left:0;bottom:0;right:0;top:0;label:ScrollManager;",map:"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIlNjcm9sbE1hbmFnZXIudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQW9EVSIsImZpbGUiOiJTY3JvbGxNYW5hZ2VyLnRzeCIsInNvdXJjZXNDb250ZW50IjpbIi8qKiBAanN4IGpzeCAqL1xuaW1wb3J0IHsganN4IH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnO1xuaW1wb3J0IHsgRnJhZ21lbnQsIFJlYWN0RWxlbWVudCwgUmVmQ2FsbGJhY2ssIE1vdXNlRXZlbnQgfSBmcm9tICdyZWFjdCc7XG5pbXBvcnQgdXNlU2Nyb2xsQ2FwdHVyZSBmcm9tICcuL3VzZVNjcm9sbENhcHR1cmUnO1xuaW1wb3J0IHVzZVNjcm9sbExvY2sgZnJvbSAnLi91c2VTY3JvbGxMb2NrJztcblxuaW50ZXJmYWNlIFByb3BzIHtcbiAgcmVhZG9ubHkgY2hpbGRyZW46IChyZWY6IFJlZkNhbGxiYWNrPEhUTUxFbGVtZW50PikgPT4gUmVhY3RFbGVtZW50O1xuICByZWFkb25seSBsb2NrRW5hYmxlZDogYm9vbGVhbjtcbiAgcmVhZG9ubHkgY2FwdHVyZUVuYWJsZWQ6IGJvb2xlYW47XG4gIHJlYWRvbmx5IG9uQm90dG9tQXJyaXZlPzogKGV2ZW50OiBXaGVlbEV2ZW50IHwgVG91Y2hFdmVudCkgPT4gdm9pZDtcbiAgcmVhZG9ubHkgb25Cb3R0b21MZWF2ZT86IChldmVudDogV2hlZWxFdmVudCB8IFRvdWNoRXZlbnQpID0+IHZvaWQ7XG4gIHJlYWRvbmx5IG9uVG9wQXJyaXZlPzogKGV2ZW50OiBXaGVlbEV2ZW50IHwgVG91Y2hFdmVudCkgPT4gdm9pZDtcbiAgcmVhZG9ubHkgb25Ub3BMZWF2ZT86IChldmVudDogV2hlZWxFdmVudCB8IFRvdWNoRXZlbnQpID0+IHZvaWQ7XG59XG5cbmNvbnN0IGJsdXJTZWxlY3RJbnB1dCA9IChldmVudDogTW91c2VFdmVudDxIVE1MRGl2RWxlbWVudD4pID0+IHtcbiAgY29uc3QgZWxlbWVudCA9IGV2ZW50LnRhcmdldCBhcyBIVE1MRGl2RWxlbWVudDtcbiAgcmV0dXJuIChcbiAgICBlbGVtZW50Lm93bmVyRG9jdW1lbnQuYWN0aXZlRWxlbWVudCAmJlxuICAgIChlbGVtZW50Lm93bmVyRG9jdW1lbnQuYWN0aXZlRWxlbWVudCBhcyBIVE1MRWxlbWVudCkuYmx1cigpXG4gICk7XG59O1xuXG5leHBvcnQgZGVmYXVsdCBmdW5jdGlvbiBTY3JvbGxNYW5hZ2VyKHtcbiAgY2hpbGRyZW4sXG4gIGxvY2tFbmFibGVkLFxuICBjYXB0dXJlRW5hYmxlZCA9IHRydWUsXG4gIG9uQm90dG9tQXJyaXZlLFxuICBvbkJvdHRvbUxlYXZlLFxuICBvblRvcEFycml2ZSxcbiAgb25Ub3BMZWF2ZSxcbn06IFByb3BzKSB7XG4gIGNvbnN0IHNldFNjcm9sbENhcHR1cmVUYXJnZXQgPSB1c2VTY3JvbGxDYXB0dXJlKHtcbiAgICBpc0VuYWJsZWQ6IGNhcHR1cmVFbmFibGVkLFxuICAgIG9uQm90dG9tQXJyaXZlLFxuICAgIG9uQm90dG9tTGVhdmUsXG4gICAgb25Ub3BBcnJpdmUsXG4gICAgb25Ub3BMZWF2ZSxcbiAgfSk7XG4gIGNvbnN0IHNldFNjcm9sbExvY2tUYXJnZXQgPSB1c2VTY3JvbGxMb2NrKHsgaXNFbmFibGVkOiBsb2NrRW5hYmxlZCB9KTtcblxuICBjb25zdCB0YXJnZXRSZWY6IFJlZkNhbGxiYWNrPEhUTUxFbGVtZW50PiA9IChlbGVtZW50KSA9PiB7XG4gICAgc2V0U2Nyb2xsQ2FwdHVyZVRhcmdldChlbGVtZW50KTtcbiAgICBzZXRTY3JvbGxMb2NrVGFyZ2V0KGVsZW1lbnQpO1xuICB9O1xuXG4gIHJldHVybiAoXG4gICAgPEZyYWdtZW50PlxuICAgICAge2xvY2tFbmFibGVkICYmIChcbiAgICAgICAgPGRpdlxuICAgICAgICAgIG9uQ2xpY2s9e2JsdXJTZWxlY3RJbnB1dH1cbiAgICAgICAgICBjc3M9e3sgcG9zaXRpb246ICdmaXhlZCcsIGxlZnQ6IDAsIGJvdHRvbTogMCwgcmlnaHQ6IDAsIHRvcDogMCB9fVxuICAgICAgICAvPlxuICAgICAgKX1cbiAgICAgIHtjaGlsZHJlbih0YXJnZXRSZWYpfVxuICAgIDwvRnJhZ21lbnQ+XG4gICk7XG59XG4iXX0= */",toString:ore};function are(e){var t=e.children,n=e.lockEnabled,r=e.captureEnabled,o=r===void 0?!0:r,i=e.onBottomArrive,s=e.onBottomLeave,a=e.onTopArrive,l=e.onTopLeave,u=nre({isEnabled:o,onBottomArrive:i,onBottomLeave:s,onTopArrive:a,onTopLeave:l}),c=rre({isEnabled:n}),d=function(p){u(p),c(p)};return Fe(N.Fragment,null,n&&Fe("div",{onClick:ire,css:sre}),t(d))}function lre(){return"You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."}var ure=process.env.NODE_ENV==="production"?{name:"1a0ro4n-requiredInput",styles:"label:requiredInput;opacity:0;pointer-events:none;position:absolute;bottom:0;left:0;right:0;width:100%"}:{name:"5kkxb2-requiredInput-RequiredInput",styles:"label:requiredInput;opacity:0;pointer-events:none;position:absolute;bottom:0;left:0;right:0;width:100%;label:RequiredInput;",map:"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIlJlcXVpcmVkSW5wdXQudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQWNJIiwiZmlsZSI6IlJlcXVpcmVkSW5wdXQudHN4Iiwic291cmNlc0NvbnRlbnQiOlsiLyoqIEBqc3gganN4ICovXG5pbXBvcnQgeyBGb2N1c0V2ZW50SGFuZGxlciwgRnVuY3Rpb25Db21wb25lbnQgfSBmcm9tICdyZWFjdCc7XG5pbXBvcnQgeyBqc3ggfSBmcm9tICdAZW1vdGlvbi9yZWFjdCc7XG5cbmNvbnN0IFJlcXVpcmVkSW5wdXQ6IEZ1bmN0aW9uQ29tcG9uZW50PHtcbiAgcmVhZG9ubHkgbmFtZT86IHN0cmluZztcbiAgcmVhZG9ubHkgb25Gb2N1czogRm9jdXNFdmVudEhhbmRsZXI8SFRNTElucHV0RWxlbWVudD47XG59PiA9ICh7IG5hbWUsIG9uRm9jdXMgfSkgPT4gKFxuICA8aW5wdXRcbiAgICByZXF1aXJlZFxuICAgIG5hbWU9e25hbWV9XG4gICAgdGFiSW5kZXg9ey0xfVxuICAgIGFyaWEtaGlkZGVuPVwidHJ1ZVwiXG4gICAgb25Gb2N1cz17b25Gb2N1c31cbiAgICBjc3M9e3tcbiAgICAgIGxhYmVsOiAncmVxdWlyZWRJbnB1dCcsXG4gICAgICBvcGFjaXR5OiAwLFxuICAgICAgcG9pbnRlckV2ZW50czogJ25vbmUnLFxuICAgICAgcG9zaXRpb246ICdhYnNvbHV0ZScsXG4gICAgICBib3R0b206IDAsXG4gICAgICBsZWZ0OiAwLFxuICAgICAgcmlnaHQ6IDAsXG4gICAgICB3aWR0aDogJzEwMCUnLFxuICAgIH19XG4gICAgLy8gUHJldmVudCBgU3dpdGNoaW5nIGZyb20gdW5jb250cm9sbGVkIHRvIGNvbnRyb2xsZWRgIGVycm9yXG4gICAgdmFsdWU9XCJcIlxuICAgIG9uQ2hhbmdlPXsoKSA9PiB7fX1cbiAgLz5cbik7XG5cbmV4cG9ydCBkZWZhdWx0IFJlcXVpcmVkSW5wdXQ7XG4iXX0= */",toString:lre},cre=function(t){var n=t.name,r=t.onFocus;return Fe("input",{required:!0,name:n,tabIndex:-1,"aria-hidden":"true",onFocus:r,css:ure,value:"",onChange:function(){}})},dre=cre;function vx(e){var t;return typeof window<"u"&&window.navigator!=null?e.test(((t=window.navigator.userAgentData)===null||t===void 0?void 0:t.platform)||window.navigator.platform):!1}function fre(){return vx(/^iPhone/i)}function M2(){return vx(/^Mac/i)}function pre(){return vx(/^iPad/i)||M2()&&navigator.maxTouchPoints>1}function hre(){return fre()||pre()}function gre(){return M2()||hre()}var mre=function(t){return t.label},D2=function(t){return t.label},k2=function(t){return t.value},bre=function(t){return!!t.isDisabled},vre={clearIndicator:Qte,container:$te,control:sne,dropdownIndicator:Jte,group:cne,groupHeading:fne,indicatorsContainer:zte,indicatorSeparator:tne,input:mne,loadingIndicator:one,loadingMessage:jte,menu:Ote,menuList:Mte,menuPortal:Bte,multiValue:wne,multiValueLabel:Cne,multiValueRemove:Sne,noOptionsMessage:kte,option:One,placeholder:_ne,singleValue:kne,valueContainer:Hte},yre={primary:"#2684FF",primary75:"#4C9AFF",primary50:"#B2D4FF",primary25:"#DEEBFF",danger:"#DE350B",dangerLight:"#FFBDAD",neutral0:"hsl(0, 0%, 100%)",neutral5:"hsl(0, 0%, 95%)",neutral10:"hsl(0, 0%, 90%)",neutral20:"hsl(0, 0%, 80%)",neutral30:"hsl(0, 0%, 70%)",neutral40:"hsl(0, 0%, 60%)",neutral50:"hsl(0, 0%, 50%)",neutral60:"hsl(0, 0%, 40%)",neutral70:"hsl(0, 0%, 30%)",neutral80:"hsl(0, 0%, 20%)",neutral90:"hsl(0, 0%, 10%)"},xre=4,j2=4,wre=38,Cre=j2*2,Sre={baseUnit:j2,controlHeight:wre,menuGutter:Cre},qm={borderRadius:xre,colors:yre,spacing:Sre},Ere={"aria-live":"polite",backspaceRemovesValue:!0,blurInputOnSelect:vI(),captureMenuScroll:!vI(),classNames:{},closeMenuOnSelect:!0,closeMenuOnScroll:!1,components:{},controlShouldRenderValue:!0,escapeClearsValue:!1,filterOption:Kne(),formatGroupLabel:mre,getOptionLabel:D2,getOptionValue:k2,isDisabled:!1,isLoading:!1,isMulti:!1,isRtl:!1,isSearchable:!0,isOptionDisabled:bre,loadingMessage:function(){return"Loading..."},maxMenuHeight:300,minMenuHeight:140,menuIsOpen:!1,menuPlacement:"bottom",menuPosition:"absolute",menuShouldBlockScroll:!1,menuShouldScrollIntoView:!yte(),noOptionsMessage:function(){return"No options"},openMenuOnFocus:!1,openMenuOnClick:!0,options:[],pageSize:5,placeholder:"Select...",screenReaderStatus:function(t){var n=t.count;return"".concat(n," result").concat(n!==1?"s":""," available")},styles:{},tabIndex:0,tabSelectsValue:!0,unstyled:!1};function NI(e,t,n,r){var o=B2(e,t,n),i=V2(e,t,n),s=F2(e,t),a=Cd(e,t);return{type:"option",data:t,isDisabled:o,isSelected:i,label:s,value:a,index:r}}function _c(e,t){return e.options.map(function(n,r){if("options"in n){var o=n.options.map(function(s,a){return NI(e,s,t,a)}).filter(function(s){return _I(e,s)});return o.length>0?{type:"group",data:n,options:o,index:r}:void 0}var i=NI(e,n,t,r);return _I(e,i)?i:void 0}).filter(Cte)}function L2(e){return e.reduce(function(t,n){return n.type==="group"?t.push.apply(t,Zs(n.options.map(function(r){return r.data}))):t.push(n.data),t},[])}function PI(e,t){return e.reduce(function(n,r){return r.type==="group"?n.push.apply(n,Zs(r.options.map(function(o){return{data:o.data,id:"".concat(t,"-").concat(r.index,"-").concat(o.index)}}))):n.push({data:r.data,id:"".concat(t,"-").concat(r.index)}),n},[])}function Ire(e,t){return L2(_c(e,t))}function _I(e,t){var n=e.inputValue,r=n===void 0?"":n,o=t.data,i=t.isSelected,s=t.label,a=t.value;return(!G2(e)||!i)&&$2(e,{label:s,value:a,data:o},r)}function Rre(e,t){var n=e.focusedValue,r=e.selectValue,o=r.indexOf(n);if(o>-1){var i=t.indexOf(n);if(i>-1)return n;if(o<t.length)return t[o]}return null}function Are(e,t){var n=e.focusedOption;return n&&t.indexOf(n)>-1?n:t[0]}var Um=function(t,n){var r,o=(r=t.find(function(i){return i.data===n}))===null||r===void 0?void 0:r.id;return o||null},F2=function(t,n){return t.getOptionLabel(n)},Cd=function(t,n){return t.getOptionValue(n)};function B2(e,t,n){return typeof e.isOptionDisabled=="function"?e.isOptionDisabled(t,n):!1}function V2(e,t,n){if(n.indexOf(t)>-1)return!0;if(typeof e.isOptionSelected=="function")return e.isOptionSelected(t,n);var r=Cd(e,t);return n.some(function(o){return Cd(e,o)===r})}function $2(e,t,n){return e.filterOption?e.filterOption(t,n):!0}var G2=function(t){var n=t.hideSelectedOptions,r=t.isMulti;return n===void 0?r:n},Tre=1,yx=(function(e){cee(n,e);var t=fee(n);function n(r){var o;if(lee(this,n),o=t.call(this,r),o.state={ariaSelection:null,focusedOption:null,focusedOptionId:null,focusableOptionsWithIds:[],focusedValue:null,inputIsHidden:!1,isFocused:!1,selectValue:[],clearFocusValueOnUpdate:!1,prevWasFocused:!1,inputIsHiddenAfterUpdate:void 0,prevProps:void 0,instancePrefix:"",isAppleDevice:!1},o.blockOptionHover=!1,o.isComposing=!1,o.commonProps=void 0,o.initialTouchX=0,o.initialTouchY=0,o.openAfterFocus=!1,o.scrollToFocusedOptionOnUpdate=!1,o.userIsDragging=void 0,o.controlRef=null,o.getControlRef=function(l){o.controlRef=l},o.focusedOptionRef=null,o.getFocusedOptionRef=function(l){o.focusedOptionRef=l},o.menuListRef=null,o.getMenuListRef=function(l){o.menuListRef=l},o.inputRef=null,o.getInputRef=function(l){o.inputRef=l},o.focus=o.focusInput,o.blur=o.blurInput,o.onChange=function(l,u){var c=o.props,d=c.onChange,f=c.name;u.name=f,o.ariaOnChange(l,u),d(l,u)},o.setValue=function(l,u,c){var d=o.props,f=d.closeMenuOnSelect,p=d.isMulti,g=d.inputValue;o.onInputChange("",{action:"set-value",prevInputValue:g}),f&&(o.setState({inputIsHiddenAfterUpdate:!p}),o.onMenuClose()),o.setState({clearFocusValueOnUpdate:!0}),o.onChange(l,{action:u,option:c})},o.selectOption=function(l){var u=o.props,c=u.blurInputOnSelect,d=u.isMulti,f=u.name,p=o.state.selectValue,g=d&&o.isOptionSelected(l,p),m=o.isOptionDisabled(l,p);if(g){var v=o.getOptionValue(l);o.setValue(p.filter(function(y){return o.getOptionValue(y)!==v}),"deselect-option",l)}else if(!m)d?o.setValue([].concat(Zs(p),[l]),"select-option",l):o.setValue(l,"select-option");else{o.ariaOnChange(l,{action:"select-option",option:l,name:f});return}c&&o.blurInput()},o.removeValue=function(l){var u=o.props.isMulti,c=o.state.selectValue,d=o.getOptionValue(l),f=c.filter(function(g){return o.getOptionValue(g)!==d}),p=ol(u,f,f[0]||null);o.onChange(p,{action:"remove-value",removedValue:l}),o.focusInput()},o.clearValue=function(){var l=o.state.selectValue;o.onChange(ol(o.props.isMulti,[],null),{action:"clear",removedValues:l})},o.popValue=function(){var l=o.props.isMulti,u=o.state.selectValue,c=u[u.length-1],d=u.slice(0,u.length-1),f=ol(l,d,d[0]||null);c&&o.onChange(f,{action:"pop-value",removedValue:c})},o.getFocusedOptionId=function(l){return Um(o.state.focusableOptionsWithIds,l)},o.getFocusableOptionsWithIds=function(){return PI(_c(o.props,o.state.selectValue),o.getElementId("option"))},o.getValue=function(){return o.state.selectValue},o.cx=function(){for(var l=arguments.length,u=new Array(l),c=0;c<l;c++)u[c]=arguments[c];return hte.apply(void 0,[o.props.classNamePrefix].concat(u))},o.getOptionLabel=function(l){return F2(o.props,l)},o.getOptionValue=function(l){return Cd(o.props,l)},o.getStyles=function(l,u){var c=o.props.unstyled,d=vre[l](u,c);d.boxSizing="border-box";var f=o.props.styles[l];return f?f(d,u):d},o.getClassNames=function(l,u){var c,d;return(c=(d=o.props.classNames)[l])===null||c===void 0?void 0:c.call(d,u)},o.getElementId=function(l){return"".concat(o.state.instancePrefix,"-").concat(l)},o.getComponents=function(){return Bne(o.props)},o.buildCategorizedOptions=function(){return _c(o.props,o.state.selectValue)},o.getCategorizedOptions=function(){return o.props.menuIsOpen?o.buildCategorizedOptions():[]},o.buildFocusableOptions=function(){return L2(o.buildCategorizedOptions())},o.getFocusableOptions=function(){return o.props.menuIsOpen?o.buildFocusableOptions():[]},o.ariaOnChange=function(l,u){o.setState({ariaSelection:$e({value:l},u)})},o.onMenuMouseDown=function(l){l.button===0&&(l.stopPropagation(),l.preventDefault(),o.focusInput())},o.onMenuMouseMove=function(l){o.blockOptionHover=!1},o.onControlMouseDown=function(l){if(!l.defaultPrevented){var u=o.props.openMenuOnClick;o.state.isFocused?o.props.menuIsOpen?l.target.tagName!=="INPUT"&&l.target.tagName!=="TEXTAREA"&&o.onMenuClose():u&&o.openMenu("first"):(u&&(o.openAfterFocus=!0),o.focusInput()),l.target.tagName!=="INPUT"&&l.target.tagName!=="TEXTAREA"&&l.preventDefault()}},o.onDropdownIndicatorMouseDown=function(l){if(!(l&&l.type==="mousedown"&&l.button!==0)&&!o.props.isDisabled){var u=o.props,c=u.isMulti,d=u.menuIsOpen;o.focusInput(),d?(o.setState({inputIsHiddenAfterUpdate:!c}),o.onMenuClose()):o.openMenu("first"),l.preventDefault()}},o.onClearIndicatorMouseDown=function(l){l&&l.type==="mousedown"&&l.button!==0||(o.clearValue(),l.preventDefault(),o.openAfterFocus=!1,l.type==="touchend"?o.focusInput():setTimeout(function(){return o.focusInput()}))},o.onScroll=function(l){typeof o.props.closeMenuOnScroll=="boolean"?l.target instanceof HTMLElement&&Vf(l.target)&&o.props.onMenuClose():typeof o.props.closeMenuOnScroll=="function"&&o.props.closeMenuOnScroll(l)&&o.props.onMenuClose()},o.onCompositionStart=function(){o.isComposing=!0},o.onCompositionEnd=function(){o.isComposing=!1},o.onTouchStart=function(l){var u=l.touches,c=u&&u.item(0);c&&(o.initialTouchX=c.clientX,o.initialTouchY=c.clientY,o.userIsDragging=!1)},o.onTouchMove=function(l){var u=l.touches,c=u&&u.item(0);if(c){var d=Math.abs(c.clientX-o.initialTouchX),f=Math.abs(c.clientY-o.initialTouchY),p=5;o.userIsDragging=d>p||f>p}},o.onTouchEnd=function(l){o.userIsDragging||(o.controlRef&&!o.controlRef.contains(l.target)&&o.menuListRef&&!o.menuListRef.contains(l.target)&&o.blurInput(),o.initialTouchX=0,o.initialTouchY=0)},o.onControlTouchEnd=function(l){o.userIsDragging||o.onControlMouseDown(l)},o.onClearIndicatorTouchEnd=function(l){o.userIsDragging||o.onClearIndicatorMouseDown(l)},o.onDropdownIndicatorTouchEnd=function(l){o.userIsDragging||o.onDropdownIndicatorMouseDown(l)},o.handleInputChange=function(l){var u=o.props.inputValue,c=l.currentTarget.value;o.setState({inputIsHiddenAfterUpdate:!1}),o.onInputChange(c,{action:"input-change",prevInputValue:u}),o.props.menuIsOpen||o.onMenuOpen()},o.onInputFocus=function(l){o.props.onFocus&&o.props.onFocus(l),o.setState({inputIsHiddenAfterUpdate:!1,isFocused:!0}),(o.openAfterFocus||o.props.openMenuOnFocus)&&o.openMenu("first"),o.openAfterFocus=!1},o.onInputBlur=function(l){var u=o.props.inputValue;if(o.menuListRef&&o.menuListRef.contains(document.activeElement)){o.inputRef.focus();return}o.props.onBlur&&o.props.onBlur(l),o.onInputChange("",{action:"input-blur",prevInputValue:u}),o.onMenuClose(),o.setState({focusedValue:null,isFocused:!1})},o.onOptionHover=function(l){if(!(o.blockOptionHover||o.state.focusedOption===l)){var u=o.getFocusableOptions(),c=u.indexOf(l);o.setState({focusedOption:l,focusedOptionId:c>-1?o.getFocusedOptionId(l):null})}},o.shouldHideSelectedOptions=function(){return G2(o.props)},o.onValueInputFocus=function(l){l.preventDefault(),l.stopPropagation(),o.focus()},o.onKeyDown=function(l){var u=o.props,c=u.isMulti,d=u.backspaceRemovesValue,f=u.escapeClearsValue,p=u.inputValue,g=u.isClearable,m=u.isDisabled,v=u.menuIsOpen,y=u.onKeyDown,x=u.tabSelectsValue,w=u.openMenuOnFocus,C=o.state,S=C.focusedOption,R=C.focusedValue,I=C.selectValue;if(!m&&!(typeof y=="function"&&(y(l),l.defaultPrevented))){switch(o.blockOptionHover=!0,l.key){case"ArrowLeft":if(!c||p)return;o.focusValue("previous");break;case"ArrowRight":if(!c||p)return;o.focusValue("next");break;case"Delete":case"Backspace":if(p)return;if(R)o.removeValue(R);else{if(!d)return;c?o.popValue():g&&o.clearValue()}break;case"Tab":if(o.isComposing||l.shiftKey||!v||!x||!S||w&&o.isOptionSelected(S,I))return;o.selectOption(S);break;case"Enter":if(l.keyCode===229)break;if(v){if(!S||o.isComposing)return;o.selectOption(S);break}return;case"Escape":v?(o.setState({inputIsHiddenAfterUpdate:!1}),o.onInputChange("",{action:"menu-close",prevInputValue:p}),o.onMenuClose()):g&&f&&o.clearValue();break;case" ":if(p)return;if(!v){o.openMenu("first");break}if(!S)return;o.selectOption(S);break;case"ArrowUp":v?o.focusOption("up"):o.openMenu("last");break;case"ArrowDown":v?o.focusOption("down"):o.openMenu("first");break;case"PageUp":if(!v)return;o.focusOption("pageup");break;case"PageDown":if(!v)return;o.focusOption("pagedown");break;case"Home":if(!v)return;o.focusOption("first");break;case"End":if(!v)return;o.focusOption("last");break;default:return}l.preventDefault()}},o.state.instancePrefix="react-select-"+(o.props.instanceId||++Tre),o.state.selectValue=xd(r.value),r.menuIsOpen&&o.state.selectValue.length){var i=o.getFocusableOptionsWithIds(),s=o.buildFocusableOptions(),a=s.indexOf(o.state.selectValue[0]);o.state.focusableOptionsWithIds=i,o.state.focusedOption=s[a],o.state.focusedOptionId=Um(i,s[a])}return o}return uee(n,[{key:"componentDidMount",value:function(){this.startListeningComposition(),this.startListeningToTouch(),this.props.closeMenuOnScroll&&document&&document.addEventListener&&document.addEventListener("scroll",this.onScroll,!0),this.props.autoFocus&&this.focusInput(),this.props.menuIsOpen&&this.state.focusedOption&&this.menuListRef&&this.focusedOptionRef&&bI(this.menuListRef,this.focusedOptionRef),gre()&&this.setState({isAppleDevice:!0})}},{key:"componentDidUpdate",value:function(o){var i=this.props,s=i.isDisabled,a=i.menuIsOpen,l=this.state.isFocused;(l&&!s&&o.isDisabled||l&&a&&!o.menuIsOpen)&&this.focusInput(),l&&s&&!o.isDisabled?this.setState({isFocused:!1},this.onMenuClose):!l&&!s&&o.isDisabled&&this.inputRef===document.activeElement&&this.setState({isFocused:!0}),this.menuListRef&&this.focusedOptionRef&&this.scrollToFocusedOptionOnUpdate&&(bI(this.menuListRef,this.focusedOptionRef),this.scrollToFocusedOptionOnUpdate=!1)}},{key:"componentWillUnmount",value:function(){this.stopListeningComposition(),this.stopListeningToTouch(),document.removeEventListener("scroll",this.onScroll,!0)}},{key:"onMenuOpen",value:function(){this.props.onMenuOpen()}},{key:"onMenuClose",value:function(){this.onInputChange("",{action:"menu-close",prevInputValue:this.props.inputValue}),this.props.onMenuClose()}},{key:"onInputChange",value:function(o,i){this.props.onInputChange(o,i)}},{key:"focusInput",value:function(){this.inputRef&&this.inputRef.focus()}},{key:"blurInput",value:function(){this.inputRef&&this.inputRef.blur()}},{key:"openMenu",value:function(o){var i=this,s=this.state,a=s.selectValue,l=s.isFocused,u=this.buildFocusableOptions(),c=o==="first"?0:u.length-1;if(!this.props.isMulti){var d=u.indexOf(a[0]);d>-1&&(c=d)}this.scrollToFocusedOptionOnUpdate=!(l&&this.menuListRef),this.setState({inputIsHiddenAfterUpdate:!1,focusedValue:null,focusedOption:u[c],focusedOptionId:this.getFocusedOptionId(u[c])},function(){return i.onMenuOpen()})}},{key:"focusValue",value:function(o){var i=this.state,s=i.selectValue,a=i.focusedValue;if(this.props.isMulti){this.setState({focusedOption:null});var l=s.indexOf(a);a||(l=-1);var u=s.length-1,c=-1;if(s.length){switch(o){case"previous":l===0?c=0:l===-1?c=u:c=l-1;break;case"next":l>-1&&l<u&&(c=l+1);break}this.setState({inputIsHidden:c!==-1,focusedValue:s[c]})}}}},{key:"focusOption",value:function(){var o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"first",i=this.props.pageSize,s=this.state.focusedOption,a=this.getFocusableOptions();if(a.length){var l=0,u=a.indexOf(s);s||(u=-1),o==="up"?l=u>0?u-1:a.length-1:o==="down"?l=(u+1)%a.length:o==="pageup"?(l=u-i,l<0&&(l=0)):o==="pagedown"?(l=u+i,l>a.length-1&&(l=a.length-1)):o==="last"&&(l=a.length-1),this.scrollToFocusedOptionOnUpdate=!0,this.setState({focusedOption:a[l],focusedValue:null,focusedOptionId:this.getFocusedOptionId(a[l])})}}},{key:"getTheme",value:function(){return this.props.theme?typeof this.props.theme=="function"?this.props.theme(qm):$e($e({},qm),this.props.theme):qm}},{key:"getCommonProps",value:function(){var o=this.clearValue,i=this.cx,s=this.getStyles,a=this.getClassNames,l=this.getValue,u=this.selectOption,c=this.setValue,d=this.props,f=d.isMulti,p=d.isRtl,g=d.options,m=this.hasValue();return{clearValue:o,cx:i,getStyles:s,getClassNames:a,getValue:l,hasValue:m,isMulti:f,isRtl:p,options:g,selectOption:u,selectProps:d,setValue:c,theme:this.getTheme()}}},{key:"hasValue",value:function(){var o=this.state.selectValue;return o.length>0}},{key:"hasOptions",value:function(){return!!this.getFocusableOptions().length}},{key:"isClearable",value:function(){var o=this.props,i=o.isClearable,s=o.isMulti;return i===void 0?s:i}},{key:"isOptionDisabled",value:function(o,i){return B2(this.props,o,i)}},{key:"isOptionSelected",value:function(o,i){return V2(this.props,o,i)}},{key:"filterOption",value:function(o,i){return $2(this.props,o,i)}},{key:"formatOptionLabel",value:function(o,i){if(typeof this.props.formatOptionLabel=="function"){var s=this.props.inputValue,a=this.state.selectValue;return this.props.formatOptionLabel(o,{context:i,inputValue:s,selectValue:a})}else return this.getOptionLabel(o)}},{key:"formatGroupLabel",value:function(o){return this.props.formatGroupLabel(o)}},{key:"startListeningComposition",value:function(){document&&document.addEventListener&&(document.addEventListener("compositionstart",this.onCompositionStart,!1),document.addEventListener("compositionend",this.onCompositionEnd,!1))}},{key:"stopListeningComposition",value:function(){document&&document.removeEventListener&&(document.removeEventListener("compositionstart",this.onCompositionStart),document.removeEventListener("compositionend",this.onCompositionEnd))}},{key:"startListeningToTouch",value:function(){document&&document.addEventListener&&(document.addEventListener("touchstart",this.onTouchStart,!1),document.addEventListener("touchmove",this.onTouchMove,!1),document.addEventListener("touchend",this.onTouchEnd,!1))}},{key:"stopListeningToTouch",value:function(){document&&document.removeEventListener&&(document.removeEventListener("touchstart",this.onTouchStart),document.removeEventListener("touchmove",this.onTouchMove),document.removeEventListener("touchend",this.onTouchEnd))}},{key:"renderInput",value:function(){var o=this.props,i=o.isDisabled,s=o.isSearchable,a=o.inputId,l=o.inputValue,u=o.tabIndex,c=o.form,d=o.menuIsOpen,f=o.required,p=this.getComponents(),g=p.Input,m=this.state,v=m.inputIsHidden,y=m.ariaSelection,x=this.commonProps,w=a||this.getElementId("input"),C=$e($e($e({"aria-autocomplete":"list","aria-expanded":d,"aria-haspopup":!0,"aria-errormessage":this.props["aria-errormessage"],"aria-invalid":this.props["aria-invalid"],"aria-label":this.props["aria-label"],"aria-labelledby":this.props["aria-labelledby"],"aria-required":f,role:"combobox","aria-activedescendant":this.state.isAppleDevice?void 0:this.state.focusedOptionId||""},d&&{"aria-controls":this.getElementId("listbox")}),!s&&{"aria-readonly":!0}),this.hasValue()?y?.action==="initial-input-focus"&&{"aria-describedby":this.getElementId("live-region")}:{"aria-describedby":this.getElementId("placeholder")});return s?b.createElement(g,He({},x,{autoCapitalize:"none",autoComplete:"off",autoCorrect:"off",id:w,innerRef:this.getInputRef,isDisabled:i,isHidden:v,onBlur:this.onInputBlur,onChange:this.handleInputChange,onFocus:this.onInputFocus,spellCheck:"false",tabIndex:u,form:c,type:"text",value:l},C)):b.createElement(ere,He({id:w,innerRef:this.getInputRef,onBlur:this.onInputBlur,onChange:yd,onFocus:this.onInputFocus,disabled:i,tabIndex:u,inputMode:"none",form:c,value:""},C))}},{key:"renderPlaceholderOrValue",value:function(){var o=this,i=this.getComponents(),s=i.MultiValue,a=i.MultiValueContainer,l=i.MultiValueLabel,u=i.MultiValueRemove,c=i.SingleValue,d=i.Placeholder,f=this.commonProps,p=this.props,g=p.controlShouldRenderValue,m=p.isDisabled,v=p.isMulti,y=p.inputValue,x=p.placeholder,w=this.state,C=w.selectValue,S=w.focusedValue,R=w.isFocused;if(!this.hasValue()||!g)return y?null:b.createElement(d,He({},f,{key:"placeholder",isDisabled:m,isFocused:R,innerProps:{id:this.getElementId("placeholder")}}),x);if(v)return C.map(function(T,_){var $=T===S,A="".concat(o.getOptionLabel(T),"-").concat(o.getOptionValue(T));return b.createElement(s,He({},f,{components:{Container:a,Label:l,Remove:u},isFocused:$,isDisabled:m,key:A,index:_,removeProps:{onClick:function(){return o.removeValue(T)},onTouchEnd:function(){return o.removeValue(T)},onMouseDown:function(O){O.preventDefault()}},data:T}),o.formatOptionLabel(T,"value"))});if(y)return null;var I=C[0];return b.createElement(c,He({},f,{data:I,isDisabled:m}),this.formatOptionLabel(I,"value"))}},{key:"renderClearIndicator",value:function(){var o=this.getComponents(),i=o.ClearIndicator,s=this.commonProps,a=this.props,l=a.isDisabled,u=a.isLoading,c=this.state.isFocused;if(!this.isClearable()||!i||l||!this.hasValue()||u)return null;var d={onMouseDown:this.onClearIndicatorMouseDown,onTouchEnd:this.onClearIndicatorTouchEnd,"aria-hidden":"true"};return b.createElement(i,He({},s,{innerProps:d,isFocused:c}))}},{key:"renderLoadingIndicator",value:function(){var o=this.getComponents(),i=o.LoadingIndicator,s=this.commonProps,a=this.props,l=a.isDisabled,u=a.isLoading,c=this.state.isFocused;if(!i||!u)return null;var d={"aria-hidden":"true"};return b.createElement(i,He({},s,{innerProps:d,isDisabled:l,isFocused:c}))}},{key:"renderIndicatorSeparator",value:function(){var o=this.getComponents(),i=o.DropdownIndicator,s=o.IndicatorSeparator;if(!i||!s)return null;var a=this.commonProps,l=this.props.isDisabled,u=this.state.isFocused;return b.createElement(s,He({},a,{isDisabled:l,isFocused:u}))}},{key:"renderDropdownIndicator",value:function(){var o=this.getComponents(),i=o.DropdownIndicator;if(!i)return null;var s=this.commonProps,a=this.props.isDisabled,l=this.state.isFocused,u={onMouseDown:this.onDropdownIndicatorMouseDown,onTouchEnd:this.onDropdownIndicatorTouchEnd,"aria-hidden":"true"};return b.createElement(i,He({},s,{innerProps:u,isDisabled:a,isFocused:l}))}},{key:"renderMenu",value:function(){var o=this,i=this.getComponents(),s=i.Group,a=i.GroupHeading,l=i.Menu,u=i.MenuList,c=i.MenuPortal,d=i.LoadingMessage,f=i.NoOptionsMessage,p=i.Option,g=this.commonProps,m=this.state.focusedOption,v=this.props,y=v.captureMenuScroll,x=v.inputValue,w=v.isLoading,C=v.loadingMessage,S=v.minMenuHeight,R=v.maxMenuHeight,I=v.menuIsOpen,T=v.menuPlacement,_=v.menuPosition,$=v.menuPortalTarget,A=v.menuShouldBlockScroll,M=v.menuShouldScrollIntoView,O=v.noOptionsMessage,B=v.onMenuScrollToTop,j=v.onMenuScrollToBottom;if(!I)return null;var D=function(J,K){var U=J.type,oe=J.data,X=J.isDisabled,te=J.isSelected,Q=J.label,se=J.value,ae=m===oe,L=X?void 0:function(){return o.onOptionHover(oe)},Z=X?void 0:function(){return o.selectOption(oe)},k="".concat(o.getElementId("option"),"-").concat(K),ie={id:k,onClick:Z,onMouseMove:L,onMouseOver:L,tabIndex:-1,role:"option","aria-selected":o.state.isAppleDevice?void 0:te};return b.createElement(p,He({},g,{innerProps:ie,data:oe,isDisabled:X,isSelected:te,key:k,label:Q,type:U,value:se,isFocused:ae,innerRef:ae?o.getFocusedOptionRef:void 0}),o.formatOptionLabel(J.data,"menu"))},V;if(this.hasOptions())V=this.getCategorizedOptions().map(function(W){if(W.type==="group"){var J=W.data,K=W.options,U=W.index,oe="".concat(o.getElementId("group"),"-").concat(U),X="".concat(oe,"-heading");return b.createElement(s,He({},g,{key:oe,data:J,options:K,Heading:a,headingProps:{id:X,data:W.data},label:o.formatGroupLabel(W.data)}),W.options.map(function(te){return D(te,"".concat(U,"-").concat(te.index))}))}else if(W.type==="option")return D(W,"".concat(W.index))});else if(w){var G=C({inputValue:x});if(G===null)return null;V=b.createElement(d,g,G)}else{var z=O({inputValue:x});if(z===null)return null;V=b.createElement(f,g,z)}var H={minMenuHeight:S,maxMenuHeight:R,menuPlacement:T,menuPosition:_,menuShouldScrollIntoView:M},ne=b.createElement(Nte,He({},g,H),function(W){var J=W.ref,K=W.placerProps,U=K.placement,oe=K.maxHeight;return b.createElement(l,He({},g,H,{innerRef:J,innerProps:{onMouseDown:o.onMenuMouseDown,onMouseMove:o.onMenuMouseMove},isLoading:w,placement:U}),b.createElement(are,{captureEnabled:y,onTopArrive:B,onBottomArrive:j,lockEnabled:A},function(X){return b.createElement(u,He({},g,{innerRef:function(Q){o.getMenuListRef(Q),X(Q)},innerProps:{role:"listbox","aria-multiselectable":g.isMulti,id:o.getElementId("listbox")},isLoading:w,maxHeight:oe,focusedOption:m}),V)}))});return $||_==="fixed"?b.createElement(c,He({},g,{appendTo:$,controlElement:this.controlRef,menuPlacement:T,menuPosition:_}),ne):ne}},{key:"renderFormField",value:function(){var o=this,i=this.props,s=i.delimiter,a=i.isDisabled,l=i.isMulti,u=i.name,c=i.required,d=this.state.selectValue;if(c&&!this.hasValue()&&!a)return b.createElement(dre,{name:u,onFocus:this.onValueInputFocus});if(!(!u||a))if(l)if(s){var f=d.map(function(m){return o.getOptionValue(m)}).join(s);return b.createElement("input",{name:u,type:"hidden",value:f})}else{var p=d.length>0?d.map(function(m,v){return b.createElement("input",{key:"i-".concat(v),name:u,type:"hidden",value:o.getOptionValue(m)})}):b.createElement("input",{name:u,type:"hidden",value:""});return b.createElement("div",null,p)}else{var g=d[0]?this.getOptionValue(d[0]):"";return b.createElement("input",{name:u,type:"hidden",value:g})}}},{key:"renderLiveRegion",value:function(){var o=this.commonProps,i=this.state,s=i.ariaSelection,a=i.focusedOption,l=i.focusedValue,u=i.isFocused,c=i.selectValue,d=this.getFocusableOptions();return b.createElement(Yne,He({},o,{id:this.getElementId("live-region"),ariaSelection:s,focusedOption:a,focusedValue:l,isFocused:u,selectValue:c,focusableOptions:d,isAppleDevice:this.state.isAppleDevice}))}},{key:"render",value:function(){var o=this.getComponents(),i=o.Control,s=o.IndicatorsContainer,a=o.SelectContainer,l=o.ValueContainer,u=this.props,c=u.className,d=u.id,f=u.isDisabled,p=u.menuIsOpen,g=this.state.isFocused,m=this.commonProps=this.getCommonProps();return b.createElement(a,He({},m,{className:c,innerProps:{id:d,onKeyDown:this.onKeyDown},isDisabled:f,isFocused:g}),this.renderLiveRegion(),b.createElement(i,He({},m,{innerRef:this.getControlRef,innerProps:{onMouseDown:this.onControlMouseDown,onTouchEnd:this.onControlTouchEnd},isDisabled:f,isFocused:g,menuIsOpen:p}),b.createElement(l,He({},m,{isDisabled:f}),this.renderPlaceholderOrValue(),this.renderInput()),b.createElement(s,He({},m,{isDisabled:f}),this.renderClearIndicator(),this.renderLoadingIndicator(),this.renderIndicatorSeparator(),this.renderDropdownIndicator())),this.renderMenu(),this.renderFormField())}}],[{key:"getDerivedStateFromProps",value:function(o,i){var s=i.prevProps,a=i.clearFocusValueOnUpdate,l=i.inputIsHiddenAfterUpdate,u=i.ariaSelection,c=i.isFocused,d=i.prevWasFocused,f=i.instancePrefix,p=o.options,g=o.value,m=o.menuIsOpen,v=o.inputValue,y=o.isMulti,x=xd(g),w={};if(s&&(g!==s.value||p!==s.options||m!==s.menuIsOpen||v!==s.inputValue)){var C=m?Ire(o,x):[],S=m?PI(_c(o,x),"".concat(f,"-option")):[],R=a?Rre(i,x):null,I=Are(i,C),T=Um(S,I);w={selectValue:x,focusedOption:I,focusedOptionId:T,focusableOptionsWithIds:S,focusedValue:R,clearFocusValueOnUpdate:!1}}var _=l!=null&&o!==s?{inputIsHidden:l,inputIsHiddenAfterUpdate:void 0}:{},$=u,A=c&&d;return c&&!A&&($={value:ol(y,x,x[0]||null),options:x,action:"initial-input-focus"},A=!d),u?.action==="initial-input-focus"&&($=null),$e($e($e({},w),_),{},{prevProps:o,ariaSelection:$,prevWasFocused:A})}}]),n})(N.Component);yx.defaultProps=Ere;var Ore=N.forwardRef(function(e,t){var n=a2(e);return b.createElement(yx,He({ref:t},n))}),Nre=Ore,Pre=["allowCreateWhileLoading","createOptionPosition","formatCreateLabel","isValidNewOption","getNewOptionData","onCreateOption","options","onChange"],MI=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",n=arguments.length>1?arguments[1]:void 0,r=arguments.length>2?arguments[2]:void 0,o=String(t).toLowerCase(),i=String(r.getOptionValue(n)).toLowerCase(),s=String(r.getOptionLabel(n)).toLowerCase();return i===o||s===o},Ym={formatCreateLabel:function(t){return'Create "'.concat(t,'"')},isValidNewOption:function(t,n,r,o){return!(!t||n.some(function(i){return MI(t,i,o)})||r.some(function(i){return MI(t,i,o)}))},getNewOptionData:function(t,n){return{label:n,value:t,__isNew__:!0}}};function _re(e){var t=e.allowCreateWhileLoading,n=t===void 0?!1:t,r=e.createOptionPosition,o=r===void 0?"last":r,i=e.formatCreateLabel,s=i===void 0?Ym.formatCreateLabel:i,a=e.isValidNewOption,l=a===void 0?Ym.isValidNewOption:a,u=e.getNewOptionData,c=u===void 0?Ym.getNewOptionData:u,d=e.onCreateOption,f=e.options,p=f===void 0?[]:f,g=e.onChange,m=ho(e,Pre),v=m.getOptionValue,y=v===void 0?k2:v,x=m.getOptionLabel,w=x===void 0?D2:x,C=m.inputValue,S=m.isLoading,R=m.isMulti,I=m.value,T=m.name,_=N.useMemo(function(){return l(C,xd(I),p,{getOptionValue:y,getOptionLabel:w})?c(C,s(C)):void 0},[s,c,w,y,C,l,p,I]),$=N.useMemo(function(){return(n||!S)&&_?o==="first"?[_].concat(Zs(p)):[].concat(Zs(p),[_]):p},[n,o,S,_,p]),A=N.useCallback(function(M,O){if(O.action!=="select-option")return g(M,O);var B=Array.isArray(M)?M:[M];if(B[B.length-1]===_){if(d)d(C);else{var j=c(C,C),D={action:"create-option",name:T,option:j};g(ol(R,[].concat(Zs(xd(I)),[j]),j),D)}return}g(M,O)},[c,C,R,T,_,d,g,I]);return $e($e({},m),{},{options:$,onChange:A})}var Mre=N.forwardRef(function(e,t){var n=a2(e),r=_re(n);return b.createElement(yx,He({ref:t},r))}),Dre=Mre;const kre={control:({isFocused:e,isDisabled:t})=>F("ui:min-h-10! ui:w-full ui:rounded-md! ui:bg-segmentify-200 ui:px-0! ui:text-sm ui:border ui:border-border!",e&&!t&&Vi({variant:"isControlFocused"}),t&&Vi({variant:"isDisabled"})),option:({isFocused:e,isSelected:t,isDisabled:n})=>F(Vi({variant:"default"}),t&&Vi({variant:"isSelected"}),!t&&e&&Vi({variant:"isFocused"}),n&&Vi({variant:"isDisabled"})),multiValue:()=>F(Vi({variant:"multiSelected"})),multiValueLabel:()=>"ui:text-primary!",multiValueRemove:()=>"ui:text-primary!",placeholder:()=>"ui:text-segmentify-600"};function jre({label:e,name:t,options:n,value:r,onChange:o,onInputChange:i,placeholder:s,isClearable:a=!0,isSearchable:l=!0,isMulti:u=!0,isDisabled:c,description:d,className:f,isCreatable:p}){const g={"data-test-id":t,name:t,options:n,value:r,onChange:o,onInputChange:i,isClearable:a,isSearchable:l,isMulti:u,isDisabled:c,placeholder:s,classNames:kre};return h.jsxs("article",{children:[e&&h.jsx(gr,{className:"ui:mb-2 ui:block",children:e}),h.jsx("div",{className:F("field-select ui:w-full select-wrapper ui:rounded-md! ui:text-sm",f),children:p?h.jsx(Dre,{...g}):h.jsx(Nre,{...g})}),d&&h.jsx(If,{description:d})]})}function H2({...e}){return h.jsx(Xl,{"data-slot":"sheet",...e})}function Lre({...e}){return h.jsx(jd,{"data-slot":"sheet-trigger",...e})}function Fre({...e}){return h.jsx(ds,{"data-slot":"sheet-close",...e})}function Bre({...e}){return h.jsx(Zl,{"data-slot":"sheet-portal",...e})}function Vre({className:e,...t}){return h.jsx(Jl,{"data-slot":"sheet-overlay",className:F("ui:data-[state=open]:animate-in ui:data-[state=closed]:animate-out ui:data-[state=closed]:fade-out-0 ui:data-[state=open]:fade-in-0 ui:fixed ui:inset-0 ui:z-50 ui:bg-black/50",e),...t})}function W2({className:e,children:t,side:n="right",...r}){return h.jsxs(Bre,{children:[h.jsx(Vre,{}),h.jsxs(Kl,{"data-slot":"sheet-content",className:F("ui:bg-background ui:data-[state=open]:animate-in ui:data-[state=closed]:animate-out ui:fixed ui:z-50 ui:flex ui:flex-col ui:gap-4 ui:shadow-lg ui:transition ui:ease-in-out ui:data-[state=closed]:duration-300 ui:data-[state=open]:duration-500",n==="right"&&"ui:data-[state=closed]:slide-out-to-right ui:data-[state=open]:slide-in-from-right ui:inset-y-0 ui:right-0 ui:h-full ui:w-3/4 ui:border-l ui:sm:max-w-sm",n==="left"&&"ui:data-[state=closed]:slide-out-to-left ui:data-[state=open]:slide-in-from-left ui:inset-y-0 ui:left-0 ui:h-full ui:w-3/4 ui:border-r ui:sm:max-w-sm",n==="top"&&"ui:data-[state=closed]:slide-out-to-top ui:data-[state=open]:slide-in-from-top ui:inset-x-0 ui:top-0 ui:h-auto ui:border-b",n==="bottom"&&"ui:data-[state=closed]:slide-out-to-bottom ui:data-[state=open]:slide-in-from-bottom ui:inset-x-0 ui:bottom-0 ui:h-auto ui:border-t",e),...r,children:[t,h.jsxs(ds,{"data-testid":"sheet-close-icon",className:"ui:ring-offset-background ui:focus:ring-ring ui:data-[state=open]:bg-secondary ui:absolute ui:top-4 ui:right-4 ui:rounded-xs ui:opacity-70 ui:transition-opacity ui:hover:opacity-100 ui:focus:ring-2 ui:focus:ring-offset-2 ui:focus:outline-hidden ui:disabled:pointer-events-none",children:[h.jsx(_e.XIcon,{className:"ui:size-4"}),h.jsx("span",{className:"ui:sr-only",children:"Close"})]})]})]})}function z2({className:e,...t}){return h.jsx("div",{"data-slot":"sheet-header",className:F("ui:flex ui:flex-col ui:gap-1.5 ui:p-4",e),...t})}function $re({className:e,...t}){return h.jsx("div",{"data-slot":"sheet-footer",className:F("ui:mt-auto ui:flex ui:flex-col ui:gap-2 ui:p-4",e),...t})}function q2({className:e,...t}){return h.jsx(Ld,{"data-slot":"sheet-title",className:F("ui:text-foreground ui:font-semibold",e),...t})}function U2({className:e,...t}){return h.jsx(Fd,{"data-slot":"sheet-description",className:F("ui:text-muted-foreground ui:text-sm",e),...t})}const Xm=768;function Gre(){const[e,t]=b.useState();return b.useEffect(()=>{const n=window.matchMedia(`(max-width: ${Xm-1}px)`),r=()=>{t(window.innerWidth<Xm)};return n.addEventListener("change",r),t(window.innerWidth<Xm),()=>n.removeEventListener("change",r)},[]),!!e}function Rv({className:e,...t}){return h.jsx("div",{"data-slot":"skeleton",className:F("ui:bg-accent ui:animate-pulse ui:rounded-md ui:shrink-0",e),...t})}const Y2=b.createContext(null);function $f(){const e=b.useContext(Y2);if(!e)throw new Error("useSidebar must be used within a SidebarProvider.");return e}const Hre="sidebar_state",Wre=3600*24*7,zre="16rem",qre="18rem",Ure="3rem",Yre="b";function Xre({defaultOpen:e=!0,open:t,onOpenChange:n,className:r,style:o,children:i,...s}){const a=Gre(),[l,u]=b.useState(!1),[c,d]=b.useState(e),f=t??c,p=b.useCallback(y=>{const x=typeof y=="function"?y(f):y;n?n(x):d(x),document.cookie=`${Hre}=${x}; path=/; max-age=${Wre}`},[n,f]),g=b.useCallback(()=>a?u(y=>!y):p(y=>!y),[a,p,u]);b.useEffect(()=>{const y=x=>{x.key===Yre&&(x.metaKey||x.ctrlKey)&&(x.preventDefault(),g())};return window.addEventListener("keydown",y),()=>window.removeEventListener("keydown",y)},[g]);const m=f?"expanded":"collapsed",v=b.useMemo(()=>({state:m,open:f,setOpen:p,isMobile:a,openMobile:l,setOpenMobile:u,toggleSidebar:g}),[m,f,p,a,l,u,g]);return h.jsx(Y2.Provider,{value:v,children:h.jsx(ax,{delayDuration:0,children:h.jsx("div",{"data-slot":"sidebar-wrapper",style:{"--sidebar-width":zre,"--sidebar-width-icon":Ure,...o},className:F("ui:group/sidebar-wrapper ui:has-data-[variant=inset]:bg-sidebar ui:flex ui:min-h-svh ui:w-full",r),...s,children:i})})})}function Zre({side:e="left",variant:t="sidebar",collapsible:n="offcanvas",className:r,children:o,...i}){const{isMobile:s,state:a,openMobile:l,setOpenMobile:u}=$f();return n==="none"?h.jsx("div",{"data-slot":"sidebar",className:F("ui:bg-sidebar ui:text-sidebar-foreground ui:flex ui:h-full ui:w-(--sidebar-width) ui:flex-col",r),...i,children:o}):s?h.jsx(H2,{open:l,onOpenChange:u,...i,children:h.jsxs(W2,{"data-sidebar":"sidebar","data-slot":"sidebar","data-mobile":"true",className:"ui:bg-sidebar ui:text-sidebar-foreground ui:w-(--sidebar-width) ui:p-0 ui:[&>button]:hidden",style:{"--sidebar-width":qre},side:e,children:[h.jsxs(z2,{className:"ui:sr-only",children:[h.jsx(q2,{children:"Sidebar"}),h.jsx(U2,{children:"Displays the mobile sidebar."})]}),h.jsx("div",{className:"ui:flex ui:h-full ui:w-full ui:flex-col",children:o})]})}):h.jsxs("div",{className:"ui:group ui:peer ui:text-sidebar-foreground ui:hidden ui:md:block","data-state":a,"data-collapsible":a==="collapsed"?n:"","data-variant":t,"data-side":e,"data-slot":"sidebar",children:[h.jsx("div",{"data-slot":"sidebar-gap",className:F("ui:relative ui:w-(--sidebar-width) ui:bg-transparent ui:transition-[width] ui:duration-200 ui:ease-linear","ui:group-data-[collapsible=offcanvas]:w-0","ui:group-data-[side=right]:rotate-180",t==="floating"||t==="inset"?"ui:group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]":"ui:group-data-[collapsible=icon]:w-(--sidebar-width-icon)")}),h.jsx("div",{"data-slot":"sidebar-container",className:F("ui:fixed ui:inset-y-0 ui:z-10 ui:hidden ui:h-svh ui:w-(--sidebar-width) ui:transition-[left,right,width] ui:duration-200 ui:ease-linear ui:md:flex",e==="left"?"ui:left-0 ui:group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]":"ui:right-0 ui:group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]",t==="floating"||t==="inset"?"ui:p-2 ui:group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]":"ui:group-data-[collapsible=icon]:w-(--sidebar-width-icon) ui:group-data-[side=left]:border-r ui:group-data-[side=right]:border-l",r),...i,children:h.jsx("div",{"data-sidebar":"sidebar","data-slot":"sidebar-inner",className:"ui:bg-sidebar ui:group-data-[variant=floating]:border-sidebar-border ui:flex ui:h-full ui:w-full ui:flex-col ui:group-data-[variant=floating]:rounded-lg ui:group-data-[variant=floating]:border ui:group-data-[variant=floating]:shadow-sm",children:o})})]})}function Jre({className:e,onClick:t,...n}){const{toggleSidebar:r}=$f();return h.jsxs(on,{"data-sidebar":"trigger","data-slot":"sidebar-trigger",variant:"ghost",size:"icon",className:F("ui:size-7",e),onClick:o=>{t?.(o),r()},...n,children:[h.jsx(_e.PanelLeftIcon,{}),h.jsx("span",{className:"ui:sr-only",children:"Toggle Sidebar"})]})}function Kre({className:e,...t}){const{toggleSidebar:n}=$f();return h.jsx("button",{"data-sidebar":"rail","data-slot":"sidebar-rail","aria-label":"Toggle Sidebar",tabIndex:-1,onClick:n,title:"Toggle Sidebar",className:F("ui:hover:after:bg-sidebar-border ui:absolute ui:inset-y-0 ui:z-20 ui:hidden ui:w-4 ui:-translate-x-1/2 ui:transition-all ui:ease-linear ui:group-data-[side=left]:-right-4 ui:group-data-[side=right]:left-0 ui:after:absolute ui:after:inset-y-0 ui:after:left-1/2 ui:after:w-[2px] ui:sm:flex","ui:in-data-[side=left]:cursor-w-resize ui:in-data-[side=right]:cursor-e-resize","ui:[[data-side=left][data-state=collapsed]_&]:cursor-e-resize ui:[[data-side=right][data-state=collapsed]_&]:cursor-w-resize","ui:hover:group-data-[collapsible=offcanvas]:bg-sidebar ui:group-data-[collapsible=offcanvas]:translate-x-0 ui:group-data-[collapsible=offcanvas]:after:left-full","ui:[[data-side=left][data-collapsible=offcanvas]_&]:-right-2","ui:[[data-side=right][data-collapsible=offcanvas]_&]:-left-2",e),...t})}function Qre({className:e,...t}){return h.jsx("main",{"data-slot":"sidebar-inset",className:F("ui:bg-background ui:relative ui:flex ui:w-full ui:flex-1 ui:flex-col","ui:md:peer-data-[variant=inset]:m-2 ui:md:peer-data-[variant=inset]:ml-0 ui:md:peer-data-[variant=inset]:rounded-xl ui:md:peer-data-[variant=inset]:shadow-sm ui:md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ml-2",e),...t})}function eoe({className:e,...t}){return h.jsx(vu,{"data-slot":"sidebar-input","data-sidebar":"input",className:F("ui:bg-background ui:h-8 ui:w-full ui:shadow-none",e),...t})}function toe({className:e,...t}){return h.jsx("div",{"data-slot":"sidebar-header","data-sidebar":"header",className:F("ui:flex ui:flex-col ui:gap-2 ui:p-2",e),...t})}function noe({className:e,...t}){return h.jsx("div",{"data-slot":"sidebar-footer","data-sidebar":"footer",className:F("ui:flex ui:flex-col ui:gap-2 ui:p-2",e),...t})}function roe({className:e,...t}){return h.jsx(o2,{"data-slot":"sidebar-separator","data-sidebar":"separator",className:F("ui:bg-sidebar-border ui:mx-2 ui:w-auto",e),...t})}function ooe({className:e,...t}){return h.jsx("div",{"data-slot":"sidebar-content","data-sidebar":"content",className:F("ui:flex ui:min-h-0 ui:flex-1 ui:flex-col ui:gap-2 ui:overflow-auto ui:group-data-[collapsible=icon]:overflow-hidden",e),...t})}function ioe({className:e,...t}){return h.jsx("div",{"data-slot":"sidebar-group","data-sidebar":"group",className:F("ui:relative ui:flex ui:w-full ui:min-w-0 ui:flex-col ui:p-2",e),...t})}function soe({className:e,asChild:t=!1,...n}){const r=t?Bo:"div";return h.jsx(r,{"data-slot":"sidebar-group-label","data-sidebar":"group-label",className:F("ui:text-sidebar-foreground/70 ui:ring-sidebar-ring ui:flex ui:h-8 ui:shrink-0 ui:items-center ui:rounded-md ui:px-2 ui:text-xs ui:font-medium ui:outline-hidden ui:transition-[margin,opacity] ui:duration-200 ui:ease-linear ui:focus-visible:ring-2 ui:[&>svg]:size-4 ui:[&>svg]:shrink-0","ui:group-data-[collapsible=icon]:-mt-8 ui:group-data-[collapsible=icon]:opacity-0",e),...n})}function aoe({className:e,asChild:t=!1,...n}){const r=t?Bo:"button";return h.jsx(r,{"data-slot":"sidebar-group-action","data-sidebar":"group-action",className:F("ui:text-sidebar-foreground ui:ring-sidebar-ring ui:hover:bg-sidebar-accent ui:hover:text-sidebar-accent-foreground ui:absolute ui:top-3.5 ui:right-3 ui:flex ui:aspect-square ui:w-5 ui:items-center ui:justify-center ui:rounded-md ui:p-0 ui:outline-hidden ui:transition-transform ui:focus-visible:ring-2 ui:[&>svg]:size-4 ui:[&>svg]:shrink-0","ui:after:absolute ui:after:-inset-2 ui:md:after:hidden","ui:group-data-[collapsible=icon]:hidden",e),...n})}function loe({className:e,...t}){return h.jsx("div",{"data-slot":"sidebar-group-content","data-sidebar":"group-content",className:F("ui:w-full ui:text-sm",e),...t})}function uoe({className:e,...t}){return h.jsx("ul",{"data-slot":"sidebar-menu","data-sidebar":"menu",className:F("ui:flex ui:w-full ui:min-w-0 ui:flex-col ui:gap-1",e),...t})}function coe({className:e,...t}){return h.jsx("li",{"data-slot":"sidebar-menu-item","data-sidebar":"menu-item",className:F("ui:group/menu-item ui:relative",e),...t})}const doe=Si("ui:peer/menu-button ui:flex ui:w-full ui:items-center ui:gap-2 ui:overflow-hidden ui:rounded-md ui:p-2 ui:text-left ui:text-sm ui:outline-hidden ui:ring-sidebar-ring ui:transition-[width,height,padding] ui:hover:bg-sidebar-accent ui:hover:text-sidebar-accent-foreground ui:focus-visible:ring-2 ui:active:bg-sidebar-accent ui:active:text-sidebar-accent-foreground ui:disabled:pointer-events-none ui:disabled:opacity-50 ui:group-has-data-[sidebar=menu-action]/menu-item:pr-8 ui:aria-disabled:pointer-events-none ui:aria-disabled:opacity-50 ui:data-[active=true]:bg-sidebar-accent ui:data-[active=true]:font-medium ui:data-[active=true]:text-sidebar-accent-foreground ui:data-[state=open]:hover:bg-sidebar-accent ui:data-[state=open]:hover:text-sidebar-accent-foreground ui:group-data-[collapsible=icon]:size-8! ui:group-data-[collapsible=icon]:p-2! ui:[&>span:last-child]:truncate ui:[&>svg]:size-4 ui:[&>svg]:shrink-0",{variants:{variant:{default:"ui:hover:bg-sidebar-accent ui:hover:text-sidebar-accent-foreground",outline:"ui:bg-background ui:shadow-[0_0_0_1px_hsl(var(--sidebar-border))] ui:hover:bg-sidebar-accent ui:hover:text-sidebar-accent-foreground ui:hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]"},size:{default:"ui:h-8 ui:text-sm",sm:"ui:h-7 ui:text-xs",lg:"ui:h-12 ui:text-sm ui:group-data-[collapsible=icon]:p-0!"}},defaultVariants:{variant:"default",size:"default"}});function foe({asChild:e=!1,isActive:t=!1,variant:n="default",size:r="default",tooltip:o,className:i,...s}){const a=e?Bo:"button",{isMobile:l,state:u}=$f(),c=h.jsx(a,{"data-slot":"sidebar-menu-button","data-sidebar":"menu-button","data-size":r,"data-active":t,className:F(doe({variant:n,size:r}),i),...s});return o?(typeof o=="string"&&(o={children:o}),h.jsxs(lx,{children:[h.jsx(ux,{asChild:!0,children:c}),h.jsx(jf,{side:"right",align:"center",hidden:u!=="collapsed"||l,...o})]})):c}function poe({className:e,asChild:t=!1,showOnHover:n=!1,...r}){const o=t?Bo:"button";return h.jsx(o,{"data-slot":"sidebar-menu-action","data-sidebar":"menu-action",className:F("ui:text-sidebar-foreground ui:ring-sidebar-ring ui:hover:bg-sidebar-accent ui:hover:text-sidebar-accent-foreground ui:peer-hover/menu-button:text-sidebar-accent-foreground ui:absolute ui:top-1.5 ui:right-1 ui:flex ui:aspect-square ui:w-5 ui:items-center ui:justify-center ui:rounded-md ui:p-0 ui:outline-hidden ui:transition-transform ui:focus-visible:ring-2 ui:[&>svg]:size-4 ui:[&>svg]:shrink-0","ui:after:absolute ui:after:-inset-2 ui:md:after:hidden","ui:peer-data-[size=sm]/menu-button:top-1","ui:peer-data-[size=default]/menu-button:top-1.5","ui:peer-data-[size=lg]/menu-button:top-2.5","ui:group-data-[collapsible=icon]:hidden",n&&"ui:peer-data-[active=true]/menu-button:text-sidebar-accent-foreground ui:group-focus-within/menu-item:opacity-100 ui:group-hover/menu-item:opacity-100 ui:data-[state=open]:opacity-100 ui:md:opacity-0",e),...r})}function hoe({className:e,...t}){return h.jsx("div",{"data-slot":"sidebar-menu-badge","data-sidebar":"menu-badge",className:F("ui:text-sidebar-foreground ui:pointer-events-none ui:absolute ui:right-1 ui:flex ui:h-5 ui:min-w-5 ui:items-center ui:justify-center ui:rounded-md ui:px-1 ui:text-xs ui:font-medium ui:tabular-nums ui:select-none","ui:peer-hover/menu-button:text-sidebar-accent-foreground ui:peer-data-[active=true]/menu-button:text-sidebar-accent-foreground","ui:peer-data-[size=sm]/menu-button:top-1","ui:peer-data-[size=default]/menu-button:top-1.5","ui:peer-data-[size=lg]/menu-button:top-2.5","ui:group-data-[collapsible=icon]:hidden",e),...t})}function goe({className:e,showIcon:t=!1,...n}){const[r,o]=b.useState("80%");return b.useEffect(()=>{o(`${Math.floor(Math.random()*40)+50}%`)},[]),h.jsxs("div",{"data-slot":"sidebar-menu-skeleton","data-sidebar":"menu-skeleton",className:F("ui:flex ui:h-8 ui:items-center ui:gap-2 ui:rounded-md ui:px-2",e),...n,children:[t&&h.jsx(Rv,{className:"ui:size-4 ui:rounded-md","data-sidebar":"menu-skeleton-icon"}),h.jsx(Rv,{className:"ui:h-4 ui:max-w-(--skeleton-width) ui:flex-1","data-sidebar":"menu-skeleton-text",style:{"--skeleton-width":r}})]})}function moe({className:e,...t}){return h.jsx("ul",{"data-slot":"sidebar-menu-sub","data-sidebar":"menu-sub",className:F("ui:border-sidebar-border ui:mx-3.5 ui:flex ui:min-w-0 ui:translate-x-px ui:flex-col ui:gap-1 ui:border-l ui:px-2.5 ui:py-0.5","ui:group-data-[collapsible=icon]:hidden",e),...t})}function boe({className:e,...t}){return h.jsx("li",{"data-slot":"sidebar-menu-sub-item","data-sidebar":"menu-sub-item",className:F("ui:group/menu-sub-item ui:relative",e),...t})}function voe({asChild:e=!1,size:t="md",isActive:n=!1,className:r,...o}){const i=e?Bo:"a";return h.jsx(i,{"data-slot":"sidebar-menu-sub-button","data-sidebar":"menu-sub-button","data-size":t,"data-active":n,className:F("ui:text-sidebar-foreground ui:ring-sidebar-ring ui:hover:bg-sidebar-accent ui:hover:text-sidebar-accent-foreground ui:active:bg-sidebar-accent ui:active:text-sidebar-accent-foreground ui:[&>svg]:text-sidebar-accent-foreground ui:flex ui:h-7 ui:min-w-0 ui:-translate-x-px ui:items-center ui:gap-2 ui:overflow-hidden ui:rounded-md ui:px-2 ui:outline-hidden ui:focus-visible:ring-2 ui:disabled:pointer-events-none ui:disabled:opacity-50 ui:aria-disabled:pointer-events-none ui:aria-disabled:opacity-50 ui:[&>span:last-child]:truncate ui:[&>svg]:size-4 ui:[&>svg]:shrink-0","ui:data-[active=true]:bg-sidebar-accent ui:data-[active=true]:text-sidebar-accent-foreground",t==="sm"&&"ui:text-xs",t==="md"&&"ui:text-sm","ui:group-data-[collapsible=icon]:hidden",r),...o})}var yoe=(e,t,n,r,o,i,s,a)=>{let l=document.documentElement,u=["light","dark"];function c(p){(Array.isArray(e)?e:[e]).forEach(g=>{let m=g==="class",v=m&&i?o.map(y=>i[y]||y):o;m?(l.classList.remove(...v),l.classList.add(i&&i[p]?i[p]:p)):l.setAttribute(g,p)}),d(p)}function d(p){a&&u.includes(p)&&(l.style.colorScheme=p)}function f(){return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}if(r)c(r);else try{let p=localStorage.getItem(t)||n,g=s&&p==="system"?f():p;c(g)}catch{}},xoe=b.createContext(void 0),woe={setTheme:e=>{},themes:[]},Coe=()=>{var e;return(e=b.useContext(xoe))!=null?e:woe};b.memo(({forcedTheme:e,storageKey:t,attribute:n,enableSystem:r,enableColorScheme:o,defaultTheme:i,value:s,themes:a,nonce:l,scriptProps:u})=>{let c=JSON.stringify([n,t,i,e,a,s,r,o]).slice(1,-1);return b.createElement("script",{...u,suppressHydrationWarning:!0,nonce:typeof window>"u"?l:"",dangerouslySetInnerHTML:{__html:`(${yoe.toString()})(${c})`}})});const Soe=({...e})=>{const{theme:t="system"}=Coe();return h.jsx(Jv.Toaster,{theme:t,className:"ui:toaster ui:group",icons:{success:h.jsx(_e.CircleCheckIcon,{className:"ui:size-4"}),info:h.jsx(_e.InfoIcon,{className:"ui:size-4"}),warning:h.jsx(_e.TriangleAlertIcon,{className:"ui:size-4"}),error:h.jsx(_e.OctagonXIcon,{className:"ui:size-4"}),loading:h.jsx(_e.Loader2Icon,{className:"ui:size-4 ui:animate-spin"})},style:{"--normal-bg":"var(--ui-popover)","--normal-text":"var(--ui-popover-foreground)","--normal-border":"var(--ui-border)","--border-radius":"var(--ui-radius)"},...e})};function Eoe({title:e,containerClassName:t,className:n,...r}){return h.jsx("section",{className:F(t),children:h.jsxs("div",{className:"ui:flex ui:gap-1 ui:items-center",children:[h.jsx(_e.Loader2Icon,{role:"status","aria-label":"Loading",className:F("ui:size-4 ui:animate-spin",n),...r}),e&&h.jsx("span",{children:e})]})})}function Ioe({className:e,...t}){return h.jsx(_H,{"data-slot":"tabs",className:F("ui:flex ui:flex-col ui:gap-2",e),...t})}function Roe({className:e,...t}){return h.jsx(MH,{"data-slot":"tabs-list",className:F("ui:bg-white ui:text-muted-foreground ui:inline-flex ui:gap-2 ui:h-9 ui:w-fit ui:items-center ui:justify-center ui:rounded-lg ui:px-2",e),...t})}function Aoe({className:e,...t}){return h.jsx(DH,{"data-slot":"tabs-trigger",className:F("ui:bg-transparent ui:data-[state=active]:bg-segmentify-200 ui:dark:data-[state=active]:text-foreground ui:focus-visible:border-ring ui:focus-visible:ring-ring/50 ui:focus-visible:outline-ring ui:dark:data-[state=active]:border-input ui:dark:data-[state=active]:bg-input/30 ui:text-foreground ui:data-[state=active]:text-primary ui:dark:text-muted-foreground ui:inline-flex ui:h-7 ui:flex-1 ui:items-center ui:justify-center ui:gap-1.5 ui:rounded-md ui:border ui:border-transparent ui:px-4 ui:py-1 ui:text-sm ui:font-medium ui:whitespace-nowrap ui:transition-[color,box-shadow] ui:focus-visible:ring-[3px] ui:focus-visible:outline-1 ui:disabled:pointer-events-none ui:disabled:opacity-50 ui:data-[state=active]:shadow-sm ui:[&_svg]:pointer-events-none ui:[&_svg]:shrink-0 ui:[&_svg:not([class*='size-'])]:size-4","ui:hover:bg-segmentify-200 ui:hover:text-primary ui:cursor-pointer ui:transition-all ui:duration-200",e),...t})}function Toe({className:e,...t}){return h.jsx(kH,{"data-slot":"tabs-content",className:F("ui:flex-1 ui:outline-none",e),...t})}function X2({className:e,...t}){return h.jsx("div",{"data-slot":"table-container",className:"ui:relative ui:w-full ui:overflow-x-auto",children:h.jsx("table",{"data-slot":"table",className:F("ui:w-full ui:caption-bottom ui:text-sm",e),...t})})}function Z2({className:e,...t}){return h.jsx("thead",{"data-slot":"table-header",className:F("ui:[&_tr]:border-b",e),...t})}function J2({className:e,...t}){return h.jsx("tbody",{"data-slot":"table-body",className:F("ui:[&_tr:last-child]:border-0",e),...t})}function Ooe({className:e,...t}){return h.jsx("tfoot",{"data-slot":"table-footer",className:F("ui:bg-muted/50 ui:border-t ui:font-medium ui:[&>tr]:last:border-b-0",e),...t})}function il({className:e,...t}){return h.jsx("tr",{"data-slot":"table-row",className:F("ui:hover:bg-muted/50 ui:data-[state=selected]:bg-muted ui:border-b ui:transition-colors",e),...t})}function K2({className:e,...t}){return h.jsx("th",{"data-slot":"table-head",className:F("ui:text-foreground ui:h-10 ui:px-2 ui:text-left ui:align-middle ui:font-medium ui:whitespace-nowrap ui:*:[[role=checkbox]]:translate-y-[2px]",e),...t})}function Mc({className:e,...t}){return h.jsx("td",{"data-slot":"table-cell",className:F("ui:px-2 ui:py-7 ui:align-middle ui:whitespace-nowrap ui:*:[[role=checkbox]]:translate-y-[2px]",e),...t})}function Noe({className:e,...t}){return h.jsx("caption",{"data-slot":"table-caption",className:F("ui:text-muted-foreground ui:mt-4 ui:text-sm",e),...t})}const Av=[{bg:"ui:bg-violet-600/10",text:"ui:text-violet-600"},{bg:"ui:bg-blue-600/10",text:"ui:text-blue-600"},{bg:"ui:bg-emerald-600/10",text:"ui:text-emerald-600"},{bg:"ui:bg-amber-600/10",text:"ui:text-amber-600"},{bg:"ui:bg-rose-600/10",text:"ui:text-rose-600"},{bg:"ui:bg-cyan-600/10",text:"ui:text-cyan-600"},{bg:"ui:bg-pink-600/10",text:"ui:text-pink-600"},{bg:"ui:bg-indigo-600/10",text:"ui:text-indigo-600"},{bg:"ui:bg-teal-600/10",text:"ui:text-teal-600"},{bg:"ui:bg-orange-600/10",text:"ui:text-orange-600"}],Poe=e=>Array.from({length:e},()=>Math.floor(Math.random()*Av.length)),_oe=({items:e,header:t,className:n,onItemClick:r,dateLocale:o})=>{const[i]=N.useState(()=>Poe(e.length));return h.jsxs("div",{className:F("ui:w-full",n),children:[t&&h.jsx("div",{className:"ui:mb-4 ui:text-sm ui:text-muted-foreground",children:t}),h.jsx("div",{className:"ui:relative",children:e.map((s,a)=>{const{iconConfig:l,title:u,description:c,timestamp:d,tags:f,topRightSlot:p,bottomRightSlot:g}=s,m=l.icon,v=i[a]??a%Av.length,y=Av[v],x=l.bg??y.bg,w=l.text??y.text,C=!!r;return h.jsxs("div",{className:"ui:relative ui:flex ui:gap-4 ui:pb-6 ui:last:pb-0",children:[a<e.length-1&&h.jsx("div",{className:"ui:absolute ui:left-5 ui:top-11 ui:bottom-0 ui:w-0.5 ui:bg-border/60"}),h.jsx("div",{className:"ui:relative ui:z-10 ui:size-11 ui:shrink-0 ui:border ui:border-zinc-50 ui:p-1 ui:rounded-full ui:shadow-md",children:h.jsx("div",{className:F("ui:size-full ui:flex ui:items-center ui:justify-center ui:rounded-full",x),children:h.jsx(m,{className:F("ui:size-4",w)})})}),h.jsxs("div",{role:C?"button":void 0,tabIndex:C?0:void 0,onClick:C?()=>r(s,a):void 0,onKeyDown:C?S=>S.key==="Enter"&&r(s,a):void 0,className:F("ui:relative ui:flex ui:flex-1 ui:items-start ui:justify-between ui:gap-4 ui:rounded-lg ui:border ui:bg-background ui:p-4 ui:flex-col ui:md:flex-row",C&&"ui:hover:shadow-sm ui:transition-shadow ui:duration-300 ui:cursor-pointer"),children:[h.jsxs("div",{className:"ui:space-y-1",children:[h.jsx("h3",{className:"ui:text-sm",children:u}),h.jsx("p",{className:"ui:text-sm ui:text-muted-foreground",children:c}),f&&h.jsx("div",{className:"ui:flex ui:items-center ui:gap-1.5 ui:pt-1 ui:text-xs ui:text-muted-foreground",children:f.map(S=>h.jsx(Uy,{variant:"outline",className:"ui:shrink-0",children:S},S))}),h.jsxs("div",{className:"ui:flex ui:items-center ui:gap-1.5 ui:pt-1 ui:text-xs ui:text-muted-foreground",children:[h.jsx(_e.Clock,{className:"ui:size-3.5"}),h.jsx("span",{children:Ws(new Date(d),void 0,{locale:o})})]})]}),p&&h.jsx("div",{className:"ui:shrink-0",children:p}),g&&h.jsx("div",{className:"ui:absolute ui:bottom-4 ui:right-4 ui:shrink-0",children:g})]})]},a)})})]})};var Q2=typeof global=="object"&&global&&global.Object===Object&&global,Moe=typeof self=="object"&&self&&self.Object===Object&&self,go=Q2||Moe||Function("return this")(),pi=go.Symbol,ej=Object.prototype,Doe=ej.hasOwnProperty,koe=ej.toString,Ua=pi?pi.toStringTag:void 0;function joe(e){var t=Doe.call(e,Ua),n=e[Ua];try{e[Ua]=void 0;var r=!0}catch{}var o=koe.call(e);return r&&(t?e[Ua]=n:delete e[Ua]),o}var Loe=Object.prototype,Foe=Loe.toString;function Boe(e){return Foe.call(e)}var Voe="[object Null]",$oe="[object Undefined]",DI=pi?pi.toStringTag:void 0;function wa(e){return e==null?e===void 0?$oe:Voe:DI&&DI in Object(e)?joe(e):Boe(e)}function ko(e){return e!=null&&typeof e=="object"}var os=Array.isArray;function Ai(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}function tj(e){return e}var Goe="[object AsyncFunction]",Hoe="[object Function]",Woe="[object GeneratorFunction]",zoe="[object Proxy]";function xx(e){if(!Ai(e))return!1;var t=wa(e);return t==Hoe||t==Woe||t==Goe||t==zoe}var Zm=go["__core-js_shared__"],kI=(function(){var e=/[^.]+$/.exec(Zm&&Zm.keys&&Zm.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""})();function qoe(e){return!!kI&&kI in e}var Uoe=Function.prototype,Yoe=Uoe.toString;function vs(e){if(e!=null){try{return Yoe.call(e)}catch{}try{return e+""}catch{}}return""}var Xoe=/[\\^$.*+?()[\]{}|]/g,Zoe=/^\[object .+?Constructor\]$/,Joe=Function.prototype,Koe=Object.prototype,Qoe=Joe.toString,eie=Koe.hasOwnProperty,tie=RegExp("^"+Qoe.call(eie).replace(Xoe,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function nie(e){if(!Ai(e)||qoe(e))return!1;var t=xx(e)?tie:Zoe;return t.test(vs(e))}function rie(e,t){return e?.[t]}function ys(e,t){var n=rie(e,t);return nie(n)?n:void 0}var Tv=ys(go,"WeakMap"),jI=Object.create,oie=(function(){function e(){}return function(t){if(!Ai(t))return{};if(jI)return jI(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}})();function iie(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function sie(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}var aie=800,lie=16,uie=Date.now;function cie(e){var t=0,n=0;return function(){var r=uie(),o=lie-(r-n);if(n=r,o>0){if(++t>=aie)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function die(e){return function(){return e}}var Sd=(function(){try{var e=ys(Object,"defineProperty");return e({},"",{}),e}catch{}})(),fie=Sd?function(e,t){return Sd(e,"toString",{configurable:!0,enumerable:!1,value:die(t),writable:!0})}:tj,pie=cie(fie);function hie(e,t){for(var n=-1,r=e==null?0:e.length;++n<r&&t(e[n],n,e)!==!1;);return e}var gie=9007199254740991,mie=/^(?:0|[1-9]\d*)$/;function nj(e,t){var n=typeof e;return t=t??gie,!!t&&(n=="number"||n!="symbol"&&mie.test(e))&&e>-1&&e%1==0&&e<t}function wx(e,t,n){t=="__proto__"&&Sd?Sd(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function wu(e,t){return e===t||e!==e&&t!==t}var bie=Object.prototype,vie=bie.hasOwnProperty;function rj(e,t,n){var r=e[t];(!(vie.call(e,t)&&wu(r,n))||n===void 0&&!(t in e))&&wx(e,t,n)}function yie(e,t,n,r){var o=!n;n||(n={});for(var i=-1,s=t.length;++i<s;){var a=t[i],l=void 0;l===void 0&&(l=e[a]),o?wx(n,a,l):rj(n,a,l)}return n}var LI=Math.max;function xie(e,t,n){return t=LI(t===void 0?e.length-1:t,0),function(){for(var r=arguments,o=-1,i=LI(r.length-t,0),s=Array(i);++o<i;)s[o]=r[t+o];o=-1;for(var a=Array(t+1);++o<t;)a[o]=r[o];return a[t]=n(s),iie(e,this,a)}}function wie(e,t){return pie(xie(e,t,tj),e+"")}var Cie=9007199254740991;function oj(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=Cie}function Gf(e){return e!=null&&oj(e.length)&&!xx(e)}function Sie(e,t,n){if(!Ai(n))return!1;var r=typeof t;return(r=="number"?Gf(n)&&nj(t,n.length):r=="string"&&t in n)?wu(n[t],e):!1}function Eie(e){return wie(function(t,n){var r=-1,o=n.length,i=o>1?n[o-1]:void 0,s=o>2?n[2]:void 0;for(i=e.length>3&&typeof i=="function"?(o--,i):void 0,s&&Sie(n[0],n[1],s)&&(i=o<3?void 0:i,o=1),t=Object(t);++r<o;){var a=n[r];a&&e(t,a,r,i)}return t})}var Iie=Object.prototype;function Cx(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||Iie;return e===n}function Rie(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}var Aie="[object Arguments]";function FI(e){return ko(e)&&wa(e)==Aie}var ij=Object.prototype,Tie=ij.hasOwnProperty,Oie=ij.propertyIsEnumerable,Ov=FI((function(){return arguments})())?FI:function(e){return ko(e)&&Tie.call(e,"callee")&&!Oie.call(e,"callee")};function Nie(){return!1}var sj=typeof exports=="object"&&exports&&!exports.nodeType&&exports,BI=sj&&typeof module=="object"&&module&&!module.nodeType&&module,Pie=BI&&BI.exports===sj,VI=Pie?go.Buffer:void 0,_ie=VI?VI.isBuffer:void 0,Bl=_ie||Nie,Mie="[object Arguments]",Die="[object Array]",kie="[object Boolean]",jie="[object Date]",Lie="[object Error]",Fie="[object Function]",Bie="[object Map]",Vie="[object Number]",$ie="[object Object]",Gie="[object RegExp]",Hie="[object Set]",Wie="[object String]",zie="[object WeakMap]",qie="[object ArrayBuffer]",Uie="[object DataView]",Yie="[object Float32Array]",Xie="[object Float64Array]",Zie="[object Int8Array]",Jie="[object Int16Array]",Kie="[object Int32Array]",Qie="[object Uint8Array]",ese="[object Uint8ClampedArray]",tse="[object Uint16Array]",nse="[object Uint32Array]",At={};At[Yie]=At[Xie]=At[Zie]=At[Jie]=At[Kie]=At[Qie]=At[ese]=At[tse]=At[nse]=!0;At[Mie]=At[Die]=At[qie]=At[kie]=At[Uie]=At[jie]=At[Lie]=At[Fie]=At[Bie]=At[Vie]=At[$ie]=At[Gie]=At[Hie]=At[Wie]=At[zie]=!1;function rse(e){return ko(e)&&oj(e.length)&&!!At[wa(e)]}function Sx(e){return function(t){return e(t)}}var aj=typeof exports=="object"&&exports&&!exports.nodeType&&exports,ml=aj&&typeof module=="object"&&module&&!module.nodeType&&module,ose=ml&&ml.exports===aj,Jm=ose&&Q2.process,da=(function(){try{var e=ml&&ml.require&&ml.require("util").types;return e||Jm&&Jm.binding&&Jm.binding("util")}catch{}})(),$I=da&&da.isTypedArray,Ex=$I?Sx($I):rse,ise=Object.prototype,sse=ise.hasOwnProperty;function lj(e,t){var n=os(e),r=!n&&Ov(e),o=!n&&!r&&Bl(e),i=!n&&!r&&!o&&Ex(e),s=n||r||o||i,a=s?Rie(e.length,String):[],l=a.length;for(var u in e)(t||sse.call(e,u))&&!(s&&(u=="length"||o&&(u=="offset"||u=="parent")||i&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||nj(u,l)))&&a.push(u);return a}function uj(e,t){return function(n){return e(t(n))}}var ase=uj(Object.keys,Object),lse=Object.prototype,use=lse.hasOwnProperty;function cse(e){if(!Cx(e))return ase(e);var t=[];for(var n in Object(e))use.call(e,n)&&n!="constructor"&&t.push(n);return t}function dse(e){return Gf(e)?lj(e):cse(e)}function fse(e){var t=[];if(e!=null)for(var n in Object(e))t.push(n);return t}var pse=Object.prototype,hse=pse.hasOwnProperty;function gse(e){if(!Ai(e))return fse(e);var t=Cx(e),n=[];for(var r in e)r=="constructor"&&(t||!hse.call(e,r))||n.push(r);return n}function cj(e){return Gf(e)?lj(e,!0):gse(e)}var Vl=ys(Object,"create");function mse(){this.__data__=Vl?Vl(null):{},this.size=0}function bse(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var vse="__lodash_hash_undefined__",yse=Object.prototype,xse=yse.hasOwnProperty;function wse(e){var t=this.__data__;if(Vl){var n=t[e];return n===vse?void 0:n}return xse.call(t,e)?t[e]:void 0}var Cse=Object.prototype,Sse=Cse.hasOwnProperty;function Ese(e){var t=this.__data__;return Vl?t[e]!==void 0:Sse.call(t,e)}var Ise="__lodash_hash_undefined__";function Rse(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=Vl&&t===void 0?Ise:t,this}function is(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}is.prototype.clear=mse;is.prototype.delete=bse;is.prototype.get=wse;is.prototype.has=Ese;is.prototype.set=Rse;function Ase(){this.__data__=[],this.size=0}function Hf(e,t){for(var n=e.length;n--;)if(wu(e[n][0],t))return n;return-1}var Tse=Array.prototype,Ose=Tse.splice;function Nse(e){var t=this.__data__,n=Hf(t,e);if(n<0)return!1;var r=t.length-1;return n==r?t.pop():Ose.call(t,n,1),--this.size,!0}function Pse(e){var t=this.__data__,n=Hf(t,e);return n<0?void 0:t[n][1]}function _se(e){return Hf(this.__data__,e)>-1}function Mse(e,t){var n=this.__data__,r=Hf(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}function Vo(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Vo.prototype.clear=Ase;Vo.prototype.delete=Nse;Vo.prototype.get=Pse;Vo.prototype.has=_se;Vo.prototype.set=Mse;var $l=ys(go,"Map");function Dse(){this.size=0,this.__data__={hash:new is,map:new($l||Vo),string:new is}}function kse(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function Wf(e,t){var n=e.__data__;return kse(t)?n[typeof t=="string"?"string":"hash"]:n.map}function jse(e){var t=Wf(this,e).delete(e);return this.size-=t?1:0,t}function Lse(e){return Wf(this,e).get(e)}function Fse(e){return Wf(this,e).has(e)}function Bse(e,t){var n=Wf(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}function xs(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}xs.prototype.clear=Dse;xs.prototype.delete=jse;xs.prototype.get=Lse;xs.prototype.has=Fse;xs.prototype.set=Bse;function Vse(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e}var dj=uj(Object.getPrototypeOf,Object),$se="[object Object]",Gse=Function.prototype,Hse=Object.prototype,fj=Gse.toString,Wse=Hse.hasOwnProperty,zse=fj.call(Object);function qse(e){if(!ko(e)||wa(e)!=$se)return!1;var t=dj(e);if(t===null)return!0;var n=Wse.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&fj.call(n)==zse}function Use(){this.__data__=new Vo,this.size=0}function Yse(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}function Xse(e){return this.__data__.get(e)}function Zse(e){return this.__data__.has(e)}var Jse=200;function Kse(e,t){var n=this.__data__;if(n instanceof Vo){var r=n.__data__;if(!$l||r.length<Jse-1)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new xs(r)}return n.set(e,t),this.size=n.size,this}function to(e){var t=this.__data__=new Vo(e);this.size=t.size}to.prototype.clear=Use;to.prototype.delete=Yse;to.prototype.get=Xse;to.prototype.has=Zse;to.prototype.set=Kse;var pj=typeof exports=="object"&&exports&&!exports.nodeType&&exports,GI=pj&&typeof module=="object"&&module&&!module.nodeType&&module,Qse=GI&&GI.exports===pj,HI=Qse?go.Buffer:void 0,WI=HI?HI.allocUnsafe:void 0;function hj(e,t){if(t)return e.slice();var n=e.length,r=WI?WI(n):new e.constructor(n);return e.copy(r),r}function eae(e,t){for(var n=-1,r=e==null?0:e.length,o=0,i=[];++n<r;){var s=e[n];t(s,n,e)&&(i[o++]=s)}return i}function tae(){return[]}var nae=Object.prototype,rae=nae.propertyIsEnumerable,zI=Object.getOwnPropertySymbols,oae=zI?function(e){return e==null?[]:(e=Object(e),eae(zI(e),function(t){return rae.call(e,t)}))}:tae;function iae(e,t,n){var r=t(e);return os(e)?r:Vse(r,n(e))}function Nv(e){return iae(e,dse,oae)}var Pv=ys(go,"DataView"),_v=ys(go,"Promise"),Mv=ys(go,"Set"),qI="[object Map]",sae="[object Object]",UI="[object Promise]",YI="[object Set]",XI="[object WeakMap]",ZI="[object DataView]",aae=vs(Pv),lae=vs($l),uae=vs(_v),cae=vs(Mv),dae=vs(Tv),Ir=wa;(Pv&&Ir(new Pv(new ArrayBuffer(1)))!=ZI||$l&&Ir(new $l)!=qI||_v&&Ir(_v.resolve())!=UI||Mv&&Ir(new Mv)!=YI||Tv&&Ir(new Tv)!=XI)&&(Ir=function(e){var t=wa(e),n=t==sae?e.constructor:void 0,r=n?vs(n):"";if(r)switch(r){case aae:return ZI;case lae:return qI;case uae:return UI;case cae:return YI;case dae:return XI}return t});var fae=Object.prototype,pae=fae.hasOwnProperty;function hae(e){var t=e.length,n=new e.constructor(t);return t&&typeof e[0]=="string"&&pae.call(e,"index")&&(n.index=e.index,n.input=e.input),n}var Ed=go.Uint8Array;function Ix(e){var t=new e.constructor(e.byteLength);return new Ed(t).set(new Ed(e)),t}function gae(e,t){var n=Ix(e.buffer);return new e.constructor(n,e.byteOffset,e.byteLength)}var mae=/\w*$/;function bae(e){var t=new e.constructor(e.source,mae.exec(e));return t.lastIndex=e.lastIndex,t}var JI=pi?pi.prototype:void 0,KI=JI?JI.valueOf:void 0;function vae(e){return KI?Object(KI.call(e)):{}}function gj(e,t){var n=t?Ix(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}var yae="[object Boolean]",xae="[object Date]",wae="[object Map]",Cae="[object Number]",Sae="[object RegExp]",Eae="[object Set]",Iae="[object String]",Rae="[object Symbol]",Aae="[object ArrayBuffer]",Tae="[object DataView]",Oae="[object Float32Array]",Nae="[object Float64Array]",Pae="[object Int8Array]",_ae="[object Int16Array]",Mae="[object Int32Array]",Dae="[object Uint8Array]",kae="[object Uint8ClampedArray]",jae="[object Uint16Array]",Lae="[object Uint32Array]";function Fae(e,t,n){var r=e.constructor;switch(t){case Aae:return Ix(e);case yae:case xae:return new r(+e);case Tae:return gae(e);case Oae:case Nae:case Pae:case _ae:case Mae:case Dae:case kae:case jae:case Lae:return gj(e,n);case wae:return new r;case Cae:case Iae:return new r(e);case Sae:return bae(e);case Eae:return new r;case Rae:return vae(e)}}function mj(e){return typeof e.constructor=="function"&&!Cx(e)?oie(dj(e)):{}}var Bae="[object Map]";function Vae(e){return ko(e)&&Ir(e)==Bae}var QI=da&&da.isMap,$ae=QI?Sx(QI):Vae,Gae="[object Set]";function Hae(e){return ko(e)&&Ir(e)==Gae}var eR=da&&da.isSet,Wae=eR?Sx(eR):Hae,zae=1,bj="[object Arguments]",qae="[object Array]",Uae="[object Boolean]",Yae="[object Date]",Xae="[object Error]",vj="[object Function]",Zae="[object GeneratorFunction]",Jae="[object Map]",Kae="[object Number]",yj="[object Object]",Qae="[object RegExp]",ele="[object Set]",tle="[object String]",nle="[object Symbol]",rle="[object WeakMap]",ole="[object ArrayBuffer]",ile="[object DataView]",sle="[object Float32Array]",ale="[object Float64Array]",lle="[object Int8Array]",ule="[object Int16Array]",cle="[object Int32Array]",dle="[object Uint8Array]",fle="[object Uint8ClampedArray]",ple="[object Uint16Array]",hle="[object Uint32Array]",Rt={};Rt[bj]=Rt[qae]=Rt[ole]=Rt[ile]=Rt[Uae]=Rt[Yae]=Rt[sle]=Rt[ale]=Rt[lle]=Rt[ule]=Rt[cle]=Rt[Jae]=Rt[Kae]=Rt[yj]=Rt[Qae]=Rt[ele]=Rt[tle]=Rt[nle]=Rt[dle]=Rt[fle]=Rt[ple]=Rt[hle]=!0;Rt[Xae]=Rt[vj]=Rt[rle]=!1;function Dc(e,t,n,r,o,i){var s,a=t&zae;if(s!==void 0)return s;if(!Ai(e))return e;var l=os(e);if(l)s=hae(e);else{var u=Ir(e),c=u==vj||u==Zae;if(Bl(e))return hj(e,a);if(u==yj||u==bj||c&&!o)s=c?{}:mj(e);else{if(!Rt[u])return o?e:{};s=Fae(e,u,a)}}i||(i=new to);var d=i.get(e);if(d)return d;i.set(e,s),Wae(e)?e.forEach(function(g){s.add(Dc(g,t,n,g,e,i))}):$ae(e)&&e.forEach(function(g,m){s.set(m,Dc(g,t,n,m,e,i))});var f=Nv,p=l?void 0:f(e);return hie(p||e,function(g,m){p&&(m=g,g=e[m]),rj(s,m,Dc(g,t,n,m,e,i))}),s}var gle=1,mle=4;function Ks(e){return Dc(e,gle|mle)}var ble="__lodash_hash_undefined__";function vle(e){return this.__data__.set(e,ble),this}function yle(e){return this.__data__.has(e)}function Id(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new xs;++t<n;)this.add(e[t])}Id.prototype.add=Id.prototype.push=vle;Id.prototype.has=yle;function xle(e,t){for(var n=-1,r=e==null?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}function wle(e,t){return e.has(t)}var Cle=1,Sle=2;function xj(e,t,n,r,o,i){var s=n&Cle,a=e.length,l=t.length;if(a!=l&&!(s&&l>a))return!1;var u=i.get(e),c=i.get(t);if(u&&c)return u==t&&c==e;var d=-1,f=!0,p=n&Sle?new Id:void 0;for(i.set(e,t),i.set(t,e);++d<a;){var g=e[d],m=t[d];if(r)var v=s?r(m,g,d,t,e,i):r(g,m,d,e,t,i);if(v!==void 0){if(v)continue;f=!1;break}if(p){if(!xle(t,function(y,x){if(!wle(p,x)&&(g===y||o(g,y,n,r,i)))return p.push(x)})){f=!1;break}}else if(!(g===m||o(g,m,n,r,i))){f=!1;break}}return i.delete(e),i.delete(t),f}function Ele(e){var t=-1,n=Array(e.size);return e.forEach(function(r,o){n[++t]=[o,r]}),n}function Ile(e){var t=-1,n=Array(e.size);return e.forEach(function(r){n[++t]=r}),n}var Rle=1,Ale=2,Tle="[object Boolean]",Ole="[object Date]",Nle="[object Error]",Ple="[object Map]",_le="[object Number]",Mle="[object RegExp]",Dle="[object Set]",kle="[object String]",jle="[object Symbol]",Lle="[object ArrayBuffer]",Fle="[object DataView]",tR=pi?pi.prototype:void 0,Km=tR?tR.valueOf:void 0;function Ble(e,t,n,r,o,i,s){switch(n){case Fle:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case Lle:return!(e.byteLength!=t.byteLength||!i(new Ed(e),new Ed(t)));case Tle:case Ole:case _le:return wu(+e,+t);case Nle:return e.name==t.name&&e.message==t.message;case Mle:case kle:return e==t+"";case Ple:var a=Ele;case Dle:var l=r&Rle;if(a||(a=Ile),e.size!=t.size&&!l)return!1;var u=s.get(e);if(u)return u==t;r|=Ale,s.set(e,t);var c=xj(a(e),a(t),r,o,i,s);return s.delete(e),c;case jle:if(Km)return Km.call(e)==Km.call(t)}return!1}var Vle=1,$le=Object.prototype,Gle=$le.hasOwnProperty;function Hle(e,t,n,r,o,i){var s=n&Vle,a=Nv(e),l=a.length,u=Nv(t),c=u.length;if(l!=c&&!s)return!1;for(var d=l;d--;){var f=a[d];if(!(s?f in t:Gle.call(t,f)))return!1}var p=i.get(e),g=i.get(t);if(p&&g)return p==t&&g==e;var m=!0;i.set(e,t),i.set(t,e);for(var v=s;++d<l;){f=a[d];var y=e[f],x=t[f];if(r)var w=s?r(x,y,f,t,e,i):r(y,x,f,e,t,i);if(!(w===void 0?y===x||o(y,x,n,r,i):w)){m=!1;break}v||(v=f=="constructor")}if(m&&!v){var C=e.constructor,S=t.constructor;C!=S&&"constructor"in e&&"constructor"in t&&!(typeof C=="function"&&C instanceof C&&typeof S=="function"&&S instanceof S)&&(m=!1)}return i.delete(e),i.delete(t),m}var Wle=1,nR="[object Arguments]",rR="[object Array]",dc="[object Object]",zle=Object.prototype,oR=zle.hasOwnProperty;function qle(e,t,n,r,o,i){var s=os(e),a=os(t),l=s?rR:Ir(e),u=a?rR:Ir(t);l=l==nR?dc:l,u=u==nR?dc:u;var c=l==dc,d=u==dc,f=l==u;if(f&&Bl(e)){if(!Bl(t))return!1;s=!0,c=!1}if(f&&!c)return i||(i=new to),s||Ex(e)?xj(e,t,n,r,o,i):Ble(e,t,l,n,r,o,i);if(!(n&Wle)){var p=c&&oR.call(e,"__wrapped__"),g=d&&oR.call(t,"__wrapped__");if(p||g){var m=p?e.value():e,v=g?t.value():t;return i||(i=new to),o(m,v,n,r,i)}}return f?(i||(i=new to),Hle(e,t,n,r,o,i)):!1}function wj(e,t,n,r,o){return e===t?!0:e==null||t==null||!ko(e)&&!ko(t)?e!==e&&t!==t:qle(e,t,n,r,wj,o)}function Ule(e){return function(t,n,r){for(var o=-1,i=Object(t),s=r(t),a=s.length;a--;){var l=s[++o];if(n(i[l],l,i)===!1)break}return t}}var Yle=Ule();function Dv(e,t,n){(n!==void 0&&!wu(e[t],n)||n===void 0&&!(t in e))&&wx(e,t,n)}function Xle(e){return ko(e)&&Gf(e)}function kv(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}function Zle(e){return yie(e,cj(e))}function Jle(e,t,n,r,o,i,s){var a=kv(e,n),l=kv(t,n),u=s.get(l);if(u){Dv(e,n,u);return}var c=i?i(a,l,n+"",e,t,s):void 0,d=c===void 0;if(d){var f=os(l),p=!f&&Bl(l),g=!f&&!p&&Ex(l);c=l,f||p||g?os(a)?c=a:Xle(a)?c=sie(a):p?(d=!1,c=hj(l,!0)):g?(d=!1,c=gj(l,!0)):c=[]:qse(l)||Ov(l)?(c=a,Ov(a)?c=Zle(a):(!Ai(a)||xx(a))&&(c=mj(l))):d=!1}d&&(s.set(l,c),o(c,l,r,i,s),s.delete(l)),Dv(e,n,c)}function Cj(e,t,n,r,o){e!==t&&Yle(t,function(i,s){if(o||(o=new to),Ai(i))Jle(e,t,s,n,Cj,r,o);else{var a=r?r(kv(e,s),i,s+"",e,t,o):void 0;a===void 0&&(a=i),Dv(e,s,a)}},cj)}function Rx(e,t){return wj(e,t)}var ui=Eie(function(e,t,n){Cj(e,t,n)}),Pe=(e=>(e[e.TYPE=3]="TYPE",e[e.LEVEL=12]="LEVEL",e[e.ATTRIBUTE=13]="ATTRIBUTE",e[e.BLOT=14]="BLOT",e[e.INLINE=7]="INLINE",e[e.BLOCK=11]="BLOCK",e[e.BLOCK_BLOT=10]="BLOCK_BLOT",e[e.INLINE_BLOT=6]="INLINE_BLOT",e[e.BLOCK_ATTRIBUTE=9]="BLOCK_ATTRIBUTE",e[e.INLINE_ATTRIBUTE=5]="INLINE_ATTRIBUTE",e[e.ANY=15]="ANY",e))(Pe||{});class io{constructor(t,n,r={}){this.attrName=t,this.keyName=n;const o=Pe.TYPE&Pe.ATTRIBUTE;this.scope=r.scope!=null?r.scope&Pe.LEVEL|o:Pe.ATTRIBUTE,r.whitelist!=null&&(this.whitelist=r.whitelist)}static keys(t){return Array.from(t.attributes).map(n=>n.name)}add(t,n){return this.canAdd(t,n)?(t.setAttribute(this.keyName,n),!0):!1}canAdd(t,n){return this.whitelist==null?!0:typeof n=="string"?this.whitelist.indexOf(n.replace(/["']/g,""))>-1:this.whitelist.indexOf(n)>-1}remove(t){t.removeAttribute(this.keyName)}value(t){const n=t.getAttribute(this.keyName);return this.canAdd(t,n)&&n?n:""}}class Qs extends Error{constructor(t){t="[Parchment] "+t,super(t),this.message=t,this.name=this.constructor.name}}const Sj=class jv{constructor(){this.attributes={},this.classes={},this.tags={},this.types={}}static find(t,n=!1){if(t==null)return null;if(this.blots.has(t))return this.blots.get(t)||null;if(n){let r=null;try{r=t.parentNode}catch{return null}return this.find(r,n)}return null}create(t,n,r){const o=this.query(n);if(o==null)throw new Qs(`Unable to create ${n} blot`);const i=o,s=n instanceof Node||n.nodeType===Node.TEXT_NODE?n:i.create(r),a=new i(t,s,r);return jv.blots.set(a.domNode,a),a}find(t,n=!1){return jv.find(t,n)}query(t,n=Pe.ANY){let r;return typeof t=="string"?r=this.types[t]||this.attributes[t]:t instanceof Text||t.nodeType===Node.TEXT_NODE?r=this.types.text:typeof t=="number"?t&Pe.LEVEL&Pe.BLOCK?r=this.types.block:t&Pe.LEVEL&Pe.INLINE&&(r=this.types.inline):t instanceof Element&&((t.getAttribute("class")||"").split(/\s+/).some(o=>(r=this.classes[o],!!r)),r=r||this.tags[t.tagName]),r==null?null:"scope"in r&&n&Pe.LEVEL&r.scope&&n&Pe.TYPE&r.scope?r:null}register(...t){return t.map(n=>{const r="blotName"in n,o="attrName"in n;if(!r&&!o)throw new Qs("Invalid definition");if(r&&n.blotName==="abstract")throw new Qs("Cannot register abstract class");const i=r?n.blotName:o?n.attrName:void 0;return this.types[i]=n,o?typeof n.keyName=="string"&&(this.attributes[n.keyName]=n):r&&(n.className&&(this.classes[n.className]=n),n.tagName&&(Array.isArray(n.tagName)?n.tagName=n.tagName.map(s=>s.toUpperCase()):n.tagName=n.tagName.toUpperCase(),(Array.isArray(n.tagName)?n.tagName:[n.tagName]).forEach(s=>{(this.tags[s]==null||n.className==null)&&(this.tags[s]=n)}))),n})}};Sj.blots=new WeakMap;let fa=Sj;function iR(e,t){return(e.getAttribute("class")||"").split(/\s+/).filter(n=>n.indexOf(`${t}-`)===0)}class Kle extends io{static keys(t){return(t.getAttribute("class")||"").split(/\s+/).map(n=>n.split("-").slice(0,-1).join("-"))}add(t,n){return this.canAdd(t,n)?(this.remove(t),t.classList.add(`${this.keyName}-${n}`),!0):!1}remove(t){iR(t,this.keyName).forEach(n=>{t.classList.remove(n)}),t.classList.length===0&&t.removeAttribute("class")}value(t){const n=(iR(t,this.keyName)[0]||"").slice(this.keyName.length+1);return this.canAdd(t,n)?n:""}}const $r=Kle;function Qm(e){const t=e.split("-"),n=t.slice(1).map(r=>r[0].toUpperCase()+r.slice(1)).join("");return t[0]+n}class Qle extends io{static keys(t){return(t.getAttribute("style")||"").split(";").map(n=>n.split(":")[0].trim())}add(t,n){return this.canAdd(t,n)?(t.style[Qm(this.keyName)]=n,!0):!1}remove(t){t.style[Qm(this.keyName)]="",t.getAttribute("style")||t.removeAttribute("style")}value(t){const n=t.style[Qm(this.keyName)];return this.canAdd(t,n)?n:""}}const Ti=Qle;class eue{constructor(t){this.attributes={},this.domNode=t,this.build()}attribute(t,n){n?t.add(this.domNode,n)&&(t.value(this.domNode)!=null?this.attributes[t.attrName]=t:delete this.attributes[t.attrName]):(t.remove(this.domNode),delete this.attributes[t.attrName])}build(){this.attributes={};const t=fa.find(this.domNode);if(t==null)return;const n=io.keys(this.domNode),r=$r.keys(this.domNode),o=Ti.keys(this.domNode);n.concat(r).concat(o).forEach(i=>{const s=t.scroll.query(i,Pe.ATTRIBUTE);s instanceof io&&(this.attributes[s.attrName]=s)})}copy(t){Object.keys(this.attributes).forEach(n=>{const r=this.attributes[n].value(this.domNode);t.format(n,r)})}move(t){this.copy(t),Object.keys(this.attributes).forEach(n=>{this.attributes[n].remove(this.domNode)}),this.attributes={}}values(){return Object.keys(this.attributes).reduce((t,n)=>(t[n]=this.attributes[n].value(this.domNode),t),{})}}const zf=eue,Ej=class{constructor(t,n){this.scroll=t,this.domNode=n,fa.blots.set(n,this),this.prev=null,this.next=null}static create(t){if(this.tagName==null)throw new Qs("Blot definition missing tagName");let n,r;return Array.isArray(this.tagName)?(typeof t=="string"?(r=t.toUpperCase(),parseInt(r,10).toString()===r&&(r=parseInt(r,10))):typeof t=="number"&&(r=t),typeof r=="number"?n=document.createElement(this.tagName[r-1]):r&&this.tagName.indexOf(r)>-1?n=document.createElement(r):n=document.createElement(this.tagName[0])):n=document.createElement(this.tagName),this.className&&n.classList.add(this.className),n}get statics(){return this.constructor}attach(){}clone(){const t=this.domNode.cloneNode(!1);return this.scroll.create(t)}detach(){this.parent!=null&&this.parent.removeChild(this),fa.blots.delete(this.domNode)}deleteAt(t,n){this.isolate(t,n).remove()}formatAt(t,n,r,o){const i=this.isolate(t,n);if(this.scroll.query(r,Pe.BLOT)!=null&&o)i.wrap(r,o);else if(this.scroll.query(r,Pe.ATTRIBUTE)!=null){const s=this.scroll.create(this.statics.scope);i.wrap(s),s.format(r,o)}}insertAt(t,n,r){const o=r==null?this.scroll.create("text",n):this.scroll.create(n,r),i=this.split(t);this.parent.insertBefore(o,i||void 0)}isolate(t,n){const r=this.split(t);if(r==null)throw new Error("Attempt to isolate at end");return r.split(n),r}length(){return 1}offset(t=this.parent){return this.parent==null||this===t?0:this.parent.children.offset(this)+this.parent.offset(t)}optimize(t){this.statics.requiredContainer&&!(this.parent instanceof this.statics.requiredContainer)&&this.wrap(this.statics.requiredContainer.blotName)}remove(){this.domNode.parentNode!=null&&this.domNode.parentNode.removeChild(this.domNode),this.detach()}replaceWith(t,n){const r=typeof t=="string"?this.scroll.create(t,n):t;return this.parent!=null&&(this.parent.insertBefore(r,this.next||void 0),this.remove()),r}split(t,n){return t===0?this:this.next}update(t,n){}wrap(t,n){const r=typeof t=="string"?this.scroll.create(t,n):t;if(this.parent!=null&&this.parent.insertBefore(r,this.next||void 0),typeof r.appendChild!="function")throw new Qs(`Cannot wrap ${t}`);return r.appendChild(this),r}};Ej.blotName="abstract";let Ij=Ej;const Rj=class extends Ij{static value(t){return!0}index(t,n){return this.domNode===t||this.domNode.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_CONTAINED_BY?Math.min(n,1):-1}position(t,n){let r=Array.from(this.parent.domNode.childNodes).indexOf(this.domNode);return t>0&&(r+=1),[this.parent.domNode,r]}value(){return{[this.statics.blotName]:this.statics.value(this.domNode)||!0}}};Rj.scope=Pe.INLINE_BLOT;let tue=Rj;const xn=tue;class nue{constructor(){this.head=null,this.tail=null,this.length=0}append(...t){if(this.insertBefore(t[0],null),t.length>1){const n=t.slice(1);this.append(...n)}}at(t){const n=this.iterator();let r=n();for(;r&&t>0;)t-=1,r=n();return r}contains(t){const n=this.iterator();let r=n();for(;r;){if(r===t)return!0;r=n()}return!1}indexOf(t){const n=this.iterator();let r=n(),o=0;for(;r;){if(r===t)return o;o+=1,r=n()}return-1}insertBefore(t,n){t!=null&&(this.remove(t),t.next=n,n!=null?(t.prev=n.prev,n.prev!=null&&(n.prev.next=t),n.prev=t,n===this.head&&(this.head=t)):this.tail!=null?(this.tail.next=t,t.prev=this.tail,this.tail=t):(t.prev=null,this.head=this.tail=t),this.length+=1)}offset(t){let n=0,r=this.head;for(;r!=null;){if(r===t)return n;n+=r.length(),r=r.next}return-1}remove(t){this.contains(t)&&(t.prev!=null&&(t.prev.next=t.next),t.next!=null&&(t.next.prev=t.prev),t===this.head&&(this.head=t.next),t===this.tail&&(this.tail=t.prev),this.length-=1)}iterator(t=this.head){return()=>{const n=t;return t!=null&&(t=t.next),n}}find(t,n=!1){const r=this.iterator();let o=r();for(;o;){const i=o.length();if(t<i||n&&t===i&&(o.next==null||o.next.length()!==0))return[o,t];t-=i,o=r()}return[null,0]}forEach(t){const n=this.iterator();let r=n();for(;r;)t(r),r=n()}forEachAt(t,n,r){if(n<=0)return;const[o,i]=this.find(t);let s=t-i;const a=this.iterator(o);let l=a();for(;l&&s<t+n;){const u=l.length();t>s?r(l,t-s,Math.min(n,s+u-t)):r(l,0,Math.min(u,t+n-s)),s+=u,l=a()}}map(t){return this.reduce((n,r)=>(n.push(t(r)),n),[])}reduce(t,n){const r=this.iterator();let o=r();for(;o;)n=t(n,o),o=r();return n}}function sR(e,t){const n=t.find(e);if(n)return n;try{return t.create(e)}catch{const r=t.create(Pe.INLINE);return Array.from(e.childNodes).forEach(o=>{r.domNode.appendChild(o)}),e.parentNode&&e.parentNode.replaceChild(r.domNode,e),r.attach(),r}}const Aj=class Qo extends Ij{constructor(t,n){super(t,n),this.uiNode=null,this.build()}appendChild(t){this.insertBefore(t)}attach(){super.attach(),this.children.forEach(t=>{t.attach()})}attachUI(t){this.uiNode!=null&&this.uiNode.remove(),this.uiNode=t,Qo.uiClass&&this.uiNode.classList.add(Qo.uiClass),this.uiNode.setAttribute("contenteditable","false"),this.domNode.insertBefore(this.uiNode,this.domNode.firstChild)}build(){this.children=new nue,Array.from(this.domNode.childNodes).filter(t=>t!==this.uiNode).reverse().forEach(t=>{try{const n=sR(t,this.scroll);this.insertBefore(n,this.children.head||void 0)}catch(n){if(n instanceof Qs)return;throw n}})}deleteAt(t,n){if(t===0&&n===this.length())return this.remove();this.children.forEachAt(t,n,(r,o,i)=>{r.deleteAt(o,i)})}descendant(t,n=0){const[r,o]=this.children.find(n);return t.blotName==null&&t(r)||t.blotName!=null&&r instanceof t?[r,o]:r instanceof Qo?r.descendant(t,o):[null,-1]}descendants(t,n=0,r=Number.MAX_VALUE){let o=[],i=r;return this.children.forEachAt(n,r,(s,a,l)=>{(t.blotName==null&&t(s)||t.blotName!=null&&s instanceof t)&&o.push(s),s instanceof Qo&&(o=o.concat(s.descendants(t,a,i))),i-=l}),o}detach(){this.children.forEach(t=>{t.detach()}),super.detach()}enforceAllowedChildren(){let t=!1;this.children.forEach(n=>{t||this.statics.allowedChildren.some(r=>n instanceof r)||(n.statics.scope===Pe.BLOCK_BLOT?(n.next!=null&&this.splitAfter(n),n.prev!=null&&this.splitAfter(n.prev),n.parent.unwrap(),t=!0):n instanceof Qo?n.unwrap():n.remove())})}formatAt(t,n,r,o){this.children.forEachAt(t,n,(i,s,a)=>{i.formatAt(s,a,r,o)})}insertAt(t,n,r){const[o,i]=this.children.find(t);if(o)o.insertAt(i,n,r);else{const s=r==null?this.scroll.create("text",n):this.scroll.create(n,r);this.appendChild(s)}}insertBefore(t,n){t.parent!=null&&t.parent.children.remove(t);let r=null;this.children.insertBefore(t,n||null),t.parent=this,n!=null&&(r=n.domNode),(this.domNode.parentNode!==t.domNode||this.domNode.nextSibling!==r)&&this.domNode.insertBefore(t.domNode,r),t.attach()}length(){return this.children.reduce((t,n)=>t+n.length(),0)}moveChildren(t,n){this.children.forEach(r=>{t.insertBefore(r,n)})}optimize(t){if(super.optimize(t),this.enforceAllowedChildren(),this.uiNode!=null&&this.uiNode!==this.domNode.firstChild&&this.domNode.insertBefore(this.uiNode,this.domNode.firstChild),this.children.length===0)if(this.statics.defaultChild!=null){const n=this.scroll.create(this.statics.defaultChild.blotName);this.appendChild(n)}else this.remove()}path(t,n=!1){const[r,o]=this.children.find(t,n),i=[[this,t]];return r instanceof Qo?i.concat(r.path(o,n)):(r!=null&&i.push([r,o]),i)}removeChild(t){this.children.remove(t)}replaceWith(t,n){const r=typeof t=="string"?this.scroll.create(t,n):t;return r instanceof Qo&&this.moveChildren(r),super.replaceWith(r)}split(t,n=!1){if(!n){if(t===0)return this;if(t===this.length())return this.next}const r=this.clone();return this.parent&&this.parent.insertBefore(r,this.next||void 0),this.children.forEachAt(t,this.length(),(o,i,s)=>{const a=o.split(i,n);a!=null&&r.appendChild(a)}),r}splitAfter(t){const n=this.clone();for(;t.next!=null;)n.appendChild(t.next);return this.parent&&this.parent.insertBefore(n,this.next||void 0),n}unwrap(){this.parent&&this.moveChildren(this.parent,this.next||void 0),this.remove()}update(t,n){const r=[],o=[];t.forEach(i=>{i.target===this.domNode&&i.type==="childList"&&(r.push(...i.addedNodes),o.push(...i.removedNodes))}),o.forEach(i=>{if(i.parentNode!=null&&i.tagName!=="IFRAME"&&document.body.compareDocumentPosition(i)&Node.DOCUMENT_POSITION_CONTAINED_BY)return;const s=this.scroll.find(i);s!=null&&(s.domNode.parentNode==null||s.domNode.parentNode===this.domNode)&&s.detach()}),r.filter(i=>i.parentNode===this.domNode&&i!==this.uiNode).sort((i,s)=>i===s?0:i.compareDocumentPosition(s)&Node.DOCUMENT_POSITION_FOLLOWING?1:-1).forEach(i=>{let s=null;i.nextSibling!=null&&(s=this.scroll.find(i.nextSibling));const a=sR(i,this.scroll);(a.next!==s||a.next==null)&&(a.parent!=null&&a.parent.removeChild(this),this.insertBefore(a,s||void 0))}),this.enforceAllowedChildren()}};Aj.uiClass="";let rue=Aj;const Nr=rue;function oue(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(e[n]!==t[n])return!1;return!0}const Ls=class Fs extends Nr{static create(t){return super.create(t)}static formats(t,n){const r=n.query(Fs.blotName);if(!(r!=null&&t.tagName===r.tagName)){if(typeof this.tagName=="string")return!0;if(Array.isArray(this.tagName))return t.tagName.toLowerCase()}}constructor(t,n){super(t,n),this.attributes=new zf(this.domNode)}format(t,n){if(t===this.statics.blotName&&!n)this.children.forEach(r=>{r instanceof Fs||(r=r.wrap(Fs.blotName,!0)),this.attributes.copy(r)}),this.unwrap();else{const r=this.scroll.query(t,Pe.INLINE);if(r==null)return;r instanceof io?this.attributes.attribute(r,n):n&&(t!==this.statics.blotName||this.formats()[t]!==n)&&this.replaceWith(t,n)}}formats(){const t=this.attributes.values(),n=this.statics.formats(this.domNode,this.scroll);return n!=null&&(t[this.statics.blotName]=n),t}formatAt(t,n,r,o){this.formats()[r]!=null||this.scroll.query(r,Pe.ATTRIBUTE)?this.isolate(t,n).format(r,o):super.formatAt(t,n,r,o)}optimize(t){super.optimize(t);const n=this.formats();if(Object.keys(n).length===0)return this.unwrap();const r=this.next;r instanceof Fs&&r.prev===this&&oue(n,r.formats())&&(r.moveChildren(this),r.remove())}replaceWith(t,n){const r=super.replaceWith(t,n);return this.attributes.copy(r),r}update(t,n){super.update(t,n),t.some(r=>r.target===this.domNode&&r.type==="attributes")&&this.attributes.build()}wrap(t,n){const r=super.wrap(t,n);return r instanceof Fs&&this.attributes.move(r),r}};Ls.allowedChildren=[Ls,xn],Ls.blotName="inline",Ls.scope=Pe.INLINE_BLOT,Ls.tagName="SPAN";let iue=Ls;const Ax=iue,Bs=class Lv extends Nr{static create(t){return super.create(t)}static formats(t,n){const r=n.query(Lv.blotName);if(!(r!=null&&t.tagName===r.tagName)){if(typeof this.tagName=="string")return!0;if(Array.isArray(this.tagName))return t.tagName.toLowerCase()}}constructor(t,n){super(t,n),this.attributes=new zf(this.domNode)}format(t,n){const r=this.scroll.query(t,Pe.BLOCK);r!=null&&(r instanceof io?this.attributes.attribute(r,n):t===this.statics.blotName&&!n?this.replaceWith(Lv.blotName):n&&(t!==this.statics.blotName||this.formats()[t]!==n)&&this.replaceWith(t,n))}formats(){const t=this.attributes.values(),n=this.statics.formats(this.domNode,this.scroll);return n!=null&&(t[this.statics.blotName]=n),t}formatAt(t,n,r,o){this.scroll.query(r,Pe.BLOCK)!=null?this.format(r,o):super.formatAt(t,n,r,o)}insertAt(t,n,r){if(r==null||this.scroll.query(n,Pe.INLINE)!=null)super.insertAt(t,n,r);else{const o=this.split(t);if(o!=null){const i=this.scroll.create(n,r);o.parent.insertBefore(i,o)}else throw new Error("Attempt to insertAt after block boundaries")}}replaceWith(t,n){const r=super.replaceWith(t,n);return this.attributes.copy(r),r}update(t,n){super.update(t,n),t.some(r=>r.target===this.domNode&&r.type==="attributes")&&this.attributes.build()}};Bs.blotName="block",Bs.scope=Pe.BLOCK_BLOT,Bs.tagName="P",Bs.allowedChildren=[Ax,Bs,xn];let sue=Bs;const Gl=sue,Fv=class extends Nr{checkMerge(){return this.next!==null&&this.next.statics.blotName===this.statics.blotName}deleteAt(t,n){super.deleteAt(t,n),this.enforceAllowedChildren()}formatAt(t,n,r,o){super.formatAt(t,n,r,o),this.enforceAllowedChildren()}insertAt(t,n,r){super.insertAt(t,n,r),this.enforceAllowedChildren()}optimize(t){super.optimize(t),this.children.length>0&&this.next!=null&&this.checkMerge()&&(this.next.moveChildren(this),this.next.remove())}};Fv.blotName="container",Fv.scope=Pe.BLOCK_BLOT;let aue=Fv;const qf=aue;class lue extends xn{static formats(t,n){}format(t,n){super.formatAt(0,this.length(),t,n)}formatAt(t,n,r,o){t===0&&n===this.length()?this.format(r,o):super.formatAt(t,n,r,o)}formats(){return this.statics.formats(this.domNode,this.scroll)}}const Hn=lue,uue={attributes:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0},cue=100,Vs=class extends Nr{constructor(t,n){super(null,n),this.registry=t,this.scroll=this,this.build(),this.observer=new MutationObserver(r=>{this.update(r)}),this.observer.observe(this.domNode,uue),this.attach()}create(t,n){return this.registry.create(this,t,n)}find(t,n=!1){const r=this.registry.find(t,n);return r?r.scroll===this?r:n?this.find(r.scroll.domNode.parentNode,!0):null:null}query(t,n=Pe.ANY){return this.registry.query(t,n)}register(...t){return this.registry.register(...t)}build(){this.scroll!=null&&super.build()}detach(){super.detach(),this.observer.disconnect()}deleteAt(t,n){this.update(),t===0&&n===this.length()?this.children.forEach(r=>{r.remove()}):super.deleteAt(t,n)}formatAt(t,n,r,o){this.update(),super.formatAt(t,n,r,o)}insertAt(t,n,r){this.update(),super.insertAt(t,n,r)}optimize(t=[],n={}){super.optimize(n);const r=n.mutationsMap||new WeakMap;let o=Array.from(this.observer.takeRecords());for(;o.length>0;)t.push(o.pop());const i=(l,u=!0)=>{l==null||l===this||l.domNode.parentNode!=null&&(r.has(l.domNode)||r.set(l.domNode,[]),u&&i(l.parent))},s=l=>{r.has(l.domNode)&&(l instanceof Nr&&l.children.forEach(s),r.delete(l.domNode),l.optimize(n))};let a=t;for(let l=0;a.length>0;l+=1){if(l>=cue)throw new Error("[Parchment] Maximum optimize iterations reached");for(a.forEach(u=>{const c=this.find(u.target,!0);c!=null&&(c.domNode===u.target&&(u.type==="childList"?(i(this.find(u.previousSibling,!1)),Array.from(u.addedNodes).forEach(d=>{const f=this.find(d,!1);i(f,!1),f instanceof Nr&&f.children.forEach(p=>{i(p,!1)})})):u.type==="attributes"&&i(c.prev)),i(c))}),this.children.forEach(s),a=Array.from(this.observer.takeRecords()),o=a.slice();o.length>0;)t.push(o.pop())}}update(t,n={}){t=t||this.observer.takeRecords();const r=new WeakMap;t.map(o=>{const i=this.find(o.target,!0);return i==null?null:r.has(i.domNode)?(r.get(i.domNode).push(o),null):(r.set(i.domNode,[o]),i)}).forEach(o=>{o!=null&&o!==this&&r.has(o.domNode)&&o.update(r.get(o.domNode)||[],n)}),n.mutationsMap=r,r.has(this.domNode)&&super.update(r.get(this.domNode),n),this.optimize(t,n)}};Vs.blotName="scroll",Vs.defaultChild=Gl,Vs.allowedChildren=[Gl,qf],Vs.scope=Pe.BLOCK_BLOT,Vs.tagName="DIV";let due=Vs;const Tx=due,Bv=class Tj extends xn{static create(t){return document.createTextNode(t)}static value(t){return t.data}constructor(t,n){super(t,n),this.text=this.statics.value(this.domNode)}deleteAt(t,n){this.domNode.data=this.text=this.text.slice(0,t)+this.text.slice(t+n)}index(t,n){return this.domNode===t?n:-1}insertAt(t,n,r){r==null?(this.text=this.text.slice(0,t)+n+this.text.slice(t),this.domNode.data=this.text):super.insertAt(t,n,r)}length(){return this.text.length}optimize(t){super.optimize(t),this.text=this.statics.value(this.domNode),this.text.length===0?this.remove():this.next instanceof Tj&&this.next.prev===this&&(this.insertAt(this.length(),this.next.value()),this.next.remove())}position(t,n=!1){return[this.domNode,t]}split(t,n=!1){if(!n){if(t===0)return this;if(t===this.length())return this.next}const r=this.scroll.create(this.domNode.splitText(t));return this.parent.insertBefore(r,this.next||void 0),this.text=this.statics.value(this.domNode),r}update(t,n){t.some(r=>r.type==="characterData"&&r.target===this.domNode)&&(this.text=this.statics.value(this.domNode))}value(){return this.text}};Bv.blotName="text",Bv.scope=Pe.INLINE_BLOT;let fue=Bv;const Rd=fue,pue=Object.freeze(Object.defineProperty({__proto__:null,Attributor:io,AttributorStore:zf,BlockBlot:Gl,ClassAttributor:$r,ContainerBlot:qf,EmbedBlot:Hn,InlineBlot:Ax,LeafBlot:xn,ParentBlot:Nr,Registry:fa,Scope:Pe,ScrollBlot:Tx,StyleAttributor:Ti,TextBlot:Rd},Symbol.toStringTag,{value:"Module"}));var fc={exports:{}},eb,aR;function hue(){if(aR)return eb;aR=1;var e=-1,t=1,n=0;function r(A,M,O,B,j){if(A===M)return A?[[n,A]]:[];if(O!=null){var D=_(A,M,O);if(D)return D}var V=a(A,M),G=A.substring(0,V);A=A.substring(V),M=M.substring(V),V=u(A,M);var z=A.substring(A.length-V);A=A.substring(0,A.length-V),M=M.substring(0,M.length-V);var H=o(A,M);return G&&H.unshift([n,G]),z&&H.push([n,z]),x(H,j),B&&d(H),H}function o(A,M){var O;if(!A)return[[t,M]];if(!M)return[[e,A]];var B=A.length>M.length?A:M,j=A.length>M.length?M:A,D=B.indexOf(j);if(D!==-1)return O=[[t,B.substring(0,D)],[n,j],[t,B.substring(D+j.length)]],A.length>M.length&&(O[0][0]=O[2][0]=e),O;if(j.length===1)return[[e,A],[t,M]];var V=c(A,M);if(V){var G=V[0],z=V[1],H=V[2],ne=V[3],W=V[4],J=r(G,H),K=r(z,ne);return J.concat([[n,W]],K)}return i(A,M)}function i(A,M){for(var O=A.length,B=M.length,j=Math.ceil((O+B)/2),D=j,V=2*j,G=new Array(V),z=new Array(V),H=0;H<V;H++)G[H]=-1,z[H]=-1;G[D+1]=0,z[D+1]=0;for(var ne=O-B,W=ne%2!==0,J=0,K=0,U=0,oe=0,X=0;X<j;X++){for(var te=-X+J;te<=X-K;te+=2){var Q=D+te,se;te===-X||te!==X&&G[Q-1]<G[Q+1]?se=G[Q+1]:se=G[Q-1]+1;for(var ae=se-te;se<O&&ae<B&&A.charAt(se)===M.charAt(ae);)se++,ae++;if(G[Q]=se,se>O)K+=2;else if(ae>B)J+=2;else if(W){var L=D+ne-te;if(L>=0&&L<V&&z[L]!==-1){var Z=O-z[L];if(se>=Z)return s(A,M,se,ae)}}}for(var k=-X+U;k<=X-oe;k+=2){var L=D+k,Z;k===-X||k!==X&&z[L-1]<z[L+1]?Z=z[L+1]:Z=z[L-1]+1;for(var ie=Z-k;Z<O&&ie<B&&A.charAt(O-Z-1)===M.charAt(B-ie-1);)Z++,ie++;if(z[L]=Z,Z>O)oe+=2;else if(ie>B)U+=2;else if(!W){var Q=D+ne-k;if(Q>=0&&Q<V&&G[Q]!==-1){var se=G[Q],ae=D+se-Q;if(Z=O-Z,se>=Z)return s(A,M,se,ae)}}}}return[[e,A],[t,M]]}function s(A,M,O,B){var j=A.substring(0,O),D=M.substring(0,B),V=A.substring(O),G=M.substring(B),z=r(j,D),H=r(V,G);return z.concat(H)}function a(A,M){if(!A||!M||A.charAt(0)!==M.charAt(0))return 0;for(var O=0,B=Math.min(A.length,M.length),j=B,D=0;O<j;)A.substring(D,j)==M.substring(D,j)?(O=j,D=O):B=j,j=Math.floor((B-O)/2+O);return w(A.charCodeAt(j-1))&&j--,j}function l(A,M){var O=A.length,B=M.length;if(O==0||B==0)return 0;O>B?A=A.substring(O-B):O<B&&(M=M.substring(0,O));var j=Math.min(O,B);if(A==M)return j;for(var D=0,V=1;;){var G=A.substring(j-V),z=M.indexOf(G);if(z==-1)return D;V+=z,(z==0||A.substring(j-V)==M.substring(0,V))&&(D=V,V++)}}function u(A,M){if(!A||!M||A.slice(-1)!==M.slice(-1))return 0;for(var O=0,B=Math.min(A.length,M.length),j=B,D=0;O<j;)A.substring(A.length-j,A.length-D)==M.substring(M.length-j,M.length-D)?(O=j,D=O):B=j,j=Math.floor((B-O)/2+O);return C(A.charCodeAt(A.length-j))&&j--,j}function c(A,M){var O=A.length>M.length?A:M,B=A.length>M.length?M:A;if(O.length<4||B.length*2<O.length)return null;function j(K,U,oe){for(var X=K.substring(oe,oe+Math.floor(K.length/4)),te=-1,Q="",se,ae,L,Z;(te=U.indexOf(X,te+1))!==-1;){var k=a(K.substring(oe),U.substring(te)),ie=u(K.substring(0,oe),U.substring(0,te));Q.length<ie+k&&(Q=U.substring(te-ie,te)+U.substring(te,te+k),se=K.substring(0,oe-ie),ae=K.substring(oe+k),L=U.substring(0,te-ie),Z=U.substring(te+k))}return Q.length*2>=K.length?[se,ae,L,Z,Q]:null}var D=j(O,B,Math.ceil(O.length/4)),V=j(O,B,Math.ceil(O.length/2)),G;if(!D&&!V)return null;V?D?G=D[4].length>V[4].length?D:V:G=V:G=D;var z,H,ne,W;A.length>M.length?(z=G[0],H=G[1],ne=G[2],W=G[3]):(ne=G[0],W=G[1],z=G[2],H=G[3]);var J=G[4];return[z,H,ne,W,J]}function d(A){for(var M=!1,O=[],B=0,j=null,D=0,V=0,G=0,z=0,H=0;D<A.length;)A[D][0]==n?(O[B++]=D,V=z,G=H,z=0,H=0,j=A[D][1]):(A[D][0]==t?z+=A[D][1].length:H+=A[D][1].length,j&&j.length<=Math.max(V,G)&&j.length<=Math.max(z,H)&&(A.splice(O[B-1],0,[e,j]),A[O[B-1]+1][0]=t,B--,B--,D=B>0?O[B-1]:-1,V=0,G=0,z=0,H=0,j=null,M=!0)),D++;for(M&&x(A),y(A),D=1;D<A.length;){if(A[D-1][0]==e&&A[D][0]==t){var ne=A[D-1][1],W=A[D][1],J=l(ne,W),K=l(W,ne);J>=K?(J>=ne.length/2||J>=W.length/2)&&(A.splice(D,0,[n,W.substring(0,J)]),A[D-1][1]=ne.substring(0,ne.length-J),A[D+1][1]=W.substring(J),D++):(K>=ne.length/2||K>=W.length/2)&&(A.splice(D,0,[n,ne.substring(0,K)]),A[D-1][0]=t,A[D-1][1]=W.substring(0,W.length-K),A[D+1][0]=e,A[D+1][1]=ne.substring(K),D++),D++}D++}}var f=/[^a-zA-Z0-9]/,p=/\s/,g=/[\r\n]/,m=/\n\r?\n$/,v=/^\r?\n\r?\n/;function y(A){function M(K,U){if(!K||!U)return 6;var oe=K.charAt(K.length-1),X=U.charAt(0),te=oe.match(f),Q=X.match(f),se=te&&oe.match(p),ae=Q&&X.match(p),L=se&&oe.match(g),Z=ae&&X.match(g),k=L&&K.match(m),ie=Z&&U.match(v);return k||ie?5:L||Z?4:te&&!se&&ae?3:se||ae?2:te||Q?1:0}for(var O=1;O<A.length-1;){if(A[O-1][0]==n&&A[O+1][0]==n){var B=A[O-1][1],j=A[O][1],D=A[O+1][1],V=u(B,j);if(V){var G=j.substring(j.length-V);B=B.substring(0,B.length-V),j=G+j.substring(0,j.length-V),D=G+D}for(var z=B,H=j,ne=D,W=M(B,j)+M(j,D);j.charAt(0)===D.charAt(0);){B+=j.charAt(0),j=j.substring(1)+D.charAt(0),D=D.substring(1);var J=M(B,j)+M(j,D);J>=W&&(W=J,z=B,H=j,ne=D)}A[O-1][1]!=z&&(z?A[O-1][1]=z:(A.splice(O-1,1),O--),A[O][1]=H,ne?A[O+1][1]=ne:(A.splice(O+1,1),O--))}O++}}function x(A,M){A.push([n,""]);for(var O=0,B=0,j=0,D="",V="",G;O<A.length;){if(O<A.length-1&&!A[O][1]){A.splice(O,1);continue}switch(A[O][0]){case t:j++,V+=A[O][1],O++;break;case e:B++,D+=A[O][1],O++;break;case n:var z=O-j-B-1;if(M){if(z>=0&&R(A[z][1])){var H=A[z][1].slice(-1);if(A[z][1]=A[z][1].slice(0,-1),D=H+D,V=H+V,!A[z][1]){A.splice(z,1),O--;var ne=z-1;A[ne]&&A[ne][0]===t&&(j++,V=A[ne][1]+V,ne--),A[ne]&&A[ne][0]===e&&(B++,D=A[ne][1]+D,ne--),z=ne}}if(S(A[O][1])){var H=A[O][1].charAt(0);A[O][1]=A[O][1].slice(1),D+=H,V+=H}}if(O<A.length-1&&!A[O][1]){A.splice(O,1);break}if(D.length>0||V.length>0){D.length>0&&V.length>0&&(G=a(V,D),G!==0&&(z>=0?A[z][1]+=V.substring(0,G):(A.splice(0,0,[n,V.substring(0,G)]),O++),V=V.substring(G),D=D.substring(G)),G=u(V,D),G!==0&&(A[O][1]=V.substring(V.length-G)+A[O][1],V=V.substring(0,V.length-G),D=D.substring(0,D.length-G)));var W=j+B;D.length===0&&V.length===0?(A.splice(O-W,W),O=O-W):D.length===0?(A.splice(O-W,W,[t,V]),O=O-W+1):V.length===0?(A.splice(O-W,W,[e,D]),O=O-W+1):(A.splice(O-W,W,[e,D],[t,V]),O=O-W+2)}O!==0&&A[O-1][0]===n?(A[O-1][1]+=A[O][1],A.splice(O,1)):O++,j=0,B=0,D="",V="";break}}A[A.length-1][1]===""&&A.pop();var J=!1;for(O=1;O<A.length-1;)A[O-1][0]===n&&A[O+1][0]===n&&(A[O][1].substring(A[O][1].length-A[O-1][1].length)===A[O-1][1]?(A[O][1]=A[O-1][1]+A[O][1].substring(0,A[O][1].length-A[O-1][1].length),A[O+1][1]=A[O-1][1]+A[O+1][1],A.splice(O-1,1),J=!0):A[O][1].substring(0,A[O+1][1].length)==A[O+1][1]&&(A[O-1][1]+=A[O+1][1],A[O][1]=A[O][1].substring(A[O+1][1].length)+A[O+1][1],A.splice(O+1,1),J=!0)),O++;J&&x(A,M)}function w(A){return A>=55296&&A<=56319}function C(A){return A>=56320&&A<=57343}function S(A){return C(A.charCodeAt(0))}function R(A){return w(A.charCodeAt(A.length-1))}function I(A){for(var M=[],O=0;O<A.length;O++)A[O][1].length>0&&M.push(A[O]);return M}function T(A,M,O,B){return R(A)||S(B)?null:I([[n,A],[e,M],[t,O],[n,B]])}function _(A,M,O){var B=typeof O=="number"?{index:O,length:0}:O.oldRange,j=typeof O=="number"?null:O.newRange,D=A.length,V=M.length;if(B.length===0&&(j===null||j.length===0)){var G=B.index,z=A.slice(0,G),H=A.slice(G),ne=j?j.index:null;e:{var W=G+V-D;if(ne!==null&&ne!==W||W<0||W>V)break e;var J=M.slice(0,W),K=M.slice(W);if(K!==H)break e;var U=Math.min(G,W),oe=z.slice(0,U),X=J.slice(0,U);if(oe!==X)break e;var te=z.slice(U),Q=J.slice(U);return T(oe,te,Q,H)}e:{if(ne!==null&&ne!==G)break e;var se=G,J=M.slice(0,se),K=M.slice(se);if(J!==z)break e;var ae=Math.min(D-se,V-se),L=H.slice(H.length-ae),Z=K.slice(K.length-ae);if(L!==Z)break e;var te=H.slice(0,H.length-ae),Q=K.slice(0,K.length-ae);return T(z,te,Q,L)}}if(B.length>0&&j&&j.length===0)e:{var oe=A.slice(0,B.index),L=A.slice(B.index+B.length),U=oe.length,ae=L.length;if(V<U+ae)break e;var X=M.slice(0,U),Z=M.slice(V-ae);if(oe!==X||L!==Z)break e;var te=A.slice(U,D-ae),Q=M.slice(U,V-ae);return T(oe,te,Q,L)}return null}function $(A,M,O,B){return r(A,M,O,B,!0)}return $.INSERT=t,$.DELETE=e,$.EQUAL=n,eb=$,eb}var sl={exports:{}};sl.exports;var lR;function Oj(){return lR||(lR=1,(function(e,t){var n=200,r="__lodash_hash_undefined__",o=9007199254740991,i="[object Arguments]",s="[object Array]",a="[object Boolean]",l="[object Date]",u="[object Error]",c="[object Function]",d="[object GeneratorFunction]",f="[object Map]",p="[object Number]",g="[object Object]",m="[object Promise]",v="[object RegExp]",y="[object Set]",x="[object String]",w="[object Symbol]",C="[object WeakMap]",S="[object ArrayBuffer]",R="[object DataView]",I="[object Float32Array]",T="[object Float64Array]",_="[object Int8Array]",$="[object Int16Array]",A="[object Int32Array]",M="[object Uint8Array]",O="[object Uint8ClampedArray]",B="[object Uint16Array]",j="[object Uint32Array]",D=/[\\^$.*+?()[\]{}|]/g,V=/\w*$/,G=/^\[object .+?Constructor\]$/,z=/^(?:0|[1-9]\d*)$/,H={};H[i]=H[s]=H[S]=H[R]=H[a]=H[l]=H[I]=H[T]=H[_]=H[$]=H[A]=H[f]=H[p]=H[g]=H[v]=H[y]=H[x]=H[w]=H[M]=H[O]=H[B]=H[j]=!0,H[u]=H[c]=H[C]=!1;var ne=typeof ir=="object"&&ir&&ir.Object===Object&&ir,W=typeof self=="object"&&self&&self.Object===Object&&self,J=ne||W||Function("return this")(),K=t&&!t.nodeType&&t,U=K&&!0&&e&&!e.nodeType&&e,oe=U&&U.exports===K;function X(E,P){return E.set(P[0],P[1]),E}function te(E,P){return E.add(P),E}function Q(E,P){for(var q=-1,ue=E?E.length:0;++q<ue&&P(E[q],q,E)!==!1;);return E}function se(E,P){for(var q=-1,ue=P.length,Je=E.length;++q<ue;)E[Je+q]=P[q];return E}function ae(E,P,q,ue){for(var Je=-1,je=E?E.length:0;++Je<je;)q=P(q,E[Je],Je,E);return q}function L(E,P){for(var q=-1,ue=Array(E);++q<E;)ue[q]=P(q);return ue}function Z(E,P){return E?.[P]}function k(E){var P=!1;if(E!=null&&typeof E.toString!="function")try{P=!!(E+"")}catch{}return P}function ie(E){var P=-1,q=Array(E.size);return E.forEach(function(ue,Je){q[++P]=[Je,ue]}),q}function Y(E,P){return function(q){return E(P(q))}}function le(E){var P=-1,q=Array(E.size);return E.forEach(function(ue){q[++P]=ue}),q}var pe=Array.prototype,re=Function.prototype,fe=Object.prototype,de=J["__core-js_shared__"],ve=(function(){var E=/[^.]+$/.exec(de&&de.keys&&de.keys.IE_PROTO||"");return E?"Symbol(src)_1."+E:""})(),we=re.toString,Se=fe.hasOwnProperty,Ye=fe.toString,at=RegExp("^"+we.call(Se).replace(D,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Xe=oe?J.Buffer:void 0,Ue=J.Symbol,rt=J.Uint8Array,et=Y(Object.getPrototypeOf,Object),gt=Object.create,ct=fe.propertyIsEnumerable,ot=pe.splice,mt=Object.getOwnPropertySymbols,Nt=Xe?Xe.isBuffer:void 0,Bt=Y(Object.keys,Object),tt=Dn(J,"DataView"),Ze=Dn(J,"Map"),ee=Dn(J,"Promise"),ye=Dn(J,"Set"),ge=Dn(J,"WeakMap"),xe=Dn(Object,"create"),Ae=st(tt),Ie=st(Ze),qe=st(ee),Pt=st(ye),lt=st(ge),it=Ue?Ue.prototype:void 0,_t=it?it.valueOf:void 0;function Et(E){var P=-1,q=E?E.length:0;for(this.clear();++P<q;){var ue=E[P];this.set(ue[0],ue[1])}}function sn(){this.__data__=xe?xe(null):{}}function mr(E){return this.has(E)&&delete this.__data__[E]}function Wn(E){var P=this.__data__;if(xe){var q=P[E];return q===r?void 0:q}return Se.call(P,E)?P[E]:void 0}function pn(E){var P=this.__data__;return xe?P[E]!==void 0:Se.call(P,E)}function Jt(E,P){var q=this.__data__;return q[E]=xe&&P===void 0?r:P,this}Et.prototype.clear=sn,Et.prototype.delete=mr,Et.prototype.get=Wn,Et.prototype.has=pn,Et.prototype.set=Jt;function Ve(E){var P=-1,q=E?E.length:0;for(this.clear();++P<q;){var ue=E[P];this.set(ue[0],ue[1])}}function zn(){this.__data__=[]}function Sa(E){var P=this.__data__,q=br(P,E);if(q<0)return!1;var ue=P.length-1;return q==ue?P.pop():ot.call(P,q,1),!0}function Oi(E){var P=this.__data__,q=br(P,E);return q<0?void 0:P[q][1]}function Ni(E){return br(this.__data__,E)>-1}function Go(E,P){var q=this.__data__,ue=br(q,E);return ue<0?q.push([E,P]):q[ue][1]=P,this}Ve.prototype.clear=zn,Ve.prototype.delete=Sa,Ve.prototype.get=Oi,Ve.prototype.has=Ni,Ve.prototype.set=Go;function nn(E){var P=-1,q=E?E.length:0;for(this.clear();++P<q;){var ue=E[P];this.set(ue[0],ue[1])}}function Ho(){this.__data__={hash:new Et,map:new(Ze||Ve),string:new Et}}function Es(E){return xo(this,E).delete(E)}function bo(E){return xo(this,E).get(E)}function Pi(E){return xo(this,E).has(E)}function Cn(E,P){return xo(this,E).set(E,P),this}nn.prototype.clear=Ho,nn.prototype.delete=Es,nn.prototype.get=bo,nn.prototype.has=Pi,nn.prototype.set=Cn;function Mt(E){this.__data__=new Ve(E)}function Ea(){this.__data__=new Ve}function Is(E){return this.__data__.delete(E)}function Ia(E){return this.__data__.get(E)}function _i(E){return this.__data__.has(E)}function Rs(E,P){var q=this.__data__;if(q instanceof Ve){var ue=q.__data__;if(!Ze||ue.length<n-1)return ue.push([E,P]),this;q=this.__data__=new nn(ue)}return q.set(E,P),this}Mt.prototype.clear=Ea,Mt.prototype.delete=Is,Mt.prototype.get=Ia,Mt.prototype.has=_i,Mt.prototype.set=Rs;function Hr(E,P){var q=zr(E)||An(E)?L(E.length,String):[],ue=q.length,Je=!!ue;for(var je in E)Se.call(E,je)&&!(Je&&(je=="length"||Ce(je,ue)))&&q.push(je);return q}function As(E,P,q){var ue=E[P];(!(Se.call(E,P)&&Xn(ue,q))||q===void 0&&!(P in E))&&(E[P]=q)}function br(E,P){for(var q=E.length;q--;)if(Xn(E[q][0],P))return q;return-1}function qn(E,P){return E&&yo(P,Ma(P),E)}function an(E,P,q,ue,Je,je,dt){var ut;if(ue&&(ut=je?ue(E,Je,je,dt):ue(E)),ut!==void 0)return ut;if(!qr(E))return E;var qt=zr(E);if(qt){if(ut=Li(E),!P)return Na(E,ut)}else{var bt=yr(E),hn=bt==c||bt==d;if(Au(E))return Wr(E,P);if(bt==g||bt==i||hn&&!je){if(k(E))return je?E:{};if(ut=Yn(hn?{}:E),!P)return ki(E,qn(ut,E))}else{if(!H[bt])return je?E:{};ut=Pa(E,bt,an,P)}}dt||(dt=new Mt);var Tn=dt.get(E);if(Tn)return Tn;if(dt.set(E,ut),!qt)var Kt=q?ji(E):Ma(E);return Q(Kt||E,function(gn,ln){Kt&&(ln=gn,gn=E[ln]),As(ut,ln,an(gn,P,q,ue,ln,E,dt))}),ut}function Rn(E){return qr(E)?gt(E):{}}function vo(E,P,q){var ue=P(E);return zr(E)?ue:se(ue,q(E))}function Wo(E){return Ye.call(E)}function Ra(E){if(!qr(E)||Ke(E))return!1;var P=_a(E)||k(E)?at:G;return P.test(st(E))}function Mi(E){if(!It(E))return Bt(E);var P=[];for(var q in Object(E))Se.call(E,q)&&q!="constructor"&&P.push(q);return P}function Wr(E,P){if(P)return E.slice();var q=new E.constructor(E.length);return E.copy(q),q}function Di(E){var P=new E.constructor(E.byteLength);return new rt(P).set(new rt(E)),P}function Un(E,P){var q=P?Di(E.buffer):E.buffer;return new E.constructor(q,E.byteOffset,E.byteLength)}function zo(E,P,q){var ue=P?q(ie(E),!0):ie(E);return ae(ue,X,new E.constructor)}function qo(E){var P=new E.constructor(E.source,V.exec(E));return P.lastIndex=E.lastIndex,P}function Aa(E,P,q){var ue=P?q(le(E),!0):le(E);return ae(ue,te,new E.constructor)}function Ta(E){return _t?Object(_t.call(E)):{}}function Oa(E,P){var q=P?Di(E.buffer):E.buffer;return new E.constructor(q,E.byteOffset,E.length)}function Na(E,P){var q=-1,ue=E.length;for(P||(P=Array(ue));++q<ue;)P[q]=E[q];return P}function yo(E,P,q,ue){q||(q={});for(var Je=-1,je=P.length;++Je<je;){var dt=P[Je],ut=void 0;As(q,dt,ut===void 0?E[dt]:ut)}return q}function ki(E,P){return yo(E,vr(E),P)}function ji(E){return vo(E,Ma,vr)}function xo(E,P){var q=E.__data__;return Me(P)?q[typeof P=="string"?"string":"hash"]:q.map}function Dn(E,P){var q=Z(E,P);return Ra(q)?q:void 0}var vr=mt?Y(mt,Object):Qf,yr=Wo;(tt&&yr(new tt(new ArrayBuffer(1)))!=R||Ze&&yr(new Ze)!=f||ee&&yr(ee.resolve())!=m||ye&&yr(new ye)!=y||ge&&yr(new ge)!=C)&&(yr=function(E){var P=Ye.call(E),q=P==g?E.constructor:void 0,ue=q?st(q):void 0;if(ue)switch(ue){case Ae:return R;case Ie:return f;case qe:return m;case Pt:return y;case lt:return C}return P});function Li(E){var P=E.length,q=E.constructor(P);return P&&typeof E[0]=="string"&&Se.call(E,"index")&&(q.index=E.index,q.input=E.input),q}function Yn(E){return typeof E.constructor=="function"&&!It(E)?Rn(et(E)):{}}function Pa(E,P,q,ue){var Je=E.constructor;switch(P){case S:return Di(E);case a:case l:return new Je(+E);case R:return Un(E,ue);case I:case T:case _:case $:case A:case M:case O:case B:case j:return Oa(E,ue);case f:return zo(E,ue,q);case p:case x:return new Je(E);case v:return qo(E);case y:return Aa(E,ue,q);case w:return Ta(E)}}function Ce(E,P){return P=P??o,!!P&&(typeof E=="number"||z.test(E))&&E>-1&&E%1==0&&E<P}function Me(E){var P=typeof E;return P=="string"||P=="number"||P=="symbol"||P=="boolean"?E!=="__proto__":E===null}function Ke(E){return!!ve&&ve in E}function It(E){var P=E&&E.constructor,q=typeof P=="function"&&P.prototype||fe;return E===q}function st(E){if(E!=null){try{return we.call(E)}catch{}try{return E+""}catch{}}return""}function Dt(E){return an(E,!0,!0)}function Xn(E,P){return E===P||E!==E&&P!==P}function An(E){return Ru(E)&&Se.call(E,"callee")&&(!ct.call(E,"callee")||Ye.call(E)==i)}var zr=Array.isArray;function Uo(E){return E!=null&&Tu(E.length)&&!_a(E)}function Ru(E){return Ou(E)&&Uo(E)}var Au=Nt||ep;function _a(E){var P=qr(E)?Ye.call(E):"";return P==c||P==d}function Tu(E){return typeof E=="number"&&E>-1&&E%1==0&&E<=o}function qr(E){var P=typeof E;return!!E&&(P=="object"||P=="function")}function Ou(E){return!!E&&typeof E=="object"}function Ma(E){return Uo(E)?Hr(E):Mi(E)}function Qf(){return[]}function ep(){return!1}e.exports=Dt})(sl,sl.exports)),sl.exports}var al={exports:{}};al.exports;var uR;function Nj(){return uR||(uR=1,(function(e,t){var n=200,r="__lodash_hash_undefined__",o=1,i=2,s=9007199254740991,a="[object Arguments]",l="[object Array]",u="[object AsyncFunction]",c="[object Boolean]",d="[object Date]",f="[object Error]",p="[object Function]",g="[object GeneratorFunction]",m="[object Map]",v="[object Number]",y="[object Null]",x="[object Object]",w="[object Promise]",C="[object Proxy]",S="[object RegExp]",R="[object Set]",I="[object String]",T="[object Symbol]",_="[object Undefined]",$="[object WeakMap]",A="[object ArrayBuffer]",M="[object DataView]",O="[object Float32Array]",B="[object Float64Array]",j="[object Int8Array]",D="[object Int16Array]",V="[object Int32Array]",G="[object Uint8Array]",z="[object Uint8ClampedArray]",H="[object Uint16Array]",ne="[object Uint32Array]",W=/[\\^$.*+?()[\]{}|]/g,J=/^\[object .+?Constructor\]$/,K=/^(?:0|[1-9]\d*)$/,U={};U[O]=U[B]=U[j]=U[D]=U[V]=U[G]=U[z]=U[H]=U[ne]=!0,U[a]=U[l]=U[A]=U[c]=U[M]=U[d]=U[f]=U[p]=U[m]=U[v]=U[x]=U[S]=U[R]=U[I]=U[$]=!1;var oe=typeof ir=="object"&&ir&&ir.Object===Object&&ir,X=typeof self=="object"&&self&&self.Object===Object&&self,te=oe||X||Function("return this")(),Q=t&&!t.nodeType&&t,se=Q&&!0&&e&&!e.nodeType&&e,ae=se&&se.exports===Q,L=ae&&oe.process,Z=(function(){try{return L&&L.binding&&L.binding("util")}catch{}})(),k=Z&&Z.isTypedArray;function ie(E,P){for(var q=-1,ue=E==null?0:E.length,Je=0,je=[];++q<ue;){var dt=E[q];P(dt,q,E)&&(je[Je++]=dt)}return je}function Y(E,P){for(var q=-1,ue=P.length,Je=E.length;++q<ue;)E[Je+q]=P[q];return E}function le(E,P){for(var q=-1,ue=E==null?0:E.length;++q<ue;)if(P(E[q],q,E))return!0;return!1}function pe(E,P){for(var q=-1,ue=Array(E);++q<E;)ue[q]=P(q);return ue}function re(E){return function(P){return E(P)}}function fe(E,P){return E.has(P)}function de(E,P){return E?.[P]}function ve(E){var P=-1,q=Array(E.size);return E.forEach(function(ue,Je){q[++P]=[Je,ue]}),q}function we(E,P){return function(q){return E(P(q))}}function Se(E){var P=-1,q=Array(E.size);return E.forEach(function(ue){q[++P]=ue}),q}var Ye=Array.prototype,at=Function.prototype,Xe=Object.prototype,Ue=te["__core-js_shared__"],rt=at.toString,et=Xe.hasOwnProperty,gt=(function(){var E=/[^.]+$/.exec(Ue&&Ue.keys&&Ue.keys.IE_PROTO||"");return E?"Symbol(src)_1."+E:""})(),ct=Xe.toString,ot=RegExp("^"+rt.call(et).replace(W,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),mt=ae?te.Buffer:void 0,Nt=te.Symbol,Bt=te.Uint8Array,tt=Xe.propertyIsEnumerable,Ze=Ye.splice,ee=Nt?Nt.toStringTag:void 0,ye=Object.getOwnPropertySymbols,ge=mt?mt.isBuffer:void 0,xe=we(Object.keys,Object),Ae=vr(te,"DataView"),Ie=vr(te,"Map"),qe=vr(te,"Promise"),Pt=vr(te,"Set"),lt=vr(te,"WeakMap"),it=vr(Object,"create"),_t=st(Ae),Et=st(Ie),sn=st(qe),mr=st(Pt),Wn=st(lt),pn=Nt?Nt.prototype:void 0,Jt=pn?pn.valueOf:void 0;function Ve(E){var P=-1,q=E==null?0:E.length;for(this.clear();++P<q;){var ue=E[P];this.set(ue[0],ue[1])}}function zn(){this.__data__=it?it(null):{},this.size=0}function Sa(E){var P=this.has(E)&&delete this.__data__[E];return this.size-=P?1:0,P}function Oi(E){var P=this.__data__;if(it){var q=P[E];return q===r?void 0:q}return et.call(P,E)?P[E]:void 0}function Ni(E){var P=this.__data__;return it?P[E]!==void 0:et.call(P,E)}function Go(E,P){var q=this.__data__;return this.size+=this.has(E)?0:1,q[E]=it&&P===void 0?r:P,this}Ve.prototype.clear=zn,Ve.prototype.delete=Sa,Ve.prototype.get=Oi,Ve.prototype.has=Ni,Ve.prototype.set=Go;function nn(E){var P=-1,q=E==null?0:E.length;for(this.clear();++P<q;){var ue=E[P];this.set(ue[0],ue[1])}}function Ho(){this.__data__=[],this.size=0}function Es(E){var P=this.__data__,q=Wr(P,E);if(q<0)return!1;var ue=P.length-1;return q==ue?P.pop():Ze.call(P,q,1),--this.size,!0}function bo(E){var P=this.__data__,q=Wr(P,E);return q<0?void 0:P[q][1]}function Pi(E){return Wr(this.__data__,E)>-1}function Cn(E,P){var q=this.__data__,ue=Wr(q,E);return ue<0?(++this.size,q.push([E,P])):q[ue][1]=P,this}nn.prototype.clear=Ho,nn.prototype.delete=Es,nn.prototype.get=bo,nn.prototype.has=Pi,nn.prototype.set=Cn;function Mt(E){var P=-1,q=E==null?0:E.length;for(this.clear();++P<q;){var ue=E[P];this.set(ue[0],ue[1])}}function Ea(){this.size=0,this.__data__={hash:new Ve,map:new(Ie||nn),string:new Ve}}function Is(E){var P=Dn(this,E).delete(E);return this.size-=P?1:0,P}function Ia(E){return Dn(this,E).get(E)}function _i(E){return Dn(this,E).has(E)}function Rs(E,P){var q=Dn(this,E),ue=q.size;return q.set(E,P),this.size+=q.size==ue?0:1,this}Mt.prototype.clear=Ea,Mt.prototype.delete=Is,Mt.prototype.get=Ia,Mt.prototype.has=_i,Mt.prototype.set=Rs;function Hr(E){var P=-1,q=E==null?0:E.length;for(this.__data__=new Mt;++P<q;)this.add(E[P])}function As(E){return this.__data__.set(E,r),this}function br(E){return this.__data__.has(E)}Hr.prototype.add=Hr.prototype.push=As,Hr.prototype.has=br;function qn(E){var P=this.__data__=new nn(E);this.size=P.size}function an(){this.__data__=new nn,this.size=0}function Rn(E){var P=this.__data__,q=P.delete(E);return this.size=P.size,q}function vo(E){return this.__data__.get(E)}function Wo(E){return this.__data__.has(E)}function Ra(E,P){var q=this.__data__;if(q instanceof nn){var ue=q.__data__;if(!Ie||ue.length<n-1)return ue.push([E,P]),this.size=++q.size,this;q=this.__data__=new Mt(ue)}return q.set(E,P),this.size=q.size,this}qn.prototype.clear=an,qn.prototype.delete=Rn,qn.prototype.get=vo,qn.prototype.has=Wo,qn.prototype.set=Ra;function Mi(E,P){var q=An(E),ue=!q&&Xn(E),Je=!q&&!ue&&Uo(E),je=!q&&!ue&&!Je&&Ou(E),dt=q||ue||Je||je,ut=dt?pe(E.length,String):[],qt=ut.length;for(var bt in E)et.call(E,bt)&&!(dt&&(bt=="length"||Je&&(bt=="offset"||bt=="parent")||je&&(bt=="buffer"||bt=="byteLength"||bt=="byteOffset")||Pa(bt,qt)))&&ut.push(bt);return ut}function Wr(E,P){for(var q=E.length;q--;)if(Dt(E[q][0],P))return q;return-1}function Di(E,P,q){var ue=P(E);return An(E)?ue:Y(ue,q(E))}function Un(E){return E==null?E===void 0?_:y:ee&&ee in Object(E)?yr(E):It(E)}function zo(E){return qr(E)&&Un(E)==a}function qo(E,P,q,ue,Je){return E===P?!0:E==null||P==null||!qr(E)&&!qr(P)?E!==E&&P!==P:Aa(E,P,q,ue,qo,Je)}function Aa(E,P,q,ue,Je,je){var dt=An(E),ut=An(P),qt=dt?l:Yn(E),bt=ut?l:Yn(P);qt=qt==a?x:qt,bt=bt==a?x:bt;var hn=qt==x,Tn=bt==x,Kt=qt==bt;if(Kt&&Uo(E)){if(!Uo(P))return!1;dt=!0,hn=!1}if(Kt&&!hn)return je||(je=new qn),dt||Ou(E)?yo(E,P,q,ue,Je,je):ki(E,P,qt,q,ue,Je,je);if(!(q&o)){var gn=hn&&et.call(E,"__wrapped__"),ln=Tn&&et.call(P,"__wrapped__");if(gn||ln){var Yo=gn?E.value():E,wo=ln?P.value():P;return je||(je=new qn),Je(Yo,wo,q,ue,je)}}return Kt?(je||(je=new qn),ji(E,P,q,ue,Je,je)):!1}function Ta(E){if(!Tu(E)||Me(E))return!1;var P=Au(E)?ot:J;return P.test(st(E))}function Oa(E){return qr(E)&&_a(E.length)&&!!U[Un(E)]}function Na(E){if(!Ke(E))return xe(E);var P=[];for(var q in Object(E))et.call(E,q)&&q!="constructor"&&P.push(q);return P}function yo(E,P,q,ue,Je,je){var dt=q&o,ut=E.length,qt=P.length;if(ut!=qt&&!(dt&&qt>ut))return!1;var bt=je.get(E);if(bt&&je.get(P))return bt==P;var hn=-1,Tn=!0,Kt=q&i?new Hr:void 0;for(je.set(E,P),je.set(P,E);++hn<ut;){var gn=E[hn],ln=P[hn];if(ue)var Yo=dt?ue(ln,gn,hn,P,E,je):ue(gn,ln,hn,E,P,je);if(Yo!==void 0){if(Yo)continue;Tn=!1;break}if(Kt){if(!le(P,function(wo,Fi){if(!fe(Kt,Fi)&&(gn===wo||Je(gn,wo,q,ue,je)))return Kt.push(Fi)})){Tn=!1;break}}else if(!(gn===ln||Je(gn,ln,q,ue,je))){Tn=!1;break}}return je.delete(E),je.delete(P),Tn}function ki(E,P,q,ue,Je,je,dt){switch(q){case M:if(E.byteLength!=P.byteLength||E.byteOffset!=P.byteOffset)return!1;E=E.buffer,P=P.buffer;case A:return!(E.byteLength!=P.byteLength||!je(new Bt(E),new Bt(P)));case c:case d:case v:return Dt(+E,+P);case f:return E.name==P.name&&E.message==P.message;case S:case I:return E==P+"";case m:var ut=ve;case R:var qt=ue&o;if(ut||(ut=Se),E.size!=P.size&&!qt)return!1;var bt=dt.get(E);if(bt)return bt==P;ue|=i,dt.set(E,P);var hn=yo(ut(E),ut(P),ue,Je,je,dt);return dt.delete(E),hn;case T:if(Jt)return Jt.call(E)==Jt.call(P)}return!1}function ji(E,P,q,ue,Je,je){var dt=q&o,ut=xo(E),qt=ut.length,bt=xo(P),hn=bt.length;if(qt!=hn&&!dt)return!1;for(var Tn=qt;Tn--;){var Kt=ut[Tn];if(!(dt?Kt in P:et.call(P,Kt)))return!1}var gn=je.get(E);if(gn&&je.get(P))return gn==P;var ln=!0;je.set(E,P),je.set(P,E);for(var Yo=dt;++Tn<qt;){Kt=ut[Tn];var wo=E[Kt],Fi=P[Kt];if(ue)var Wx=dt?ue(Fi,wo,Kt,P,E,je):ue(wo,Fi,Kt,E,P,je);if(!(Wx===void 0?wo===Fi||Je(wo,Fi,q,ue,je):Wx)){ln=!1;break}Yo||(Yo=Kt=="constructor")}if(ln&&!Yo){var Nu=E.constructor,Pu=P.constructor;Nu!=Pu&&"constructor"in E&&"constructor"in P&&!(typeof Nu=="function"&&Nu instanceof Nu&&typeof Pu=="function"&&Pu instanceof Pu)&&(ln=!1)}return je.delete(E),je.delete(P),ln}function xo(E){return Di(E,Ma,Li)}function Dn(E,P){var q=E.__data__;return Ce(P)?q[typeof P=="string"?"string":"hash"]:q.map}function vr(E,P){var q=de(E,P);return Ta(q)?q:void 0}function yr(E){var P=et.call(E,ee),q=E[ee];try{E[ee]=void 0;var ue=!0}catch{}var Je=ct.call(E);return ue&&(P?E[ee]=q:delete E[ee]),Je}var Li=ye?function(E){return E==null?[]:(E=Object(E),ie(ye(E),function(P){return tt.call(E,P)}))}:Qf,Yn=Un;(Ae&&Yn(new Ae(new ArrayBuffer(1)))!=M||Ie&&Yn(new Ie)!=m||qe&&Yn(qe.resolve())!=w||Pt&&Yn(new Pt)!=R||lt&&Yn(new lt)!=$)&&(Yn=function(E){var P=Un(E),q=P==x?E.constructor:void 0,ue=q?st(q):"";if(ue)switch(ue){case _t:return M;case Et:return m;case sn:return w;case mr:return R;case Wn:return $}return P});function Pa(E,P){return P=P??s,!!P&&(typeof E=="number"||K.test(E))&&E>-1&&E%1==0&&E<P}function Ce(E){var P=typeof E;return P=="string"||P=="number"||P=="symbol"||P=="boolean"?E!=="__proto__":E===null}function Me(E){return!!gt&> in E}function Ke(E){var P=E&&E.constructor,q=typeof P=="function"&&P.prototype||Xe;return E===q}function It(E){return ct.call(E)}function st(E){if(E!=null){try{return rt.call(E)}catch{}try{return E+""}catch{}}return""}function Dt(E,P){return E===P||E!==E&&P!==P}var Xn=zo((function(){return arguments})())?zo:function(E){return qr(E)&&et.call(E,"callee")&&!tt.call(E,"callee")},An=Array.isArray;function zr(E){return E!=null&&_a(E.length)&&!Au(E)}var Uo=ge||ep;function Ru(E,P){return qo(E,P)}function Au(E){if(!Tu(E))return!1;var P=Un(E);return P==p||P==g||P==u||P==C}function _a(E){return typeof E=="number"&&E>-1&&E%1==0&&E<=s}function Tu(E){var P=typeof E;return E!=null&&(P=="object"||P=="function")}function qr(E){return E!=null&&typeof E=="object"}var Ou=k?re(k):Oa;function Ma(E){return zr(E)?Mi(E):Na(E)}function Qf(){return[]}function ep(){return!1}e.exports=Ru})(al,al.exports)),al.exports}var pc={},cR;function gue(){if(cR)return pc;cR=1,Object.defineProperty(pc,"__esModule",{value:!0});const e=Oj(),t=Nj();var n;return(function(r){function o(l={},u={},c=!1){typeof l!="object"&&(l={}),typeof u!="object"&&(u={});let d=e(u);c||(d=Object.keys(d).reduce((f,p)=>(d[p]!=null&&(f[p]=d[p]),f),{}));for(const f in l)l[f]!==void 0&&u[f]===void 0&&(d[f]=l[f]);return Object.keys(d).length>0?d:void 0}r.compose=o;function i(l={},u={}){typeof l!="object"&&(l={}),typeof u!="object"&&(u={});const c=Object.keys(l).concat(Object.keys(u)).reduce((d,f)=>(t(l[f],u[f])||(d[f]=u[f]===void 0?null:u[f]),d),{});return Object.keys(c).length>0?c:void 0}r.diff=i;function s(l={},u={}){l=l||{};const c=Object.keys(u).reduce((d,f)=>(u[f]!==l[f]&&l[f]!==void 0&&(d[f]=u[f]),d),{});return Object.keys(l).reduce((d,f)=>(l[f]!==u[f]&&u[f]===void 0&&(d[f]=null),d),c)}r.invert=s;function a(l,u,c=!1){if(typeof l!="object")return u;if(typeof u!="object")return;if(!c)return u;const d=Object.keys(u).reduce((f,p)=>(l[p]===void 0&&(f[p]=u[p]),f),{});return Object.keys(d).length>0?d:void 0}r.transform=a})(n||(n={})),pc.default=n,pc}var hc={},dR;function Pj(){if(dR)return hc;dR=1,Object.defineProperty(hc,"__esModule",{value:!0});var e;return(function(t){function n(r){return typeof r.delete=="number"?r.delete:typeof r.retain=="number"?r.retain:typeof r.retain=="object"&&r.retain!==null?1:typeof r.insert=="string"?r.insert.length:1}t.length=n})(e||(e={})),hc.default=e,hc}var gc={},fR;function mue(){if(fR)return gc;fR=1,Object.defineProperty(gc,"__esModule",{value:!0});const e=Pj();class t{constructor(r){this.ops=r,this.index=0,this.offset=0}hasNext(){return this.peekLength()<1/0}next(r){r||(r=1/0);const o=this.ops[this.index];if(o){const i=this.offset,s=e.default.length(o);if(r>=s-i?(r=s-i,this.index+=1,this.offset=0):this.offset+=r,typeof o.delete=="number")return{delete:r};{const a={};return o.attributes&&(a.attributes=o.attributes),typeof o.retain=="number"?a.retain=r:typeof o.retain=="object"&&o.retain!==null?a.retain=o.retain:typeof o.insert=="string"?a.insert=o.insert.substr(i,r):a.insert=o.insert,a}}else return{retain:1/0}}peek(){return this.ops[this.index]}peekLength(){return this.ops[this.index]?e.default.length(this.ops[this.index])-this.offset:1/0}peekType(){const r=this.ops[this.index];return r?typeof r.delete=="number"?"delete":typeof r.retain=="number"||typeof r.retain=="object"&&r.retain!==null?"retain":"insert":"retain"}rest(){if(this.hasNext()){if(this.offset===0)return this.ops.slice(this.index);{const r=this.offset,o=this.index,i=this.next(),s=this.ops.slice(this.index);return this.offset=r,this.index=o,[i].concat(s)}}else return[]}}return gc.default=t,gc}var pR;function bue(){return pR||(pR=1,(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.AttributeMap=t.OpIterator=t.Op=void 0;const n=hue(),r=Oj(),o=Nj(),i=gue();t.AttributeMap=i.default;const s=Pj();t.Op=s.default;const a=mue();t.OpIterator=a.default;const l="\0",u=(d,f)=>{if(typeof d!="object"||d===null)throw new Error(`cannot retain a ${typeof d}`);if(typeof f!="object"||f===null)throw new Error(`cannot retain a ${typeof f}`);const p=Object.keys(d)[0];if(!p||p!==Object.keys(f)[0])throw new Error(`embed types not matched: ${p} != ${Object.keys(f)[0]}`);return[p,d[p],f[p]]};class c{constructor(f){Array.isArray(f)?this.ops=f:f!=null&&Array.isArray(f.ops)?this.ops=f.ops:this.ops=[]}static registerEmbed(f,p){this.handlers[f]=p}static unregisterEmbed(f){delete this.handlers[f]}static getHandler(f){const p=this.handlers[f];if(!p)throw new Error(`no handlers for embed type "${f}"`);return p}insert(f,p){const g={};return typeof f=="string"&&f.length===0?this:(g.insert=f,p!=null&&typeof p=="object"&&Object.keys(p).length>0&&(g.attributes=p),this.push(g))}delete(f){return f<=0?this:this.push({delete:f})}retain(f,p){if(typeof f=="number"&&f<=0)return this;const g={retain:f};return p!=null&&typeof p=="object"&&Object.keys(p).length>0&&(g.attributes=p),this.push(g)}push(f){let p=this.ops.length,g=this.ops[p-1];if(f=r(f),typeof g=="object"){if(typeof f.delete=="number"&&typeof g.delete=="number")return this.ops[p-1]={delete:g.delete+f.delete},this;if(typeof g.delete=="number"&&f.insert!=null&&(p-=1,g=this.ops[p-1],typeof g!="object"))return this.ops.unshift(f),this;if(o(f.attributes,g.attributes)){if(typeof f.insert=="string"&&typeof g.insert=="string")return this.ops[p-1]={insert:g.insert+f.insert},typeof f.attributes=="object"&&(this.ops[p-1].attributes=f.attributes),this;if(typeof f.retain=="number"&&typeof g.retain=="number")return this.ops[p-1]={retain:g.retain+f.retain},typeof f.attributes=="object"&&(this.ops[p-1].attributes=f.attributes),this}}return p===this.ops.length?this.ops.push(f):this.ops.splice(p,0,f),this}chop(){const f=this.ops[this.ops.length-1];return f&&typeof f.retain=="number"&&!f.attributes&&this.ops.pop(),this}filter(f){return this.ops.filter(f)}forEach(f){this.ops.forEach(f)}map(f){return this.ops.map(f)}partition(f){const p=[],g=[];return this.forEach(m=>{(f(m)?p:g).push(m)}),[p,g]}reduce(f,p){return this.ops.reduce(f,p)}changeLength(){return this.reduce((f,p)=>p.insert?f+s.default.length(p):p.delete?f-p.delete:f,0)}length(){return this.reduce((f,p)=>f+s.default.length(p),0)}slice(f=0,p=1/0){const g=[],m=new a.default(this.ops);let v=0;for(;v<p&&m.hasNext();){let y;v<f?y=m.next(f-v):(y=m.next(p-v),g.push(y)),v+=s.default.length(y)}return new c(g)}compose(f){const p=new a.default(this.ops),g=new a.default(f.ops),m=[],v=g.peek();if(v!=null&&typeof v.retain=="number"&&v.attributes==null){let x=v.retain;for(;p.peekType()==="insert"&&p.peekLength()<=x;)x-=p.peekLength(),m.push(p.next());v.retain-x>0&&g.next(v.retain-x)}const y=new c(m);for(;p.hasNext()||g.hasNext();)if(g.peekType()==="insert")y.push(g.next());else if(p.peekType()==="delete")y.push(p.next());else{const x=Math.min(p.peekLength(),g.peekLength()),w=p.next(x),C=g.next(x);if(C.retain){const S={};if(typeof w.retain=="number")S.retain=typeof C.retain=="number"?x:C.retain;else if(typeof C.retain=="number")w.retain==null?S.insert=w.insert:S.retain=w.retain;else{const I=w.retain==null?"insert":"retain",[T,_,$]=u(w[I],C.retain),A=c.getHandler(T);S[I]={[T]:A.compose(_,$,I==="retain")}}const R=i.default.compose(w.attributes,C.attributes,typeof w.retain=="number");if(R&&(S.attributes=R),y.push(S),!g.hasNext()&&o(y.ops[y.ops.length-1],S)){const I=new c(p.rest());return y.concat(I).chop()}}else typeof C.delete=="number"&&(typeof w.retain=="number"||typeof w.retain=="object"&&w.retain!==null)&&y.push(C)}return y.chop()}concat(f){const p=new c(this.ops.slice());return f.ops.length>0&&(p.push(f.ops[0]),p.ops=p.ops.concat(f.ops.slice(1))),p}diff(f,p){if(this.ops===f.ops)return new c;const g=[this,f].map(w=>w.map(C=>{if(C.insert!=null)return typeof C.insert=="string"?C.insert:l;const S=w===f?"on":"with";throw new Error("diff() called "+S+" non-document")}).join("")),m=new c,v=n(g[0],g[1],p,!0),y=new a.default(this.ops),x=new a.default(f.ops);return v.forEach(w=>{let C=w[1].length;for(;C>0;){let S=0;switch(w[0]){case n.INSERT:S=Math.min(x.peekLength(),C),m.push(x.next(S));break;case n.DELETE:S=Math.min(C,y.peekLength()),y.next(S),m.delete(S);break;case n.EQUAL:S=Math.min(y.peekLength(),x.peekLength(),C);const R=y.next(S),I=x.next(S);o(R.insert,I.insert)?m.retain(S,i.default.diff(R.attributes,I.attributes)):m.push(I).delete(S);break}C-=S}}),m.chop()}eachLine(f,p=`
|
|
112
|
+
`]))),one=function(t,n){var r=t.isFocused,o=t.size,i=t.theme,s=i.colors,a=i.spacing.baseUnit;return $e({label:"loadingIndicator",display:"flex",transition:"color 150ms",alignSelf:"center",fontSize:o,lineHeight:1,marginRight:o,textAlign:"center",verticalAlign:"middle"},n?{}:{color:r?s.neutral60:s.neutral20,padding:a*2})},Gm=function(t){var n=t.delay,r=t.offset;return Fe("span",{css:mx({animation:"".concat(rne," 1s ease-in-out ").concat(n,"ms infinite;"),backgroundColor:"currentColor",borderRadius:"1em",display:"inline-block",marginLeft:r?"1em":void 0,height:"1em",verticalAlign:"top",width:"1em"},process.env.NODE_ENV==="production"?"":";label:LoadingDot;",process.env.NODE_ENV==="production"?"":"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImluZGljYXRvcnMudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQW1RSSIsImZpbGUiOiJpbmRpY2F0b3JzLnRzeCIsInNvdXJjZXNDb250ZW50IjpbIi8qKiBAanN4IGpzeCAqL1xuaW1wb3J0IHsgSlNYLCBSZWFjdE5vZGUgfSBmcm9tICdyZWFjdCc7XG5pbXBvcnQgeyBqc3gsIGtleWZyYW1lcyB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcblxuaW1wb3J0IHtcbiAgQ29tbW9uUHJvcHNBbmRDbGFzc05hbWUsXG4gIENTU09iamVjdFdpdGhMYWJlbCxcbiAgR3JvdXBCYXNlLFxufSBmcm9tICcuLi90eXBlcyc7XG5pbXBvcnQgeyBnZXRTdHlsZVByb3BzIH0gZnJvbSAnLi4vdXRpbHMnO1xuXG4vLyA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT1cbi8vIERyb3Bkb3duICYgQ2xlYXIgSWNvbnNcbi8vID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PVxuXG5jb25zdCBTdmcgPSAoe1xuICBzaXplLFxuICAuLi5wcm9wc1xufTogSlNYLkludHJpbnNpY0VsZW1lbnRzWydzdmcnXSAmIHsgc2l6ZTogbnVtYmVyIH0pID0+IChcbiAgPHN2Z1xuICAgIGhlaWdodD17c2l6ZX1cbiAgICB3aWR0aD17c2l6ZX1cbiAgICB2aWV3Qm94PVwiMCAwIDIwIDIwXCJcbiAgICBhcmlhLWhpZGRlbj1cInRydWVcIlxuICAgIGZvY3VzYWJsZT1cImZhbHNlXCJcbiAgICBjc3M9e3tcbiAgICAgIGRpc3BsYXk6ICdpbmxpbmUtYmxvY2snLFxuICAgICAgZmlsbDogJ2N1cnJlbnRDb2xvcicsXG4gICAgICBsaW5lSGVpZ2h0OiAxLFxuICAgICAgc3Ryb2tlOiAnY3VycmVudENvbG9yJyxcbiAgICAgIHN0cm9rZVdpZHRoOiAwLFxuICAgIH19XG4gICAgey4uLnByb3BzfVxuICAvPlxuKTtcblxuZXhwb3J0IHR5cGUgQ3Jvc3NJY29uUHJvcHMgPSBKU1guSW50cmluc2ljRWxlbWVudHNbJ3N2ZyddICYgeyBzaXplPzogbnVtYmVyIH07XG5leHBvcnQgY29uc3QgQ3Jvc3NJY29uID0gKHByb3BzOiBDcm9zc0ljb25Qcm9wcykgPT4gKFxuICA8U3ZnIHNpemU9ezIwfSB7Li4ucHJvcHN9PlxuICAgIDxwYXRoIGQ9XCJNMTQuMzQ4IDE0Ljg0OWMtMC40NjkgMC40NjktMS4yMjkgMC40NjktMS42OTcgMGwtMi42NTEtMy4wMzAtMi42NTEgMy4wMjljLTAuNDY5IDAuNDY5LTEuMjI5IDAuNDY5LTEuNjk3IDAtMC40NjktMC40NjktMC40NjktMS4yMjkgMC0xLjY5N2wyLjc1OC0zLjE1LTIuNzU5LTMuMTUyYy0wLjQ2OS0wLjQ2OS0wLjQ2OS0xLjIyOCAwLTEuNjk3czEuMjI4LTAuNDY5IDEuNjk3IDBsMi42NTIgMy4wMzEgMi42NTEtMy4wMzFjMC40NjktMC40NjkgMS4yMjgtMC40NjkgMS42OTcgMHMwLjQ2OSAxLjIyOSAwIDEuNjk3bC0yLjc1OCAzLjE1MiAyLjc1OCAzLjE1YzAuNDY5IDAuNDY5IDAuNDY5IDEuMjI5IDAgMS42OTh6XCIgLz5cbiAgPC9Tdmc+XG4pO1xuZXhwb3J0IHR5cGUgRG93bkNoZXZyb25Qcm9wcyA9IEpTWC5JbnRyaW5zaWNFbGVtZW50c1snc3ZnJ10gJiB7IHNpemU/OiBudW1iZXIgfTtcbmV4cG9ydCBjb25zdCBEb3duQ2hldnJvbiA9IChwcm9wczogRG93bkNoZXZyb25Qcm9wcykgPT4gKFxuICA8U3ZnIHNpemU9ezIwfSB7Li4ucHJvcHN9PlxuICAgIDxwYXRoIGQ9XCJNNC41MTYgNy41NDhjMC40MzYtMC40NDYgMS4wNDMtMC40ODEgMS41NzYgMGwzLjkwOCAzLjc0NyAzLjkwOC0zLjc0N2MwLjUzMy0wLjQ4MSAxLjE0MS0wLjQ0NiAxLjU3NCAwIDAuNDM2IDAuNDQ1IDAuNDA4IDEuMTk3IDAgMS42MTUtMC40MDYgMC40MTgtNC42OTUgNC41MDItNC42OTUgNC41MDItMC4yMTcgMC4yMjMtMC41MDIgMC4zMzUtMC43ODcgMC4zMzVzLTAuNTctMC4xMTItMC43ODktMC4zMzVjMCAwLTQuMjg3LTQuMDg0LTQuNjk1LTQuNTAycy0wLjQzNi0xLjE3IDAtMS42MTV6XCIgLz5cbiAgPC9Tdmc+XG4pO1xuXG4vLyA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT1cbi8vIERyb3Bkb3duICYgQ2xlYXIgQnV0dG9uc1xuLy8gPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09XG5cbmV4cG9ydCBpbnRlcmZhY2UgRHJvcGRvd25JbmRpY2F0b3JQcm9wczxcbiAgT3B0aW9uID0gdW5rbm93bixcbiAgSXNNdWx0aSBleHRlbmRzIGJvb2xlYW4gPSBib29sZWFuLFxuICBHcm91cCBleHRlbmRzIEdyb3VwQmFzZTxPcHRpb24+ID0gR3JvdXBCYXNlPE9wdGlvbj5cbj4gZXh0ZW5kcyBDb21tb25Qcm9wc0FuZENsYXNzTmFtZTxPcHRpb24sIElzTXVsdGksIEdyb3VwPiB7XG4gIC8qKiBUaGUgY2hpbGRyZW4gdG8gYmUgcmVuZGVyZWQgaW5zaWRlIHRoZSBpbmRpY2F0b3IuICovXG4gIGNoaWxkcmVuPzogUmVhY3ROb2RlO1xuICAvKiogUHJvcHMgdGhhdCB3aWxsIGJlIHBhc3NlZCBvbiB0byB0aGUgY2hpbGRyZW4uICovXG4gIGlubmVyUHJvcHM6IEpTWC5JbnRyaW5zaWNFbGVtZW50c1snZGl2J107XG4gIC8qKiBUaGUgZm9jdXNlZCBzdGF0ZSBvZiB0aGUgc2VsZWN0LiAqL1xuICBpc0ZvY3VzZWQ6IGJvb2xlYW47XG4gIGlzRGlzYWJsZWQ6IGJvb2xlYW47XG59XG5cbmNvbnN0IGJhc2VDU1MgPSA8XG4gIE9wdGlvbixcbiAgSXNNdWx0aSBleHRlbmRzIGJvb2xlYW4sXG4gIEdyb3VwIGV4dGVuZHMgR3JvdXBCYXNlPE9wdGlvbj5cbj4oXG4gIHtcbiAgICBpc0ZvY3VzZWQsXG4gICAgdGhlbWU6IHtcbiAgICAgIHNwYWNpbmc6IHsgYmFzZVVuaXQgfSxcbiAgICAgIGNvbG9ycyxcbiAgICB9LFxuICB9OlxuICAgIHwgRHJvcGRvd25JbmRpY2F0b3JQcm9wczxPcHRpb24sIElzTXVsdGksIEdyb3VwPlxuICAgIHwgQ2xlYXJJbmRpY2F0b3JQcm9wczxPcHRpb24sIElzTXVsdGksIEdyb3VwPixcbiAgdW5zdHlsZWQ6IGJvb2xlYW5cbik6IENTU09iamVjdFdpdGhMYWJlbCA9PiAoe1xuICBsYWJlbDogJ2luZGljYXRvckNvbnRhaW5lcicsXG4gIGRpc3BsYXk6ICdmbGV4JyxcbiAgdHJhbnNpdGlvbjogJ2NvbG9yIDE1MG1zJyxcbiAgLi4uKHVuc3R5bGVkXG4gICAgPyB7fVxuICAgIDoge1xuICAgICAgICBjb2xvcjogaXNGb2N1c2VkID8gY29sb3JzLm5ldXRyYWw2MCA6IGNvbG9ycy5uZXV0cmFsMjAsXG4gICAgICAgIHBhZGRpbmc6IGJhc2VVbml0ICogMixcbiAgICAgICAgJzpob3Zlcic6IHtcbiAgICAgICAgICBjb2xvcjogaXNGb2N1c2VkID8gY29sb3JzLm5ldXRyYWw4MCA6IGNvbG9ycy5uZXV0cmFsNDAsXG4gICAgICAgIH0sXG4gICAgICB9KSxcbn0pO1xuXG5leHBvcnQgY29uc3QgZHJvcGRvd25JbmRpY2F0b3JDU1MgPSBiYXNlQ1NTO1xuZXhwb3J0IGNvbnN0IERyb3Bkb3duSW5kaWNhdG9yID0gPFxuICBPcHRpb24sXG4gIElzTXVsdGkgZXh0ZW5kcyBib29sZWFuLFxuICBHcm91cCBleHRlbmRzIEdyb3VwQmFzZTxPcHRpb24+XG4+KFxuICBwcm9wczogRHJvcGRvd25JbmRpY2F0b3JQcm9wczxPcHRpb24sIElzTXVsdGksIEdyb3VwPlxuKSA9PiB7XG4gIGNvbnN0IHsgY2hpbGRyZW4sIGlubmVyUHJvcHMgfSA9IHByb3BzO1xuICByZXR1cm4gKFxuICAgIDxkaXZcbiAgICAgIHsuLi5nZXRTdHlsZVByb3BzKHByb3BzLCAnZHJvcGRvd25JbmRpY2F0b3InLCB7XG4gICAgICAgIGluZGljYXRvcjogdHJ1ZSxcbiAgICAgICAgJ2Ryb3Bkb3duLWluZGljYXRvcic6IHRydWUsXG4gICAgICB9KX1cbiAgICAgIHsuLi5pbm5lclByb3BzfVxuICAgID5cbiAgICAgIHtjaGlsZHJlbiB8fCA8RG93bkNoZXZyb24gLz59XG4gICAgPC9kaXY+XG4gICk7XG59O1xuXG5leHBvcnQgaW50ZXJmYWNlIENsZWFySW5kaWNhdG9yUHJvcHM8XG4gIE9wdGlvbiA9IHVua25vd24sXG4gIElzTXVsdGkgZXh0ZW5kcyBib29sZWFuID0gYm9vbGVhbixcbiAgR3JvdXAgZXh0ZW5kcyBHcm91cEJhc2U8T3B0aW9uPiA9IEdyb3VwQmFzZTxPcHRpb24+XG4+IGV4dGVuZHMgQ29tbW9uUHJvcHNBbmRDbGFzc05hbWU8T3B0aW9uLCBJc011bHRpLCBHcm91cD4ge1xuICAvKiogVGhlIGNoaWxkcmVuIHRvIGJlIHJlbmRlcmVkIGluc2lkZSB0aGUgaW5kaWNhdG9yLiAqL1xuICBjaGlsZHJlbj86IFJlYWN0Tm9kZTtcbiAgLyoqIFByb3BzIHRoYXQgd2lsbCBiZSBwYXNzZWQgb24gdG8gdGhlIGNoaWxkcmVuLiAqL1xuICBpbm5lclByb3BzOiBKU1guSW50cmluc2ljRWxlbWVudHNbJ2RpdiddO1xuICAvKiogVGhlIGZvY3VzZWQgc3RhdGUgb2YgdGhlIHNlbGVjdC4gKi9cbiAgaXNGb2N1c2VkOiBib29sZWFuO1xufVxuXG5leHBvcnQgY29uc3QgY2xlYXJJbmRpY2F0b3JDU1MgPSBiYXNlQ1NTO1xuZXhwb3J0IGNvbnN0IENsZWFySW5kaWNhdG9yID0gPFxuICBPcHRpb24sXG4gIElzTXVsdGkgZXh0ZW5kcyBib29sZWFuLFxuICBHcm91cCBleHRlbmRzIEdyb3VwQmFzZTxPcHRpb24+XG4+KFxuICBwcm9wczogQ2xlYXJJbmRpY2F0b3JQcm9wczxPcHRpb24sIElzTXVsdGksIEdyb3VwPlxuKSA9PiB7XG4gIGNvbnN0IHsgY2hpbGRyZW4sIGlubmVyUHJvcHMgfSA9IHByb3BzO1xuICByZXR1cm4gKFxuICAgIDxkaXZcbiAgICAgIHsuLi5nZXRTdHlsZVByb3BzKHByb3BzLCAnY2xlYXJJbmRpY2F0b3InLCB7XG4gICAgICAgIGluZGljYXRvcjogdHJ1ZSxcbiAgICAgICAgJ2NsZWFyLWluZGljYXRvcic6IHRydWUsXG4gICAgICB9KX1cbiAgICAgIHsuLi5pbm5lclByb3BzfVxuICAgID5cbiAgICAgIHtjaGlsZHJlbiB8fCA8Q3Jvc3NJY29uIC8+fVxuICAgIDwvZGl2PlxuICApO1xufTtcblxuLy8gPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09XG4vLyBTZXBhcmF0b3Jcbi8vID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PVxuXG5leHBvcnQgaW50ZXJmYWNlIEluZGljYXRvclNlcGFyYXRvclByb3BzPFxuICBPcHRpb24gPSB1bmtub3duLFxuICBJc011bHRpIGV4dGVuZHMgYm9vbGVhbiA9IGJvb2xlYW4sXG4gIEdyb3VwIGV4dGVuZHMgR3JvdXBCYXNlPE9wdGlvbj4gPSBHcm91cEJhc2U8T3B0aW9uPlxuPiBleHRlbmRzIENvbW1vblByb3BzQW5kQ2xhc3NOYW1lPE9wdGlvbiwgSXNNdWx0aSwgR3JvdXA+IHtcbiAgaXNEaXNhYmxlZDogYm9vbGVhbjtcbiAgaXNGb2N1c2VkOiBib29sZWFuO1xuICBpbm5lclByb3BzPzogSlNYLkludHJpbnNpY0VsZW1lbnRzWydzcGFuJ107XG59XG5cbmV4cG9ydCBjb25zdCBpbmRpY2F0b3JTZXBhcmF0b3JDU1MgPSA8XG4gIE9wdGlvbixcbiAgSXNNdWx0aSBleHRlbmRzIGJvb2xlYW4sXG4gIEdyb3VwIGV4dGVuZHMgR3JvdXBCYXNlPE9wdGlvbj5cbj4oXG4gIHtcbiAgICBpc0Rpc2FibGVkLFxuICAgIHRoZW1lOiB7XG4gICAgICBzcGFjaW5nOiB7IGJhc2VVbml0IH0sXG4gICAgICBjb2xvcnMsXG4gICAgfSxcbiAgfTogSW5kaWNhdG9yU2VwYXJhdG9yUHJvcHM8T3B0aW9uLCBJc011bHRpLCBHcm91cD4sXG4gIHVuc3R5bGVkOiBib29sZWFuXG4pOiBDU1NPYmplY3RXaXRoTGFiZWwgPT4gKHtcbiAgbGFiZWw6ICdpbmRpY2F0b3JTZXBhcmF0b3InLFxuICBhbGlnblNlbGY6ICdzdHJldGNoJyxcbiAgd2lkdGg6IDEsXG4gIC4uLih1bnN0eWxlZFxuICAgID8ge31cbiAgICA6IHtcbiAgICAgICAgYmFja2dyb3VuZENvbG9yOiBpc0Rpc2FibGVkID8gY29sb3JzLm5ldXRyYWwxMCA6IGNvbG9ycy5uZXV0cmFsMjAsXG4gICAgICAgIG1hcmdpbkJvdHRvbTogYmFzZVVuaXQgKiAyLFxuICAgICAgICBtYXJnaW5Ub3A6IGJhc2VVbml0ICogMixcbiAgICAgIH0pLFxufSk7XG5cbmV4cG9ydCBjb25zdCBJbmRpY2F0b3JTZXBhcmF0b3IgPSA8XG4gIE9wdGlvbixcbiAgSXNNdWx0aSBleHRlbmRzIGJvb2xlYW4sXG4gIEdyb3VwIGV4dGVuZHMgR3JvdXBCYXNlPE9wdGlvbj5cbj4oXG4gIHByb3BzOiBJbmRpY2F0b3JTZXBhcmF0b3JQcm9wczxPcHRpb24sIElzTXVsdGksIEdyb3VwPlxuKSA9PiB7XG4gIGNvbnN0IHsgaW5uZXJQcm9wcyB9ID0gcHJvcHM7XG4gIHJldHVybiAoXG4gICAgPHNwYW5cbiAgICAgIHsuLi5pbm5lclByb3BzfVxuICAgICAgey4uLmdldFN0eWxlUHJvcHMocHJvcHMsICdpbmRpY2F0b3JTZXBhcmF0b3InLCB7XG4gICAgICAgICdpbmRpY2F0b3Itc2VwYXJhdG9yJzogdHJ1ZSxcbiAgICAgIH0pfVxuICAgIC8+XG4gICk7XG59O1xuXG4vLyA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT1cbi8vIExvYWRpbmdcbi8vID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PVxuXG5jb25zdCBsb2FkaW5nRG90QW5pbWF0aW9ucyA9IGtleWZyYW1lc2BcbiAgMCUsIDgwJSwgMTAwJSB7IG9wYWNpdHk6IDA7IH1cbiAgNDAlIHsgb3BhY2l0eTogMTsgfVxuYDtcblxuZXhwb3J0IGNvbnN0IGxvYWRpbmdJbmRpY2F0b3JDU1MgPSA8XG4gIE9wdGlvbixcbiAgSXNNdWx0aSBleHRlbmRzIGJvb2xlYW4sXG4gIEdyb3VwIGV4dGVuZHMgR3JvdXBCYXNlPE9wdGlvbj5cbj4oXG4gIHtcbiAgICBpc0ZvY3VzZWQsXG4gICAgc2l6ZSxcbiAgICB0aGVtZToge1xuICAgICAgY29sb3JzLFxuICAgICAgc3BhY2luZzogeyBiYXNlVW5pdCB9LFxuICAgIH0sXG4gIH06IExvYWRpbmdJbmRpY2F0b3JQcm9wczxPcHRpb24sIElzTXVsdGksIEdyb3VwPixcbiAgdW5zdHlsZWQ6IGJvb2xlYW5cbik6IENTU09iamVjdFdpdGhMYWJlbCA9PiAoe1xuICBsYWJlbDogJ2xvYWRpbmdJbmRpY2F0b3InLFxuICBkaXNwbGF5OiAnZmxleCcsXG4gIHRyYW5zaXRpb246ICdjb2xvciAxNTBtcycsXG4gIGFsaWduU2VsZjogJ2NlbnRlcicsXG4gIGZvbnRTaXplOiBzaXplLFxuICBsaW5lSGVpZ2h0OiAxLFxuICBtYXJnaW5SaWdodDogc2l6ZSxcbiAgdGV4dEFsaWduOiAnY2VudGVyJyxcbiAgdmVydGljYWxBbGlnbjogJ21pZGRsZScsXG4gIC4uLih1bnN0eWxlZFxuICAgID8ge31cbiAgICA6IHtcbiAgICAgICAgY29sb3I6IGlzRm9jdXNlZCA/IGNvbG9ycy5uZXV0cmFsNjAgOiBjb2xvcnMubmV1dHJhbDIwLFxuICAgICAgICBwYWRkaW5nOiBiYXNlVW5pdCAqIDIsXG4gICAgICB9KSxcbn0pO1xuXG5pbnRlcmZhY2UgTG9hZGluZ0RvdFByb3BzIHtcbiAgZGVsYXk6IG51bWJlcjtcbiAgb2Zmc2V0OiBib29sZWFuO1xufVxuY29uc3QgTG9hZGluZ0RvdCA9ICh7IGRlbGF5LCBvZmZzZXQgfTogTG9hZGluZ0RvdFByb3BzKSA9PiAoXG4gIDxzcGFuXG4gICAgY3NzPXt7XG4gICAgICBhbmltYXRpb246IGAke2xvYWRpbmdEb3RBbmltYXRpb25zfSAxcyBlYXNlLWluLW91dCAke2RlbGF5fW1zIGluZmluaXRlO2AsXG4gICAgICBiYWNrZ3JvdW5kQ29sb3I6ICdjdXJyZW50Q29sb3InLFxuICAgICAgYm9yZGVyUmFkaXVzOiAnMWVtJyxcbiAgICAgIGRpc3BsYXk6ICdpbmxpbmUtYmxvY2snLFxuICAgICAgbWFyZ2luTGVmdDogb2Zmc2V0ID8gJzFlbScgOiB1bmRlZmluZWQsXG4gICAgICBoZWlnaHQ6ICcxZW0nLFxuICAgICAgdmVydGljYWxBbGlnbjogJ3RvcCcsXG4gICAgICB3aWR0aDogJzFlbScsXG4gICAgfX1cbiAgLz5cbik7XG5cbmV4cG9ydCBpbnRlcmZhY2UgTG9hZGluZ0luZGljYXRvclByb3BzPFxuICBPcHRpb24gPSB1bmtub3duLFxuICBJc011bHRpIGV4dGVuZHMgYm9vbGVhbiA9IGJvb2xlYW4sXG4gIEdyb3VwIGV4dGVuZHMgR3JvdXBCYXNlPE9wdGlvbj4gPSBHcm91cEJhc2U8T3B0aW9uPlxuPiBleHRlbmRzIENvbW1vblByb3BzQW5kQ2xhc3NOYW1lPE9wdGlvbiwgSXNNdWx0aSwgR3JvdXA+IHtcbiAgLyoqIFByb3BzIHRoYXQgd2lsbCBiZSBwYXNzZWQgb24gdG8gdGhlIGNoaWxkcmVuLiAqL1xuICBpbm5lclByb3BzOiBKU1guSW50cmluc2ljRWxlbWVudHNbJ2RpdiddO1xuICAvKiogVGhlIGZvY3VzZWQgc3RhdGUgb2YgdGhlIHNlbGVjdC4gKi9cbiAgaXNGb2N1c2VkOiBib29sZWFuO1xuICBpc0Rpc2FibGVkOiBib29sZWFuO1xuICAvKiogU2V0IHNpemUgb2YgdGhlIGNvbnRhaW5lci4gKi9cbiAgc2l6ZTogbnVtYmVyO1xufVxuZXhwb3J0IGNvbnN0IExvYWRpbmdJbmRpY2F0b3IgPSA8XG4gIE9wdGlvbixcbiAgSXNNdWx0aSBleHRlbmRzIGJvb2xlYW4sXG4gIEdyb3VwIGV4dGVuZHMgR3JvdXBCYXNlPE9wdGlvbj5cbj4oe1xuICBpbm5lclByb3BzLFxuICBpc1J0bCxcbiAgc2l6ZSA9IDQsXG4gIC4uLnJlc3RQcm9wc1xufTogTG9hZGluZ0luZGljYXRvclByb3BzPE9wdGlvbiwgSXNNdWx0aSwgR3JvdXA+KSA9PiB7XG4gIHJldHVybiAoXG4gICAgPGRpdlxuICAgICAgey4uLmdldFN0eWxlUHJvcHMoXG4gICAgICAgIHsgLi4ucmVzdFByb3BzLCBpbm5lclByb3BzLCBpc1J0bCwgc2l6ZSB9LFxuICAgICAgICAnbG9hZGluZ0luZGljYXRvcicsXG4gICAgICAgIHtcbiAgICAgICAgICBpbmRpY2F0b3I6IHRydWUsXG4gICAgICAgICAgJ2xvYWRpbmctaW5kaWNhdG9yJzogdHJ1ZSxcbiAgICAgICAgfVxuICAgICAgKX1cbiAgICAgIHsuLi5pbm5lclByb3BzfVxuICAgID5cbiAgICAgIDxMb2FkaW5nRG90IGRlbGF5PXswfSBvZmZzZXQ9e2lzUnRsfSAvPlxuICAgICAgPExvYWRpbmdEb3QgZGVsYXk9ezE2MH0gb2Zmc2V0IC8+XG4gICAgICA8TG9hZGluZ0RvdCBkZWxheT17MzIwfSBvZmZzZXQ9eyFpc1J0bH0gLz5cbiAgICA8L2Rpdj5cbiAgKTtcbn07XG4iXX0= */")})},ine=function(t){var n=t.innerProps,r=t.isRtl,o=t.size,i=o===void 0?4:o,s=ho(t,Yte);return Fe("div",He({},$t($e($e({},s),{},{innerProps:n,isRtl:r,size:i}),"loadingIndicator",{indicator:!0,"loading-indicator":!0}),n),Fe(Gm,{delay:0,offset:r}),Fe(Gm,{delay:160,offset:!0}),Fe(Gm,{delay:320,offset:!r}))},sne=function(t,n){var r=t.isDisabled,o=t.isFocused,i=t.theme,s=i.colors,a=i.borderRadius,l=i.spacing;return $e({label:"control",alignItems:"center",cursor:"default",display:"flex",flexWrap:"wrap",justifyContent:"space-between",minHeight:l.controlHeight,outline:"0 !important",position:"relative",transition:"all 100ms"},n?{}:{backgroundColor:r?s.neutral5:s.neutral0,borderColor:r?s.neutral10:o?s.primary:s.neutral20,borderRadius:a,borderStyle:"solid",borderWidth:1,boxShadow:o?"0 0 0 1px ".concat(s.primary):void 0,"&:hover":{borderColor:o?s.primary:s.neutral30}})},ane=function(t){var n=t.children,r=t.isDisabled,o=t.isFocused,i=t.innerRef,s=t.innerProps,a=t.menuIsOpen;return Fe("div",He({ref:i},$t(t,"control",{control:!0,"control--is-disabled":r,"control--is-focused":o,"control--menu-is-open":a}),s,{"aria-disabled":r||void 0}),n)},lne=ane,une=["data"],cne=function(t,n){var r=t.theme.spacing;return n?{}:{paddingBottom:r.baseUnit*2,paddingTop:r.baseUnit*2}},dne=function(t){var n=t.children,r=t.cx,o=t.getStyles,i=t.getClassNames,s=t.Heading,a=t.headingProps,l=t.innerProps,u=t.label,c=t.theme,d=t.selectProps;return Fe("div",He({},$t(t,"group",{group:!0}),l),Fe(s,He({},a,{selectProps:d,theme:c,getStyles:o,getClassNames:i,cx:r}),u),Fe("div",null,n))},fne=function(t,n){var r=t.theme,o=r.colors,i=r.spacing;return $e({label:"group",cursor:"default",display:"block"},n?{}:{color:o.neutral40,fontSize:"75%",fontWeight:500,marginBottom:"0.25em",paddingLeft:i.baseUnit*3,paddingRight:i.baseUnit*3,textTransform:"uppercase"})},pne=function(t){var n=x2(t);n.data;var r=ho(n,une);return Fe("div",He({},$t(t,"groupHeading",{"group-heading":!0}),r))},hne=dne,gne=["innerRef","isDisabled","isHidden","inputClassName"],mne=function(t,n){var r=t.isDisabled,o=t.value,i=t.theme,s=i.spacing,a=i.colors;return $e($e({visibility:r?"hidden":"visible",transform:o?"translateZ(0)":""},bne),n?{}:{margin:s.baseUnit/2,paddingBottom:s.baseUnit/2,paddingTop:s.baseUnit/2,color:a.neutral80})},O2={gridArea:"1 / 2",font:"inherit",minWidth:"2px",border:0,margin:0,outline:0,padding:0},bne={flex:"1 1 auto",display:"inline-grid",gridArea:"1 / 1 / 2 / 3",gridTemplateColumns:"0 min-content","&:after":$e({content:'attr(data-value) " "',visibility:"hidden",whiteSpace:"pre"},O2)},vne=function(t){return $e({label:"input",color:"inherit",background:0,opacity:t?0:1,width:"100%"},O2)},yne=function(t){var n=t.cx,r=t.value,o=x2(t),i=o.innerRef,s=o.isDisabled,a=o.isHidden,l=o.inputClassName,u=ho(o,gne);return Fe("div",He({},$t(t,"input",{"input-container":!0}),{"data-value":r||""}),Fe("input",He({className:n({input:!0},l),ref:i,style:vne(a),disabled:s},u)))},xne=yne,wne=function(t,n){var r=t.theme,o=r.spacing,i=r.borderRadius,s=r.colors;return $e({label:"multiValue",display:"flex",minWidth:0},n?{}:{backgroundColor:s.neutral10,borderRadius:i/2,margin:o.baseUnit/2})},Cne=function(t,n){var r=t.theme,o=r.borderRadius,i=r.colors,s=t.cropWithEllipsis;return $e({overflow:"hidden",textOverflow:s||s===void 0?"ellipsis":void 0,whiteSpace:"nowrap"},n?{}:{borderRadius:o/2,color:i.neutral80,fontSize:"85%",padding:3,paddingLeft:6})},Sne=function(t,n){var r=t.theme,o=r.spacing,i=r.borderRadius,s=r.colors,a=t.isFocused;return $e({alignItems:"center",display:"flex"},n?{}:{borderRadius:i/2,backgroundColor:a?s.dangerLight:void 0,paddingLeft:o.baseUnit,paddingRight:o.baseUnit,":hover":{backgroundColor:s.dangerLight,color:s.danger}})},N2=function(t){var n=t.children,r=t.innerProps;return Fe("div",r,n)},Ene=N2,Ine=N2;function Rne(e){var t=e.children,n=e.innerProps;return Fe("div",He({role:"button"},n),t||Fe(bx,{size:14}))}var Ane=function(t){var n=t.children,r=t.components,o=t.data,i=t.innerProps,s=t.isDisabled,a=t.removeProps,l=t.selectProps,u=r.Container,c=r.Label,d=r.Remove;return Fe(u,{data:o,innerProps:$e($e({},$t(t,"multiValue",{"multi-value":!0,"multi-value--is-disabled":s})),i),selectProps:l},Fe(c,{data:o,innerProps:$e({},$t(t,"multiValueLabel",{"multi-value__label":!0})),selectProps:l},n),Fe(d,{data:o,innerProps:$e($e({},$t(t,"multiValueRemove",{"multi-value__remove":!0})),{},{"aria-label":"Remove ".concat(n||"option")},a),selectProps:l}))},Tne=Ane,One=function(t,n){var r=t.isDisabled,o=t.isFocused,i=t.isSelected,s=t.theme,a=s.spacing,l=s.colors;return $e({label:"option",cursor:"default",display:"block",fontSize:"inherit",width:"100%",userSelect:"none",WebkitTapHighlightColor:"rgba(0, 0, 0, 0)"},n?{}:{backgroundColor:i?l.primary:o?l.primary25:"transparent",color:r?l.neutral20:i?l.neutral0:"inherit",padding:"".concat(a.baseUnit*2,"px ").concat(a.baseUnit*3,"px"),":active":{backgroundColor:r?void 0:i?l.primary:l.primary50}})},Nne=function(t){var n=t.children,r=t.isDisabled,o=t.isFocused,i=t.isSelected,s=t.innerRef,a=t.innerProps;return Fe("div",He({},$t(t,"option",{option:!0,"option--is-disabled":r,"option--is-focused":o,"option--is-selected":i}),{ref:s,"aria-disabled":r},a),n)},Pne=Nne,_ne=function(t,n){var r=t.theme,o=r.spacing,i=r.colors;return $e({label:"placeholder",gridArea:"1 / 1 / 2 / 3"},n?{}:{color:i.neutral50,marginLeft:o.baseUnit/2,marginRight:o.baseUnit/2})},Mne=function(t){var n=t.children,r=t.innerProps;return Fe("div",He({},$t(t,"placeholder",{placeholder:!0}),r),n)},Dne=Mne,kne=function(t,n){var r=t.isDisabled,o=t.theme,i=o.spacing,s=o.colors;return $e({label:"singleValue",gridArea:"1 / 1 / 2 / 3",maxWidth:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},n?{}:{color:r?s.neutral40:s.neutral80,marginLeft:i.baseUnit/2,marginRight:i.baseUnit/2})},jne=function(t){var n=t.children,r=t.isDisabled,o=t.innerProps;return Fe("div",He({},$t(t,"singleValue",{"single-value":!0,"single-value--is-disabled":r}),o),n)},Lne=jne,Fne={ClearIndicator:ene,Control:lne,DropdownIndicator:Kte,DownChevron:A2,CrossIcon:bx,Group:hne,GroupHeading:pne,IndicatorsContainer:qte,IndicatorSeparator:nne,Input:xne,LoadingIndicator:ine,Menu:_te,MenuList:Dte,MenuPortal:Vte,LoadingMessage:Fte,NoOptionsMessage:Lte,MultiValue:Tne,MultiValueContainer:Ene,MultiValueLabel:Ine,MultiValueRemove:Rne,Option:Pne,Placeholder:Dne,SelectContainer:Gte,SingleValue:Lne,ValueContainer:Wte},Bne=function(t){return $e($e({},Fne),t.components)},xI=Number.isNaN||function(t){return typeof t=="number"&&t!==t};function Vne(e,t){return!!(e===t||xI(e)&&xI(t))}function $ne(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(!Vne(e[n],t[n]))return!1;return!0}function Gne(e,t){t===void 0&&(t=$ne);var n=null;function r(){for(var o=[],i=0;i<arguments.length;i++)o[i]=arguments[i];if(n&&n.lastThis===this&&t(o,n.lastArgs))return n.lastResult;var s=e.apply(this,o);return n={lastResult:s,lastArgs:o,lastThis:this},s}return r.clear=function(){n=null},r}function Hne(){return"You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."}var Wne=process.env.NODE_ENV==="production"?{name:"7pg0cj-a11yText",styles:"label:a11yText;z-index:9999;border:0;clip:rect(1px, 1px, 1px, 1px);height:1px;width:1px;position:absolute;overflow:hidden;padding:0;white-space:nowrap"}:{name:"1f43avz-a11yText-A11yText",styles:"label:a11yText;z-index:9999;border:0;clip:rect(1px, 1px, 1px, 1px);height:1px;width:1px;position:absolute;overflow:hidden;padding:0;white-space:nowrap;label:A11yText;",map:"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkExMXlUZXh0LnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFPSSIsImZpbGUiOiJBMTF5VGV4dC50c3giLCJzb3VyY2VzQ29udGVudCI6WyIvKiogQGpzeCBqc3ggKi9cbmltcG9ydCB7IEpTWCB9IGZyb20gJ3JlYWN0JztcbmltcG9ydCB7IGpzeCB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcblxuLy8gQXNzaXN0aXZlIHRleHQgdG8gZGVzY3JpYmUgdmlzdWFsIGVsZW1lbnRzLiBIaWRkZW4gZm9yIHNpZ2h0ZWQgdXNlcnMuXG5jb25zdCBBMTF5VGV4dCA9IChwcm9wczogSlNYLkludHJpbnNpY0VsZW1lbnRzWydzcGFuJ10pID0+IChcbiAgPHNwYW5cbiAgICBjc3M9e3tcbiAgICAgIGxhYmVsOiAnYTExeVRleHQnLFxuICAgICAgekluZGV4OiA5OTk5LFxuICAgICAgYm9yZGVyOiAwLFxuICAgICAgY2xpcDogJ3JlY3QoMXB4LCAxcHgsIDFweCwgMXB4KScsXG4gICAgICBoZWlnaHQ6IDEsXG4gICAgICB3aWR0aDogMSxcbiAgICAgIHBvc2l0aW9uOiAnYWJzb2x1dGUnLFxuICAgICAgb3ZlcmZsb3c6ICdoaWRkZW4nLFxuICAgICAgcGFkZGluZzogMCxcbiAgICAgIHdoaXRlU3BhY2U6ICdub3dyYXAnLFxuICAgIH19XG4gICAgey4uLnByb3BzfVxuICAvPlxuKTtcblxuZXhwb3J0IGRlZmF1bHQgQTExeVRleHQ7XG4iXX0= */",toString:Hne},zne=function(t){return Fe("span",He({css:Wne},t))},wI=zne,qne={guidance:function(t){var n=t.isSearchable,r=t.isMulti,o=t.tabSelectsValue,i=t.context,s=t.isInitialFocus;switch(i){case"menu":return"Use Up and Down to choose options, press Enter to select the currently focused option, press Escape to exit the menu".concat(o?", press Tab to select the option and exit the menu":"",".");case"input":return s?"".concat(t["aria-label"]||"Select"," is focused ").concat(n?",type to refine list":"",", press Down to open the menu, ").concat(r?" press left to focus selected values":""):"";case"value":return"Use left and right to toggle between focused values, press Backspace to remove the currently focused value";default:return""}},onChange:function(t){var n=t.action,r=t.label,o=r===void 0?"":r,i=t.labels,s=t.isDisabled;switch(n){case"deselect-option":case"pop-value":case"remove-value":return"option ".concat(o,", deselected.");case"clear":return"All selected options have been cleared.";case"initial-input-focus":return"option".concat(i.length>1?"s":""," ").concat(i.join(","),", selected.");case"select-option":return s?"option ".concat(o," is disabled. Select another option."):"option ".concat(o,", selected.");default:return""}},onFocus:function(t){var n=t.context,r=t.focused,o=t.options,i=t.label,s=i===void 0?"":i,a=t.selectValue,l=t.isDisabled,u=t.isSelected,c=t.isAppleDevice,d=function(m,v){return m&&m.length?"".concat(m.indexOf(v)+1," of ").concat(m.length):""};if(n==="value"&&a)return"value ".concat(s," focused, ").concat(d(a,r),".");if(n==="menu"&&c){var f=l?" disabled":"",p="".concat(u?" selected":"").concat(f);return"".concat(s).concat(p,", ").concat(d(o,r),".")}return""},onFilter:function(t){var n=t.inputValue,r=t.resultsMessage;return"".concat(r).concat(n?" for search term "+n:"",".")}},Une=function(t){var n=t.ariaSelection,r=t.focusedOption,o=t.focusedValue,i=t.focusableOptions,s=t.isFocused,a=t.selectValue,l=t.selectProps,u=t.id,c=t.isAppleDevice,d=l.ariaLiveMessages,f=l.getOptionLabel,p=l.inputValue,g=l.isMulti,m=l.isOptionDisabled,v=l.isSearchable,y=l.menuIsOpen,x=l.options,w=l.screenReaderStatus,C=l.tabSelectsValue,S=l.isLoading,R=l["aria-label"],I=l["aria-live"],T=N.useMemo(function(){return $e($e({},qne),d||{})},[d]),_=N.useMemo(function(){var j="";if(n&&T.onChange){var D=n.option,V=n.options,G=n.removedValue,z=n.removedValues,H=n.value,ne=function(te){return Array.isArray(te)?null:te},W=G||D||ne(H),J=W?f(W):"",K=V||z||void 0,U=K?K.map(f):[],oe=$e({isDisabled:W&&m(W,a),label:J,labels:U},n);j=T.onChange(oe)}return j},[n,T,m,a,f]),$=N.useMemo(function(){var j="",D=r||o,V=!!(r&&a&&a.includes(r));if(D&&T.onFocus){var G={focused:D,label:f(D),isDisabled:m(D,a),isSelected:V,options:i,context:D===r?"menu":"value",selectValue:a,isAppleDevice:c};j=T.onFocus(G)}return j},[r,o,f,m,T,i,a,c]),A=N.useMemo(function(){var j="";if(y&&x.length&&!S&&T.onFilter){var D=w({count:i.length});j=T.onFilter({inputValue:p,resultsMessage:D})}return j},[i,p,y,T,x,w,S]),M=n?.action==="initial-input-focus",O=N.useMemo(function(){var j="";if(T.guidance){var D=o?"value":y?"menu":"input";j=T.guidance({"aria-label":R,context:D,isDisabled:r&&m(r,a),isMulti:g,isSearchable:v,tabSelectsValue:C,isInitialFocus:M})}return j},[R,r,o,g,m,v,y,T,a,C,M]),B=Fe(N.Fragment,null,Fe("span",{id:"aria-selection"},_),Fe("span",{id:"aria-focused"},$),Fe("span",{id:"aria-results"},A),Fe("span",{id:"aria-guidance"},O));return Fe(N.Fragment,null,Fe(wI,{id:u},M&&B),Fe(wI,{"aria-live":I,"aria-atomic":"false","aria-relevant":"additions text",role:"log"},s&&!M&&B))},Yne=Une,Iv=[{base:"A",letters:"AⒶAÀÁÂẦẤẪẨÃĀĂẰẮẴẲȦǠÄǞẢÅǺǍȀȂẠẬẶḀĄȺⱯ"},{base:"AA",letters:"Ꜳ"},{base:"AE",letters:"ÆǼǢ"},{base:"AO",letters:"Ꜵ"},{base:"AU",letters:"Ꜷ"},{base:"AV",letters:"ꜸꜺ"},{base:"AY",letters:"Ꜽ"},{base:"B",letters:"BⒷBḂḄḆɃƂƁ"},{base:"C",letters:"CⒸCĆĈĊČÇḈƇȻꜾ"},{base:"D",letters:"DⒹDḊĎḌḐḒḎĐƋƊƉꝹ"},{base:"DZ",letters:"DZDŽ"},{base:"Dz",letters:"DzDž"},{base:"E",letters:"EⒺEÈÉÊỀẾỄỂẼĒḔḖĔĖËẺĚȄȆẸỆȨḜĘḘḚƐƎ"},{base:"F",letters:"FⒻFḞƑꝻ"},{base:"G",letters:"GⒼGǴĜḠĞĠǦĢǤƓꞠꝽꝾ"},{base:"H",letters:"HⒽHĤḢḦȞḤḨḪĦⱧⱵꞍ"},{base:"I",letters:"IⒾIÌÍÎĨĪĬİÏḮỈǏȈȊỊĮḬƗ"},{base:"J",letters:"JⒿJĴɈ"},{base:"K",letters:"KⓀKḰǨḲĶḴƘⱩꝀꝂꝄꞢ"},{base:"L",letters:"LⓁLĿĹĽḶḸĻḼḺŁȽⱢⱠꝈꝆꞀ"},{base:"LJ",letters:"LJ"},{base:"Lj",letters:"Lj"},{base:"M",letters:"MⓂMḾṀṂⱮƜ"},{base:"N",letters:"NⓃNǸŃÑṄŇṆŅṊṈȠƝꞐꞤ"},{base:"NJ",letters:"NJ"},{base:"Nj",letters:"Nj"},{base:"O",letters:"OⓄOÒÓÔỒỐỖỔÕṌȬṎŌṐṒŎȮȰÖȪỎŐǑȌȎƠỜỚỠỞỢỌỘǪǬØǾƆƟꝊꝌ"},{base:"OI",letters:"Ƣ"},{base:"OO",letters:"Ꝏ"},{base:"OU",letters:"Ȣ"},{base:"P",letters:"PⓅPṔṖƤⱣꝐꝒꝔ"},{base:"Q",letters:"QⓆQꝖꝘɊ"},{base:"R",letters:"RⓇRŔṘŘȐȒṚṜŖṞɌⱤꝚꞦꞂ"},{base:"S",letters:"SⓈSẞŚṤŜṠŠṦṢṨȘŞⱾꞨꞄ"},{base:"T",letters:"TⓉTṪŤṬȚŢṰṮŦƬƮȾꞆ"},{base:"TZ",letters:"Ꜩ"},{base:"U",letters:"UⓊUÙÚÛŨṸŪṺŬÜǛǗǕǙỦŮŰǓȔȖƯỪỨỮỬỰỤṲŲṶṴɄ"},{base:"V",letters:"VⓋVṼṾƲꝞɅ"},{base:"VY",letters:"Ꝡ"},{base:"W",letters:"WⓌWẀẂŴẆẄẈⱲ"},{base:"X",letters:"XⓍXẊẌ"},{base:"Y",letters:"YⓎYỲÝŶỸȲẎŸỶỴƳɎỾ"},{base:"Z",letters:"ZⓏZŹẐŻŽẒẔƵȤⱿⱫꝢ"},{base:"a",letters:"aⓐaẚàáâầấẫẩãāăằắẵẳȧǡäǟảåǻǎȁȃạậặḁąⱥɐ"},{base:"aa",letters:"ꜳ"},{base:"ae",letters:"æǽǣ"},{base:"ao",letters:"ꜵ"},{base:"au",letters:"ꜷ"},{base:"av",letters:"ꜹꜻ"},{base:"ay",letters:"ꜽ"},{base:"b",letters:"bⓑbḃḅḇƀƃɓ"},{base:"c",letters:"cⓒcćĉċčçḉƈȼꜿↄ"},{base:"d",letters:"dⓓdḋďḍḑḓḏđƌɖɗꝺ"},{base:"dz",letters:"dzdž"},{base:"e",letters:"eⓔeèéêềếễểẽēḕḗĕėëẻěȅȇẹệȩḝęḙḛɇɛǝ"},{base:"f",letters:"fⓕfḟƒꝼ"},{base:"g",letters:"gⓖgǵĝḡğġǧģǥɠꞡᵹꝿ"},{base:"h",letters:"hⓗhĥḣḧȟḥḩḫẖħⱨⱶɥ"},{base:"hv",letters:"ƕ"},{base:"i",letters:"iⓘiìíîĩīĭïḯỉǐȉȋịįḭɨı"},{base:"j",letters:"jⓙjĵǰɉ"},{base:"k",letters:"kⓚkḱǩḳķḵƙⱪꝁꝃꝅꞣ"},{base:"l",letters:"lⓛlŀĺľḷḹļḽḻſłƚɫⱡꝉꞁꝇ"},{base:"lj",letters:"lj"},{base:"m",letters:"mⓜmḿṁṃɱɯ"},{base:"n",letters:"nⓝnǹńñṅňṇņṋṉƞɲʼnꞑꞥ"},{base:"nj",letters:"nj"},{base:"o",letters:"oⓞoòóôồốỗổõṍȭṏōṑṓŏȯȱöȫỏőǒȍȏơờớỡởợọộǫǭøǿɔꝋꝍɵ"},{base:"oi",letters:"ƣ"},{base:"ou",letters:"ȣ"},{base:"oo",letters:"ꝏ"},{base:"p",letters:"pⓟpṕṗƥᵽꝑꝓꝕ"},{base:"q",letters:"qⓠqɋꝗꝙ"},{base:"r",letters:"rⓡrŕṙřȑȓṛṝŗṟɍɽꝛꞧꞃ"},{base:"s",letters:"sⓢsßśṥŝṡšṧṣṩșşȿꞩꞅẛ"},{base:"t",letters:"tⓣtṫẗťṭțţṱṯŧƭʈⱦꞇ"},{base:"tz",letters:"ꜩ"},{base:"u",letters:"uⓤuùúûũṹūṻŭüǜǘǖǚủůűǔȕȗưừứữửựụṳųṷṵʉ"},{base:"v",letters:"vⓥvṽṿʋꝟʌ"},{base:"vy",letters:"ꝡ"},{base:"w",letters:"wⓦwẁẃŵẇẅẘẉⱳ"},{base:"x",letters:"xⓧxẋẍ"},{base:"y",letters:"yⓨyỳýŷỹȳẏÿỷẙỵƴɏỿ"},{base:"z",letters:"zⓩzźẑżžẓẕƶȥɀⱬꝣ"}],Xne=new RegExp("["+Iv.map(function(e){return e.letters}).join("")+"]","g"),P2={};for(var Hm=0;Hm<Iv.length;Hm++)for(var Wm=Iv[Hm],zm=0;zm<Wm.letters.length;zm++)P2[Wm.letters[zm]]=Wm.base;var _2=function(t){return t.replace(Xne,function(n){return P2[n]})},Zne=Gne(_2),CI=function(t){return t.replace(/^\s+|\s+$/g,"")},Jne=function(t){return"".concat(t.label," ").concat(t.value)},Kne=function(t){return function(n,r){if(n.data.__isNew__)return!0;var o=$e({ignoreCase:!0,ignoreAccents:!0,stringify:Jne,trim:!0,matchFrom:"any"},t),i=o.ignoreCase,s=o.ignoreAccents,a=o.stringify,l=o.trim,u=o.matchFrom,c=l?CI(r):r,d=l?CI(a(n)):a(n);return i&&(c=c.toLowerCase(),d=d.toLowerCase()),s&&(c=Zne(c),d=_2(d)),u==="start"?d.substr(0,c.length)===c:d.indexOf(c)>-1}},Qne=["innerRef"];function ere(e){var t=e.innerRef,n=ho(e,Qne),r=Ete(n,"onExited","in","enter","exit","appear");return Fe("input",He({ref:t},r,{css:mx({label:"dummyInput",background:0,border:0,caretColor:"transparent",fontSize:"inherit",gridArea:"1 / 1 / 2 / 3",outline:0,padding:0,width:1,color:"transparent",left:-100,opacity:0,position:"relative",transform:"scale(.01)"},process.env.NODE_ENV==="production"?"":";label:DummyInput;",process.env.NODE_ENV==="production"?"":"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkR1bW15SW5wdXQudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQXlCTSIsImZpbGUiOiJEdW1teUlucHV0LnRzeCIsInNvdXJjZXNDb250ZW50IjpbIi8qKiBAanN4IGpzeCAqL1xuaW1wb3J0IHsgSlNYLCBSZWYgfSBmcm9tICdyZWFjdCc7XG5pbXBvcnQgeyBqc3ggfSBmcm9tICdAZW1vdGlvbi9yZWFjdCc7XG5pbXBvcnQgeyByZW1vdmVQcm9wcyB9IGZyb20gJy4uL3V0aWxzJztcblxuZXhwb3J0IGRlZmF1bHQgZnVuY3Rpb24gRHVtbXlJbnB1dCh7XG4gIGlubmVyUmVmLFxuICAuLi5wcm9wc1xufTogSlNYLkludHJpbnNpY0VsZW1lbnRzWydpbnB1dCddICYge1xuICByZWFkb25seSBpbm5lclJlZjogUmVmPEhUTUxJbnB1dEVsZW1lbnQ+O1xufSkge1xuICAvLyBSZW1vdmUgYW5pbWF0aW9uIHByb3BzIG5vdCBtZWFudCBmb3IgSFRNTCBlbGVtZW50c1xuICBjb25zdCBmaWx0ZXJlZFByb3BzID0gcmVtb3ZlUHJvcHMoXG4gICAgcHJvcHMsXG4gICAgJ29uRXhpdGVkJyxcbiAgICAnaW4nLFxuICAgICdlbnRlcicsXG4gICAgJ2V4aXQnLFxuICAgICdhcHBlYXInXG4gICk7XG5cbiAgcmV0dXJuIChcbiAgICA8aW5wdXRcbiAgICAgIHJlZj17aW5uZXJSZWZ9XG4gICAgICB7Li4uZmlsdGVyZWRQcm9wc31cbiAgICAgIGNzcz17e1xuICAgICAgICBsYWJlbDogJ2R1bW15SW5wdXQnLFxuICAgICAgICAvLyBnZXQgcmlkIG9mIGFueSBkZWZhdWx0IHN0eWxlc1xuICAgICAgICBiYWNrZ3JvdW5kOiAwLFxuICAgICAgICBib3JkZXI6IDAsXG4gICAgICAgIC8vIGltcG9ydGFudCEgdGhpcyBoaWRlcyB0aGUgZmxhc2hpbmcgY3Vyc29yXG4gICAgICAgIGNhcmV0Q29sb3I6ICd0cmFuc3BhcmVudCcsXG4gICAgICAgIGZvbnRTaXplOiAnaW5oZXJpdCcsXG4gICAgICAgIGdyaWRBcmVhOiAnMSAvIDEgLyAyIC8gMycsXG4gICAgICAgIG91dGxpbmU6IDAsXG4gICAgICAgIHBhZGRpbmc6IDAsXG4gICAgICAgIC8vIGltcG9ydGFudCEgd2l0aG91dCBgd2lkdGhgIGJyb3dzZXJzIHdvbid0IGFsbG93IGZvY3VzXG4gICAgICAgIHdpZHRoOiAxLFxuXG4gICAgICAgIC8vIHJlbW92ZSBjdXJzb3Igb24gZGVza3RvcFxuICAgICAgICBjb2xvcjogJ3RyYW5zcGFyZW50JyxcblxuICAgICAgICAvLyByZW1vdmUgY3Vyc29yIG9uIG1vYmlsZSB3aGlsc3QgbWFpbnRhaW5pbmcgXCJzY3JvbGwgaW50byB2aWV3XCIgYmVoYXZpb3VyXG4gICAgICAgIGxlZnQ6IC0xMDAsXG4gICAgICAgIG9wYWNpdHk6IDAsXG4gICAgICAgIHBvc2l0aW9uOiAncmVsYXRpdmUnLFxuICAgICAgICB0cmFuc2Zvcm06ICdzY2FsZSguMDEpJyxcbiAgICAgIH19XG4gICAgLz5cbiAgKTtcbn1cbiJdfQ== */")}))}var tre=function(t){t.cancelable&&t.preventDefault(),t.stopPropagation()};function nre(e){var t=e.isEnabled,n=e.onBottomArrive,r=e.onBottomLeave,o=e.onTopArrive,i=e.onTopLeave,s=N.useRef(!1),a=N.useRef(!1),l=N.useRef(0),u=N.useRef(null),c=N.useCallback(function(v,y){if(u.current!==null){var x=u.current,w=x.scrollTop,C=x.scrollHeight,S=x.clientHeight,R=u.current,I=y>0,T=C-S-w,_=!1;T>y&&s.current&&(r&&r(v),s.current=!1),I&&a.current&&(i&&i(v),a.current=!1),I&&y>T?(n&&!s.current&&n(v),R.scrollTop=C,_=!0,s.current=!0):!I&&-y>w&&(o&&!a.current&&o(v),R.scrollTop=0,_=!0,a.current=!0),_&&tre(v)}},[n,r,o,i]),d=N.useCallback(function(v){c(v,v.deltaY)},[c]),f=N.useCallback(function(v){l.current=v.changedTouches[0].clientY},[]),p=N.useCallback(function(v){var y=l.current-v.changedTouches[0].clientY;c(v,y)},[c]),g=N.useCallback(function(v){if(v){var y=wte?{passive:!1}:!1;v.addEventListener("wheel",d,y),v.addEventListener("touchstart",f,y),v.addEventListener("touchmove",p,y)}},[p,f,d]),m=N.useCallback(function(v){v&&(v.removeEventListener("wheel",d,!1),v.removeEventListener("touchstart",f,!1),v.removeEventListener("touchmove",p,!1))},[p,f,d]);return N.useEffect(function(){if(t){var v=u.current;return g(v),function(){m(v)}}},[t,g,m]),function(v){u.current=v}}var SI=["boxSizing","height","overflow","paddingRight","position"],EI={boxSizing:"border-box",overflow:"hidden",position:"relative",height:"100%"};function II(e){e.cancelable&&e.preventDefault()}function RI(e){e.stopPropagation()}function AI(){var e=this.scrollTop,t=this.scrollHeight,n=e+this.offsetHeight;e===0?this.scrollTop=1:n===t&&(this.scrollTop=e-1)}function TI(){return"ontouchstart"in window||navigator.maxTouchPoints}var OI=!!(typeof window<"u"&&window.document&&window.document.createElement),qa=0,Ms={capture:!1,passive:!1};function rre(e){var t=e.isEnabled,n=e.accountForScrollbars,r=n===void 0?!0:n,o=N.useRef({}),i=N.useRef(null),s=N.useCallback(function(l){if(OI){var u=document.body,c=u&&u.style;if(r&&SI.forEach(function(g){var m=c&&c[g];o.current[g]=m}),r&&qa<1){var d=parseInt(o.current.paddingRight,10)||0,f=document.body?document.body.clientWidth:0,p=window.innerWidth-f+d||0;Object.keys(EI).forEach(function(g){var m=EI[g];c&&(c[g]=m)}),c&&(c.paddingRight="".concat(p,"px"))}u&&TI()&&(u.addEventListener("touchmove",II,Ms),l&&(l.addEventListener("touchstart",AI,Ms),l.addEventListener("touchmove",RI,Ms))),qa+=1}},[r]),a=N.useCallback(function(l){if(OI){var u=document.body,c=u&&u.style;qa=Math.max(qa-1,0),r&&qa<1&&SI.forEach(function(d){var f=o.current[d];c&&(c[d]=f)}),u&&TI()&&(u.removeEventListener("touchmove",II,Ms),l&&(l.removeEventListener("touchstart",AI,Ms),l.removeEventListener("touchmove",RI,Ms)))}},[r]);return N.useEffect(function(){if(t){var l=i.current;return s(l),function(){a(l)}}},[t,s,a]),function(l){i.current=l}}function ore(){return"You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."}var ire=function(t){var n=t.target;return n.ownerDocument.activeElement&&n.ownerDocument.activeElement.blur()},sre=process.env.NODE_ENV==="production"?{name:"1kfdb0e",styles:"position:fixed;left:0;bottom:0;right:0;top:0"}:{name:"bp8cua-ScrollManager",styles:"position:fixed;left:0;bottom:0;right:0;top:0;label:ScrollManager;",map:"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIlNjcm9sbE1hbmFnZXIudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQW9EVSIsImZpbGUiOiJTY3JvbGxNYW5hZ2VyLnRzeCIsInNvdXJjZXNDb250ZW50IjpbIi8qKiBAanN4IGpzeCAqL1xuaW1wb3J0IHsganN4IH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnO1xuaW1wb3J0IHsgRnJhZ21lbnQsIFJlYWN0RWxlbWVudCwgUmVmQ2FsbGJhY2ssIE1vdXNlRXZlbnQgfSBmcm9tICdyZWFjdCc7XG5pbXBvcnQgdXNlU2Nyb2xsQ2FwdHVyZSBmcm9tICcuL3VzZVNjcm9sbENhcHR1cmUnO1xuaW1wb3J0IHVzZVNjcm9sbExvY2sgZnJvbSAnLi91c2VTY3JvbGxMb2NrJztcblxuaW50ZXJmYWNlIFByb3BzIHtcbiAgcmVhZG9ubHkgY2hpbGRyZW46IChyZWY6IFJlZkNhbGxiYWNrPEhUTUxFbGVtZW50PikgPT4gUmVhY3RFbGVtZW50O1xuICByZWFkb25seSBsb2NrRW5hYmxlZDogYm9vbGVhbjtcbiAgcmVhZG9ubHkgY2FwdHVyZUVuYWJsZWQ6IGJvb2xlYW47XG4gIHJlYWRvbmx5IG9uQm90dG9tQXJyaXZlPzogKGV2ZW50OiBXaGVlbEV2ZW50IHwgVG91Y2hFdmVudCkgPT4gdm9pZDtcbiAgcmVhZG9ubHkgb25Cb3R0b21MZWF2ZT86IChldmVudDogV2hlZWxFdmVudCB8IFRvdWNoRXZlbnQpID0+IHZvaWQ7XG4gIHJlYWRvbmx5IG9uVG9wQXJyaXZlPzogKGV2ZW50OiBXaGVlbEV2ZW50IHwgVG91Y2hFdmVudCkgPT4gdm9pZDtcbiAgcmVhZG9ubHkgb25Ub3BMZWF2ZT86IChldmVudDogV2hlZWxFdmVudCB8IFRvdWNoRXZlbnQpID0+IHZvaWQ7XG59XG5cbmNvbnN0IGJsdXJTZWxlY3RJbnB1dCA9IChldmVudDogTW91c2VFdmVudDxIVE1MRGl2RWxlbWVudD4pID0+IHtcbiAgY29uc3QgZWxlbWVudCA9IGV2ZW50LnRhcmdldCBhcyBIVE1MRGl2RWxlbWVudDtcbiAgcmV0dXJuIChcbiAgICBlbGVtZW50Lm93bmVyRG9jdW1lbnQuYWN0aXZlRWxlbWVudCAmJlxuICAgIChlbGVtZW50Lm93bmVyRG9jdW1lbnQuYWN0aXZlRWxlbWVudCBhcyBIVE1MRWxlbWVudCkuYmx1cigpXG4gICk7XG59O1xuXG5leHBvcnQgZGVmYXVsdCBmdW5jdGlvbiBTY3JvbGxNYW5hZ2VyKHtcbiAgY2hpbGRyZW4sXG4gIGxvY2tFbmFibGVkLFxuICBjYXB0dXJlRW5hYmxlZCA9IHRydWUsXG4gIG9uQm90dG9tQXJyaXZlLFxuICBvbkJvdHRvbUxlYXZlLFxuICBvblRvcEFycml2ZSxcbiAgb25Ub3BMZWF2ZSxcbn06IFByb3BzKSB7XG4gIGNvbnN0IHNldFNjcm9sbENhcHR1cmVUYXJnZXQgPSB1c2VTY3JvbGxDYXB0dXJlKHtcbiAgICBpc0VuYWJsZWQ6IGNhcHR1cmVFbmFibGVkLFxuICAgIG9uQm90dG9tQXJyaXZlLFxuICAgIG9uQm90dG9tTGVhdmUsXG4gICAgb25Ub3BBcnJpdmUsXG4gICAgb25Ub3BMZWF2ZSxcbiAgfSk7XG4gIGNvbnN0IHNldFNjcm9sbExvY2tUYXJnZXQgPSB1c2VTY3JvbGxMb2NrKHsgaXNFbmFibGVkOiBsb2NrRW5hYmxlZCB9KTtcblxuICBjb25zdCB0YXJnZXRSZWY6IFJlZkNhbGxiYWNrPEhUTUxFbGVtZW50PiA9IChlbGVtZW50KSA9PiB7XG4gICAgc2V0U2Nyb2xsQ2FwdHVyZVRhcmdldChlbGVtZW50KTtcbiAgICBzZXRTY3JvbGxMb2NrVGFyZ2V0KGVsZW1lbnQpO1xuICB9O1xuXG4gIHJldHVybiAoXG4gICAgPEZyYWdtZW50PlxuICAgICAge2xvY2tFbmFibGVkICYmIChcbiAgICAgICAgPGRpdlxuICAgICAgICAgIG9uQ2xpY2s9e2JsdXJTZWxlY3RJbnB1dH1cbiAgICAgICAgICBjc3M9e3sgcG9zaXRpb246ICdmaXhlZCcsIGxlZnQ6IDAsIGJvdHRvbTogMCwgcmlnaHQ6IDAsIHRvcDogMCB9fVxuICAgICAgICAvPlxuICAgICAgKX1cbiAgICAgIHtjaGlsZHJlbih0YXJnZXRSZWYpfVxuICAgIDwvRnJhZ21lbnQ+XG4gICk7XG59XG4iXX0= */",toString:ore};function are(e){var t=e.children,n=e.lockEnabled,r=e.captureEnabled,o=r===void 0?!0:r,i=e.onBottomArrive,s=e.onBottomLeave,a=e.onTopArrive,l=e.onTopLeave,u=nre({isEnabled:o,onBottomArrive:i,onBottomLeave:s,onTopArrive:a,onTopLeave:l}),c=rre({isEnabled:n}),d=function(p){u(p),c(p)};return Fe(N.Fragment,null,n&&Fe("div",{onClick:ire,css:sre}),t(d))}function lre(){return"You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."}var ure=process.env.NODE_ENV==="production"?{name:"1a0ro4n-requiredInput",styles:"label:requiredInput;opacity:0;pointer-events:none;position:absolute;bottom:0;left:0;right:0;width:100%"}:{name:"5kkxb2-requiredInput-RequiredInput",styles:"label:requiredInput;opacity:0;pointer-events:none;position:absolute;bottom:0;left:0;right:0;width:100%;label:RequiredInput;",map:"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIlJlcXVpcmVkSW5wdXQudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQWNJIiwiZmlsZSI6IlJlcXVpcmVkSW5wdXQudHN4Iiwic291cmNlc0NvbnRlbnQiOlsiLyoqIEBqc3gganN4ICovXG5pbXBvcnQgeyBGb2N1c0V2ZW50SGFuZGxlciwgRnVuY3Rpb25Db21wb25lbnQgfSBmcm9tICdyZWFjdCc7XG5pbXBvcnQgeyBqc3ggfSBmcm9tICdAZW1vdGlvbi9yZWFjdCc7XG5cbmNvbnN0IFJlcXVpcmVkSW5wdXQ6IEZ1bmN0aW9uQ29tcG9uZW50PHtcbiAgcmVhZG9ubHkgbmFtZT86IHN0cmluZztcbiAgcmVhZG9ubHkgb25Gb2N1czogRm9jdXNFdmVudEhhbmRsZXI8SFRNTElucHV0RWxlbWVudD47XG59PiA9ICh7IG5hbWUsIG9uRm9jdXMgfSkgPT4gKFxuICA8aW5wdXRcbiAgICByZXF1aXJlZFxuICAgIG5hbWU9e25hbWV9XG4gICAgdGFiSW5kZXg9ey0xfVxuICAgIGFyaWEtaGlkZGVuPVwidHJ1ZVwiXG4gICAgb25Gb2N1cz17b25Gb2N1c31cbiAgICBjc3M9e3tcbiAgICAgIGxhYmVsOiAncmVxdWlyZWRJbnB1dCcsXG4gICAgICBvcGFjaXR5OiAwLFxuICAgICAgcG9pbnRlckV2ZW50czogJ25vbmUnLFxuICAgICAgcG9zaXRpb246ICdhYnNvbHV0ZScsXG4gICAgICBib3R0b206IDAsXG4gICAgICBsZWZ0OiAwLFxuICAgICAgcmlnaHQ6IDAsXG4gICAgICB3aWR0aDogJzEwMCUnLFxuICAgIH19XG4gICAgLy8gUHJldmVudCBgU3dpdGNoaW5nIGZyb20gdW5jb250cm9sbGVkIHRvIGNvbnRyb2xsZWRgIGVycm9yXG4gICAgdmFsdWU9XCJcIlxuICAgIG9uQ2hhbmdlPXsoKSA9PiB7fX1cbiAgLz5cbik7XG5cbmV4cG9ydCBkZWZhdWx0IFJlcXVpcmVkSW5wdXQ7XG4iXX0= */",toString:lre},cre=function(t){var n=t.name,r=t.onFocus;return Fe("input",{required:!0,name:n,tabIndex:-1,"aria-hidden":"true",onFocus:r,css:ure,value:"",onChange:function(){}})},dre=cre;function vx(e){var t;return typeof window<"u"&&window.navigator!=null?e.test(((t=window.navigator.userAgentData)===null||t===void 0?void 0:t.platform)||window.navigator.platform):!1}function fre(){return vx(/^iPhone/i)}function M2(){return vx(/^Mac/i)}function pre(){return vx(/^iPad/i)||M2()&&navigator.maxTouchPoints>1}function hre(){return fre()||pre()}function gre(){return M2()||hre()}var mre=function(t){return t.label},D2=function(t){return t.label},k2=function(t){return t.value},bre=function(t){return!!t.isDisabled},vre={clearIndicator:Qte,container:$te,control:sne,dropdownIndicator:Jte,group:cne,groupHeading:fne,indicatorsContainer:zte,indicatorSeparator:tne,input:mne,loadingIndicator:one,loadingMessage:jte,menu:Ote,menuList:Mte,menuPortal:Bte,multiValue:wne,multiValueLabel:Cne,multiValueRemove:Sne,noOptionsMessage:kte,option:One,placeholder:_ne,singleValue:kne,valueContainer:Hte},yre={primary:"#2684FF",primary75:"#4C9AFF",primary50:"#B2D4FF",primary25:"#DEEBFF",danger:"#DE350B",dangerLight:"#FFBDAD",neutral0:"hsl(0, 0%, 100%)",neutral5:"hsl(0, 0%, 95%)",neutral10:"hsl(0, 0%, 90%)",neutral20:"hsl(0, 0%, 80%)",neutral30:"hsl(0, 0%, 70%)",neutral40:"hsl(0, 0%, 60%)",neutral50:"hsl(0, 0%, 50%)",neutral60:"hsl(0, 0%, 40%)",neutral70:"hsl(0, 0%, 30%)",neutral80:"hsl(0, 0%, 20%)",neutral90:"hsl(0, 0%, 10%)"},xre=4,j2=4,wre=38,Cre=j2*2,Sre={baseUnit:j2,controlHeight:wre,menuGutter:Cre},qm={borderRadius:xre,colors:yre,spacing:Sre},Ere={"aria-live":"polite",backspaceRemovesValue:!0,blurInputOnSelect:vI(),captureMenuScroll:!vI(),classNames:{},closeMenuOnSelect:!0,closeMenuOnScroll:!1,components:{},controlShouldRenderValue:!0,escapeClearsValue:!1,filterOption:Kne(),formatGroupLabel:mre,getOptionLabel:D2,getOptionValue:k2,isDisabled:!1,isLoading:!1,isMulti:!1,isRtl:!1,isSearchable:!0,isOptionDisabled:bre,loadingMessage:function(){return"Loading..."},maxMenuHeight:300,minMenuHeight:140,menuIsOpen:!1,menuPlacement:"bottom",menuPosition:"absolute",menuShouldBlockScroll:!1,menuShouldScrollIntoView:!yte(),noOptionsMessage:function(){return"No options"},openMenuOnFocus:!1,openMenuOnClick:!0,options:[],pageSize:5,placeholder:"Select...",screenReaderStatus:function(t){var n=t.count;return"".concat(n," result").concat(n!==1?"s":""," available")},styles:{},tabIndex:0,tabSelectsValue:!0,unstyled:!1};function NI(e,t,n,r){var o=B2(e,t,n),i=V2(e,t,n),s=F2(e,t),a=Cd(e,t);return{type:"option",data:t,isDisabled:o,isSelected:i,label:s,value:a,index:r}}function _c(e,t){return e.options.map(function(n,r){if("options"in n){var o=n.options.map(function(s,a){return NI(e,s,t,a)}).filter(function(s){return _I(e,s)});return o.length>0?{type:"group",data:n,options:o,index:r}:void 0}var i=NI(e,n,t,r);return _I(e,i)?i:void 0}).filter(Cte)}function L2(e){return e.reduce(function(t,n){return n.type==="group"?t.push.apply(t,Zs(n.options.map(function(r){return r.data}))):t.push(n.data),t},[])}function PI(e,t){return e.reduce(function(n,r){return r.type==="group"?n.push.apply(n,Zs(r.options.map(function(o){return{data:o.data,id:"".concat(t,"-").concat(r.index,"-").concat(o.index)}}))):n.push({data:r.data,id:"".concat(t,"-").concat(r.index)}),n},[])}function Ire(e,t){return L2(_c(e,t))}function _I(e,t){var n=e.inputValue,r=n===void 0?"":n,o=t.data,i=t.isSelected,s=t.label,a=t.value;return(!G2(e)||!i)&&$2(e,{label:s,value:a,data:o},r)}function Rre(e,t){var n=e.focusedValue,r=e.selectValue,o=r.indexOf(n);if(o>-1){var i=t.indexOf(n);if(i>-1)return n;if(o<t.length)return t[o]}return null}function Are(e,t){var n=e.focusedOption;return n&&t.indexOf(n)>-1?n:t[0]}var Um=function(t,n){var r,o=(r=t.find(function(i){return i.data===n}))===null||r===void 0?void 0:r.id;return o||null},F2=function(t,n){return t.getOptionLabel(n)},Cd=function(t,n){return t.getOptionValue(n)};function B2(e,t,n){return typeof e.isOptionDisabled=="function"?e.isOptionDisabled(t,n):!1}function V2(e,t,n){if(n.indexOf(t)>-1)return!0;if(typeof e.isOptionSelected=="function")return e.isOptionSelected(t,n);var r=Cd(e,t);return n.some(function(o){return Cd(e,o)===r})}function $2(e,t,n){return e.filterOption?e.filterOption(t,n):!0}var G2=function(t){var n=t.hideSelectedOptions,r=t.isMulti;return n===void 0?r:n},Tre=1,yx=(function(e){cee(n,e);var t=fee(n);function n(r){var o;if(lee(this,n),o=t.call(this,r),o.state={ariaSelection:null,focusedOption:null,focusedOptionId:null,focusableOptionsWithIds:[],focusedValue:null,inputIsHidden:!1,isFocused:!1,selectValue:[],clearFocusValueOnUpdate:!1,prevWasFocused:!1,inputIsHiddenAfterUpdate:void 0,prevProps:void 0,instancePrefix:"",isAppleDevice:!1},o.blockOptionHover=!1,o.isComposing=!1,o.commonProps=void 0,o.initialTouchX=0,o.initialTouchY=0,o.openAfterFocus=!1,o.scrollToFocusedOptionOnUpdate=!1,o.userIsDragging=void 0,o.controlRef=null,o.getControlRef=function(l){o.controlRef=l},o.focusedOptionRef=null,o.getFocusedOptionRef=function(l){o.focusedOptionRef=l},o.menuListRef=null,o.getMenuListRef=function(l){o.menuListRef=l},o.inputRef=null,o.getInputRef=function(l){o.inputRef=l},o.focus=o.focusInput,o.blur=o.blurInput,o.onChange=function(l,u){var c=o.props,d=c.onChange,f=c.name;u.name=f,o.ariaOnChange(l,u),d(l,u)},o.setValue=function(l,u,c){var d=o.props,f=d.closeMenuOnSelect,p=d.isMulti,g=d.inputValue;o.onInputChange("",{action:"set-value",prevInputValue:g}),f&&(o.setState({inputIsHiddenAfterUpdate:!p}),o.onMenuClose()),o.setState({clearFocusValueOnUpdate:!0}),o.onChange(l,{action:u,option:c})},o.selectOption=function(l){var u=o.props,c=u.blurInputOnSelect,d=u.isMulti,f=u.name,p=o.state.selectValue,g=d&&o.isOptionSelected(l,p),m=o.isOptionDisabled(l,p);if(g){var v=o.getOptionValue(l);o.setValue(p.filter(function(y){return o.getOptionValue(y)!==v}),"deselect-option",l)}else if(!m)d?o.setValue([].concat(Zs(p),[l]),"select-option",l):o.setValue(l,"select-option");else{o.ariaOnChange(l,{action:"select-option",option:l,name:f});return}c&&o.blurInput()},o.removeValue=function(l){var u=o.props.isMulti,c=o.state.selectValue,d=o.getOptionValue(l),f=c.filter(function(g){return o.getOptionValue(g)!==d}),p=ol(u,f,f[0]||null);o.onChange(p,{action:"remove-value",removedValue:l}),o.focusInput()},o.clearValue=function(){var l=o.state.selectValue;o.onChange(ol(o.props.isMulti,[],null),{action:"clear",removedValues:l})},o.popValue=function(){var l=o.props.isMulti,u=o.state.selectValue,c=u[u.length-1],d=u.slice(0,u.length-1),f=ol(l,d,d[0]||null);c&&o.onChange(f,{action:"pop-value",removedValue:c})},o.getFocusedOptionId=function(l){return Um(o.state.focusableOptionsWithIds,l)},o.getFocusableOptionsWithIds=function(){return PI(_c(o.props,o.state.selectValue),o.getElementId("option"))},o.getValue=function(){return o.state.selectValue},o.cx=function(){for(var l=arguments.length,u=new Array(l),c=0;c<l;c++)u[c]=arguments[c];return hte.apply(void 0,[o.props.classNamePrefix].concat(u))},o.getOptionLabel=function(l){return F2(o.props,l)},o.getOptionValue=function(l){return Cd(o.props,l)},o.getStyles=function(l,u){var c=o.props.unstyled,d=vre[l](u,c);d.boxSizing="border-box";var f=o.props.styles[l];return f?f(d,u):d},o.getClassNames=function(l,u){var c,d;return(c=(d=o.props.classNames)[l])===null||c===void 0?void 0:c.call(d,u)},o.getElementId=function(l){return"".concat(o.state.instancePrefix,"-").concat(l)},o.getComponents=function(){return Bne(o.props)},o.buildCategorizedOptions=function(){return _c(o.props,o.state.selectValue)},o.getCategorizedOptions=function(){return o.props.menuIsOpen?o.buildCategorizedOptions():[]},o.buildFocusableOptions=function(){return L2(o.buildCategorizedOptions())},o.getFocusableOptions=function(){return o.props.menuIsOpen?o.buildFocusableOptions():[]},o.ariaOnChange=function(l,u){o.setState({ariaSelection:$e({value:l},u)})},o.onMenuMouseDown=function(l){l.button===0&&(l.stopPropagation(),l.preventDefault(),o.focusInput())},o.onMenuMouseMove=function(l){o.blockOptionHover=!1},o.onControlMouseDown=function(l){if(!l.defaultPrevented){var u=o.props.openMenuOnClick;o.state.isFocused?o.props.menuIsOpen?l.target.tagName!=="INPUT"&&l.target.tagName!=="TEXTAREA"&&o.onMenuClose():u&&o.openMenu("first"):(u&&(o.openAfterFocus=!0),o.focusInput()),l.target.tagName!=="INPUT"&&l.target.tagName!=="TEXTAREA"&&l.preventDefault()}},o.onDropdownIndicatorMouseDown=function(l){if(!(l&&l.type==="mousedown"&&l.button!==0)&&!o.props.isDisabled){var u=o.props,c=u.isMulti,d=u.menuIsOpen;o.focusInput(),d?(o.setState({inputIsHiddenAfterUpdate:!c}),o.onMenuClose()):o.openMenu("first"),l.preventDefault()}},o.onClearIndicatorMouseDown=function(l){l&&l.type==="mousedown"&&l.button!==0||(o.clearValue(),l.preventDefault(),o.openAfterFocus=!1,l.type==="touchend"?o.focusInput():setTimeout(function(){return o.focusInput()}))},o.onScroll=function(l){typeof o.props.closeMenuOnScroll=="boolean"?l.target instanceof HTMLElement&&Vf(l.target)&&o.props.onMenuClose():typeof o.props.closeMenuOnScroll=="function"&&o.props.closeMenuOnScroll(l)&&o.props.onMenuClose()},o.onCompositionStart=function(){o.isComposing=!0},o.onCompositionEnd=function(){o.isComposing=!1},o.onTouchStart=function(l){var u=l.touches,c=u&&u.item(0);c&&(o.initialTouchX=c.clientX,o.initialTouchY=c.clientY,o.userIsDragging=!1)},o.onTouchMove=function(l){var u=l.touches,c=u&&u.item(0);if(c){var d=Math.abs(c.clientX-o.initialTouchX),f=Math.abs(c.clientY-o.initialTouchY),p=5;o.userIsDragging=d>p||f>p}},o.onTouchEnd=function(l){o.userIsDragging||(o.controlRef&&!o.controlRef.contains(l.target)&&o.menuListRef&&!o.menuListRef.contains(l.target)&&o.blurInput(),o.initialTouchX=0,o.initialTouchY=0)},o.onControlTouchEnd=function(l){o.userIsDragging||o.onControlMouseDown(l)},o.onClearIndicatorTouchEnd=function(l){o.userIsDragging||o.onClearIndicatorMouseDown(l)},o.onDropdownIndicatorTouchEnd=function(l){o.userIsDragging||o.onDropdownIndicatorMouseDown(l)},o.handleInputChange=function(l){var u=o.props.inputValue,c=l.currentTarget.value;o.setState({inputIsHiddenAfterUpdate:!1}),o.onInputChange(c,{action:"input-change",prevInputValue:u}),o.props.menuIsOpen||o.onMenuOpen()},o.onInputFocus=function(l){o.props.onFocus&&o.props.onFocus(l),o.setState({inputIsHiddenAfterUpdate:!1,isFocused:!0}),(o.openAfterFocus||o.props.openMenuOnFocus)&&o.openMenu("first"),o.openAfterFocus=!1},o.onInputBlur=function(l){var u=o.props.inputValue;if(o.menuListRef&&o.menuListRef.contains(document.activeElement)){o.inputRef.focus();return}o.props.onBlur&&o.props.onBlur(l),o.onInputChange("",{action:"input-blur",prevInputValue:u}),o.onMenuClose(),o.setState({focusedValue:null,isFocused:!1})},o.onOptionHover=function(l){if(!(o.blockOptionHover||o.state.focusedOption===l)){var u=o.getFocusableOptions(),c=u.indexOf(l);o.setState({focusedOption:l,focusedOptionId:c>-1?o.getFocusedOptionId(l):null})}},o.shouldHideSelectedOptions=function(){return G2(o.props)},o.onValueInputFocus=function(l){l.preventDefault(),l.stopPropagation(),o.focus()},o.onKeyDown=function(l){var u=o.props,c=u.isMulti,d=u.backspaceRemovesValue,f=u.escapeClearsValue,p=u.inputValue,g=u.isClearable,m=u.isDisabled,v=u.menuIsOpen,y=u.onKeyDown,x=u.tabSelectsValue,w=u.openMenuOnFocus,C=o.state,S=C.focusedOption,R=C.focusedValue,I=C.selectValue;if(!m&&!(typeof y=="function"&&(y(l),l.defaultPrevented))){switch(o.blockOptionHover=!0,l.key){case"ArrowLeft":if(!c||p)return;o.focusValue("previous");break;case"ArrowRight":if(!c||p)return;o.focusValue("next");break;case"Delete":case"Backspace":if(p)return;if(R)o.removeValue(R);else{if(!d)return;c?o.popValue():g&&o.clearValue()}break;case"Tab":if(o.isComposing||l.shiftKey||!v||!x||!S||w&&o.isOptionSelected(S,I))return;o.selectOption(S);break;case"Enter":if(l.keyCode===229)break;if(v){if(!S||o.isComposing)return;o.selectOption(S);break}return;case"Escape":v?(o.setState({inputIsHiddenAfterUpdate:!1}),o.onInputChange("",{action:"menu-close",prevInputValue:p}),o.onMenuClose()):g&&f&&o.clearValue();break;case" ":if(p)return;if(!v){o.openMenu("first");break}if(!S)return;o.selectOption(S);break;case"ArrowUp":v?o.focusOption("up"):o.openMenu("last");break;case"ArrowDown":v?o.focusOption("down"):o.openMenu("first");break;case"PageUp":if(!v)return;o.focusOption("pageup");break;case"PageDown":if(!v)return;o.focusOption("pagedown");break;case"Home":if(!v)return;o.focusOption("first");break;case"End":if(!v)return;o.focusOption("last");break;default:return}l.preventDefault()}},o.state.instancePrefix="react-select-"+(o.props.instanceId||++Tre),o.state.selectValue=xd(r.value),r.menuIsOpen&&o.state.selectValue.length){var i=o.getFocusableOptionsWithIds(),s=o.buildFocusableOptions(),a=s.indexOf(o.state.selectValue[0]);o.state.focusableOptionsWithIds=i,o.state.focusedOption=s[a],o.state.focusedOptionId=Um(i,s[a])}return o}return uee(n,[{key:"componentDidMount",value:function(){this.startListeningComposition(),this.startListeningToTouch(),this.props.closeMenuOnScroll&&document&&document.addEventListener&&document.addEventListener("scroll",this.onScroll,!0),this.props.autoFocus&&this.focusInput(),this.props.menuIsOpen&&this.state.focusedOption&&this.menuListRef&&this.focusedOptionRef&&bI(this.menuListRef,this.focusedOptionRef),gre()&&this.setState({isAppleDevice:!0})}},{key:"componentDidUpdate",value:function(o){var i=this.props,s=i.isDisabled,a=i.menuIsOpen,l=this.state.isFocused;(l&&!s&&o.isDisabled||l&&a&&!o.menuIsOpen)&&this.focusInput(),l&&s&&!o.isDisabled?this.setState({isFocused:!1},this.onMenuClose):!l&&!s&&o.isDisabled&&this.inputRef===document.activeElement&&this.setState({isFocused:!0}),this.menuListRef&&this.focusedOptionRef&&this.scrollToFocusedOptionOnUpdate&&(bI(this.menuListRef,this.focusedOptionRef),this.scrollToFocusedOptionOnUpdate=!1)}},{key:"componentWillUnmount",value:function(){this.stopListeningComposition(),this.stopListeningToTouch(),document.removeEventListener("scroll",this.onScroll,!0)}},{key:"onMenuOpen",value:function(){this.props.onMenuOpen()}},{key:"onMenuClose",value:function(){this.onInputChange("",{action:"menu-close",prevInputValue:this.props.inputValue}),this.props.onMenuClose()}},{key:"onInputChange",value:function(o,i){this.props.onInputChange(o,i)}},{key:"focusInput",value:function(){this.inputRef&&this.inputRef.focus()}},{key:"blurInput",value:function(){this.inputRef&&this.inputRef.blur()}},{key:"openMenu",value:function(o){var i=this,s=this.state,a=s.selectValue,l=s.isFocused,u=this.buildFocusableOptions(),c=o==="first"?0:u.length-1;if(!this.props.isMulti){var d=u.indexOf(a[0]);d>-1&&(c=d)}this.scrollToFocusedOptionOnUpdate=!(l&&this.menuListRef),this.setState({inputIsHiddenAfterUpdate:!1,focusedValue:null,focusedOption:u[c],focusedOptionId:this.getFocusedOptionId(u[c])},function(){return i.onMenuOpen()})}},{key:"focusValue",value:function(o){var i=this.state,s=i.selectValue,a=i.focusedValue;if(this.props.isMulti){this.setState({focusedOption:null});var l=s.indexOf(a);a||(l=-1);var u=s.length-1,c=-1;if(s.length){switch(o){case"previous":l===0?c=0:l===-1?c=u:c=l-1;break;case"next":l>-1&&l<u&&(c=l+1);break}this.setState({inputIsHidden:c!==-1,focusedValue:s[c]})}}}},{key:"focusOption",value:function(){var o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"first",i=this.props.pageSize,s=this.state.focusedOption,a=this.getFocusableOptions();if(a.length){var l=0,u=a.indexOf(s);s||(u=-1),o==="up"?l=u>0?u-1:a.length-1:o==="down"?l=(u+1)%a.length:o==="pageup"?(l=u-i,l<0&&(l=0)):o==="pagedown"?(l=u+i,l>a.length-1&&(l=a.length-1)):o==="last"&&(l=a.length-1),this.scrollToFocusedOptionOnUpdate=!0,this.setState({focusedOption:a[l],focusedValue:null,focusedOptionId:this.getFocusedOptionId(a[l])})}}},{key:"getTheme",value:function(){return this.props.theme?typeof this.props.theme=="function"?this.props.theme(qm):$e($e({},qm),this.props.theme):qm}},{key:"getCommonProps",value:function(){var o=this.clearValue,i=this.cx,s=this.getStyles,a=this.getClassNames,l=this.getValue,u=this.selectOption,c=this.setValue,d=this.props,f=d.isMulti,p=d.isRtl,g=d.options,m=this.hasValue();return{clearValue:o,cx:i,getStyles:s,getClassNames:a,getValue:l,hasValue:m,isMulti:f,isRtl:p,options:g,selectOption:u,selectProps:d,setValue:c,theme:this.getTheme()}}},{key:"hasValue",value:function(){var o=this.state.selectValue;return o.length>0}},{key:"hasOptions",value:function(){return!!this.getFocusableOptions().length}},{key:"isClearable",value:function(){var o=this.props,i=o.isClearable,s=o.isMulti;return i===void 0?s:i}},{key:"isOptionDisabled",value:function(o,i){return B2(this.props,o,i)}},{key:"isOptionSelected",value:function(o,i){return V2(this.props,o,i)}},{key:"filterOption",value:function(o,i){return $2(this.props,o,i)}},{key:"formatOptionLabel",value:function(o,i){if(typeof this.props.formatOptionLabel=="function"){var s=this.props.inputValue,a=this.state.selectValue;return this.props.formatOptionLabel(o,{context:i,inputValue:s,selectValue:a})}else return this.getOptionLabel(o)}},{key:"formatGroupLabel",value:function(o){return this.props.formatGroupLabel(o)}},{key:"startListeningComposition",value:function(){document&&document.addEventListener&&(document.addEventListener("compositionstart",this.onCompositionStart,!1),document.addEventListener("compositionend",this.onCompositionEnd,!1))}},{key:"stopListeningComposition",value:function(){document&&document.removeEventListener&&(document.removeEventListener("compositionstart",this.onCompositionStart),document.removeEventListener("compositionend",this.onCompositionEnd))}},{key:"startListeningToTouch",value:function(){document&&document.addEventListener&&(document.addEventListener("touchstart",this.onTouchStart,!1),document.addEventListener("touchmove",this.onTouchMove,!1),document.addEventListener("touchend",this.onTouchEnd,!1))}},{key:"stopListeningToTouch",value:function(){document&&document.removeEventListener&&(document.removeEventListener("touchstart",this.onTouchStart),document.removeEventListener("touchmove",this.onTouchMove),document.removeEventListener("touchend",this.onTouchEnd))}},{key:"renderInput",value:function(){var o=this.props,i=o.isDisabled,s=o.isSearchable,a=o.inputId,l=o.inputValue,u=o.tabIndex,c=o.form,d=o.menuIsOpen,f=o.required,p=this.getComponents(),g=p.Input,m=this.state,v=m.inputIsHidden,y=m.ariaSelection,x=this.commonProps,w=a||this.getElementId("input"),C=$e($e($e({"aria-autocomplete":"list","aria-expanded":d,"aria-haspopup":!0,"aria-errormessage":this.props["aria-errormessage"],"aria-invalid":this.props["aria-invalid"],"aria-label":this.props["aria-label"],"aria-labelledby":this.props["aria-labelledby"],"aria-required":f,role:"combobox","aria-activedescendant":this.state.isAppleDevice?void 0:this.state.focusedOptionId||""},d&&{"aria-controls":this.getElementId("listbox")}),!s&&{"aria-readonly":!0}),this.hasValue()?y?.action==="initial-input-focus"&&{"aria-describedby":this.getElementId("live-region")}:{"aria-describedby":this.getElementId("placeholder")});return s?b.createElement(g,He({},x,{autoCapitalize:"none",autoComplete:"off",autoCorrect:"off",id:w,innerRef:this.getInputRef,isDisabled:i,isHidden:v,onBlur:this.onInputBlur,onChange:this.handleInputChange,onFocus:this.onInputFocus,spellCheck:"false",tabIndex:u,form:c,type:"text",value:l},C)):b.createElement(ere,He({id:w,innerRef:this.getInputRef,onBlur:this.onInputBlur,onChange:yd,onFocus:this.onInputFocus,disabled:i,tabIndex:u,inputMode:"none",form:c,value:""},C))}},{key:"renderPlaceholderOrValue",value:function(){var o=this,i=this.getComponents(),s=i.MultiValue,a=i.MultiValueContainer,l=i.MultiValueLabel,u=i.MultiValueRemove,c=i.SingleValue,d=i.Placeholder,f=this.commonProps,p=this.props,g=p.controlShouldRenderValue,m=p.isDisabled,v=p.isMulti,y=p.inputValue,x=p.placeholder,w=this.state,C=w.selectValue,S=w.focusedValue,R=w.isFocused;if(!this.hasValue()||!g)return y?null:b.createElement(d,He({},f,{key:"placeholder",isDisabled:m,isFocused:R,innerProps:{id:this.getElementId("placeholder")}}),x);if(v)return C.map(function(T,_){var $=T===S,A="".concat(o.getOptionLabel(T),"-").concat(o.getOptionValue(T));return b.createElement(s,He({},f,{components:{Container:a,Label:l,Remove:u},isFocused:$,isDisabled:m,key:A,index:_,removeProps:{onClick:function(){return o.removeValue(T)},onTouchEnd:function(){return o.removeValue(T)},onMouseDown:function(O){O.preventDefault()}},data:T}),o.formatOptionLabel(T,"value"))});if(y)return null;var I=C[0];return b.createElement(c,He({},f,{data:I,isDisabled:m}),this.formatOptionLabel(I,"value"))}},{key:"renderClearIndicator",value:function(){var o=this.getComponents(),i=o.ClearIndicator,s=this.commonProps,a=this.props,l=a.isDisabled,u=a.isLoading,c=this.state.isFocused;if(!this.isClearable()||!i||l||!this.hasValue()||u)return null;var d={onMouseDown:this.onClearIndicatorMouseDown,onTouchEnd:this.onClearIndicatorTouchEnd,"aria-hidden":"true"};return b.createElement(i,He({},s,{innerProps:d,isFocused:c}))}},{key:"renderLoadingIndicator",value:function(){var o=this.getComponents(),i=o.LoadingIndicator,s=this.commonProps,a=this.props,l=a.isDisabled,u=a.isLoading,c=this.state.isFocused;if(!i||!u)return null;var d={"aria-hidden":"true"};return b.createElement(i,He({},s,{innerProps:d,isDisabled:l,isFocused:c}))}},{key:"renderIndicatorSeparator",value:function(){var o=this.getComponents(),i=o.DropdownIndicator,s=o.IndicatorSeparator;if(!i||!s)return null;var a=this.commonProps,l=this.props.isDisabled,u=this.state.isFocused;return b.createElement(s,He({},a,{isDisabled:l,isFocused:u}))}},{key:"renderDropdownIndicator",value:function(){var o=this.getComponents(),i=o.DropdownIndicator;if(!i)return null;var s=this.commonProps,a=this.props.isDisabled,l=this.state.isFocused,u={onMouseDown:this.onDropdownIndicatorMouseDown,onTouchEnd:this.onDropdownIndicatorTouchEnd,"aria-hidden":"true"};return b.createElement(i,He({},s,{innerProps:u,isDisabled:a,isFocused:l}))}},{key:"renderMenu",value:function(){var o=this,i=this.getComponents(),s=i.Group,a=i.GroupHeading,l=i.Menu,u=i.MenuList,c=i.MenuPortal,d=i.LoadingMessage,f=i.NoOptionsMessage,p=i.Option,g=this.commonProps,m=this.state.focusedOption,v=this.props,y=v.captureMenuScroll,x=v.inputValue,w=v.isLoading,C=v.loadingMessage,S=v.minMenuHeight,R=v.maxMenuHeight,I=v.menuIsOpen,T=v.menuPlacement,_=v.menuPosition,$=v.menuPortalTarget,A=v.menuShouldBlockScroll,M=v.menuShouldScrollIntoView,O=v.noOptionsMessage,B=v.onMenuScrollToTop,j=v.onMenuScrollToBottom;if(!I)return null;var D=function(J,K){var U=J.type,oe=J.data,X=J.isDisabled,te=J.isSelected,Q=J.label,se=J.value,ae=m===oe,L=X?void 0:function(){return o.onOptionHover(oe)},Z=X?void 0:function(){return o.selectOption(oe)},k="".concat(o.getElementId("option"),"-").concat(K),ie={id:k,onClick:Z,onMouseMove:L,onMouseOver:L,tabIndex:-1,role:"option","aria-selected":o.state.isAppleDevice?void 0:te};return b.createElement(p,He({},g,{innerProps:ie,data:oe,isDisabled:X,isSelected:te,key:k,label:Q,type:U,value:se,isFocused:ae,innerRef:ae?o.getFocusedOptionRef:void 0}),o.formatOptionLabel(J.data,"menu"))},V;if(this.hasOptions())V=this.getCategorizedOptions().map(function(W){if(W.type==="group"){var J=W.data,K=W.options,U=W.index,oe="".concat(o.getElementId("group"),"-").concat(U),X="".concat(oe,"-heading");return b.createElement(s,He({},g,{key:oe,data:J,options:K,Heading:a,headingProps:{id:X,data:W.data},label:o.formatGroupLabel(W.data)}),W.options.map(function(te){return D(te,"".concat(U,"-").concat(te.index))}))}else if(W.type==="option")return D(W,"".concat(W.index))});else if(w){var G=C({inputValue:x});if(G===null)return null;V=b.createElement(d,g,G)}else{var z=O({inputValue:x});if(z===null)return null;V=b.createElement(f,g,z)}var H={minMenuHeight:S,maxMenuHeight:R,menuPlacement:T,menuPosition:_,menuShouldScrollIntoView:M},ne=b.createElement(Nte,He({},g,H),function(W){var J=W.ref,K=W.placerProps,U=K.placement,oe=K.maxHeight;return b.createElement(l,He({},g,H,{innerRef:J,innerProps:{onMouseDown:o.onMenuMouseDown,onMouseMove:o.onMenuMouseMove},isLoading:w,placement:U}),b.createElement(are,{captureEnabled:y,onTopArrive:B,onBottomArrive:j,lockEnabled:A},function(X){return b.createElement(u,He({},g,{innerRef:function(Q){o.getMenuListRef(Q),X(Q)},innerProps:{role:"listbox","aria-multiselectable":g.isMulti,id:o.getElementId("listbox")},isLoading:w,maxHeight:oe,focusedOption:m}),V)}))});return $||_==="fixed"?b.createElement(c,He({},g,{appendTo:$,controlElement:this.controlRef,menuPlacement:T,menuPosition:_}),ne):ne}},{key:"renderFormField",value:function(){var o=this,i=this.props,s=i.delimiter,a=i.isDisabled,l=i.isMulti,u=i.name,c=i.required,d=this.state.selectValue;if(c&&!this.hasValue()&&!a)return b.createElement(dre,{name:u,onFocus:this.onValueInputFocus});if(!(!u||a))if(l)if(s){var f=d.map(function(m){return o.getOptionValue(m)}).join(s);return b.createElement("input",{name:u,type:"hidden",value:f})}else{var p=d.length>0?d.map(function(m,v){return b.createElement("input",{key:"i-".concat(v),name:u,type:"hidden",value:o.getOptionValue(m)})}):b.createElement("input",{name:u,type:"hidden",value:""});return b.createElement("div",null,p)}else{var g=d[0]?this.getOptionValue(d[0]):"";return b.createElement("input",{name:u,type:"hidden",value:g})}}},{key:"renderLiveRegion",value:function(){var o=this.commonProps,i=this.state,s=i.ariaSelection,a=i.focusedOption,l=i.focusedValue,u=i.isFocused,c=i.selectValue,d=this.getFocusableOptions();return b.createElement(Yne,He({},o,{id:this.getElementId("live-region"),ariaSelection:s,focusedOption:a,focusedValue:l,isFocused:u,selectValue:c,focusableOptions:d,isAppleDevice:this.state.isAppleDevice}))}},{key:"render",value:function(){var o=this.getComponents(),i=o.Control,s=o.IndicatorsContainer,a=o.SelectContainer,l=o.ValueContainer,u=this.props,c=u.className,d=u.id,f=u.isDisabled,p=u.menuIsOpen,g=this.state.isFocused,m=this.commonProps=this.getCommonProps();return b.createElement(a,He({},m,{className:c,innerProps:{id:d,onKeyDown:this.onKeyDown},isDisabled:f,isFocused:g}),this.renderLiveRegion(),b.createElement(i,He({},m,{innerRef:this.getControlRef,innerProps:{onMouseDown:this.onControlMouseDown,onTouchEnd:this.onControlTouchEnd},isDisabled:f,isFocused:g,menuIsOpen:p}),b.createElement(l,He({},m,{isDisabled:f}),this.renderPlaceholderOrValue(),this.renderInput()),b.createElement(s,He({},m,{isDisabled:f}),this.renderClearIndicator(),this.renderLoadingIndicator(),this.renderIndicatorSeparator(),this.renderDropdownIndicator())),this.renderMenu(),this.renderFormField())}}],[{key:"getDerivedStateFromProps",value:function(o,i){var s=i.prevProps,a=i.clearFocusValueOnUpdate,l=i.inputIsHiddenAfterUpdate,u=i.ariaSelection,c=i.isFocused,d=i.prevWasFocused,f=i.instancePrefix,p=o.options,g=o.value,m=o.menuIsOpen,v=o.inputValue,y=o.isMulti,x=xd(g),w={};if(s&&(g!==s.value||p!==s.options||m!==s.menuIsOpen||v!==s.inputValue)){var C=m?Ire(o,x):[],S=m?PI(_c(o,x),"".concat(f,"-option")):[],R=a?Rre(i,x):null,I=Are(i,C),T=Um(S,I);w={selectValue:x,focusedOption:I,focusedOptionId:T,focusableOptionsWithIds:S,focusedValue:R,clearFocusValueOnUpdate:!1}}var _=l!=null&&o!==s?{inputIsHidden:l,inputIsHiddenAfterUpdate:void 0}:{},$=u,A=c&&d;return c&&!A&&($={value:ol(y,x,x[0]||null),options:x,action:"initial-input-focus"},A=!d),u?.action==="initial-input-focus"&&($=null),$e($e($e({},w),_),{},{prevProps:o,ariaSelection:$,prevWasFocused:A})}}]),n})(N.Component);yx.defaultProps=Ere;var Ore=N.forwardRef(function(e,t){var n=a2(e);return b.createElement(yx,He({ref:t},n))}),Nre=Ore,Pre=["allowCreateWhileLoading","createOptionPosition","formatCreateLabel","isValidNewOption","getNewOptionData","onCreateOption","options","onChange"],MI=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",n=arguments.length>1?arguments[1]:void 0,r=arguments.length>2?arguments[2]:void 0,o=String(t).toLowerCase(),i=String(r.getOptionValue(n)).toLowerCase(),s=String(r.getOptionLabel(n)).toLowerCase();return i===o||s===o},Ym={formatCreateLabel:function(t){return'Create "'.concat(t,'"')},isValidNewOption:function(t,n,r,o){return!(!t||n.some(function(i){return MI(t,i,o)})||r.some(function(i){return MI(t,i,o)}))},getNewOptionData:function(t,n){return{label:n,value:t,__isNew__:!0}}};function _re(e){var t=e.allowCreateWhileLoading,n=t===void 0?!1:t,r=e.createOptionPosition,o=r===void 0?"last":r,i=e.formatCreateLabel,s=i===void 0?Ym.formatCreateLabel:i,a=e.isValidNewOption,l=a===void 0?Ym.isValidNewOption:a,u=e.getNewOptionData,c=u===void 0?Ym.getNewOptionData:u,d=e.onCreateOption,f=e.options,p=f===void 0?[]:f,g=e.onChange,m=ho(e,Pre),v=m.getOptionValue,y=v===void 0?k2:v,x=m.getOptionLabel,w=x===void 0?D2:x,C=m.inputValue,S=m.isLoading,R=m.isMulti,I=m.value,T=m.name,_=N.useMemo(function(){return l(C,xd(I),p,{getOptionValue:y,getOptionLabel:w})?c(C,s(C)):void 0},[s,c,w,y,C,l,p,I]),$=N.useMemo(function(){return(n||!S)&&_?o==="first"?[_].concat(Zs(p)):[].concat(Zs(p),[_]):p},[n,o,S,_,p]),A=N.useCallback(function(M,O){if(O.action!=="select-option")return g(M,O);var B=Array.isArray(M)?M:[M];if(B[B.length-1]===_){if(d)d(C);else{var j=c(C,C),D={action:"create-option",name:T,option:j};g(ol(R,[].concat(Zs(xd(I)),[j]),j),D)}return}g(M,O)},[c,C,R,T,_,d,g,I]);return $e($e({},m),{},{options:$,onChange:A})}var Mre=N.forwardRef(function(e,t){var n=a2(e),r=_re(n);return b.createElement(yx,He({ref:t},r))}),Dre=Mre;const kre={control:({isFocused:e,isDisabled:t})=>F("ui:min-h-10! ui:w-full ui:rounded-md! ui:bg-segmentify-200 ui:px-0! ui:text-sm ui:border ui:border-border!",e&&!t&&Vi({variant:"isControlFocused"}),t&&Vi({variant:"isDisabled"})),option:({isFocused:e,isSelected:t,isDisabled:n})=>F(Vi({variant:"default"}),t&&Vi({variant:"isSelected"}),!t&&e&&Vi({variant:"isFocused"}),n&&Vi({variant:"isDisabled"})),multiValue:()=>F(Vi({variant:"multiSelected"})),multiValueLabel:()=>"ui:text-primary!",multiValueRemove:()=>"ui:text-primary!",placeholder:()=>"ui:text-segmentify-600"};function jre({label:e,name:t,options:n,value:r,onChange:o,onInputChange:i,placeholder:s,isClearable:a=!0,isSearchable:l=!0,isMulti:u=!0,isDisabled:c,description:d,className:f,isCreatable:p}){const g={"data-test-id":t,name:t,options:n,value:r,onChange:o,onInputChange:i,isClearable:a,isSearchable:l,isMulti:u,isDisabled:c,placeholder:s,classNames:kre};return h.jsxs("article",{children:[e&&h.jsx(gr,{className:"ui:mb-2 ui:block",children:e}),h.jsx("div",{className:F("field-select ui:w-full select-wrapper ui:rounded-md! ui:text-sm",f),children:p?h.jsx(Dre,{...g}):h.jsx(Nre,{...g})}),d&&h.jsx(If,{description:d})]})}function H2({...e}){return h.jsx(Xl,{"data-slot":"sheet",...e})}function Lre({...e}){return h.jsx(jd,{"data-slot":"sheet-trigger",...e})}function Fre({...e}){return h.jsx(ds,{"data-slot":"sheet-close",...e})}function Bre({...e}){return h.jsx(Zl,{"data-slot":"sheet-portal",...e})}function Vre({className:e,...t}){return h.jsx(Jl,{"data-slot":"sheet-overlay",className:F("ui:data-[state=open]:animate-in ui:data-[state=closed]:animate-out ui:data-[state=closed]:fade-out-0 ui:data-[state=open]:fade-in-0 ui:fixed ui:inset-0 ui:z-50 ui:bg-black/50",e),...t})}function W2({className:e,children:t,side:n="right",...r}){return h.jsxs(Bre,{children:[h.jsx(Vre,{}),h.jsxs(Kl,{"data-slot":"sheet-content",className:F("ui:bg-background ui:data-[state=open]:animate-in ui:data-[state=closed]:animate-out ui:fixed ui:z-50 ui:flex ui:flex-col ui:gap-4 ui:shadow-lg ui:transition ui:ease-in-out ui:data-[state=closed]:duration-300 ui:data-[state=open]:duration-500",n==="right"&&"ui:data-[state=closed]:slide-out-to-right ui:data-[state=open]:slide-in-from-right ui:inset-y-0 ui:right-0 ui:h-full ui:w-3/4 ui:border-l ui:sm:max-w-sm",n==="left"&&"ui:data-[state=closed]:slide-out-to-left ui:data-[state=open]:slide-in-from-left ui:inset-y-0 ui:left-0 ui:h-full ui:w-3/4 ui:border-r ui:sm:max-w-sm",n==="top"&&"ui:data-[state=closed]:slide-out-to-top ui:data-[state=open]:slide-in-from-top ui:inset-x-0 ui:top-0 ui:h-auto ui:border-b",n==="bottom"&&"ui:data-[state=closed]:slide-out-to-bottom ui:data-[state=open]:slide-in-from-bottom ui:inset-x-0 ui:bottom-0 ui:h-auto ui:border-t",e),...r,children:[t,h.jsxs(ds,{"data-testid":"sheet-close-icon",className:"ui:ring-offset-background ui:focus:ring-ring ui:data-[state=open]:bg-secondary ui:absolute ui:top-4 ui:right-4 ui:rounded-xs ui:opacity-70 ui:transition-opacity ui:hover:opacity-100 ui:focus:ring-2 ui:focus:ring-offset-2 ui:focus:outline-hidden ui:disabled:pointer-events-none",children:[h.jsx(_e.XIcon,{className:"ui:size-4"}),h.jsx("span",{className:"ui:sr-only",children:"Close"})]})]})]})}function z2({className:e,...t}){return h.jsx("div",{"data-slot":"sheet-header",className:F("ui:flex ui:flex-col ui:gap-1.5 ui:p-4",e),...t})}function $re({className:e,...t}){return h.jsx("div",{"data-slot":"sheet-footer",className:F("ui:mt-auto ui:flex ui:flex-col ui:gap-2 ui:p-4",e),...t})}function q2({className:e,...t}){return h.jsx(Ld,{"data-slot":"sheet-title",className:F("ui:text-foreground ui:font-semibold",e),...t})}function U2({className:e,...t}){return h.jsx(Fd,{"data-slot":"sheet-description",className:F("ui:text-muted-foreground ui:text-sm",e),...t})}const Xm=768;function Gre(){const[e,t]=b.useState();return b.useEffect(()=>{const n=window.matchMedia(`(max-width: ${Xm-1}px)`),r=()=>{t(window.innerWidth<Xm)};return n.addEventListener("change",r),t(window.innerWidth<Xm),()=>n.removeEventListener("change",r)},[]),!!e}function Rv({className:e,...t}){return h.jsx("div",{"data-slot":"skeleton",className:F("ui:bg-accent ui:animate-pulse ui:rounded-md ui:shrink-0",e),...t})}const Y2=b.createContext(null);function $f(){const e=b.useContext(Y2);if(!e)throw new Error("useSidebar must be used within a SidebarProvider.");return e}const Hre="sidebar_state",Wre=3600*24*7,zre="16rem",qre="18rem",Ure="3rem",Yre="b";function Xre({defaultOpen:e=!0,open:t,onOpenChange:n,className:r,style:o,children:i,...s}){const a=Gre(),[l,u]=b.useState(!1),[c,d]=b.useState(e),f=t??c,p=b.useCallback(y=>{const x=typeof y=="function"?y(f):y;n?n(x):d(x),document.cookie=`${Hre}=${x}; path=/; max-age=${Wre}`},[n,f]),g=b.useCallback(()=>a?u(y=>!y):p(y=>!y),[a,p,u]);b.useEffect(()=>{const y=x=>{x.key===Yre&&(x.metaKey||x.ctrlKey)&&(x.preventDefault(),g())};return window.addEventListener("keydown",y),()=>window.removeEventListener("keydown",y)},[g]);const m=f?"expanded":"collapsed",v=b.useMemo(()=>({state:m,open:f,setOpen:p,isMobile:a,openMobile:l,setOpenMobile:u,toggleSidebar:g}),[m,f,p,a,l,u,g]);return h.jsx(Y2.Provider,{value:v,children:h.jsx(ax,{delayDuration:0,children:h.jsx("div",{"data-slot":"sidebar-wrapper",style:{"--sidebar-width":zre,"--sidebar-width-icon":Ure,...o},className:F("ui:group/sidebar-wrapper ui:has-data-[variant=inset]:bg-sidebar ui:flex ui:min-h-svh ui:w-full",r),...s,children:i})})})}function Zre({side:e="left",variant:t="sidebar",collapsible:n="offcanvas",className:r,children:o,...i}){const{isMobile:s,state:a,openMobile:l,setOpenMobile:u}=$f();return n==="none"?h.jsx("div",{"data-slot":"sidebar",className:F("ui:bg-sidebar ui:text-sidebar-foreground ui:flex ui:h-full ui:w-(--sidebar-width) ui:flex-col",r),...i,children:o}):s?h.jsx(H2,{open:l,onOpenChange:u,...i,children:h.jsxs(W2,{"data-sidebar":"sidebar","data-slot":"sidebar","data-mobile":"true",className:"ui:bg-sidebar ui:text-sidebar-foreground ui:w-(--sidebar-width) ui:p-0 ui:[&>button]:hidden",style:{"--sidebar-width":qre},side:e,children:[h.jsxs(z2,{className:"ui:sr-only",children:[h.jsx(q2,{children:"Sidebar"}),h.jsx(U2,{children:"Displays the mobile sidebar."})]}),h.jsx("div",{className:"ui:flex ui:h-full ui:w-full ui:flex-col",children:o})]})}):h.jsxs("div",{className:"ui:group ui:peer ui:text-sidebar-foreground ui:hidden ui:md:block","data-state":a,"data-collapsible":a==="collapsed"?n:"","data-variant":t,"data-side":e,"data-slot":"sidebar",children:[h.jsx("div",{"data-slot":"sidebar-gap",className:F("ui:relative ui:w-(--sidebar-width) ui:bg-transparent ui:transition-[width] ui:duration-200 ui:ease-linear","ui:group-data-[collapsible=offcanvas]:w-0","ui:group-data-[side=right]:rotate-180",t==="floating"||t==="inset"?"ui:group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]":"ui:group-data-[collapsible=icon]:w-(--sidebar-width-icon)")}),h.jsx("div",{"data-slot":"sidebar-container",className:F("ui:fixed ui:inset-y-0 ui:z-10 ui:hidden ui:h-svh ui:w-(--sidebar-width) ui:transition-[left,right,width] ui:duration-200 ui:ease-linear ui:md:flex",e==="left"?"ui:left-0 ui:group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]":"ui:right-0 ui:group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]",t==="floating"||t==="inset"?"ui:p-2 ui:group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]":"ui:group-data-[collapsible=icon]:w-(--sidebar-width-icon) ui:group-data-[side=left]:border-r ui:group-data-[side=right]:border-l",r),...i,children:h.jsx("div",{"data-sidebar":"sidebar","data-slot":"sidebar-inner",className:"ui:bg-sidebar ui:group-data-[variant=floating]:border-sidebar-border ui:flex ui:h-full ui:w-full ui:flex-col ui:group-data-[variant=floating]:rounded-lg ui:group-data-[variant=floating]:border ui:group-data-[variant=floating]:shadow-sm",children:o})})]})}function Jre({className:e,onClick:t,...n}){const{toggleSidebar:r}=$f();return h.jsxs(on,{"data-sidebar":"trigger","data-slot":"sidebar-trigger",variant:"ghost",size:"icon",className:F("ui:size-7",e),onClick:o=>{t?.(o),r()},...n,children:[h.jsx(_e.PanelLeftIcon,{}),h.jsx("span",{className:"ui:sr-only",children:"Toggle Sidebar"})]})}function Kre({className:e,...t}){const{toggleSidebar:n}=$f();return h.jsx("button",{"data-sidebar":"rail","data-slot":"sidebar-rail","aria-label":"Toggle Sidebar",tabIndex:-1,onClick:n,title:"Toggle Sidebar",className:F("ui:hover:after:bg-sidebar-border ui:absolute ui:inset-y-0 ui:z-20 ui:hidden ui:w-4 ui:-translate-x-1/2 ui:transition-all ui:ease-linear ui:group-data-[side=left]:-right-4 ui:group-data-[side=right]:left-0 ui:after:absolute ui:after:inset-y-0 ui:after:left-1/2 ui:after:w-[2px] ui:sm:flex","ui:in-data-[side=left]:cursor-w-resize ui:in-data-[side=right]:cursor-e-resize","ui:[[data-side=left][data-state=collapsed]_&]:cursor-e-resize ui:[[data-side=right][data-state=collapsed]_&]:cursor-w-resize","ui:hover:group-data-[collapsible=offcanvas]:bg-sidebar ui:group-data-[collapsible=offcanvas]:translate-x-0 ui:group-data-[collapsible=offcanvas]:after:left-full","ui:[[data-side=left][data-collapsible=offcanvas]_&]:-right-2","ui:[[data-side=right][data-collapsible=offcanvas]_&]:-left-2",e),...t})}function Qre({className:e,...t}){return h.jsx("main",{"data-slot":"sidebar-inset",className:F("ui:bg-background ui:relative ui:flex ui:w-full ui:flex-1 ui:flex-col","ui:md:peer-data-[variant=inset]:m-2 ui:md:peer-data-[variant=inset]:ml-0 ui:md:peer-data-[variant=inset]:rounded-xl ui:md:peer-data-[variant=inset]:shadow-sm ui:md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ml-2",e),...t})}function eoe({className:e,...t}){return h.jsx(vu,{"data-slot":"sidebar-input","data-sidebar":"input",className:F("ui:bg-background ui:h-8 ui:w-full ui:shadow-none",e),...t})}function toe({className:e,...t}){return h.jsx("div",{"data-slot":"sidebar-header","data-sidebar":"header",className:F("ui:flex ui:flex-col ui:gap-2 ui:p-2",e),...t})}function noe({className:e,...t}){return h.jsx("div",{"data-slot":"sidebar-footer","data-sidebar":"footer",className:F("ui:flex ui:flex-col ui:gap-2 ui:p-2",e),...t})}function roe({className:e,...t}){return h.jsx(o2,{"data-slot":"sidebar-separator","data-sidebar":"separator",className:F("ui:bg-sidebar-border ui:mx-2 ui:w-auto",e),...t})}function ooe({className:e,...t}){return h.jsx("div",{"data-slot":"sidebar-content","data-sidebar":"content",className:F("ui:flex ui:min-h-0 ui:flex-1 ui:flex-col ui:gap-2 ui:overflow-auto ui:group-data-[collapsible=icon]:overflow-hidden",e),...t})}function ioe({className:e,...t}){return h.jsx("div",{"data-slot":"sidebar-group","data-sidebar":"group",className:F("ui:relative ui:flex ui:w-full ui:min-w-0 ui:flex-col ui:p-2",e),...t})}function soe({className:e,asChild:t=!1,...n}){const r=t?Bo:"div";return h.jsx(r,{"data-slot":"sidebar-group-label","data-sidebar":"group-label",className:F("ui:text-sidebar-foreground/70 ui:ring-sidebar-ring ui:flex ui:h-8 ui:shrink-0 ui:items-center ui:rounded-md ui:px-2 ui:text-xs ui:font-medium ui:outline-hidden ui:transition-[margin,opacity] ui:duration-200 ui:ease-linear ui:focus-visible:ring-2 ui:[&>svg]:size-4 ui:[&>svg]:shrink-0","ui:group-data-[collapsible=icon]:-mt-8 ui:group-data-[collapsible=icon]:opacity-0",e),...n})}function aoe({className:e,asChild:t=!1,...n}){const r=t?Bo:"button";return h.jsx(r,{"data-slot":"sidebar-group-action","data-sidebar":"group-action",className:F("ui:text-sidebar-foreground ui:ring-sidebar-ring ui:hover:bg-sidebar-accent ui:hover:text-sidebar-accent-foreground ui:absolute ui:top-3.5 ui:right-3 ui:flex ui:aspect-square ui:w-5 ui:items-center ui:justify-center ui:rounded-md ui:p-0 ui:outline-hidden ui:transition-transform ui:focus-visible:ring-2 ui:[&>svg]:size-4 ui:[&>svg]:shrink-0","ui:after:absolute ui:after:-inset-2 ui:md:after:hidden","ui:group-data-[collapsible=icon]:hidden",e),...n})}function loe({className:e,...t}){return h.jsx("div",{"data-slot":"sidebar-group-content","data-sidebar":"group-content",className:F("ui:w-full ui:text-sm",e),...t})}function uoe({className:e,...t}){return h.jsx("ul",{"data-slot":"sidebar-menu","data-sidebar":"menu",className:F("ui:flex ui:w-full ui:min-w-0 ui:flex-col ui:gap-1",e),...t})}function coe({className:e,...t}){return h.jsx("li",{"data-slot":"sidebar-menu-item","data-sidebar":"menu-item",className:F("ui:group/menu-item ui:relative",e),...t})}const doe=Si("ui:peer/menu-button ui:flex ui:w-full ui:items-center ui:gap-2 ui:overflow-hidden ui:rounded-md ui:p-2 ui:text-left ui:text-sm ui:outline-hidden ui:ring-sidebar-ring ui:transition-[width,height,padding] ui:hover:bg-sidebar-accent ui:hover:text-sidebar-accent-foreground ui:focus-visible:ring-2 ui:active:bg-sidebar-accent ui:active:text-sidebar-accent-foreground ui:disabled:pointer-events-none ui:disabled:opacity-50 ui:group-has-data-[sidebar=menu-action]/menu-item:pr-8 ui:aria-disabled:pointer-events-none ui:aria-disabled:opacity-50 ui:data-[active=true]:bg-sidebar-accent ui:data-[active=true]:font-medium ui:data-[active=true]:text-sidebar-accent-foreground ui:data-[state=open]:hover:bg-sidebar-accent ui:data-[state=open]:hover:text-sidebar-accent-foreground ui:group-data-[collapsible=icon]:size-8! ui:group-data-[collapsible=icon]:p-2! ui:[&>span:last-child]:truncate ui:[&>svg]:size-4 ui:[&>svg]:shrink-0",{variants:{variant:{default:"ui:hover:bg-sidebar-accent ui:hover:text-sidebar-accent-foreground",outline:"ui:bg-background ui:shadow-[0_0_0_1px_hsl(var(--sidebar-border))] ui:hover:bg-sidebar-accent ui:hover:text-sidebar-accent-foreground ui:hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]"},size:{default:"ui:h-8 ui:text-sm",sm:"ui:h-7 ui:text-xs",lg:"ui:h-12 ui:text-sm ui:group-data-[collapsible=icon]:p-0!"}},defaultVariants:{variant:"default",size:"default"}});function foe({asChild:e=!1,isActive:t=!1,variant:n="default",size:r="default",tooltip:o,className:i,...s}){const a=e?Bo:"button",{isMobile:l,state:u}=$f(),c=h.jsx(a,{"data-slot":"sidebar-menu-button","data-sidebar":"menu-button","data-size":r,"data-active":t,className:F(doe({variant:n,size:r}),i),...s});return o?(typeof o=="string"&&(o={children:o}),h.jsxs(lx,{children:[h.jsx(ux,{asChild:!0,children:c}),h.jsx(jf,{side:"right",align:"center",hidden:u!=="collapsed"||l,...o})]})):c}function poe({className:e,asChild:t=!1,showOnHover:n=!1,...r}){const o=t?Bo:"button";return h.jsx(o,{"data-slot":"sidebar-menu-action","data-sidebar":"menu-action",className:F("ui:text-sidebar-foreground ui:ring-sidebar-ring ui:hover:bg-sidebar-accent ui:hover:text-sidebar-accent-foreground ui:peer-hover/menu-button:text-sidebar-accent-foreground ui:absolute ui:top-1.5 ui:right-1 ui:flex ui:aspect-square ui:w-5 ui:items-center ui:justify-center ui:rounded-md ui:p-0 ui:outline-hidden ui:transition-transform ui:focus-visible:ring-2 ui:[&>svg]:size-4 ui:[&>svg]:shrink-0","ui:after:absolute ui:after:-inset-2 ui:md:after:hidden","ui:peer-data-[size=sm]/menu-button:top-1","ui:peer-data-[size=default]/menu-button:top-1.5","ui:peer-data-[size=lg]/menu-button:top-2.5","ui:group-data-[collapsible=icon]:hidden",n&&"ui:peer-data-[active=true]/menu-button:text-sidebar-accent-foreground ui:group-focus-within/menu-item:opacity-100 ui:group-hover/menu-item:opacity-100 ui:data-[state=open]:opacity-100 ui:md:opacity-0",e),...r})}function hoe({className:e,...t}){return h.jsx("div",{"data-slot":"sidebar-menu-badge","data-sidebar":"menu-badge",className:F("ui:text-sidebar-foreground ui:pointer-events-none ui:absolute ui:right-1 ui:flex ui:h-5 ui:min-w-5 ui:items-center ui:justify-center ui:rounded-md ui:px-1 ui:text-xs ui:font-medium ui:tabular-nums ui:select-none","ui:peer-hover/menu-button:text-sidebar-accent-foreground ui:peer-data-[active=true]/menu-button:text-sidebar-accent-foreground","ui:peer-data-[size=sm]/menu-button:top-1","ui:peer-data-[size=default]/menu-button:top-1.5","ui:peer-data-[size=lg]/menu-button:top-2.5","ui:group-data-[collapsible=icon]:hidden",e),...t})}function goe({className:e,showIcon:t=!1,...n}){const[r,o]=b.useState("80%");return b.useEffect(()=>{o(`${Math.floor(Math.random()*40)+50}%`)},[]),h.jsxs("div",{"data-slot":"sidebar-menu-skeleton","data-sidebar":"menu-skeleton",className:F("ui:flex ui:h-8 ui:items-center ui:gap-2 ui:rounded-md ui:px-2",e),...n,children:[t&&h.jsx(Rv,{className:"ui:size-4 ui:rounded-md","data-sidebar":"menu-skeleton-icon"}),h.jsx(Rv,{className:"ui:h-4 ui:max-w-(--skeleton-width) ui:flex-1","data-sidebar":"menu-skeleton-text",style:{"--skeleton-width":r}})]})}function moe({className:e,...t}){return h.jsx("ul",{"data-slot":"sidebar-menu-sub","data-sidebar":"menu-sub",className:F("ui:border-sidebar-border ui:mx-3.5 ui:flex ui:min-w-0 ui:translate-x-px ui:flex-col ui:gap-1 ui:border-l ui:px-2.5 ui:py-0.5","ui:group-data-[collapsible=icon]:hidden",e),...t})}function boe({className:e,...t}){return h.jsx("li",{"data-slot":"sidebar-menu-sub-item","data-sidebar":"menu-sub-item",className:F("ui:group/menu-sub-item ui:relative",e),...t})}function voe({asChild:e=!1,size:t="md",isActive:n=!1,className:r,...o}){const i=e?Bo:"a";return h.jsx(i,{"data-slot":"sidebar-menu-sub-button","data-sidebar":"menu-sub-button","data-size":t,"data-active":n,className:F("ui:text-sidebar-foreground ui:ring-sidebar-ring ui:hover:bg-sidebar-accent ui:hover:text-sidebar-accent-foreground ui:active:bg-sidebar-accent ui:active:text-sidebar-accent-foreground ui:[&>svg]:text-sidebar-accent-foreground ui:flex ui:h-7 ui:min-w-0 ui:-translate-x-px ui:items-center ui:gap-2 ui:overflow-hidden ui:rounded-md ui:px-2 ui:outline-hidden ui:focus-visible:ring-2 ui:disabled:pointer-events-none ui:disabled:opacity-50 ui:aria-disabled:pointer-events-none ui:aria-disabled:opacity-50 ui:[&>span:last-child]:truncate ui:[&>svg]:size-4 ui:[&>svg]:shrink-0","ui:data-[active=true]:bg-sidebar-accent ui:data-[active=true]:text-sidebar-accent-foreground",t==="sm"&&"ui:text-xs",t==="md"&&"ui:text-sm","ui:group-data-[collapsible=icon]:hidden",r),...o})}var yoe=(e,t,n,r,o,i,s,a)=>{let l=document.documentElement,u=["light","dark"];function c(p){(Array.isArray(e)?e:[e]).forEach(g=>{let m=g==="class",v=m&&i?o.map(y=>i[y]||y):o;m?(l.classList.remove(...v),l.classList.add(i&&i[p]?i[p]:p)):l.setAttribute(g,p)}),d(p)}function d(p){a&&u.includes(p)&&(l.style.colorScheme=p)}function f(){return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}if(r)c(r);else try{let p=localStorage.getItem(t)||n,g=s&&p==="system"?f():p;c(g)}catch{}},xoe=b.createContext(void 0),woe={setTheme:e=>{},themes:[]},Coe=()=>{var e;return(e=b.useContext(xoe))!=null?e:woe};b.memo(({forcedTheme:e,storageKey:t,attribute:n,enableSystem:r,enableColorScheme:o,defaultTheme:i,value:s,themes:a,nonce:l,scriptProps:u})=>{let c=JSON.stringify([n,t,i,e,a,s,r,o]).slice(1,-1);return b.createElement("script",{...u,suppressHydrationWarning:!0,nonce:typeof window>"u"?l:"",dangerouslySetInnerHTML:{__html:`(${yoe.toString()})(${c})`}})});const Soe=({...e})=>{const{theme:t="system"}=Coe();return h.jsx(Jv.Toaster,{theme:t,className:"ui:toaster ui:group",icons:{success:h.jsx(_e.CircleCheckIcon,{className:"ui:size-4"}),info:h.jsx(_e.InfoIcon,{className:"ui:size-4"}),warning:h.jsx(_e.TriangleAlertIcon,{className:"ui:size-4"}),error:h.jsx(_e.OctagonXIcon,{className:"ui:size-4"}),loading:h.jsx(_e.Loader2Icon,{className:"ui:size-4 ui:animate-spin"})},style:{"--normal-bg":"var(--ui-popover)","--normal-text":"var(--ui-popover-foreground)","--normal-border":"var(--ui-border)","--border-radius":"var(--ui-radius)"},...e})};function Eoe({title:e,containerClassName:t,className:n,...r}){return h.jsx("section",{className:F(t),children:h.jsxs("div",{className:"ui:flex ui:gap-1 ui:items-center",children:[h.jsx(_e.Loader2Icon,{role:"status","aria-label":"Loading",className:F("ui:size-4 ui:animate-spin",n),...r}),e&&h.jsx("span",{children:e})]})})}function Ioe({className:e,...t}){return h.jsx(_H,{"data-slot":"tabs",className:F("ui:flex ui:flex-col ui:gap-2",e),...t})}function Roe({className:e,...t}){return h.jsx(MH,{"data-slot":"tabs-list",className:F("ui:bg-white ui:text-muted-foreground ui:inline-flex ui:gap-2 ui:h-9 ui:w-fit ui:items-center ui:justify-center ui:rounded-lg ui:px-2",e),...t})}function Aoe({className:e,...t}){return h.jsx(DH,{"data-slot":"tabs-trigger",className:F("ui:bg-transparent ui:data-[state=active]:bg-segmentify-200 ui:dark:data-[state=active]:text-foreground ui:focus-visible:border-ring ui:focus-visible:ring-ring/50 ui:focus-visible:outline-ring ui:dark:data-[state=active]:border-input ui:dark:data-[state=active]:bg-input/30 ui:text-foreground ui:data-[state=active]:text-primary ui:dark:text-muted-foreground ui:inline-flex ui:h-7 ui:flex-1 ui:items-center ui:justify-center ui:gap-1.5 ui:rounded-md ui:border ui:border-transparent ui:px-4 ui:py-1 ui:text-sm ui:font-medium ui:whitespace-nowrap ui:transition-[color,box-shadow] ui:focus-visible:ring-[3px] ui:focus-visible:outline-1 ui:disabled:pointer-events-none ui:disabled:opacity-50 ui:data-[state=active]:shadow-sm ui:[&_svg]:pointer-events-none ui:[&_svg]:shrink-0 ui:[&_svg:not([class*='size-'])]:size-4","ui:hover:bg-segmentify-200 ui:hover:text-primary ui:cursor-pointer ui:transition-all ui:duration-200",e),...t})}function Toe({className:e,...t}){return h.jsx(kH,{"data-slot":"tabs-content",className:F("ui:flex-1 ui:outline-none",e),...t})}function X2({className:e,...t}){return h.jsx("div",{"data-slot":"table-container",className:"ui:relative ui:w-full ui:overflow-x-auto",children:h.jsx("table",{"data-slot":"table",className:F("ui:w-full ui:caption-bottom ui:text-sm",e),...t})})}function Z2({className:e,...t}){return h.jsx("thead",{"data-slot":"table-header",className:F("ui:[&_tr]:border-b",e),...t})}function J2({className:e,...t}){return h.jsx("tbody",{"data-slot":"table-body",className:F("ui:[&_tr:last-child]:border-0",e),...t})}function Ooe({className:e,...t}){return h.jsx("tfoot",{"data-slot":"table-footer",className:F("ui:bg-muted/50 ui:border-t ui:font-medium ui:[&>tr]:last:border-b-0",e),...t})}function il({className:e,...t}){return h.jsx("tr",{"data-slot":"table-row",className:F("ui:hover:bg-muted/50 ui:data-[state=selected]:bg-muted ui:border-b ui:transition-colors",e),...t})}function K2({className:e,...t}){return h.jsx("th",{"data-slot":"table-head",className:F("ui:text-foreground ui:h-10 ui:px-2 ui:text-left ui:align-middle ui:font-medium ui:whitespace-nowrap ui:*:[[role=checkbox]]:translate-y-[2px]",e),...t})}function Mc({className:e,...t}){return h.jsx("td",{"data-slot":"table-cell",className:F("ui:px-2 ui:py-7 ui:align-middle ui:whitespace-nowrap ui:*:[[role=checkbox]]:translate-y-[2px]",e),...t})}function Noe({className:e,...t}){return h.jsx("caption",{"data-slot":"table-caption",className:F("ui:text-muted-foreground ui:mt-4 ui:text-sm",e),...t})}const Av=[{bg:"ui:bg-violet-600/10",text:"ui:text-violet-600"},{bg:"ui:bg-blue-600/10",text:"ui:text-blue-600"},{bg:"ui:bg-emerald-600/10",text:"ui:text-emerald-600"},{bg:"ui:bg-amber-600/10",text:"ui:text-amber-600"},{bg:"ui:bg-rose-600/10",text:"ui:text-rose-600"},{bg:"ui:bg-cyan-600/10",text:"ui:text-cyan-600"},{bg:"ui:bg-pink-600/10",text:"ui:text-pink-600"},{bg:"ui:bg-indigo-600/10",text:"ui:text-indigo-600"},{bg:"ui:bg-teal-600/10",text:"ui:text-teal-600"},{bg:"ui:bg-orange-600/10",text:"ui:text-orange-600"}],Poe=e=>Array.from({length:e},()=>Math.floor(Math.random()*Av.length)),_oe=({items:e,header:t,className:n,onItemClick:r,dateLocale:o})=>{const[i]=N.useState(()=>Poe(e.length));return h.jsxs("div",{className:F("ui:w-full ui:bg-white ui:rounded-lg ui:border ui:shadow-sm ui:p-6",n),children:[t&&h.jsx("div",{className:"ui:mb-4 ui:text-sm ui:text-muted-foreground",children:t}),h.jsx("div",{className:"ui:relative",children:e.map((s,a)=>{const{iconConfig:l,title:u,description:c,timestamp:d,tags:f,topRightSlot:p,bottomRightSlot:g}=s,m=l.icon,v=i[a]??a%Av.length,y=Av[v],x=l.bg??y.bg,w=l.text??y.text,C=!!r;return h.jsxs("div",{className:"ui:relative ui:flex ui:gap-4 ui:pb-6 ui:last:pb-0",children:[a<e.length-1&&h.jsx("div",{className:"ui:absolute ui:left-5 ui:top-11 ui:bottom-0 ui:w-0.5 ui:bg-border/60"}),h.jsx("div",{className:"ui:relative ui:z-10 ui:size-11 ui:shrink-0 ui:border ui:border-zinc-50 ui:p-1 ui:rounded-full ui:shadow-md",children:h.jsx("div",{className:F("ui:size-full ui:flex ui:items-center ui:justify-center ui:rounded-full",x),children:h.jsx(m,{className:F("ui:size-4",w)})})}),h.jsxs("div",{role:C?"button":void 0,tabIndex:C?0:void 0,onClick:C?()=>r(s,a):void 0,onKeyDown:C?S=>S.key==="Enter"&&r(s,a):void 0,className:F("ui:relative ui:flex ui:flex-1 ui:items-start ui:justify-between ui:gap-4 ui:rounded-lg ui:border ui:bg-background ui:p-4 ui:flex-col ui:md:flex-row",C&&"ui:hover:shadow-sm ui:transition-shadow ui:duration-300 ui:cursor-pointer"),children:[h.jsxs("div",{className:"ui:space-y-1",children:[h.jsx("h3",{className:"ui:text-base",children:u}),h.jsx("p",{className:"ui:text-sm ui:text-muted-foreground",children:c}),f&&h.jsx("div",{className:"ui:flex ui:items-center ui:gap-1.5 ui:pt-1 ui:text-xs ui:text-muted-foreground",children:f.map(S=>h.jsx(Uy,{variant:"outline",className:"ui:shrink-0",children:S},S))}),h.jsxs("div",{className:"ui:flex ui:items-center ui:gap-1.5 ui:pt-1 ui:text-xs ui:text-muted-foreground",children:[h.jsx(_e.Clock,{className:"ui:size-3"}),h.jsx("span",{children:Ws(new Date(d),void 0,{locale:o})})]})]}),p&&h.jsx("div",{className:"ui:shrink-0",children:p}),g&&h.jsx("div",{className:"ui:absolute ui:bottom-4 ui:right-4 ui:shrink-0",children:g})]})]},a)})})]})};var Q2=typeof global=="object"&&global&&global.Object===Object&&global,Moe=typeof self=="object"&&self&&self.Object===Object&&self,go=Q2||Moe||Function("return this")(),pi=go.Symbol,ej=Object.prototype,Doe=ej.hasOwnProperty,koe=ej.toString,Ua=pi?pi.toStringTag:void 0;function joe(e){var t=Doe.call(e,Ua),n=e[Ua];try{e[Ua]=void 0;var r=!0}catch{}var o=koe.call(e);return r&&(t?e[Ua]=n:delete e[Ua]),o}var Loe=Object.prototype,Foe=Loe.toString;function Boe(e){return Foe.call(e)}var Voe="[object Null]",$oe="[object Undefined]",DI=pi?pi.toStringTag:void 0;function wa(e){return e==null?e===void 0?$oe:Voe:DI&&DI in Object(e)?joe(e):Boe(e)}function ko(e){return e!=null&&typeof e=="object"}var os=Array.isArray;function Ai(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}function tj(e){return e}var Goe="[object AsyncFunction]",Hoe="[object Function]",Woe="[object GeneratorFunction]",zoe="[object Proxy]";function xx(e){if(!Ai(e))return!1;var t=wa(e);return t==Hoe||t==Woe||t==Goe||t==zoe}var Zm=go["__core-js_shared__"],kI=(function(){var e=/[^.]+$/.exec(Zm&&Zm.keys&&Zm.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""})();function qoe(e){return!!kI&&kI in e}var Uoe=Function.prototype,Yoe=Uoe.toString;function vs(e){if(e!=null){try{return Yoe.call(e)}catch{}try{return e+""}catch{}}return""}var Xoe=/[\\^$.*+?()[\]{}|]/g,Zoe=/^\[object .+?Constructor\]$/,Joe=Function.prototype,Koe=Object.prototype,Qoe=Joe.toString,eie=Koe.hasOwnProperty,tie=RegExp("^"+Qoe.call(eie).replace(Xoe,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function nie(e){if(!Ai(e)||qoe(e))return!1;var t=xx(e)?tie:Zoe;return t.test(vs(e))}function rie(e,t){return e?.[t]}function ys(e,t){var n=rie(e,t);return nie(n)?n:void 0}var Tv=ys(go,"WeakMap"),jI=Object.create,oie=(function(){function e(){}return function(t){if(!Ai(t))return{};if(jI)return jI(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}})();function iie(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function sie(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}var aie=800,lie=16,uie=Date.now;function cie(e){var t=0,n=0;return function(){var r=uie(),o=lie-(r-n);if(n=r,o>0){if(++t>=aie)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function die(e){return function(){return e}}var Sd=(function(){try{var e=ys(Object,"defineProperty");return e({},"",{}),e}catch{}})(),fie=Sd?function(e,t){return Sd(e,"toString",{configurable:!0,enumerable:!1,value:die(t),writable:!0})}:tj,pie=cie(fie);function hie(e,t){for(var n=-1,r=e==null?0:e.length;++n<r&&t(e[n],n,e)!==!1;);return e}var gie=9007199254740991,mie=/^(?:0|[1-9]\d*)$/;function nj(e,t){var n=typeof e;return t=t??gie,!!t&&(n=="number"||n!="symbol"&&mie.test(e))&&e>-1&&e%1==0&&e<t}function wx(e,t,n){t=="__proto__"&&Sd?Sd(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function wu(e,t){return e===t||e!==e&&t!==t}var bie=Object.prototype,vie=bie.hasOwnProperty;function rj(e,t,n){var r=e[t];(!(vie.call(e,t)&&wu(r,n))||n===void 0&&!(t in e))&&wx(e,t,n)}function yie(e,t,n,r){var o=!n;n||(n={});for(var i=-1,s=t.length;++i<s;){var a=t[i],l=void 0;l===void 0&&(l=e[a]),o?wx(n,a,l):rj(n,a,l)}return n}var LI=Math.max;function xie(e,t,n){return t=LI(t===void 0?e.length-1:t,0),function(){for(var r=arguments,o=-1,i=LI(r.length-t,0),s=Array(i);++o<i;)s[o]=r[t+o];o=-1;for(var a=Array(t+1);++o<t;)a[o]=r[o];return a[t]=n(s),iie(e,this,a)}}function wie(e,t){return pie(xie(e,t,tj),e+"")}var Cie=9007199254740991;function oj(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=Cie}function Gf(e){return e!=null&&oj(e.length)&&!xx(e)}function Sie(e,t,n){if(!Ai(n))return!1;var r=typeof t;return(r=="number"?Gf(n)&&nj(t,n.length):r=="string"&&t in n)?wu(n[t],e):!1}function Eie(e){return wie(function(t,n){var r=-1,o=n.length,i=o>1?n[o-1]:void 0,s=o>2?n[2]:void 0;for(i=e.length>3&&typeof i=="function"?(o--,i):void 0,s&&Sie(n[0],n[1],s)&&(i=o<3?void 0:i,o=1),t=Object(t);++r<o;){var a=n[r];a&&e(t,a,r,i)}return t})}var Iie=Object.prototype;function Cx(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||Iie;return e===n}function Rie(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}var Aie="[object Arguments]";function FI(e){return ko(e)&&wa(e)==Aie}var ij=Object.prototype,Tie=ij.hasOwnProperty,Oie=ij.propertyIsEnumerable,Ov=FI((function(){return arguments})())?FI:function(e){return ko(e)&&Tie.call(e,"callee")&&!Oie.call(e,"callee")};function Nie(){return!1}var sj=typeof exports=="object"&&exports&&!exports.nodeType&&exports,BI=sj&&typeof module=="object"&&module&&!module.nodeType&&module,Pie=BI&&BI.exports===sj,VI=Pie?go.Buffer:void 0,_ie=VI?VI.isBuffer:void 0,Bl=_ie||Nie,Mie="[object Arguments]",Die="[object Array]",kie="[object Boolean]",jie="[object Date]",Lie="[object Error]",Fie="[object Function]",Bie="[object Map]",Vie="[object Number]",$ie="[object Object]",Gie="[object RegExp]",Hie="[object Set]",Wie="[object String]",zie="[object WeakMap]",qie="[object ArrayBuffer]",Uie="[object DataView]",Yie="[object Float32Array]",Xie="[object Float64Array]",Zie="[object Int8Array]",Jie="[object Int16Array]",Kie="[object Int32Array]",Qie="[object Uint8Array]",ese="[object Uint8ClampedArray]",tse="[object Uint16Array]",nse="[object Uint32Array]",At={};At[Yie]=At[Xie]=At[Zie]=At[Jie]=At[Kie]=At[Qie]=At[ese]=At[tse]=At[nse]=!0;At[Mie]=At[Die]=At[qie]=At[kie]=At[Uie]=At[jie]=At[Lie]=At[Fie]=At[Bie]=At[Vie]=At[$ie]=At[Gie]=At[Hie]=At[Wie]=At[zie]=!1;function rse(e){return ko(e)&&oj(e.length)&&!!At[wa(e)]}function Sx(e){return function(t){return e(t)}}var aj=typeof exports=="object"&&exports&&!exports.nodeType&&exports,ml=aj&&typeof module=="object"&&module&&!module.nodeType&&module,ose=ml&&ml.exports===aj,Jm=ose&&Q2.process,da=(function(){try{var e=ml&&ml.require&&ml.require("util").types;return e||Jm&&Jm.binding&&Jm.binding("util")}catch{}})(),$I=da&&da.isTypedArray,Ex=$I?Sx($I):rse,ise=Object.prototype,sse=ise.hasOwnProperty;function lj(e,t){var n=os(e),r=!n&&Ov(e),o=!n&&!r&&Bl(e),i=!n&&!r&&!o&&Ex(e),s=n||r||o||i,a=s?Rie(e.length,String):[],l=a.length;for(var u in e)(t||sse.call(e,u))&&!(s&&(u=="length"||o&&(u=="offset"||u=="parent")||i&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||nj(u,l)))&&a.push(u);return a}function uj(e,t){return function(n){return e(t(n))}}var ase=uj(Object.keys,Object),lse=Object.prototype,use=lse.hasOwnProperty;function cse(e){if(!Cx(e))return ase(e);var t=[];for(var n in Object(e))use.call(e,n)&&n!="constructor"&&t.push(n);return t}function dse(e){return Gf(e)?lj(e):cse(e)}function fse(e){var t=[];if(e!=null)for(var n in Object(e))t.push(n);return t}var pse=Object.prototype,hse=pse.hasOwnProperty;function gse(e){if(!Ai(e))return fse(e);var t=Cx(e),n=[];for(var r in e)r=="constructor"&&(t||!hse.call(e,r))||n.push(r);return n}function cj(e){return Gf(e)?lj(e,!0):gse(e)}var Vl=ys(Object,"create");function mse(){this.__data__=Vl?Vl(null):{},this.size=0}function bse(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var vse="__lodash_hash_undefined__",yse=Object.prototype,xse=yse.hasOwnProperty;function wse(e){var t=this.__data__;if(Vl){var n=t[e];return n===vse?void 0:n}return xse.call(t,e)?t[e]:void 0}var Cse=Object.prototype,Sse=Cse.hasOwnProperty;function Ese(e){var t=this.__data__;return Vl?t[e]!==void 0:Sse.call(t,e)}var Ise="__lodash_hash_undefined__";function Rse(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=Vl&&t===void 0?Ise:t,this}function is(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}is.prototype.clear=mse;is.prototype.delete=bse;is.prototype.get=wse;is.prototype.has=Ese;is.prototype.set=Rse;function Ase(){this.__data__=[],this.size=0}function Hf(e,t){for(var n=e.length;n--;)if(wu(e[n][0],t))return n;return-1}var Tse=Array.prototype,Ose=Tse.splice;function Nse(e){var t=this.__data__,n=Hf(t,e);if(n<0)return!1;var r=t.length-1;return n==r?t.pop():Ose.call(t,n,1),--this.size,!0}function Pse(e){var t=this.__data__,n=Hf(t,e);return n<0?void 0:t[n][1]}function _se(e){return Hf(this.__data__,e)>-1}function Mse(e,t){var n=this.__data__,r=Hf(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}function Vo(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Vo.prototype.clear=Ase;Vo.prototype.delete=Nse;Vo.prototype.get=Pse;Vo.prototype.has=_se;Vo.prototype.set=Mse;var $l=ys(go,"Map");function Dse(){this.size=0,this.__data__={hash:new is,map:new($l||Vo),string:new is}}function kse(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function Wf(e,t){var n=e.__data__;return kse(t)?n[typeof t=="string"?"string":"hash"]:n.map}function jse(e){var t=Wf(this,e).delete(e);return this.size-=t?1:0,t}function Lse(e){return Wf(this,e).get(e)}function Fse(e){return Wf(this,e).has(e)}function Bse(e,t){var n=Wf(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}function xs(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}xs.prototype.clear=Dse;xs.prototype.delete=jse;xs.prototype.get=Lse;xs.prototype.has=Fse;xs.prototype.set=Bse;function Vse(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e}var dj=uj(Object.getPrototypeOf,Object),$se="[object Object]",Gse=Function.prototype,Hse=Object.prototype,fj=Gse.toString,Wse=Hse.hasOwnProperty,zse=fj.call(Object);function qse(e){if(!ko(e)||wa(e)!=$se)return!1;var t=dj(e);if(t===null)return!0;var n=Wse.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&fj.call(n)==zse}function Use(){this.__data__=new Vo,this.size=0}function Yse(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}function Xse(e){return this.__data__.get(e)}function Zse(e){return this.__data__.has(e)}var Jse=200;function Kse(e,t){var n=this.__data__;if(n instanceof Vo){var r=n.__data__;if(!$l||r.length<Jse-1)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new xs(r)}return n.set(e,t),this.size=n.size,this}function to(e){var t=this.__data__=new Vo(e);this.size=t.size}to.prototype.clear=Use;to.prototype.delete=Yse;to.prototype.get=Xse;to.prototype.has=Zse;to.prototype.set=Kse;var pj=typeof exports=="object"&&exports&&!exports.nodeType&&exports,GI=pj&&typeof module=="object"&&module&&!module.nodeType&&module,Qse=GI&&GI.exports===pj,HI=Qse?go.Buffer:void 0,WI=HI?HI.allocUnsafe:void 0;function hj(e,t){if(t)return e.slice();var n=e.length,r=WI?WI(n):new e.constructor(n);return e.copy(r),r}function eae(e,t){for(var n=-1,r=e==null?0:e.length,o=0,i=[];++n<r;){var s=e[n];t(s,n,e)&&(i[o++]=s)}return i}function tae(){return[]}var nae=Object.prototype,rae=nae.propertyIsEnumerable,zI=Object.getOwnPropertySymbols,oae=zI?function(e){return e==null?[]:(e=Object(e),eae(zI(e),function(t){return rae.call(e,t)}))}:tae;function iae(e,t,n){var r=t(e);return os(e)?r:Vse(r,n(e))}function Nv(e){return iae(e,dse,oae)}var Pv=ys(go,"DataView"),_v=ys(go,"Promise"),Mv=ys(go,"Set"),qI="[object Map]",sae="[object Object]",UI="[object Promise]",YI="[object Set]",XI="[object WeakMap]",ZI="[object DataView]",aae=vs(Pv),lae=vs($l),uae=vs(_v),cae=vs(Mv),dae=vs(Tv),Ir=wa;(Pv&&Ir(new Pv(new ArrayBuffer(1)))!=ZI||$l&&Ir(new $l)!=qI||_v&&Ir(_v.resolve())!=UI||Mv&&Ir(new Mv)!=YI||Tv&&Ir(new Tv)!=XI)&&(Ir=function(e){var t=wa(e),n=t==sae?e.constructor:void 0,r=n?vs(n):"";if(r)switch(r){case aae:return ZI;case lae:return qI;case uae:return UI;case cae:return YI;case dae:return XI}return t});var fae=Object.prototype,pae=fae.hasOwnProperty;function hae(e){var t=e.length,n=new e.constructor(t);return t&&typeof e[0]=="string"&&pae.call(e,"index")&&(n.index=e.index,n.input=e.input),n}var Ed=go.Uint8Array;function Ix(e){var t=new e.constructor(e.byteLength);return new Ed(t).set(new Ed(e)),t}function gae(e,t){var n=Ix(e.buffer);return new e.constructor(n,e.byteOffset,e.byteLength)}var mae=/\w*$/;function bae(e){var t=new e.constructor(e.source,mae.exec(e));return t.lastIndex=e.lastIndex,t}var JI=pi?pi.prototype:void 0,KI=JI?JI.valueOf:void 0;function vae(e){return KI?Object(KI.call(e)):{}}function gj(e,t){var n=t?Ix(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}var yae="[object Boolean]",xae="[object Date]",wae="[object Map]",Cae="[object Number]",Sae="[object RegExp]",Eae="[object Set]",Iae="[object String]",Rae="[object Symbol]",Aae="[object ArrayBuffer]",Tae="[object DataView]",Oae="[object Float32Array]",Nae="[object Float64Array]",Pae="[object Int8Array]",_ae="[object Int16Array]",Mae="[object Int32Array]",Dae="[object Uint8Array]",kae="[object Uint8ClampedArray]",jae="[object Uint16Array]",Lae="[object Uint32Array]";function Fae(e,t,n){var r=e.constructor;switch(t){case Aae:return Ix(e);case yae:case xae:return new r(+e);case Tae:return gae(e);case Oae:case Nae:case Pae:case _ae:case Mae:case Dae:case kae:case jae:case Lae:return gj(e,n);case wae:return new r;case Cae:case Iae:return new r(e);case Sae:return bae(e);case Eae:return new r;case Rae:return vae(e)}}function mj(e){return typeof e.constructor=="function"&&!Cx(e)?oie(dj(e)):{}}var Bae="[object Map]";function Vae(e){return ko(e)&&Ir(e)==Bae}var QI=da&&da.isMap,$ae=QI?Sx(QI):Vae,Gae="[object Set]";function Hae(e){return ko(e)&&Ir(e)==Gae}var eR=da&&da.isSet,Wae=eR?Sx(eR):Hae,zae=1,bj="[object Arguments]",qae="[object Array]",Uae="[object Boolean]",Yae="[object Date]",Xae="[object Error]",vj="[object Function]",Zae="[object GeneratorFunction]",Jae="[object Map]",Kae="[object Number]",yj="[object Object]",Qae="[object RegExp]",ele="[object Set]",tle="[object String]",nle="[object Symbol]",rle="[object WeakMap]",ole="[object ArrayBuffer]",ile="[object DataView]",sle="[object Float32Array]",ale="[object Float64Array]",lle="[object Int8Array]",ule="[object Int16Array]",cle="[object Int32Array]",dle="[object Uint8Array]",fle="[object Uint8ClampedArray]",ple="[object Uint16Array]",hle="[object Uint32Array]",Rt={};Rt[bj]=Rt[qae]=Rt[ole]=Rt[ile]=Rt[Uae]=Rt[Yae]=Rt[sle]=Rt[ale]=Rt[lle]=Rt[ule]=Rt[cle]=Rt[Jae]=Rt[Kae]=Rt[yj]=Rt[Qae]=Rt[ele]=Rt[tle]=Rt[nle]=Rt[dle]=Rt[fle]=Rt[ple]=Rt[hle]=!0;Rt[Xae]=Rt[vj]=Rt[rle]=!1;function Dc(e,t,n,r,o,i){var s,a=t&zae;if(s!==void 0)return s;if(!Ai(e))return e;var l=os(e);if(l)s=hae(e);else{var u=Ir(e),c=u==vj||u==Zae;if(Bl(e))return hj(e,a);if(u==yj||u==bj||c&&!o)s=c?{}:mj(e);else{if(!Rt[u])return o?e:{};s=Fae(e,u,a)}}i||(i=new to);var d=i.get(e);if(d)return d;i.set(e,s),Wae(e)?e.forEach(function(g){s.add(Dc(g,t,n,g,e,i))}):$ae(e)&&e.forEach(function(g,m){s.set(m,Dc(g,t,n,m,e,i))});var f=Nv,p=l?void 0:f(e);return hie(p||e,function(g,m){p&&(m=g,g=e[m]),rj(s,m,Dc(g,t,n,m,e,i))}),s}var gle=1,mle=4;function Ks(e){return Dc(e,gle|mle)}var ble="__lodash_hash_undefined__";function vle(e){return this.__data__.set(e,ble),this}function yle(e){return this.__data__.has(e)}function Id(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new xs;++t<n;)this.add(e[t])}Id.prototype.add=Id.prototype.push=vle;Id.prototype.has=yle;function xle(e,t){for(var n=-1,r=e==null?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}function wle(e,t){return e.has(t)}var Cle=1,Sle=2;function xj(e,t,n,r,o,i){var s=n&Cle,a=e.length,l=t.length;if(a!=l&&!(s&&l>a))return!1;var u=i.get(e),c=i.get(t);if(u&&c)return u==t&&c==e;var d=-1,f=!0,p=n&Sle?new Id:void 0;for(i.set(e,t),i.set(t,e);++d<a;){var g=e[d],m=t[d];if(r)var v=s?r(m,g,d,t,e,i):r(g,m,d,e,t,i);if(v!==void 0){if(v)continue;f=!1;break}if(p){if(!xle(t,function(y,x){if(!wle(p,x)&&(g===y||o(g,y,n,r,i)))return p.push(x)})){f=!1;break}}else if(!(g===m||o(g,m,n,r,i))){f=!1;break}}return i.delete(e),i.delete(t),f}function Ele(e){var t=-1,n=Array(e.size);return e.forEach(function(r,o){n[++t]=[o,r]}),n}function Ile(e){var t=-1,n=Array(e.size);return e.forEach(function(r){n[++t]=r}),n}var Rle=1,Ale=2,Tle="[object Boolean]",Ole="[object Date]",Nle="[object Error]",Ple="[object Map]",_le="[object Number]",Mle="[object RegExp]",Dle="[object Set]",kle="[object String]",jle="[object Symbol]",Lle="[object ArrayBuffer]",Fle="[object DataView]",tR=pi?pi.prototype:void 0,Km=tR?tR.valueOf:void 0;function Ble(e,t,n,r,o,i,s){switch(n){case Fle:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case Lle:return!(e.byteLength!=t.byteLength||!i(new Ed(e),new Ed(t)));case Tle:case Ole:case _le:return wu(+e,+t);case Nle:return e.name==t.name&&e.message==t.message;case Mle:case kle:return e==t+"";case Ple:var a=Ele;case Dle:var l=r&Rle;if(a||(a=Ile),e.size!=t.size&&!l)return!1;var u=s.get(e);if(u)return u==t;r|=Ale,s.set(e,t);var c=xj(a(e),a(t),r,o,i,s);return s.delete(e),c;case jle:if(Km)return Km.call(e)==Km.call(t)}return!1}var Vle=1,$le=Object.prototype,Gle=$le.hasOwnProperty;function Hle(e,t,n,r,o,i){var s=n&Vle,a=Nv(e),l=a.length,u=Nv(t),c=u.length;if(l!=c&&!s)return!1;for(var d=l;d--;){var f=a[d];if(!(s?f in t:Gle.call(t,f)))return!1}var p=i.get(e),g=i.get(t);if(p&&g)return p==t&&g==e;var m=!0;i.set(e,t),i.set(t,e);for(var v=s;++d<l;){f=a[d];var y=e[f],x=t[f];if(r)var w=s?r(x,y,f,t,e,i):r(y,x,f,e,t,i);if(!(w===void 0?y===x||o(y,x,n,r,i):w)){m=!1;break}v||(v=f=="constructor")}if(m&&!v){var C=e.constructor,S=t.constructor;C!=S&&"constructor"in e&&"constructor"in t&&!(typeof C=="function"&&C instanceof C&&typeof S=="function"&&S instanceof S)&&(m=!1)}return i.delete(e),i.delete(t),m}var Wle=1,nR="[object Arguments]",rR="[object Array]",dc="[object Object]",zle=Object.prototype,oR=zle.hasOwnProperty;function qle(e,t,n,r,o,i){var s=os(e),a=os(t),l=s?rR:Ir(e),u=a?rR:Ir(t);l=l==nR?dc:l,u=u==nR?dc:u;var c=l==dc,d=u==dc,f=l==u;if(f&&Bl(e)){if(!Bl(t))return!1;s=!0,c=!1}if(f&&!c)return i||(i=new to),s||Ex(e)?xj(e,t,n,r,o,i):Ble(e,t,l,n,r,o,i);if(!(n&Wle)){var p=c&&oR.call(e,"__wrapped__"),g=d&&oR.call(t,"__wrapped__");if(p||g){var m=p?e.value():e,v=g?t.value():t;return i||(i=new to),o(m,v,n,r,i)}}return f?(i||(i=new to),Hle(e,t,n,r,o,i)):!1}function wj(e,t,n,r,o){return e===t?!0:e==null||t==null||!ko(e)&&!ko(t)?e!==e&&t!==t:qle(e,t,n,r,wj,o)}function Ule(e){return function(t,n,r){for(var o=-1,i=Object(t),s=r(t),a=s.length;a--;){var l=s[++o];if(n(i[l],l,i)===!1)break}return t}}var Yle=Ule();function Dv(e,t,n){(n!==void 0&&!wu(e[t],n)||n===void 0&&!(t in e))&&wx(e,t,n)}function Xle(e){return ko(e)&&Gf(e)}function kv(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}function Zle(e){return yie(e,cj(e))}function Jle(e,t,n,r,o,i,s){var a=kv(e,n),l=kv(t,n),u=s.get(l);if(u){Dv(e,n,u);return}var c=i?i(a,l,n+"",e,t,s):void 0,d=c===void 0;if(d){var f=os(l),p=!f&&Bl(l),g=!f&&!p&&Ex(l);c=l,f||p||g?os(a)?c=a:Xle(a)?c=sie(a):p?(d=!1,c=hj(l,!0)):g?(d=!1,c=gj(l,!0)):c=[]:qse(l)||Ov(l)?(c=a,Ov(a)?c=Zle(a):(!Ai(a)||xx(a))&&(c=mj(l))):d=!1}d&&(s.set(l,c),o(c,l,r,i,s),s.delete(l)),Dv(e,n,c)}function Cj(e,t,n,r,o){e!==t&&Yle(t,function(i,s){if(o||(o=new to),Ai(i))Jle(e,t,s,n,Cj,r,o);else{var a=r?r(kv(e,s),i,s+"",e,t,o):void 0;a===void 0&&(a=i),Dv(e,s,a)}},cj)}function Rx(e,t){return wj(e,t)}var ui=Eie(function(e,t,n){Cj(e,t,n)}),Pe=(e=>(e[e.TYPE=3]="TYPE",e[e.LEVEL=12]="LEVEL",e[e.ATTRIBUTE=13]="ATTRIBUTE",e[e.BLOT=14]="BLOT",e[e.INLINE=7]="INLINE",e[e.BLOCK=11]="BLOCK",e[e.BLOCK_BLOT=10]="BLOCK_BLOT",e[e.INLINE_BLOT=6]="INLINE_BLOT",e[e.BLOCK_ATTRIBUTE=9]="BLOCK_ATTRIBUTE",e[e.INLINE_ATTRIBUTE=5]="INLINE_ATTRIBUTE",e[e.ANY=15]="ANY",e))(Pe||{});class io{constructor(t,n,r={}){this.attrName=t,this.keyName=n;const o=Pe.TYPE&Pe.ATTRIBUTE;this.scope=r.scope!=null?r.scope&Pe.LEVEL|o:Pe.ATTRIBUTE,r.whitelist!=null&&(this.whitelist=r.whitelist)}static keys(t){return Array.from(t.attributes).map(n=>n.name)}add(t,n){return this.canAdd(t,n)?(t.setAttribute(this.keyName,n),!0):!1}canAdd(t,n){return this.whitelist==null?!0:typeof n=="string"?this.whitelist.indexOf(n.replace(/["']/g,""))>-1:this.whitelist.indexOf(n)>-1}remove(t){t.removeAttribute(this.keyName)}value(t){const n=t.getAttribute(this.keyName);return this.canAdd(t,n)&&n?n:""}}class Qs extends Error{constructor(t){t="[Parchment] "+t,super(t),this.message=t,this.name=this.constructor.name}}const Sj=class jv{constructor(){this.attributes={},this.classes={},this.tags={},this.types={}}static find(t,n=!1){if(t==null)return null;if(this.blots.has(t))return this.blots.get(t)||null;if(n){let r=null;try{r=t.parentNode}catch{return null}return this.find(r,n)}return null}create(t,n,r){const o=this.query(n);if(o==null)throw new Qs(`Unable to create ${n} blot`);const i=o,s=n instanceof Node||n.nodeType===Node.TEXT_NODE?n:i.create(r),a=new i(t,s,r);return jv.blots.set(a.domNode,a),a}find(t,n=!1){return jv.find(t,n)}query(t,n=Pe.ANY){let r;return typeof t=="string"?r=this.types[t]||this.attributes[t]:t instanceof Text||t.nodeType===Node.TEXT_NODE?r=this.types.text:typeof t=="number"?t&Pe.LEVEL&Pe.BLOCK?r=this.types.block:t&Pe.LEVEL&Pe.INLINE&&(r=this.types.inline):t instanceof Element&&((t.getAttribute("class")||"").split(/\s+/).some(o=>(r=this.classes[o],!!r)),r=r||this.tags[t.tagName]),r==null?null:"scope"in r&&n&Pe.LEVEL&r.scope&&n&Pe.TYPE&r.scope?r:null}register(...t){return t.map(n=>{const r="blotName"in n,o="attrName"in n;if(!r&&!o)throw new Qs("Invalid definition");if(r&&n.blotName==="abstract")throw new Qs("Cannot register abstract class");const i=r?n.blotName:o?n.attrName:void 0;return this.types[i]=n,o?typeof n.keyName=="string"&&(this.attributes[n.keyName]=n):r&&(n.className&&(this.classes[n.className]=n),n.tagName&&(Array.isArray(n.tagName)?n.tagName=n.tagName.map(s=>s.toUpperCase()):n.tagName=n.tagName.toUpperCase(),(Array.isArray(n.tagName)?n.tagName:[n.tagName]).forEach(s=>{(this.tags[s]==null||n.className==null)&&(this.tags[s]=n)}))),n})}};Sj.blots=new WeakMap;let fa=Sj;function iR(e,t){return(e.getAttribute("class")||"").split(/\s+/).filter(n=>n.indexOf(`${t}-`)===0)}class Kle extends io{static keys(t){return(t.getAttribute("class")||"").split(/\s+/).map(n=>n.split("-").slice(0,-1).join("-"))}add(t,n){return this.canAdd(t,n)?(this.remove(t),t.classList.add(`${this.keyName}-${n}`),!0):!1}remove(t){iR(t,this.keyName).forEach(n=>{t.classList.remove(n)}),t.classList.length===0&&t.removeAttribute("class")}value(t){const n=(iR(t,this.keyName)[0]||"").slice(this.keyName.length+1);return this.canAdd(t,n)?n:""}}const $r=Kle;function Qm(e){const t=e.split("-"),n=t.slice(1).map(r=>r[0].toUpperCase()+r.slice(1)).join("");return t[0]+n}class Qle extends io{static keys(t){return(t.getAttribute("style")||"").split(";").map(n=>n.split(":")[0].trim())}add(t,n){return this.canAdd(t,n)?(t.style[Qm(this.keyName)]=n,!0):!1}remove(t){t.style[Qm(this.keyName)]="",t.getAttribute("style")||t.removeAttribute("style")}value(t){const n=t.style[Qm(this.keyName)];return this.canAdd(t,n)?n:""}}const Ti=Qle;class eue{constructor(t){this.attributes={},this.domNode=t,this.build()}attribute(t,n){n?t.add(this.domNode,n)&&(t.value(this.domNode)!=null?this.attributes[t.attrName]=t:delete this.attributes[t.attrName]):(t.remove(this.domNode),delete this.attributes[t.attrName])}build(){this.attributes={};const t=fa.find(this.domNode);if(t==null)return;const n=io.keys(this.domNode),r=$r.keys(this.domNode),o=Ti.keys(this.domNode);n.concat(r).concat(o).forEach(i=>{const s=t.scroll.query(i,Pe.ATTRIBUTE);s instanceof io&&(this.attributes[s.attrName]=s)})}copy(t){Object.keys(this.attributes).forEach(n=>{const r=this.attributes[n].value(this.domNode);t.format(n,r)})}move(t){this.copy(t),Object.keys(this.attributes).forEach(n=>{this.attributes[n].remove(this.domNode)}),this.attributes={}}values(){return Object.keys(this.attributes).reduce((t,n)=>(t[n]=this.attributes[n].value(this.domNode),t),{})}}const zf=eue,Ej=class{constructor(t,n){this.scroll=t,this.domNode=n,fa.blots.set(n,this),this.prev=null,this.next=null}static create(t){if(this.tagName==null)throw new Qs("Blot definition missing tagName");let n,r;return Array.isArray(this.tagName)?(typeof t=="string"?(r=t.toUpperCase(),parseInt(r,10).toString()===r&&(r=parseInt(r,10))):typeof t=="number"&&(r=t),typeof r=="number"?n=document.createElement(this.tagName[r-1]):r&&this.tagName.indexOf(r)>-1?n=document.createElement(r):n=document.createElement(this.tagName[0])):n=document.createElement(this.tagName),this.className&&n.classList.add(this.className),n}get statics(){return this.constructor}attach(){}clone(){const t=this.domNode.cloneNode(!1);return this.scroll.create(t)}detach(){this.parent!=null&&this.parent.removeChild(this),fa.blots.delete(this.domNode)}deleteAt(t,n){this.isolate(t,n).remove()}formatAt(t,n,r,o){const i=this.isolate(t,n);if(this.scroll.query(r,Pe.BLOT)!=null&&o)i.wrap(r,o);else if(this.scroll.query(r,Pe.ATTRIBUTE)!=null){const s=this.scroll.create(this.statics.scope);i.wrap(s),s.format(r,o)}}insertAt(t,n,r){const o=r==null?this.scroll.create("text",n):this.scroll.create(n,r),i=this.split(t);this.parent.insertBefore(o,i||void 0)}isolate(t,n){const r=this.split(t);if(r==null)throw new Error("Attempt to isolate at end");return r.split(n),r}length(){return 1}offset(t=this.parent){return this.parent==null||this===t?0:this.parent.children.offset(this)+this.parent.offset(t)}optimize(t){this.statics.requiredContainer&&!(this.parent instanceof this.statics.requiredContainer)&&this.wrap(this.statics.requiredContainer.blotName)}remove(){this.domNode.parentNode!=null&&this.domNode.parentNode.removeChild(this.domNode),this.detach()}replaceWith(t,n){const r=typeof t=="string"?this.scroll.create(t,n):t;return this.parent!=null&&(this.parent.insertBefore(r,this.next||void 0),this.remove()),r}split(t,n){return t===0?this:this.next}update(t,n){}wrap(t,n){const r=typeof t=="string"?this.scroll.create(t,n):t;if(this.parent!=null&&this.parent.insertBefore(r,this.next||void 0),typeof r.appendChild!="function")throw new Qs(`Cannot wrap ${t}`);return r.appendChild(this),r}};Ej.blotName="abstract";let Ij=Ej;const Rj=class extends Ij{static value(t){return!0}index(t,n){return this.domNode===t||this.domNode.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_CONTAINED_BY?Math.min(n,1):-1}position(t,n){let r=Array.from(this.parent.domNode.childNodes).indexOf(this.domNode);return t>0&&(r+=1),[this.parent.domNode,r]}value(){return{[this.statics.blotName]:this.statics.value(this.domNode)||!0}}};Rj.scope=Pe.INLINE_BLOT;let tue=Rj;const xn=tue;class nue{constructor(){this.head=null,this.tail=null,this.length=0}append(...t){if(this.insertBefore(t[0],null),t.length>1){const n=t.slice(1);this.append(...n)}}at(t){const n=this.iterator();let r=n();for(;r&&t>0;)t-=1,r=n();return r}contains(t){const n=this.iterator();let r=n();for(;r;){if(r===t)return!0;r=n()}return!1}indexOf(t){const n=this.iterator();let r=n(),o=0;for(;r;){if(r===t)return o;o+=1,r=n()}return-1}insertBefore(t,n){t!=null&&(this.remove(t),t.next=n,n!=null?(t.prev=n.prev,n.prev!=null&&(n.prev.next=t),n.prev=t,n===this.head&&(this.head=t)):this.tail!=null?(this.tail.next=t,t.prev=this.tail,this.tail=t):(t.prev=null,this.head=this.tail=t),this.length+=1)}offset(t){let n=0,r=this.head;for(;r!=null;){if(r===t)return n;n+=r.length(),r=r.next}return-1}remove(t){this.contains(t)&&(t.prev!=null&&(t.prev.next=t.next),t.next!=null&&(t.next.prev=t.prev),t===this.head&&(this.head=t.next),t===this.tail&&(this.tail=t.prev),this.length-=1)}iterator(t=this.head){return()=>{const n=t;return t!=null&&(t=t.next),n}}find(t,n=!1){const r=this.iterator();let o=r();for(;o;){const i=o.length();if(t<i||n&&t===i&&(o.next==null||o.next.length()!==0))return[o,t];t-=i,o=r()}return[null,0]}forEach(t){const n=this.iterator();let r=n();for(;r;)t(r),r=n()}forEachAt(t,n,r){if(n<=0)return;const[o,i]=this.find(t);let s=t-i;const a=this.iterator(o);let l=a();for(;l&&s<t+n;){const u=l.length();t>s?r(l,t-s,Math.min(n,s+u-t)):r(l,0,Math.min(u,t+n-s)),s+=u,l=a()}}map(t){return this.reduce((n,r)=>(n.push(t(r)),n),[])}reduce(t,n){const r=this.iterator();let o=r();for(;o;)n=t(n,o),o=r();return n}}function sR(e,t){const n=t.find(e);if(n)return n;try{return t.create(e)}catch{const r=t.create(Pe.INLINE);return Array.from(e.childNodes).forEach(o=>{r.domNode.appendChild(o)}),e.parentNode&&e.parentNode.replaceChild(r.domNode,e),r.attach(),r}}const Aj=class Qo extends Ij{constructor(t,n){super(t,n),this.uiNode=null,this.build()}appendChild(t){this.insertBefore(t)}attach(){super.attach(),this.children.forEach(t=>{t.attach()})}attachUI(t){this.uiNode!=null&&this.uiNode.remove(),this.uiNode=t,Qo.uiClass&&this.uiNode.classList.add(Qo.uiClass),this.uiNode.setAttribute("contenteditable","false"),this.domNode.insertBefore(this.uiNode,this.domNode.firstChild)}build(){this.children=new nue,Array.from(this.domNode.childNodes).filter(t=>t!==this.uiNode).reverse().forEach(t=>{try{const n=sR(t,this.scroll);this.insertBefore(n,this.children.head||void 0)}catch(n){if(n instanceof Qs)return;throw n}})}deleteAt(t,n){if(t===0&&n===this.length())return this.remove();this.children.forEachAt(t,n,(r,o,i)=>{r.deleteAt(o,i)})}descendant(t,n=0){const[r,o]=this.children.find(n);return t.blotName==null&&t(r)||t.blotName!=null&&r instanceof t?[r,o]:r instanceof Qo?r.descendant(t,o):[null,-1]}descendants(t,n=0,r=Number.MAX_VALUE){let o=[],i=r;return this.children.forEachAt(n,r,(s,a,l)=>{(t.blotName==null&&t(s)||t.blotName!=null&&s instanceof t)&&o.push(s),s instanceof Qo&&(o=o.concat(s.descendants(t,a,i))),i-=l}),o}detach(){this.children.forEach(t=>{t.detach()}),super.detach()}enforceAllowedChildren(){let t=!1;this.children.forEach(n=>{t||this.statics.allowedChildren.some(r=>n instanceof r)||(n.statics.scope===Pe.BLOCK_BLOT?(n.next!=null&&this.splitAfter(n),n.prev!=null&&this.splitAfter(n.prev),n.parent.unwrap(),t=!0):n instanceof Qo?n.unwrap():n.remove())})}formatAt(t,n,r,o){this.children.forEachAt(t,n,(i,s,a)=>{i.formatAt(s,a,r,o)})}insertAt(t,n,r){const[o,i]=this.children.find(t);if(o)o.insertAt(i,n,r);else{const s=r==null?this.scroll.create("text",n):this.scroll.create(n,r);this.appendChild(s)}}insertBefore(t,n){t.parent!=null&&t.parent.children.remove(t);let r=null;this.children.insertBefore(t,n||null),t.parent=this,n!=null&&(r=n.domNode),(this.domNode.parentNode!==t.domNode||this.domNode.nextSibling!==r)&&this.domNode.insertBefore(t.domNode,r),t.attach()}length(){return this.children.reduce((t,n)=>t+n.length(),0)}moveChildren(t,n){this.children.forEach(r=>{t.insertBefore(r,n)})}optimize(t){if(super.optimize(t),this.enforceAllowedChildren(),this.uiNode!=null&&this.uiNode!==this.domNode.firstChild&&this.domNode.insertBefore(this.uiNode,this.domNode.firstChild),this.children.length===0)if(this.statics.defaultChild!=null){const n=this.scroll.create(this.statics.defaultChild.blotName);this.appendChild(n)}else this.remove()}path(t,n=!1){const[r,o]=this.children.find(t,n),i=[[this,t]];return r instanceof Qo?i.concat(r.path(o,n)):(r!=null&&i.push([r,o]),i)}removeChild(t){this.children.remove(t)}replaceWith(t,n){const r=typeof t=="string"?this.scroll.create(t,n):t;return r instanceof Qo&&this.moveChildren(r),super.replaceWith(r)}split(t,n=!1){if(!n){if(t===0)return this;if(t===this.length())return this.next}const r=this.clone();return this.parent&&this.parent.insertBefore(r,this.next||void 0),this.children.forEachAt(t,this.length(),(o,i,s)=>{const a=o.split(i,n);a!=null&&r.appendChild(a)}),r}splitAfter(t){const n=this.clone();for(;t.next!=null;)n.appendChild(t.next);return this.parent&&this.parent.insertBefore(n,this.next||void 0),n}unwrap(){this.parent&&this.moveChildren(this.parent,this.next||void 0),this.remove()}update(t,n){const r=[],o=[];t.forEach(i=>{i.target===this.domNode&&i.type==="childList"&&(r.push(...i.addedNodes),o.push(...i.removedNodes))}),o.forEach(i=>{if(i.parentNode!=null&&i.tagName!=="IFRAME"&&document.body.compareDocumentPosition(i)&Node.DOCUMENT_POSITION_CONTAINED_BY)return;const s=this.scroll.find(i);s!=null&&(s.domNode.parentNode==null||s.domNode.parentNode===this.domNode)&&s.detach()}),r.filter(i=>i.parentNode===this.domNode&&i!==this.uiNode).sort((i,s)=>i===s?0:i.compareDocumentPosition(s)&Node.DOCUMENT_POSITION_FOLLOWING?1:-1).forEach(i=>{let s=null;i.nextSibling!=null&&(s=this.scroll.find(i.nextSibling));const a=sR(i,this.scroll);(a.next!==s||a.next==null)&&(a.parent!=null&&a.parent.removeChild(this),this.insertBefore(a,s||void 0))}),this.enforceAllowedChildren()}};Aj.uiClass="";let rue=Aj;const Nr=rue;function oue(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(e[n]!==t[n])return!1;return!0}const Ls=class Fs extends Nr{static create(t){return super.create(t)}static formats(t,n){const r=n.query(Fs.blotName);if(!(r!=null&&t.tagName===r.tagName)){if(typeof this.tagName=="string")return!0;if(Array.isArray(this.tagName))return t.tagName.toLowerCase()}}constructor(t,n){super(t,n),this.attributes=new zf(this.domNode)}format(t,n){if(t===this.statics.blotName&&!n)this.children.forEach(r=>{r instanceof Fs||(r=r.wrap(Fs.blotName,!0)),this.attributes.copy(r)}),this.unwrap();else{const r=this.scroll.query(t,Pe.INLINE);if(r==null)return;r instanceof io?this.attributes.attribute(r,n):n&&(t!==this.statics.blotName||this.formats()[t]!==n)&&this.replaceWith(t,n)}}formats(){const t=this.attributes.values(),n=this.statics.formats(this.domNode,this.scroll);return n!=null&&(t[this.statics.blotName]=n),t}formatAt(t,n,r,o){this.formats()[r]!=null||this.scroll.query(r,Pe.ATTRIBUTE)?this.isolate(t,n).format(r,o):super.formatAt(t,n,r,o)}optimize(t){super.optimize(t);const n=this.formats();if(Object.keys(n).length===0)return this.unwrap();const r=this.next;r instanceof Fs&&r.prev===this&&oue(n,r.formats())&&(r.moveChildren(this),r.remove())}replaceWith(t,n){const r=super.replaceWith(t,n);return this.attributes.copy(r),r}update(t,n){super.update(t,n),t.some(r=>r.target===this.domNode&&r.type==="attributes")&&this.attributes.build()}wrap(t,n){const r=super.wrap(t,n);return r instanceof Fs&&this.attributes.move(r),r}};Ls.allowedChildren=[Ls,xn],Ls.blotName="inline",Ls.scope=Pe.INLINE_BLOT,Ls.tagName="SPAN";let iue=Ls;const Ax=iue,Bs=class Lv extends Nr{static create(t){return super.create(t)}static formats(t,n){const r=n.query(Lv.blotName);if(!(r!=null&&t.tagName===r.tagName)){if(typeof this.tagName=="string")return!0;if(Array.isArray(this.tagName))return t.tagName.toLowerCase()}}constructor(t,n){super(t,n),this.attributes=new zf(this.domNode)}format(t,n){const r=this.scroll.query(t,Pe.BLOCK);r!=null&&(r instanceof io?this.attributes.attribute(r,n):t===this.statics.blotName&&!n?this.replaceWith(Lv.blotName):n&&(t!==this.statics.blotName||this.formats()[t]!==n)&&this.replaceWith(t,n))}formats(){const t=this.attributes.values(),n=this.statics.formats(this.domNode,this.scroll);return n!=null&&(t[this.statics.blotName]=n),t}formatAt(t,n,r,o){this.scroll.query(r,Pe.BLOCK)!=null?this.format(r,o):super.formatAt(t,n,r,o)}insertAt(t,n,r){if(r==null||this.scroll.query(n,Pe.INLINE)!=null)super.insertAt(t,n,r);else{const o=this.split(t);if(o!=null){const i=this.scroll.create(n,r);o.parent.insertBefore(i,o)}else throw new Error("Attempt to insertAt after block boundaries")}}replaceWith(t,n){const r=super.replaceWith(t,n);return this.attributes.copy(r),r}update(t,n){super.update(t,n),t.some(r=>r.target===this.domNode&&r.type==="attributes")&&this.attributes.build()}};Bs.blotName="block",Bs.scope=Pe.BLOCK_BLOT,Bs.tagName="P",Bs.allowedChildren=[Ax,Bs,xn];let sue=Bs;const Gl=sue,Fv=class extends Nr{checkMerge(){return this.next!==null&&this.next.statics.blotName===this.statics.blotName}deleteAt(t,n){super.deleteAt(t,n),this.enforceAllowedChildren()}formatAt(t,n,r,o){super.formatAt(t,n,r,o),this.enforceAllowedChildren()}insertAt(t,n,r){super.insertAt(t,n,r),this.enforceAllowedChildren()}optimize(t){super.optimize(t),this.children.length>0&&this.next!=null&&this.checkMerge()&&(this.next.moveChildren(this),this.next.remove())}};Fv.blotName="container",Fv.scope=Pe.BLOCK_BLOT;let aue=Fv;const qf=aue;class lue extends xn{static formats(t,n){}format(t,n){super.formatAt(0,this.length(),t,n)}formatAt(t,n,r,o){t===0&&n===this.length()?this.format(r,o):super.formatAt(t,n,r,o)}formats(){return this.statics.formats(this.domNode,this.scroll)}}const Hn=lue,uue={attributes:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0},cue=100,Vs=class extends Nr{constructor(t,n){super(null,n),this.registry=t,this.scroll=this,this.build(),this.observer=new MutationObserver(r=>{this.update(r)}),this.observer.observe(this.domNode,uue),this.attach()}create(t,n){return this.registry.create(this,t,n)}find(t,n=!1){const r=this.registry.find(t,n);return r?r.scroll===this?r:n?this.find(r.scroll.domNode.parentNode,!0):null:null}query(t,n=Pe.ANY){return this.registry.query(t,n)}register(...t){return this.registry.register(...t)}build(){this.scroll!=null&&super.build()}detach(){super.detach(),this.observer.disconnect()}deleteAt(t,n){this.update(),t===0&&n===this.length()?this.children.forEach(r=>{r.remove()}):super.deleteAt(t,n)}formatAt(t,n,r,o){this.update(),super.formatAt(t,n,r,o)}insertAt(t,n,r){this.update(),super.insertAt(t,n,r)}optimize(t=[],n={}){super.optimize(n);const r=n.mutationsMap||new WeakMap;let o=Array.from(this.observer.takeRecords());for(;o.length>0;)t.push(o.pop());const i=(l,u=!0)=>{l==null||l===this||l.domNode.parentNode!=null&&(r.has(l.domNode)||r.set(l.domNode,[]),u&&i(l.parent))},s=l=>{r.has(l.domNode)&&(l instanceof Nr&&l.children.forEach(s),r.delete(l.domNode),l.optimize(n))};let a=t;for(let l=0;a.length>0;l+=1){if(l>=cue)throw new Error("[Parchment] Maximum optimize iterations reached");for(a.forEach(u=>{const c=this.find(u.target,!0);c!=null&&(c.domNode===u.target&&(u.type==="childList"?(i(this.find(u.previousSibling,!1)),Array.from(u.addedNodes).forEach(d=>{const f=this.find(d,!1);i(f,!1),f instanceof Nr&&f.children.forEach(p=>{i(p,!1)})})):u.type==="attributes"&&i(c.prev)),i(c))}),this.children.forEach(s),a=Array.from(this.observer.takeRecords()),o=a.slice();o.length>0;)t.push(o.pop())}}update(t,n={}){t=t||this.observer.takeRecords();const r=new WeakMap;t.map(o=>{const i=this.find(o.target,!0);return i==null?null:r.has(i.domNode)?(r.get(i.domNode).push(o),null):(r.set(i.domNode,[o]),i)}).forEach(o=>{o!=null&&o!==this&&r.has(o.domNode)&&o.update(r.get(o.domNode)||[],n)}),n.mutationsMap=r,r.has(this.domNode)&&super.update(r.get(this.domNode),n),this.optimize(t,n)}};Vs.blotName="scroll",Vs.defaultChild=Gl,Vs.allowedChildren=[Gl,qf],Vs.scope=Pe.BLOCK_BLOT,Vs.tagName="DIV";let due=Vs;const Tx=due,Bv=class Tj extends xn{static create(t){return document.createTextNode(t)}static value(t){return t.data}constructor(t,n){super(t,n),this.text=this.statics.value(this.domNode)}deleteAt(t,n){this.domNode.data=this.text=this.text.slice(0,t)+this.text.slice(t+n)}index(t,n){return this.domNode===t?n:-1}insertAt(t,n,r){r==null?(this.text=this.text.slice(0,t)+n+this.text.slice(t),this.domNode.data=this.text):super.insertAt(t,n,r)}length(){return this.text.length}optimize(t){super.optimize(t),this.text=this.statics.value(this.domNode),this.text.length===0?this.remove():this.next instanceof Tj&&this.next.prev===this&&(this.insertAt(this.length(),this.next.value()),this.next.remove())}position(t,n=!1){return[this.domNode,t]}split(t,n=!1){if(!n){if(t===0)return this;if(t===this.length())return this.next}const r=this.scroll.create(this.domNode.splitText(t));return this.parent.insertBefore(r,this.next||void 0),this.text=this.statics.value(this.domNode),r}update(t,n){t.some(r=>r.type==="characterData"&&r.target===this.domNode)&&(this.text=this.statics.value(this.domNode))}value(){return this.text}};Bv.blotName="text",Bv.scope=Pe.INLINE_BLOT;let fue=Bv;const Rd=fue,pue=Object.freeze(Object.defineProperty({__proto__:null,Attributor:io,AttributorStore:zf,BlockBlot:Gl,ClassAttributor:$r,ContainerBlot:qf,EmbedBlot:Hn,InlineBlot:Ax,LeafBlot:xn,ParentBlot:Nr,Registry:fa,Scope:Pe,ScrollBlot:Tx,StyleAttributor:Ti,TextBlot:Rd},Symbol.toStringTag,{value:"Module"}));var fc={exports:{}},eb,aR;function hue(){if(aR)return eb;aR=1;var e=-1,t=1,n=0;function r(A,M,O,B,j){if(A===M)return A?[[n,A]]:[];if(O!=null){var D=_(A,M,O);if(D)return D}var V=a(A,M),G=A.substring(0,V);A=A.substring(V),M=M.substring(V),V=u(A,M);var z=A.substring(A.length-V);A=A.substring(0,A.length-V),M=M.substring(0,M.length-V);var H=o(A,M);return G&&H.unshift([n,G]),z&&H.push([n,z]),x(H,j),B&&d(H),H}function o(A,M){var O;if(!A)return[[t,M]];if(!M)return[[e,A]];var B=A.length>M.length?A:M,j=A.length>M.length?M:A,D=B.indexOf(j);if(D!==-1)return O=[[t,B.substring(0,D)],[n,j],[t,B.substring(D+j.length)]],A.length>M.length&&(O[0][0]=O[2][0]=e),O;if(j.length===1)return[[e,A],[t,M]];var V=c(A,M);if(V){var G=V[0],z=V[1],H=V[2],ne=V[3],W=V[4],J=r(G,H),K=r(z,ne);return J.concat([[n,W]],K)}return i(A,M)}function i(A,M){for(var O=A.length,B=M.length,j=Math.ceil((O+B)/2),D=j,V=2*j,G=new Array(V),z=new Array(V),H=0;H<V;H++)G[H]=-1,z[H]=-1;G[D+1]=0,z[D+1]=0;for(var ne=O-B,W=ne%2!==0,J=0,K=0,U=0,oe=0,X=0;X<j;X++){for(var te=-X+J;te<=X-K;te+=2){var Q=D+te,se;te===-X||te!==X&&G[Q-1]<G[Q+1]?se=G[Q+1]:se=G[Q-1]+1;for(var ae=se-te;se<O&&ae<B&&A.charAt(se)===M.charAt(ae);)se++,ae++;if(G[Q]=se,se>O)K+=2;else if(ae>B)J+=2;else if(W){var L=D+ne-te;if(L>=0&&L<V&&z[L]!==-1){var Z=O-z[L];if(se>=Z)return s(A,M,se,ae)}}}for(var k=-X+U;k<=X-oe;k+=2){var L=D+k,Z;k===-X||k!==X&&z[L-1]<z[L+1]?Z=z[L+1]:Z=z[L-1]+1;for(var ie=Z-k;Z<O&&ie<B&&A.charAt(O-Z-1)===M.charAt(B-ie-1);)Z++,ie++;if(z[L]=Z,Z>O)oe+=2;else if(ie>B)U+=2;else if(!W){var Q=D+ne-k;if(Q>=0&&Q<V&&G[Q]!==-1){var se=G[Q],ae=D+se-Q;if(Z=O-Z,se>=Z)return s(A,M,se,ae)}}}}return[[e,A],[t,M]]}function s(A,M,O,B){var j=A.substring(0,O),D=M.substring(0,B),V=A.substring(O),G=M.substring(B),z=r(j,D),H=r(V,G);return z.concat(H)}function a(A,M){if(!A||!M||A.charAt(0)!==M.charAt(0))return 0;for(var O=0,B=Math.min(A.length,M.length),j=B,D=0;O<j;)A.substring(D,j)==M.substring(D,j)?(O=j,D=O):B=j,j=Math.floor((B-O)/2+O);return w(A.charCodeAt(j-1))&&j--,j}function l(A,M){var O=A.length,B=M.length;if(O==0||B==0)return 0;O>B?A=A.substring(O-B):O<B&&(M=M.substring(0,O));var j=Math.min(O,B);if(A==M)return j;for(var D=0,V=1;;){var G=A.substring(j-V),z=M.indexOf(G);if(z==-1)return D;V+=z,(z==0||A.substring(j-V)==M.substring(0,V))&&(D=V,V++)}}function u(A,M){if(!A||!M||A.slice(-1)!==M.slice(-1))return 0;for(var O=0,B=Math.min(A.length,M.length),j=B,D=0;O<j;)A.substring(A.length-j,A.length-D)==M.substring(M.length-j,M.length-D)?(O=j,D=O):B=j,j=Math.floor((B-O)/2+O);return C(A.charCodeAt(A.length-j))&&j--,j}function c(A,M){var O=A.length>M.length?A:M,B=A.length>M.length?M:A;if(O.length<4||B.length*2<O.length)return null;function j(K,U,oe){for(var X=K.substring(oe,oe+Math.floor(K.length/4)),te=-1,Q="",se,ae,L,Z;(te=U.indexOf(X,te+1))!==-1;){var k=a(K.substring(oe),U.substring(te)),ie=u(K.substring(0,oe),U.substring(0,te));Q.length<ie+k&&(Q=U.substring(te-ie,te)+U.substring(te,te+k),se=K.substring(0,oe-ie),ae=K.substring(oe+k),L=U.substring(0,te-ie),Z=U.substring(te+k))}return Q.length*2>=K.length?[se,ae,L,Z,Q]:null}var D=j(O,B,Math.ceil(O.length/4)),V=j(O,B,Math.ceil(O.length/2)),G;if(!D&&!V)return null;V?D?G=D[4].length>V[4].length?D:V:G=V:G=D;var z,H,ne,W;A.length>M.length?(z=G[0],H=G[1],ne=G[2],W=G[3]):(ne=G[0],W=G[1],z=G[2],H=G[3]);var J=G[4];return[z,H,ne,W,J]}function d(A){for(var M=!1,O=[],B=0,j=null,D=0,V=0,G=0,z=0,H=0;D<A.length;)A[D][0]==n?(O[B++]=D,V=z,G=H,z=0,H=0,j=A[D][1]):(A[D][0]==t?z+=A[D][1].length:H+=A[D][1].length,j&&j.length<=Math.max(V,G)&&j.length<=Math.max(z,H)&&(A.splice(O[B-1],0,[e,j]),A[O[B-1]+1][0]=t,B--,B--,D=B>0?O[B-1]:-1,V=0,G=0,z=0,H=0,j=null,M=!0)),D++;for(M&&x(A),y(A),D=1;D<A.length;){if(A[D-1][0]==e&&A[D][0]==t){var ne=A[D-1][1],W=A[D][1],J=l(ne,W),K=l(W,ne);J>=K?(J>=ne.length/2||J>=W.length/2)&&(A.splice(D,0,[n,W.substring(0,J)]),A[D-1][1]=ne.substring(0,ne.length-J),A[D+1][1]=W.substring(J),D++):(K>=ne.length/2||K>=W.length/2)&&(A.splice(D,0,[n,ne.substring(0,K)]),A[D-1][0]=t,A[D-1][1]=W.substring(0,W.length-K),A[D+1][0]=e,A[D+1][1]=ne.substring(K),D++),D++}D++}}var f=/[^a-zA-Z0-9]/,p=/\s/,g=/[\r\n]/,m=/\n\r?\n$/,v=/^\r?\n\r?\n/;function y(A){function M(K,U){if(!K||!U)return 6;var oe=K.charAt(K.length-1),X=U.charAt(0),te=oe.match(f),Q=X.match(f),se=te&&oe.match(p),ae=Q&&X.match(p),L=se&&oe.match(g),Z=ae&&X.match(g),k=L&&K.match(m),ie=Z&&U.match(v);return k||ie?5:L||Z?4:te&&!se&&ae?3:se||ae?2:te||Q?1:0}for(var O=1;O<A.length-1;){if(A[O-1][0]==n&&A[O+1][0]==n){var B=A[O-1][1],j=A[O][1],D=A[O+1][1],V=u(B,j);if(V){var G=j.substring(j.length-V);B=B.substring(0,B.length-V),j=G+j.substring(0,j.length-V),D=G+D}for(var z=B,H=j,ne=D,W=M(B,j)+M(j,D);j.charAt(0)===D.charAt(0);){B+=j.charAt(0),j=j.substring(1)+D.charAt(0),D=D.substring(1);var J=M(B,j)+M(j,D);J>=W&&(W=J,z=B,H=j,ne=D)}A[O-1][1]!=z&&(z?A[O-1][1]=z:(A.splice(O-1,1),O--),A[O][1]=H,ne?A[O+1][1]=ne:(A.splice(O+1,1),O--))}O++}}function x(A,M){A.push([n,""]);for(var O=0,B=0,j=0,D="",V="",G;O<A.length;){if(O<A.length-1&&!A[O][1]){A.splice(O,1);continue}switch(A[O][0]){case t:j++,V+=A[O][1],O++;break;case e:B++,D+=A[O][1],O++;break;case n:var z=O-j-B-1;if(M){if(z>=0&&R(A[z][1])){var H=A[z][1].slice(-1);if(A[z][1]=A[z][1].slice(0,-1),D=H+D,V=H+V,!A[z][1]){A.splice(z,1),O--;var ne=z-1;A[ne]&&A[ne][0]===t&&(j++,V=A[ne][1]+V,ne--),A[ne]&&A[ne][0]===e&&(B++,D=A[ne][1]+D,ne--),z=ne}}if(S(A[O][1])){var H=A[O][1].charAt(0);A[O][1]=A[O][1].slice(1),D+=H,V+=H}}if(O<A.length-1&&!A[O][1]){A.splice(O,1);break}if(D.length>0||V.length>0){D.length>0&&V.length>0&&(G=a(V,D),G!==0&&(z>=0?A[z][1]+=V.substring(0,G):(A.splice(0,0,[n,V.substring(0,G)]),O++),V=V.substring(G),D=D.substring(G)),G=u(V,D),G!==0&&(A[O][1]=V.substring(V.length-G)+A[O][1],V=V.substring(0,V.length-G),D=D.substring(0,D.length-G)));var W=j+B;D.length===0&&V.length===0?(A.splice(O-W,W),O=O-W):D.length===0?(A.splice(O-W,W,[t,V]),O=O-W+1):V.length===0?(A.splice(O-W,W,[e,D]),O=O-W+1):(A.splice(O-W,W,[e,D],[t,V]),O=O-W+2)}O!==0&&A[O-1][0]===n?(A[O-1][1]+=A[O][1],A.splice(O,1)):O++,j=0,B=0,D="",V="";break}}A[A.length-1][1]===""&&A.pop();var J=!1;for(O=1;O<A.length-1;)A[O-1][0]===n&&A[O+1][0]===n&&(A[O][1].substring(A[O][1].length-A[O-1][1].length)===A[O-1][1]?(A[O][1]=A[O-1][1]+A[O][1].substring(0,A[O][1].length-A[O-1][1].length),A[O+1][1]=A[O-1][1]+A[O+1][1],A.splice(O-1,1),J=!0):A[O][1].substring(0,A[O+1][1].length)==A[O+1][1]&&(A[O-1][1]+=A[O+1][1],A[O][1]=A[O][1].substring(A[O+1][1].length)+A[O+1][1],A.splice(O+1,1),J=!0)),O++;J&&x(A,M)}function w(A){return A>=55296&&A<=56319}function C(A){return A>=56320&&A<=57343}function S(A){return C(A.charCodeAt(0))}function R(A){return w(A.charCodeAt(A.length-1))}function I(A){for(var M=[],O=0;O<A.length;O++)A[O][1].length>0&&M.push(A[O]);return M}function T(A,M,O,B){return R(A)||S(B)?null:I([[n,A],[e,M],[t,O],[n,B]])}function _(A,M,O){var B=typeof O=="number"?{index:O,length:0}:O.oldRange,j=typeof O=="number"?null:O.newRange,D=A.length,V=M.length;if(B.length===0&&(j===null||j.length===0)){var G=B.index,z=A.slice(0,G),H=A.slice(G),ne=j?j.index:null;e:{var W=G+V-D;if(ne!==null&&ne!==W||W<0||W>V)break e;var J=M.slice(0,W),K=M.slice(W);if(K!==H)break e;var U=Math.min(G,W),oe=z.slice(0,U),X=J.slice(0,U);if(oe!==X)break e;var te=z.slice(U),Q=J.slice(U);return T(oe,te,Q,H)}e:{if(ne!==null&&ne!==G)break e;var se=G,J=M.slice(0,se),K=M.slice(se);if(J!==z)break e;var ae=Math.min(D-se,V-se),L=H.slice(H.length-ae),Z=K.slice(K.length-ae);if(L!==Z)break e;var te=H.slice(0,H.length-ae),Q=K.slice(0,K.length-ae);return T(z,te,Q,L)}}if(B.length>0&&j&&j.length===0)e:{var oe=A.slice(0,B.index),L=A.slice(B.index+B.length),U=oe.length,ae=L.length;if(V<U+ae)break e;var X=M.slice(0,U),Z=M.slice(V-ae);if(oe!==X||L!==Z)break e;var te=A.slice(U,D-ae),Q=M.slice(U,V-ae);return T(oe,te,Q,L)}return null}function $(A,M,O,B){return r(A,M,O,B,!0)}return $.INSERT=t,$.DELETE=e,$.EQUAL=n,eb=$,eb}var sl={exports:{}};sl.exports;var lR;function Oj(){return lR||(lR=1,(function(e,t){var n=200,r="__lodash_hash_undefined__",o=9007199254740991,i="[object Arguments]",s="[object Array]",a="[object Boolean]",l="[object Date]",u="[object Error]",c="[object Function]",d="[object GeneratorFunction]",f="[object Map]",p="[object Number]",g="[object Object]",m="[object Promise]",v="[object RegExp]",y="[object Set]",x="[object String]",w="[object Symbol]",C="[object WeakMap]",S="[object ArrayBuffer]",R="[object DataView]",I="[object Float32Array]",T="[object Float64Array]",_="[object Int8Array]",$="[object Int16Array]",A="[object Int32Array]",M="[object Uint8Array]",O="[object Uint8ClampedArray]",B="[object Uint16Array]",j="[object Uint32Array]",D=/[\\^$.*+?()[\]{}|]/g,V=/\w*$/,G=/^\[object .+?Constructor\]$/,z=/^(?:0|[1-9]\d*)$/,H={};H[i]=H[s]=H[S]=H[R]=H[a]=H[l]=H[I]=H[T]=H[_]=H[$]=H[A]=H[f]=H[p]=H[g]=H[v]=H[y]=H[x]=H[w]=H[M]=H[O]=H[B]=H[j]=!0,H[u]=H[c]=H[C]=!1;var ne=typeof ir=="object"&&ir&&ir.Object===Object&&ir,W=typeof self=="object"&&self&&self.Object===Object&&self,J=ne||W||Function("return this")(),K=t&&!t.nodeType&&t,U=K&&!0&&e&&!e.nodeType&&e,oe=U&&U.exports===K;function X(E,P){return E.set(P[0],P[1]),E}function te(E,P){return E.add(P),E}function Q(E,P){for(var q=-1,ue=E?E.length:0;++q<ue&&P(E[q],q,E)!==!1;);return E}function se(E,P){for(var q=-1,ue=P.length,Je=E.length;++q<ue;)E[Je+q]=P[q];return E}function ae(E,P,q,ue){for(var Je=-1,je=E?E.length:0;++Je<je;)q=P(q,E[Je],Je,E);return q}function L(E,P){for(var q=-1,ue=Array(E);++q<E;)ue[q]=P(q);return ue}function Z(E,P){return E?.[P]}function k(E){var P=!1;if(E!=null&&typeof E.toString!="function")try{P=!!(E+"")}catch{}return P}function ie(E){var P=-1,q=Array(E.size);return E.forEach(function(ue,Je){q[++P]=[Je,ue]}),q}function Y(E,P){return function(q){return E(P(q))}}function le(E){var P=-1,q=Array(E.size);return E.forEach(function(ue){q[++P]=ue}),q}var pe=Array.prototype,re=Function.prototype,fe=Object.prototype,de=J["__core-js_shared__"],ve=(function(){var E=/[^.]+$/.exec(de&&de.keys&&de.keys.IE_PROTO||"");return E?"Symbol(src)_1."+E:""})(),we=re.toString,Se=fe.hasOwnProperty,Ye=fe.toString,at=RegExp("^"+we.call(Se).replace(D,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Xe=oe?J.Buffer:void 0,Ue=J.Symbol,rt=J.Uint8Array,et=Y(Object.getPrototypeOf,Object),gt=Object.create,ct=fe.propertyIsEnumerable,ot=pe.splice,mt=Object.getOwnPropertySymbols,Nt=Xe?Xe.isBuffer:void 0,Bt=Y(Object.keys,Object),tt=Dn(J,"DataView"),Ze=Dn(J,"Map"),ee=Dn(J,"Promise"),ye=Dn(J,"Set"),ge=Dn(J,"WeakMap"),xe=Dn(Object,"create"),Ae=st(tt),Ie=st(Ze),qe=st(ee),Pt=st(ye),lt=st(ge),it=Ue?Ue.prototype:void 0,_t=it?it.valueOf:void 0;function Et(E){var P=-1,q=E?E.length:0;for(this.clear();++P<q;){var ue=E[P];this.set(ue[0],ue[1])}}function sn(){this.__data__=xe?xe(null):{}}function mr(E){return this.has(E)&&delete this.__data__[E]}function Wn(E){var P=this.__data__;if(xe){var q=P[E];return q===r?void 0:q}return Se.call(P,E)?P[E]:void 0}function pn(E){var P=this.__data__;return xe?P[E]!==void 0:Se.call(P,E)}function Jt(E,P){var q=this.__data__;return q[E]=xe&&P===void 0?r:P,this}Et.prototype.clear=sn,Et.prototype.delete=mr,Et.prototype.get=Wn,Et.prototype.has=pn,Et.prototype.set=Jt;function Ve(E){var P=-1,q=E?E.length:0;for(this.clear();++P<q;){var ue=E[P];this.set(ue[0],ue[1])}}function zn(){this.__data__=[]}function Sa(E){var P=this.__data__,q=br(P,E);if(q<0)return!1;var ue=P.length-1;return q==ue?P.pop():ot.call(P,q,1),!0}function Oi(E){var P=this.__data__,q=br(P,E);return q<0?void 0:P[q][1]}function Ni(E){return br(this.__data__,E)>-1}function Go(E,P){var q=this.__data__,ue=br(q,E);return ue<0?q.push([E,P]):q[ue][1]=P,this}Ve.prototype.clear=zn,Ve.prototype.delete=Sa,Ve.prototype.get=Oi,Ve.prototype.has=Ni,Ve.prototype.set=Go;function nn(E){var P=-1,q=E?E.length:0;for(this.clear();++P<q;){var ue=E[P];this.set(ue[0],ue[1])}}function Ho(){this.__data__={hash:new Et,map:new(Ze||Ve),string:new Et}}function Es(E){return xo(this,E).delete(E)}function bo(E){return xo(this,E).get(E)}function Pi(E){return xo(this,E).has(E)}function Cn(E,P){return xo(this,E).set(E,P),this}nn.prototype.clear=Ho,nn.prototype.delete=Es,nn.prototype.get=bo,nn.prototype.has=Pi,nn.prototype.set=Cn;function Mt(E){this.__data__=new Ve(E)}function Ea(){this.__data__=new Ve}function Is(E){return this.__data__.delete(E)}function Ia(E){return this.__data__.get(E)}function _i(E){return this.__data__.has(E)}function Rs(E,P){var q=this.__data__;if(q instanceof Ve){var ue=q.__data__;if(!Ze||ue.length<n-1)return ue.push([E,P]),this;q=this.__data__=new nn(ue)}return q.set(E,P),this}Mt.prototype.clear=Ea,Mt.prototype.delete=Is,Mt.prototype.get=Ia,Mt.prototype.has=_i,Mt.prototype.set=Rs;function Hr(E,P){var q=zr(E)||An(E)?L(E.length,String):[],ue=q.length,Je=!!ue;for(var je in E)Se.call(E,je)&&!(Je&&(je=="length"||Ce(je,ue)))&&q.push(je);return q}function As(E,P,q){var ue=E[P];(!(Se.call(E,P)&&Xn(ue,q))||q===void 0&&!(P in E))&&(E[P]=q)}function br(E,P){for(var q=E.length;q--;)if(Xn(E[q][0],P))return q;return-1}function qn(E,P){return E&&yo(P,Ma(P),E)}function an(E,P,q,ue,Je,je,dt){var ut;if(ue&&(ut=je?ue(E,Je,je,dt):ue(E)),ut!==void 0)return ut;if(!qr(E))return E;var qt=zr(E);if(qt){if(ut=Li(E),!P)return Na(E,ut)}else{var bt=yr(E),hn=bt==c||bt==d;if(Au(E))return Wr(E,P);if(bt==g||bt==i||hn&&!je){if(k(E))return je?E:{};if(ut=Yn(hn?{}:E),!P)return ki(E,qn(ut,E))}else{if(!H[bt])return je?E:{};ut=Pa(E,bt,an,P)}}dt||(dt=new Mt);var Tn=dt.get(E);if(Tn)return Tn;if(dt.set(E,ut),!qt)var Kt=q?ji(E):Ma(E);return Q(Kt||E,function(gn,ln){Kt&&(ln=gn,gn=E[ln]),As(ut,ln,an(gn,P,q,ue,ln,E,dt))}),ut}function Rn(E){return qr(E)?gt(E):{}}function vo(E,P,q){var ue=P(E);return zr(E)?ue:se(ue,q(E))}function Wo(E){return Ye.call(E)}function Ra(E){if(!qr(E)||Ke(E))return!1;var P=_a(E)||k(E)?at:G;return P.test(st(E))}function Mi(E){if(!It(E))return Bt(E);var P=[];for(var q in Object(E))Se.call(E,q)&&q!="constructor"&&P.push(q);return P}function Wr(E,P){if(P)return E.slice();var q=new E.constructor(E.length);return E.copy(q),q}function Di(E){var P=new E.constructor(E.byteLength);return new rt(P).set(new rt(E)),P}function Un(E,P){var q=P?Di(E.buffer):E.buffer;return new E.constructor(q,E.byteOffset,E.byteLength)}function zo(E,P,q){var ue=P?q(ie(E),!0):ie(E);return ae(ue,X,new E.constructor)}function qo(E){var P=new E.constructor(E.source,V.exec(E));return P.lastIndex=E.lastIndex,P}function Aa(E,P,q){var ue=P?q(le(E),!0):le(E);return ae(ue,te,new E.constructor)}function Ta(E){return _t?Object(_t.call(E)):{}}function Oa(E,P){var q=P?Di(E.buffer):E.buffer;return new E.constructor(q,E.byteOffset,E.length)}function Na(E,P){var q=-1,ue=E.length;for(P||(P=Array(ue));++q<ue;)P[q]=E[q];return P}function yo(E,P,q,ue){q||(q={});for(var Je=-1,je=P.length;++Je<je;){var dt=P[Je],ut=void 0;As(q,dt,ut===void 0?E[dt]:ut)}return q}function ki(E,P){return yo(E,vr(E),P)}function ji(E){return vo(E,Ma,vr)}function xo(E,P){var q=E.__data__;return Me(P)?q[typeof P=="string"?"string":"hash"]:q.map}function Dn(E,P){var q=Z(E,P);return Ra(q)?q:void 0}var vr=mt?Y(mt,Object):Qf,yr=Wo;(tt&&yr(new tt(new ArrayBuffer(1)))!=R||Ze&&yr(new Ze)!=f||ee&&yr(ee.resolve())!=m||ye&&yr(new ye)!=y||ge&&yr(new ge)!=C)&&(yr=function(E){var P=Ye.call(E),q=P==g?E.constructor:void 0,ue=q?st(q):void 0;if(ue)switch(ue){case Ae:return R;case Ie:return f;case qe:return m;case Pt:return y;case lt:return C}return P});function Li(E){var P=E.length,q=E.constructor(P);return P&&typeof E[0]=="string"&&Se.call(E,"index")&&(q.index=E.index,q.input=E.input),q}function Yn(E){return typeof E.constructor=="function"&&!It(E)?Rn(et(E)):{}}function Pa(E,P,q,ue){var Je=E.constructor;switch(P){case S:return Di(E);case a:case l:return new Je(+E);case R:return Un(E,ue);case I:case T:case _:case $:case A:case M:case O:case B:case j:return Oa(E,ue);case f:return zo(E,ue,q);case p:case x:return new Je(E);case v:return qo(E);case y:return Aa(E,ue,q);case w:return Ta(E)}}function Ce(E,P){return P=P??o,!!P&&(typeof E=="number"||z.test(E))&&E>-1&&E%1==0&&E<P}function Me(E){var P=typeof E;return P=="string"||P=="number"||P=="symbol"||P=="boolean"?E!=="__proto__":E===null}function Ke(E){return!!ve&&ve in E}function It(E){var P=E&&E.constructor,q=typeof P=="function"&&P.prototype||fe;return E===q}function st(E){if(E!=null){try{return we.call(E)}catch{}try{return E+""}catch{}}return""}function Dt(E){return an(E,!0,!0)}function Xn(E,P){return E===P||E!==E&&P!==P}function An(E){return Ru(E)&&Se.call(E,"callee")&&(!ct.call(E,"callee")||Ye.call(E)==i)}var zr=Array.isArray;function Uo(E){return E!=null&&Tu(E.length)&&!_a(E)}function Ru(E){return Ou(E)&&Uo(E)}var Au=Nt||ep;function _a(E){var P=qr(E)?Ye.call(E):"";return P==c||P==d}function Tu(E){return typeof E=="number"&&E>-1&&E%1==0&&E<=o}function qr(E){var P=typeof E;return!!E&&(P=="object"||P=="function")}function Ou(E){return!!E&&typeof E=="object"}function Ma(E){return Uo(E)?Hr(E):Mi(E)}function Qf(){return[]}function ep(){return!1}e.exports=Dt})(sl,sl.exports)),sl.exports}var al={exports:{}};al.exports;var uR;function Nj(){return uR||(uR=1,(function(e,t){var n=200,r="__lodash_hash_undefined__",o=1,i=2,s=9007199254740991,a="[object Arguments]",l="[object Array]",u="[object AsyncFunction]",c="[object Boolean]",d="[object Date]",f="[object Error]",p="[object Function]",g="[object GeneratorFunction]",m="[object Map]",v="[object Number]",y="[object Null]",x="[object Object]",w="[object Promise]",C="[object Proxy]",S="[object RegExp]",R="[object Set]",I="[object String]",T="[object Symbol]",_="[object Undefined]",$="[object WeakMap]",A="[object ArrayBuffer]",M="[object DataView]",O="[object Float32Array]",B="[object Float64Array]",j="[object Int8Array]",D="[object Int16Array]",V="[object Int32Array]",G="[object Uint8Array]",z="[object Uint8ClampedArray]",H="[object Uint16Array]",ne="[object Uint32Array]",W=/[\\^$.*+?()[\]{}|]/g,J=/^\[object .+?Constructor\]$/,K=/^(?:0|[1-9]\d*)$/,U={};U[O]=U[B]=U[j]=U[D]=U[V]=U[G]=U[z]=U[H]=U[ne]=!0,U[a]=U[l]=U[A]=U[c]=U[M]=U[d]=U[f]=U[p]=U[m]=U[v]=U[x]=U[S]=U[R]=U[I]=U[$]=!1;var oe=typeof ir=="object"&&ir&&ir.Object===Object&&ir,X=typeof self=="object"&&self&&self.Object===Object&&self,te=oe||X||Function("return this")(),Q=t&&!t.nodeType&&t,se=Q&&!0&&e&&!e.nodeType&&e,ae=se&&se.exports===Q,L=ae&&oe.process,Z=(function(){try{return L&&L.binding&&L.binding("util")}catch{}})(),k=Z&&Z.isTypedArray;function ie(E,P){for(var q=-1,ue=E==null?0:E.length,Je=0,je=[];++q<ue;){var dt=E[q];P(dt,q,E)&&(je[Je++]=dt)}return je}function Y(E,P){for(var q=-1,ue=P.length,Je=E.length;++q<ue;)E[Je+q]=P[q];return E}function le(E,P){for(var q=-1,ue=E==null?0:E.length;++q<ue;)if(P(E[q],q,E))return!0;return!1}function pe(E,P){for(var q=-1,ue=Array(E);++q<E;)ue[q]=P(q);return ue}function re(E){return function(P){return E(P)}}function fe(E,P){return E.has(P)}function de(E,P){return E?.[P]}function ve(E){var P=-1,q=Array(E.size);return E.forEach(function(ue,Je){q[++P]=[Je,ue]}),q}function we(E,P){return function(q){return E(P(q))}}function Se(E){var P=-1,q=Array(E.size);return E.forEach(function(ue){q[++P]=ue}),q}var Ye=Array.prototype,at=Function.prototype,Xe=Object.prototype,Ue=te["__core-js_shared__"],rt=at.toString,et=Xe.hasOwnProperty,gt=(function(){var E=/[^.]+$/.exec(Ue&&Ue.keys&&Ue.keys.IE_PROTO||"");return E?"Symbol(src)_1."+E:""})(),ct=Xe.toString,ot=RegExp("^"+rt.call(et).replace(W,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),mt=ae?te.Buffer:void 0,Nt=te.Symbol,Bt=te.Uint8Array,tt=Xe.propertyIsEnumerable,Ze=Ye.splice,ee=Nt?Nt.toStringTag:void 0,ye=Object.getOwnPropertySymbols,ge=mt?mt.isBuffer:void 0,xe=we(Object.keys,Object),Ae=vr(te,"DataView"),Ie=vr(te,"Map"),qe=vr(te,"Promise"),Pt=vr(te,"Set"),lt=vr(te,"WeakMap"),it=vr(Object,"create"),_t=st(Ae),Et=st(Ie),sn=st(qe),mr=st(Pt),Wn=st(lt),pn=Nt?Nt.prototype:void 0,Jt=pn?pn.valueOf:void 0;function Ve(E){var P=-1,q=E==null?0:E.length;for(this.clear();++P<q;){var ue=E[P];this.set(ue[0],ue[1])}}function zn(){this.__data__=it?it(null):{},this.size=0}function Sa(E){var P=this.has(E)&&delete this.__data__[E];return this.size-=P?1:0,P}function Oi(E){var P=this.__data__;if(it){var q=P[E];return q===r?void 0:q}return et.call(P,E)?P[E]:void 0}function Ni(E){var P=this.__data__;return it?P[E]!==void 0:et.call(P,E)}function Go(E,P){var q=this.__data__;return this.size+=this.has(E)?0:1,q[E]=it&&P===void 0?r:P,this}Ve.prototype.clear=zn,Ve.prototype.delete=Sa,Ve.prototype.get=Oi,Ve.prototype.has=Ni,Ve.prototype.set=Go;function nn(E){var P=-1,q=E==null?0:E.length;for(this.clear();++P<q;){var ue=E[P];this.set(ue[0],ue[1])}}function Ho(){this.__data__=[],this.size=0}function Es(E){var P=this.__data__,q=Wr(P,E);if(q<0)return!1;var ue=P.length-1;return q==ue?P.pop():Ze.call(P,q,1),--this.size,!0}function bo(E){var P=this.__data__,q=Wr(P,E);return q<0?void 0:P[q][1]}function Pi(E){return Wr(this.__data__,E)>-1}function Cn(E,P){var q=this.__data__,ue=Wr(q,E);return ue<0?(++this.size,q.push([E,P])):q[ue][1]=P,this}nn.prototype.clear=Ho,nn.prototype.delete=Es,nn.prototype.get=bo,nn.prototype.has=Pi,nn.prototype.set=Cn;function Mt(E){var P=-1,q=E==null?0:E.length;for(this.clear();++P<q;){var ue=E[P];this.set(ue[0],ue[1])}}function Ea(){this.size=0,this.__data__={hash:new Ve,map:new(Ie||nn),string:new Ve}}function Is(E){var P=Dn(this,E).delete(E);return this.size-=P?1:0,P}function Ia(E){return Dn(this,E).get(E)}function _i(E){return Dn(this,E).has(E)}function Rs(E,P){var q=Dn(this,E),ue=q.size;return q.set(E,P),this.size+=q.size==ue?0:1,this}Mt.prototype.clear=Ea,Mt.prototype.delete=Is,Mt.prototype.get=Ia,Mt.prototype.has=_i,Mt.prototype.set=Rs;function Hr(E){var P=-1,q=E==null?0:E.length;for(this.__data__=new Mt;++P<q;)this.add(E[P])}function As(E){return this.__data__.set(E,r),this}function br(E){return this.__data__.has(E)}Hr.prototype.add=Hr.prototype.push=As,Hr.prototype.has=br;function qn(E){var P=this.__data__=new nn(E);this.size=P.size}function an(){this.__data__=new nn,this.size=0}function Rn(E){var P=this.__data__,q=P.delete(E);return this.size=P.size,q}function vo(E){return this.__data__.get(E)}function Wo(E){return this.__data__.has(E)}function Ra(E,P){var q=this.__data__;if(q instanceof nn){var ue=q.__data__;if(!Ie||ue.length<n-1)return ue.push([E,P]),this.size=++q.size,this;q=this.__data__=new Mt(ue)}return q.set(E,P),this.size=q.size,this}qn.prototype.clear=an,qn.prototype.delete=Rn,qn.prototype.get=vo,qn.prototype.has=Wo,qn.prototype.set=Ra;function Mi(E,P){var q=An(E),ue=!q&&Xn(E),Je=!q&&!ue&&Uo(E),je=!q&&!ue&&!Je&&Ou(E),dt=q||ue||Je||je,ut=dt?pe(E.length,String):[],qt=ut.length;for(var bt in E)et.call(E,bt)&&!(dt&&(bt=="length"||Je&&(bt=="offset"||bt=="parent")||je&&(bt=="buffer"||bt=="byteLength"||bt=="byteOffset")||Pa(bt,qt)))&&ut.push(bt);return ut}function Wr(E,P){for(var q=E.length;q--;)if(Dt(E[q][0],P))return q;return-1}function Di(E,P,q){var ue=P(E);return An(E)?ue:Y(ue,q(E))}function Un(E){return E==null?E===void 0?_:y:ee&&ee in Object(E)?yr(E):It(E)}function zo(E){return qr(E)&&Un(E)==a}function qo(E,P,q,ue,Je){return E===P?!0:E==null||P==null||!qr(E)&&!qr(P)?E!==E&&P!==P:Aa(E,P,q,ue,qo,Je)}function Aa(E,P,q,ue,Je,je){var dt=An(E),ut=An(P),qt=dt?l:Yn(E),bt=ut?l:Yn(P);qt=qt==a?x:qt,bt=bt==a?x:bt;var hn=qt==x,Tn=bt==x,Kt=qt==bt;if(Kt&&Uo(E)){if(!Uo(P))return!1;dt=!0,hn=!1}if(Kt&&!hn)return je||(je=new qn),dt||Ou(E)?yo(E,P,q,ue,Je,je):ki(E,P,qt,q,ue,Je,je);if(!(q&o)){var gn=hn&&et.call(E,"__wrapped__"),ln=Tn&&et.call(P,"__wrapped__");if(gn||ln){var Yo=gn?E.value():E,wo=ln?P.value():P;return je||(je=new qn),Je(Yo,wo,q,ue,je)}}return Kt?(je||(je=new qn),ji(E,P,q,ue,Je,je)):!1}function Ta(E){if(!Tu(E)||Me(E))return!1;var P=Au(E)?ot:J;return P.test(st(E))}function Oa(E){return qr(E)&&_a(E.length)&&!!U[Un(E)]}function Na(E){if(!Ke(E))return xe(E);var P=[];for(var q in Object(E))et.call(E,q)&&q!="constructor"&&P.push(q);return P}function yo(E,P,q,ue,Je,je){var dt=q&o,ut=E.length,qt=P.length;if(ut!=qt&&!(dt&&qt>ut))return!1;var bt=je.get(E);if(bt&&je.get(P))return bt==P;var hn=-1,Tn=!0,Kt=q&i?new Hr:void 0;for(je.set(E,P),je.set(P,E);++hn<ut;){var gn=E[hn],ln=P[hn];if(ue)var Yo=dt?ue(ln,gn,hn,P,E,je):ue(gn,ln,hn,E,P,je);if(Yo!==void 0){if(Yo)continue;Tn=!1;break}if(Kt){if(!le(P,function(wo,Fi){if(!fe(Kt,Fi)&&(gn===wo||Je(gn,wo,q,ue,je)))return Kt.push(Fi)})){Tn=!1;break}}else if(!(gn===ln||Je(gn,ln,q,ue,je))){Tn=!1;break}}return je.delete(E),je.delete(P),Tn}function ki(E,P,q,ue,Je,je,dt){switch(q){case M:if(E.byteLength!=P.byteLength||E.byteOffset!=P.byteOffset)return!1;E=E.buffer,P=P.buffer;case A:return!(E.byteLength!=P.byteLength||!je(new Bt(E),new Bt(P)));case c:case d:case v:return Dt(+E,+P);case f:return E.name==P.name&&E.message==P.message;case S:case I:return E==P+"";case m:var ut=ve;case R:var qt=ue&o;if(ut||(ut=Se),E.size!=P.size&&!qt)return!1;var bt=dt.get(E);if(bt)return bt==P;ue|=i,dt.set(E,P);var hn=yo(ut(E),ut(P),ue,Je,je,dt);return dt.delete(E),hn;case T:if(Jt)return Jt.call(E)==Jt.call(P)}return!1}function ji(E,P,q,ue,Je,je){var dt=q&o,ut=xo(E),qt=ut.length,bt=xo(P),hn=bt.length;if(qt!=hn&&!dt)return!1;for(var Tn=qt;Tn--;){var Kt=ut[Tn];if(!(dt?Kt in P:et.call(P,Kt)))return!1}var gn=je.get(E);if(gn&&je.get(P))return gn==P;var ln=!0;je.set(E,P),je.set(P,E);for(var Yo=dt;++Tn<qt;){Kt=ut[Tn];var wo=E[Kt],Fi=P[Kt];if(ue)var Wx=dt?ue(Fi,wo,Kt,P,E,je):ue(wo,Fi,Kt,E,P,je);if(!(Wx===void 0?wo===Fi||Je(wo,Fi,q,ue,je):Wx)){ln=!1;break}Yo||(Yo=Kt=="constructor")}if(ln&&!Yo){var Nu=E.constructor,Pu=P.constructor;Nu!=Pu&&"constructor"in E&&"constructor"in P&&!(typeof Nu=="function"&&Nu instanceof Nu&&typeof Pu=="function"&&Pu instanceof Pu)&&(ln=!1)}return je.delete(E),je.delete(P),ln}function xo(E){return Di(E,Ma,Li)}function Dn(E,P){var q=E.__data__;return Ce(P)?q[typeof P=="string"?"string":"hash"]:q.map}function vr(E,P){var q=de(E,P);return Ta(q)?q:void 0}function yr(E){var P=et.call(E,ee),q=E[ee];try{E[ee]=void 0;var ue=!0}catch{}var Je=ct.call(E);return ue&&(P?E[ee]=q:delete E[ee]),Je}var Li=ye?function(E){return E==null?[]:(E=Object(E),ie(ye(E),function(P){return tt.call(E,P)}))}:Qf,Yn=Un;(Ae&&Yn(new Ae(new ArrayBuffer(1)))!=M||Ie&&Yn(new Ie)!=m||qe&&Yn(qe.resolve())!=w||Pt&&Yn(new Pt)!=R||lt&&Yn(new lt)!=$)&&(Yn=function(E){var P=Un(E),q=P==x?E.constructor:void 0,ue=q?st(q):"";if(ue)switch(ue){case _t:return M;case Et:return m;case sn:return w;case mr:return R;case Wn:return $}return P});function Pa(E,P){return P=P??s,!!P&&(typeof E=="number"||K.test(E))&&E>-1&&E%1==0&&E<P}function Ce(E){var P=typeof E;return P=="string"||P=="number"||P=="symbol"||P=="boolean"?E!=="__proto__":E===null}function Me(E){return!!gt&> in E}function Ke(E){var P=E&&E.constructor,q=typeof P=="function"&&P.prototype||Xe;return E===q}function It(E){return ct.call(E)}function st(E){if(E!=null){try{return rt.call(E)}catch{}try{return E+""}catch{}}return""}function Dt(E,P){return E===P||E!==E&&P!==P}var Xn=zo((function(){return arguments})())?zo:function(E){return qr(E)&&et.call(E,"callee")&&!tt.call(E,"callee")},An=Array.isArray;function zr(E){return E!=null&&_a(E.length)&&!Au(E)}var Uo=ge||ep;function Ru(E,P){return qo(E,P)}function Au(E){if(!Tu(E))return!1;var P=Un(E);return P==p||P==g||P==u||P==C}function _a(E){return typeof E=="number"&&E>-1&&E%1==0&&E<=s}function Tu(E){var P=typeof E;return E!=null&&(P=="object"||P=="function")}function qr(E){return E!=null&&typeof E=="object"}var Ou=k?re(k):Oa;function Ma(E){return zr(E)?Mi(E):Na(E)}function Qf(){return[]}function ep(){return!1}e.exports=Ru})(al,al.exports)),al.exports}var pc={},cR;function gue(){if(cR)return pc;cR=1,Object.defineProperty(pc,"__esModule",{value:!0});const e=Oj(),t=Nj();var n;return(function(r){function o(l={},u={},c=!1){typeof l!="object"&&(l={}),typeof u!="object"&&(u={});let d=e(u);c||(d=Object.keys(d).reduce((f,p)=>(d[p]!=null&&(f[p]=d[p]),f),{}));for(const f in l)l[f]!==void 0&&u[f]===void 0&&(d[f]=l[f]);return Object.keys(d).length>0?d:void 0}r.compose=o;function i(l={},u={}){typeof l!="object"&&(l={}),typeof u!="object"&&(u={});const c=Object.keys(l).concat(Object.keys(u)).reduce((d,f)=>(t(l[f],u[f])||(d[f]=u[f]===void 0?null:u[f]),d),{});return Object.keys(c).length>0?c:void 0}r.diff=i;function s(l={},u={}){l=l||{};const c=Object.keys(u).reduce((d,f)=>(u[f]!==l[f]&&l[f]!==void 0&&(d[f]=u[f]),d),{});return Object.keys(l).reduce((d,f)=>(l[f]!==u[f]&&u[f]===void 0&&(d[f]=null),d),c)}r.invert=s;function a(l,u,c=!1){if(typeof l!="object")return u;if(typeof u!="object")return;if(!c)return u;const d=Object.keys(u).reduce((f,p)=>(l[p]===void 0&&(f[p]=u[p]),f),{});return Object.keys(d).length>0?d:void 0}r.transform=a})(n||(n={})),pc.default=n,pc}var hc={},dR;function Pj(){if(dR)return hc;dR=1,Object.defineProperty(hc,"__esModule",{value:!0});var e;return(function(t){function n(r){return typeof r.delete=="number"?r.delete:typeof r.retain=="number"?r.retain:typeof r.retain=="object"&&r.retain!==null?1:typeof r.insert=="string"?r.insert.length:1}t.length=n})(e||(e={})),hc.default=e,hc}var gc={},fR;function mue(){if(fR)return gc;fR=1,Object.defineProperty(gc,"__esModule",{value:!0});const e=Pj();class t{constructor(r){this.ops=r,this.index=0,this.offset=0}hasNext(){return this.peekLength()<1/0}next(r){r||(r=1/0);const o=this.ops[this.index];if(o){const i=this.offset,s=e.default.length(o);if(r>=s-i?(r=s-i,this.index+=1,this.offset=0):this.offset+=r,typeof o.delete=="number")return{delete:r};{const a={};return o.attributes&&(a.attributes=o.attributes),typeof o.retain=="number"?a.retain=r:typeof o.retain=="object"&&o.retain!==null?a.retain=o.retain:typeof o.insert=="string"?a.insert=o.insert.substr(i,r):a.insert=o.insert,a}}else return{retain:1/0}}peek(){return this.ops[this.index]}peekLength(){return this.ops[this.index]?e.default.length(this.ops[this.index])-this.offset:1/0}peekType(){const r=this.ops[this.index];return r?typeof r.delete=="number"?"delete":typeof r.retain=="number"||typeof r.retain=="object"&&r.retain!==null?"retain":"insert":"retain"}rest(){if(this.hasNext()){if(this.offset===0)return this.ops.slice(this.index);{const r=this.offset,o=this.index,i=this.next(),s=this.ops.slice(this.index);return this.offset=r,this.index=o,[i].concat(s)}}else return[]}}return gc.default=t,gc}var pR;function bue(){return pR||(pR=1,(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.AttributeMap=t.OpIterator=t.Op=void 0;const n=hue(),r=Oj(),o=Nj(),i=gue();t.AttributeMap=i.default;const s=Pj();t.Op=s.default;const a=mue();t.OpIterator=a.default;const l="\0",u=(d,f)=>{if(typeof d!="object"||d===null)throw new Error(`cannot retain a ${typeof d}`);if(typeof f!="object"||f===null)throw new Error(`cannot retain a ${typeof f}`);const p=Object.keys(d)[0];if(!p||p!==Object.keys(f)[0])throw new Error(`embed types not matched: ${p} != ${Object.keys(f)[0]}`);return[p,d[p],f[p]]};class c{constructor(f){Array.isArray(f)?this.ops=f:f!=null&&Array.isArray(f.ops)?this.ops=f.ops:this.ops=[]}static registerEmbed(f,p){this.handlers[f]=p}static unregisterEmbed(f){delete this.handlers[f]}static getHandler(f){const p=this.handlers[f];if(!p)throw new Error(`no handlers for embed type "${f}"`);return p}insert(f,p){const g={};return typeof f=="string"&&f.length===0?this:(g.insert=f,p!=null&&typeof p=="object"&&Object.keys(p).length>0&&(g.attributes=p),this.push(g))}delete(f){return f<=0?this:this.push({delete:f})}retain(f,p){if(typeof f=="number"&&f<=0)return this;const g={retain:f};return p!=null&&typeof p=="object"&&Object.keys(p).length>0&&(g.attributes=p),this.push(g)}push(f){let p=this.ops.length,g=this.ops[p-1];if(f=r(f),typeof g=="object"){if(typeof f.delete=="number"&&typeof g.delete=="number")return this.ops[p-1]={delete:g.delete+f.delete},this;if(typeof g.delete=="number"&&f.insert!=null&&(p-=1,g=this.ops[p-1],typeof g!="object"))return this.ops.unshift(f),this;if(o(f.attributes,g.attributes)){if(typeof f.insert=="string"&&typeof g.insert=="string")return this.ops[p-1]={insert:g.insert+f.insert},typeof f.attributes=="object"&&(this.ops[p-1].attributes=f.attributes),this;if(typeof f.retain=="number"&&typeof g.retain=="number")return this.ops[p-1]={retain:g.retain+f.retain},typeof f.attributes=="object"&&(this.ops[p-1].attributes=f.attributes),this}}return p===this.ops.length?this.ops.push(f):this.ops.splice(p,0,f),this}chop(){const f=this.ops[this.ops.length-1];return f&&typeof f.retain=="number"&&!f.attributes&&this.ops.pop(),this}filter(f){return this.ops.filter(f)}forEach(f){this.ops.forEach(f)}map(f){return this.ops.map(f)}partition(f){const p=[],g=[];return this.forEach(m=>{(f(m)?p:g).push(m)}),[p,g]}reduce(f,p){return this.ops.reduce(f,p)}changeLength(){return this.reduce((f,p)=>p.insert?f+s.default.length(p):p.delete?f-p.delete:f,0)}length(){return this.reduce((f,p)=>f+s.default.length(p),0)}slice(f=0,p=1/0){const g=[],m=new a.default(this.ops);let v=0;for(;v<p&&m.hasNext();){let y;v<f?y=m.next(f-v):(y=m.next(p-v),g.push(y)),v+=s.default.length(y)}return new c(g)}compose(f){const p=new a.default(this.ops),g=new a.default(f.ops),m=[],v=g.peek();if(v!=null&&typeof v.retain=="number"&&v.attributes==null){let x=v.retain;for(;p.peekType()==="insert"&&p.peekLength()<=x;)x-=p.peekLength(),m.push(p.next());v.retain-x>0&&g.next(v.retain-x)}const y=new c(m);for(;p.hasNext()||g.hasNext();)if(g.peekType()==="insert")y.push(g.next());else if(p.peekType()==="delete")y.push(p.next());else{const x=Math.min(p.peekLength(),g.peekLength()),w=p.next(x),C=g.next(x);if(C.retain){const S={};if(typeof w.retain=="number")S.retain=typeof C.retain=="number"?x:C.retain;else if(typeof C.retain=="number")w.retain==null?S.insert=w.insert:S.retain=w.retain;else{const I=w.retain==null?"insert":"retain",[T,_,$]=u(w[I],C.retain),A=c.getHandler(T);S[I]={[T]:A.compose(_,$,I==="retain")}}const R=i.default.compose(w.attributes,C.attributes,typeof w.retain=="number");if(R&&(S.attributes=R),y.push(S),!g.hasNext()&&o(y.ops[y.ops.length-1],S)){const I=new c(p.rest());return y.concat(I).chop()}}else typeof C.delete=="number"&&(typeof w.retain=="number"||typeof w.retain=="object"&&w.retain!==null)&&y.push(C)}return y.chop()}concat(f){const p=new c(this.ops.slice());return f.ops.length>0&&(p.push(f.ops[0]),p.ops=p.ops.concat(f.ops.slice(1))),p}diff(f,p){if(this.ops===f.ops)return new c;const g=[this,f].map(w=>w.map(C=>{if(C.insert!=null)return typeof C.insert=="string"?C.insert:l;const S=w===f?"on":"with";throw new Error("diff() called "+S+" non-document")}).join("")),m=new c,v=n(g[0],g[1],p,!0),y=new a.default(this.ops),x=new a.default(f.ops);return v.forEach(w=>{let C=w[1].length;for(;C>0;){let S=0;switch(w[0]){case n.INSERT:S=Math.min(x.peekLength(),C),m.push(x.next(S));break;case n.DELETE:S=Math.min(C,y.peekLength()),y.next(S),m.delete(S);break;case n.EQUAL:S=Math.min(y.peekLength(),x.peekLength(),C);const R=y.next(S),I=x.next(S);o(R.insert,I.insert)?m.retain(S,i.default.diff(R.attributes,I.attributes)):m.push(I).delete(S);break}C-=S}}),m.chop()}eachLine(f,p=`
|
|
113
113
|
`){const g=new a.default(this.ops);let m=new c,v=0;for(;g.hasNext();){if(g.peekType()!=="insert")return;const y=g.peek(),x=s.default.length(y)-g.peekLength(),w=typeof y.insert=="string"?y.insert.indexOf(p,x)-x:-1;if(w<0)m.push(g.next());else if(w>0)m.push(g.next(w));else{if(f(m,g.next(1).attributes||{},v)===!1)return;v+=1,m=new c}}m.length()>0&&f(m,{},v)}invert(f){const p=new c;return this.reduce((g,m)=>{if(m.insert)p.delete(s.default.length(m));else{if(typeof m.retain=="number"&&m.attributes==null)return p.retain(m.retain),g+m.retain;if(m.delete||typeof m.retain=="number"){const v=m.delete||m.retain;return f.slice(g,g+v).forEach(x=>{m.delete?p.push(x):m.retain&&m.attributes&&p.retain(s.default.length(x),i.default.invert(m.attributes,x.attributes))}),g+v}else if(typeof m.retain=="object"&&m.retain!==null){const v=f.slice(g,g+1),y=new a.default(v.ops).next(),[x,w,C]=u(m.retain,y.insert),S=c.getHandler(x);return p.retain({[x]:S.invert(w,C)},i.default.invert(m.attributes,y.attributes)),g+1}}return g},0),p.chop()}transform(f,p=!1){if(p=!!p,typeof f=="number")return this.transformPosition(f,p);const g=f,m=new a.default(this.ops),v=new a.default(g.ops),y=new c;for(;m.hasNext()||v.hasNext();)if(m.peekType()==="insert"&&(p||v.peekType()!=="insert"))y.retain(s.default.length(m.next()));else if(v.peekType()==="insert")y.push(v.next());else{const x=Math.min(m.peekLength(),v.peekLength()),w=m.next(x),C=v.next(x);if(w.delete)continue;if(C.delete)y.push(C);else{const S=w.retain,R=C.retain;let I=typeof R=="object"&&R!==null?R:x;if(typeof S=="object"&&S!==null&&typeof R=="object"&&R!==null){const T=Object.keys(S)[0];if(T===Object.keys(R)[0]){const _=c.getHandler(T);_&&(I={[T]:_.transform(S[T],R[T],p)})}}y.retain(I,i.default.transform(w.attributes,C.attributes,p))}}return y.chop()}transformPosition(f,p=!1){p=!!p;const g=new a.default(this.ops);let m=0;for(;g.hasNext()&&m<=f;){const v=g.peekLength(),y=g.peekType();if(g.next(),y==="delete"){f-=Math.min(v,f-m);continue}else y==="insert"&&(m<f||!p)&&(f+=v);m+=v}return f}}c.Op=s.default,c.OpIterator=a.default,c.AttributeMap=i.default,c.handlers={},t.default=c,e.exports=c,e.exports.default=c})(fc,fc.exports)),fc.exports}var ar=bue();const Ne=pr(ar);class Gr extends Hn{static value(){}optimize(){(this.prev||this.next)&&this.remove()}length(){return 0}value(){return""}}Gr.blotName="break";Gr.tagName="BR";let Mr=class extends Rd{};const vue={"&":"&","<":"<",">":">",'"':""","'":"'"};function Uf(e){return e.replace(/[&<>"']/g,t=>vue[t])}class Sn extends Ax{static allowedChildren=[Sn,Gr,Hn,Mr];static order=["cursor","inline","link","underline","strike","italic","bold","script","code"];static compare(t,n){const r=Sn.order.indexOf(t),o=Sn.order.indexOf(n);return r>=0||o>=0?r-o:t===n?0:t<n?-1:1}formatAt(t,n,r,o){if(Sn.compare(this.statics.blotName,r)<0&&this.scroll.query(r,Pe.BLOT)){const i=this.isolate(t,n);o&&i.wrap(r,o)}else super.formatAt(t,n,r,o)}optimize(t){if(super.optimize(t),this.parent instanceof Sn&&Sn.compare(this.statics.blotName,this.parent.statics.blotName)>0){const n=this.parent.isolate(this.offset(),this.length());this.moveChildren(n),n.wrap(this)}}}const hR=1;class dn extends Gl{cache={};delta(){return this.cache.delta==null&&(this.cache.delta=_j(this)),this.cache.delta}deleteAt(t,n){super.deleteAt(t,n),this.cache={}}formatAt(t,n,r,o){n<=0||(this.scroll.query(r,Pe.BLOCK)?t+n===this.length()&&this.format(r,o):super.formatAt(t,Math.min(n,this.length()-t-1),r,o),this.cache={})}insertAt(t,n,r){if(r!=null){super.insertAt(t,n,r),this.cache={};return}if(n.length===0)return;const o=n.split(`
|
|
114
114
|
`),i=o.shift();i.length>0&&(t<this.length()-1||this.children.tail==null?super.insertAt(Math.min(t,this.length()-1),i):this.children.tail.insertAt(this.children.tail.length(),i),this.cache={});let s=this;o.reduce((a,l)=>(s=s.split(a,!0),s.insertAt(0,l),l.length),t+i.length)}insertBefore(t,n){const{head:r}=this.children;super.insertBefore(t,n),r instanceof Gr&&r.remove(),this.cache={}}length(){return this.cache.length==null&&(this.cache.length=super.length()+hR),this.cache.length}moveChildren(t,n){super.moveChildren(t,n),this.cache={}}optimize(t){super.optimize(t),this.cache={}}path(t){return super.path(t,!0)}removeChild(t){super.removeChild(t),this.cache={}}split(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(n&&(t===0||t>=this.length()-hR)){const o=this.clone();return t===0?(this.parent.insertBefore(o,this),this):(this.parent.insertBefore(o,this.next),o)}const r=super.split(t,n);return this.cache={},r}}dn.blotName="block";dn.tagName="P";dn.defaultChild=Gr;dn.allowedChildren=[Gr,Sn,Hn,Mr];class or extends Hn{attach(){super.attach(),this.attributes=new zf(this.domNode)}delta(){return new Ne().insert(this.value(),{...this.formats(),...this.attributes.values()})}format(t,n){const r=this.scroll.query(t,Pe.BLOCK_ATTRIBUTE);r!=null&&this.attributes.attribute(r,n)}formatAt(t,n,r,o){this.format(r,o)}insertAt(t,n,r){if(r!=null){super.insertAt(t,n,r);return}const o=n.split(`
|
|
115
115
|
`),i=o.pop(),s=o.map(l=>{const u=this.scroll.create(dn.blotName);return u.insertAt(0,l),u}),a=this.split(t);s.forEach(l=>{this.parent.insertBefore(l,a)}),i&&this.parent.insertBefore(this.scroll.create("text",i),a)}}or.scope=Pe.BLOCK_BLOT;function _j(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return e.descendants(xn).reduce((n,r)=>r.length()===0?n:n.insert(r.value(),tr(r,{},t)),new Ne).insert(`
|