Files

1 line
29 KiB
JavaScript
Raw Permalink Normal View History

2025-12-10 12:17:30 -05:00
"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(),()