1"use strict";(globalThis.webpackChunkarcadis_optimizely_web_design=globalThis.webpackChunkarcadis_optimizely_web_design||[]).push([[602],{1602(e,t,n){n.d(t,{Kq:()=>J,LM:()=>Q,bL:()=>ee,hE:()=>te,rc:()=>ne});var r=n(758),o=n(8143),s=n(7674),a=n(5313),i=n(5519),c=n(5540),u=n(1157),d=n(1562),l=n(1315),p=n(8656),f=n(5452),w=n(5822),v=n(9166),m=n(9241),y=n(6070),T="ToastProvider",[x,E,h]=(0,i.N)("Toast"),[g,b]=(0,c.A)("Toast",[h]),[C,P]=g(T),R=e=>{const{__scopeToast:t,label:n="Notification",duration:o=5e3,swipeDirection:s="right",swipeThreshold:a=50,announcerContainer:i,children:c}=e,[u,d]=r.useState(null),[l,p]=r.useState(0),f=r.useRef(!1),w=r.useRef(!1);return n.trim()||console.error(`Invalid prop \`label\` supplied to \`${T}\`. Expected non-empty \`string\`.`),(0,y.jsx)(x.Provider,{scope:t,children:(0,y.jsx)(C,{scope:t,label:n,duration:o,swipeDirection:s,swipeThreshold:a,toastCount:l,viewport:u,onViewportChange:d,onToastAdd:r.useCallback(()=>p(e=>e+1),[]),onToastRemove:r.useCallback(()=>p(e=>e-1),[]),isFocusedToastEscapeKeyDownRef:f,isClosePausedRef:w,announcerContainer:i,children:c})})};R.displayName=T;var _="ToastViewport",L=["F8"],D="toast.viewportPause",j="toast.viewportResume",S=r.forwardRef((e,t)=>{const{__scopeToast:n,hotkey:o=L,label:s="Notifications ({hotkey})",...i}=e,c=P(_,n),d=E(n),l=r.useRef(null),f=r.useRef(null),w=r.useRef(null),v=r.useRef(null),m=(0,a.s)(t,v,c.onViewportChange),T=o.join("+").replace(/Key/g,"").replace(/Digit/g,""),h=c.toastCount>0;r.useEffect(()=>{const e=e=>{0!==o.length&&o.every(t=>e[t]||e.code===t)&&v.current?.focus()};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)},[o]),r.useEffect(()=>{const e=l.current,t=v.current;if(h&&e&&t){const n=()=>
1{if(!c.isClosePausedRef.current){const e=new CustomEvent(D);t.dispatchEvent(e),c.isClosePausedRef.current=!0}},r=()=>{if(c.isClosePausedRef.current){const e=new CustomEvent(j);t.dispatchEvent(e),c.isClosePausedRef.current=!1}},o=t=>{!e.contains(t.relatedTarget)&&r()},s=()=>{e.contains(document.activeElement)||r()};return e.addEventListener("focusin",n),e.addEventListener("focusout",o),e.addEventListener("pointermove",n),e.addEventListener("pointerleave",s),window.addEventListener("blur",n),window.addEventListener("focus",r),()=>{e.removeEventListener("focusin",n),e.removeEventListener("focusout",o),e.removeEventListener("pointermove",n),e.removeEventListener("pointerleave",s),window.removeEventListener("blur",n),window.removeEventListener("focus",r)}}},[h,c.isClosePausedRef]);const g=r.useCallback(({tabbingDirection:e})=>{const t=d().map(t=>{const n=t.ref.current,r=[n,...B(n)];return"forwards"===e?r:r.reverse()});return("forwards"===e?t.reverse():t).flat()},[d]);return r.useEffect(()=>{const e=v.current;if(e){const t=t=>{const n=t.altKey||t.ctrlKey||t.metaKey;if("Tab"===t.key&&!n){const n=document.activeElement,r=t.shiftKey;if(t.target===e&&r)return void f.current?.focus();const o=g({tabbingDirection:r?"backwards":"forwards"}),s=o.findIndex(e=>e===n);Z(o.slice(s+1))?t.preventDefault():r?f.current?.focus():w.current?.focus()}};return e.addEventListener("keydown",t),()=>e.removeEventListener("keydown",t)}},[d,g]),(0,y.jsxs)(u.lg,{ref:l,role:"region","aria-label":s.replace("{hotkey}",T),tabIndex:-1,style:{pointerEvents:h?void 0:"none"},children:[h&&(0,y.jsx)(K,{ref:f,onFocusFromOutsideViewport:()=>{Z(g({tabbingDirection:"forwards"}))}}),(0,y.jsx)(x.Slot,{scope:n,children:(0,y.jsx)(p.sG.ol,{tabIndex:-1,...i,ref:m})}),h&&(0,y.jsx)(K,{ref:w,onFocusFromOutsideViewport:()=>{Z(g({tabbingDirection:"backwards"}))}})]})});S.displayName=_;var F="ToastFocusProxy",K=r.forwardRef((e,t)=>{const{__scopeToast:n,onFocusFromOutsideViewport:r,...o}=e,s=P(F,n);return(0,y.jsx)(m.s6,{tabIndex:0,...o,ref:t,style:{position:"fixed"},onFocus:e=>{const t=e.relatedTarget;!s.viewport?.contains(t)&&r()}})});K.displayName=F;var N="Toast",k=r.forwardRef((e,t)=>{const{forceMount:n,open:r,defaultOpen:o,onOpenChange:a,...i}=e,[c,u]=(0,w.i)({prop:r,defaultProp:o??!0,onChange:a,caller:N});return(0,y.jsx)(l.C,{present:n||c,children:(0,y.jsx)(M,{open:c,...i,ref:t,onClose:()=>u(!1),onPause:(0,f.c)(e.onPause),onResume:(0,f.c)(e.onResume),onSwipeStart:(0,s.mK)(e.onSwipeStart,e=>{e.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:(0,s.mK)(e.onSwipeMove,e=>{const{x:t,y:n}=e.detail.delta;e.currentTarget.setAttribute("data-swipe","move"),e.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${t}px`),e.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${n}px`)}
1),onSwipeCancel:(0,s.mK)(e.onSwipeCancel,e=>{e.currentTarget.setAttribute("data-swipe","cancel"),e.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),e.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),e.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),e.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:(0,s.mK)(e.onSwipeEnd,e=>{const{x:t,y:n}=e.detail.delta;e.currentTarget.setAttribute("data-swipe","end"),e.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),e.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),e.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${t}px`),e.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${n}px`),u(!1)})})})});k.displayName=N;var[A,I]=g(N,{onClose(){}}),M=r.forwardRef((e,t)=>{const{__scopeToast:n,type:i="foreground",duration:c,open:d,onClose:l,onEscapeKeyDown:w,onPause:v,onResume:m,onSwipeStart:T,onSwipeMove:E,onSwipeCancel:h,onSwipeEnd:g,...b}=e,C=P(N,n),[R,_]=r.useState(null),L=(0,a.s)(t,e=>_(e)),S=r.useRef(null),F=r.useRef(null),K=c||C.duration,k=r.useRef(0),I=r.useRef(K),M=r.useRef(0),{onToastAdd:G,onToastRemove:V}=C,$=(0,f.c)(()=>{const e=R?.contains(document.activeElement);e&&C.viewport?.focus(),l()}),q=r.useCallback(e=>{e&&e!==1/0&&(window.clearTimeout(M.current),k.current=(new Date).getTime(),M.current=window.setTimeout($,e))},[$]);r.useEffect(()=>{const e=C.viewport;if(e){const t=()=>{q(I.current),m?.()},n=()=>{const e=(new Date).getTime()-k.current;I.current=I.current-e,window.clearTimeout(M.current),v?.()};return e.addEventListener(D,n),e.addEventListener(j,t),()=>{e.removeEventListener(D,n),e.removeEventListener(j,t)}}},[C.viewport,K,v,m,q]),r.useEffect(()=>{d&&!C.isClosePausedRef.current&&q(K)},[d,K,C.isClosePausedRef,q]),r.useEffect(()=>(G(),()=>V()),[G,V]);const U=r.useMemo(()=>R?H(R):null,[R]);return C.viewport?(0,y.jsxs)(y.Fragment,{children:[U&&(0,y.jsx)(O,{__scopeToast:n,role:"status","aria-live":"foreground"===i?"assertive":"polite",children:U}),(0,y.jsx)(A,{scope:n,onClose:$,children:o.createPortal((0,y.jsx)(x.ItemSlot,{scope:n,children:(0,y.jsx)(u.bL,{asChild:!0,onEscapeKeyDown:(0,s.mK)(w,()=>{C.isFocusedToastEscapeKeyDownRef.current||$(),C.isFocusedToastEscapeKeyDownRef.current=!1}),children:(0,y.jsx)(p.sG.li,{tabIndex:0,"data-state":d?"open":"closed","data-swipe-direction":C.swipeDirection,...b,ref:L,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:(0,s.mK)(e.onKeyDown,e=>{"Escape"===e.key&&(w?.(e.nativeEvent),e.nativeEvent.defaultPrevented||(C.isFocusedToastEscapeKeyDownRef.current=!0,$()))}),onPointerDown:(0,s.mK)(e.onPointerDown,e=>{0===e.button&&(S.current={x:e.clientX,y:e.clientY})}),onPointerMove:(0,s.mK)(e.onPointerMove,e=>{if(!S.current)return;const t=e.clientX-S.current.x,n=e.clientY-S.current.y,r=Boolean(F.current),o=["left","right"].includes(C.swipeDirection),s=["left","up"].includes(C.swipeDirection)?Math.min:Math.max,a=o?s(0,t):0,i=o?0:s(0,n),c="touch"===e.pointerType?10:2,u={x:a,y:i},d={originalEvent:e,delta:u};r?(F.current=u,W("toast.swipeMove",E,d,{discrete:!1})):Y(u,C.swipeDirection,c)?(F.current=u,W("toast.swipeStart",T,d,{discrete:!1}),e.target.setPointerCapture(e.pointerId)):(Math.abs(t)>c||Math.abs(n)>c)&&(S.current=null)}),onPointerUp:(0,s.mK)(e.onPointerUp,e=>{const t=F.current,n=e.target;if(n.hasPointerCapture(e.pointerId)&&n.releasePointerCapture(e.pointerId),F.current=null,S.current=null,t){const n=e.currentTarget,r={originalEvent:e,delta:t};Y(t,C.swipeDirection,C.swipeThreshold)?W("toast.swipeEnd",g,r,{discrete:!0}):W("toast.swipeCancel",h,r,{discrete:!0}),n.addEventListener("click",e=>e.preventDefault(),{once:!0})}})})})}),C.viewport)})]}):null}),O=e=>{const{__scopeToast:t,children:n,...o}=e,s=P(N,t),[a,i]=r.useState(!1),[c,u]=r.useState(!1);return function(e=()=>{}){const t=(0,f.c)(e);(0,v.N)(()=>{let e=0,n=0;return e=window.requestAnimationFrame(()=>n=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(e),window.cancelAnimationFrame(n)}},[t])}(()=>i(!0)),r.useEffect(()=>{const e=window.setTimeout(()=>u(!0),1e3);return()=>window.clearTimeout(e)},[]),c?null:(0,y.jsx)(d.Z,{asChild:!0,container:s.announcerContainer||void 0,children:(0,y.jsx)(m.s6,{...o,children:a&&(0,y.jsxs)(y.Fragment,{children:[s.label," ",n]})})})},G=r.forwardRef((e,t)=>
1{const{__scopeToast:n,...r}=e;return(0,y.jsx)(p.sG.div,{...r,ref:t})});G.displayName="ToastTitle";var V=r.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return(0,y.jsx)(p.sG.div,{...r,ref:t})});V.displayName="ToastDescription";var $="ToastAction",q=r.forwardRef((e,t)=>{const{altText:n,...r}=e;return n.trim()?(0,y.jsx)(z,{altText:n,asChild:!0,children:(0,y.jsx)(X,{...r,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${$}\`. Expected non-empty \`string\`.`),null)});q.displayName=$;var U="ToastClose",X=r.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e,o=I(U,n);return(0,y.jsx)(z,{asChild:!0,children:(0,y.jsx)(p.sG.button,{type:"button",...r,ref:t,onClick:(0,s.mK)(e.onClick,o.onClose)})})});X.displayName=U;var z=r.forwardRef((e,t)=>{const{__scopeToast:n,altText:r,...o}=e;return(0,y.jsx)(p.sG.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":r||void 0,...o,ref:t})});function H(e){const t=[];return Array.from(e.childNodes).forEach(e=>{if(e.nodeType===e.TEXT_NODE&&e.textContent&&t.push(e.textContent),function(e){return e.nodeType===e.ELEMENT_NODE}(e)){const n=e.ariaHidden||e.hidden||"none"===e.style.display,r=""===e.dataset.radixToastAnnounceExclude;if(!n)if(r){const n=e.dataset.radixToastAnnounceAlt;n&&t.push(n)}else t.push(...H(e))}}),t}function W(e,t,n,{discrete:r}){const o=n.originalEvent.currentTarget,s=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?(0,p.hO)(o,s):o.dispatchEvent(s)}var Y=(e,t,n=0)=>{const r=Math.abs(e.x),o=Math.abs(e.y),s=r>o;return"left"===t||"right"===t?s&&r>n:!s&&o>n};function B(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 Z(e){const t=document.activeElement;return e.some(e=>e===t||(e.focus(),document.activeElement!==t))}var J=R,Q=S,ee=k,te=G,ne=q}}]); 2//# sourceMappingURL=602.e16a7785d5cb46d7e775.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.