{"version":3,"file":"InitSliders.BQSyH4px.mjs","names":[],"sources":["https:/framerusercontent.com/modules/eFkEFNso6HMFvrPy6ZCE/RD8glUVMPTESEn0S2bc2/InitSliders.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{forwardRef,useEffect}from\"react\";function disableArrow(element){element.style.filter=\"brightness(0.5)\";element.style.pointerEvents=\"none\";}function enableArrow(element){element.style.filter=\"brightness(1)\";element.style.pointerEvents=\"auto\";}export const withCardListScroll=Component=>{return /*#__PURE__*/forwardRef((props,ref)=>{useEffect(()=>{const list=document.querySelector(\"[data-framer-name='CardList']\");const arrowLeft=document.querySelector(\"[data-framer-name='CardScrollLeft']\");const arrowRight=document.querySelector(\"[data-framer-name='CardScrollRight']\");if(arrowLeft){disableArrow(arrowLeft);if(list.scrollWidth-list.scrollLeft-list.clientWidth<40){disableArrow(arrowRight);}}},[]);const onScroll=e=>{const list=document.querySelector(\"[data-framer-name='CardList']\");const arrowLeft=document.querySelector(\"[data-framer-name='CardScrollLeft']\");const arrowRight=document.querySelector(\"[data-framer-name='CardScrollRight']\");if(arrowLeft||arrowRight){if(list.scrollLeft>0||list.scrollWidth-list.scrollLeft-list.clientWidth>40){enableArrow(arrowLeft);enableArrow(arrowRight);}if(list.scrollLeft<=40){disableArrow(arrowLeft);}if(list.scrollWidth-list.scrollLeft-list.clientWidth<40){disableArrow(arrowRight);}}};return /*#__PURE__*/_jsx(Component,{ref:ref,...props,onScroll:onScroll,style:{scrollbarWidth:\"none\",msOverflowStyle:\"none\",overflowX:\"scroll\",WebkitOverflowScrolling:\"touch\"},customCSS:`\n                    &::-webkit-scrollbar {\n                        width: 0px !important;\n                        height: 0px !important;\n                        background: transparent !important;\n                        display: none !important;\n                    }\n                    & {\n                        -webkit-appearance: none !important;\n                        overflow-x: scroll !important;\n                    }\n                `});});};export const withTournamentsListScroll=Component=>{return /*#__PURE__*/forwardRef((props,ref)=>{useEffect(()=>{const list=document.querySelector(\"[data-framer-name='TournamentSlider']\");const arrowLeft=document.querySelector(\"[data-framer-name='TournamentScrollLeft']\");const arrowRight=document.querySelector(\"[data-framer-name='TournamentScrollRight']\");setTimeout(()=>{disableArrow(arrowLeft);if(list.scrollWidth-list.scrollLeft-list.clientWidth<40){disableArrow(arrowRight);}},500);},[]);const onScroll=e=>{const list=document.querySelector(\"[data-framer-name='TournamentSlider']\");const arrowLeft=document.querySelector(\"[data-framer-name='TournamentScrollLeft']\");const arrowRight=document.querySelector(\"[data-framer-name='TournamentScrollRight']\");if(list.scrollLeft>0||list.scrollWidth-list.scrollLeft-list.clientWidth>40){enableArrow(arrowLeft);enableArrow(arrowRight);}if(list.scrollLeft<=40){disableArrow(arrowLeft);}if(list.scrollWidth-list.scrollLeft-list.clientWidth<40){disableArrow(arrowRight);}};return /*#__PURE__*/_jsx(Component,{ref:ref,...props,onScroll:onScroll,style:{scrollbarWidth:\"none\",msOverflowStyle:\"none\",overflowX:\"scroll\",WebkitOverflowScrolling:\"touch\"},customCSS:`\n                    &::-webkit-scrollbar {\n                        width: 0px !important;\n                        height: 0px !important;\n                        background: transparent !important;\n                        display: none !important;\n                    }\n                    & {\n                        -webkit-appearance: none !important;\n                        overflow-x: scroll !important;\n                    }\n                `});});};// 🔥 новый GameList (как TournamentList)\nexport const withGameListScroll=Component=>{return /*#__PURE__*/forwardRef((props,ref)=>{useEffect(()=>{const list=document.querySelector(\"[data-framer-name='GameList']\");const arrowLeft=document.querySelector(\"[data-framer-name='GameScrollLeft']\");const arrowRight=document.querySelector(\"[data-framer-name='GameScrollRight']\");setTimeout(()=>{disableArrow(arrowLeft);if(list.scrollWidth-list.scrollLeft-list.clientWidth<40){disableArrow(arrowRight);}},500);},[]);const onScroll=e=>{const list=document.querySelector(\"[data-framer-name='GameList']\");const arrowLeft=document.querySelector(\"[data-framer-name='GameScrollLeft']\");const arrowRight=document.querySelector(\"[data-framer-name='GameScrollRight']\");if(list.scrollLeft>0||list.scrollWidth-list.scrollLeft-list.clientWidth>40){enableArrow(arrowLeft);enableArrow(arrowRight);}if(list.scrollLeft<=40){disableArrow(arrowLeft);}if(list.scrollWidth-list.scrollLeft-list.clientWidth<40){disableArrow(arrowRight);}};return /*#__PURE__*/_jsx(Component,{ref:ref,...props,onScroll:onScroll,style:{scrollbarWidth:\"none\",msOverflowStyle:\"none\",overflowX:\"scroll\",WebkitOverflowScrolling:\"touch\"},customCSS:`\n                    &::-webkit-scrollbar {\n                        width: 0px !important;\n                        height: 0px !important;\n                        background: transparent !important;\n                        display: none !important;\n                    }\n                    & {\n                        -webkit-appearance: none !important;\n                        overflow-x: scroll !important;\n                    }\n                `});});};// 🔥 новый ArticleList (как CardList)\nexport const withArticleListScroll=Component=>{return /*#__PURE__*/forwardRef((props,ref)=>{useEffect(()=>{const list=document.querySelector(\"[data-framer-name='ArticleList']\");const arrowLeft=document.querySelector(\"[data-framer-name='ArticleScrollLeft']\");const arrowRight=document.querySelector(\"[data-framer-name='ArticleScrollRight']\");if(arrowLeft){disableArrow(arrowLeft);if(list.scrollWidth-list.scrollLeft-list.clientWidth<40){disableArrow(arrowRight);}}},[]);const onScroll=e=>{const list=document.querySelector(\"[data-framer-name='ArticleList']\");const arrowLeft=document.querySelector(\"[data-framer-name='ArticleScrollLeft']\");const arrowRight=document.querySelector(\"[data-framer-name='ArticleScrollRight']\");if(arrowLeft||arrowRight){if(list.scrollLeft>0||list.scrollWidth-list.scrollLeft-list.clientWidth>40){enableArrow(arrowLeft);enableArrow(arrowRight);}if(list.scrollLeft<=40){disableArrow(arrowLeft);}if(list.scrollWidth-list.scrollLeft-list.clientWidth<40){disableArrow(arrowRight);}}};return /*#__PURE__*/_jsx(Component,{ref:ref,...props,onScroll:onScroll,style:{scrollbarWidth:\"none\",msOverflowStyle:\"none\",overflowX:\"scroll\",WebkitOverflowScrolling:\"touch\"},customCSS:`\n                    &::-webkit-scrollbar {\n                        width: 0px !important;\n                        height: 0px !important;\n                        background: transparent !important;\n                        display: none !important;\n                    }\n                    & {\n                        -webkit-appearance: none !important;\n                        overflow-x: scroll !important;\n                    }\n                `});});};\nexport const __FramerMetadata__ = {\"exports\":{\"withGameListScroll\":{\"type\":\"reactHoc\",\"name\":\"withGameListScroll\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withTournamentsListScroll\":{\"type\":\"reactHoc\",\"name\":\"withTournamentsListScroll\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withArticleListScroll\":{\"type\":\"reactHoc\",\"name\":\"withArticleListScroll\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withCardListScroll\":{\"type\":\"reactHoc\",\"name\":\"withCardListScroll\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./InitSliders.map"],"mappings":"yHAAmF,SAAS,EAAa,EAAQ,CAAC,EAAQ,MAAM,OAAO,kBAAkB,EAAQ,MAAM,cAAc,OAAQ,SAAS,EAAY,EAAQ,CAAC,EAAQ,MAAM,OAAO,gBAAgB,EAAQ,MAAM,cAAc,gCAAjP,IAAwC,CAA8N,EAAmB,GAAgC,GAAY,EAAM,IAAM,CAAC,MAAc,CAAC,IAAM,EAAK,SAAS,cAAc,gCAAgC,CAAO,EAAU,SAAS,cAAc,sCAAsC,CAAO,EAAW,SAAS,cAAc,uCAAuC,CAAI,IAAW,EAAa,EAAU,CAAI,EAAK,YAAY,EAAK,WAAW,EAAK,YAAY,IAAI,EAAa,EAAW,GAAK,EAAE,CAAC,CAAC,IAAM,EAAS,GAAG,CAAC,IAAM,EAAK,SAAS,cAAc,gCAAgC,CAAO,EAAU,SAAS,cAAc,sCAAsC,CAAO,EAAW,SAAS,cAAc,uCAAuC,EAAI,GAAW,MAAe,EAAK,WAAW,GAAG,EAAK,YAAY,EAAK,WAAW,EAAK,YAAY,MAAI,EAAY,EAAU,CAAC,EAAY,EAAW,EAAK,EAAK,YAAY,IAAI,EAAa,EAAU,CAAK,EAAK,YAAY,EAAK,WAAW,EAAK,YAAY,IAAI,EAAa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