-
Notifications
You must be signed in to change notification settings - Fork 0
/
285.538aa222.iframe.bundle.js
1 lines (1 loc) · 28.4 KB
/
285.538aa222.iframe.bundle.js
1
"use strict";(self.webpackChunkwww=self.webpackChunkwww||[]).push([[285],{"../../node_modules/@radix-ui/react-focus-guards/dist/index.mjs":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{EW:()=>$3db38b7d1fb3fe6a$export$b7ece24a22aeda8c});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("../../node_modules/react/index.js");let $3db38b7d1fb3fe6a$var$count=0;function $3db38b7d1fb3fe6a$export$b7ece24a22aeda8c(){(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)((()=>{var _edgeGuards$,_edgeGuards$2;const edgeGuards=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",null!==(_edgeGuards$=edgeGuards[0])&&void 0!==_edgeGuards$?_edgeGuards$:$3db38b7d1fb3fe6a$var$createFocusGuard()),document.body.insertAdjacentElement("beforeend",null!==(_edgeGuards$2=edgeGuards[1])&&void 0!==_edgeGuards$2?_edgeGuards$2:$3db38b7d1fb3fe6a$var$createFocusGuard()),$3db38b7d1fb3fe6a$var$count++,()=>{1===$3db38b7d1fb3fe6a$var$count&&document.querySelectorAll("[data-radix-focus-guard]").forEach((node=>node.remove())),$3db38b7d1fb3fe6a$var$count--}}),[])}function $3db38b7d1fb3fe6a$var$createFocusGuard(){const element=document.createElement("span");return element.setAttribute("data-radix-focus-guard",""),element.tabIndex=0,element.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",element}},"../../node_modules/@radix-ui/react-focus-scope/dist/index.mjs":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{M:()=>$d3863c46a17e8a28$export$20e40289641fbbb6});var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("../../node_modules/@babel/runtime/helpers/esm/extends.js"),react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("../../node_modules/react/index.js"),_radix_ui_react_compose_refs__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("../../node_modules/@radix-ui/react-compose-refs/dist/index.mjs"),_radix_ui_react_primitive__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("../../node_modules/@radix-ui/react-primitive/dist/index.mjs"),_radix_ui_react_use_callback_ref__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("../../node_modules/@radix-ui/react-use-callback-ref/dist/index.mjs");const $d3863c46a17e8a28$var$EVENT_OPTIONS={bubbles:!1,cancelable:!0},$d3863c46a17e8a28$export$20e40289641fbbb6=(0,react__WEBPACK_IMPORTED_MODULE_0__.forwardRef)(((props,forwardedRef)=>{const{loop=!1,trapped=!1,onMountAutoFocus:onMountAutoFocusProp,onUnmountAutoFocus:onUnmountAutoFocusProp,...scopeProps}=props,[container1,setContainer]=(0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(null),onMountAutoFocus=(0,_radix_ui_react_use_callback_ref__WEBPACK_IMPORTED_MODULE_1__.W)(onMountAutoFocusProp),onUnmountAutoFocus=(0,_radix_ui_react_use_callback_ref__WEBPACK_IMPORTED_MODULE_1__.W)(onUnmountAutoFocusProp),lastFocusedElementRef=(0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(null),composedRefs=(0,_radix_ui_react_compose_refs__WEBPACK_IMPORTED_MODULE_2__.e)(forwardedRef,(node=>setContainer(node))),focusScope=(0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)((()=>{if(trapped){function handleFocusIn(event){if(focusScope.paused||!container1)return;const target=event.target;container1.contains(target)?lastFocusedElementRef.current=target:$d3863c46a17e8a28$var$focus(lastFocusedElementRef.current,{select:!0})}function handleFocusOut(event){if(focusScope.paused||!container1)return;const relatedTarget=event.relatedTarget;null!==relatedTarget&&(container1.contains(relatedTarget)||$d3863c46a17e8a28$var$focus(lastFocusedElementRef.current,{select:!0}))}function handleMutations(mutations){const focusedElement=document.activeElement;for(const mutation of mutations)mutation.removedNodes.length>0&&(null!=container1&&container1.contains(focusedElement)||$d3863c46a17e8a28$var$focus(container1))}document.addEventListener("focusin",handleFocusIn),document.addEventListener("focusout",handleFocusOut);const mutationObserver=new MutationObserver(handleMutations);return container1&&mutationObserver.observe(container1,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",handleFocusIn),document.removeEventListener("focusout",handleFocusOut),mutationObserver.disconnect()}}}),[trapped,container1,focusScope.paused]),(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)((()=>{if(container1){$d3863c46a17e8a28$var$focusScopesStack.add(focusScope);const previouslyFocusedElement=document.activeElement;if(!container1.contains(previouslyFocusedElement)){const mountEvent=new CustomEvent("focusScope.autoFocusOnMount",$d3863c46a17e8a28$var$EVENT_OPTIONS);container1.addEventListener("focusScope.autoFocusOnMount",onMountAutoFocus),container1.dispatchEvent(mountEvent),mountEvent.defaultPrevented||(!function $d3863c46a17e8a28$var$focusFirst(candidates,{select=!1}={}){const previouslyFocusedElement=document.activeElement;for(const candidate of candidates)if($d3863c46a17e8a28$var$focus(candidate,{select}),document.activeElement!==previouslyFocusedElement)return}(function $d3863c46a17e8a28$var$removeLinks(items){return items.filter((item=>"A"!==item.tagName))}($d3863c46a17e8a28$var$getTabbableCandidates(container1)),{select:!0}),document.activeElement===previouslyFocusedElement&&$d3863c46a17e8a28$var$focus(container1))}return()=>{container1.removeEventListener("focusScope.autoFocusOnMount",onMountAutoFocus),setTimeout((()=>{const unmountEvent=new CustomEvent("focusScope.autoFocusOnUnmount",$d3863c46a17e8a28$var$EVENT_OPTIONS);container1.addEventListener("focusScope.autoFocusOnUnmount",onUnmountAutoFocus),container1.dispatchEvent(unmountEvent),unmountEvent.defaultPrevented||$d3863c46a17e8a28$var$focus(null!=previouslyFocusedElement?previouslyFocusedElement:document.body,{select:!0}),container1.removeEventListener("focusScope.autoFocusOnUnmount",onUnmountAutoFocus),$d3863c46a17e8a28$var$focusScopesStack.remove(focusScope)}),0)}}}),[container1,onMountAutoFocus,onUnmountAutoFocus,focusScope]);const handleKeyDown=(0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)((event=>{if(!loop&&!trapped)return;if(focusScope.paused)return;const isTabKey="Tab"===event.key&&!event.altKey&&!event.ctrlKey&&!event.metaKey,focusedElement=document.activeElement;if(isTabKey&&focusedElement){const container=event.currentTarget,[first,last]=function $d3863c46a17e8a28$var$getTabbableEdges(container){const candidates=$d3863c46a17e8a28$var$getTabbableCandidates(container),first=$d3863c46a17e8a28$var$findVisible(candidates,container),last=$d3863c46a17e8a28$var$findVisible(candidates.reverse(),container);return[first,last]}(container);first&&last?event.shiftKey||focusedElement!==last?event.shiftKey&&focusedElement===first&&(event.preventDefault(),loop&&$d3863c46a17e8a28$var$focus(last,{select:!0})):(event.preventDefault(),loop&&$d3863c46a17e8a28$var$focus(first,{select:!0})):focusedElement===container&&event.preventDefault()}}),[loop,trapped,focusScope.paused]);return(0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_radix_ui_react_primitive__WEBPACK_IMPORTED_MODULE_3__.WV.div,(0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_4__.Z)({tabIndex:-1},scopeProps,{ref:composedRefs,onKeyDown:handleKeyDown}))}));function $d3863c46a17e8a28$var$getTabbableCandidates(container){const nodes=[],walker=document.createTreeWalker(container,NodeFilter.SHOW_ELEMENT,{acceptNode:node=>{const isHiddenInput="INPUT"===node.tagName&&"hidden"===node.type;return node.disabled||node.hidden||isHiddenInput?NodeFilter.FILTER_SKIP:node.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;walker.nextNode();)nodes.push(walker.currentNode);return nodes}function $d3863c46a17e8a28$var$findVisible(elements,container){for(const element of elements)if(!$d3863c46a17e8a28$var$isHidden(element,{upTo:container}))return element}function $d3863c46a17e8a28$var$isHidden(node,{upTo}){if("hidden"===getComputedStyle(node).visibility)return!0;for(;node;){if(void 0!==upTo&&node===upTo)return!1;if("none"===getComputedStyle(node).display)return!0;node=node.parentElement}return!1}function $d3863c46a17e8a28$var$focus(element,{select=!1}={}){if(element&&element.focus){const previouslyFocusedElement=document.activeElement;element.focus({preventScroll:!0}),element!==previouslyFocusedElement&&function $d3863c46a17e8a28$var$isSelectableInput(element){return element instanceof HTMLInputElement&&"select"in element}(element)&&select&&element.select()}}const $d3863c46a17e8a28$var$focusScopesStack=function $d3863c46a17e8a28$var$createFocusScopesStack(){let stack=[];return{add(focusScope){const activeFocusScope=stack[0];focusScope!==activeFocusScope&&(null==activeFocusScope||activeFocusScope.pause()),stack=$d3863c46a17e8a28$var$arrayRemove(stack,focusScope),stack.unshift(focusScope)},remove(focusScope){var _stack$;stack=$d3863c46a17e8a28$var$arrayRemove(stack,focusScope),null===(_stack$=stack[0])||void 0===_stack$||_stack$.resume()}}}();function $d3863c46a17e8a28$var$arrayRemove(array,item){const updatedArray=[...array],index=updatedArray.indexOf(item);return-1!==index&&updatedArray.splice(index,1),updatedArray}},"../../node_modules/@radix-ui/react-id/dist/index.mjs":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{var react__WEBPACK_IMPORTED_MODULE_0___namespace_cache;__webpack_require__.d(__webpack_exports__,{M:()=>$1746a345f3d73bb7$export$f680877a34711e37});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("../../node_modules/react/index.js"),_radix_ui_react_use_layout_effect__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("../../node_modules/@radix-ui/react-use-layout-effect/dist/index.mjs");const $1746a345f3d73bb7$var$useReactId=(react__WEBPACK_IMPORTED_MODULE_0___namespace_cache||(react__WEBPACK_IMPORTED_MODULE_0___namespace_cache=__webpack_require__.t(react__WEBPACK_IMPORTED_MODULE_0__,2)))["useId".toString()]||(()=>{});let $1746a345f3d73bb7$var$count=0;function $1746a345f3d73bb7$export$f680877a34711e37(deterministicId){const[id,setId]=react__WEBPACK_IMPORTED_MODULE_0__.useState($1746a345f3d73bb7$var$useReactId());return(0,_radix_ui_react_use_layout_effect__WEBPACK_IMPORTED_MODULE_1__.b)((()=>{deterministicId||setId((reactId=>null!=reactId?reactId:String($1746a345f3d73bb7$var$count++)))}),[deterministicId]),deterministicId||(id?`radix-${id}`:"")}},"../../node_modules/aria-hidden/dist/es2015/index.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{Ry:()=>hideOthers});var console=__webpack_require__("../../node_modules/console-browserify/index.js"),getDefaultParent=function(originalTarget){return"undefined"==typeof document?null:(Array.isArray(originalTarget)?originalTarget[0]:originalTarget).ownerDocument.body},counterMap=new WeakMap,uncontrolledNodes=new WeakMap,markerMap={},lockCount=0,unwrapHost=function(node){return node&&(node.host||unwrapHost(node.parentNode))},applyAttributeToOthers=function(originalTarget,parentNode,markerName,controlAttribute){var targets=function(parent,targets){return targets.map((function(target){if(parent.contains(target))return target;var correctedTarget=unwrapHost(target);return correctedTarget&&parent.contains(correctedTarget)?correctedTarget:(console.error("aria-hidden",target,"in not contained inside",parent,". Doing nothing"),null)})).filter((function(x){return Boolean(x)}))}(parentNode,Array.isArray(originalTarget)?originalTarget:[originalTarget]);markerMap[markerName]||(markerMap[markerName]=new WeakMap);var markerCounter=markerMap[markerName],hiddenNodes=[],elementsToKeep=new Set,elementsToStop=new Set(targets),keep=function(el){el&&!elementsToKeep.has(el)&&(elementsToKeep.add(el),keep(el.parentNode))};targets.forEach(keep);var deep=function(parent){parent&&!elementsToStop.has(parent)&&Array.prototype.forEach.call(parent.children,(function(node){if(elementsToKeep.has(node))deep(node);else{var attr=node.getAttribute(controlAttribute),alreadyHidden=null!==attr&&"false"!==attr,counterValue=(counterMap.get(node)||0)+1,markerValue=(markerCounter.get(node)||0)+1;counterMap.set(node,counterValue),markerCounter.set(node,markerValue),hiddenNodes.push(node),1===counterValue&&alreadyHidden&&uncontrolledNodes.set(node,!0),1===markerValue&&node.setAttribute(markerName,"true"),alreadyHidden||node.setAttribute(controlAttribute,"true")}}))};return deep(parentNode),elementsToKeep.clear(),lockCount++,function(){hiddenNodes.forEach((function(node){var counterValue=counterMap.get(node)-1,markerValue=markerCounter.get(node)-1;counterMap.set(node,counterValue),markerCounter.set(node,markerValue),counterValue||(uncontrolledNodes.has(node)||node.removeAttribute(controlAttribute),uncontrolledNodes.delete(node)),markerValue||node.removeAttribute(markerName)})),--lockCount||(counterMap=new WeakMap,counterMap=new WeakMap,uncontrolledNodes=new WeakMap,markerMap={})}},hideOthers=function(originalTarget,parentNode,markerName){void 0===markerName&&(markerName="data-aria-hidden");var targets=Array.from(Array.isArray(originalTarget)?originalTarget:[originalTarget]),activeParentNode=parentNode||getDefaultParent(originalTarget);return activeParentNode?(targets.push.apply(targets,Array.from(activeParentNode.querySelectorAll("[aria-live]"))),applyAttributeToOthers(targets,activeParentNode,markerName,"aria-hidden")):function(){return null}}},"../../node_modules/react-remove-scroll/dist/es2015/Combination.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{Z:()=>Combination});var __assign=function(){return __assign=Object.assign||function __assign(t){for(var s,i=1,n=arguments.length;i<n;i++)for(var p in s=arguments[i])Object.prototype.hasOwnProperty.call(s,p)&&(t[p]=s[p]);return t},__assign.apply(this,arguments)};function __rest(s,e){var t={};for(var p in s)Object.prototype.hasOwnProperty.call(s,p)&&e.indexOf(p)<0&&(t[p]=s[p]);if(null!=s&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(p=Object.getOwnPropertySymbols(s);i<p.length;i++)e.indexOf(p[i])<0&&Object.prototype.propertyIsEnumerable.call(s,p[i])&&(t[p[i]]=s[p[i]])}return t}Object.create;function __spreadArray(to,from,pack){if(pack||2===arguments.length)for(var ar,i=0,l=from.length;i<l;i++)!ar&&i in from||(ar||(ar=Array.prototype.slice.call(from,0,i)),ar[i]=from[i]);return to.concat(ar||Array.prototype.slice.call(from))}Object.create;"function"==typeof SuppressedError&&SuppressedError;var react=__webpack_require__("../../node_modules/react/index.js");function useMergeRefs(refs,defaultValue){return function useCallbackRef(initialValue,callback){var ref=(0,react.useState)((function(){return{value:initialValue,callback,facade:{get current(){return ref.value},set current(value){var last=ref.value;last!==value&&(ref.value=value,ref.callback(value,last))}}}}))[0];return ref.callback=callback,ref.facade}(defaultValue||null,(function(newValue){return refs.forEach((function(ref){return function assignRef(ref,value){return"function"==typeof ref?ref(value):ref&&(ref.current=value),ref}(ref,newValue)}))}))}function ItoI(a){return a}function innerCreateMedium(defaults,middleware){void 0===middleware&&(middleware=ItoI);var buffer=[],assigned=!1;return{read:function(){if(assigned)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return buffer.length?buffer[buffer.length-1]:defaults},useMedium:function(data){var item=middleware(data,assigned);return buffer.push(item),function(){buffer=buffer.filter((function(x){return x!==item}))}},assignSyncMedium:function(cb){for(assigned=!0;buffer.length;){var cbs=buffer;buffer=[],cbs.forEach(cb)}buffer={push:function(x){return cb(x)},filter:function(){return buffer}}},assignMedium:function(cb){assigned=!0;var pendingQueue=[];if(buffer.length){var cbs=buffer;buffer=[],cbs.forEach(cb),pendingQueue=buffer}var executeQueue=function(){var cbs=pendingQueue;pendingQueue=[],cbs.forEach(cb)},cycle=function(){return Promise.resolve().then(executeQueue)};cycle(),buffer={push:function(x){pendingQueue.push(x),cycle()},filter:function(filter){return pendingQueue=pendingQueue.filter(filter),buffer}}}}}var effectCar=function createSidecarMedium(options){void 0===options&&(options={});var medium=innerCreateMedium(null);return medium.options=__assign({async:!0,ssr:!1},options),medium}(),nothing=function(){},RemoveScroll=react.forwardRef((function(props,parentRef){var ref=react.useRef(null),_a=react.useState({onScrollCapture:nothing,onWheelCapture:nothing,onTouchMoveCapture:nothing}),callbacks=_a[0],setCallbacks=_a[1],forwardProps=props.forwardProps,children=props.children,className=props.className,removeScrollBar=props.removeScrollBar,enabled=props.enabled,shards=props.shards,sideCar=props.sideCar,noIsolation=props.noIsolation,inert=props.inert,allowPinchZoom=props.allowPinchZoom,_b=props.as,Container=void 0===_b?"div":_b,rest=__rest(props,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as"]),SideCar=sideCar,containerRef=useMergeRefs([ref,parentRef]),containerProps=__assign(__assign({},rest),callbacks);return react.createElement(react.Fragment,null,enabled&&react.createElement(SideCar,{sideCar:effectCar,removeScrollBar,shards,noIsolation,inert,setCallbacks,allowPinchZoom:!!allowPinchZoom,lockRef:ref}),forwardProps?react.cloneElement(react.Children.only(children),__assign(__assign({},containerProps),{ref:containerRef})):react.createElement(Container,__assign({},containerProps,{className,ref:containerRef}),children))}));RemoveScroll.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},RemoveScroll.classNames={fullWidth:"width-before-scroll-bar",zeroRight:"right-scroll-bar-position"};var currentNonce,SideCar=function(_a){var sideCar=_a.sideCar,rest=__rest(_a,["sideCar"]);if(!sideCar)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var Target=sideCar.read();if(!Target)throw new Error("Sidecar medium not found");return react.createElement(Target,__assign({},rest))};SideCar.isSideCarExport=!0;function makeStyleTag(){if(!document)return null;var tag=document.createElement("style");tag.type="text/css";var nonce=currentNonce||__webpack_require__.nc;return nonce&&tag.setAttribute("nonce",nonce),tag}var stylesheetSingleton=function(){var counter=0,stylesheet=null;return{add:function(style){0==counter&&(stylesheet=makeStyleTag())&&(!function injectStyles(tag,css){tag.styleSheet?tag.styleSheet.cssText=css:tag.appendChild(document.createTextNode(css))}(stylesheet,style),function insertStyleTag(tag){(document.head||document.getElementsByTagName("head")[0]).appendChild(tag)}(stylesheet)),counter++},remove:function(){! --counter&&stylesheet&&(stylesheet.parentNode&&stylesheet.parentNode.removeChild(stylesheet),stylesheet=null)}}},styleSingleton=function(){var sheet,useStyle=(sheet=stylesheetSingleton(),function(styles,isDynamic){react.useEffect((function(){return sheet.add(styles),function(){sheet.remove()}}),[styles&&isDynamic])});return function(_a){var styles=_a.styles,dynamic=_a.dynamic;return useStyle(styles,dynamic),null}},zeroGap={left:0,top:0,right:0,gap:0},parse=function(x){return parseInt(x||"",10)||0},getGapWidth=function(gapMode){if(void 0===gapMode&&(gapMode="margin"),"undefined"==typeof window)return zeroGap;var offsets=function(gapMode){var cs=window.getComputedStyle(document.body),left=cs["padding"===gapMode?"paddingLeft":"marginLeft"],top=cs["padding"===gapMode?"paddingTop":"marginTop"],right=cs["padding"===gapMode?"paddingRight":"marginRight"];return[parse(left),parse(top),parse(right)]}(gapMode),documentWidth=document.documentElement.clientWidth,windowWidth=window.innerWidth;return{left:offsets[0],top:offsets[1],right:offsets[2],gap:Math.max(0,windowWidth-documentWidth+offsets[2]-offsets[0])}},Style=styleSingleton(),getStyles=function(_a,allowRelative,gapMode,important){var left=_a.left,top=_a.top,right=_a.right,gap=_a.gap;return void 0===gapMode&&(gapMode="margin"),"\n .".concat("with-scroll-bars-hidden"," {\n overflow: hidden ").concat(important,";\n padding-right: ").concat(gap,"px ").concat(important,";\n }\n body {\n overflow: hidden ").concat(important,";\n overscroll-behavior: contain;\n ").concat([allowRelative&&"position: relative ".concat(important,";"),"margin"===gapMode&&"\n padding-left: ".concat(left,"px;\n padding-top: ").concat(top,"px;\n padding-right: ").concat(right,"px;\n margin-left:0;\n margin-top:0;\n margin-right: ").concat(gap,"px ").concat(important,";\n "),"padding"===gapMode&&"padding-right: ".concat(gap,"px ").concat(important,";")].filter(Boolean).join(""),"\n }\n \n .").concat("right-scroll-bar-position"," {\n right: ").concat(gap,"px ").concat(important,";\n }\n \n .").concat("width-before-scroll-bar"," {\n margin-right: ").concat(gap,"px ").concat(important,";\n }\n \n .").concat("right-scroll-bar-position"," .").concat("right-scroll-bar-position"," {\n right: 0 ").concat(important,";\n }\n \n .").concat("width-before-scroll-bar"," .").concat("width-before-scroll-bar"," {\n margin-right: 0 ").concat(important,";\n }\n \n body {\n ").concat("--removed-body-scroll-bar-size",": ").concat(gap,"px;\n }\n")},RemoveScrollBar=function(props){var noRelative=props.noRelative,noImportant=props.noImportant,_a=props.gapMode,gapMode=void 0===_a?"margin":_a,gap=react.useMemo((function(){return getGapWidth(gapMode)}),[gapMode]);return react.createElement(Style,{styles:getStyles(gap,!noRelative,gapMode,noImportant?"":"!important")})},passiveSupported=!1;if("undefined"!=typeof window)try{var options=Object.defineProperty({},"passive",{get:function(){return passiveSupported=!0,!0}});window.addEventListener("test",options,options),window.removeEventListener("test",options,options)}catch(err){passiveSupported=!1}var nonPassive=!!passiveSupported&&{passive:!1},elementCanBeScrolled=function(node,overflow){var styles=window.getComputedStyle(node);return"hidden"!==styles[overflow]&&!(styles.overflowY===styles.overflowX&&!function(node){return"TEXTAREA"===node.tagName}(node)&&"visible"===styles[overflow])},locationCouldBeScrolled=function(axis,node){var current=node;do{if("undefined"!=typeof ShadowRoot&¤t instanceof ShadowRoot&&(current=current.host),elementCouldBeScrolled(axis,current)){var _a=getScrollVariables(axis,current);if(_a[1]>_a[2])return!0}current=current.parentNode}while(current&¤t!==document.body);return!1},elementCouldBeScrolled=function(axis,node){return"v"===axis?function(node){return elementCanBeScrolled(node,"overflowY")}(node):function(node){return elementCanBeScrolled(node,"overflowX")}(node)},getScrollVariables=function(axis,node){return"v"===axis?[(_a=node).scrollTop,_a.scrollHeight,_a.clientHeight]:function(_a){return[_a.scrollLeft,_a.scrollWidth,_a.clientWidth]}(node);var _a},getTouchXY=function(event){return"changedTouches"in event?[event.changedTouches[0].clientX,event.changedTouches[0].clientY]:[0,0]},getDeltaXY=function(event){return[event.deltaX,event.deltaY]},extractRef=function(ref){return ref&&"current"in ref?ref.current:ref},generateStyle=function(id){return"\n .block-interactivity-".concat(id," {pointer-events: none;}\n .allow-interactivity-").concat(id," {pointer-events: all;}\n")},idCounter=0,lockStack=[];const sidecar=function exportSidecar(medium,exported){return medium.useMedium(exported),SideCar}(effectCar,(function RemoveScrollSideCar(props){var shouldPreventQueue=react.useRef([]),touchStartRef=react.useRef([0,0]),activeAxis=react.useRef(),id=react.useState(idCounter++)[0],Style=react.useState((function(){return styleSingleton()}))[0],lastProps=react.useRef(props);react.useEffect((function(){lastProps.current=props}),[props]),react.useEffect((function(){if(props.inert){document.body.classList.add("block-interactivity-".concat(id));var allow_1=__spreadArray([props.lockRef.current],(props.shards||[]).map(extractRef),!0).filter(Boolean);return allow_1.forEach((function(el){return el.classList.add("allow-interactivity-".concat(id))})),function(){document.body.classList.remove("block-interactivity-".concat(id)),allow_1.forEach((function(el){return el.classList.remove("allow-interactivity-".concat(id))}))}}}),[props.inert,props.lockRef.current,props.shards]);var shouldCancelEvent=react.useCallback((function(event,parent){if("touches"in event&&2===event.touches.length)return!lastProps.current.allowPinchZoom;var currentAxis,touch=getTouchXY(event),touchStart=touchStartRef.current,deltaX="deltaX"in event?event.deltaX:touchStart[0]-touch[0],deltaY="deltaY"in event?event.deltaY:touchStart[1]-touch[1],target=event.target,moveDirection=Math.abs(deltaX)>Math.abs(deltaY)?"h":"v";if("touches"in event&&"h"===moveDirection&&"range"===target.type)return!1;var canBeScrolledInMainDirection=locationCouldBeScrolled(moveDirection,target);if(!canBeScrolledInMainDirection)return!0;if(canBeScrolledInMainDirection?currentAxis=moveDirection:(currentAxis="v"===moveDirection?"h":"v",canBeScrolledInMainDirection=locationCouldBeScrolled(moveDirection,target)),!canBeScrolledInMainDirection)return!1;if(!activeAxis.current&&"changedTouches"in event&&(deltaX||deltaY)&&(activeAxis.current=currentAxis),!currentAxis)return!0;var cancelingAxis=activeAxis.current||currentAxis;return function(axis,endTarget,event,sourceDelta,noOverscroll){var directionFactor=function(axis,direction){return"h"===axis&&"rtl"===direction?-1:1}(axis,window.getComputedStyle(endTarget).direction),delta=directionFactor*sourceDelta,target=event.target,targetInLock=endTarget.contains(target),shouldCancelScroll=!1,isDeltaPositive=delta>0,availableScroll=0,availableScrollTop=0;do{var _a=getScrollVariables(axis,target),position=_a[0],elementScroll=_a[1]-_a[2]-directionFactor*position;(position||elementScroll)&&elementCouldBeScrolled(axis,target)&&(availableScroll+=elementScroll,availableScrollTop+=position),target=target.parentNode}while(!targetInLock&&target!==document.body||targetInLock&&(endTarget.contains(target)||endTarget===target));return(isDeltaPositive&&(noOverscroll&&0===availableScroll||!noOverscroll&&delta>availableScroll)||!isDeltaPositive&&(noOverscroll&&0===availableScrollTop||!noOverscroll&&-delta>availableScrollTop))&&(shouldCancelScroll=!0),shouldCancelScroll}(cancelingAxis,parent,event,"h"===cancelingAxis?deltaX:deltaY,!0)}),[]),shouldPrevent=react.useCallback((function(_event){var event=_event;if(lockStack.length&&lockStack[lockStack.length-1]===Style){var delta="deltaY"in event?getDeltaXY(event):getTouchXY(event),sourceEvent=shouldPreventQueue.current.filter((function(e){return e.name===event.type&&e.target===event.target&&(x=e.delta,y=delta,x[0]===y[0]&&x[1]===y[1]);var x,y}))[0];if(sourceEvent&&sourceEvent.should)event.cancelable&&event.preventDefault();else if(!sourceEvent){var shardNodes=(lastProps.current.shards||[]).map(extractRef).filter(Boolean).filter((function(node){return node.contains(event.target)}));(shardNodes.length>0?shouldCancelEvent(event,shardNodes[0]):!lastProps.current.noIsolation)&&event.cancelable&&event.preventDefault()}}}),[]),shouldCancel=react.useCallback((function(name,delta,target,should){var event={name,delta,target,should};shouldPreventQueue.current.push(event),setTimeout((function(){shouldPreventQueue.current=shouldPreventQueue.current.filter((function(e){return e!==event}))}),1)}),[]),scrollTouchStart=react.useCallback((function(event){touchStartRef.current=getTouchXY(event),activeAxis.current=void 0}),[]),scrollWheel=react.useCallback((function(event){shouldCancel(event.type,getDeltaXY(event),event.target,shouldCancelEvent(event,props.lockRef.current))}),[]),scrollTouchMove=react.useCallback((function(event){shouldCancel(event.type,getTouchXY(event),event.target,shouldCancelEvent(event,props.lockRef.current))}),[]);react.useEffect((function(){return lockStack.push(Style),props.setCallbacks({onScrollCapture:scrollWheel,onWheelCapture:scrollWheel,onTouchMoveCapture:scrollTouchMove}),document.addEventListener("wheel",shouldPrevent,nonPassive),document.addEventListener("touchmove",shouldPrevent,nonPassive),document.addEventListener("touchstart",scrollTouchStart,nonPassive),function(){lockStack=lockStack.filter((function(inst){return inst!==Style})),document.removeEventListener("wheel",shouldPrevent,nonPassive),document.removeEventListener("touchmove",shouldPrevent,nonPassive),document.removeEventListener("touchstart",scrollTouchStart,nonPassive)}}),[]);var removeScrollBar=props.removeScrollBar,inert=props.inert;return react.createElement(react.Fragment,null,inert?react.createElement(Style,{styles:generateStyle(id)}):null,removeScrollBar?react.createElement(RemoveScrollBar,{gapMode:"margin"}):null)}));var ReactRemoveScroll=react.forwardRef((function(props,ref){return react.createElement(RemoveScroll,__assign({},props,{ref,sideCar:sidecar}))}));ReactRemoveScroll.classNames=RemoveScroll.classNames;const Combination=ReactRemoveScroll}}]);