"use strict";(globalThis.webpackChunkcomplianz_gdpr=globalThis.webpackChunkcomplianz_gdpr||[]).push([[5296],{16214:(e,t,n)=>{n.d(t,{N:()=>a});var o=n(51609),r=n(62133),l=n(91071),i=n(33362);function a(e){const t=e+"CollectionProvider",[n,a]=(0,r.A)(t),[s,c]=n(t,{collectionRef:{current:null},itemMap:new Map}),u=e+"CollectionSlot",d=e+"CollectionItemSlot",p="data-radix-collection-item";return[{Provider:e=>{const{scope:t,children:n}=e,r=o.useRef(null),l=o.useRef(new Map).current;return o.createElement(s,{scope:t,itemMap:l,collectionRef:r},n)},Slot:o.forwardRef(((e,t)=>{const{scope:n,children:r}=e,a=c(u,n),s=(0,l.s)(t,a.collectionRef);return o.createElement(i.DX,{ref:s},r)})),ItemSlot:o.forwardRef(((e,t)=>{const{scope:n,children:r,...a}=e,s=o.useRef(null),u=(0,l.s)(t,s),f=c(d,n);return o.useEffect((()=>(f.itemMap.set(s,{ref:s,...a}),()=>{f.itemMap.delete(s)}))),o.createElement(i.DX,{[p]:"",ref:u},r)}))},function(t){const n=c(e+"CollectionConsumer",t);return o.useCallback((()=>{const e=n.collectionRef.current;if(!e)return[];const t=Array.from(e.querySelectorAll(`[${p}]`));return Array.from(n.itemMap.values()).sort(((e,n)=>t.indexOf(e.ref.current)-t.indexOf(n.ref.current)))}),[n.collectionRef,n.itemMap])},a]}},71427:(e,t,n)=>{n.d(t,{jH:()=>l});var o=n(51609);const r=(0,o.createContext)(void 0);function l(e){const t=(0,o.useContext)(r);return e||t||"ltr"}},45296:(e,t,n)=>{n.d(t,{UC:()=>Qe,YJ:()=>tt,q7:()=>nt,p4:()=>ot,bL:()=>Ye,wn:()=>lt,PP:()=>rt,l9:()=>Ze,WT:()=>Je,LM:()=>et});var o=n(58168),r=n(51609),l=n(75795);function i(e,[t,n]){return Math.min(n,Math.max(t,e))}var a=n(9957),s=n(16214),c=n(91071),u=n(62133),d=n(71427),p=n(12579),f=n(10263),v=n(92129);const m="dismissableLayer.update";let h;const g=(0,r.createContext)({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),w=(0,r.forwardRef)(((e,t)=>{var n;const{disableOutsidePointerEvents:l=!1,onEscapeKeyDown:i,onPointerDownOutside:s,onFocusOutside:u,onInteractOutside:d,onDismiss:w,...b}=e,x=(0,r.useContext)(g),[C,S]=(0,r.useState)(null),P=null!==(n=null==C?void 0:C.ownerDocument)&&void 0!==n?n:null===globalThis||void 0===globalThis?void 0:globalThis.document,[,T]=(0,r.useState)({}),R=(0,c.s)(t,(e=>S(e))),D=Array.from(x.layers),[A]=[...x.layersWithOutsidePointerEventsDisabled].slice(-1),O=D.indexOf(A),k=C?D.indexOf(C):-1,I=x.layersWithOutsidePointerEventsDisabled.size>0,L=k>=O,_=function(e,t=(null===globalThis||void 0===globalThis?void 0:globalThis.document)){const n=(0,f.c)(e),o=(0,r.useRef)(!1),l=(0,r.useRef)((()=>{}));return(0,r.useEffect)((()=>{const e=e=>{if(e.target&&!o.current){const r={originalEvent:e};function i(){y("dismissableLayer.pointerDownOutside",n,r,{discrete:!0})}"touch"===e.pointerType?(t.removeEventListener("click",l.current),l.current=i,t.addEventListener("click",l.current,{once:!0})):i()}o.current=!1},r=window.setTimeout((()=>{t.addEventListener("pointerdown",e)}),0);return()=>{window.clearTimeout(r),t.removeEventListener("pointerdown",e),t.removeEventListener("click",l.current)}}),[t,n]),{onPointerDownCapture:()=>o.current=!0}}((e=>{const t=e.target,n=[...x.branches].some((e=>e.contains(t)));L&&!n&&(null==s||s(e),null==d||d(e),e.defaultPrevented||null==w||w())}),P),N=function(e,t=(null===globalThis||void 0===globalThis?void 0:globalThis.document)){const n=(0,f.c)(e),o=(0,r.useRef)(!1);return(0,r.useEffect)((()=>{const e=e=>{e.target&&!o.current&&y("dismissableLayer.focusOutside",n,{originalEvent:e},{discrete:!1})};return t.addEventListener("focusin",e),()=>t.removeEventListener("focusin",e)}),[t,n]),{onFocusCapture:()=>o.current=!0,onBlurCapture:()=>o.current=!1}}((e=>{const t=e.target;[...x.branches].some((e=>e.contains(t)))||(null==u||u(e),null==d||d(e),e.defaultPrevented||null==w||w())}),P);return(0,v.U)((e=>{k===x.layers.size-1&&(null==i||i(e),!e.defaultPrevented&&w&&(e.preventDefault(),w()))}),P),(0,r.useEffect)((()=>{if(C)return l&&(0===x.layersWithOutsidePointerEventsDisabled.size&&(h=P.body.style.pointerEvents,P.body.style.pointerEvents="none"),x.layersWithOutsidePointerEventsDisabled.add(C)),x.layers.add(C),E(),()=>{l&&1===x.layersWithOutsidePointerEventsDisabled.size&&(P.body.style.pointerEvents=h)}}),[C,P,l,x]),(0,r.useEffect)((()=>()=>{C&&(x.layers.delete(C),x.layersWithOutsidePointerEventsDisabled.delete(C),E())}),[C,x]),(0,r.useEffect)((()=>{const e=()=>T({});return document.addEventListener(m,e),()=>document.removeEventListener(m,e)}),[]),(0,r.createElement)(p.sG.div,(0,o.A)({},b,{ref:R,style:{pointerEvents:I?L?"auto":"none":void 0,...e.style},onFocusCapture:(0,a.m)(e.onFocusCapture,N.onFocusCapture),onBlurCapture:(0,a.m)(e.onBlurCapture,N.onBlurCapture),onPointerDownCapture:(0,a.m)(e.onPointerDownCapture,_.onPointerDownCapture)}))}));function E(){const e=new CustomEvent(m);document.dispatchEvent(e)}function y(e,t,n,{discrete:o}){const r=n.originalEvent.target,l=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&r.addEventListener(e,t,{once:!0}),o?(0,p.hO)(r,l):r.dispatchEvent(l)}var b=n(61463);const x="focusScope.autoFocusOnMount",C="focusScope.autoFocusOnUnmount",S={bubbles:!1,cancelable:!0},P=(0,r.forwardRef)(((e,t)=>{const{loop:n=!1,trapped:l=!1,onMountAutoFocus:i,onUnmountAutoFocus:a,...s}=e,[u,d]=(0,r.useState)(null),v=(0,f.c)(i),m=(0,f.c)(a),h=(0,r.useRef)(null),g=(0,c.s)(t,(e=>d(e))),w=(0,r.useRef)({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;(0,r.useEffect)((()=>{if(l){function e(e){if(w.paused||!u)return;const t=e.target;u.contains(t)?h.current=t:A(h.current,{select:!0})}function t(e){if(w.paused||!u)return;const t=e.relatedTarget;null!==t&&(u.contains(t)||A(h.current,{select:!0}))}function n(e){const t=document.activeElement;for(const n of e)n.removedNodes.length>0&&(null!=u&&u.contains(t)||A(u))}document.addEventListener("focusin",e),document.addEventListener("focusout",t);const o=new MutationObserver(n);return u&&o.observe(u,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",e),document.removeEventListener("focusout",t),o.disconnect()}}}),[l,u,w.paused]),(0,r.useEffect)((()=>{if(u){O.add(w);const e=document.activeElement;if(!u.contains(e)){const t=new CustomEvent(x,S);u.addEventListener(x,v),u.dispatchEvent(t),t.defaultPrevented||(function(e,{select:t=!1}={}){const n=document.activeElement;for(const o of e)if(A(o,{select:t}),document.activeElement!==n)return}(T(u).filter((e=>"A"!==e.tagName)),{select:!0}),document.activeElement===e&&A(u))}return()=>{u.removeEventListener(x,v),setTimeout((()=>{const t=new CustomEvent(C,S);u.addEventListener(C,m),u.dispatchEvent(t),t.defaultPrevented||A(null!=e?e:document.body,{select:!0}),u.removeEventListener(C,m),O.remove(w)}),0)}}}),[u,v,m,w]);const E=(0,r.useCallback)((e=>{if(!n&&!l)return;if(w.paused)return;const t="Tab"===e.key&&!e.altKey&&!e.ctrlKey&&!e.metaKey,o=document.activeElement;if(t&&o){const t=e.currentTarget,[r,l]=function(e){const t=T(e);return[R(t,e),R(t.reverse(),e)]}(t);r&&l?e.shiftKey||o!==l?e.shiftKey&&o===r&&(e.preventDefault(),n&&A(l,{select:!0})):(e.preventDefault(),n&&A(r,{select:!0})):o===t&&e.preventDefault()}}),[n,l,w.paused]);return(0,r.createElement)(p.sG.div,(0,o.A)({tabIndex:-1},s,{ref:g,onKeyDown:E}))}));function T(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{const t="INPUT"===e.tagName&&"hidden"===e.type;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function R(e,t){for(const n of e)if(!D(n,{upTo:t}))return n}function D(e,{upTo:t}){if("hidden"===getComputedStyle(e).visibility)return!0;for(;e;){if(void 0!==t&&e===t)return!1;if("none"===getComputedStyle(e).display)return!0;e=e.parentElement}return!1}function A(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&function(e){return e instanceof HTMLInputElement&&"select"in e}(e)&&t&&e.select()}}const O=function(){let e=[];return{add(t){const n=e[0];t!==n&&(null==n||n.pause()),e=k(e,t),e.unshift(t)},remove(t){var n;e=k(e,t),null===(n=e[0])||void 0===n||n.resume()}}}();function k(e,t){const n=[...e],o=n.indexOf(t);return-1!==o&&n.splice(o,1),n}var I=n(18723),L=n(34743),_=n(52425),N=n(95361),M=(n(48771),n(88200)),H=n(31769);const B="Popper",[F,W]=(0,u.A)(B),[K,V]=F(B),U=(0,r.forwardRef)(((e,t)=>{const{__scopePopper:n,virtualRef:l,...i}=e,a=V("PopperAnchor",n),s=(0,r.useRef)(null),u=(0,c.s)(t,s);return(0,r.useEffect)((()=>{a.onAnchorChange((null==l?void 0:l.current)||s.current)})),l?null:(0,r.createElement)(p.sG.div,(0,o.A)({},i,{ref:u}))})),z="PopperContent",[G,$]=F(z),q=(0,r.forwardRef)(((e,t)=>{var n,l,i,a,s,u,d,v;const{__scopePopper:m,side:h="bottom",sideOffset:g=0,align:w="center",alignOffset:E=0,arrowPadding:y=0,collisionBoundary:b=[],collisionPadding:x=0,sticky:C="partial",hideWhenDetached:S=!1,avoidCollisions:P=!0,onPlaced:T,...R}=e,D=V(z,m),[A,O]=(0,r.useState)(null),k=(0,c.s)(t,(e=>O(e))),[I,B]=(0,r.useState)(null),F=(0,H.X)(I),W=null!==(n=null==F?void 0:F.width)&&void 0!==n?n:0,K=null!==(l=null==F?void 0:F.height)&&void 0!==l?l:0,U=h+("center"!==w?"-"+w:""),$="number"==typeof x?x:{top:0,right:0,bottom:0,left:0,...x},q=Array.isArray(b)?b:[b],Z=q.length>0,J={padding:$,boundary:q.filter(j),altBoundary:Z},{refs:Q,floatingStyles:ee,placement:te,isPositioned:ne,middlewareData:oe}=(0,L.we)({strategy:"fixed",placement:U,whileElementsMounted:_.ll,elements:{reference:D.anchor},middleware:[(0,N.cY)({mainAxis:g+K,alignmentAxis:E}),P&&(0,_.BN)({mainAxis:!0,crossAxis:!1,limiter:"partial"===C?(0,_.ER)():void 0,...J}),P&&(0,_.UU)({...J}),(0,_.Ej)({...J,apply:({elements:e,rects:t,availableWidth:n,availableHeight:o})=>{const{width:r,height:l}=t.reference,i=e.floating.style;i.setProperty("--radix-popper-available-width",`${n}px`),i.setProperty("--radix-popper-available-height",`${o}px`),i.setProperty("--radix-popper-anchor-width",`${r}px`),i.setProperty("--radix-popper-anchor-height",`${l}px`)}}),I&&(0,L.UE)({element:I,padding:y}),X({arrowWidth:W,arrowHeight:K}),S&&(0,_.jD)({strategy:"referenceHidden"})]}),[re,le]=Y(te),ie=(0,f.c)(T);(0,M.N)((()=>{ne&&(null==ie||ie())}),[ne,ie]);const ae=null===(i=oe.arrow)||void 0===i?void 0:i.x,se=null===(a=oe.arrow)||void 0===a?void 0:a.y,ce=0!==(null===(s=oe.arrow)||void 0===s?void 0:s.centerOffset),[ue,de]=(0,r.useState)();return(0,M.N)((()=>{A&&de(window.getComputedStyle(A).zIndex)}),[A]),(0,r.createElement)("div",{ref:Q.setFloating,"data-radix-popper-content-wrapper":"",style:{...ee,transform:ne?ee.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:ue,"--radix-popper-transform-origin":[null===(u=oe.transformOrigin)||void 0===u?void 0:u.x,null===(d=oe.transformOrigin)||void 0===d?void 0:d.y].join(" ")},dir:e.dir},(0,r.createElement)(G,{scope:m,placedSide:re,onArrowChange:B,arrowX:ae,arrowY:se,shouldHideArrow:ce},(0,r.createElement)(p.sG.div,(0,o.A)({"data-side":re,"data-align":le},R,{ref:k,style:{...R.style,animation:ne?void 0:"none",opacity:null!==(v=oe.hide)&&void 0!==v&&v.referenceHidden?0:void 0}}))))}));function j(e){return null!==e}const X=e=>({name:"transformOrigin",options:e,fn(t){var n,o,r,l,i;const{placement:a,rects:s,middlewareData:c}=t,u=0!==(null===(n=c.arrow)||void 0===n?void 0:n.centerOffset),d=u?0:e.arrowWidth,p=u?0:e.arrowHeight,[f,v]=Y(a),m={start:"0%",center:"50%",end:"100%"}[v],h=(null!==(o=null===(r=c.arrow)||void 0===r?void 0:r.x)&&void 0!==o?o:0)+d/2,g=(null!==(l=null===(i=c.arrow)||void 0===i?void 0:i.y)&&void 0!==l?l:0)+p/2;let w="",E="";return"bottom"===f?(w=u?m:`${h}px`,E=-p+"px"):"top"===f?(w=u?m:`${h}px`,E=`${s.floating.height+p}px`):"right"===f?(w=-p+"px",E=u?m:`${g}px`):"left"===f&&(w=`${s.floating.width+p}px`,E=u?m:`${g}px`),{data:{x:w,y:E}}}});function Y(e){const[t,n="center"]=e.split("-");return[t,n]}const Z=e=>{const{__scopePopper:t,children:n}=e,[o,l]=(0,r.useState)(null);return(0,r.createElement)(K,{scope:t,anchor:o,onAnchorChange:l},n)},J=U,Q=q;var ee=n(33362),te=n(81351),ne=n(85357);const oe=(0,r.forwardRef)(((e,t)=>(0,r.createElement)(p.sG.span,(0,o.A)({},e,{ref:t,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}}))));var re=n(58241),le=n(74099);const ie=[" ","Enter","ArrowUp","ArrowDown"],ae=[" ","Enter"],se="Select",[ce,ue,de]=(0,s.N)(se),[pe,fe]=(0,u.A)(se,[de,W]),ve=W(),[me,he]=pe(se),[ge,we]=pe(se),Ee=(0,r.forwardRef)(((e,t)=>{const{__scopeSelect:n,disabled:l=!1,...i}=e,s=ve(n),u=he("SelectTrigger",n),d=u.disabled||l,f=(0,c.s)(t,u.onTriggerChange),v=ue(n),[m,h,g]=je((e=>{const t=v().filter((e=>!e.disabled)),n=t.find((e=>e.value===u.value)),o=Xe(t,e,n);void 0!==o&&u.onValueChange(o.value)})),w=()=>{d||(u.onOpenChange(!0),g())};return(0,r.createElement)(J,(0,o.A)({asChild:!0},s),(0,r.createElement)(p.sG.button,(0,o.A)({type:"button",role:"combobox","aria-controls":u.contentId,"aria-expanded":u.open,"aria-required":u.required,"aria-autocomplete":"none",dir:u.dir,"data-state":u.open?"open":"closed",disabled:d,"data-disabled":d?"":void 0,"data-placeholder":void 0===u.value?"":void 0},i,{ref:f,onClick:(0,a.m)(i.onClick,(e=>{e.currentTarget.focus()})),onPointerDown:(0,a.m)(i.onPointerDown,(e=>{const t=e.target;t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId),0===e.button&&!1===e.ctrlKey&&(w(),u.triggerPointerDownPosRef.current={x:Math.round(e.pageX),y:Math.round(e.pageY)},e.preventDefault())})),onKeyDown:(0,a.m)(i.onKeyDown,(e=>{const t=""!==m.current;e.ctrlKey||e.altKey||e.metaKey||1!==e.key.length||h(e.key),t&&" "===e.key||ie.includes(e.key)&&(w(),e.preventDefault())}))})))})),ye=(0,r.forwardRef)(((e,t)=>{const{__scopeSelect:n,className:l,style:i,children:a,placeholder:s,...u}=e,d=he("SelectValue",n),{onValueNodeHasChildrenChange:f}=d,v=void 0!==a,m=(0,c.s)(t,d.onValueNodeChange);return(0,M.N)((()=>{f(v)}),[f,v]),(0,r.createElement)(p.sG.span,(0,o.A)({},u,{ref:m,style:{pointerEvents:"none"}}),void 0===d.value&&void 0!==s?s:a)})),be="SelectContent",xe=(0,r.forwardRef)(((e,t)=>{const n=he(be,e.__scopeSelect),[i,a]=(0,r.useState)();if((0,M.N)((()=>{a(new DocumentFragment)}),[]),!n.open){const t=i;return t?(0,l.createPortal)((0,r.createElement)(Se,{scope:e.__scopeSelect},(0,r.createElement)(ce.Slot,{scope:e.__scopeSelect},(0,r.createElement)("div",null,e.children))),t):null}return(0,r.createElement)(Te,(0,o.A)({},e,{ref:t}))})),Ce=10,[Se,Pe]=pe(be),Te=(0,r.forwardRef)(((e,t)=>{const{__scopeSelect:n,position:l="item-aligned",onCloseAutoFocus:i,onEscapeKeyDown:s,onPointerDownOutside:u,side:d,sideOffset:p,align:f,alignOffset:v,arrowPadding:m,collisionBoundary:h,collisionPadding:g,sticky:E,hideWhenDetached:y,avoidCollisions:x,...C}=e,S=he(be,n),[T,R]=(0,r.useState)(null),[D,A]=(0,r.useState)(null),O=(0,c.s)(t,(e=>R(e))),[k,I]=(0,r.useState)(null),[L,_]=(0,r.useState)(null),N=ue(n),[M,H]=(0,r.useState)(!1),B=(0,r.useRef)(!1);(0,r.useEffect)((()=>{if(T)return(0,re.Eq)(T)}),[T]),(0,b.Oh)();const F=(0,r.useCallback)((e=>{const[t,...n]=N().map((e=>e.ref.current)),[o]=n.slice(-1),r=document.activeElement;for(const n of e){if(n===r)return;if(null==n||n.scrollIntoView({block:"nearest"}),n===t&&D&&(D.scrollTop=0),n===o&&D&&(D.scrollTop=D.scrollHeight),null==n||n.focus(),document.activeElement!==r)return}}),[N,D]),W=(0,r.useCallback)((()=>F([k,T])),[F,k,T]);(0,r.useEffect)((()=>{M&&W()}),[M,W]);const{onOpenChange:K,triggerPointerDownPosRef:V}=S;(0,r.useEffect)((()=>{if(T){let e={x:0,y:0};const t=t=>{var n,o,r,l;e={x:Math.abs(Math.round(t.pageX)-(null!==(n=null===(o=V.current)||void 0===o?void 0:o.x)&&void 0!==n?n:0)),y:Math.abs(Math.round(t.pageY)-(null!==(r=null===(l=V.current)||void 0===l?void 0:l.y)&&void 0!==r?r:0))}},n=n=>{e.x<=10&&e.y<=10?n.preventDefault():T.contains(n.target)||K(!1),document.removeEventListener("pointermove",t),V.current=null};return null!==V.current&&(document.addEventListener("pointermove",t),document.addEventListener("pointerup",n,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",t),document.removeEventListener("pointerup",n,{capture:!0})}}}),[T,K,V]),(0,r.useEffect)((()=>{const e=()=>K(!1);return window.addEventListener("blur",e),window.addEventListener("resize",e),()=>{window.removeEventListener("blur",e),window.removeEventListener("resize",e)}}),[K]);const[U,z]=je((e=>{const t=N().filter((e=>!e.disabled)),n=t.find((e=>e.ref.current===document.activeElement)),o=Xe(t,e,n);o&&setTimeout((()=>o.ref.current.focus()))})),G=(0,r.useCallback)(((e,t,n)=>{const o=!B.current&&!n;(void 0!==S.value&&S.value===t||o)&&(I(e),o&&(B.current=!0))}),[S.value]),$=(0,r.useCallback)((()=>null==T?void 0:T.focus()),[T]),q=(0,r.useCallback)(((e,t,n)=>{const o=!B.current&&!n;(void 0!==S.value&&S.value===t||o)&&_(e)}),[S.value]),j="popper"===l?De:Re,X=j===De?{side:d,sideOffset:p,align:f,alignOffset:v,arrowPadding:m,collisionBoundary:h,collisionPadding:g,sticky:E,hideWhenDetached:y,avoidCollisions:x}:{};return(0,r.createElement)(Se,{scope:n,content:T,viewport:D,onViewportChange:A,itemRefCallback:G,selectedItem:k,onItemLeave:$,itemTextRefCallback:q,focusSelectedItem:W,selectedItemText:L,position:l,isPositioned:M,searchRef:U},(0,r.createElement)(le.A,{as:ee.DX,allowPinchZoom:!0},(0,r.createElement)(P,{asChild:!0,trapped:S.open,onMountAutoFocus:e=>{e.preventDefault()},onUnmountAutoFocus:(0,a.m)(i,(e=>{var t;null===(t=S.trigger)||void 0===t||t.focus({preventScroll:!0}),e.preventDefault()}))},(0,r.createElement)(w,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:s,onPointerDownOutside:u,onFocusOutside:e=>e.preventDefault(),onDismiss:()=>S.onOpenChange(!1)},(0,r.createElement)(j,(0,o.A)({role:"listbox",id:S.contentId,"data-state":S.open?"open":"closed",dir:S.dir,onContextMenu:e=>e.preventDefault()},C,X,{onPlaced:()=>H(!0),ref:O,style:{display:"flex",flexDirection:"column",outline:"none",...C.style},onKeyDown:(0,a.m)(C.onKeyDown,(e=>{const t=e.ctrlKey||e.altKey||e.metaKey;if("Tab"===e.key&&e.preventDefault(),t||1!==e.key.length||z(e.key),["ArrowUp","ArrowDown","Home","End"].includes(e.key)){let t=N().filter((e=>!e.disabled)).map((e=>e.ref.current));if(["ArrowUp","End"].includes(e.key)&&(t=t.slice().reverse()),["ArrowUp","ArrowDown"].includes(e.key)){const n=e.target,o=t.indexOf(n);t=t.slice(o+1)}setTimeout((()=>F(t))),e.preventDefault()}}))}))))))})),Re=(0,r.forwardRef)(((e,t)=>{const{__scopeSelect:n,onPlaced:l,...a}=e,s=he(be,n),u=Pe(be,n),[d,f]=(0,r.useState)(null),[v,m]=(0,r.useState)(null),h=(0,c.s)(t,(e=>m(e))),g=ue(n),w=(0,r.useRef)(!1),E=(0,r.useRef)(!0),{viewport:y,selectedItem:b,selectedItemText:x,focusSelectedItem:C}=u,S=(0,r.useCallback)((()=>{if(s.trigger&&s.valueNode&&d&&v&&y&&b&&x){const e=s.trigger.getBoundingClientRect(),t=v.getBoundingClientRect(),n=s.valueNode.getBoundingClientRect(),o=x.getBoundingClientRect();if("rtl"!==s.dir){const r=o.left-t.left,l=n.left-r,a=e.left-l,s=e.width+a,c=Math.max(s,t.width),u=window.innerWidth-Ce,p=i(l,[Ce,u-c]);d.style.minWidth=s+"px",d.style.left=p+"px"}else{const r=t.right-o.right,l=window.innerWidth-n.right-r,a=window.innerWidth-e.right-l,s=e.width+a,c=Math.max(s,t.width),u=window.innerWidth-Ce,p=i(l,[Ce,u-c]);d.style.minWidth=s+"px",d.style.right=p+"px"}const r=g(),a=window.innerHeight-2*Ce,c=y.scrollHeight,u=window.getComputedStyle(v),p=parseInt(u.borderTopWidth,10),f=parseInt(u.paddingTop,10),m=parseInt(u.borderBottomWidth,10),h=p+f+c+parseInt(u.paddingBottom,10)+m,E=Math.min(5*b.offsetHeight,h),C=window.getComputedStyle(y),S=parseInt(C.paddingTop,10),P=parseInt(C.paddingBottom,10),T=e.top+e.height/2-Ce,R=a-T,D=b.offsetHeight/2,A=p+f+(b.offsetTop+D),O=h-A;if(A<=T){const e=b===r[r.length-1].ref.current;d.style.bottom="0px";const t=v.clientHeight-y.offsetTop-y.offsetHeight,n=A+Math.max(R,D+(e?P:0)+t+m);d.style.height=n+"px"}else{const e=b===r[0].ref.current;d.style.top="0px";const t=Math.max(T,p+y.offsetTop+(e?S:0)+D)+O;d.style.height=t+"px",y.scrollTop=A-T+y.offsetTop}d.style.margin=`${Ce}px 0`,d.style.minHeight=E+"px",d.style.maxHeight=a+"px",null==l||l(),requestAnimationFrame((()=>w.current=!0))}}),[g,s.trigger,s.valueNode,d,v,y,b,x,s.dir,l]);(0,M.N)((()=>S()),[S]);const[P,T]=(0,r.useState)();(0,M.N)((()=>{v&&T(window.getComputedStyle(v).zIndex)}),[v]);const R=(0,r.useCallback)((e=>{e&&!0===E.current&&(S(),null==C||C(),E.current=!1)}),[S,C]);return(0,r.createElement)(Ae,{scope:n,contentWrapper:d,shouldExpandOnScrollRef:w,onScrollButtonChange:R},(0,r.createElement)("div",{ref:f,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:P}},(0,r.createElement)(p.sG.div,(0,o.A)({},a,{ref:h,style:{boxSizing:"border-box",maxHeight:"100%",...a.style}}))))})),De=(0,r.forwardRef)(((e,t)=>{const{__scopeSelect:n,align:l="start",collisionPadding:i=Ce,...a}=e,s=ve(n);return(0,r.createElement)(Q,(0,o.A)({},s,a,{ref:t,align:l,collisionPadding:i,style:{boxSizing:"border-box",...a.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}}))})),[Ae,Oe]=pe(be,{}),ke="SelectViewport",Ie=(0,r.forwardRef)(((e,t)=>{const{__scopeSelect:n,...l}=e,i=Pe(ke,n),s=Oe(ke,n),u=(0,c.s)(t,i.onViewportChange),d=(0,r.useRef)(0);return(0,r.createElement)(r.Fragment,null,(0,r.createElement)("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"}}),(0,r.createElement)(ce.Slot,{scope:n},(0,r.createElement)(p.sG.div,(0,o.A)({"data-radix-select-viewport":"",role:"presentation"},l,{ref:u,style:{position:"relative",flex:1,overflow:"auto",...l.style},onScroll:(0,a.m)(l.onScroll,(e=>{const t=e.currentTarget,{contentWrapper:n,shouldExpandOnScrollRef:o}=s;if(null!=o&&o.current&&n){const e=Math.abs(d.current-t.scrollTop);if(e>0){const o=window.innerHeight-2*Ce,r=parseFloat(n.style.minHeight),l=parseFloat(n.style.height),i=Math.max(r,l);if(i<o){const r=i+e,l=Math.min(o,r),a=r-l;n.style.height=l+"px","0px"===n.style.bottom&&(t.scrollTop=a>0?a:0,n.style.justifyContent="flex-end")}}}d.current=t.scrollTop}))}))))})),[Le,_e]=pe("SelectGroup"),Ne=(0,r.forwardRef)(((e,t)=>{const{__scopeSelect:n,...l}=e,i=(0,I.B)();return(0,r.createElement)(Le,{scope:n,id:i},(0,r.createElement)(p.sG.div,(0,o.A)({role:"group","aria-labelledby":i},l,{ref:t})))})),Me="SelectItem",[He,Be]=pe(Me),Fe=(0,r.forwardRef)(((e,t)=>{const{__scopeSelect:n,value:l,disabled:i=!1,textValue:s,...u}=e,d=he(Me,n),f=Pe(Me,n),v=d.value===l,[m,h]=(0,r.useState)(null!=s?s:""),[g,w]=(0,r.useState)(!1),E=(0,c.s)(t,(e=>{var t;return null===(t=f.itemRefCallback)||void 0===t?void 0:t.call(f,e,l,i)})),y=(0,I.B)(),b=()=>{i||(d.onValueChange(l),d.onOpenChange(!1))};return(0,r.createElement)(He,{scope:n,value:l,disabled:i,textId:y,isSelected:v,onItemTextChange:(0,r.useCallback)((e=>{h((t=>{var n;return t||(null!==(n=null==e?void 0:e.textContent)&&void 0!==n?n:"").trim()}))}),[])},(0,r.createElement)(ce.ItemSlot,{scope:n,value:l,disabled:i,textValue:m},(0,r.createElement)(p.sG.div,(0,o.A)({role:"option","aria-labelledby":y,"data-highlighted":g?"":void 0,"aria-selected":v&&g,"data-state":v?"checked":"unchecked","aria-disabled":i||void 0,"data-disabled":i?"":void 0,tabIndex:i?void 0:-1},u,{ref:E,onFocus:(0,a.m)(u.onFocus,(()=>w(!0))),onBlur:(0,a.m)(u.onBlur,(()=>w(!1))),onPointerUp:(0,a.m)(u.onPointerUp,b),onPointerMove:(0,a.m)(u.onPointerMove,(e=>{var t;i?null===(t=f.onItemLeave)||void 0===t||t.call(f):e.currentTarget.focus({preventScroll:!0})})),onPointerLeave:(0,a.m)(u.onPointerLeave,(e=>{var t;e.currentTarget===document.activeElement&&(null===(t=f.onItemLeave)||void 0===t||t.call(f))})),onKeyDown:(0,a.m)(u.onKeyDown,(e=>{var t;""!==(null===(t=f.searchRef)||void 0===t?void 0:t.current)&&" "===e.key||(ae.includes(e.key)&&b()," "===e.key&&e.preventDefault())}))}))))})),We="SelectItemText",Ke=(0,r.forwardRef)(((e,t)=>{const{__scopeSelect:n,className:i,style:a,...s}=e,u=he(We,n),d=Pe(We,n),f=Be(We,n),v=we(We,n),[m,h]=(0,r.useState)(null),g=(0,c.s)(t,(e=>h(e)),f.onItemTextChange,(e=>{var t;return null===(t=d.itemTextRefCallback)||void 0===t?void 0:t.call(d,e,f.value,f.disabled)})),w=null==m?void 0:m.textContent,E=(0,r.useMemo)((()=>(0,r.createElement)("option",{key:f.value,value:f.value,disabled:f.disabled},w)),[f.disabled,f.value,w]),{onNativeOptionAdd:y,onNativeOptionRemove:b}=v;return(0,M.N)((()=>(y(E),()=>b(E))),[y,b,E]),(0,r.createElement)(r.Fragment,null,(0,r.createElement)(p.sG.span,(0,o.A)({id:f.textId},s,{ref:g})),f.isSelected&&u.valueNode&&!u.valueNodeHasChildren?(0,l.createPortal)(s.children,u.valueNode):null)})),Ve="SelectScrollUpButton",Ue=(0,r.forwardRef)(((e,t)=>{const n=Pe(Ve,e.__scopeSelect),l=Oe(Ve,e.__scopeSelect),[i,a]=(0,r.useState)(!1),s=(0,c.s)(t,l.onScrollButtonChange);return(0,M.N)((()=>{if(n.viewport&&n.isPositioned){const e=n.viewport;function t(){const t=e.scrollTop>0;a(t)}return t(),e.addEventListener("scroll",t),()=>e.removeEventListener("scroll",t)}}),[n.viewport,n.isPositioned]),i?(0,r.createElement)($e,(0,o.A)({},e,{ref:s,onAutoScroll:()=>{const{viewport:e,selectedItem:t}=n;e&&t&&(e.scrollTop=e.scrollTop-t.offsetHeight)}})):null})),ze="SelectScrollDownButton",Ge=(0,r.forwardRef)(((e,t)=>{const n=Pe(ze,e.__scopeSelect),l=Oe(ze,e.__scopeSelect),[i,a]=(0,r.useState)(!1),s=(0,c.s)(t,l.onScrollButtonChange);return(0,M.N)((()=>{if(n.viewport&&n.isPositioned){const e=n.viewport;function t(){const t=e.scrollHeight-e.clientHeight,n=Math.ceil(e.scrollTop)<t;a(n)}return t(),e.addEventListener("scroll",t),()=>e.removeEventListener("scroll",t)}}),[n.viewport,n.isPositioned]),i?(0,r.createElement)($e,(0,o.A)({},e,{ref:s,onAutoScroll:()=>{const{viewport:e,selectedItem:t}=n;e&&t&&(e.scrollTop=e.scrollTop+t.offsetHeight)}})):null})),$e=(0,r.forwardRef)(((e,t)=>{const{__scopeSelect:n,onAutoScroll:l,...i}=e,s=Pe("SelectScrollButton",n),c=(0,r.useRef)(null),u=ue(n),d=(0,r.useCallback)((()=>{null!==c.current&&(window.clearInterval(c.current),c.current=null)}),[]);return(0,r.useEffect)((()=>()=>d()),[d]),(0,M.N)((()=>{var e;const t=u().find((e=>e.ref.current===document.activeElement));null==t||null===(e=t.ref.current)||void 0===e||e.scrollIntoView({block:"nearest"})}),[u]),(0,r.createElement)(p.sG.div,(0,o.A)({"aria-hidden":!0},i,{ref:t,style:{flexShrink:0,...i.style},onPointerDown:(0,a.m)(i.onPointerDown,(()=>{null===c.current&&(c.current=window.setInterval(l,50))})),onPointerMove:(0,a.m)(i.onPointerMove,(()=>{var e;null===(e=s.onItemLeave)||void 0===e||e.call(s),null===c.current&&(c.current=window.setInterval(l,50))})),onPointerLeave:(0,a.m)(i.onPointerLeave,(()=>{d()}))}))})),qe=(0,r.forwardRef)(((e,t)=>{const{value:n,...l}=e,i=(0,r.useRef)(null),a=(0,c.s)(t,i),s=(0,ne.Z)(n);return(0,r.useEffect)((()=>{const e=i.current,t=window.HTMLSelectElement.prototype,o=Object.getOwnPropertyDescriptor(t,"value").set;if(s!==n&&o){const t=new Event("change",{bubbles:!0});o.call(e,n),e.dispatchEvent(t)}}),[s,n]),(0,r.createElement)(oe,{asChild:!0},(0,r.createElement)("select",(0,o.A)({},l,{ref:a,defaultValue:n})))}));function je(e){const t=(0,f.c)(e),n=(0,r.useRef)(""),o=(0,r.useRef)(0),l=(0,r.useCallback)((e=>{const r=n.current+e;t(r),function e(t){n.current=t,window.clearTimeout(o.current),""!==t&&(o.current=window.setTimeout((()=>e("")),1e3))}(r)}),[t]),i=(0,r.useCallback)((()=>{n.current="",window.clearTimeout(o.current)}),[]);return(0,r.useEffect)((()=>()=>window.clearTimeout(o.current)),[]),[n,l,i]}function Xe(e,t,n){const o=t.length>1&&Array.from(t).every((e=>e===t[0]))?t[0]:t,r=n?e.indexOf(n):-1;let l=(i=e,a=Math.max(r,0),i.map(((e,t)=>i[(a+t)%i.length])));var i,a;1===o.length&&(l=l.filter((e=>e!==n)));const s=l.find((e=>e.textValue.toLowerCase().startsWith(o.toLowerCase())));return s!==n?s:void 0}qe.displayName="BubbleSelect";const Ye=e=>{const{__scopeSelect:t,children:n,open:o,defaultOpen:l,onOpenChange:i,value:a,defaultValue:s,onValueChange:c,dir:u,name:p,autoComplete:f,disabled:v,required:m}=e,h=ve(t),[g,w]=(0,r.useState)(null),[E,y]=(0,r.useState)(null),[b,x]=(0,r.useState)(!1),C=(0,d.jH)(u),[S=!1,P]=(0,te.i)({prop:o,defaultProp:l,onChange:i}),[T,R]=(0,te.i)({prop:a,defaultProp:s,onChange:c}),D=(0,r.useRef)(null),A=!g||Boolean(g.closest("form")),[O,k]=(0,r.useState)(new Set),L=Array.from(O).map((e=>e.props.value)).join(";");return(0,r.createElement)(Z,h,(0,r.createElement)(me,{required:m,scope:t,trigger:g,onTriggerChange:w,valueNode:E,onValueNodeChange:y,valueNodeHasChildren:b,onValueNodeHasChildrenChange:x,contentId:(0,I.B)(),value:T,onValueChange:R,open:S,onOpenChange:P,dir:C,triggerPointerDownPosRef:D,disabled:v},(0,r.createElement)(ce.Provider,{scope:t},(0,r.createElement)(ge,{scope:e.__scopeSelect,onNativeOptionAdd:(0,r.useCallback)((e=>{k((t=>new Set(t).add(e)))}),[]),onNativeOptionRemove:(0,r.useCallback)((e=>{k((t=>{const n=new Set(t);return n.delete(e),n}))}),[])},n)),A?(0,r.createElement)(qe,{key:L,"aria-hidden":!0,required:m,tabIndex:-1,name:p,autoComplete:f,value:T,onChange:e=>R(e.target.value),disabled:v},void 0===T?(0,r.createElement)("option",{value:""}):null,Array.from(O)):null))},Ze=Ee,Je=ye,Qe=xe,et=Ie,tt=Ne,nt=Fe,ot=Ke,rt=Ue,lt=Ge},85357:(e,t,n)=>{n.d(t,{Z:()=>r});var o=n(51609);function r(e){const t=(0,o.useRef)({value:e,previous:e});return(0,o.useMemo)((()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous)),[e])}}}]);