(self.webpackChunkroot=self.webpackChunkroot||[]).push([[346],{0:(e,t,n)=>{"use strict";e.exports=n.p+"img/asoLogo-eb0c34a967f39c0e7e3a.jpg"},384:(e,t,n)=>{"use strict";e.exports=n.p+"img/avatarGroup-faca1e69e2c224b7eebe.png"},477:()=>{},539:(e,t,n)=>{"use strict";e.exports=n.p+"svg/fileZIP-8e94803f540ec1fbe349.svg"},911:e=>{"use strict";e.exports="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz48c3ZnIHZlcnNpb249IjEuMSIgaWQ9IldoaXRlIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4PSIwcHgiIHk9IjBweCIgdmlld0JveD0iMCAwIDQwMCA0MDAiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDQwMCA0MDA7IiB4bWw6c3BhY2U9InByZXNlcnZlIj48c3R5bGUgdHlwZT0idGV4dC9jc3MiPi5zdDB7ZmlsbDojRkZGRkZGO308L3N0eWxlPjxwYXRoIGNsYXNzPSJzdDAiIGQ9Ik00MDAsMjAwYzAsMTEwLjUtODkuNSwyMDAtMjAwLDIwMFMwLDMxMC41LDAsMjAwUzg5LjUsMCwyMDAsMFM0MDAsODkuNSw0MDAsMjAweiBNMTYzLjQsMzA1LjVjODguNywwLDEzNy4yLTczLjUsMTM3LjItMTM3LjJjMC0yLjEsMC00LjItMC4xLTYuMmM5LjQtNi44LDE3LjYtMTUuMywyNC4xLTI1Yy04LjYsMy44LTE3LjksNi40LTI3LjcsNy42YzEwLTYsMTcuNi0xNS40LDIxLjItMjYuN2MtOS4zLDUuNS0xOS42LDkuNS0zMC42LDExLjdjLTguOC05LjQtMjEuMy0xNS4yLTM1LjItMTUuMmMtMjYuNiwwLTQ4LjIsMjEuNi00OC4yLDQ4LjJjMCwzLjgsMC40LDcuNSwxLjMsMTFjLTQwLjEtMi03NS42LTIxLjItOTkuNC01MC40Yy00LjEsNy4xLTYuNSwxNS40LTYuNSwyNC4yYzAsMTYuNyw4LjUsMzEuNSwyMS41LDQwLjFjLTcuOS0wLjItMTUuMy0yLjQtMjEuOC02YzAsMC4yLDAsMC40LDAsMC42YzAsMjMuNCwxNi42LDQyLjgsMzguNyw0Ny4zYy00LDEuMS04LjMsMS43LTEyLjcsMS43Yy0zLjEsMC02LjEtMC4zLTkuMS0wLjljNi4xLDE5LjIsMjMuOSwzMy4xLDQ1LDMzLjVjLTE2LjUsMTIuOS0zNy4zLDIwLjYtNTkuOSwyMC42Yy0zLjksMC03LjctMC4yLTExLjUtMC43QzExMC44LDI5Ny41LDEzNi4yLDMwNS41LDE2My40LDMwNS41Ii8+PC9zdmc+"},1037:(e,t,n)=>{"use strict";e.exports=n.p+"svg/dnsBlank-d9b5a36b6d641e2b1cd9.svg"},1205:(e,t,n)=>{"use strict";e.exports=n.p+"img/formPositionUnranked-8efe2960cfc090ba51df.png"},1416:(e,t,n)=>{"use strict";e.exports=n.p+"img/googlePlan-b18cf281f99a8608e7a9.png"},1446:(e,t,n)=>{"use strict";e.exports=n.p+"img/googleMaps-093b110e04f11e43e677.png"},1931:(e,t,n)=>{"use strict";e.exports=n.p+"img/google-3994b2066e10d4d349a4.png"},2248:e=>{"use strict";e.exports="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48c3ZnIHdpZHRoPSIxMDI0cHgiIGhlaWdodD0iMTAyNHB4IiB2aWV3Qm94PSIwIDAgMTAyNCAxMDI0IiB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiPiAgICAgICAgPHRpdGxlPkZpbGwgMTwvdGl0bGU+ICAgIDxkZXNjPkNyZWF0ZWQgd2l0aCBTa2V0Y2guPC9kZXNjPiAgICA8ZGVmcz48L2RlZnM+ICAgIDxnIGlkPSJQYWdlLTEiIHN0cm9rZT0ibm9uZSIgc3Ryb2tlLXdpZHRoPSIxIiBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPiAgICAgICAgPGcgaWQ9ImZMb2dvX1doaXRlIiBmaWxsPSIjRkZGRkZFIj4gICAgICAgICAgICA8cGF0aCBkPSJNOTY3LjQ4NCwwIEw1Ni41MTcsMCBDMjUuMzA0LDAgMCwyNS4zMDQgMCw1Ni41MTcgTDAsOTY3LjQ4MyBDMCw5OTguNjk0IDI1LjI5NywxMDI0IDU2LjUyMiwxMDI0IEw1NDcsMTAyNCBMNTQ3LDYyOCBMNDE0LDYyOCBMNDE0LDQ3MyBMNTQ3LDQ3MyBMNTQ3LDM1OS4wMjkgQzU0NywyMjYuNzY3IDYyNy43NzMsMTU0Ljc0NyA3NDUuNzU2LDE1NC43NDcgQzgwMi4yNjksMTU0Ljc0NyA4NTAuODQyLDE1OC45NTUgODY1LDE2MC44MzYgTDg2NSwyOTkgTDc4My4zODQsMjk5LjAzNyBDNzE5LjM5MSwyOTkuMDM3IDcwNywzMjkuNTI5IDcwNywzNzQuMjczIEw3MDcsNDczIEw4NjAuNDg3LDQ3MyBMODQwLjUwMSw2MjggTDcwNyw2MjggTDcwNywxMDI0IEw5NjcuNDg0LDEwMjQgQzk5OC42OTcsMTAyNCAxMDI0LDk5OC42OTcgMTAyNCw5NjcuNDg0IEwxMDI0LDU2LjUxNSBDMTAyNCwyNS4zMDMgOTk4LjY5NywwIDk2Ny40ODQsMCIgaWQ9IkZpbGwtMSI+PC9wYXRoPiAgICAgICAgPC9nPiAgICA8L2c+PC9zdmc+"},2281:(e,t,n)=>{"use strict";e.exports=n.p+"img/login2x-a7058a62cb4dc68d53e5.png"},2599:(e,t,n)=>{"use strict";e.exports=n.p+"svg/weezeventBlankHandGlobe-724d35d1342815318f84.svg"},2630:(e,t,n)=>{"use strict";e.exports=n.p+"svg/alert-c575e88c07bbcb08605f.svg"},2647:(e,t,n)=>{"use strict";e.exports=n.p+"img/login-ba738216a561ebc04664.png"},3574:(e,t,n)=>{"use strict";e.exports=n.p+"svg/done2-fe55d02679b93e21cc5f.svg"},3691:e=>{"use strict";e.exports="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNTAuMzc4IiBoZWlnaHQ9IjI1NC4xNjciIHZpZXdCb3g9IjAgMCA2Ni4yNDYgNjcuMjQ4Ij48ZyB0cmFuc2Zvcm09InRyYW5zbGF0ZSgtMTcyLjUzMSAtMjE4LjQ1NSkgc2NhbGUoLjk4MDEyKSI+PHJlY3Qgcnk9IjUuMjM4IiByeD0iNS4yMzgiIHk9IjIzMS4zOTkiIHg9IjE3Ni4wMzEiIGhlaWdodD0iNjAuMDk5IiB3aWR0aD0iNjAuMDk5IiBmaWxsPSIjMzRhNjY4IiBwYWludC1vcmRlcj0ibWFya2VycyBzdHJva2UgZmlsbCIvPjxwYXRoIGQ9Ik0yMDYuNDc3IDI2MC45bC0yOC45ODcgMjguOTg3YTUuMjE4IDUuMjE4IDAgMCAwIDMuNzggMS42MWg0OS42MjFjMS42OTQgMCAzLjE5LS43OTggNC4xNDYtMi4wMzd6IiBmaWxsPSIjNWM4OGM1Ii8+PHBhdGggZD0iTTIyNi43NDIgMjIyLjk4OGMtOS4yNjYgMC0xNi43NzcgNy4xNy0xNi43NzcgMTYuMDE0LjAwNyAyLjc2Mi42NjMgNS40NzQgMi4wOTMgNy44NzUuNDMuNzAzLjgzIDEuNDA4IDEuMTkgMi4xMDcuMzMzLjUwMi42NSAxLjAwNS45NSAxLjUwOC4zNDMuNDc3LjY3My45NTcuOTg4IDEuNDQgMS4zMSAxLjc2OSAyLjUgMy41MDIgMy42MzcgNS4xNjguNzkzIDEuMjc1IDEuNjgzIDIuNjQgMi40NjYgMy45OSAyLjM2MyA0LjA5NCA0LjAwNyA4LjA5MiA0LjYgMTMuOTE0di4wMTJjLjE4Mi40MTIuNTE2LjY2Ni44NzkuNjY3LjQwMy0uMDAxLjc2OC0uMzE0LjkzLS43OTkuNjAzLTUuNzU2IDIuMjM4LTkuNzI5IDQuNTg1LTEzLjc5NC43ODItMS4zNSAxLjY3My0yLjcxNSAyLjQ2NS0zLjk5IDEuMTM3LTEuNjY2IDIuMzI4LTMuNCAzLjYzOC01LjE2OS4zMTUtLjQ4Mi42NDUtLjk2Mi45ODgtMS40MzkuMy0uNTAzLjYxNy0xLjAwNi45NS0xLjUwOC4zNTktLjcuNzYtMS40MDQgMS4xOS0yLjEwNyAxLjQyNi0yLjQwMiAyLTUuMTE0IDIuMDA0LTcuODc1IDAtOC44NDQtNy41MTEtMTYuMDE0LTE2Ljc3Ni0xNi4wMTR6IiBmaWxsPSIjZGQ0YjNlIiBwYWludC1vcmRlcj0ibWFya2VycyBzdHJva2UgZmlsbCIvPjxlbGxpcHNlIHJ5PSI1LjU2NCIgcng9IjUuODI4IiBjeT0iMjM5LjAwMiIgY3g9IjIyNi43NDIiIGZpbGw9IiM4MDJkMjciIHBhaW50LW9yZGVyPSJtYXJrZXJzIHN0cm9rZSBmaWxsIi8+PHBhdGggZD0iTTE5MC4zMDEgMjM3LjI4M2MtNC42NyAwLTguNDU3IDMuODUzLTguNDU3IDguNjA2czMuNzg2IDguNjA3IDguNDU3IDguNjA3YzMuMDQzIDAgNC44MDYtLjk1OCA2LjMzNy0yLjUxNiAxLjUzLTEuNTU3IDIuMDg3LTMuOTEzIDIuMDg3LTYuMjkgMC0uMzYyLS4wMjMtLjcyMi0uMDY0LTEuMDc5aC04LjI1N3YzLjA0M2g0Ljg1Yy0uMTk3Ljc1OS0uNTMxIDEuNDUtMS4wNTggMS45ODYtLjk0Mi45NTgtMi4wMjggMS41NDgtMy45MDEgMS41NDgtMi44NzYgMC01LjIwOC0yLjM3Mi01LjIwOC01LjI5OSAwLTIuOTI2IDIuMzMyLTUuMjk5IDUuMjA4LTUuMjk5IDEuMzk5IDAgMi42MTguNDA3IDMuNTg0IDEuMjkzbDIuMzgxLTIuMzhjMC0uMDAyLS4wMDMtLjAwNC0uMDA0LS4wMDUtMS41ODgtMS41MjQtMy42Mi0yLjIxNS01Ljk1NS0yLjIxNXptNC40MyA1LjY2bC4wMDMuMDA2di0uMDAzeiIgZmlsbD0iI2ZmZiIgcGFpbnQtb3JkZXI9Im1hcmtlcnMgc3Ryb2tlIGZpbGwiLz48cGF0aCBkPSJNMjE1LjE4NCAyNTEuOTI5bC03Ljk4IDcuOTc5IDI4LjQ3NyAyOC40NzVjLjI4Ny0uNjQ5LjQ0OS0xLjM2Ni40NDktMi4xMjN2LTMxLjE2NWMtLjQ2OS42NzUtLjkzNCAxLjM0OS0xLjM4MiAyLjAwNS0uNzkyIDEuMjc1LTEuNjgyIDIuNjQtMi40NjUgMy45OS0yLjM0NyA0LjA2NS0zLjk4MiA4LjAzOC00LjU4NSAxMy43OTQtLjE2Mi40ODUtLjUyNy43OTgtLjkzLjc5OS0uMzYzLS4wMDEtLjY5Ny0uMjU1LS44NzktLjY2N3YtLjAxMmMtLjU5My01LjgyMi0yLjIzNy05LjgyLTQuNi0xMy45MTQtLjc4My0xLjM1LTEuNjczLTIuNzE1LTIuNDY2LTMuOTktMS4xMzctMS42NjYtMi4zMjctMy40LTMuNjM3LTUuMTY5bC0uMDAyLS4wMDN6IiBmaWxsPSIjYzNjM2MzIi8+PHBhdGggZD0iTTIxMi45ODMgMjQ4LjQ5NWwtMzYuOTUyIDM2Ljk1M3YuODEyYTUuMjI3IDUuMjI3IDAgMCAwIDUuMjM4IDUuMjM4aDEuMDE1bDM1LjY2Ni0zNS42NjZhMTM2LjI3NSAxMzYuMjc1IDAgMCAwLTIuNzY0LTMuOSAzNy41NzUgMzcuNTc1IDAgMCAwLS45ODktMS40NGMtLjI5OS0uNTAzLS42MTYtMS4wMDYtLjk1LTEuNTA4LS4wODMtLjE2Mi0uMTc2LS4zMjYtLjI2NC0uNDg5eiIgZmlsbD0iI2ZkZGM0ZiIgcGFpbnQtb3JkZXI9Im1hcmtlcnMgc3Ryb2tlIGZpbGwiLz48cGF0aCBkPSJNMjExLjk5OCAyNjEuMDgzbC02LjE1MiA2LjE1MSAyNC4yNjQgMjQuMjY0aC43ODFhNS4yMjcgNS4yMjcgMCAwIDAgNS4yMzktNS4yMzh2LTEuMDQ1eiIgZmlsbD0iI2ZmZiIgcGFpbnQtb3JkZXI9Im1hcmtlcnMgc3Ryb2tlIGZpbGwiLz48L2c+PC9zdmc+"},3780:(e,t,n)=>{"use strict";e.exports=n.p+"svg/check-b496988ef222b46ee39a.svg"},4025:(e,t,n)=>{"use strict";e.exports=n.p+"img/ignPlan-d4659acd351e7c1a33e4.png"},4225:e=>{"use strict";e.exports="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48c3ZnIHdpZHRoPSI1MDRweCIgaGVpZ2h0PSI1MDRweCIgdmlld0JveD0iMCAwIDUwNCA1MDQiIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayI+ICAgICAgICA8dGl0bGU+Z2x5cGgtbG9nb19NYXkyMDE2PC90aXRsZT4gICAgPGRlc2M+Q3JlYXRlZCB3aXRoIFNrZXRjaC48L2Rlc2M+ICAgIDxkZWZzPiAgICAgICAgPHBvbHlnb24gaWQ9InBhdGgtMSIgcG9pbnRzPSIwIDAuMTU5IDUwMy44NDEgMC4xNTkgNTAzLjg0MSA1MDMuOTQgMCA1MDMuOTQiPjwvcG9seWdvbj4gICAgPC9kZWZzPiAgICA8ZyBpZD0iZ2x5cGgtbG9nb19NYXkyMDE2IiBzdHJva2U9Im5vbmUiIHN0cm9rZS13aWR0aD0iMSIgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj4gICAgICAgIDxnIGlkPSJHcm91cC0zIj4gICAgICAgICAgICA8bWFzayBpZD0ibWFzay0yIiBmaWxsPSJ3aGl0ZSI+ICAgICAgICAgICAgICAgIDx1c2UgeGxpbms6aHJlZj0iI3BhdGgtMSI+PC91c2U+ICAgICAgICAgICAgPC9tYXNrPiAgICAgICAgICAgIDxnIGlkPSJDbGlwLTIiPjwvZz4gICAgICAgICAgICA8cGF0aCBkPSJNMjUxLjkyMSwwLjE1OSBDMTgzLjUwMywwLjE1OSAxNzQuOTI0LDAuNDQ5IDE0OC4wNTQsMS42NzUgQzEyMS4yNCwyLjg5OCAxMDIuOTI3LDcuMTU3IDg2LjkwMywxMy4zODUgQzcwLjMzNywxOS44MjIgNTYuMjg4LDI4LjQzNiA0Mi4yODIsNDIuNDQxIEMyOC4yNzcsNTYuNDQ3IDE5LjY2Myw3MC40OTYgMTMuMjI2LDg3LjA2MiBDNi45OTgsMTAzLjA4NiAyLjczOSwxMjEuMzk5IDEuNTE2LDE0OC4yMTMgQzAuMjksMTc1LjA4MyAwLDE4My42NjIgMCwyNTIuMDggQzAsMzIwLjQ5NyAwLjI5LDMyOS4wNzYgMS41MTYsMzU1Ljk0NiBDMi43MzksMzgyLjc2IDYuOTk4LDQwMS4wNzMgMTMuMjI2LDQxNy4wOTcgQzE5LjY2Myw0MzMuNjYzIDI4LjI3Nyw0NDcuNzEyIDQyLjI4Miw0NjEuNzE4IEM1Ni4yODgsNDc1LjcyMyA3MC4zMzcsNDg0LjMzNyA4Ni45MDMsNDkwLjc3NSBDMTAyLjkyNyw0OTcuMDAyIDEyMS4yNCw1MDEuMjYxIDE0OC4wNTQsNTAyLjQ4NCBDMTc0LjkyNCw1MDMuNzEgMTgzLjUwMyw1MDQgMjUxLjkyMSw1MDQgQzMyMC4zMzgsNTA0IDMyOC45MTcsNTAzLjcxIDM1NS43ODcsNTAyLjQ4NCBDMzgyLjYwMSw1MDEuMjYxIDQwMC45MTQsNDk3LjAwMiA0MTYuOTM4LDQ5MC43NzUgQzQzMy41MDQsNDg0LjMzNyA0NDcuNTUzLDQ3NS43MjMgNDYxLjU1OSw0NjEuNzE4IEM0NzUuNTY0LDQ0Ny43MTIgNDg0LjE3OCw0MzMuNjYzIDQ5MC42MTYsNDE3LjA5NyBDNDk2Ljg0Myw0MDEuMDczIDUwMS4xMDIsMzgyLjc2IDUwMi4zMjUsMzU1Ljk0NiBDNTAzLjU1MSwzMjkuMDc2IDUwMy44NDEsMzIwLjQ5NyA1MDMuODQxLDI1Mi4wOCBDNTAzLjg0MSwxODMuNjYyIDUwMy41NTEsMTc1LjA4MyA1MDIuMzI1LDE0OC4yMTMgQzUwMS4xMDIsMTIxLjM5OSA0OTYuODQzLDEwMy4wODYgNDkwLjYxNiw4Ny4wNjIgQzQ4NC4xNzgsNzAuNDk2IDQ3NS41NjQsNTYuNDQ3IDQ2MS41NTksNDIuNDQxIEM0NDcuNTUzLDI4LjQzNiA0MzMuNTA0LDE5LjgyMiA0MTYuOTM4LDEzLjM4NSBDNDAwLjkxNCw3LjE1NyAzODIuNjAxLDIuODk4IDM1NS43ODcsMS42NzUgQzMyOC45MTcsMC40NDkgMzIwLjMzOCwwLjE1OSAyNTEuOTIxLDAuMTU5IFogTTI1MS45MjEsNDUuNTUgQzMxOS4xODYsNDUuNTUgMzI3LjE1NCw0NS44MDcgMzUzLjcxOCw0Ny4wMTkgQzM3OC4yOCw0OC4xMzkgMzkxLjYxOSw1Mi4yNDMgNDAwLjQ5Niw1NS42OTMgQzQxMi4yNTUsNjAuMjYzIDQyMC42NDcsNjUuNzIyIDQyOS40NjIsNzQuNTM4IEM0MzguMjc4LDgzLjM1MyA0NDMuNzM3LDkxLjc0NSA0NDguMzA3LDEwMy41MDQgQzQ1MS43NTcsMTEyLjM4MSA0NTUuODYxLDEyNS43MiA0NTYuOTgxLDE1MC4yODIgQzQ1OC4xOTMsMTc2Ljg0NiA0NTguNDUsMTg0LjgxNCA0NTguNDUsMjUyLjA4IEM0NTguNDUsMzE5LjM0NSA0NTguMTkzLDMyNy4zMTMgNDU2Ljk4MSwzNTMuODc3IEM0NTUuODYxLDM3OC40MzkgNDUxLjc1NywzOTEuNzc4IDQ0OC4zMDcsNDAwLjY1NSBDNDQzLjczNyw0MTIuNDE0IDQzOC4yNzgsNDIwLjgwNiA0MjkuNDYyLDQyOS42MjEgQzQyMC42NDcsNDM4LjQzNyA0MTIuMjU1LDQ0My44OTYgNDAwLjQ5Niw0NDguNDY2IEMzOTEuNjE5LDQ1MS45MTYgMzc4LjI4LDQ1Ni4wMiAzNTMuNzE4LDQ1Ny4xNCBDMzI3LjE1OCw0NTguMzUyIDMxOS4xOTEsNDU4LjYwOSAyNTEuOTIxLDQ1OC42MDkgQzE4NC42NSw0NTguNjA5IDE3Ni42ODQsNDU4LjM1MiAxNTAuMTIzLDQ1Ny4xNCBDMTI1LjU2MSw0NTYuMDIgMTEyLjIyMiw0NTEuOTE2IDEwMy4zNDUsNDQ4LjQ2NiBDOTEuNTg2LDQ0My44OTYgODMuMTk0LDQzOC40MzcgNzQuMzc5LDQyOS42MjEgQzY1LjU2NCw0MjAuODA2IDYwLjEwNCw0MTIuNDE0IDU1LjUzNCw0MDAuNjU1IEM1Mi4wODQsMzkxLjc3OCA0Ny45OCwzNzguNDM5IDQ2Ljg2LDM1My44NzcgQzQ1LjY0OCwzMjcuMzEzIDQ1LjM5MSwzMTkuMzQ1IDQ1LjM5MSwyNTIuMDggQzQ1LjM5MSwxODQuODE0IDQ1LjY0OCwxNzYuODQ2IDQ2Ljg2LDE1MC4yODIgQzQ3Ljk4LDEyNS43MiA1Mi4wODQsMTEyLjM4MSA1NS41MzQsMTAzLjUwNCBDNjAuMTA0LDkxLjc0NSA2NS41NjMsODMuMzUzIDc0LjM3OSw3NC41MzggQzgzLjE5NCw2NS43MjIgOTEuNTg2LDYwLjI2MyAxMDMuMzQ1LDU1LjY5MyBDMTEyLjIyMiw1Mi4yNDMgMTI1LjU2MSw0OC4xMzkgMTUwLjEyMyw0Ny4wMTkgQzE3Ni42ODcsNDUuODA3IDE4NC42NTUsNDUuNTUgMjUxLjkyMSw0NS41NSBaIiBpZD0iRmlsbC0xIiBmaWxsPSIjRkZGRkZGIiBtYXNrPSJ1cmwoI21hc2stMikiPjwvcGF0aD4gICAgICAgIDwvZz4gICAgICAgIDxwYXRoIGQ9Ik0yNTEuOTIxLDMzNi4wNTMgQzIwNS41NDMsMzM2LjA1MyAxNjcuOTQ3LDI5OC40NTcgMTY3Ljk0NywyNTIuMDggQzE2Ny45NDcsMjA1LjcwMiAyMDUuNTQzLDE2OC4xMDYgMjUxLjkyMSwxNjguMTA2IEMyOTguMjk4LDE2OC4xMDYgMzM1Ljg5NCwyMDUuNzAyIDMzNS44OTQsMjUyLjA4IEMzMzUuODk0LDI5OC40NTcgMjk4LjI5OCwzMzYuMDUzIDI1MS45MjEsMzM2LjA1MyBaIE0yNTEuOTIxLDEyMi43MTUgQzE4MC40NzQsMTIyLjcxNSAxMjIuNTU2LDE4MC42MzMgMTIyLjU1NiwyNTIuMDggQzEyMi41NTYsMzIzLjUyNiAxODAuNDc0LDM4MS40NDQgMjUxLjkyMSwzODEuNDQ0IEMzMjMuMzY3LDM4MS40NDQgMzgxLjI4NSwzMjMuNTI2IDM4MS4yODUsMjUyLjA4IEMzODEuMjg1LDE4MC42MzMgMzIzLjM2NywxMjIuNzE1IDI1MS45MjEsMTIyLjcxNSBaIiBpZD0iRmlsbC00IiBmaWxsPSIjRkZGRkZGIj48L3BhdGg+ICAgICAgICA8cGF0aCBkPSJNNDE2LjYyNywxMTcuNjA0IEM0MTYuNjI3LDEzNC4zIDQwMy4wOTIsMTQ3LjgzNCAzODYuMzk2LDE0Ny44MzQgQzM2OS43MDEsMTQ3LjgzNCAzNTYuMTY2LDEzNC4zIDM1Ni4xNjYsMTE3LjYwNCBDMzU2LjE2NiwxMDAuOTA4IDM2OS43MDEsODcuMzczIDM4Ni4zOTYsODcuMzczIEM0MDMuMDkyLDg3LjM3MyA0MTYuNjI3LDEwMC45MDggNDE2LjYyNywxMTcuNjA0IiBpZD0iRmlsbC01IiBmaWxsPSIjRkZGRkZGIj48L3BhdGg+ICAgIDwvZz48L3N2Zz4="},4236:(e,t,n)=>{"use strict";e.exports=n.p+"img/background404-7cbee4be29173b045b3e.jpg"},4362:(e,t,n)=>{"use strict";e.exports=n.p+"svg/weezeventBlankSwissArmyKnife-1600d89a247ad1dab4a9.svg"},4628:(e,t,n)=>{"use strict";e.exports=n.p+"img/formPositionRanked-376168a7e3c71ed7defd.png"},5095:(e,t,n)=>{"use strict";e.exports=n.p+"img/netflixWood-fa60c8d3bb65881cf071.jpg"},5376:(e,t,n)=>{"use strict";e.exports=n.p+"svg/sad-cbf74279d944b2baac65.svg"},5594:(e,t,n)=>{"use strict";e.exports=n.p+"img/member-7b0dc9a7cc229b5ba65b.png"},5682:()=>{},6041:(e,t,n)=>{"use strict";e.exports=n.p+"img/logoWeezeventSquare-9184b02c60dbc8695435.png"},6377:(e,t,n)=>{"use strict";var i=n(4848);function a(...e){console.log(...e)}n(8630);var s,o,r,d=n(6540),l=n(3345),c=n(2347);function u(e){return(0,c.A)(e.normalize("NFD").replace(/\p{Diacritic}/gu,""))}function m(e){return(0,c.A)((e||"").trim().toLowerCase().normalize("NFD").replace(/\p{Diacritic}/gu,""))}function g(e,t={}){const n=t.replacer??o.Dash,i=u(e).trim().toLowerCase().replace(/['"]+/gi,"");let a;return a=n===o.Dash?i.replace(/[^a-z0-9\\-]+/gu,"-").replace(/-+$/,"").replace(/^-+/,""):n===o.Underscore?i.replace(/[^a-z0-9_]+/gu,"_").replace(/_+$/,"").replace(/^_+/,""):i.replace(/[^a-z0-9]+/gu,"").trim(),t?.replaceStartingNumber?a.replace(/^(\d)/,"_$1"):a}function h(e){return Array.isArray(e)&&"production"!==s.Production&&console.warn("Array passed to `isNonEmptyString()`, did you mean to use `isNonEmptyArray()` instead?"),"string"==typeof e&&e.trim().length>0}function p(e){return!h(e)}(r=s||(s={})).Development="development",r.Production="production",r.Test="test",function(e){e[e.Dash=0]="Dash",e[e.Empty=1]="Empty",e[e.Underscore=2]="Underscore"}(o||(o={}));const f=["hm","hrh","him","hih","hh","hsh","hgdh","kg","lg","kt","lt","sm","sar","sai","sas","sagd"],I=e=>h(e)?e[0].toUpperCase()+e.slice(1):"";function _(e){return(e??"").trim().toLowerCase().replace(/\s+/g," ").split(" ").map(e=>f.includes(e.toLowerCase())?e.toUpperCase():I(e.trim())).join(" ").split("-").map(e=>f.includes(e.toLowerCase())?e.toUpperCase():I(e.trim())).join("-")}function x(e,t){const n=(e,t,n,i,a)=>en?n+1:e+1:i===a?t:t+1;if(e===t)return 0;if(e.length>t.length){const n=e;e=t,t=n}let i=e.length,a=t.length;for(;i>0&&e.charCodeAt(i-1)===t.charCodeAt(a-1);)i--,a--;let s=0;for(;s{let t="$gray200",n="$2",i="$xs";if(h(e)){const a=function(e){if(e){const[t,n,i]=e.split(" ");return{borderColor:t,borderRadius:n,boxShadow:i}}return{}}(e);a.borderColor&&(t=`$${a.borderColor}`),a.borderRadius&&(n=`$${a.borderRadius}`),i=a.boxShadow?`$${a.boxShadow}`:void 0}return{borderColor:t,borderRadius:n,borderStyle:"solid",borderWidth:"1px",boxShadow:i}},clamp:e=>({display:"-webkit-box",overflow:"hidden","-webkit-line-clamp":e.toString(10),"-webkit-box-orient":"vertical"}),ellipsis:()=>({overflow:"hidden","text-overflow":"ellipsis","white-space":"nowrap"}),px:e=>({paddingLeft:e,paddingRight:e}),py:e=>({paddingBottom:e,paddingTop:e})}});C("weezcrew-theme",{});var M,D=n(8542);function O(e){return"string"==typeof e?e:"number"==typeof e?e<=1?100*e+"%":`${e}px`:void 0}function w(e){return(0,D.A)(e,["direction","align","justify","wrap","gap","css","height","width"])}!function(e){e.Nav="nav",e.Header="header",e.Footer="footer",e.Main="main",e.Section="section"}(M||(M={}));const P=j("div",{display:"flex",variants:{direction:{row:{flexDirection:"row"},column:{flexDirection:"column"},rowReverse:{flexDirection:"row-reverse"},columnReverse:{flexDirection:"column-reverse"}},align:{start:{alignItems:"flex-start"},center:{alignItems:"center"},end:{alignItems:"flex-end"},stretch:{alignItems:"stretch"},baseline:{alignItems:"baseline"}},justify:{start:{justifyContent:"flex-start"},center:{justifyContent:"center"},end:{justifyContent:"flex-end"},between:{justifyContent:"space-between"},evenly:{justifyContent:"space-evenly"}},wrap:{noWrap:{flexWrap:"nowrap"},wrap:{flexWrap:"wrap"},wrapReverse:{flexWrap:"wrap-reverse"}},gap:{1:{gap:"$1"},2:{gap:"$2"},3:{gap:"$3"},4:{gap:"$4"},5:{gap:"$5"},6:{gap:"$6"},7:{gap:"$7"},8:{gap:"$8"},9:{gap:"$9"},10:{gap:"$10"},11:{gap:"$11"},12:{gap:"$12"},13:{gap:"$13"}}},defaultVariants:{direction:"row",align:"stretch",justify:"start",wrap:"noWrap"}}),$=d.forwardRef(({onClick:e,...t},n)=>{const a={};return t.height&&(a.height=O(t.height)),t.width&&(a.width=O(t.width)),(0,i.jsx)(P,{...t,ref:n,css:{...a,...t.css},onClick:e})});$.displayName="Flex";const k=j("p",{fontStyle:"normal",padding:"unset",margin:"unset",lineHeight:"1.42857143","& > *:not(ul)":{display:"inline"},variants:{textStyle:{inherit:{color:"inherit",fontSize:"inherit",fontWeight:"inherit",lineHeight:"inherit"},heading:{color:"$gray900",fontSize:"$textMd",fontWeight:"$medium",lineHeight:"1.55556"},smallcapsheading:{color:"$gray500",fontSize:"10px",lineHeigh:"24px",textTransform:"uppercase"},subheading:{color:"$gray900",fontSize:"$textMd",fontWeight:"$medium",lineHeight:"1.5"},subtitle:{color:"$gray500",fontSize:"$textSm",fontWeight:"$regular",lineHeight:"1.42857"},bodyText:{color:"$gray800",fontSize:"$textSm"},abbreviation:{color:"$gray500",fontVariant:"small-caps",fontSize:"$textSm"}}},defaultVariants:{textStyle:"bodyText"}}),N=d.forwardRef(({children:e,...t},n)=>(0,i.jsx)(k,{ref:n,...t,children:e}));N.displayName="Text";const L=[];function z(e){return null==e?[]:Array.isArray(e)?e:[e]}function F(e){return Array.isArray(e)&&e.length>0}function U(e){return!F(e)}function B(e,t,n){const i=new Set(e);return n?i.add(t):i.delete(t),Array.from(i)}function G(e,t){return e.filter((e,n)=>n!==t)}var V,W,q,Y,H,Z,K,Q,X,J,ee,te,ne,ie,ae,se,oe,re,de,le,ce,ue,me,ge,he,pe,fe,Ie,_e,xe,ye,Se,je,be,ve,Ae,Ce,Ee,Te,Re,Me,De,Oe,we,Pe,$e,ke,Ne,Le,ze,Fe,Ue,Be,Ge,Ve,We,qe,Ye,He,Ze,Ke,Qe,Xe,Je,et,tt,nt,it,at,st,ot,rt,dt,lt,ct,ut,mt,gt,ht,pt,ft,It,_t,xt,yt,St,jt,bt,vt,At,Ct,Et,Tt,Rt,Mt,Dt,Ot,wt,Pt,$t,kt,Nt,Lt,zt,Ft,Ut,Bt,Gt,Vt,Wt,qt,Yt,Ht,Zt,Kt,Qt,Xt,Jt,en,tn,nn,an,sn,on,rn,dn,ln,cn,un,mn,gn,hn,pn,fn,In,_n,xn,yn,Sn,jn,bn,vn,An,Cn,En=n(1519);!function(e){e.Delegation="Delegation",e.DelegationCategory="DelegationCategory",e.Event="Event",e.Organization="Organization",e.Position="Position",e.PositionCategory="PositionCategory"}(V||(V={})),function(e){e.Calendar="Calendar",e.List="List",e.Radio="Radio"}(W||(W={})),(Cn=q||(q={})).Acronym="Acronym",Cn.Address="Address",Cn.AutoAccredit="AutoAccredit",Cn.Category="Category",Cn.Color="Color",Cn.Description="Description",Cn.Icon="Icon",Cn.Index="Index",Cn.Latitude="Latitude",Cn.Longitude="Longitude",Cn.Name="Name",Cn.Tag="Tag",Cn.WeezeventIsSynchronized="WeezeventIsSynchronized",function(e){e.Accredited="Accredited",e.Everyone="Everyone",e.Members="Members",e.Refused="Refused",e.Segments="Segments"}(Y||(Y={})),function(e){e.Done="Done",e.Waiting="Waiting"}(H||(H={})),(An=Z||(Z={})).Acronym="Acronym",An.Category="Category",An.Color="Color",An.Description="Description",An.Icon="Icon",An.Name="Name",function(e){e.Category="Category",e.CreatedAt="CreatedAt",e.Id="Id",e.Name="Name"}(K||(K={})),function(e){e.Accreditation="Accreditation",e.Acronym="Acronym",e.Category="Category",e.CreatedAt="CreatedAt",e.Date="Date",e.Id="Id",e.Name="Name"}(Q||(Q={})),function(e){e.Acronym="Acronym",e.Category="Category",e.CreatedAt="CreatedAt",e.Id="Id",e.Index="Index",e.Name="Name"}(X||(X={})),function(e){e.Accredited="Accredited",e.AutoAccredited="AutoAccredited",e.NotApplicable="NotApplicable",e.Refused="Refused",e.WaitingAccreditation="WaitingAccreditation"}(J||(J={})),function(e){e.Car="Car",e.Moto="Moto"}(ee||(ee={})),function(e){e.Assigned="Assigned",e.Everyone="Everyone",e.Members="Members",e.Refused="Refused",e.Segments="Segments"}(te||(te={})),function(e){e.EventStart="EventStart",e.EventEnd="EventEnd"}(ne||(ne={})),function(e){e.Before="Before",e.After="After"}(ie||(ie={})),function(e){e.NoSchedule="NoSchedule",e.Datetime="Datetime",e.Anchor="Anchor"}(ae||(ae={})),function(e){e.InsertedAt="InsertedAt",e.Name="Name",e.State="State",e.Type="Type"}(se||(se={})),function(e){e.Done="Done",e.Draft="Draft",e.InProgress="InProgress",e.Scheduled="Scheduled",e.Template="Template"}(oe||(oe={})),function(e){e.Email="Email",e.Sms="Sms"}(re||(re={})),function(e){e.C10012713_1K="C10012713_1K",e.C10012713_2K="C10012713_2K",e.C10012713_3K="C10012713_3K",e.C10012713_4K="C10012713_4K",e.C10012713_5K="C10012713_5K",e.C10012713_6K="C10012713_6K",e.C10012713_7K="C10012713_7K",e.C10012713_1="C10012713_1",e.C10012713_2="C10012713_2",e.C10012713_3="C10012713_3",e.C10012713_4="C10012713_4",e.C10012713_5="C10012713_5",e.C10012713_6="C10012713_6",e.C10012713_7="C10012713_7",e.C10012717_1K="C10012717_1K",e.C10012717_2K="C10012717_2K",e.C10012717_3K="C10012717_3K",e.C10012717_4K="C10012717_4K",e.C10012717_5K="C10012717_5K",e.C10012717_6K="C10012717_6K",e.C10012717_7K="C10012717_7K",e.C10012717_1="C10012717_1",e.C10012717_2="C10012717_2",e.C10012717_3="C10012717_3",e.C10012717_4="C10012717_4",e.C10012717_5="C10012717_5",e.C10012717_6="C10012717_6",e.C10012717_7="C10012717_7",e.C10006995K="C10006995K",e.C10006995_1K="C10006995_1K",e.C10006995_2K="C10006995_2K",e.C10006995_3K="C10006995_3K",e.C10006995_4K="C10006995_4K",e.C10006995_5K="C10006995_5K",e.C10006995_6K="C10006995_6K",e.C10006995_7K="C10006995_7K",e.C10006995="C10006995",e.C10006995_1="C10006995_1",e.C10006995_2="C10006995_2",e.C10006995_3="C10006995_3",e.C10006995_4="C10006995_4",e.C10006995_5="C10006995_5",e.C10006995_6="C10006995_6",e.C10006995_7="C10006995_7",e.C10010951K="C10010951K",e.C10010951_1K="C10010951_1K",e.C10010951_2K="C10010951_2K",e.C10010951_3K="C10010951_3K",e.C10010951_4K="C10010951_4K",e.C10010951_5K="C10010951_5K",e.C10010951_6K="C10010951_6K",e.C10010951_7K="C10010951_7K",e.C10010951="C10010951",e.C10010951_1="C10010951_1",e.C10010951_2="C10010951_2",e.C10010951_3="C10010951_3",e.C10010951_4="C10010951_4",e.C10010951_5="C10010951_5",e.C10010951_6="C10010951_6",e.C10010951_7="C10010951_7",e.C10006999="C10006999",e.C10006999_1="C10006999_1",e.C10006999_2="C10006999_2",e.C10006999_3="C10006999_3",e.C10006999_4="C10006999_4",e.C10006999_5="C10006999_5",e.C10006999_6="C10006999_6",e.C10006999_7="C10006999_7",e.C10006999K="C10006999K",e.C10006999_1K="C10006999_1K",e.C10006999_2K="C10006999_2K",e.C10006999_3K="C10006999_3K",e.C10006999_4K="C10006999_4K",e.C10006999_5K="C10006999_5K",e.C10006999_6K="C10006999_6K",e.C10006999_7K="C10006999_7K",e.C10015355K="C10015355K",e.C10015355_1K="C10015355_1K",e.C10015355_2K="C10015355_2K",e.C10015355_3K="C10015355_3K",e.C10015355_4K="C10015355_4K",e.C10015355_5K="C10015355_5K",e.C10015355_6K="C10015355_6K",e.C10015355_7K="C10015355_7K",e.C10015355="C10015355",e.C10015355_1="C10015355_1",e.C10015355_2="C10015355_2",e.C10015355_3="C10015355_3",e.C10015355_4="C10015355_4",e.C10015355_5="C10015355_5",e.C10015355_6="C10015355_6",e.C10015355_7="C10015355_7"}(de||(de={})),(vn=le||(le={})).Waiting="Waiting",vn.CheckedIn="CheckedIn",vn.CheckedOut="CheckedOut",function(e){e.BreakTime="BreakTime",e.CheckIn="CheckIn",e.CheckInOut="CheckInOut",e.CheckOut="CheckOut",e.Reset="Reset"}(ce||(ce={})),function(e){e.And="And",e.Or="Or"}(ue||(ue={})),(bn=me||(me={})).Animajeconvention="Animajeconvention",bn.Asoassignment="Asoassignment",bn.Hbcldc="Hbcldc",bn.Hbclnh="Hbclnh",bn.P2nassignment="P2nassignment",bn.P2nassignmentmontagedemontage="P2nassignmentmontagedemontage",bn.Paris20km="Paris20km",bn.Paris20kmassignment="Paris20kmassignment",bn.Paris20kmcontremarque="Paris20kmcontremarque",bn.Playground="Playground",bn.T24assignment="T24assignment",function(e){e.All="All",e.Public="Public",e.Private="Private"}(ge||(ge={})),(jn=he||(he={})).Category="Category",jn.Label="Label",jn.Name="Name",jn.Privacy="Privacy",function(e){e.Category="Category",e.CreatedAt="CreatedAt",e.Id="Id",e.Label="Label",e.Name="Name",e.Status="Status",e.Type="Type"}(pe||(pe={})),(Sn=fe||(fe={})).Accreditation="Accreditation",Sn.Delegation="Delegation",Sn.Event="Event",Sn.Position="Position",Sn.UserInfo="UserInfo",(yn=Ie||(Ie={})).Campaigns="Campaigns",yn.CanLeadersAddMembers="CanLeadersAddMembers",yn.CanLeadersDeleteMembers="CanLeadersDeleteMembers",yn.CanLeadersDuplicateMembers="CanLeadersDuplicateMembers",yn.CanLeadersEditColumns="CanLeadersEditColumns",yn.CanLeadersEditCustomFields="CanLeadersEditCustomFields",yn.CanLeadersEditMembers="CanLeadersEditMembers",yn.CanLeadersImportMembers="CanLeadersImportMembers",yn.CanLeadersSeeHiddenAccreditationsSlots="CanLeadersSeeHiddenAccreditationsSlots",yn.Category="Category",yn.Columns="Columns",yn.DeadlineDate="DeadlineDate",yn.DelegationsSpaceLayout="DelegationsSpaceLayout",yn.Description="Description",yn.Documents="Documents",yn.Form="Form",yn.IsLocked="IsLocked",yn.MaxResources="MaxResources",yn.Name="Name",yn.Parent="Parent",yn.ShowAllAccreditations="ShowAllAccreditations",yn.ShowFormLinkInDelegationSpace="ShowFormLinkInDelegationSpace",yn.ShowInDelegationSpace="ShowInDelegationSpace",yn.Tag="Tag",function(e){e.CreatedAt="CreatedAt",e.Id="Id",e.Name="Name"}(_e||(_e={})),function(e){e.Done="Done",e.Waiting="Waiting"}(xe||(xe={})),function(e){e.Category="Category",e.CreatedAt="CreatedAt",e.Id="Id",e.MaxResources="MaxResources",e.Name="Name"}(ye||(ye={})),(xn=Se||(Se={})).Expired="Expired",xn.Full="Full",xn.Locked="Locked",xn.Ongoing="Ongoing",function(e){e.Failed="FAILED",e.Pending="PENDING",e.Success="SUCCESS"}(je||(je={})),function(e){e.OnePerPage="OnePerPage",e.GroupedA4="GroupedA4"}(be||(be={})),function(e){e.Name="Name"}(ve||(ve={})),function(e){e.AsoPaxManifest="AsoPaxManifest",e.Assignments="Assignments",e.Badge="Badge",e.Certificate="Certificate",e.CustomBadge="CustomBadge",e.DelegationCalendar="DelegationCalendar",e.Planning="Planning",e.Position="Position",e.PositionPlanning="PositionPlanning",e.PositionsVolunteersPlanning="PositionsVolunteersPlanning",e.UserCustomDocument="UserCustomDocument",e.UserHours="UserHours",e.UserPlanning="UserPlanning",e.UserPlanningDays="UserPlanningDays",e.UserPlanningList="UserPlanningList",e.UsersPictures="UsersPictures",e.VolunteersListing="VolunteersListing"}(Ae||(Ae={})),function(e){e.Bounced="Bounced",e.Delivered="Delivered",e.Opened="Opened",e.Queued="Queued",e.Sent="Sent",e.Waiting="Waiting"}(Ce||(Ce={})),function(e){e.DoesNotExist="DoesNotExist",e.NotVerified="NotVerified",e.Verified="Verified"}(Ee||(Ee={})),(_n=Te||(Te={})).Accreditations="Accreditations",_n.AccreditationsImport="AccreditationsImport",_n.AccreditationsProfilesImport="AccreditationsProfilesImport",_n.AccreditationsRefused="AccreditationsRefused",_n.Assignments="Assignments",_n.Campaign="Campaign",_n.Code="Code",_n.DelegationCategoryLeaderAssign="DelegationCategoryLeaderAssign",_n.DelegationFormInvite="DelegationFormInvite",_n.DelegationLeaderAssign="DelegationLeaderAssign",_n.DelegationsImport="DelegationsImport",_n.Documents="Documents",_n.EventInvite="EventInvite",_n.EventsImport="EventsImport",_n.Export="Export",_n.FilesImport="FilesImport",_n.FormInvite="FormInvite",_n.FormSubmit="FormSubmit",_n.MembersImport="MembersImport",_n.NewMember="NewMember",_n.NotifyLeaders="NotifyLeaders",_n.OrganizationInvite="OrganizationInvite",_n.PositionCategoryLeaderAssign="PositionCategoryLeaderAssign",_n.PositionLeaderAssign="PositionLeaderAssign",_n.PositionsImport="PositionsImport",_n.Refused="Refused",_n.VolunteerRegistration="VolunteerRegistration",function(e){e.Description="Description",e.EndAt="EndAt",e.Name="Name",e.StartAt="StartAt",e.Tag="Tag"}(Re||(Re={})),function(e){e.Done="Done",e.Waiting="Waiting"}(Me||(Me={})),function(e){e.CreatedAt="CreatedAt",e.EndAt="EndAt",e.Id="Id",e.Name="Name",e.StartAt="StartAt"}(De||(De={})),(In=Oe||(Oe={})).Archived="Archived",In.Done="Done",In.Ongoing="Ongoing",In.Upcoming="Upcoming",function(e){e.Excel="Excel",e.Csv="CSV"}(we||(we={})),function(e){e.Done="Done",e.Waiting="Waiting"}(Pe||(Pe={})),function(e){e.Accreditation="Accreditation",e.Api="Api",e.Beta="Beta",e.Community="Community",e.Criblage="Criblage",e.CustomDocument="CustomDocument",e.Delegation="Delegation",e.Documents="Documents",e.Eid="Eid",e.KmlImport="KmlImport",e.Languages="Languages",e.Multiform="Multiform",e.Skidata="Skidata",e.Sms="Sms",e.Weezevent="Weezevent",e.Zapier="Zapier"}($e||($e={})),(fn=ke||(ke={})).BirthCity="birthCity",fn.BirthCountry="birthCountry",fn.BirthPostalCode="birthPostalCode",fn.City="city",fn.Country="country",fn.Custom="custom",fn.DateOfBirth="dateOfBirth",fn.Eid="eid",fn.FirstName="firstName",fn.Language="language",fn.LastName="lastName",fn.Nationality="nationality",fn.Phone="phone",fn.Picture="picture",fn.Population="population",fn.PostalCode="postalCode",fn.Sex="sex",fn.Street="street",function(e){e.Freeform="Freeform",e.Iban="Iban",e.Avs="Avs",e.Eid="Eid"}(Ne||(Ne={})),(pn=Le||(Le={})).Address="Address",pn.Checkbox="Checkbox",pn.Country="Country",pn.Date="Date",pn.Datetime="Datetime",pn.File="File",pn.Language="Language",pn.Nationality="Nationality",pn.Number="Number",pn.Phone="Phone",pn.Select="Select",pn.Sex="Sex",pn.Text="Text",pn.Textarea="Textarea",pn.Time="Time",pn.Validation="Validation",function(e){e.Done="Done",e.Waiting="Waiting"}(ze||(ze={})),function(e){e.Default="Default",e.Picture="Picture"}(Fe||(Fe={})),function(e){e.Address="Address",e.Campaign="Campaign",e.Checkbox="Checkbox",e.Country="Country",e.Date="Date",e.DateTimeRange="DateTimeRange",e.Datetime="Datetime",e.File="File",e.Language="Language",e.Nationality="Nationality",e.Number="Number",e.Phone="Phone",e.Select="Select",e.Sex="Sex",e.Text="Text",e.Textarea="Textarea",e.Time="Time",e.Validation="Validation"}(Ue||(Ue={})),(hn=Be||(Be={})).Field="Field",hn.Section="Section",hn.Text="Text",function(e){e.Ranked="Ranked",e.Unranked="Unranked"}(Ge||(Ge={})),function(e){e.Admin="Admin",e.DelegationsSpace="DelegationsSpace",e.Form="Form"}(Ve||(Ve={})),function(e){e.CloseWhenEventDone="CloseWhenEventDone",e.Closed="Closed",e.ClosedAt="ClosedAt",e.Open="Open"}(We||(We={})),function(e){e.Backpack="Backpack",e.BadgeCheck="BadgeCheck",e.BagShopping="BagShopping",e.Bed="Bed",e.BedBunk="BedBunk",e.Bicycle="Bicycle",e.BriefcaseMedical="BriefcaseMedical",e.BurgerSoda="BurgerSoda",e.CakeCandles="CakeCandles",e.Camera="Camera",e.Car="Car",e.CircleParking="CircleParking",e.CircleQuestion="CircleQuestion",e.Computer="Computer",e.Droplet="Droplet",e.ForkKnife="ForkKnife",e.HatCowboy="HatCowboy",e.House="House",e.LocationDot="LocationDot",e.MartiniGlass="MartiniGlass",e.Megaphone="Megaphone",e.Motorcycle="Motorcycle",e.PersonBiking="PersonBiking",e.PersonHiking="PersonHiking",e.Phone="Phone",e.ScrewdriverWrench="ScrewdriverWrench",e.Shirt="Shirt",e.SignsPost="SignsPost",e.Star="Star",e.Ticket="Ticket",e.UserPolice="UserPolice",e.WalkieTalkie="WalkieTalkie"}(qe||(qe={})),function(e){e.Create="Create",e.Upsert="Upsert",e.Update="Update"}(Ye||(Ye={})),function(e){e.Overdue="Overdue",e.Paid="Paid",e.Refunded="Refunded",e.Waiting="Waiting",e.WrittenOff="WrittenOff"}(He||(He={})),function(e){e.Mandarin="Mandarin",e.Spanish="Spanish",e.English="English",e.Hindi="Hindi",e.Bengali="Bengali",e.Portuguese="Portuguese",e.Russian="Russian",e.Japanese="Japanese",e.Punjabi="Punjabi",e.Turkish="Turkish",e.Korean="Korean",e.French="French",e.German="German",e.Vietnamese="Vietnamese",e.Tamil="Tamil",e.Urdu="Urdu",e.Javanese="Javanese",e.Italian="Italian",e.Persian="Persian",e.Polish="Polish",e.Ukrainian="Ukrainian",e.Romanian="Romanian",e.Dutch="Dutch"}(Ze||(Ze={})),function(e){e.Default="Default",e.Dot="Dot",e.Badge="Badge"}(Ke||(Ke={})),function(e){e.App="App",e.DelegationsSpace="DelegationsSpace",e.MembersSpace="MembersSpace",e.VolunteerAssignments="VolunteerAssignments",e.VolunteerRegister="VolunteerRegister"}(Qe||(Qe={})),function(e){e.Google="Google",e.GoogleSatellite="GoogleSatellite",e.IgnPlan="IgnPlan"}(Xe||(Xe={})),function(e){e.Add="Add",e.Delete="Delete",e.Replace="Replace"}(Je||(Je={})),function(e){e.Add="Add",e.Replace="Replace",e.Reset="Reset"}(et||(et={})),function(e){e.Categories="Categories",e.Positions="Positions"}(tt||(tt={})),(gn=nt||(nt={})).Both="Both",gn.Event="Event",gn.Organization="Organization",function(e){e.Id="Id",e.InsertedAt="InsertedAt",e.PeriodEndAt="PeriodEndAt",e.WeezeventOrganizationId="WeezeventOrganizationId"}(it||(it={})),function(e){e.A4Portrait="A4Portrait",e.A4Landscape="A4Landscape",e.A5Portrait="A5Portrait",e.A6Portrait="A6Portrait"}(at||(at={})),function(e){e.List="List",e.Radio="Radio"}(st||(st={})),(mn=ot||(ot={})).Acronym="Acronym",mn.Address="Address",mn.Category="Category",mn.Color="Color",mn.Description="Description",mn.Icon="Icon",mn.Latitude="Latitude",mn.Layer="Layer",mn.Longitude="Longitude",mn.Name="Name",mn.Tag="Tag",mn.Traces="Traces",mn.WeezeventIsSynchronized="WeezeventIsSynchronized",mn.Zoom="Zoom",function(e){e.CreatedAt="CreatedAt",e.Id="Id",e.Name="Name"}(rt||(rt={})),function(e){e.Done="Done",e.Waiting="Waiting"}(dt||(dt={})),function(e){e.EndDate="EndDate",e.EndTime="EndTime",e.Resources="Resources",e.StartDate="StartDate",e.StartTime="StartTime"}(lt||(lt={})),function(e){e.Add="Add",e.Replace="Replace",e.Subtract="Subtract"}(ct||(ct={})),function(e){e.Acronym="Acronym",e.Category="Category",e.CreatedAt="CreatedAt",e.Id="Id",e.Name="Name",e.Position="Position",e.Range="Range"}(ut||(ut={})),function(e){e.Acronym="Acronym",e.Category="Category",e.CreatedAt="CreatedAt",e.Id="Id",e.Name="Name",e.Slot="Slot"}(mt||(mt={})),function(e){e.Empty="Empty",e.Partial="Partial",e.Full="Full"}(gt||(gt={})),(un=ht||(ht={})).Between="between",un.Contains="contains",un.EndsWith="endsWith",un.EngulfedBy="engulfedBy",un.Engulfs="engulfs",un.GreaterThan="greaterThan",un.GreaterThanEqual="greaterThanEqual",un.Is="is",un.IsAfter="isAfter",un.IsBefore="isBefore",un.IsEmpty="isEmpty",un.IsInLast="isInLast",un.IsInNext="isInNext",un.IsMoreThanAgo="isMoreThanAgo",un.IsMoreThanAhead="isMoreThanAhead",un.IsNot="isNot",un.IsNotEmpty="isNotEmpty",un.IsNotValid="isNotValid",un.IsValid="isValid",un.LessThan="lessThan",un.LessThanEqual="lessThanEqual",un.NotContains="notContains",un.NotEngulfedBy="notEngulfedBy",un.NotEngulfs="notEngulfs",un.NotOverlaps="notOverlaps",un.Overlaps="overlaps",un.StartsWith="startsWith",un.ThisDayMonth="thisDayMonth",un.Today="today",(cn=pt||(pt={})).And="and",cn.Or="or",function(e){e.EventNotLinked="EventNotLinked",e.GroupsUnreachable="GroupsUnreachable",e.GroupNotFound="GroupNotFound",e.Unexpected="Unexpected"}(ft||(ft={})),function(e){e.Paper="Paper",e.Ticket="Ticket",e.Wristband="Wristband"}(It||(It={})),function(e){e.OrganizationNotLinked="OrganizationNotLinked",e.PartnersUnreachable="PartnersUnreachable",e.PartnerNotFound="PartnerNotFound",e.EventNotLinked="EventNotLinked",e.GroupsUnreachable="GroupsUnreachable",e.GroupNotFound="GroupNotFound",e.DocumentNotFound="DocumentNotFound"}(_t||(_t={})),function(e){e.ActivationRange="ActivationRange",e.CreatedAt="CreatedAt",e.Document="Document",e.Id="Id",e.MediaType="MediaType",e.PrinterGroup="PrinterGroup",e.Status="Status",e.WeezaccessPartner="WeezaccessPartner"}(xt||(xt={})),function(e){e.Active="Active",e.Past="Past",e.Upcoming="Upcoming"}(yt||(yt={})),function(e){e.Accreditation="Accreditation",e.None="None"}(St||(St={})),function(e){e.AllDays="AllDays",e.DaysWithSlots="DaysWithSlots"}(jt||(jt={})),function(e){e.Category="Category",e.Position="Position",e.Slot="Slot",e.None="None"}(bt||(bt={})),function(e){e.FilterWithSlots="FilterWithSlots",e.None="None"}(vt||(vt={})),(ln=At||(At={})).Calendar="Calendar",ln.Custom="Custom",ln.Display="Display",ln.DisplayDays="DisplayDays",ln.Hide="Hide",(dn=Ct||(Ct={})).DelegationCategory="DelegationCategory",dn.Event="Event",dn.Organization="Organization",dn.Position="Position",function(e){e.Custom="Custom",e.DelegationCategoryLeader="DelegationCategoryLeader",e.EventAdmin="EventAdmin",e.EventReader="EventReader",e.OrganizationAdmin="OrganizationAdmin",e.OrganizationReader="OrganizationReader",e.PositionEditor="PositionEditor",e.PositionReader="PositionReader"}(Et||(Et={})),function(e){e.Accreditations="Accreditations",e.AccreditationsProfiles="AccreditationsProfiles",e.Campaigns="Campaigns",e.CustomFields="CustomFields",e.Delegations="Delegations",e.Events="Events",e.Positions="Positions",e.Volunteers="Volunteers",e.Workflows="Workflows"}(Tt||(Tt={})),function(e){e.Female="Female",e.Male="Male",e.Nonbinary="Nonbinary",e.Notsay="Notsay",e.Other="Other"}(Rt||(Rt={})),function(e){e.Asc="Asc",e.Desc="Desc"}(Mt||(Mt={})),function(e){e.DelegationSpace="DelegationSpace",e.EventsShowcase="EventsShowcase",e.MembersSpace="MembersSpace"}(Dt||(Dt={})),(rn=Ot||(Ot={})).De="De",rn.En="En",rn.Es="Es",rn.Fr="Fr",rn.Keys="Keys",rn.Nl="Nl",function(e){e.Accreditations="Accreditations",e.Delegations="Delegations",e.Events="Events",e.Positions="Positions",e.UsersInfos="UsersInfos"}(wt||(wt={})),function(e){e.WithReplies="WithReplies",e.WithUnreadReplies="WithUnreadReplies",e.WithoutReplies="WithoutReplies"}(Pt||(Pt={})),function(e){e.Delivered="Delivered",e.InvalidNumber="InvalidNumber",e.Other="Other",e.Refused="Refused",e.Sent="Sent",e.Undelivered="Undelivered",e.Waiting="Waiting"}($t||($t={})),function(e){e.None="None",e.Backward="Backward",e.Forward="Forward"}(kt||(kt={})),function(e){e.Accreditation="Accreditation",e.CustomField="CustomField",e.CustomSlot="CustomSlot",e.Delegation="Delegation",e.Document="Document",e.Email="Email",e.Event="Event",e.Form="Form",e.Other="Other",e.Position="Position"}(Nt||(Nt={})),function(e){e.NotTranslated="NotTranslated",e.Translated="Translated",e.TranslatedAndNotTranslated="TranslatedAndNotTranslated"}(Lt||(Lt={})),function(e){e.String="String",e.StringArray="StringArray",e.RichText="RichText"}(zt||(zt={})),function(e){e.Admin="Admin",e.Leader="Leader"}(Ft||(Ft={})),function(e){e.Email="Email",e.FirstName="FirstName",e.Id="Id",e.InsertedAt="InsertedAt",e.LastName="LastName",e.LastSeenAt="LastSeenAt",e.LocalId="LocalId",e.Name="Name",e.UpdatedAt="UpdatedAt"}(Ut||(Ut={})),(on=Bt||(Bt={})).Assigned="Assigned",on.NotApplicable="NotApplicable",on.PreAssigned="PreAssigned",on.Refused="Refused",on.WaitingAssignment="WaitingAssignment",function(e){e.Done="Done",e.Waiting="Waiting"}(Gt||(Gt={})),function(e){e.AccreditationState="AccreditationState",e.Delegation="Delegation",e.Email="Email",e.FirstName="FirstName",e.Id="Id",e.InsertedAt="InsertedAt",e.LastName="LastName",e.LocalId="LocalId",e.Name="Name",e.OrganizationLocalId="OrganizationLocalId",e.PairedAt="PairedAt",e.State="State",e.TeamCode="TeamCode",e.UpdatedAt="UpdatedAt"}(Vt||(Vt={})),function(e){e.OrganizationNotLinked="OrganizationNotLinked",e.PartnersUnreachable="PartnersUnreachable",e.PartnerNotFound="PartnerNotFound",e.Unexpected="Unexpected"}(Wt||(Wt={})),(sn=qt||(qt={})).AddAccreditations="AddAccreditations",sn.AddDelegationPermissions="AddDelegationPermissions",sn.AddEvent="AddEvent",sn.AddPositions="AddPositions",sn.CreateDelegation="CreateDelegation",sn.DeleteAccreditations="DeleteAccreditations",sn.DeleteDelegationPermissions="DeleteDelegationPermissions",sn.DeletePositions="DeletePositions",sn.DuplicateMember="DuplicateMember",sn.LockDelegation="LockDelegation",sn.SendCampaign="SendCampaign",sn.SetCustomField="SetCustomField",sn.UnlockDelegation="UnlockDelegation",(an=Yt||(Yt={})).EveryMinute="EveryMinute",an.Every2Minutes="Every2Minutes",an.Every5Minutes="Every5Minutes",an.Every10Minutes="Every10Minutes",function(e){e.Revert="Revert",e.Keep="Keep"}(Ht||(Ht={})),(nn=Zt||(Zt={})).Frequency="Frequency",nn.Name="Name",nn.State="State",function(e){e.DelegationsLeaders="DelegationsLeaders",e.PositionsLeaders="PositionsLeaders",e.UsersInfosIds="UsersInfosIds",e.View="View"}(Kt||(Kt={})),function(e){e.CreatedAt="CreatedAt",e.ExecutedAt="ExecutedAt",e.Id="Id",e.Name="Name",e.VolunteersSegment="VolunteersSegment"}(Qt||(Qt={})),(tn=Xt||(Xt={})).Active="Active",tn.Error="Error",tn.Paused="Paused",(en=Jt||(Jt={})).Assigned="Assigned",en.DelegationsSegment="DelegationsSegment",en.FormSubmit="FormSubmit",en.VolunteersSegment="VolunteersSegment",Object.keys(V);const Tn=Object.keys(W),Rn=(Object.keys(q),Object.keys(Y),Object.keys(H),Object.keys(Z),Object.keys(K),Object.keys(Q),Object.keys(X),Object.keys(J)),Mn=(Object.keys(ee),Object.keys(te),Object.keys(ne)),Dn=Object.keys(ie),On=(Object.keys(ae),Object.keys(se),Object.keys(oe)),wn=Object.keys(re),Pn=(Object.keys(de),Object.keys(le)),$n=(Object.keys(ce),Object.keys(ue),Object.keys(me)),kn=(Object.keys(ge),Object.keys(he),Object.keys(pe),Object.keys(fe)),Nn=(Object.keys(Ie),Object.keys(_e),Object.keys(xe),Object.keys(ye),Object.keys(Se)),Ln=(Object.keys(je),Object.keys(be),Object.keys(ve),Object.keys(Ae),Object.keys(Ce)),zn=(Object.keys(Ee),Object.keys(Te)),Fn=(Object.keys(Re),Object.keys(Me),Object.keys(De),Object.keys(Oe),Object.keys(we),Object.keys(Pe),Object.keys($e)),Un=(Object.keys(ke),Object.keys(Ne)),Bn=Object.keys(Le),Gn=(Object.keys(ze),Object.keys(Fe)),Vn=(Object.keys(Ue),Object.keys(Be),Object.keys(Ge)),Wn=(Object.keys(Ve),Object.keys(We)),qn=Object.keys(qe),Yn=Object.keys(Ye),Hn=(Object.keys(He),Object.keys(Ze)),Zn=Object.keys(Ke),Kn=(Object.keys(Qe),Object.keys(Xe)),Qn=Object.keys(Je),Xn=Object.keys(et),Jn=Object.keys(tt),ei=(Object.keys(nt),Object.keys(it),Object.keys(at),Object.keys(st)),ti=(Object.keys(ot),Object.keys(rt),Object.keys(dt),Object.keys(lt)),ni=Object.keys(ct),ii=(Object.keys(ut),Object.keys(mt),Object.keys(gt)),ai=(Object.keys(ht),Object.keys(pt),Object.keys(ft),Object.keys(It),Object.keys(_t),Object.keys(xt),Object.keys(yt),Object.keys(St)),si=Object.keys(jt),oi=Object.keys(bt),ri=Object.keys(vt),di=Object.keys(At),li=Object.keys(Ct),ci=(Object.keys(Et),Object.keys(Tt),Object.keys(Rt)),ui=(Object.keys(Mt),Object.keys(Dt),Object.keys(Ot),Object.keys(wt),Object.keys(Pt),Object.keys($t)),mi=(Object.keys(kt),Object.keys(Nt),Object.keys(Lt),Object.keys(zt),Object.keys(Ft),Object.keys(Ut),Object.keys(Bt)),gi=(Object.keys(Gt),Object.keys(Vt),Object.keys(Wt),Object.keys(qt)),hi=Object.keys(Yt),pi=Object.keys(Ht),fi=(Object.keys(Zt),Object.keys(Kt)),Ii=(Object.keys(Qt),Object.keys(Xt)),_i=Object.keys(Jt),xi=["insertedAt","updatedAt","checkInAt","date","sentAt","scheduledAt","deletedAt","lockedAt","bouncedAt","complaintAt","deliveredAt","rejectedAt","openedAt","clickedAt","queuedAt","closedAt","periodEndAt","checkOutAt","validatedAt","receptionDate","startAt","termsAcceptedAt","lastSeenAt","registrationDate","pairedAt","executedAt"],yi=["date","calendarInviteStartDate","calendarInviteEndDate","startDate","endDate","deadlineDate","minAccreditationSlotDate","startAt","endAt","paidAt"],Si=["range","ranges","activationRange"],ji=["assignedDuration","duration"];let bi=class{language;translations;constructor(e,t){this.language=e,this.translations=t}translate(e,...t){if("production"!==s.Test||process.env.JEST_WORKER_ID){let n=this.translations[e]||e;const i=this.translations[`${e}_plural`];return i&&"number"==typeof t[0]&&t[0]>1&&(n=i),Array.isArray(t)&&t.length>0&&(n=t.reduce((e,t,n)=>e.replaceAll(`{${n+1}}`,t),n)),n}return`${e} - ${JSON.stringify(t)}`}*interpolateWithComponents(e,...t){let n=0;for(const[a,s]of e.split(/{\d+}/).entries())n>0&&(yield(0,i.jsx)(d.Fragment,{children:t[a-1]},n)),n++,yield s}formatListValues(e,t="disjunction"){return new Intl.ListFormat(this.language.toLowerCase(),{style:"long",type:t}).format(e)}};bi=function(e,t,n,i){var a,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(a=e[r])&&(o=(s<3?a(o):s>3?a(t,n,o):a(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o}([(0,En._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[String,Object])],bi);const vi=(0,d.createContext)({}),Ai=vi.Consumer;function Ci(e){return(0,d.useContext)(vi).container.get(e)}function Ei(){const e=(0,d.useContext)(vi).container.get(bi);return e.translate.bind(e)}function Ti(){const e=(0,d.useContext)(vi).container.get(bi);return e.interpolateWithComponents.bind(e)}function Ri(e,t,n=[]){const i="production"!==s.Test?e:e.loc.source.body;return(0,d.useContext)(vi).useQuery(i,t,n)}function Mi(e,t={}){return(0,d.useContext)(vi).useMutation(e,t)}function Di(){return(0,d.useContext)(vi).useParams()}function Oi(){return(0,d.useContext)(vi).useHistory()}function wi(){return(0,d.useContext)(vi).useLocalStorage()}var Pi=n(5126);function $i(e){if(e){const[t,n,i]=e.split(" ");return{color:t,fontSize:n,fontWeight:i}}return{}}const ki=j("div",{variants:{color:{inherit:{color:"inherit"},cyan:{color:"$cyan"},gray25:{color:"$gray25"},gray50:{color:"$gray50"},grayCustom50:{color:"$grayCustom50"},gray100:{color:"$gray100"},gray200:{color:"$gray200"},gray300:{color:"$gray300"},gray400:{color:"$gray400"},gray500:{color:"$gray500"},grayCustom500:{color:"$grayCustom500"},gray600:{color:"$gray600"},gray700:{color:"$gray700"},grayCustom700:{color:"$grayCustom700"},gray800:{color:"$gray800"},grayCustom800:{color:"$grayCustom800"},gray900:{color:"$gray900"},grayCustom900:{color:"$grayCustom900"},grayDark50:{color:"$grayDark50"},grayDark100:{color:"$grayDark100"},grayDark500:{color:"$grayDark500"},grayDark700:{color:"$grayDark700"},primary25:{color:"$primary25"},primary50:{color:"$primary50"},primary100:{color:"$primary100"},primary200:{color:"$primary200"},primary300:{color:"$primary300"},primary400:{color:"$primary400"},primary500:{color:"$primary500"},primaryCustom500:{color:"$primaryCustom500"},primary600:{color:"$primary600"},primaryCustom600:{color:"$primaryCustom600"},primary700:{color:"$primary700"},primary800:{color:"$primary800"},primary900:{color:"$primary900"},primary950:{color:"$primary950"},error25:{color:"$error25"},error50:{color:"$error50"},error100:{color:"$error100"},error200:{color:"$error200"},error300:{color:"$error300"},error400:{color:"$error400"},error500:{color:"$error500"},error600:{color:"$error600"},error700:{color:"$error700"},error800:{color:"$error800"},error900:{color:"$error900"},warning25:{color:"$warning25"},warning50:{color:"$warning50"},warning100:{color:"$warning100"},warning200:{color:"$warning200"},warning300:{color:"$warning300"},warning400:{color:"$warning400"},warning500:{color:"$warning500"},warning600:{color:"$warning600"},warning700:{color:"$warning700"},warning800:{color:"$warning800"},warning900:{color:"$warning900"},success25:{color:"$success25"},success50:{color:"$success50"},success100:{color:"$success100"},success200:{color:"$success200"},success300:{color:"$success300"},success400:{color:"$success400"},success500:{color:"$success500"},success600:{color:"$success600"},success700:{color:"$success700"},success800:{color:"$success800"},success900:{color:"$success900"},blue25:{color:"$blue25"},blue50:{color:"$blue50"},blue100:{color:"$blue100"},blue200:{color:"$blue200"},blue300:{color:"$blue300"},blue400:{color:"$blue400"},blue500:{color:"$blue500"},blue600:{color:"$blue600"},blue700:{color:"$blue700"},blue800:{color:"$blue800"},blue900:{color:"$blue900"},blueGray25:{color:"$blueGray25"},blueGray50:{color:"$blueGray50"},blueGray100:{color:"$blueGray100"},blueGray200:{color:"$blueGray200"},blueGray300:{color:"$blueGray300"},blueGray400:{color:"$blueGray400"},blueGray500:{color:"$blueGray500"},blueGray600:{color:"$blueGray600"},blueGray700:{color:"$blueGray700"},blueGray800:{color:"$blueGray800"},blueGray900:{color:"$blueGray900"},blueLight50:{color:"$blueLight50"},blueLight100:{color:"$blueLight100"},blueLight400:{color:"$blueLight400"},blueLight500:{color:"$blueLight500"},blueLight600:{color:"$blueLight600"},blueLight700:{color:"$blueLight700"},blueLight900:{color:"$blueLight900"},purple25:{color:"$purple25"},purple50:{color:"$purple50"},purple100:{color:"$purple100"},purple200:{color:"$purple200"},purple300:{color:"$purple300"},purple400:{color:"$purple400"},purple500:{color:"$purple500"},purple600:{color:"$purple600"},purple700:{color:"$purple700"},purple800:{color:"$purple800"},purple900:{color:"$purple900"},purpleLight50:{color:"$purpleLight50"},purpleLight100:{color:"$purpleLight100"},purpleLight500:{color:"$purpleLight500"},purpleLight700:{color:"$purpleLight700"},purpleDark50:{color:"$purpleDark50"},purpleDark100:{color:"$purpleDark100"},purpleDark500:{color:"$purpleDark500"},purpleDark700:{color:"$purpleDark700"},pink25:{color:"$pink25"},pink50:{color:"$pink50"},pink100:{color:"$pink100"},pink200:{color:"$pink200"},pink300:{color:"$pink300"},pink400:{color:"$pink400"},pink500:{color:"$pink500"},pink600:{color:"$pink600"},pink700:{color:"$pink700"},pink800:{color:"$pink800"},pink900:{color:"$pink900"},orange50:{color:"$orange50"},orange100:{color:"$orange100"},orange400:{color:"$orange400"},orange500:{color:"$orange500"},orange600:{color:"$orange600"},orange700:{color:"$orange700"},redLight50:{color:"$redLight50"},redLight100:{color:"$redLight100"},redLight500:{color:"$redLight500"},redLight700:{color:"$redLight700"},redDark50:{color:"$redDark50"},redDark100:{color:"$redDark100"},redDark500:{color:"$redDark500"},redDark700:{color:"$redDark700"},green50:{color:"$green50"},green100:{color:"$green100"},green500:{color:"$green500"},green700:{color:"$green700"},greenDark50:{color:"$greenDark50"},greenDark100:{color:"$greenDark100"},greenDark500:{color:"$greenDark500"},greenDark700:{color:"$greenDark700"},brown50:{color:"$brown50"},brown100:{color:"$brown100"},brown500:{color:"$brown500"},brown700:{color:"$brown700"},indigo100:{color:"$indigo100"},indigo600:{color:"$indigo600"},white:{color:"white"}},fontSize:{inherit:{fontSize:"inherit"},textXs:{fontSize:"$textXs"},textSm:{fontSize:"$textSm"},textMd:{fontSize:"$textMd"},textLg:{fontSize:"$textLg"},textXl:{fontSize:"$textXl"},displayXs:{fontSize:"$displayXs"},displaySm:{fontSize:"$displaySm"},displayMd:{fontSize:"$displayMd"},displayLg:{fontSize:"$displayLg"},displayXl:{fontSize:"$displayXl"},display2Xl:{fontSize:"$display2Xl"}},fontWeight:{inherit:{fontWeight:"inherit"},regular:{fontWeight:"$regular"},medium:{fontWeight:"$medium"},semiBold:{fontWeight:"$semiBold"},bold:{fontWeight:"$bold"}},textAlign:{start:{textAlign:"start"},end:{textAlign:"end"},center:{textAlign:"center"},justify:{textAlign:"justify"}},ellipsis:{true:{ellipsis:""}}},defaultVariants:{color:"inherit",fontSize:"inherit",fontWeight:"inherit",textAlign:"start"}}),Ni=d.forwardRef((e,t)=>{const n={};return e.height&&(n.height=O(e.height)),e.width&&(n.width=O(e.width)),(0,i.jsx)(ki,{...(0,Pi.A)(e,"font"),...$i(e.font),ref:t,css:{...n,...e.css}})});Ni.displayName="Box";var Li=n(8174),zi=n(4625),Fi=n(9191);function Ui(e){try{return Buffer.from(e,"base64").toString()}catch{try{return atob(e)}catch{return""}}}class Bi extends URL{subdomain;basename;constructor(e,t,n,i){if(n&&("string"==typeof e?e=`${n}.${e}`:"object"==typeof e&&(e.host=`${n}.${e.host}`)),i&&("string"==typeof e?e=`${e}/${i}`:"object"==typeof e&&(e.pathname=`/${i}`)),!URL.canParse(e)&&(e=`https://${e}`,!URL.canParse(e)))throw new Error(`Invalid URL ${e}`);super(e,t),this.subdomain=n,this.basename=i}set pathname(e){super.pathname=`${this.basename?this.basename:""}${e}`}get pathname(){return"/"!==super.pathname?super.pathname:""}get pathnameOptional(){return"/"!==super.pathname?super.pathname:void 0}get href(){return"/"!==super.pathname?super.href:super.href.substring(0,super.href.length-1)}toString(){return this.href}}const Gi="undefined"!=typeof process&&h(process?.env?.SECRETS_PATH)?process.env.SECRETS_PATH:null,Vi="undefined"!=typeof process?(0,Fi.existsSync)(`${Gi}/HEAVENT_SECRETS`)?JSON.parse(Ui((0,Fi.readFileSync)(`${Gi}/HEAVENT_SECRETS`,"utf-8"))):h(process?.env?.HEAVENT_SECRETS)?JSON.parse(Ui(process.env.HEAVENT_SECRETS)):null:null,Wi=e=>{if("object"==typeof window&&void 0!==window[e])return window[e];if(void 0!==Vi?.[e])return Vi[e];throw new Error(`Missing env. var. ${e}`)},qi=e=>"object"==typeof window&&void 0!==window[e]?window[e]:void 0!==Vi?.[e]?Vi[e]:void 0,Yi=e=>{const t=Wi(e);return"boolean"==typeof t?t:"true"===t},Hi=Wi("HEAVENT_APPLICATION_DOMAIN"),Zi=qi("HEAVENT_RESOURCES_DOMAIN")??Hi,Ki=qi("HEAVENT_ASSETS_DOMAIN")??Zi,Qi=qi("HEAVENT_APP_SUBDOMAIN")??"admin",Xi=qi("HEAVENT_API_SUBDOMAIN")??"api",Ji=qi("HEAVENT_PUBLIC_SUBDOMAIN")??"widget",ea=qi("HEAVENT_INVOICES_SUBDOMAIN")??"invoices",ta=qi("HEAVENT_ASSETS_SUBDOMAIN")??"assets",na=qi("HEAVENT_UPLOADS_SUBDOMAIN")??"uploads",ia=qi("HEAVENT_APPLICATION_BASENAME")??"crew",aa=qi("HEAVENT_RESOURCES_BASENAME")??"",sa={ADMINS:Wi("HEAVENT_ADMINS"),EMAIL_FROM:Wi("HEAVENT_EMAIL_FROM"),EMAIL_FROM_NAME:Wi("HEAVENT_EMAIL_FROM_NAME"),EMAIL_PICTURE_LINK:Wi("HEAVENT_EMAIL_PICTURE_LINK"),HEAVENT_APPLICATION_DOMAIN:Hi,HEAVENT_RESOURCES_DOMAIN:Zi,HEAVENT_ASSETS_DOMAIN:Ki,HEAVENT_APPLICATION_BASENAME:ia,HEAVENT_APP_URL:new Bi(qi("HEAVENT_APP_DOMAIN")??Hi,void 0,Qi,qi("HEAVENT_APP_BASENAME")??ia),HEAVENT_API_URL:new Bi(qi("HEAVENT_API_DOMAIN")??Hi,void 0,Xi,qi("HEAVENT_API_BASENAME")??ia),HEAVENT_PUBLIC_URL:new Bi(qi("HEAVENT_PUBLIC_DOMAIN")??Hi,void 0,Ji,qi("HEAVENT_PUBLIC_BASENAME")??ia),HEAVENT_ASSETS_URL:new Bi(Ki,void 0,ta,qi("HEAVENT_ASSETS_BASENAME")??aa),HEAVENT_INVOICES_URL:new Bi(qi("HEAVENT_INVOICES_DOMAIN")??Zi,void 0,ea,qi("HEAVENT_INVOICES_BASENAME")??aa),HEAVENT_UPLOADS_URL:new Bi(qi("HEAVENT_UPLOADS_DOMAIN")??Zi,void 0,na,qi("HEAVENT_UPLOADS_BASENAME")??aa),USE_HUBSPOT:Yi("HEAVENT_USE_HUBSPOT"),USE_INTERCOM:Yi("HEAVENT_USE_INTERCOM"),FORCE_WHITE_LABEL_FOR_ORGANIZATION_ID:qi("HEAVENT_FORCE_WHITE_LABEL_FOR_ORGANIZATION_ID"),HIGHLIGHT_CUSTOM_COLOURS:(()=>{const e=qi("HEAVENT_HIGHLIGHT_CUSTOM_COLOURS");return void 0!==e?"boolean"==typeof e?e:"true"===e:void 0})(),COGNITO_USER_POOL_ID:Wi("HEAVENT_COGNITO_USER_POOL_ID"),COGNITO_USER_POOL_CLIENT_ID:Wi("HEAVENT_COGNITO_USER_POOL_CLIENT_ID"),COGNITO_DOMAIN_URL:Wi("HEAVENT_COGNITO_DOMAIN_URL"),COGNITO_CLIENT_CALLBACK_URL:Wi("HEAVENT_COGNITO_CLIENT_CALLBACK_URL")[0],USE_MIXPANEL:Yi("HEAVENT_USE_MIXPANEL"),MIXPANEL_TOKEN:Yi("HEAVENT_MIXPANEL_TOKEN"),HEAVENT_AWS_UPLOADS_BUCKET:Wi("HEAVENT_AWS_UPLOADS_BUCKET"),LOG_TOKEN:Wi("HEAVENT_LOG_TOKEN"),WEEZEVENT_DOMAIN:Wi("HEAVENT_WEEZEVENT_DOMAIN")},oa=["access","ticket","pay"],ra=({children:e,height:t,replace:n,style:a,to:s,width:o,...r})=>{const d=new URL(s.toString(),location.origin),l={};t&&(l.height=O(t)),o&&(l.width=O(o));const c={alignItems:"inherit",color:"inherit",cursor:"pointer",display:"inherit",flexDirection:"inherit",flexWrap:"inherit",gap:"inherit",justifyContent:"inherit",textDecoration:"none",...l,...a};return d.origin!==location.origin||oa.includes(d.pathname.split("/")[1])?(0,i.jsx)("a",{href:d.href,rel:"noreferrer",style:c,target:"_blank",...r,children:e}):(0,i.jsx)(zi.N_,{replace:n,style:c,to:{pathname:h(sa.HEAVENT_APPLICATION_BASENAME)?d.pathname.replace(new RegExp(`^/${sa.HEAVENT_APPLICATION_BASENAME}`,"gm"),""):d.pathname,hash:d.hash,search:d.search},...r,children:e})};function da(e){return(0,Li.A)(e)}ra.displayName="LinkWrapper";const la=e=>{const t=e.iconStyle??"regular",n={};e.primaryColor&&(n["--fa-primary-color"]=e.primaryColor),e.secondaryColor&&(n["--fa-secondary-color"]=e.secondaryColor,n["--fa-secondary-opacity"]="1");const a=()=>(0,i.jsx)("i",{"aria-hidden":e["aria-hidden"]??!0,className:`fa-${t} fa-${e.icon} ${e.className||""}`,role:e.role,style:{...n,cursor:e.title?"help":"inherit"},title:e.title,onClick:e.to?void 0:e.onClick});return e.to?(0,i.jsx)(ra,{target:e.target,to:e.to,onClick:e.onClick,children:a()}):a()},ca=e=>(0,d.createElement)("svg",{width:e.width,height:e.height,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 100 100",preserveAspectRatio:"xMidYMid",className:"lds-rolling","data-testid":"loader",style:{background:"none"}},(0,d.createElement)("circle",{cx:"50",cy:"50",fill:"none",stroke:e.color,strokeWidth:e.strokeWidth,r:"16",strokeDasharray:"75.39822368615503 27.132741228718345",transform:"rotate(120 50 50)"},(0,d.createElement)("animateTransform",{attributeName:"transform",type:"rotate",calcMode:"linear",values:"0 50 50;360 50 50",keyTimes:"0;1",dur:"1s",begin:"0s",repeatCount:"indefinite"}))),ua=(0,d.memo)(function(){return(0,i.jsx)($,{align:"center",height:1,justify:"center",width:1,children:(0,i.jsx)(ca,{color:"#162131",height:"200px",strokeWidth:"2",width:"200px"})})}),ma={alignItems:"center",borderRadius:"$1",cursor:"pointer",display:"flex",fontWeight:"$semiBold",gap:"$2",padding:"$1 $4",userSelect:"none","& .loader":{borderRadius:"$1"},variants:{color:{primary:{background:"$primaryCustom500",border:"1px solid $primaryCustom500",color:"white","&:hover":{background:"$primaryCustom600",border:"1px solid $primaryCustom600"},"& .loader":{background:"$primaryCustom500",border:"1px solid $primaryCustom500"},"& .loader:hover":{background:"$primary600",border:"1px solid $primary600"}},gray:{background:"$gray100",border:"1px solid $gray100",color:"$gray800","&:hover":{background:"$gray100",border:"1px solid $gray100"},"& .loader":{background:"$gray100",border:"1px solid $gray100"},"& .loader:hover":{background:"$gray100",border:"1px solid $gray100"}},white:{background:"white",border:"1px solid $gray300",color:"$grayCustom700","&:hover":{background:"$grayCustom50",color:"$grayCustom800"},"& .loader":{background:"white",border:"1px solid $gray300"},"& .loader:hover":{background:"$gray50",color:"$gray800"}},error:{background:"$error600",border:"1px solid $error600",color:"white","&:hover":{background:"$error700",border:"1px solid $error600"},"& .loader":{background:"$error600",border:"1px solid $error600"},"& .loader:hover":{background:"$error700",border:"1px solid $error600"}},invisible:{background:"none",border:"none",color:"$primaryCustom500",fontSize:"$textSm",fontWeight:"$medium",padding:"$1 $2","&:hover":{color:"$primaryCustom600"},"& .h-button-content:has( + .loader)":{color:"transparent"}},"invisible-gray":{background:"none",border:"none",color:"$gray700",fontSize:"$textSm",fontWeight:"$medium",padding:"$1 $2","&:hover":{color:"$gray900"},"& .h-button-content:has( + .loader)":{color:"transparent"}}},disabled:{true:{cursor:"not-allowed"}},size:{sm:{height:"32px",fontSize:"$textSm"},md:{height:"40px",fontSize:"$textSm"},lg:{height:"44px",fontSize:"$textMd"},xl:{height:"48px",fontSize:"$textMd"},"2xl":{height:"60px",fontSize:"$textLg"}},iconOnly:{true:{justifyContent:"center",px:"0"}}},compoundVariants:[{color:"primary",disabled:!0,css:{color:"$gray400",background:"$gray100",border:"1px solid $gray100","&:hover":{background:"$gray100",border:"1px solid $gray100"},"& .loader":{background:"$gray100",border:"1px solid $gray100"},"& .loader:hover":{background:"$gray100",border:"1px solid $gray100"}}},{color:"gray",disabled:!0,css:{background:"$gray50",border:"1px solid $gray50",color:"$gray400","&:hover":{background:"$gray50",border:"1px solid $gray50"},"& .loader":{background:"$gray50",border:"1px solid $gray50"},"& .loader:hover":{background:"$gray50",border:"1px solid $gray50"}}},{color:"transparent",disabled:!0,css:{color:"$gray400",background:"$primary100",border:"1px solid $primary100","&:hover":{color:"$gray400",background:"$primary100",border:"1px solid $primary100"},"& .loader":{background:"$primary100",border:"1px solid $primary100"},"& .loader:hover":{background:"$primary100",border:"1px solid $primary100"}}},{color:"invisible",disabled:!0,css:{color:"$gray400","&:hover":{color:"$gray400"}}},{color:"invisible-gray",disabled:!0,css:{color:"$gray400","&:hover":{color:"$gray400"}}},{color:"error",disabled:!0,css:{background:"$error200",border:"1px solid $error200","&:hover":{background:"$error200",border:"1px solid $error200"},"& .loader":{background:"$error200",border:"1px solid $error200"},"& .loader:hover":{background:"$error200",border:"1px solid $error200"}}},{size:"sm",iconOnly:!0,css:{width:"32px"}},{size:"md",iconOnly:!0,css:{width:"40px"}},{size:"lg",iconOnly:!0,css:{width:"44px"}},{size:"xl",iconOnly:!0,css:{width:"48px"}},{size:"2xl",iconOnly:!0,css:{width:"56px"}}],defaultVariants:{color:"primary",size:"md"}},ga=j("button",ma),ha=j("div",ma),pa=d.forwardRef(({children:e,className:t,color:n,css:a,disabled:s,featureFlags:o,isLoading:r,leftIcon:d,onClick:l,to:c,rightIcon:u,size:m,textAlign:g=(o?.isV4?"center":void 0),title:h,...p},f)=>{const I=!!d&&!e&&!u||!d&&!e&&!!u,_={className:`button ${t||""}`,color:n,css:{width:o?.isV4?"100%":void 0,...a,position:"relative"},disabled:s,iconOnly:I,size:m,title:h},x={children:e,color:n,leftIcon:d,isLoading:r,rightIcon:u,textAlign:g};return c&&!s?(0,i.jsx)(ra,{style:o?.isV4?{flex:"1"}:void 0,title:h,to:c,onClick:e=>{s||r||l&&l(e)},...p,children:(0,i.jsx)(ha,{..._,ref:f,children:(0,i.jsx)(fa,{...x})})}):(0,i.jsx)(ga,{..._,ref:f,type:"button",onClick:e=>{s||r||l&&l(e)},...p,children:(0,i.jsx)(fa,{...x})})});pa.displayName="Button",pa.toString=()=>".button";const fa=({children:e,color:t,isLoading:n,leftIcon:a,rightIcon:s,textAlign:o})=>(0,i.jsxs)(i.Fragment,{children:[a&&(0,i.jsx)($,{children:(0,i.jsx)(la,{icon:a})}),e&&(0,i.jsx)(Ni,{className:"h-button-content",css:{flex:"1"},textAlign:o,children:e}),s&&(0,i.jsx)($,{children:(0,i.jsx)(la,{icon:s})}),n&&(0,i.jsx)($,{align:"center",className:"loader",css:{height:"calc(100% + 2px)",left:"-1px",position:"absolute",top:"-1px",width:"calc(100% + 2px)",zIndex:10},justify:"center",children:(0,i.jsx)(ca,{color:t&&"primary"!==t&&"error"!==t?b.colors.gray800.value:"white",height:"40px",strokeWidth:"3",width:"40px"})})]}),Ia=d.createContext({});function _a(){return d.useContext(Ia)}const xa=(e,t=!0)=>{t&&e?.preventDefault(),e?.nativeEvent?.stopImmediatePropagation(),e?.stopPropagation()};var ya=n(961);function Sa(e){const t=(0,d.useCallback)(t=>{"Esc"!==t.key&&"Escape"!==t.key||e()},[]);(0,d.useEffect)(()=>(document.addEventListener("keydown",t,!1),()=>{document.removeEventListener("keydown",t,!1)}),[])}function ja(e,t){"production"!==s.Production&&console.warn(`Component ${e} is deprecated, use ${t} instead.`)}const ba=j("dialog",{background:"white",border:"none",display:"flex",flexDirection:"column",overflowY:"auto",padding:"0",variants:{mobile:{true:{height:"100%",width:"100%"},false:{borderRadius:"12px",maxHeight:"calc(100% - 80px)",width:"688px"}}},defaultVariants:{mobile:!1}}),va=e=>{const t=Ei(),{onClose:n}=_a();return(0,i.jsxs)($,{css:{borderTop:e.hideBorder?void 0:"1px solid $gray200",padding:"$6 $7"},gap:"3",justify:"end",children:[!e.hideCancelButton&&(0,i.jsx)(pa,{color:"white",onClick:n,children:t("annuler_48254")}),"function"==typeof e.children?e.children(n):e.children]})},Aa=e=>(0,i.jsx)($,{direction:"column",...w(e),css:{borderTop:e.hideBorder?void 0:"1px solid $gray200",padding:"$5 $7 $7 $7",...e.css},children:e.children}),Ca=({icon:e,iconColor:t,children:n,subtitle:a,onClose:s})=>(0,i.jsxs)($,{children:[(0,i.jsxs)($,{align:"center",css:{flexGrow:"1",padding:"$6 $7 $5 $7"},gap:"4",children:[(0,i.jsx)($,{align:"center",css:{border:"1px solid $gray200",borderRadius:"10px",boxShadow:"$xs",color:t||"$gray700",fontSize:"textMd",padding:"$3"},height:48,justify:"center",width:48,children:(0,i.jsx)(la,{className:"fa-xl",icon:e})}),(0,i.jsxs)($,{direction:"column",children:[(0,i.jsx)(Ni,{font:"gray900 textLg medium",children:n}),h(a)&&(0,i.jsx)(Ni,{color:"gray500",children:a})]})]}),s&&(0,i.jsx)($,{align:"center",css:{color:"$gray500",cursor:"pointer",fontSize:"textMd",padding:"$2",margin:"$3 $3"},height:24,justify:"center",width:24,onClick:s,children:(0,i.jsx)(la,{className:"fa-xl",icon:"xmark"})})]}),Ea=({children:e})=>{const{isOpen:t,onClose:n}=_a();return Sa(n),ja("common-front/src/designSystem/components/modals/__deprecated/modal/modal.tsx","common-front/src/designSystem/components/modals/base/modal.tsx"),t?(0,ya.createPortal)((0,i.jsx)($,{align:"center",css:{background:"rgba(52, 64, 84, 0.7)",height:"100%",left:0,position:"absolute",top:0,width:"100%",zIndex:"300"},justify:"center",onClick:n,children:(0,i.jsx)(ba,{onClick:e=>xa(e,!1),children:e})}),document.body):null},Ta=e=>{const[t,n]=d.useState(e.isOpen??!1),a=d.useCallback(()=>{n(!1),e.onClose?.()},[n,e.onClose]);return d.useEffect(()=>{"boolean"==typeof e.isOpen&&n(e.isOpen)},[e.isOpen]),(0,i.jsx)(Ia.Provider,{value:{isOpen:t,onClose:a,setIsOpen:n},children:e.children})},Ra=e=>{const{setIsOpen:t}=_a(),n=e.children,a=d.useCallback(e=>{xa(e),t(!0),n.props.onClick?.(e)},[t,n]),s=d.useMemo(()=>d.cloneElement(d.Children.only(n),{onClick:a,onKeyPress:a,tabIndex:0}),[n,a]);return(0,i.jsx)(i.Fragment,{children:s})},Ma=e=>{const t=Ei(),n=h(e.content?.[0])?t(e.content[0]):t("ooops_on_a_un_p_56888"),a=((e,t)=>"accreditation_limit_reached"===t?.[0]?[e("_ditez_l_accr_d_66820")]:"delegation_slots_limit_reached"===t?.[0]?[e("la_limite_sur_l_75773")]:"delegation_accreditations_limit_reached"===t?.[0]?[e("la_limite_sur_l_43036")]:"delegation_categories_limit_reached"===t?.[0]?[e("la_limite_sur_l_49480")]:"delegation_profiles_limit_reached"===t?.[0]?[e("la_limite_sur_l_56747")]:"can_not_delete_paired"===t?.[0]?[e("ce_membre_est_d_53903")]:F(t)?t.map(e):[e("une_erreur_est_92333")])(t,e.content);return(0,i.jsx)(Ta,{isOpen:!0,onClose:e.onClose,children:(0,i.jsxs)(Ea,{children:[(0,i.jsx)(Ca,{icon:"triangle-exclamation",iconColor:"$error700",children:n}),(0,i.jsx)(Aa,{css:{color:"$gray500"},hideBorder:!0,children:(0,i.jsxs)($,{direction:"column",gap:"3",children:[e.content?a.join(" "):e.children,h(e.requestUuid)&&(0,i.jsx)(N,{css:{color:"$gray400",fontSize:"$textXs",userSelect:"text",wordBreak:"break-all"},children:t("r_f_rence_1_92505",e.requestUuid)})]})}),(0,i.jsx)(va,{hideBorder:!0,hideCancelButton:!0,children:(0,i.jsx)(pa,{color:"error",onClick:e.onClose,children:t("fermer_62479")})})]})})},Da="heaventRequestUuid";function Oa(e,t){return"object"==typeof e&&null!==e&&Object.defineProperty(e,Da,{value:t}),e}const wa=(0,d.createContext)({}),Pa=e=>{const[t,n]=(0,d.useState)(!1),[s,o]=(0,d.useState)([]),[r,l]=(0,d.useState)(void 0),c=(0,d.useCallback)((e,t)=>{e&&void 0!==t&&a(t),n(e),o((Array.isArray(t)?t:[]).flatMap(e=>e.isHeaventError?e.message.split("\n"):e.message?.startsWith("db::")?[e.message.substring(4).split(" ")[0]]:[])),l(function(e){const t=e?.[Da];return"string"==typeof t?t:void 0}(t))},[n,o,l]),u=(0,d.useCallback)(()=>{n(!1),o([]),l(void 0)},[n,o,l]);return(0,i.jsxs)(wa.Provider,{value:{isError:t,setIsError:c},children:[e.children,t&&(0,i.jsx)(Ma,{content:s,requestUuid:r,onClose:u})]})};var $a=n(8097);function ka(e){return new Promise((t,n)=>{!function(e,n,i){const a=document.createElement("script");a.onload=()=>{t(!0)},a.onerror=()=>{i&&i()},a.src=e,document.body.appendChild(a)}(e,0,()=>{n(new Error(`Could not load ${e}`))})})}var Na=n(1343);const La={AccreditationChartFragment:{code:"fragment AccreditationChart on Accreditation {\n id\n name\n hasSlots\n willAutoAccredit\n\n slots(includeHidden: true) {\n date\n name\n assignedResources\n delegationsTotalResources\n maxResources\n scannedResources\n wishedResources\n }\n}\n",fragments:[]},AccreditationEmailFragment:{code:"fragment AccreditationEmail on AccreditationsUsersInfo {\n accreditationCategory {\n id\n name\n }\n\n accreditation {\n id\n eventId\n name\n acronym\n description\n icon\n color\n address\n latitude\n longitude\n fields\n }\n\n accreditationSlot {\n id\n name\n date\n }\n}\n",fragments:[]},AccreditationImportFragment:{code:"fragment AccreditationImport on Accreditation {\n id\n name\n\n slots(includeHidden: true) {\n id\n name\n date\n }\n}\n",fragments:[]},AccreditationProfileFragment:{code:"fragment AccreditationProfile on AccreditationsProfile {\n id\n accreditationProfileCategoryId\n name\n description\n acronym\n color\n icon\n\n accreditationProfileCategory {\n id\n name\n }\n}\n",fragments:[]},AccreditationProfileEmailFragment:{code:"fragment AccreditationProfileEmail on AccreditationsProfile {\n id\n name\n\n accreditationProfileCategory {\n name\n }\n}\n",fragments:[]},AccreditationProfileImportFragment:{code:"fragment AccreditationProfileImport on AccreditationsProfile {\n id\n name\n\n accreditationProfileCategory {\n id\n name\n }\n}\n",fragments:[]},AccreditationProfileMatrixFragment:{code:"fragment AccreditationProfileMatrix on AccreditationsProfile {\n id\n name\n color\n assignedResources\n\n accreditationProfileCategory {\n id\n name\n }\n}\n",fragments:[]},AccreditationProfileVolunteerRegistrationFragment:{code:"fragment AccreditationProfileVolunteerRegistration on AccreditationsProfile {\n id\n name\n acronym\n color\n icon\n\n accreditationProfileCategory {\n id\n name\n }\n}\n",fragments:[]},AccreditationSlotMatrixFragment:{code:"fragment AccreditationSlotMatrix on AccreditationsSlot {\n id\n name\n date\n assignedResources\n maxResources\n isBlocked\n\n accreditation {\n id\n accreditationCategoryName\n accreditationDisplay\n acronym\n color\n index\n name\n }\n\n accreditationCategory {\n id\n name\n }\n}\n",fragments:[]},AccreditationSlotStatsFragment:{code:"fragment AccreditationSlotStats on AccreditationsSlot {\n assignedResources\n maxResources\n scannedResources\n wishedResources\n}\n",fragments:[]},AccreditationSlotVolunteerRegistrationFragment:{code:"fragment AccreditationSlotVolunteerRegistration on AccreditationsSlot {\n id\n accreditationId\n name\n date\n isBlocked\n\n accreditation {\n id\n accreditationCategoryId\n acronym\n name\n color\n icon\n hiddenSlotId\n hasSlots\n index\n fields\n }\n\n accreditationCategory {\n id\n name\n }\n}\n",fragments:[]},AccreditationsAccreditationFragment:{code:"fragment AccreditationsAccreditation on Accreditation {\n id\n accreditationCategoryId\n index\n name\n description @include(if: $includeDescription)\n address\n latitude\n longitude\n acronym\n icon\n color\n fillingRate\n maxResources\n assignedResources\n willAutoAccredit\n weezeventIsSynchronized\n fields\n index\n hasDateSlots\n insertedAt\n numberOfSlots\n\n accreditationCategory {\n id\n name\n }\n\n accreditationsCustomFields @include(if: $includeConditions) {\n ...AccreditationsAccreditationCustomField\n }\n\n createdBy @include(if: $includeCreatedBy) {\n email\n name\n }\n\n tags @include(if: $includeTags) {\n id\n name\n }\n}\n",fragments:["AccreditationsAccreditationCustomFieldFragment"]},AccreditationsAccreditationCustomFieldFragment:{code:"fragment AccreditationsAccreditationCustomField on AccreditationsCustomField {\n conditionValue\n\n customField {\n name\n fieldType\n\n values {\n id\n value\n }\n }\n}\n",fragments:[]},AccreditationsAccreditationSlotFragment:{code:"fragment AccreditationsAccreditationSlot on AccreditationsSlot {\n id\n accreditationCategoryId\n accreditationId\n name\n date\n assignedResources\n fillingRate\n insertedAt\n isHidden\n maxResources\n resourcesByFields(slugs: $customFieldsSlugs) @include(if: $includeResources)\n scannedResources @include(if: $includeResources)\n weezeventChecklistId\n wishedResources @include(if: $includeResources)\n\n accreditation {\n ...AccreditationsAccreditation\n }\n\n accreditationCategory {\n id\n name\n }\n}\n",fragments:["AccreditationsAccreditationFragment"]},AccreditationsProfilesProfileFragment:{code:"fragment AccreditationsProfilesProfile on AccreditationsProfile {\n id\n name\n description @include(if: $includeDescription)\n acronym\n color\n icon\n insertedAt\n\n accreditationsSlots @include(if: $includeAccreditations) {\n ...AccreditationSlotVolunteerRegistration\n }\n\n accreditationProfileCategory {\n id\n name\n }\n\n createdBy @include(if: $includeCreatedBy) {\n email\n name\n }\n}\n",fragments:["AccreditationSlotVolunteerRegistrationFragment"]},AccreditationsSlotFragment:{code:"fragment AccreditationsSlot on AccreditationsSlot {\n id\n accreditationCategoryId\n accreditationId\n eventId\n name\n date\n assignedResources\n maxResources\n isBlocked\n isFull\n\n accreditation {\n id\n accreditationCategoryId\n eventId\n acronym\n name\n color\n icon\n hasSlots\n accreditationDisplay\n hiddenSlotId\n index\n }\n\n accreditationCategory {\n id\n name\n }\n}\n",fragments:[]},AssigmentEmailFragment:{code:"fragment AssigmentEmail on PositionsSlotsUsersInfo {\n id\n\n position {\n id\n eventId\n name\n description\n acronym\n color\n address\n latitude\n longitude\n zoom\n range\n layer\n fields\n\n leaders {\n ...LeaderAssignment\n }\n\n category {\n id\n name\n\n leaders {\n ...LeaderAssignment\n }\n }\n\n tags {\n name\n }\n }\n\n positionSlot {\n id\n name\n range\n timeDifferenceMinutes\n }\n}\n",fragments:["LeaderAssignmentFragment"]},AttachCustomFieldFragment:{code:"fragment AttachCustomField on CustomField {\n ...CustomFieldWithCondition\n\n category {\n id\n name\n }\n}\n",fragments:["CustomFieldWithConditionFragment"]},CampaignEditFragment:{code:"fragment CampaignEdit on Campaign {\n name\n state\n campaignType\n sender\n text\n subject\n html\n replyTo\n sendToEveryone\n states\n positionsCategoriesIds\n positionsIds\n positionsSlotsIds\n tagsIds\n accreditationsCategoriesIds\n accreditationsIds\n accreditationsSlotsIds\n usersInfosIds\n segmentsIds\n scheduledAt\n emailSenderId\n attachments\n includeDuplicateMembersAttachments\n hasCalendarInvite\n calendarInviteName\n calendarInviteStartDate\n calendarInviteStartTime\n calendarInviteEndDate\n calendarInviteEndTime\n scheduleType\n scheduleAnchor\n scheduleOffsetDays\n scheduleBeforeAfter\n scheduleSendTime\n\n documents {\n acl\n key\n name\n size\n }\n}\n",fragments:[]},CampaignEmailRendererFragment:{code:"fragment CampaignEmailRenderer on Campaign {\n subject\n text\n html\n replyTo\n attachments\n includeDuplicateMembersAttachments\n hasCalendarInvite\n calendarInviteName\n calendarInviteStartDate\n calendarInviteStartTime\n calendarInviteEndDate\n calendarInviteEndTime\n\n documents {\n name\n key\n }\n}\n",fragments:[]},CampaignListFragment:{code:"fragment CampaignList on Campaign {\n id\n name\n campaignType\n state\n numberOfRecipients\n cost\n sentAt\n scheduledAt\n\n createdBy {\n nameOrEmail\n }\n}\n",fragments:[]},CampaignUserInfoFragment:{code:'fragment CampaignUserInfo on UsersInfo {\n id\n name\n email\n picture {\n url\n }\n phone: fieldValue(slug: "phone")\n}\n',fragments:[]},CommentFragment:{code:"fragment Comment on Comment {\n id\n content\n insertedAt\n\n event {\n name\n }\n\n writtenBy {\n id\n email\n\n userInfo(organizationId: $organizationId) {\n ...UserInfoNameAndPicture\n nameOrEmail\n }\n }\n}\n",fragments:["UserInfoNameAndPictureFragment"]},ConditionCustomFieldFragment:{code:"fragment ConditionCustomField on CustomField {\n id\n name\n slug\n fieldType\n fileType\n canSelectMultiple\n\n values {\n id\n value\n }\n}\n",fragments:[]},ConditionsCustomFieldsFragment:{code:"fragment ConditionsCustomFields on Organization {\n conditionsCustomFields: customFields(\n eventId: $eventId\n variety: UserInfo\n privacy: All\n fieldTypes: [Checkbox, Select]\n sort: { attribute: Name, direction: Asc }\n ) {\n nodes {\n ...ConditionCustomField\n }\n }\n}\n",fragments:["ConditionCustomFieldFragment"]},CreateAccreditationEventFragment:{code:"fragment CreateAccreditationEvent on Event {\n startAt\n endAt\n layer\n isWeezeventConnected\n\n accreditationsCategories {\n id\n name\n }\n}\n",fragments:[]},CreateAccreditationProfileEventFragment:{code:"fragment CreateAccreditationProfileEvent on Event {\n accreditationsCategories {\n id\n name\n\n accreditations {\n id\n name\n acronym\n accreditationDisplay\n index\n color\n icon\n hasSlots\n\n slots(includeHidden: true) {\n id\n name\n date\n }\n }\n }\n\n accreditationsProfilesCategories {\n id\n name\n }\n}\n",fragments:[]},CreateCampaignEmailSenderFragment:{code:"fragment CreateCampaignEmailSender on EmailsSender {\n id\n name\n isValidToSendEmail\n}\n",fragments:[]},CreateCustomFieldInfosFragment:{code:"fragment CreateCustomFieldInfos on Organization {\n # the fields a condition can depend on, of every variety: the form keeps those of its own\n customFields(\n eventId: $eventId\n privacy: All\n fieldTypes: [Checkbox, Country, Language, Nationality, Select]\n ) {\n nodes {\n id\n organizationId\n eventId\n variety\n name\n label\n fieldProperty\n fieldType\n listType\n\n values {\n id\n value\n color\n }\n }\n }\n\n # the fields an Address field can fill, of every variety: the form keeps those of its own\n addressLinksCustomFields: customFields(\n eventId: $eventId\n privacy: All\n fieldTypes: [Text, Country]\n ) {\n nodes {\n id\n organizationId\n eventId\n name\n label\n variety\n fieldType\n }\n }\n\n customFieldsCategories {\n nodes {\n id\n name\n }\n }\n}\n",fragments:[]},CreateDelegationEventFragment:{code:"fragment CreateDelegationEvent on Event {\n campaigns(states: [Template]) {\n nodes {\n id\n name\n }\n }\n\n customDocuments {\n slug\n name\n }\n\n delegationsSpaceLayouts {\n id\n name\n }\n\n forms {\n nodes {\n ...CreateDelegationForm\n }\n }\n\n accreditationsProfilesCategories {\n id\n name\n\n accreditationsProfiles {\n id\n name\n color\n icon\n }\n }\n\n ...EventAccreditations\n}\n",fragments:["CreateDelegationFormFragment","EventAccreditationsFragment"]},CreateDelegationFormFragment:{code:"fragment CreateDelegationForm on Form {\n id\n name\n}\n",fragments:[]},CreatePositionEventFragment:{code:"fragment CreatePositionEvent on Event {\n startAt\n endAt\n layer\n latitude\n longitude\n isWeezeventConnected\n\n positionsCategories(scoped: true) {\n id\n name\n }\n\n traces {\n ...Trace\n }\n}\n",fragments:["TraceFragment"]},CreatePositionTagsFragment:{code:"fragment CreatePositionTags on Organization {\n tags {\n nodes {\n id\n name\n }\n }\n}\n",fragments:[]},CreateUpdateEventInfosFragment:{code:"fragment CreateUpdateEventInfos on Organization {\n name\n weezeventOrganizationId\n\n eventCustomFields: customFields(variety: Event) {\n nodes {\n ...AttachCustomField\n }\n }\n\n emailsSenders(isValidToSendEmail: true) {\n id\n name\n }\n\n tags {\n nodes {\n id\n name\n }\n }\n\n groups {\n nodes {\n id\n name\n }\n }\n}\n",fragments:["AttachCustomFieldFragment"]},CreateUpdateMemberFormFragment:{code:"fragment CreateUpdateMemberForm on Form {\n id\n name\n isEditableInMemberSpace\n description\n positionTitle\n positionSubtitle\n accreditationTitle\n accreditationSubtitle\n informationTitle\n registerButtonText\n\n ...FormSlotsOptions\n ...FormMissionsOptions\n ...FormAccreditationsOptions\n\n elements {\n ...FormElementDisplay\n }\n\n customSlotsPeriods {\n ...FormRegisterCustomSlotPeriod\n }\n}\n",fragments:["FormSlotsOptionsFragment","FormMissionsOptionsFragment","FormAccreditationsOptionsFragment","FormElementDisplayFragment","FormRegisterCustomSlotPeriodFragment"]},CreatedByFragment:{code:"fragment CreatedBy on UsersInfo {\n ...UserInfoContactInformation\n}\n",fragments:["UserInfoContactInformationFragment"]},CustomBadgeVolunteerRegistrationFragment:{code:"fragment CustomBadgeVolunteerRegistration on VolunteersRegistration {\n localId\n state\n isLeader\n utid\n ticketId\n weezevent\n segmentsIds(usedInCustomDocument: true)\n\n userInfo {\n id\n localId\n email\n name\n fields(expand: true)\n registrationDate(eventId: $eventId)\n\n links(eventId: $eventId) {\n ...UserInfoLinks\n }\n\n formsUsersInfos(eventId: $eventId, level: Event) {\n formId\n\n slots {\n range\n }\n }\n }\n\n accreditationProfile {\n ...AccreditationProfileEmail\n }\n\n delegation {\n ...DelegationEmail\n }\n\n accreditationsUsersInfos {\n ...AccreditationEmail\n }\n\n positionsSlotsUsersInfos {\n ...AssigmentEmail\n }\n}\n",fragments:["UserInfoLinksFragment","AccreditationProfileEmailFragment","DelegationEmailFragment","AccreditationEmailFragment","AssigmentEmailFragment"]},CustomDocumentPopulationFragment:{code:"fragment CustomDocumentPopulation on CustomDocument {\n id\n slug\n name\n populationsIds\n shouldRegenerateTicketIdOnDownload\n}\n",fragments:[]},CustomFieldFragment:{code:"fragment CustomField on CustomField {\n id\n slug\n name\n label\n variety\n fieldProperty\n fieldType\n isPrivate\n isEncrypted\n hasCondition\n conditionCustomFieldId\n dependencies\n numberOfTimesUsed\n canDelete\n isSelectV2\n insertedAt\n\n category {\n id\n name\n }\n\n conditionCustomField {\n name\n }\n\n createdBy {\n id\n ...CreatedBy\n }\n\n values {\n id\n value\n }\n}\n",fragments:["CreatedByFragment"]},CustomFieldImportFragment:{code:"fragment CustomFieldImport on CustomField {\n id\n name\n slug\n fieldType\n fieldSubtype\n listType\n fileType\n fieldProperty\n canSelectMultiple\n validationRules\n\n category {\n id\n name\n }\n\n values {\n id\n value\n color\n }\n}\n",fragments:[]},CustomFieldWithConditionFragment:{code:"fragment CustomFieldWithCondition on CustomField {\n id\n name\n label\n description\n fieldType\n fieldSubtype\n listType\n fileType\n fieldProperty\n isPrivate\n hasCondition\n conditionValue\n canSelectMultiple\n slug\n isSelectV2\n canBeUpdatedByUrl\n validationRules\n\n conditionCustomField {\n id\n name\n fieldType\n fieldProperty\n canSelectMultiple\n slug\n }\n\n addressPostalCodeCustomField {\n id\n slug\n }\n\n addressCityCustomField {\n id\n slug\n }\n\n addressCountryCustomField {\n id\n slug\n }\n\n document {\n url\n name\n }\n\n values {\n id\n value\n color\n }\n}\n",fragments:[]},DelegationAccreditationProfileFragment:{code:"fragment DelegationAccreditationProfile on DelegationAccreditationProfile {\n accreditationProfileId\n assignedResources\n isFull\n maxResources\n}\n",fragments:[]},DelegationAccreditationProfileStatsFragment:{code:"fragment DelegationAccreditationProfileStats on DelegationAccreditationProfile {\n accreditationProfileId\n assignedResources\n maxResources\n wishedResources\n}\n",fragments:[]},DelegationAccreditationSlotFragment:{code:"fragment DelegationAccreditationSlot on DelegationAccreditationSlot {\n accreditationCategoryId\n accreditationId\n accreditationSlotId\n isDefault\n isFull\n isVisible\n assignedResources\n maxResources\n willAutoAccredit\n\n accreditationSlot {\n date\n isBlocked\n isFull\n }\n}\n",fragments:[]},DelegationAccreditationSlotStatsFragment:{code:"fragment DelegationAccreditationSlotStats on DelegationAccreditationSlot {\n accreditationCategoryId\n accreditationSlotId\n accreditationId\n assignedResources\n maxResources\n resourcesByFields\n scannedResources\n wishedResources\n}\n",fragments:[]},DelegationAccreditationsSlotsFragment:{code:"fragment DelegationAccreditationsSlots on Delegation {\n accreditationsProfiles {\n ...DelegationAccreditationProfile\n }\n\n accreditationsSlots {\n ...DelegationAccreditationSlot\n }\n}\n",fragments:["DelegationAccreditationProfileFragment","DelegationAccreditationSlotFragment"]},DelegationEmailFragment:{code:'fragment DelegationEmail on Delegation {\n id\n organizationId\n eventId\n formId\n name\n fields\n\n category: delegationCategory {\n id\n name\n }\n\n leaders {\n email\n name\n firstName: fieldValue(slug: "firstName")\n lastName: fieldValue(slug: "lastName")\n phone: fieldValue(slug: "phone")\n }\n}\n',fragments:[]},DelegationUserProfileFragment:{code:"fragment DelegationUserProfile on Delegation {\n id\n name\n event {\n id\n name\n }\n}\n",fragments:[]},DelegationsDelegationFragment:{code:"fragment DelegationsDelegation on Delegation {\n id\n organizationId\n eventId\n name\n description @include(if: $includeDescription)\n state\n deadlineDate\n numberOfResources @include(if: $includeResources)\n maxResources\n fillingRate @include(if: $includeResources)\n showInDelegationSpace\n fields\n canLeadersAddMembers\n canLeadersEditMembers\n canLeadersDeleteMembers\n canLeadersDuplicateMembers\n canLeadersEditColumns\n canLeadersEditCustomFields\n canLeadersImportMembers\n canLeadersSeeHiddenAccreditationsSlots\n showFormLinkInDelegationSpace\n showAllAccreditations\n lockedAt\n usedCustomFieldsFilled @include(if: $includeUsedCustomFieldsFilled)\n insertedAt\n\n accreditationsSlots @include(if: $includeAccreditations) {\n accreditationSlot {\n ...AccreditationSlotVolunteerRegistration\n }\n }\n\n accreditationsProfiles @include(if: $includeAccreditationsProfiles) {\n ...DelegationAccreditationProfileStats\n\n accreditationProfile {\n ...AccreditationProfileVolunteerRegistration\n }\n }\n\n campaigns @include(if: $includeCampaigns) {\n id\n name\n }\n\n children @include(if: $includeChildren) {\n event {\n id\n name\n }\n }\n\n parent @include(if: $includeParent) {\n id\n name\n }\n\n customDocuments @include(if: $includeDocuments) {\n slug\n name\n }\n\n delegationCategory {\n id\n name\n\n leaders @include(if: $includeLeaders) {\n userInfo {\n id\n email\n name\n nameOrEmail\n }\n }\n }\n\n delegationsSpaceLayout @include(if: $includeLayout) {\n id\n name\n }\n\n createdBy @include(if: $includeCreatedBy) {\n email\n name\n }\n\n form {\n id\n name\n }\n\n tags @include(if: $includeTags) {\n id\n name\n }\n\n leaders @include(if: $includeLeaders) {\n id\n email\n name\n nameOrEmail\n }\n\n allAccreditationsSlots @include(if: $includeAccreditationsSlots) {\n ...DelegationAccreditationSlotStats\n }\n}\n",fragments:["AccreditationSlotVolunteerRegistrationFragment","DelegationAccreditationProfileStatsFragment","AccreditationProfileVolunteerRegistrationFragment","DelegationAccreditationSlotStatsFragment"]},DelegationsSpaceLayoutTabFragment:{code:"fragment DelegationsSpaceLayoutTab on DelegationsSpaceLayoutsTab {\n id\n name\n description\n slug\n isVisible\n isPinned\n segmentType\n rendering\n infos\n}\n",fragments:[]},DesignColorsFragment:{code:"fragment DesignColors on Design {\n colors {\n grayCustom50\n grayCustom500\n grayCustom700\n grayCustom800\n grayCustom900\n primaryCustom500\n primaryCustom600\n }\n}\n",fragments:[]},DocumentAsoPaxManifestFragment:{code:"fragment DocumentAsoPaxManifest on Query {\n event(id: $eventId) {\n name\n\n accreditationSlot(id: $accreditationSlotId) {\n id\n name\n date\n maxResources\n\n accreditation {\n id\n name\n }\n\n links {\n asoPaxManifestLink\n }\n\n volunteersRegistrations {\n id\n\n userInfo {\n id\n fields(expand: true)\n }\n }\n }\n }\n}\n",fragments:[]},DocumentDelegationCalendarFragment:{code:"fragment DocumentDelegationCalendar on Event {\n startAt\n endAt\n\n document(documentType: DelegationCalendar) {\n id\n options\n title\n informationsTitle\n informationsContent\n informations2Title\n informations2Content\n signature\n }\n\n delegation(id: $delegationId) {\n ...DelegationEmail\n\n allAccreditationsSlots(onlyVisible: $onlyVisible) {\n assignedResources\n\n accreditationSlot {\n id\n date\n name\n }\n\n accreditation {\n name\n color\n index\n }\n }\n\n links {\n delegationCalendarLink\n }\n }\n}\n",fragments:["DelegationEmailFragment"]},DocumentEmailPreviewFragment:{code:"fragment DocumentEmailPreview on Document {\n id\n acl\n key\n name\n size\n url\n}\n",fragments:[]},DocumentPositionPlanningFragment:{code:'fragment DocumentPositionPlanning on Event {\n startAt\n endAt\n dayStartTime\n\n document(documentType: PositionPlanning) {\n id\n options\n }\n\n position(id: $positionId) {\n name\n range\n color\n\n links {\n positionPlanningLink\n }\n\n slots {\n id\n name\n range\n }\n }\n\n volunteersRegistrations(positionId: $positionId, sort: { attribute: "Name", direction: Asc }) {\n nodes {\n id\n\n userInfo {\n name\n\n phone {\n internationalFormat\n }\n }\n\n positionsSlotsUsersInfos {\n positionSlotId\n }\n }\n }\n}\n',fragments:[]},DocumentPositionSheetFragment:{code:"fragment DocumentPositionSheet on Query {\n organization(id: $organizationId) {\n customFields(eventId: $eventId, variety: UserInfo) {\n nodes {\n ...CustomFieldWithCondition\n }\n }\n }\n\n event(id: $eventId) {\n document(documentType: Position) {\n id\n options\n }\n\n position(id: $positionId) {\n ...PositionPdfInfos\n\n links {\n positionSheetLink\n }\n\n slots {\n id\n name\n range\n }\n }\n\n volunteersRegistrations(states: [Assigned], positionId: $positionId) {\n nodes {\n ...VolunteerPdf\n\n positionsSlotsUsersInfos {\n positionSlotId\n }\n }\n }\n }\n}\n",fragments:["CustomFieldWithConditionFragment","PositionPdfInfosFragment","VolunteerPdfFragment"]},DocumentPositionsPlanningFragment:{code:"fragment DocumentPositionsPlanning on Event {\n name\n\n positionsSlots(segmentId: $segmentId, date: $date) {\n nodes {\n id\n positionId\n name\n range\n\n position {\n id\n name\n color\n }\n }\n }\n\n segment(id: $segmentId) {\n name\n }\n}\n",fragments:[]},DocumentPositionsVolunteersPlanningFragment:{code:"fragment DocumentPositionsVolunteersPlanning on Event {\n name\n\n positionsSlots(segmentId: $segmentId) {\n nodes {\n id\n range\n\n position {\n id\n name\n acronym\n }\n }\n }\n\n segment(id: $segmentId) {\n name\n }\n\n volunteersRegistrations(states: [Assigned]) {\n nodes {\n id\n\n userInfo {\n ...UserInfoContactInformation\n }\n\n positionsSlotsUsersInfos {\n positionSlotId\n }\n }\n }\n}\n",fragments:["UserInfoContactInformationFragment"]},DocumentUserAssignmentsFragment:{code:"fragment DocumentUserAssignments on Query {\n organization(id: $organizationId) {\n id\n\n customFields(eventId: $eventId, variety: Position, privacy: Public) {\n nodes {\n ...CustomFieldWithCondition\n }\n }\n\n userInfo(id: $userInfoId) {\n ...UserInfoDocument\n }\n }\n\n event(id: $eventId) {\n id\n name\n\n document(documentType: Assignments) {\n id\n options\n title\n informationsTitle\n informationsContent\n informations2Title\n informations2Content\n signature\n }\n\n volunteerRegistration: volunteerRegistrationByUserInfoId(userInfoId: $userInfoId) {\n id\n localId\n ticketId\n weezevent\n\n # For the {user.profile} and {user.delegation.*} of the texts.\n accreditationProfile {\n ...AccreditationProfileEmail\n }\n\n delegation {\n ...DelegationEmail\n }\n\n preassignPositions {\n name\n }\n\n preassignPositionsCategories {\n name\n }\n\n positionsSlotsUsersInfos {\n ...AssigmentEmail\n }\n }\n }\n}\n",fragments:["CustomFieldWithConditionFragment","UserInfoDocumentFragment","AccreditationProfileEmailFragment","DelegationEmailFragment","AssigmentEmailFragment"]},DocumentUserBadgeFragment:{code:'fragment DocumentUserBadge on Event {\n document(documentType: Badge) {\n id\n options\n }\n\n volunteerRegistration: volunteerRegistrationByUserInfoId(userInfoId: $userInfoId) {\n userInfo {\n ...UserInfoContactInformation\n nameOrEmail\n language: fieldValue(slug: "language")\n\n links(eventId: $eventId) {\n userBadgeLink\n }\n }\n\n positionsSlotsUsersInfos {\n position {\n name\n }\n\n positionSlot {\n range\n }\n }\n }\n}\n',fragments:["UserInfoContactInformationFragment"]},DocumentUserCertificateFragment:{code:'fragment DocumentUserCertificate on Event {\n document(documentType: Certificate) {\n id\n options\n }\n\n volunteerRegistration: volunteerRegistrationByUserInfoId(userInfoId: $userInfoId) {\n userInfo {\n nameOrEmail\n name\n dateOfBirth: fieldValue(slug: "dateOfBirth")\n street: fieldValue(slug: "street")\n city: fieldValue(slug: "city")\n postalCode: fieldValue(slug: "postalCode")\n language: fieldValue(slug: "language")\n\n links(eventId: $eventId) {\n userCertificateLink\n }\n }\n\n positionsSlotsUsersInfos {\n position {\n name\n }\n\n positionSlot {\n range\n }\n }\n }\n}\n',fragments:[]},DocumentUserCustomBadgeFragment:{code:"fragment DocumentUserCustomBadge on Event {\n id\n name\n startAt\n weezevent\n\n tags {\n name\n }\n\n document(documentType: CustomBadge, customBadge: $customBadge) {\n id\n options\n }\n\n volunteerRegistration: volunteerRegistrationByUserInfoId(userInfoId: $userInfoId) {\n ...CustomBadgeVolunteerRegistration\n }\n}\n",fragments:["CustomBadgeVolunteerRegistrationFragment"]},DocumentUserCustomBadgesFragment:{code:"fragment DocumentUserCustomBadges on Event {\n id\n name\n startAt\n weezevent\n fields\n\n tags {\n name\n }\n\n document(documentType: CustomBadge, customBadge: $customBadge) {\n id\n options\n }\n\n volunteersRegistrations(segmentId: $segmentId) {\n nodes {\n ...CustomBadgeVolunteerRegistration\n }\n }\n}\n",fragments:["CustomBadgeVolunteerRegistrationFragment"]},DocumentUserPlanningFragment:{code:"fragment DocumentUserPlanning on Event {\n startAt\n endAt\n dayStartTime\n\n document(documentType: UserPlanning) {\n id\n options\n title\n informationsTitle\n informationsContent\n informations2Title\n informations2Content\n signature\n }\n\n volunteerRegistration: volunteerRegistrationByUserInfoId(userInfoId: $userInfoId) {\n id\n localId\n ticketId\n weezevent\n\n # For the {user.profile} and {user.delegation.*} of the texts.\n accreditationProfile {\n ...AccreditationProfileEmail\n }\n\n delegation {\n ...DelegationEmail\n }\n\n userInfo {\n ...UserInfoDocument\n }\n\n positionsSlotsUsersInfos {\n ...PsuiUserPlanning\n }\n }\n}\n",fragments:["AccreditationProfileEmailFragment","DelegationEmailFragment","UserInfoDocumentFragment","PsuiUserPlanningFragment"]},DocumentUserPlanningDaysFragment:{code:'fragment DocumentUserPlanningDays on Event {\n document(documentType: UserPlanningDays) {\n id\n options\n }\n\n volunteerRegistration: volunteerRegistrationByUserInfoId(userInfoId: $userInfoId) {\n userInfo {\n nameOrEmail\n language: fieldValue(slug: "language")\n\n links(eventId: $eventId) {\n userPlanningDaysLink\n }\n }\n\n positionsSlotsUsersInfos {\n positionSlot {\n range\n }\n\n position {\n id\n organizationId\n name\n address\n }\n }\n }\n}\n',fragments:[]},DocumentUserPlanningListFragment:{code:'fragment DocumentUserPlanningList on Event {\n document(documentType: UserPlanningList) {\n id\n options\n }\n\n volunteerRegistration: volunteerRegistrationByUserInfoId(userInfoId: $userInfoId) {\n userInfo {\n nameOrEmail\n language: fieldValue(slug: "language")\n\n links(eventId: $eventId) {\n userPlanningListLink\n }\n }\n\n positionsSlotsUsersInfos {\n positionSlot {\n name\n range\n }\n\n position {\n name\n }\n }\n }\n}\n',fragments:[]},DocumentUsersHoursFragment:{code:"fragment DocumentUsersHours on Event {\n timeZone\n\n document(documentType: UserHours) {\n id\n options\n title\n informationsTitle\n informationsContent\n informations2Title\n informations2Content\n signature\n }\n\n volunteerRegistration: volunteerRegistrationByUserInfoId(userInfoId: $userInfoId) {\n positionsSlotsUsersInfos {\n ...PsuiUserHours\n }\n\n userInfo {\n ...UserInfoDocument\n }\n }\n}\n",fragments:["PsuiUserHoursFragment","UserInfoDocumentFragment"]},DocumentUsersListingFragment:{code:"fragment DocumentUsersListing on Query {\n organization(id: $organizationId) {\n customFields(eventId: $eventId, variety: UserInfo) {\n nodes {\n ...CustomFieldWithCondition\n }\n }\n }\n\n event(id: $eventId) {\n document(documentType: VolunteersListing) {\n id\n options\n title\n informationsTitle\n informationsContent\n informations2Title\n informations2Content\n signature\n }\n\n segment(id: $segmentId) {\n name\n\n links {\n usersListingLink\n }\n }\n\n volunteersRegistrations(segmentId: $segmentId) {\n nodes {\n ...VolunteerPdf\n }\n }\n }\n}\n",fragments:["CustomFieldWithConditionFragment","VolunteerPdfFragment"]},DocumentUsersPicturesFragment:{code:'fragment DocumentUsersPictures on Query {\n organization(id: $organizationId) {\n customFields(eventId: $eventId, variety: UserInfo) {\n nodes {\n ...CustomFieldWithCondition\n }\n }\n }\n\n event(id: $eventId) {\n document(documentType: UsersPictures) {\n id\n options\n title\n informationsTitle\n informationsContent\n informations2Title\n informations2Content\n signature\n }\n\n segment(id: $segmentId) {\n name\n\n links {\n usersPicturesLink\n }\n }\n\n volunteersRegistrations(\n segmentId: $segmentId\n sort: { attribute: "Name", direction: Asc }\n ) {\n nodes {\n userInfo {\n id\n ...UserInfoContactInformation\n firstName: fieldValue(slug: "firstName")\n lastName: fieldValue(slug: "lastName")\n fields\n }\n }\n }\n }\n}\n',fragments:["CustomFieldWithConditionFragment","UserInfoContactInformationFragment"]},DocumentUsersPlanningFragment:{code:"fragment DocumentUsersPlanning on VolunteersRegistration {\n id\n state\n\n userInfo {\n id\n ...UserInfoContactInformation\n }\n\n positionsSlotsUsersInfos(positionId: $positionId) {\n positionCategory {\n name\n }\n\n positionSlot {\n id\n name\n range\n }\n\n position {\n id\n name\n color\n icon\n }\n }\n\n slots {\n range\n }\n}\n",fragments:["UserInfoContactInformationFragment"]},EmailRecipientFragment:{code:"fragment EmailRecipient on Email {\n id\n state\n sentAt\n infos\n\n userInfo {\n ...CampaignUserInfo\n }\n}\n",fragments:["CampaignUserInfoFragment"]},EmailSenderEmailRendererFragment:{code:"fragment EmailSenderEmailRenderer on EmailsSender {\n fromName\n fromEmail\n replyTo\n signature\n\n header {\n key\n }\n\n picture {\n key\n }\n\n footer {\n key\n }\n}\n",fragments:[]},EmailTemplateEmailRendererFragment:{code:"fragment EmailTemplateEmailRenderer on EmailsTemplate {\n useDefault\n subject\n content\n attachments\n hasCalendarInvite\n calendarInviteName\n calendarInviteStartDate\n calendarInviteStartTime\n calendarInviteEndDate\n calendarInviteEndTime\n}\n",fragments:[]},EventAccreditationsFragment:{code:"fragment EventAccreditations on Event {\n accreditationsCategories {\n id\n name\n\n accreditations {\n id\n accreditationCategoryId\n name\n color\n icon\n accreditationCategoryName\n accreditationDisplay\n hasSlots\n hiddenSlotId\n index\n\n slots(includeHidden: true) {\n id\n accreditationId\n name\n date\n }\n }\n }\n}\n",fragments:[]},EventCreateUpdateMemberFragment:{code:"fragment EventCreateUpdateMember on Event {\n id\n name\n startAt\n endAt\n dayStartTime\n ranges(formId: $formId, delegationId: $delegationId)\n country\n fields\n\n accreditationsCategories {\n ...FormRegisterAccreditationCategory\n }\n\n accreditationsProfilesCategories {\n ...FormRegisterAccreditationProfileCategory\n }\n\n positionsCategories {\n ...FormRegisterCategory\n }\n}\n",fragments:["FormRegisterAccreditationCategoryFragment","FormRegisterAccreditationProfileCategoryFragment","FormRegisterCategoryFragment"]},EventDelegationsExportFragment:{code:"fragment EventDelegationsExport on Event {\n languages\n\n segmentsFolders(segmentType: Delegations) {\n id\n name\n\n segments {\n id\n name\n }\n }\n}\n",fragments:[]},EventEmailRendererFragment:{code:"fragment EventEmailRenderer on Event {\n id\n organizationId\n name\n languages\n timeZone\n startAt\n endAt\n fields\n\n customDocuments {\n slug\n }\n}\n",fragments:[]},EventPositionsExportFragment:{code:"fragment EventPositionsExport on Event {\n languages\n\n segmentsFolders(segmentType: Positions) {\n id\n name\n\n segments {\n id\n name\n }\n }\n}\n",fragments:[]},EventVolunteersExportFragment:{code:"fragment EventVolunteersExport on Event {\n languages\n\n segmentsFolders(segmentType: Volunteers) {\n id\n name\n\n segments {\n id\n name\n }\n }\n}\n",fragments:[]},EventsEventFragment:{code:"fragment EventsEvent on Event {\n id\n name\n description @include(if: $includeDescription)\n state\n startAt\n endAt\n fields\n insertedAt\n numberOfMembers @include(if: $includeNumberOfMembers)\n numberOfMembersAccredited @include(if: $includeNumberOfMembers)\n numberOfMembersAssigned @include(if: $includeNumberOfMembers)\n\n createdBy @include(if: $includeCreatedBy) {\n email\n name\n }\n\n tags {\n id\n name\n }\n}\n",fragments:[]},ExistingVolunteerFragment:{code:"fragment ExistingVolunteer on UsersInfo {\n id\n ...UserInfoContactInformation\n nameOrEmail\n}\n",fragments:["UserInfoContactInformationFragment"]},FormAccreditationsOptionsFragment:{code:"fragment FormAccreditationsOptions on Form {\n accreditationDisplay\n accreditationFilter\n showFullAccreditation\n hiddenAccreditationsCategoriesIds\n hiddenAccreditationsIds\n hiddenAccreditationsSlotsIds\n displayedAccreditationsCategoriesIds\n displayedAccreditationsIds\n displayedAccreditationsSlotsIds\n showAccreditationDescription\n slotDisplay\n\n accreditationsFormCustomFields {\n accreditationsSlotsIds\n isMandatory\n\n customField {\n ...CustomFieldWithCondition\n }\n }\n}\n",fragments:["CustomFieldWithConditionFragment"]},FormCustomFieldFragment:{code:"fragment FormCustomField on CustomField {\n id\n slug\n eventId\n name\n label\n fieldType\n listType\n fieldProperty\n\n category {\n id\n name\n }\n\n conditionCustomField {\n id\n name\n }\n\n values {\n id\n value\n color\n }\n}\n",fragments:[]},FormCustomFieldsFragment:{code:"fragment FormCustomFields on Organization {\n formCustomFields: customFields(\n eventId: $eventId\n variety: UserInfo\n privacy: Public\n sort: { attribute: Name, direction: Asc }\n ) {\n nodes {\n ...FormCustomField\n }\n }\n}\n",fragments:["FormCustomFieldFragment"]},FormElementDisplayFragment:{code:"fragment FormElementDisplay on FormsElement {\n id\n elementType\n isMandatory\n section\n text\n hasCondition\n conditionValue\n\n conditionCustomField {\n ...CustomFieldWithCondition\n }\n\n customField {\n ...CustomFieldWithCondition\n }\n}\n",fragments:["CustomFieldWithConditionFragment"]},FormElementsElementFragment:{code:"fragment FormElementsElement on FormsElement {\n id\n elementType\n customFieldId\n section\n text\n isMandatory\n hasCondition\n conditionCustomFieldId\n conditionValue\n}\n",fragments:[]},FormEmailFragment:{code:"fragment FormEmail on FormsUsersInfo {\n teamCode\n\n form {\n id\n areTeamsAllowed\n }\n\n ...WishesEmail\n}\n",fragments:["WishesEmailFragment"]},FormListFragment:{code:"fragment FormList on Form {\n id\n name\n numberOfCustomFields\n}\n",fragments:[]},FormMemberRegistrationFragment:{code:"fragment FormMemberRegistration on Form {\n id\n name\n isEditableInMemberSpace\n\n elements {\n id\n ...FormElementDisplay\n }\n\n ...FormSlotsOptions\n ...FormMissionsOptions\n ...FormAccreditationsOptions\n\n customSlotsPeriods {\n ...FormRegisterCustomSlotPeriod\n }\n}\n",fragments:["FormElementDisplayFragment","FormSlotsOptionsFragment","FormMissionsOptionsFragment","FormAccreditationsOptionsFragment","FormRegisterCustomSlotPeriodFragment"]},FormMissionsOptionsFragment:{code:"fragment FormMissionsOptions on Form {\n positionDisplay\n positionFilter\n positionRanking\n positionLimit\n showFullPosition\n hiddenPositionsCategoriesIds\n hiddenPositionsIds\n hiddenPositionsSlotsIds\n hiddenPositionsTagsIds\n displayedPositionsCategoriesIds\n displayedPositionsIds\n displayedPositionsSlotsIds\n displayedPositionsTagsIds\n showPositionCategoryDescription\n showPositionDescription\n slotDisplay\n willAutoAssign\n}\n",fragments:[]},FormRegisterAccreditationFragment:{code:"fragment FormRegisterAccreditation on IAccreditation {\n id\n accreditationCategoryId\n name\n description\n color\n icon\n hiddenSlotId\n hasSlots\n accreditationDisplay\n conditionsOperator\n index\n\n slots(includeHidden: true) {\n ...FormRegisterAccreditationSlot\n }\n\n conditionsCustomFields: accreditationsCustomFields {\n conditionValue\n\n customField {\n slug\n fieldType\n canSelectMultiple\n }\n }\n\n formCustomFields {\n isMandatory\n\n customField {\n ...CustomFieldWithCondition\n }\n }\n}\n",fragments:["FormRegisterAccreditationSlotFragment","CustomFieldWithConditionFragment"]},FormRegisterAccreditationCategoryFragment:{code:"fragment FormRegisterAccreditationCategory on IAccreditationsCategory {\n id\n name\n\n accreditations {\n ...FormRegisterAccreditation\n }\n}\n",fragments:["FormRegisterAccreditationFragment"]},FormRegisterAccreditationProfileFragment:{code:"fragment FormRegisterAccreditationProfile on AccreditationsProfile{\n id\n name\n description\n color\n icon\n}\n",fragments:[]},FormRegisterAccreditationProfileCategoryFragment:{code:"fragment FormRegisterAccreditationProfileCategory on AccreditationsProfilesCategory {\n id\n name\n\n accreditationsProfiles {\n ...FormRegisterAccreditationProfile\n }\n}\n",fragments:["FormRegisterAccreditationProfileFragment"]},FormRegisterAccreditationSlotFragment:{code:"fragment FormRegisterAccreditationSlot on IAccreditationsSlot {\n id\n accreditationId\n name\n date\n isBlocked\n isFull\n}\n",fragments:[]},FormRegisterCategoryFragment:{code:"fragment FormRegisterCategory on IPositionsCategory {\n id\n name\n description\n\n positions {\n ...FormRegisterPosition\n }\n}\n",fragments:["FormRegisterPositionFragment"]},FormRegisterCustomSlotFragment:{code:"fragment FormRegisterCustomSlot on CustomSlot {\n name\n startTime\n endTime\n}\n",fragments:[]},FormRegisterCustomSlotPeriodFragment:{code:"fragment FormRegisterCustomSlotPeriod on CustomSlotsPeriod {\n id\n name\n startDate\n endDate\n hideNameDates\n displayAsCalendar\n hasCondition\n conditionCustomFieldId\n conditionValue\n\n conditionCustomField {\n ...CustomFieldWithCondition\n }\n\n customSlots {\n ...FormRegisterCustomSlot\n }\n}\n",fragments:["CustomFieldWithConditionFragment","FormRegisterCustomSlotFragment"]},FormRegisterPositionFragment:{code:"fragment FormRegisterPosition on IPosition {\n id\n positionCategoryId\n name\n description\n acronym\n isVisible\n conditionsOperator\n positionDisplay\n tagsIds\n\n slots {\n ...FormRegisterSlot\n }\n\n conditionsCustomFields: positionsCustomFields {\n conditionValue\n\n customField {\n slug\n fieldType\n canSelectMultiple\n }\n }\n}\n",fragments:["FormRegisterSlotFragment"]},FormRegisterSlotFragment:{code:"fragment FormRegisterSlot on IPositionsSlot {\n id\n positionId\n name\n range\n nameOrRange\n isFull\n}\n",fragments:[]},FormSlotsOptionsFragment:{code:"fragment FormSlotsOptions on Form {\n slotDisplay\n minNumberOfSlots\n daysDisplay\n slotTitle\n slotSubtitle\n}\n",fragments:[]},FormUserInfoUserProfileFragment:{code:"fragment FormUserInfoUserProfile on FormsUsersInfo {\n organizationId\n eventId\n formId\n insertedAt\n teamCode\n\n teamMembers {\n ...UserInfoTeamMember\n }\n}\n",fragments:["UserInfoTeamMemberFragment"]},FormUserInfoWishedFragment:{code:"fragment FormUserInfoWished on UsersInfo {\n formUserInfo(formId: $formId) {\n insertedAt\n formId\n positionsCategoriesIds\n positionsIds\n positionsSlotsIds\n accreditationsSlotsIds\n\n form {\n ...FormMemberRegistration\n }\n\n accreditationsSlots {\n name\n date\n\n accreditation {\n id\n name\n }\n }\n\n positionsSlots {\n nameOrRange\n\n position {\n id\n name\n }\n }\n\n positions {\n id\n name\n range\n }\n\n positionsCategories {\n id\n name\n range\n }\n\n slots {\n startDate\n startTime\n endDate\n endTime\n }\n }\n}\n",fragments:["FormMemberRegistrationFragment"]},FormUserOverlayFragment:{code:"fragment FormUserOverlay on Form {\n id\n name\n\n elements {\n ...FormElementDisplay\n }\n}\n",fragments:["FormElementDisplayFragment"]},FormsUsersInfosWishedFragment:{code:"fragment FormsUsersInfosWished on UsersInfo {\n formsUsersInfos(eventId: $eventId, level: Both) {\n insertedAt\n formId\n eventId\n positionsCategoriesIds\n positionsIds\n positionsSlotsIds\n accreditationProfileId\n accreditationsSlotsIds\n\n form {\n ...FormMemberRegistration\n }\n\n accreditationsSlots {\n name\n date\n\n accreditation {\n id\n name\n index\n }\n\n accreditationCategory {\n name\n }\n }\n\n positionsSlots {\n nameOrRange\n\n position {\n id\n name\n }\n\n positionCategory {\n name\n }\n }\n\n positions {\n id\n name\n range\n\n category {\n name\n }\n }\n\n positionsCategories {\n id\n name\n range\n }\n\n slots {\n startDate\n startTime\n endDate\n endTime\n range\n }\n }\n}\n",fragments:["FormMemberRegistrationFragment"]},FullPageInfoFragment:{code:"fragment FullPageInfo on PageInfo {\n hasNextPage\n hasPreviousPage\n}\n",fragments:[]},HistoryRowFragment:{code:"fragment HistoryRow on History {\n id\n action\n executedBy\n data\n details\n insertedAt\n\n user {\n id\n name\n email\n picture {\n url\n }\n }\n}\n",fragments:[]},LeaderAssignmentFragment:{code:'fragment LeaderAssignment on Leader {\n userInfo {\n id\n name\n email\n firstName: fieldValue(slug: "firstName")\n lastName: fieldValue(slug: "lastName")\n phone: fieldValue(slug: "phone")\n }\n}\n',fragments:[]},LeaderInfosFragment:{code:"fragment LeaderInfos on Leader {\n role {\n id\n name\n }\n\n userInfo {\n ...LeaderUserInfo\n }\n}\n",fragments:["LeaderUserInfoFragment"]},LeaderUserInfoFragment:{code:"fragment LeaderUserInfo on UsersInfo {\n id\n userId\n ...UserInfoContactInformation\n nameOrEmail\n}\n",fragments:["UserInfoContactInformationFragment"]},MassEditCustomFieldFragment:{code:"fragment MassEditCustomField on CustomField {\n id\n name\n label\n slug\n fieldType\n fieldSubtype\n listType\n fileType\n fieldProperty\n canSelectMultiple\n validationRules\n\n category {\n id\n name\n }\n\n values {\n id\n value\n color\n }\n}\n",fragments:[]},MemberAccreditationFragment:{code:"fragment MemberAccreditation on AccreditationsUsersInfo {\n accreditationSlot {\n name\n date\n }\n\n accreditation {\n name\n description\n acronym\n hasSlots\n }\n\n accreditationCategory {\n name\n }\n}\n",fragments:[]},MemberAssignmentFragment:{code:"fragment MemberAssignment on PositionsSlotsUsersInfo {\n position {\n name\n description\n address\n latitude\n longitude\n zoom\n layer\n\n leaders {\n ...LeaderAssignment\n }\n\n category {\n name\n\n leaders {\n ...LeaderAssignment\n }\n }\n\n traces {\n ...Trace\n }\n }\n\n positionSlot {\n range\n }\n}\n",fragments:["LeaderAssignmentFragment","TraceFragment"]},MemberRegistrationUserInfoFragment:{code:"fragment MemberRegistrationUserInfo on UsersInfo {\n id\n userId\n ...UserInfoContactInformation\n nameOrEmail\n fields\n}\n",fragments:["UserInfoContactInformationFragment"]},OrganizationAdminInfosFragment:{code:"fragment OrganizationAdminInfos on Organization {\n name\n adminName\n adminEmail\n street\n postalCode\n city\n country\n timeZone\n emailSenderId\n dateFormat\n datetimeFormat\n timeFormat\n\n emailsSenders(isValidToSendEmail: true) {\n id\n name\n }\n}\n",fragments:[]},OrganizationBackofficeFragment:{code:"fragment OrganizationBackoffice on Organization {\n customBadges\n features\n id\n insertedAt\n isBlocked\n name\n numberOfEvents\n periodEndAt\n weezeventOrganizationId\n useOldBilling\n membersLimit\n pricePerMember\n billingComment\n\n membersStats {\n numberOfMembers\n }\n\n membersStats2024: membersStats(year: 2024) {\n numberOfMembers\n }\n\n users {\n id\n email\n }\n}\n",fragments:[]},OrganizationCertificateDefaultFragment:{code:"fragment OrganizationCertificateDefault on Organization {\n name\n adminName\n street\n city\n postalCode\n country\n}\n",fragments:[]},OrganizationCustomFieldsFragment:{code:"fragment OrganizationCustomFields on Organization {\n customFields(eventId: $eventId, variety: UserInfo, privacy: All) {\n nodes {\n ...SegmentCustomField\n }\n }\n}\n",fragments:["SegmentCustomFieldFragment"]},OrganizationDelegationsSpaceFragment:{code:"fragment OrganizationDelegationsSpace on IOrganization {\n name\n allowDelegationSpaceDownload\n delegationsSpaceCustomBadges\n\n delegationsSpaceDesign: spaceDesign(spaceType: DelegationSpace) {\n ...DesignColors\n\n logo {\n url\n }\n\n banner {\n url\n }\n }\n}\n",fragments:["DesignColorsFragment"]},OrganizationEmailRendererFragment:{code:"fragment OrganizationEmailRenderer on Organization {\n id\n name\n dateFormat\n datetimeFormat\n timeFormat\n timeZone\n customBadges\n}\n",fragments:[]},OrganizationEventsShowcaseFragment:{code:"fragment OrganizationEventsShowcase on OrganizationPublic {\n eventsShowcaseDesign: spaceDesign(spaceType: EventsShowcase) {\n ...DesignColors\n\n logo {\n url\n }\n\n banner {\n url\n }\n }\n}\n",fragments:["DesignColorsFragment"]},OrganizationMemberFragment:{code:"fragment OrganizationMember on VolunteersRegistration {\n id\n ticketId\n exportedCustomDocumentsSlugs @include(if: $includeCustomDocuments)\n\n delegation {\n name\n }\n\n event {\n id\n name\n }\n\n positionsSlotsUsersInfos{\n positionSlot {\n name\n range\n }\n\n position {\n name\n }\n }\n\n userInfo {\n id\n name\n email\n fields\n\n picture {\n url\n }\n }\n}\n",fragments:[]},OrganizationMemberCustomDocumentFragment:{code:"fragment OrganizationMemberCustomDocument on CustomDocument {\n id\n eventId\n slug\n name\n populationsIds\n shouldRegenerateTicketIdOnDownload\n}\n",fragments:[]},OrganizationMembersSpaceFragment:{code:"fragment OrganizationMembersSpace on Organization {\n name\n\n membersSpaceDesign: spaceDesign(spaceType: MembersSpace) {\n ...DesignColors\n\n logo {\n url\n }\n\n banner {\n url\n }\n }\n\n hideAssignmentsUntilConfirmationEmailSent\n hideAccreditationsUntilConfirmationEmailSent\n membersSpaceExcludeAccreditations\n showMembersSpaceCommunity\n}\n",fragments:["DesignColorsFragment"]},PositionCategoryPositionFragment:{code:"fragment PositionCategoryPosition on Position {\n id\n assignedResources\n name\n range\n resources\n numberOfSlots\n}\n",fragments:[]},PositionPdfInfosFragment:{code:"fragment PositionPdfInfos on Position {\n id\n eventId\n name\n description\n range\n address\n latitude\n longitude\n zoom\n layer\n numberOfSlots\n assignedResources\n acronym\n\n leaders {\n ...LeaderAssignment\n }\n\n category {\n name\n\n leaders {\n ...LeaderAssignment\n }\n }\n}\n",fragments:["LeaderAssignmentFragment"]},PositionPlanningFragment:{code:"fragment PositionPlanning on Position {\n id\n name\n acronym\n color\n icon\n\n category {\n name\n }\n\n slots {\n id\n name\n range\n fillingRate\n assignedResources\n resources\n }\n}\n",fragments:[]},PositionPositionSlotFragment:{code:"fragment PositionPositionSlot on PositionsSlot {\n id\n positionCategoryId\n positionId\n assignedResources\n name\n range\n nameOrRange\n resources\n startDate\n startTime\n endDate\n endTime\n}\n",fragments:[]},PositionPositionsCustomFieldsFragment:{code:"fragment PositionPositionsCustomFields on Position {\n conditionsOperator\n\n conditionsCustomFields: positionsCustomFields {\n conditionValue\n\n customField {\n slug\n fieldType\n canSelectMultiple\n }\n }\n}\n",fragments:[]},PositionPositionsMapFragment:{code:"fragment PositionPositionsMap on Position {\n acronym\n color\n icon\n latitude\n longitude\n}\n",fragments:[]},PositionsPositionFragment:{code:"fragment PositionsPosition on Position {\n id\n name\n description @include(if: $includeDescription)\n range\n resources\n assignedResources\n address\n layer\n zoom\n latitude\n longitude\n acronym\n color\n icon\n isVisible\n state\n fillingRate\n numberOfSlots\n fields\n weezeventIsSynchronized\n insertedAt\n\n checkedInRate @include(if: $includeCheckedInRate)\n checkedOutRate @include(if: $includeCheckedOutRate)\n\n category {\n id\n name\n\n leaders @include(if: $includeLeaders) {\n userInfo {\n id\n name\n email\n nameOrEmail\n }\n }\n }\n\n createdBy @include(if: $includeCreatedBy) {\n email\n name\n }\n\n leaders @include(if: $includeLeaders) {\n userInfo {\n id\n name\n email\n nameOrEmail\n }\n }\n\n positionsCustomFields @include(if: $includeConditions) {\n ...PositionsPositionCustomField\n }\n\n tags @include(if: $includeTags) {\n id\n name\n }\n\n traces @include(if: $includePositionTraces) {\n id\n name\n color\n }\n}\n",fragments:["PositionsPositionCustomFieldFragment"]},PositionsPositionCustomFieldFragment:{code:"fragment PositionsPositionCustomField on PositionsCustomField {\n conditionValue\n\n customField {\n name\n fieldType\n\n values {\n id\n value\n }\n }\n}\n",fragments:[]},PositionsPositionSlotFragment:{code:"fragment PositionsPositionSlot on PositionsSlot {\n id\n name\n startDate\n startTime\n endDate\n endTime\n range\n assignedResources\n resources\n fillingRate\n state\n weezeventChecklistId\n insertedAt\n\n checkedInRate @include(if: $includeCheckedInRate)\n checkedOutRate @include(if: $includeCheckedOutRate)\n\n position {\n ...PositionsPosition\n }\n\n positionCategory {\n id\n name\n }\n}\n",fragments:["PositionsPositionFragment"]},PrintTriggerFormEventFragment:{code:"fragment PrintTriggerFormEvent on Event {\n printerGroups {\n __typename\n\n ... on PrinterGroupList {\n nodes {\n id\n name\n }\n }\n\n ... on PrinterGroupError {\n message\n }\n }\n\n zplDocuments {\n nodes {\n id\n name\n }\n }\n}\n",fragments:[]},PrintTriggerFormOrganizationFragment:{code:"fragment PrintTriggerFormOrganization on Organization {\n weezaccessPartners {\n __typename\n\n ... on WeezaccessPartnerList {\n nodes {\n id\n name\n }\n }\n\n ... on WeezaccessPartnerError {\n message\n }\n }\n}\n",fragments:[]},PrintTriggersPrintTriggerFragment:{code:"fragment PrintTriggersPrintTrigger on PrintTrigger {\n id\n insertedAt\n activationRange\n status\n\n createdBy {\n email\n name\n }\n\n weezaccessPartner {\n __typename\n ... on WeezaccessPartner {\n id\n name\n url\n }\n ... on WeezaccessPartnerError {\n message\n }\n }\n\n printerGroup {\n __typename\n ... on PrinterGroup {\n id\n name\n }\n ... on PrinterGroupError {\n message\n }\n }\n\n document {\n __typename\n ... on CustomDocument {\n name\n }\n ... on EventsDocument {\n documentType\n }\n ... on ZplDocument {\n name\n }\n }\n}\n",fragments:[]},PsuiUserHoursFragment:{code:"fragment PsuiUserHours on PositionsSlotsUsersInfo {\n breakTime\n checkInAt\n checkOutAt\n timeDifferenceMinutes\n\n positionSlot {\n range\n }\n\n position {\n name\n }\n}\n",fragments:[]},PsuiUserPlanningFragment:{code:"fragment PsuiUserPlanning on PositionsSlotsUsersInfo {\n id\n\n positionSlot {\n name\n range\n }\n\n position {\n name\n color\n }\n}\n",fragments:[]},SegmentCampaignFragment:{code:"fragment SegmentCampaign on Campaign {\n id\n name\n campaignType\n}\n",fragments:[]},SegmentCustomFieldFragment:{code:"fragment SegmentCustomField on CustomField {\n id\n slug\n name\n label\n fieldType\n fieldSubtype\n listType\n fileType\n fieldProperty\n canSelectMultiple\n isSelectV2\n isEncrypted\n validationRules\n\n category {\n id\n name\n }\n\n values {\n id\n value\n color\n }\n}\n",fragments:[]},SegmentEventFragment:{code:"fragment SegmentEvent on Event {\n id\n name\n}\n",fragments:[]},SegmentFormFragment:{code:"fragment SegmentForm on Form {\n id\n name\n}\n",fragments:[]},SegmentsFoldersSegmentsFragment:{code:"fragment SegmentsFoldersSegments on SegmentsFolder {\n id\n name\n\n segments {\n id\n segmentFolderId\n name\n predicatesGroups\n columns\n columnsExport\n columnsSearch\n sort\n count\n rendering\n description\n isUsedInWorkflow\n infos\n }\n}\n",fragments:[]},SpaceDesignFragment:{code:"fragment SpaceDesign on Design {\n banner {\n acl\n name\n key\n }\n\n logo {\n acl\n name\n key\n }\n\n ...DesignColors\n}\n",fragments:["DesignColorsFragment"]},TraceFragment:{code:"fragment Trace on Trace {\n id\n name\n color\n points\n direction\n startAt\n firstRunnerPace\n lastRunnerPace\n}\n",fragments:[]},TranslationFragment:{code:"fragment Translation on Translation {\n id\n translationType\n module\n fr\n en\n es\n de\n nl\n isFrTranslated\n isEnTranslated\n isEsTranslated\n isDeTranslated\n isNlTranslated\n frString\n enString\n esString\n deString\n nlString\n}\n",fragments:[]},UpdateUserFormFragment:{code:"fragment UpdateUserForm on Form {\n id\n name\n areTeamsAllowed\n delegationsIds\n\n elements {\n ...FormElementDisplay\n }\n}\n",fragments:["FormElementDisplayFragment"]},UserAllPermissionsFragment:{code:"fragment UserAllPermissions on UsersInfo {\n usersOrganizations {\n id\n sendNotifications\n\n group {\n id\n name\n }\n\n role {\n id\n name\n type\n }\n }\n\n usersEvents(eventId: $eventId) {\n id\n\n group {\n id\n name\n }\n\n event {\n id\n name\n }\n\n role {\n id\n name\n type\n }\n }\n\n usersDelegations(eventId: $eventId) {\n id\n eventId\n userInfoId\n\n delegation {\n name\n }\n }\n\n usersDelegationsCategories(eventId: $eventId) {\n id\n eventId\n\n group {\n id\n name\n }\n\n delegationCategory {\n name\n }\n\n role {\n id\n name\n }\n }\n\n usersPositionsCategories(eventId: $eventId) {\n id\n eventId\n\n group {\n id\n name\n }\n\n positionCategory {\n name\n }\n\n role {\n id\n name\n }\n }\n\n usersPositions(eventId: $eventId) {\n id\n eventId\n\n group {\n id\n name\n }\n\n position {\n name\n }\n\n role {\n id\n name\n }\n }\n}\n",fragments:[]},UserInfoCommunityFragment:{code:'fragment UserInfoCommunity on UsersInfo {\n id\n localId\n name\n email\n nameOrEmail\n fields\n lastSeenAt\n insertedAt\n phone: fieldValue(slug: "phone")\n\n ...UserAllPermissions @include(if: $includeRoles)\n\n picture {\n url\n }\n\n comments @include(if: $includeComments) {\n content\n }\n\n events @include(if: $includeEvents) {\n id\n name\n }\n\n duplicatedFrom @include(if: $includeDuplicatedFrom) {\n id\n email\n name\n\n picture {\n url\n }\n }\n\n delegations(level: Organization) @include(if: $includeDelegations) {\n id\n name\n\n delegationCategory {\n id\n name\n }\n }\n\n emails(emailTypes: [Campaign], level: Organization) @include(if: $includeEmails) {\n id\n state\n\n campaign {\n name\n }\n }\n\n formsUsersInfos(level: Organization) @include(if: $includeForms) {\n id\n insertedAt\n\n form {\n id\n name\n }\n }\n\n tags @include(if: $includeTags) {\n id\n name\n }\n}\n',fragments:["UserAllPermissionsFragment"]},UserInfoContactInformationFragment:{code:"fragment UserInfoContactInformation on UsersInfo {\n ...UserInfoNameAndPicture\n email\n phone {\n internationalFormat\n }\n}\n",fragments:["UserInfoNameAndPictureFragment"]},UserInfoDocumentFragment:{code:'fragment UserInfoDocument on UsersInfo {\n id\n localId\n ...UserInfoContactInformation\n nameOrEmail\n language: fieldValue(slug: "language")\n fields(expand: true)\n registrationDate(eventId: $eventId)\n\n links(eventId: $eventId) {\n ...UserInfoLinks\n }\n}\n',fragments:["UserInfoContactInformationFragment","UserInfoLinksFragment"]},UserInfoEmailRendererFragment:{code:"fragment UserInfoEmailRenderer on UsersInfo {\n id\n localId\n email\n fields\n registrationDate(eventId: $eventId)\n\n links(eventId: $eventId) {\n ...UserInfoLinks\n }\n\n user {\n id\n language\n }\n}\n",fragments:["UserInfoLinksFragment"]},UserInfoFormFragment:{code:"fragment UserInfoForm on UsersInfo {\n id\n localId\n email\n nameOrEmail\n fields\n registrationDate(eventId: $eventId)\n canAccess(formId: $formId)\n}\n",fragments:[]},UserInfoLinksFragment:{code:"fragment UserInfoLinks on UserInfoDocumentLink {\n userAssignmentsLink\n userBadgeLink\n userCertificateLink\n userCustomBadgeLinks\n userCustomDocumentLinks\n userHoursLink\n userPlanningLink\n userPlanningDaysLink\n userPlanningListLink\n}\n",fragments:[]},UserInfoNameAndPictureFragment:{code:"fragment UserInfoNameAndPicture on UsersInfo {\n name\n picture {\n url\n }\n}\n",fragments:[]},UserInfoOrganizationFragment:{code:"fragment UserInfoOrganization on UsersInfo {\n id\n userId\n name\n email\n nameOrEmail\n\n ...UserAllPermissions\n\n groups {\n id\n name\n }\n\n picture {\n url\n }\n}\n",fragments:["UserAllPermissionsFragment"]},UserInfoOverlayFragment:{code:'fragment UserInfoOverlay on UsersInfo {\n id\n name\n email\n nameOrEmail\n fields\n phone: fieldValue(slug: "phone")\n population: fieldValue(slug: "population")\n language: fieldValue(slug: "language")\n\n picture {\n url\n }\n}\n',fragments:[]},UserInfoTeamMemberFragment:{code:"fragment UserInfoTeamMember on UsersInfo {\n id\n ...UserInfoContactInformation\n}\n",fragments:["UserInfoContactInformationFragment"]},UserInfoTeamRightPanelFragment:{code:"fragment UserInfoTeamRightPanel on VolunteersRegistration {\n positionsCategories {\n positions {\n id\n name\n icon\n color\n\n slots {\n id\n name\n range\n }\n }\n }\n\n positions {\n id\n name\n icon\n color\n\n slots {\n id\n name\n range\n }\n }\n\n positionsSlots {\n id\n name\n range\n\n position {\n id\n name\n icon\n color\n }\n }\n\n positionsSlotsUsersInfos {\n positionSlot {\n id\n name\n range\n }\n\n position {\n id\n name\n icon\n color\n }\n }\n\n userInfo {\n id\n ...UserInfoContactInformation\n }\n}\n",fragments:["UserInfoContactInformationFragment"]},UserInfoUpdateMemberFragment:{code:"fragment UserInfoUpdateMember on UsersInfo {\n id\n email\n name\n fields\n userId\n\n picture {\n url\n }\n\n formUserInfo(formId: $formId) {\n positionsCategoriesIds\n positionsIds\n positionsSlotsIds\n accreditationProfileId\n accreditationsSlotsIds\n\n slots {\n startDate\n startTime\n endDate\n endTime\n }\n\n accreditationsSlots {\n name\n date\n\n accreditation {\n id\n name\n }\n }\n\n positionsSlots {\n nameOrRange\n\n position {\n id\n name\n }\n }\n\n positions {\n id\n name\n range\n }\n\n positionsCategories {\n id\n name\n range\n }\n\n form {\n ...CreateUpdateMemberForm\n }\n }\n\n volunteerRegistration(eventId: $eventId) {\n accreditationsUsersInfos {\n accreditationSlotId\n checkInAt\n }\n }\n}\n",fragments:["CreateUpdateMemberFormFragment"]},UserPanelAccreditationSlotUserInfoFragment:{code:"fragment UserPanelAccreditationSlotUserInfo on AccreditationsUsersInfo {\n id\n eventId\n isAutoAccredit\n isWorkflow\n checkInAt\n insertedAt\n checkInAt\n state\n\n accreditationCategory {\n name\n }\n\n accreditation {\n id\n name\n color\n icon\n index\n }\n\n accreditationSlot {\n id\n name\n date\n }\n\n accreditationProfile {\n id\n name\n }\n\n createdBy {\n email\n name\n }\n}\n",fragments:[]},UserPermissionsFragment:{code:"fragment UserPermissions on User {\n roles(organizationId: $organizationId, eventId: $eventId) {\n id\n accessLevel\n type\n permissions\n }\n\n usersDelegationsCategories(eventId: $eventId) {\n delegationCategoryId\n roleId\n }\n\n usersEvents(eventId: $eventId) {\n eventId\n roleId\n }\n\n usersPositionsCategories(eventId: $eventId) {\n positionCategoryId\n roleId\n }\n\n usersPositions(eventId: $eventId) {\n positionId\n roleId\n }\n}\n",fragments:[]},UserPositionSlotUserInfoFragment:{code:"fragment UserPositionSlotUserInfo on PositionsSlotsUsersInfo {\n breakTime\n checkInAt\n checkOutAt\n eventId\n id\n insertedAt\n isAutoAssign\n isWorkflow\n organizationId\n positionCategoryId\n positionSlotId\n state\n timeDifferenceMinutes\n userInfoId\n\n createdBy {\n email\n name\n }\n\n position {\n id\n acronym\n color\n icon\n name\n }\n\n positionSlot {\n id\n name\n range\n }\n\n positionCategory {\n id\n name\n }\n}\n",fragments:[]},VolunteerInfosFragment:{code:'fragment VolunteerInfos on VolunteersRegistration {\n delegation {\n id\n name\n }\n\n userInfo {\n id\n name\n email\n phone: fieldValue(slug: "phone")\n picture {\n url\n }\n }\n}\n',fragments:[]},VolunteerPdfFragment:{code:"fragment VolunteerPdf on VolunteersRegistration {\n delegation {\n name\n }\n\n teams {\n teamCode\n }\n\n userInfo {\n id\n ...UserInfoContactInformation\n fields\n }\n}\n",fragments:["UserInfoContactInformationFragment"]},VolunteerRegistrationFragment:{code:"fragment VolunteerRegistration on VolunteersRegistration {\n id\n localId\n ticketId\n ticketIdVersion\n state\n accreditationState\n insertedAt\n canDelete\n canRegistrationStateUpdate @include(if: $includeCanRegistrationStateUpdate)\n numberOfAccreditations @include(if: $includeNumberOfAccreditations)\n numberOfAssignments @include(if: $includeNumberOfAssignments)\n numberOfAssignmentsDays @include(if: $includeNumberOfAssignmentsDays)\n numberOfAvailableDays @include(if: $includeNumberOfAvailableDays)\n shortTag\n pairedAt\n volunteerMinutes @include(if: $includeVolunteerMinutes)\n weezeventPayUrl @include(if: $includeWeezeventUrls)\n weezeventTicketUrl @include(if: $includeWeezeventUrls)\n delegationBannerNumber @include(if: $includeDelegation)\n exportedCustomDocumentsSlugs @include(if: $includeCustomDocuments)\n accreditationProfileId\n wishedAccreditationProfileId @include(if: $includeAccreditationsMatrix)\n\n delegation @include(if: $includeDelegation) {\n id\n name\n\n delegationCategory {\n id\n name\n }\n }\n\n userInfo {\n id\n localId\n userId\n organizationId\n email\n name\n nameOrEmail\n fields\n isEditable @include(if: $includeIsEditable)\n insertedAt\n\n picture @include(if: $includePicture) {\n url\n }\n\n ...UserAllPermissions @include(if: $includeRoles)\n\n links(eventId: $eventId) {\n ...UserInfoLinks\n }\n\n comments @include(if: $includeComments) {\n content\n }\n\n emails(\n emailTypes: [Campaign]\n level: Event\n eventId: $eventId\n delegationId: $delegationId\n ) @include(if: $includeEmails) {\n id\n state\n\n campaign {\n name\n }\n }\n\n formsUsersInfos(level: Event, eventId: $eventId) @include(if: $includeFormsUsersInfos) {\n id\n insertedAt\n\n accreditationProfile @include(if: $includeAccreditationProfile) {\n ...AccreditationProfileVolunteerRegistration\n }\n\n form @include(if: $includeForms) {\n id\n name\n slotDisplay\n }\n\n slots @include(if: $includeAvailability) {\n id\n range\n }\n\n teamMembers @include(if: $includeTeam) {\n ...UserInfoTeamMember\n }\n }\n\n tags @include(if: $includeTags) {\n id\n name\n }\n }\n\n accreditationProfile @include(if: $includeAccreditationProfile) {\n ...AccreditationProfileVolunteerRegistration\n }\n\n accreditationsUsersInfos(\n delegationId: $delegationId\n onlyVisible: $onlyVisibleAccreditationsSlots\n ) @include(if: $includeAccreditations) {\n checkInAt\n\n accreditationSlot {\n ...AccreditationSlotVolunteerRegistration\n }\n }\n\n matrixAuis: accreditationsUsersInfos(\n delegationId: $delegationId\n onlyVisible: $onlyVisibleAccreditationsSlots\n ) @include(if: $includeAccreditationsMatrix) {\n accreditationSlotId\n isAutoAccredit\n accreditationProfileId\n checkInAt\n }\n\n accreditationsSlots(delegationId: $delegationId, onlyVisible: $onlyVisibleAccreditationsSlots)\n @include(if: $includeAccreditations) {\n ...AccreditationSlotVolunteerRegistration\n }\n\n matrixWishedSlots: accreditationsSlots @include(if: $includeAccreditationsMatrix) {\n id\n }\n\n duplicatedFrom @include(if: $includeDuplicatedFrom) {\n userInfo {\n id\n email\n name\n\n picture {\n url\n }\n }\n }\n\n positionsSlotsUsersInfos @include(if: $includePositions) {\n ...UserPositionSlotUserInfo\n }\n\n positionsCategories @include(if: $includeWishedPositions) {\n id\n name\n }\n\n positions @include(if: $includeWishedPositions) {\n id\n acronym\n color\n icon\n name\n }\n\n positionsSlots @include(if: $includeWishedPositions) {\n id\n name\n range\n\n position {\n acronym\n color\n icon\n name\n }\n }\n\n preassignPositionsCategories @include(if: $includePreassignedPositions) {\n id\n name\n }\n\n preassignPositions @include(if: $includePreassignedPositions) {\n id\n name\n }\n\n teams @include(if: $includeTeam) {\n teamCode\n }\n\n weezaccessChecklists @include(if: $includeWeezeventChecklists) {\n id\n name\n }\n}\n",fragments:["UserAllPermissionsFragment","UserInfoLinksFragment","AccreditationProfileVolunteerRegistrationFragment","UserInfoTeamMemberFragment","AccreditationSlotVolunteerRegistrationFragment","UserPositionSlotUserInfoFragment"]},VolunteerRegistrationDelegationAccreditationProfileFragment:{code:"fragment VolunteerRegistrationDelegationAccreditationProfile on VolunteersRegistration {\n id\n accreditationProfileId\n wishedAccreditationProfileId\n\n userInfo {\n id\n ...UserInfoContactInformation\n }\n}\n",fragments:["UserInfoContactInformationFragment"]},VolunteerRegistrationDelegationAccreditationSlotFragment:{code:"fragment VolunteerRegistrationDelegationAccreditationSlot on VolunteersRegistration {\n id\n\n accreditationsSlots {\n id\n }\n\n accreditationsUsersInfos {\n accreditationSlotId\n }\n\n userInfo {\n id\n ...UserInfoContactInformation\n }\n}\n",fragments:["UserInfoContactInformationFragment"]},VolunteerRegistrationEmailRendererFragment:{code:"fragment VolunteerRegistrationEmailRenderer on VolunteersRegistration {\n localId\n ticketId\n weezevent\n\n accreditationProfile {\n ...AccreditationProfileEmail\n }\n\n delegation {\n ...DelegationEmail\n }\n}\n",fragments:["AccreditationProfileEmailFragment","DelegationEmailFragment"]},VolunteerRegistrationWaitingAssignmentFragment:{code:"fragment VolunteerRegistrationWaitingAssignment on VolunteersRegistration {\n insertedAt\n\n userInfo {\n id\n ...UserInfoContactInformation\n }\n}\n",fragments:["UserInfoContactInformationFragment"]},VolunteerRegistrationWeezeventFragment:{code:"fragment VolunteerRegistrationWeezevent on VolunteersRegistration {\n id\n localId\n state\n accreditationState\n ticketId\n weezevent\n\n accreditationProfile {\n name\n\n accreditationProfileCategory {\n name\n }\n }\n\n accreditationsUsersInfos {\n accreditationSlotId\n accreditationCategoryId\n\n accreditationCategory {\n id\n name\n }\n\n accreditation {\n id\n name\n fields\n }\n }\n\n positionsSlotsUsersInfos {\n positionSlotId\n\n positionCategory {\n id\n name\n }\n\n position {\n id\n name\n }\n }\n\n delegation {\n name\n\n delegationCategory {\n name\n }\n }\n\n userInfo {\n id\n localId\n ...UserInfoContactInformation\n fieldsExpanded: fields(expand: true)\n }\n}\n",fragments:["UserInfoContactInformationFragment"]},VolunteerRegistrationZplRendererFragment:{code:"fragment VolunteerRegistrationZplRenderer on VolunteersRegistration {\n localId\n ticketId\n weezevent\n\n accreditationsUsersInfos {\n accreditation {\n id\n }\n accreditationSlot {\n id\n }\n }\n\n delegation {\n ...DelegationEmail\n }\n\n userInfo {\n id\n localId\n email\n fields\n registrationDate\n }\n}\n",fragments:["DelegationEmailFragment"]},WishesEmailFragment:{code:"fragment WishesEmail on FormsUsersInfo {\n form {\n slotDisplay\n }\n\n positionsCategories {\n name\n }\n\n positions {\n name\n }\n\n positionsSlots {\n name\n range\n\n position {\n name\n }\n }\n\n slots {\n range\n }\n\n accreditationsSlots {\n name\n date\n\n accreditation {\n name\n }\n }\n}\n",fragments:[]},WorkflowsWorkflowFragment:{code:"fragment WorkflowsWorkflow on Workflow {\n id\n name\n state\n trigger\n action\n frequency\n executedAt\n insertedAt\n\n createdBy {\n email\n name\n }\n\n data {\n errorMessage\n }\n\n accreditationsSlots @include(if: $includeAccreditations) {\n ...AccreditationSlotVolunteerRegistration\n }\n\n campaign @include(if: $includeCampaign) {\n id\n name\n }\n\n customField @include(if: $includeCustomField) {\n id\n name\n }\n\n positionsSlots @include(if: $includePositions) {\n id\n name\n range\n\n position {\n acronym\n color\n icon\n name\n }\n }\n\n segment {\n id\n name\n segmentType\n }\n}\n",fragments:["AccreditationSlotVolunteerRegistrationFragment"]},ZapierMemberFragment:{code:"fragment ZapierMember on UsersInfo {\n id\n fields(expand: true)\n email\n insertedAt\n updatedAt\n deletedAt\n}\n",fragments:[]}};function za(e){return e.flatMap(e=>[e.code].concat(za(e.fragments.map(e=>La[e]))))}function Fa(e){return(0,Na.A)(za(e)).join(" ")}const Ua="yyyy-MM-dd",Ba="yyyy-MM-dd'T'HH:mm",Ga="yyyy-MM-dd'T'HH:mm:ss";function Va(e){const[t,n]=JSON.parse(e);return $a.IX.fromDateTimes($a.c9.fromISO(t,{zone:"UTC"}),$a.c9.fromISO(n,{zone:"UTC"}))}function Wa({startDate:e,startTime:t,endDate:n,endTime:i}){try{const[a,s]=t.split(":"),[o,r]=i.split(":");return $a.IX.fromDateTimes(e.set({hour:parseInt(a,10),minute:parseInt(s,10)}),n.set({hour:parseInt(o,10),minute:parseInt(r,10)}))}catch{return $a.IX.invalid("Invalid")}}function qa(e){return $a.IX.isInterval(e)?e:Wa(e)}function Ya(e){return{startDate:e.start.set({hour:0,minute:0,second:0}),startTime:e.start.toFormat("HH:mm:ss"),endDate:e.end.set({hour:0,minute:0,second:0}),endTime:e.end.toFormat("HH:mm:ss")}}const Ha=(e,t)=>e.contains(t)||e.start.startOf("day").toMillis()===t.startOf("day").toMillis()||e.end.minus({minute:1}).startOf("day").toMillis()===t.startOf("day").toMillis(),Za={DateOnly:{Numeric:{year:"numeric",month:"2-digit",day:"2-digit"},MonthLong:{year:"numeric",month:"long",day:"numeric"},MonthShort:{year:"numeric",month:"short",day:"numeric"},WeekdayLongMonthLong:{year:"numeric",month:"long",day:"numeric",weekday:"long"},WeekdayShortMonthLong:{year:"numeric",month:"long",day:"numeric",weekday:"short"},WeekdayShortMonthShort:{year:"numeric",month:"short",day:"numeric",weekday:"short"},MonthLongYear:{year:"numeric",month:"long"}},TimeOnly:{hour:"2-digit",minute:"2-digit"},DateTime:{year:"numeric",month:"long",day:"numeric",hour:"2-digit",minute:"2-digit"},FullDateTime:{year:"numeric",month:"long",day:"numeric",hour:"2-digit",minute:"2-digit",second:"2-digit"},ShortDateTime:{year:"numeric",month:"numeric",day:"numeric",hour:"2-digit",minute:"2-digit"}};function Ka(e){return"string"==typeof e?$a.c9.fromISO(e,{setZone:!0}):e}function Qa(){return $a.c9.utc().toLocal().zoneName}function Xa(e){return"string"==typeof e&&e.startsWith("[")}function Ja(e){if(!0===Array.isArray(e))return e.map(e=>null!=e&&"object"==typeof e?Ja(e):e);if("boolean"==typeof e||"number"==typeof e||"string"==typeof e||null===e)return e;{const t={};return Object.keys(e).forEach(n=>{const i=e[n];yi.includes(n)||xi.includes(n)?t[n]=i&&$a.c9.fromISO(i,{zone:"UTC"}):Si.includes(n)?Array.isArray(i)?t[n]=i.map(e=>Xa(e)?Va(e):e):t[n]=Xa(i)?Va(i):i:ji.includes(n)?t[n]=i&&$a.dw.fromISO(i):t[n]=null!=i&&"object"==typeof i?Ja(i):i}),t}}const es="772b50b480de52fd21cb256b5d33c4399103913f\n".trim(),ts="x-heavent-commit-sha",ns="x-heavent-request-uuid",is="x-user-token";function as(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{const t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)})}var ss=n(7405),os=n(5002);const rs="heavent-user-session-key",ds="heavent-user-email",ls="UserNotFoundException";let cs=null;const us=()=>(null===cs&&(cs=new os.NE({UserPoolId:sa.COGNITO_USER_POOL_ID,ClientId:sa.COGNITO_USER_POOL_CLIENT_ID})),cs);function ms(){return new Promise((e,t)=>{const n=us().getCurrentUser();null!==n?n.getSession((i,a)=>{i||!1===a?.isValid()?t(new Error("Could not get current user")):e({user:n,token:a.getIdToken().getJwtToken()})}):t(new Error("Could not get current user"))})}async function gs(){try{const e=localStorage.getItem("heavent-test-token");return h(e)?e:(await ms()).token}catch{return}}function hs(){ms().then(({user:e})=>{e.signOut(),location.reload()}).catch(()=>{alert("Something wrong happened ")})}function ps(){return ms().then(({user:e})=>{e.signOut()})}function fs(e,t,n){return new Promise((i,a)=>{const s=new os.TU({Username:e,Pool:us()}),o=new os.By({Username:e}),r={onSuccess(e){t(e.getIdToken().getJwtToken())},onFailure(e){e.code===ls?a(ls):n(e)},customChallenge(){localStorage.setItem(ds,e),localStorage.setItem(rs,s.Session),i({user:s,callbacks:r})}};s.setAuthenticationFlowType("CUSTOM_AUTH"),s.initiateAuth(o,r)})}async function Is(e,t,n){try{return await fs(e,t,n)}catch(i){if(i!==ls)throw i;try{return await function(e,t){const n=e.trim().toLowerCase();return new Promise((e,i)=>{const a=[new os.HB({Name:"email",Value:n})];us().signUp(n,t,a,[],(t,n)=>{t?i(t):e(n.user)})})}(e,as().toString()),await fs(e,t,n)}catch{throw new Error("Auth failure")}}}function _s({code:e,user:t,callbacks:n}){return new Promise((i,a)=>{t.sendCustomChallengeAnswer(e,{...n,onSuccess:(...e)=>{n.onSuccess(...e),i(e)},onFailure:e=>{n.onFailure(e),a({type:"FAILED",error:e})},customChallenge:(...e)=>{n.customChallenge&&n.customChallenge(...e),a({type:"RETRY"})}})}).then(([e])=>e.getIdToken().getJwtToken())}function xs(e,t,n){!async function(e){await fetch(`${sa.HEAVENT_API_URL}/log/report`,{method:"post",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})}({message:"Could not auth",errorMessage:e,email:t,location:location.href,diff:Math.round((Date.now()-n)/1e3),userAgent:navigator.userAgent})}async function ys(e,t={}){let n=sa.HEAVENT_API_URL.href;const i=new URL(location.href).searchParams,a=`${e} ${F(t.fragments)?Fa(t.fragments):""}`,s=as(),o={"Content-Type":"application/json",[ts]:es,[ns]:s};i.has("lang")&&(n=`${n}?lang=${i.get("lang")}`),t.token&&(o[is]=t.token);const r=await fetch(n,{method:"post",headers:o,body:JSON.stringify({query:a,variables:t.variables||{}})});if(r.ok){t.reloadOnNewVersion&&"true"===r.headers.get("x-heavent-new-version")&&document.body.dispatchEvent(new CustomEvent("h-new-version",{bubbles:!0}));const e=await r.json();if(e.errors){const t=e.errors[0]?.message??"";if("You need to be logged-in"===t)return localStorage.clear(),location.href="/crew",{};if(t.startsWith("You do not have access to this"))return location.href="/crew",{};throw Oa(e.errors,s)}{const t=(0,ss.A)(e.data),n={};return t.forEach(t=>{n[t]=Ja(e.data[t])}),n}}throw Oa(new Error(r.statusText),s)}function Ss(e,t,n){const i=Object.keys(t).sort().map(e=>{const n=t[e];return`"${e}":${JSON.stringify(n)}`}).join(",");return(0,d.useMemo)(()=>gs().then(i=>ys(e,{variables:t,token:i||void 0,fragments:n})),[e,i])}const js="mutation UserCreate {\n userCreate {\n id\n email\n }\n}\n";function bs(e={}){return Mi("mutation VolunteersRegistrationsMassAccredit(\n $eventId: EventId!\n $massAccredit: MassAccreditInput!\n) {\n numberOfMembers: volunteersRegistrationsMassAccredit(\n eventId: $eventId\n massAccredit: $massAccredit\n )\n}\n",e)}function vs(e={}){return Mi("mutation UsersInfosMassDelegationDelete(\n $organizationId: OrganizationId!\n $eventId: EventId\n $delegationId: DelegationId!\n $selecteds: MassActionSelectedsInput!\n $deleteFromEvent: Boolean\n) {\n usersInfosMassDelegationDelete(\n organizationId: $organizationId\n eventId: $eventId\n delegationId: $delegationId\n selecteds: $selecteds\n deleteFromEvent: $deleteFromEvent\n )\n}\n",e)}function As(e){return Ri("query OrganizationParametersInfos($organizationId: OrganizationId!) {\n organization(id: $organizationId) {\n ...OrganizationAdminInfos\n }\n}\n",e,[La.OrganizationAdminInfosFragment])}function Cs(e={}){return Mi("mutation PositionsSlotsUsersInfosCheckIn($eventId: EventId!, $checkIn: PositionSlotCheckInInput!) {\n numberOfMembers: positionsSlotsUsersInfosCheckIn(eventId: $eventId, checkIn: $checkIn)\n}\n",e)}function Es(e){return Ri("query UserPositions(\n $organizationId: OrganizationId!\n $eventId: EventId!\n $userInfoId: UsersInfoId!\n) {\n organization(id: $organizationId) {\n hideAssignmentsUntilConfirmationEmailSent\n\n userInfo(id: $userInfoId) {\n ...FormsUsersInfosWished\n }\n }\n\n event(id: $eventId) {\n name\n startAt\n endAt\n dayStartTime\n hasFormWithPositionDisplay\n hasFormWithSlotDisplay\n\n volunteerRegistration: volunteerRegistrationByUserInfoId(userInfoId: $userInfoId) {\n id\n volunteerMinutes\n isAssignmentsEmailSent\n\n positionsSlotsUsersInfos {\n ...UserPositionSlotUserInfo\n }\n\n preassignPositions {\n id\n name\n range\n }\n\n preassignPositionsCategories {\n id\n name\n range\n }\n }\n }\n}\n",e,[La.FormsUsersInfosWishedFragment,La.UserPositionSlotUserInfoFragment])}function Ts(e,t){return ys("query ConditionsCustomFields(\n $organizationId: OrganizationId!\n $eventId: EventId\n $fieldTypes: [FieldType!]\n) {\n organization(id: $organizationId) {\n customFields(eventId: $eventId, variety: UserInfo, privacy: All, fieldTypes: $fieldTypes) {\n nodes {\n id\n name\n }\n }\n }\n}\n",{variables:e,token:t||void 0,fragments:[]})}function Rs(e={}){return Mi("mutation FormRegister(\n $organizationId: OrganizationId!\n $eventId: EventId\n $delegationId: DelegationId\n $formId: FormId!\n $email: UserEmail!\n $formRegister: FormRegisterInput!\n) {\n formRegister(\n organizationId: $organizationId\n eventId: $eventId\n delegationId: $delegationId\n formId: $formId\n email: $email\n formRegister: $formRegister\n ) {\n teamCode\n }\n}\n",e)}function Ms(e,t){return ys("query User(\n $organizationId: OrganizationId!\n $eventId: EventId\n $id: UsersInfoId!\n $includeComments: Boolean!\n $includeDelegations: Boolean!\n $includeDuplicatedFrom: Boolean!\n $includeEmails: Boolean!\n $includeEvents: Boolean!\n $includeForms: Boolean!\n $includeTags: Boolean!\n $includeRoles: Boolean!\n) {\n data: organization(id: $organizationId) {\n row: userInfo(id: $id) {\n ...UserInfoCommunity\n }\n }\n}\n",{variables:e,token:t||void 0,fragments:[La.UserInfoCommunityFragment]})}function Ds(e,t){return ys("query Users(\n $organizationId: OrganizationId!\n $eventId: EventId\n $predicatesGroups: PredicatesGroups!\n $name: String\n $columnsSearch: [String!]\n $limit: Int\n $offset: Int\n $sort: UsersInfosSort\n $delegationCategoryId: DelegationsCategoryId\n $delegationId: DelegationId\n $includeComments: Boolean!\n $includeDelegations: Boolean!\n $includeDuplicatedFrom: Boolean!\n $includeEmails: Boolean!\n $includeEvents: Boolean!\n $includeForms: Boolean!\n $includeTags: Boolean!\n $includeRoles: Boolean!\n) {\n data: organization(id: $organizationId) {\n rows: usersInfos(\n predicatesGroups: $predicatesGroups\n name: $name\n columnsSearch: $columnsSearch\n delegationCategoryId: $delegationCategoryId\n delegationId: $delegationId\n limit: $limit\n offset: $offset\n sort: $sort\n ) {\n nodes {\n ...UserInfoCommunity\n }\n\n numberOfPages\n totalCount\n }\n }\n}\n",{variables:e,token:t||void 0,fragments:[La.UserInfoCommunityFragment]})}function Os(e={}){return Mi("mutation EmailUpdate(\n $organizationId: OrganizationId!\n $eventId: EventId\n $delegationId: DelegationId\n $userInfoId: UsersInfoId!\n $email: UserEmail!\n) {\n emailUpdate(\n organizationId: $organizationId\n eventId: $eventId\n delegationId: $delegationId\n userInfoId: $userInfoId\n email: $email\n )\n}\n",e)}function ws(e,t){return ys("query EventAccreditationsSlots($eventId: EventId!, $loadIsBlocked: Boolean!) {\n event(id: $eventId) {\n accreditationsCategories {\n id\n name\n\n accreditations {\n id\n name\n acronym\n accreditationDisplay\n index\n\n slots(includeHidden: true) {\n id\n name\n date\n isBlocked @include(if: $loadIsBlocked)\n }\n }\n }\n }\n}\n",{variables:e,token:t||void 0,fragments:[]})}function Ps(e,t){return ys("query EventPositionsSlots($eventId: EventId!) {\n event(id: $eventId) {\n positionsCategories {\n id\n name\n\n positions {\n id\n name\n acronym\n positionDisplay\n\n slots {\n id\n name\n range\n }\n }\n }\n }\n}\n",{variables:e,token:t||void 0,fragments:[]})}function $s(e={}){return Mi("mutation LoginCodeEmailCreate($loginCodeEmail: LoginCodesEmailInput!) {\n loginCodeEmailCreate(loginCodeEmail: $loginCodeEmail) {\n insertedAt\n }\n}\n",e)}function ks(e={}){return Mi("mutation VolunteersRegistrationsAccreditationsValidate(\n $eventId: EventId!\n $delegationId: DelegationId\n $selecteds: MassActionSelectedsInput!\n) {\n numberOfMembers: volunteersRegistrationsAccreditationsValidate(\n eventId: $eventId\n delegationId: $delegationId\n selecteds: $selecteds\n )\n}\n",e)}function Ns(e={}){return Mi("mutation VolunteersRegistrationsMassAssign($eventId: EventId!, $massAssign: MassAssignInput!) {\n numberOfMembers: volunteersRegistrationsMassAssign(eventId: $eventId, massAssign: $massAssign)\n}\n",e)}function Ls(e={}){return Mi("mutation VolunteersRegistrationsMassDelegationAdd(\n $eventId: EventId!\n $delegationId: DelegationId!\n $selecteds: MassActionSelectedsInput!\n) {\n numberOfMembers: volunteersRegistrationsMassDelegationAdd(\n eventId: $eventId\n delegationId: $delegationId\n selecteds: $selecteds\n )\n}\n",e)}function zs(e={}){return Mi("mutation VolunteerRegistrationUpdateField(\n $eventId: EventId!\n $volunteerRegistrationId: VolunteersRegistrationId!\n $slug: String!\n $value: JSON!\n) {\n volunteerRegistrationUpdateField(\n eventId: $eventId\n volunteerRegistrationId: $volunteerRegistrationId\n slug: $slug\n value: $value\n ) {\n id\n }\n}\n",e)}function Fs(e,t){return ys("query Volunteer(\n $eventId: EventId!\n $id: VolunteersRegistrationId!\n $delegationId: DelegationId\n $includeAccreditationProfile: Boolean!\n $onlyVisibleAccreditationsSlots: Boolean\n $includeAccreditations: Boolean!\n $includeAccreditationsMatrix: Boolean!\n $includeAvailability: Boolean!\n $includeCanRegistrationStateUpdate: Boolean!\n $includeComments: Boolean!\n $includeCustomDocuments: Boolean!\n $includeDelegation: Boolean!\n $includeDuplicatedFrom: Boolean!\n $includeEmails: Boolean!\n $includeFormsUsersInfos: Boolean!\n $includeForms: Boolean!\n $includeIsEditable: Boolean!\n $includeNumberOfAccreditations: Boolean!\n $includeNumberOfAssignments: Boolean!\n $includeNumberOfAssignmentsDays: Boolean!\n $includeNumberOfAvailableDays: Boolean!\n $includePicture: Boolean!\n $includePositions: Boolean!\n $includeRoles: Boolean!\n $includeTags: Boolean!\n $includeTeam: Boolean!\n $includeVolunteerMinutes: Boolean!\n $includeWishedPositions: Boolean!\n $includePreassignedPositions: Boolean!\n $includeWeezeventChecklists: Boolean!\n $includeWeezeventUrls: Boolean!\n) {\n data: event(id: $eventId) {\n row: volunteerRegistration(id: $id) {\n ...VolunteerRegistration\n }\n }\n}\n",{variables:e,token:t||void 0,fragments:[La.VolunteerRegistrationFragment]})}function Us(e,t){return ys("query Volunteers(\n $eventId: EventId!\n $predicatesGroups: PredicatesGroups!\n $limit: Int\n $offset: Int\n $sort: VolunteersRegistrationsSort\n $name: String\n $columnsSearch: [String!]\n $positionCategoryId: PositionsCategoryId\n $positionId: PositionId\n $preassignedPositionCategoryId: PositionsCategoryId\n $preassignedPositionId: PositionId\n $accreditationsCategoriesIds: [AccreditationsCategoryId!]\n $accreditationsIds: [AccreditationId!]\n $accreditationsSlotsIds: [AccreditationsSlotId!]\n $accreditationsProfilesCategoriesIds: [AccreditationsProfilesCategoryId!]\n $accreditationsProfilesIds: [AccreditationsProfileId!]\n $delegationCategoryId: DelegationsCategoryId\n $delegationId: DelegationId\n $hasCoordinates: Boolean\n $includeAccreditationProfile: Boolean!\n $onlyVisibleAccreditationsSlots: Boolean\n $includeAccreditations: Boolean!\n $includeAccreditationsMatrix: Boolean!\n $includeAvailability: Boolean!\n $includeCanRegistrationStateUpdate: Boolean!\n $includeComments: Boolean!\n $includeCustomDocuments: Boolean!\n $includeDelegation: Boolean!\n $includeDuplicatedFrom: Boolean!\n $includeEmails: Boolean!\n $includeFormsUsersInfos: Boolean!\n $includeForms: Boolean!\n $includeIsEditable: Boolean!\n $includeNumberOfAccreditations: Boolean!\n $includeNumberOfAssignments: Boolean!\n $includeNumberOfAssignmentsDays: Boolean!\n $includeNumberOfAvailableDays: Boolean!\n $includePicture: Boolean!\n $includePositions: Boolean!\n $includeRoles: Boolean!\n $includeTags: Boolean!\n $includeTeam: Boolean!\n $includeTraces: Boolean!\n $includeVolunteerMinutes: Boolean!\n $includeWishedPositions: Boolean!\n $includePreassignedPositions: Boolean!\n $includeWeezeventChecklists: Boolean!\n $includeWeezeventUrls: Boolean!\n) {\n data: event(id: $eventId) {\n layer\n latitude\n longitude\n\n rows: volunteersRegistrations(\n predicatesGroups: $predicatesGroups\n name: $name\n columnsSearch: $columnsSearch\n positionCategoryId: $positionCategoryId\n positionId: $positionId\n preassignedPositionCategoryId: $preassignedPositionCategoryId\n preassignedPositionId: $preassignedPositionId\n accreditationsCategoriesIds: $accreditationsCategoriesIds\n accreditationsIds: $accreditationsIds\n accreditationsSlotsIds: $accreditationsSlotsIds\n accreditationsProfilesCategoriesIds: $accreditationsProfilesCategoriesIds\n accreditationsProfilesIds: $accreditationsProfilesIds\n delegationCategoryId: $delegationCategoryId\n delegationId: $delegationId\n hasCoordinates: $hasCoordinates\n limit: $limit\n offset: $offset\n sort: $sort\n ) {\n nodes {\n ...VolunteerRegistration\n }\n\n numberOfPages\n totalCount\n }\n\n traces @include(if: $includeTraces) {\n ...Trace\n }\n }\n}\n",{variables:e,token:t||void 0,fragments:[La.VolunteerRegistrationFragment,La.TraceFragment]})}function Bs(e={}){return Mi("mutation VolunteersRegistrationsMassWishedAccreditationsUpdate(\n $organizationId: OrganizationId!\n $eventId: EventId!\n $delegationId: DelegationId!\n $massAccredit: MassAccreditInput!\n) {\n volunteersRegistrationsMassWishedAccreditationsUpdate(\n organizationId: $organizationId\n eventId: $eventId\n delegationId: $delegationId\n massAccredit: $massAccredit\n )\n}\n",e)}function Gs(e={}){return Mi("mutation VolunteersRegistrationsMassWishedProfileUpdate(\n $organizationId: OrganizationId!\n $eventId: EventId!\n $delegationId: DelegationId!\n $massProfileUpdate: MassAccreditationProfileUpdateInput!\n) {\n volunteersRegistrationsMassWishedProfileUpdate(\n organizationId: $organizationId\n eventId: $eventId\n delegationId: $delegationId\n massProfileUpdate: $massProfileUpdate\n )\n}\n",e)}const Vs=async()=>{const{user:e}=await(async()=>{try{const e=await async function(){const e=await gs();if(h(e)){const{user:t}=await function(e,t){return ys("query CurrentUser {\n user {\n id\n email\n hubspotToken\n insertedAt\n language\n profile\n termsAcceptedAt\n }\n}\n",{variables:{},token:t||void 0,fragments:[]})}(0,e);return{user:t}}throw new Error("No token")}();return $a.wB.defaultLocale=e.user.language.toLowerCase(),e}catch{return{user:null}}})();return await(e=>{const t=new URL(location.href).searchParams.get("lang");let n=null;return e&&(n=e.language.toLowerCase()),h(t)&&(n=t),ka(`${sa.HEAVENT_API_URL}/translation/language.js?${n?`lang=${n}`:""}`)})(e),{user:e}},Ws=window.matchMedia("(max-width: 1200px)"),qs=d.createContext({isMobile:!1}),Ys=e=>{const[t,n]=d.useState(!1);return d.useEffect(()=>{n(Ws.matches),Ws.addListener(e=>{n(e.matches)})},[]),(0,i.jsx)(qs.Provider,{value:{isMobile:t},children:e.children})},Hs="old",Zs="new2025",Ks=(0,d.createContext)({});function Qs(){return(0,d.useContext)(Ks)}const Xs=e=>{const t=(0,d.useRef)(null),n=(0,d.useCallback)(e=>{e&&(t.current=e,setTimeout(()=>{e.style.right=b.space[6].value},100))},[]),a=(0,d.useCallback)(()=>{t.current.style.right="-400px",e.onClose()},[e.onClose]);return(0,ya.createPortal)((0,i.jsxs)($,{ref:n,align:"center",className:"h-notification",css:{background:"black"===e.color?"$gray900":"error"===e.color?"$error400":"$success500",borderRadius:"$2",boxShadow:"$lg",maxHeight:"120px",padding:"$2 $4",position:"absolute",right:"-400px",top:"$6",transition:"0.5s right ease-in-out",zIndex:"1000"},gap:"3",role:"status",width:400,children:[(0,i.jsx)($,{align:"center",css:{color:"white"},justify:"center",children:(0,i.jsx)(la,{icon:"black"===e.color?"circle-exclamation":"error"===e.color?"circle-xmark":"circle-check",iconStyle:"solid"})}),(0,i.jsx)(Ni,{color:"white",css:{flex:"1","& a":{color:"white",textDecoration:"underline"}},dangerouslySetInnerHTML:{__html:e.text},fontWeight:"medium"}),(0,i.jsx)($,{align:"center",css:{color:"white",cursor:"pointer",fontSize:"$textMd"},height:32,justify:"center",width:32,onClick:a,children:(0,i.jsx)(la,{icon:"xmark"})})]}),document.body)},Js=2e3,eo=(0,d.createContext)({}),to=e=>{const t=Ei(),[n,a]=(0,d.useState)(!1),[s,o]=(0,d.useState)({color:"success",text:""}),r=(0,d.useCallback)(()=>{setTimeout(()=>{a(!1)},1200)},[a]),l=(0,d.useCallback)(e=>{a(!0),o("string"==typeof e?{text:e}:e),setTimeout(r,$a.dw.fromObject({seconds:5}).toMillis())},[a,o,r]),{mutate:c}=function(e={}){return Mi("mutation AccreditationsImportResult(\n $jobId: JobId!\n $organizationId: OrganizationId!\n $eventId: EventId!\n) {\n accreditationsImportResult(organizationId: $organizationId, eventId: $eventId, jobId: $jobId) {\n state\n event {\n name\n }\n }\n}\n",e)}(),u=(0,d.useRef)(null),m=(0,d.useCallback)((e,n,i)=>{u.current=window.setInterval(async()=>{const{accreditationsImportResult:{state:a}}=await c({jobId:e,organizationId:n,eventId:i});a===H.Done&&(clearInterval(u.current),l({color:"success",text:t("votre_import_es_60265")}))},Js)},[]),{mutate:g}=function(e={}){return Mi("mutation AccreditationsProfilesImportResult(\n $jobId: JobId!\n $organizationId: OrganizationId!\n $eventId: EventId!\n) {\n accreditationsProfilesImportResult(\n organizationId: $organizationId\n eventId: $eventId\n jobId: $jobId\n ) {\n state\n event {\n name\n }\n }\n}\n",e)}(),h=(0,d.useRef)(null),p=(0,d.useCallback)((e,n,i)=>{h.current=window.setInterval(async()=>{const{accreditationsProfilesImportResult:{state:a}}=await g({jobId:e,organizationId:n,eventId:i});a===H.Done&&(clearInterval(h.current),l({color:"success",text:t("votre_import_es_60265")}))},Js)},[]),{mutate:f}=function(e={}){return Mi("mutation DelegationsImportResult(\n $jobId: JobId!\n $organizationId: OrganizationId!\n $eventId: EventId!\n) {\n delegationsImportResult(jobId: $jobId, organizationId: $organizationId, eventId: $eventId) {\n state\n event {\n name\n }\n }\n}\n",e)}(),I=(0,d.useRef)(null),_=(0,d.useCallback)((e,n,i)=>{I.current=window.setInterval(async()=>{const{delegationsImportResult:{state:a,event:s}}=await f({jobId:e,organizationId:n,eventId:i});a===xe.Done&&(clearInterval(I.current),l({color:"success",text:t("votre_import_es_98992",s.name)}))},Js)},[]),{mutate:x}=function(e={}){return Mi("mutation EventDocumentsExportResult(\n $organizationId: OrganizationId!\n $eventId: EventId!\n $delegationId: DelegationId\n $jobId: JobId!\n) {\n eventDocumentsExportResult(\n organizationId: $organizationId\n eventId: $eventId\n delegationId: $delegationId\n jobId: $jobId\n ) {\n state\n url\n }\n}\n",e)}(),y=(0,d.useRef)(null),S=(0,d.useCallback)((e,n,i)=>{y.current=window.setInterval(async()=>{const{eventDocumentsExportResult:a}=await x({jobId:e,organizationId:n,eventId:i});a.state===Pe.Done&&(clearInterval(y.current),l({color:"success",text:t("l_export_de_vos_38257",a.url)}))},Js)},[]),{mutate:j}=function(e={}){return Mi("mutation EventsImportResult($jobId: JobId!, $organizationId: OrganizationId!) {\n eventsImportResult(jobId: $jobId, organizationId: $organizationId) {\n state\n }\n}\n",e)}(),b=(0,d.useRef)(null),v=(0,d.useCallback)((e,n)=>{b.current=window.setInterval(async()=>{const{eventsImportResult:{state:i}}=await j({jobId:e,organizationId:n});i===Me.Done&&(clearInterval(b.current),l({color:"success",text:t("votre_import_es_60265")}))},Js)},[]),{mutate:A}=function(e={}){return Mi("mutation ExportResult($jobId: JobId!, $organizationId: OrganizationId!, $eventId: EventId) {\n exportResult(jobId: $jobId, organizationId: $organizationId, eventId: $eventId) {\n state\n url\n }\n}\n",e)}(),C=(0,d.useRef)(null),E=(0,d.useCallback)((e,n,i)=>{C.current=window.setInterval(async()=>{const{exportResult:a}=await A({jobId:e,organizationId:n,eventId:i});a.state===Pe.Done&&(clearInterval(C.current),l({color:"success",text:t("votre_export_es_96069",a.url)}))},Js)},[]),{mutate:T}=function(e={}){return Mi("mutation FilesImportResult($jobId: JobId!, $organizationId: OrganizationId!, $eventId: EventId) {\n filesImportResult(jobId: $jobId, organizationId: $organizationId, eventId: $eventId) {\n state\n event {\n name\n }\n }\n}\n",e)}(),R=(0,d.useRef)(null),M=(0,d.useCallback)((e,n,i)=>{R.current=window.setInterval(async()=>{const{filesImportResult:{state:a,event:s}}=await T({jobId:e,organizationId:n,eventId:i});a===ze.Done&&(clearInterval(R.current),l({color:"success",text:s?t("votre_import_es_11791",s.name):t("votre_import_es_10672")}))},Js)},[]),{mutate:D}=function(e={}){return Mi("mutation PositionsImportResult(\n $jobId: JobId!\n $organizationId: OrganizationId!\n $eventId: EventId!\n) {\n positionsImportResult(jobId: $jobId, organizationId: $organizationId, eventId: $eventId) {\n state\n event {\n name\n }\n }\n}\n",e)}(),O=(0,d.useRef)(null),w=(0,d.useCallback)((e,n,i)=>{O.current=window.setInterval(async()=>{const{positionsImportResult:{state:a,event:s}}=await D({jobId:e,organizationId:n,eventId:i});a===dt.Done&&(clearInterval(O.current),l({color:"success",text:t("votre_import_es_11848",s.name)}))},Js)},[]),{mutate:P}=function(e={}){return Mi("mutation VolunteersImportResult(\n $jobId: JobId!\n $organizationId: OrganizationId!\n $eventId: EventId\n $delegationId: DelegationId\n) {\n volunteersImportResult(\n jobId: $jobId\n organizationId: $organizationId\n eventId: $eventId\n delegationId: $delegationId\n ) {\n state\n event {\n name\n }\n }\n}\n",e)}(),$=(0,d.useRef)(null),k=(0,d.useCallback)((e,n,i,a)=>{$.current=window.setInterval(async()=>{const{volunteersImportResult:{state:s,event:o}}=await P({jobId:e,organizationId:n,eventId:i,delegationId:a});s===Gt.Done&&(clearInterval($.current),l({color:"success",text:o?t("votre_import_es_37822",o.name):t("votre_import_es_14145")}))},Js)},[]);return(0,i.jsx)(eo.Provider,{value:{checkAccreditationsImport:m,checkAccreditationsProfilesImport:p,checkDelegationsImport:_,checkDocumentsExport:S,checkEventsImport:v,checkExport:E,checkFilesImport:M,checkPositionsImport:w,checkVolunteersImport:k,showNotification:l},children:(0,i.jsxs)(i.Fragment,{children:[n&&(0,i.jsx)(Xs,{color:s.color??"success",text:s.text,onClose:r}),e.children]})})},no=(0,d.createContext)({user:null});function io(){return(0,d.useContext)(no)}const ao=(0,i.jsx)(ua,{});function so(e,{redirectOnSuccess:t}={}){const[n,i]=(0,d.useState)(!1),{setIsError:a}=(0,d.useContext)(wa);let s=null;return n&&(s=ao),{isLoading:n,loader:s,mutate:async(n,s)=>{i(!0);try{const o=await gs(),r=await((e,t,n)=>ys(e,{variables:t,token:n||void 0}))(e,n,s||o);return!0!==t&&(i(!1),a(!1)),r}catch(e){throw a(!0,e),i(!1),e}}}}const oo=(0,i.jsx)(ua,{});function ro(e,t,n){const[i,a]=(0,d.useState)(!0),[s,o]=(0,d.useState)({}),[r,l]=(0,d.useState)(0),{setIsError:c}=(0,d.useContext)(wa),u=Object.keys(t).sort().map(e=>{const n=t[e];return`"${e}":${JSON.stringify(n)}`}).join(",");(0,d.useEffect)(()=>{let i=!1;var s;return a(!0),s=u,gs().then(i=>ys(e,{reloadOnNewVersion:!0,variables:t,token:i,fragments:n})).then(e=>{i||s!==u||(o(e),c(!1),a(!1))},e=>{i||s!==u||c(!0,e)}),()=>{i=!0}},[e,u,r]);let m=null;return i&&(m=oo),{data:s,isLoading:i,loader:m,reload(){l(r+1)}}}var lo=n(6347);function co(){return function(e,t={}){return Object.fromEntries(Object.entries(e).map(([e,n])=>e.endsWith("Id")||"id"===e?[e,parseInt(n,10)]:t[e]?[e,t[e](n)]:[e,n]))}((0,lo.g)())}function uo(){const e=(0,lo.W6)();return{...e,goBack:t=>{"POP"===e.action&&e.length<=2?e.push(t):e.goBack()}}}function mo(){return(0,lo.zy)()}function go(){return(0,d.useMemo)(()=>{try{return{clear:window.localStorage.clear.bind(window.localStorage),setItem:window.localStorage.setItem.bind(window.localStorage),getItem:window.localStorage.getItem.bind(window.localStorage),removeItem:window.localStorage.removeItem.bind(window.localStorage),key:window.localStorage.key.bind(window.localStorage),get length(){return window.localStorage.length},getItemInt(e){const t=parseInt(window.window.localStorage.getItem(e),10);return isNaN(t)?null:t}}}catch{return{clear(){},setItem(){},getItem:()=>null,removeItem(){},key:()=>null,get length(){return 0},getItemInt:()=>null}}},[])}var ho=n(2499),po=n(9241),fo=n(2664);function Io(e){return"number"==typeof e&&!isNaN(e)}function _o(e){return"number"==typeof e&&Number.isInteger(e)&&e>0}function xo(e){return e?{lat:e.latitude,lng:e.longitude}:null}const yo=xo({latitude:43.6087733,longitude:3.87963579999996});function So(e){return Io(e.latitude)&&Io(e.longitude)?(0,D.A)(e,["latitude","longitude"]):void 0}function jo(e){return e===Xe.GoogleSatellite?"satellite":e===Xe.Google?"roadmap":e??Xe.Google}let bo=class{translationService;constructor(e){this.translationService=e}t(e,...t){return this.translationService.translate(e,...t)}};bo=function(e,t,n,i){var a,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(a=e[r])&&(o=(s<3?a(o):s>3?a(t,n,o):a(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o}([(0,En._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[bi])],bo);let vo=class extends bo{translationService;constructor(e){super(e),this.translationService=e}oneOfMessage(e,t){return this.t("_1_doit_tre_70659",e,this.translationService.formatListValues(t.map(e=>this.t(e))))}};vo=function(e,t,n,i){var a,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(a=e[r])&&(o=(s<3?a(o):s>3?a(t,n,o):a(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o}([(0,En._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[bi])],vo);let Ao=class extends vo{constructor(e){super(e)}accreditationsCustomFieldInputSchema(){return fo.Ik().shape({customFieldId:fo.ai().required(this.t("le_champ_person_80074")),conditionValue:fo.gl().required(this.t("la_condition_es_66568"))})}};Ao=function(e,t,n,i){var a,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(a=e[r])&&(o=(s<3?a(o):s>3?a(t,n,o):a(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o}([(0,En._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[bi])],Ao);const Co=fo.gl(e=>e&&$a.c9.fromISO(e).isValid);let Eo=class extends vo{constructor(e){super(e)}accreditationsSlotInputDefault(){return{name:""}}createAccreditationSlotSchema(){return fo.Ik().shape({slot:this.accreditationsSlotInputSchema()})}accreditationsSlotInputSchema(){return fo.Ik().shape({name:fo.Yj(),maxResources:fo.ai().nullable(),date:Co.typeError(this.t("la_date_est_inv_22002")).nullable()})}};Eo=function(e,t,n,i){var a,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(a=e[r])&&(o=(s<3?a(o):s>3?a(t,n,o):a(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o}([(0,En._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[bi])],Eo);let To=class extends vo{accreditationsCustomFieldInput;accreditationsSlotInput;constructor(e,t,n){super(e),this.accreditationsCustomFieldInput=t,this.accreditationsSlotInput=n}createUpdateAccreditationValuesDefault(e,t,n){const i=this.accreditationInputDefault(e,t,n);return{accreditation:i,hasNumberOfDaysLimit:"number"==typeof i.numberOfDaysLimit}}accreditationInputSchema(){return fo.Ik().shape({name:fo.Yj().required(this.t("le_nom_de_l_acc_82676")),accreditationCategoryId:fo.ai().required(this.t("la_cat_gorie_es_14008")).typeError(this.t("la_cat_gorie_es_14008")).min(1,this.t("la_cat_gorie_es_14008")),description:fo.Yj(),privateNote:fo.Yj(),acronym:fo.Yj(),color:fo.Yj().required(this.t("la_couleur_est_95740")),icon:fo.Yj().required(this.t("l_ic_ne_est_req_15843")).oneOf(qn,this.t("l_ic_ne_est_req_15843")),weezeventIsSynchronized:fo.zM().required(),address:fo.Yj().nullable(),latitude:fo.ai().nullable().typeError(this.t("la_latitude_doi_43118")),longitude:fo.ai().nullable().typeError(this.t("la_longitude_do_35170")),zoom:fo.ai().required(this.t("le_niveau_de_zo_52687")).min(0,this.t("le_niveau_de_zo_38516")).max(23,this.t("le_niveau_de_zo_38516")),layer:fo.Yj().required(this.t("le_fond_de_cart_48524")).oneOf(Kn,this.t("le_fond_de_cart_48524")),slots:fo.YO().of(this.accreditationsSlotInput.accreditationsSlotInputSchema()),accreditationDisplay:fo.Yj().required(this.t("le_type_d_affic_60154")).oneOf(Tn,this.t("le_type_d_affic_60154")).test("calendar-slots",this.t("tous_les_cr_nea_42033"),(e,t)=>e!==W.Calendar||F(t.parent.slots)&&t.parent.slots.every(e=>e.date?.isValid)),numberOfDaysLimit:fo.ai().notRequired(),accreditationsCustomFields:fo.YO().of(this.accreditationsCustomFieldInput.accreditationsCustomFieldInputSchema()),formCustomFields:fo.YO(),tagsIds:fo.YO().of(fo.ai())})}createUpdateAccreditationSchema(e){const t=this.accreditationInputSchema();return fo.Ik().shape({accreditation:e?t.shape({fields:e}):t})}accreditationInputDefault(e,t,n){let i=t?.accreditationCategoryId??n;return Number.isInteger(i)||(i=null),{accreditationCategoryId:i,name:t?.name??"",description:t?.description??"",privateNote:t?.privateNote??"",acronym:t?.acronym??"",color:t?.color??b.colors.primary500.value,icon:t?.icon??qe.BadgeCheck,weezeventIsSynchronized:t?.weezeventIsSynchronized??!0,willAutoAccredit:t?.willAutoAccredit??!1,address:t?.address??null,latitude:t?.latitude??null,longitude:t?.longitude??null,zoom:t?.zoom??13,layer:t?.layer??e,accreditationDisplay:t?.accreditationDisplay??W.List,numberOfDaysLimit:t?.numberOfDaysLimit??null,slots:(0,ho.A)(t?.slots??[],e=>(0,po.A)([e.date?.toMillis(),e.name])),conditionsOperator:t?.conditionsOperator??ue.And,accreditationsCustomFields:t?.accreditationsCustomFields??[],tagsIds:t?.tagsIds??[],fields:t?.fields??{},formCustomFields:t?.formCustomFields??[]}}};To=function(e,t,n,i){var a,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(a=e[r])&&(o=(s<3?a(o):s>3?a(t,n,o):a(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o}([(0,En._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[bi,Ao,Eo])],To);let Ro=class extends vo{constructor(e){super(e)}createUpdateAccreditationProfileValuesDefault(e,t){return{accreditationProfile:this.accreditationProfileInputDefault(e,t)}}accreditationProfileInputSchema(){return fo.Ik().shape({accreditationProfileCategoryId:fo.ai().required(this.t("la_cat_gorie_es_14008")).typeError(this.t("la_cat_gorie_es_14008")).min(1,this.t("la_cat_gorie_es_14008")),name:fo.Yj().required(this.t("le_nom_de_l_acc_82676")),description:fo.Yj(),acronym:fo.Yj().nullable(),color:fo.Yj().required(this.t("la_couleur_est_95740")),icon:fo.Yj().required(this.t("l_ic_ne_est_req_15843")).oneOf(qn,this.t("l_ic_ne_est_req_15843")),accreditationsSlotsIds:fo.YO().of(fo.ai()).min(1,this.t("vous_devez_s_le_34381"))})}createUpdateAccreditationProfileSchema(){return fo.Ik().shape({accreditationProfile:this.accreditationProfileInputSchema()})}accreditationProfileInputDefault(e,t){let n=e?.accreditationProfileCategoryId??t;return Number.isInteger(n)||(n=null),{accreditationProfileCategoryId:n,name:e?.name??"",description:e?.description??"",acronym:e?.acronym??"",color:e?.color??b.colors.primary500.value,icon:e?.icon??qe.BadgeCheck,accreditationsSlotsIds:e?.accreditationsSlotsIds??[]}}};Ro=function(e,t,n,i){var a,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(a=e[r])&&(o=(s<3?a(o):s>3?a(t,n,o):a(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o}([(0,En._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[bi])],Ro);var Mo=n(4809);const Do=5e9,Oo=2e7;function wo(e){let t=e;try{t=new URL(e).pathname}catch{}if(h(t)){const e=t.split(/[\\/]/).pop(),n=e.lastIndexOf(".");let i=e,a="";return n>=0&&(i=e.substring(0,n),a=e.substring(n+1).toLowerCase()),{path:t,name:i,extension:a}}return{path:"",name:"",extension:""}}var Po;!function(e){e.Csv="text/csv",e.Default="application/octet-stream",e.Excel="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",e.Gif="image/gif",e.Jpeg="image/jpeg",e.Pdf="application/pdf",e.Png="image/png",e.Zip="application/zip"}(Po||(Po={}));const $o=e=>{switch(e.toLowerCase()){case"csv":return Po.Csv;case"xls":case"xlsx":return Po.Excel;case"gif":return Po.Gif;case"jpg":case"jpeg":return Po.Jpeg;case"pdf":return Po.Pdf;case"png":return Po.Png;case"zip":return Po.Zip;default:return Po.Default}};let ko=class extends vo{constructor(e){super(e)}csvDocumentInputDefault(e){return{key:"",name:"",acl:"",formats:{timeFormat:"HH:mm",dateFormat:Ua,datetimeFormat:"yyyy-MM-dd HH:mm",...e}}}schema(){const e=this.t("le_document_est_86403");return fo.Ik().shape({acl:fo.Yj().required(e),delimiter:fo.Yj().optional().test("is-valid-value",this.t("delimiter_value_52108"),e=>!e||!Mo.BAD_DELIMITERS.includes(e)),key:fo.Yj().required(e).test("is-a-csv",this.t("le_fichier_n_es_33134"),e=>$o(wo(e).extension)===Po.Csv),name:fo.Yj().required(e),newline:fo.Yj().optional().test("is-valid-value",this.t("newline_charact_88066"),e=>!e||["\r","\n","\r\n"].includes(e)),quoteChar:fo.Yj().optional(),formats:fo.Ik().shape({timeFormat:fo.Yj().optional(),dateFormat:fo.Yj().optional(),datetimeFormat:fo.Yj().optional()}),file:fo.gl().test("is-not-empty",this.t("the_file_is_emp_77243"),e=>!e||e.size>0).test("is-not-too-big",this.t("le_fichier_est_17522"),e=>!e||e.size=0;r--)(a=e[r])&&(o=(s<3?a(o):s>3?a(t,n,o):a(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o}([(0,En._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[bi])],ko);var No;let Lo=class extends vo{static{No=this}csvInputService;static IMPORT_COLUMNS_DEFAULT={Id:"id"};static IMPORT_COLUMNS_REQUIRED=e=>e===Ye.Update?[No.IMPORT_COLUMNS_DEFAULT.Id]:[];constructor(e,t){super(t),this.csvInputService=e}default(e){return{input:{csv:this.csvInputService.csvDocumentInputDefault(e),mode:Ye.Upsert}}}schema(){return fo.Ik().shape({input:fo.Ik().shape({csv:this.csvInputService.schema(),mode:fo.Yj().oneOf(Yn,this.t("le_mode_d_impor_75706"))})})}};Lo=No=function(e,t,n,i){var a,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(a=e[r])&&(o=(s<3?a(o):s>3?a(t,n,o):a(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o}([(0,En._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[ko,bi])],Lo);let zo=class extends Lo{csvInputService;default(e){return{input:{csv:this.csvInputService.csvDocumentInputDefault(e),mappings:[],presets:[],mode:Ye.Upsert,tag:""}}}schema(){return fo.Ik().shape({input:fo.Ik().shape({csv:this.csvInputService.schema(),mappings:fo.YO().of(fo.Yj().nullable()),presets:fo.YO().of(fo.Ik().shape({customFieldId:fo.ai().positive(this.t("le_choix_du_typ_07079")),value:fo.gl().when("customFieldId",{is:e=>e>-1,then:e=>e.required(this.t("la_valeur_du_ch_65599"))})})),mode:fo.Yj().oneOf(Yn,this.t("le_mode_d_impor_75706")),tag:fo.Yj().required("a_tag_must_be_s_23274")})})}settingsStepSchema(){return fo.Ik().shape({input:fo.Ik().shape({csv:this.csvInputService.schema()})})}mappingStepSchema(){return fo.Ik().shape({input:fo.Ik().shape({mappings:fo.YO().of(fo.Yj().nullable()),presets:fo.YO().of(fo.Ik().shape({customFieldId:fo.ai().positive(this.t("le_choix_du_typ_07079")),value:fo.gl().when("customFieldId",{is:e=>e>-1,then:e=>e.required(this.t("la_valeur_du_ch_65599"))})})),mode:fo.Yj().oneOf(Yn,this.t("le_mode_d_impor_75706")),tag:fo.Yj().required("a_tag_must_be_s_23274")})})}constructor(e,t){super(e,t),this.csvInputService=e}};zo=function(e,t,n,i){var a,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(a=e[r])&&(o=(s<3?a(o):s>3?a(t,n,o):a(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o}([(0,En._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[ko,bi])],zo);var Fo;let Uo=class extends zo{static{Fo=this}csvInputService;static IMPORT_COLUMNS_DEFAULT={...zo.IMPORT_COLUMNS_DEFAULT,AccreditationName:"accreditationName",AccreditationCategoryName:"accreditationCategoryName",SlotName:"slotName",SlotDate:"slotDate",MaxResources:"slotMaxResources",Acronym:"acronym",Color:"color",Icon:"icon",Description:"description",ConditionsOperator:"conditionsOperator",Address:"address",Latitude:"latitude",Longitude:"longitude",MapLayer:"mapLayer",MapZoom:"mapZoom",PrivateNote:"privateNote",Tags:"tags"};static IMPORT_COLUMNS_REQUIRED=e=>[...e===Ye.Update?[Fo.IMPORT_COLUMNS_DEFAULT.Id]:[],Fo.IMPORT_COLUMNS_DEFAULT.AccreditationName,Fo.IMPORT_COLUMNS_DEFAULT.AccreditationCategoryName];constructor(e,t){super(e,t),this.csvInputService=e}};Uo=Fo=function(e,t,n,i){var a,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(a=e[r])&&(o=(s<3?a(o):s>3?a(t,n,o):a(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o}([(0,En._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[ko,bi])],Uo);var Bo;let Go=class extends zo{static{Bo=this}csvInputService;static IMPORT_COLUMNS_DEFAULT={...zo.IMPORT_COLUMNS_DEFAULT,AccreditationProfileCategoryName:"accreditationProfileCategoryName",AccreditationProfileName:"accreditationProfileName",Acronym:"acronym",Color:"color",Icon:"icon",Description:"description"};static IMPORT_COLUMNS_REQUIRED=e=>[...e===Ye.Update?[Bo.IMPORT_COLUMNS_DEFAULT.Id]:[],Bo.IMPORT_COLUMNS_DEFAULT.AccreditationProfileCategoryName,Bo.IMPORT_COLUMNS_DEFAULT.AccreditationProfileName];constructor(e,t){super(e,t),this.csvInputService=e}};Go=Bo=function(e,t,n,i){var a,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(a=e[r])&&(o=(s<3?a(o):s>3?a(t,n,o):a(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o}([(0,En._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[ko,bi])],Go);let Vo=class extends vo{constructor(e){super(e)}schema(){const e=this.t("le_document_est_86403");return fo.Ik().shape({acl:fo.Yj().required(e),key:fo.Yj().required(e).test("is-a-zip",this.t("le_fichier_n_es_91526"),e=>$o(wo(e).extension)===Po.Zip),name:fo.Yj().required(e),file:fo.gl().test("is-not-too-big",this.t("le_fichier_est_17522"),e=>!e||e.size=0;r--)(a=e[r])&&(o=(s<3?a(o):s>3?a(t,n,o):a(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o}([(0,En._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[bi])],Vo);let Wo=class extends vo{constructor(e){super(e)}signInSchema(){return fo.Ik().shape({email:this.email()})}signInPasswordSchema(){return fo.Ik().shape({email:this.email(),password:this.password()})}codeSchema(){return fo.Ik().shape({code:this.code()})}emailSchema(){return fo.Ik().shape({email:this.email()})}emailConfirmSchema(){return fo.Ik().shape({email:this.email(),emailConfirm:this.emailConfirm()})}emailCodeSchema(){return fo.Ik().shape({email:this.email(),code:this.code()})}email(){return fo.Yj().required(this.t("l_e_mail_est_re_04856")).email(this.t("l_e_mail_est_re_04856"))}emailConfirm(){return fo.Yj().required(this.t("la_confirmation_53449")).email(this.t("la_confirmation_53449")).test("same-as-email",this.t("l_e_mail_et_la_57164"),function(){return this.parent.email===this.parent.emailConfirm})}code(){return fo.Yj().required(this.t("le_code_est_req_77618")).length(6,this.t("le_code_doit_co_37160"))}password(){return fo.Yj().required(this.t("le_mot_de_passe_14773"))}passwordRules(){return fo.Yj().required(this.t("le_mot_de_passe_24842")).test("valid-password",this.t("le_mot_de_passe_24842"),function(){return"string"==typeof(e=this.parent.password)&&e.length>=16&&function(e){return"string"==typeof e&&null!==e.match(/\d/)}(this.parent.password)&&function(e){return"string"==typeof e&&null!==e.match(/[A-Z]/)&&null!==e.match(/[a-z]/)}(this.parent.password)&&function(e){return"string"==typeof e&&null!==e.match(/[^A-Za-z0-9]/)}(this.parent.password);var e})}};Wo=function(e,t,n,i){var a,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(a=e[r])&&(o=(s<3?a(o):s>3?a(t,n,o):a(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o}([(0,En._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[bi])],Wo);let qo=class extends vo{constructor(e){super(e)}organizationInputDefault(e){return{name:e.name,features:e.features,customBadges:e.customBadges,periodEndAt:e.periodEndAt,usersIds:e.users.map(({id:e})=>e),isBlocked:e.isBlocked,weezeventOrganizationId:e.weezeventOrganizationId,useOldBilling:e.useOldBilling,membersLimit:e.membersLimit,pricePerMember:e.pricePerMember,billingComment:e.billingComment}}organizationInputSchema(){return fo.Ik().shape({name:fo.Yj().required(this.t("le_nom_de_l_org_60618")),periodEndAt:Co.required(this.t("la_date_de_fin_04076")).typeError(this.t("la_date_de_fin_04076")).test("min-period-end-at",this.t("la_date_de_fin_63806"),function(){return $a.c9.isDateTime(this.parent.periodEndAt)&&this.parent.periodEndAt.isValid&&this.parent.periodEndAt>$a.c9.fromObject({year:2016})}),features:fo.YO().of(fo.Yj().oneOf(Fn,this.t("les_fonctionnal_36778"))),usersIds:fo.YO().of(fo.ai()),isBlocked:fo.zM().required()})}updateOrganizationSchema(){return fo.Ik().shape({organization:this.organizationInputSchema()})}};qo=function(e,t,n,i){var a,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(a=e[r])&&(o=(s<3?a(o):s>3?a(t,n,o):a(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o}([(0,En._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[bi])],qo);var Yo=n(5526);function Ho(e){return"string"!=typeof e||""===e.trim()||u(e.toLowerCase())===e}const Zo=[" ","@","£","$","¥","è","é","ù","ì","ò","Ç","Ø","ø","Å","å","Æ","æ","ß","É","!",'"',"#","¤","%","&","'","(",")","*","+",",","-",".","/","0","1","2","3","4","5","6","7","8","9",":",";","<","=",">","?","¡","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","Ä","Ö","Ñ","Ü","§","¿","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","ä","ö","ñ","ü","à"].concat(["^","{","}","\\","|","[","]","~","€","\n"]);const Ko=/^[a-z][a-z0-9]{2,10}$/i;var Qo;!function(e){e.Accreditations="accreditations",e.Everyone="everyone",e.Positions="positions",e.Segments="segments",e.States="states",e.Users="users"}(Qo||(Qo={}));let Xo=class extends vo{constructor(e){super(e)}createUpdateCampaignValuesDefault(e,t,n,i){const a=this.campaignInputDefault(e,t,n,i);return{campaign:a,recipients:a.sendToEveryone?Qo.Everyone:F(a.states)?Qo.States:F(a.segmentsIds)?Qo.Segments:F(a.accreditationsCategoriesIds)||F(a.accreditationsIds)||F(a.accreditationsSlotsIds)?Qo.Accreditations:F(a.positionsCategoriesIds)||F(a.positionsIds)||F(a.positionsSlotsIds)?Qo.Positions:Qo.Users,customSender:h(n?.sender),textOrHtml:h(n?.html)?"html":"text"}}campaignStep1Fields(){return{name:fo.Yj().required(this.t("le_nom_de_la_ca_63405")),campaignType:fo.Yj().required(this.t("le_type_de_camp_96559")).oneOf(wn,this.t("le_type_de_camp_56467"))}}campaignStep1Schema(){return fo.Ik().shape({campaign:fo.Ik().shape({...this.campaignStep1Fields()})})}campaignStep2Fields(){const e=this;return{sender:fo.Yj().test("is-valid",this.t("l_metteur_ne_r_16421"),function(){return!h(this.parent.sender)||Ko.test(this.parent.sender)}),text:fo.Yj().test("non-empty-text",this.t("le_contenu_est_45048"),function(){return h(this.parent.text)||h(this.parent.html)}).test("only-valid-characters","",function(){if(this.parent.campaignType===re.Email)return!0;{const n=(t=this.parent.text,new Set(Array.from(t??"").filter(e=>!Zo.includes(e))));return!(n.size>0)||this.createError({message:e.translationService.translate("les_caract_res_84839",Array.from(n).join(", "))})}var t}).test("max-length",this.t("le_contenu_ne_p_25416"),function(){return this.parent.campaignType===re.Email||this.parent.text.length<1e3}).test("no-percent-encoded-variables",this.t("le_texte_de_l_e_71717"),function(){return!this.parent.text.includes("%7B")&&!this.parent.text.includes("%7D")}),subject:fo.Yj().when("campaignType",{is:re.Email,then:e=>e.required(this.t("le_sujet_est_re_18923"))}),html:fo.Yj().test("non-empty-text",this.t(this.t("le_code_html_es_52280")),function(){return h(this.parent.text)||h(this.parent.html)}),replyTo:fo.Yj().email(this.t("l_adresse_de_r_53879")).test("clean-reply-to",this.t("l_adresse_de_r_53879"),function(){return Ho(this.parent.replyTo)}),documents:fo.YO().test("max-size",this.t("l_ensemble_des_32797"),function(){return this.parent.campaignType!==re.Email||!F(this.parent.documents)||(0,Yo.A)(this.parent.documents,e=>e.size)<2e7}),emailSenderId:fo.ai().nullable(),attachments:fo.YO().of(fo.Yj()),includeDuplicateMembersAttachments:fo.zM().required(),hasCalendarInvite:fo.zM().required(),calendarInviteName:fo.Yj().when("hasCalendarInvite",{is:!0,then:e=>e.required(this.t("nom_de_l_v_nem_58512")),otherwise:e=>e.nullable()}),calendarInviteStartDate:Co.when("hasCalendarInvite",{is:!0,then:e=>e.required(this.t("la_date_de_d_bu_05030")).typeError(this.t("la_date_de_d_bu_05030")),otherwise:e=>e.nullable()}),calendarInviteStartTime:fo.Yj().when("hasCalendarInvite",{is:!0,then:e=>e.required(this.t("heure_de_d_but_90785")),otherwise:e=>e.nullable()}),calendarInviteEndDate:Co.when("hasCalendarInvite",{is:!0,then:e=>e.required(this.t("la_date_de_fin_32246")).typeError(this.t("la_date_de_fin_32246")),otherwise:e=>e.nullable()}),calendarInviteEndTime:fo.Yj().when("hasCalendarInvite",{is:!0,then:e=>e.required(this.t("l_heure_de_fin_78626")),otherwise:e=>e.nullable()})}}campaignStep2Schema(){return fo.Ik().shape({campaign:fo.Ik().shape({...this.campaignStep2Fields()})})}campaignStep3Fields(){const e=this,t=function(){return this.parent.state!==oe.Draft&&this.parent.state!==oe.Scheduled||!1!==this.parent.sendToEveryone||0!==this.parent.states.length||0!==this.parent.positionsCategoriesIds.length||0!==this.parent.positionsIds.length||0!==this.parent.positionsSlotsIds.length||0!==this.parent.tagsIds.length||0!==this.parent.accreditationsCategoriesIds.length||0!==this.parent.accreditationsIds.length||0!==this.parent.accreditationsSlotsIds.length||0!==this.parent.usersInfosIds.length||0!==this.parent.segmentsIds.length||this.createError({message:e.translationService.translate("vous_devez_s_le_80552")})};return{sendToEveryone:fo.zM().required(this.t("requis_75853")),states:fo.YO().of(fo.Yj()).test("non-empty","",t),positionsCategoriesIds:fo.YO().of(fo.ai()).test("non-empty","",t),positionsIds:fo.YO().of(fo.ai()).test("non-empty","",t),positionsSlotsIds:fo.YO().of(fo.ai()).test("non-empty","",t),tagsIds:fo.YO().of(fo.ai()).test("non-empty","",t),accreditationsCategoriesIds:fo.YO().of(fo.ai()).test("non-empty","",t),accreditationsIds:fo.YO().of(fo.ai()).test("non-empty","",t),accreditationsSlotsIds:fo.YO().of(fo.ai()).test("non-empty","",t),usersInfosIds:fo.YO().of(fo.ai()).test("non-empty","",t),segmentsIds:fo.YO().of(fo.ai()).test("non-empty","",t)}}campaignStep3Schema(){return fo.Ik().shape({campaign:fo.Ik().shape({...this.campaignStep3Fields()})})}campaignStep4Fields(){return{scheduledAtDate:Co.when("scheduleType",{is:ae.Datetime,then:e=>e.required(this.t("la_date_d_envoi_17792")).typeError(this.t("la_date_d_envoi_17792"))}),scheduledAtTime:fo.Yj().when("scheduleType",{is:ae.Datetime,then:e=>e.required(this.t("l_heure_d_envoi_53643")).matches(/\d{2}:\d{2}/,this.t("l_heure_d_envoi_53643"))}),scheduleAnchor:fo.Yj().when("scheduleType",{is:ae.Anchor,then:e=>e.required(this.t("d_but_fin_est_r_67120")).oneOf(Mn,this.t("d_but_fin_est_r_67120"))}),scheduleOffsetDays:fo.ai().when("scheduleType",{is:ae.Anchor,then:e=>e.required(this.t("le_nombre_de_jo_27562")).min(0,this.t("le_nombre_de_jo_62798"))}),scheduleBeforeAfter:fo.Yj().when("scheduleType",{is:ae.Anchor,then:e=>e.required(this.t("avant_apr_s_est_31173")).oneOf(Dn,this.t("avant_apr_s_est_31173"))}),scheduleSendTime:fo.Yj().when("scheduleType",{is:ae.Anchor,then:e=>e.required(this.t("l_heure_d_envoi_53643")).matches(/\d{2}:\d{2}/,this.t("l_heure_d_envoi_53643"))})}}campaignStep4Schema(){return fo.Ik().shape({campaign:fo.Ik().shape({...this.campaignStep4Fields()})})}campaignInputSchema(){return fo.Ik().shape({...this.campaignStep1Fields(),...this.campaignStep2Fields(),...this.campaignStep3Fields(),...this.campaignStep4Fields()})}createUpdateCampaignSchema(){return fo.Ik().shape({campaign:this.campaignInputSchema()})}campaignInputDefault(e,t,n,i){let a=n?.segmentsIds??[],s=n?.usersInfosIds??[];if(h(i))try{const e=JSON.parse(Ui(i));e.segmentId&&(a=[e.segmentId]),F(e.usersInfosIds)&&(s=e.usersInfosIds)}catch{}const o=!F(a)&&!F(s)&&(n?.sendToEveryone??!1);return{name:n?.name??"",state:n?n.scheduleType!==ae.NoSchedule&&n.state===oe.Draft?oe.Scheduled:n.state:e?oe.Template:oe.Draft,campaignType:n?.campaignType??re.Email,sender:n?.sender??"",text:n?.text??"",subject:n?.subject??"",html:n?.html??"",replyTo:n?.replyTo??"",sendToEveryone:o,states:n?.states??[],positionsCategoriesIds:n?.positionsCategoriesIds??[],positionsIds:n?.positionsIds??[],positionsSlotsIds:n?.positionsSlotsIds??[],tagsIds:n?.tagsIds??[],accreditationsCategoriesIds:n?.accreditationsCategoriesIds??[],accreditationsIds:n?.accreditationsIds??[],accreditationsSlotsIds:n?.accreditationsSlotsIds??[],usersInfosIds:s,segmentsIds:a,scheduledAtDate:n?.scheduledAt??void 0,scheduledAtTime:n?.scheduledAt?.toFormat("HH:mm")??void 0,documents:n?.documents??[],emailSenderId:n?.emailSenderId??t,attachments:n?.attachments??[],includeDuplicateMembersAttachments:n?.includeDuplicateMembersAttachments??!1,hasCalendarInvite:n?.hasCalendarInvite??!1,calendarInviteName:n?.calendarInviteName??null,calendarInviteStartDate:n?.calendarInviteStartDate??null,calendarInviteStartTime:n?.calendarInviteStartTime??null,calendarInviteEndDate:n?.calendarInviteEndDate??null,calendarInviteEndTime:n?.calendarInviteEndTime??null,scheduleType:n?.scheduleType??ae.NoSchedule,scheduleAnchor:n?.scheduleAnchor??ne.EventStart,scheduleOffsetDays:n?.scheduleOffsetDays??0,scheduleBeforeAfter:n?.scheduleBeforeAfter??ie.Before,scheduleSendTime:n?.scheduleSendTime??"00:00"}}};Xo=function(e,t,n,i){var a,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(a=e[r])&&(o=(s<3?a(o):s>3?a(t,n,o):a(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o}([(0,En._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[bi])],Xo);let Jo=class extends vo{constructor(e){super(e)}commentInputDefault(){return{content:""}}commentInputSchema(){return fo.Ik().shape({content:fo.Yj().required(this.t("le_commentaire_33393"))})}createCommentSchema(){return fo.Ik().shape({comment:this.commentInputSchema()})}};Jo=function(e,t,n,i){var a,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(a=e[r])&&(o=(s<3?a(o):s>3?a(t,n,o):a(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o}([(0,En._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[bi])],Jo);const er=1122,tr=793;let nr=class extends vo{constructor(e){super(e)}customDocumentInputDefault(e){return{name:e?.name??"",slug:e?.slug??"",populationsIds:e?.populationsIds??[],configuration:e?.configuration??this.getConfigurationDefault(),shouldRegenerateTicketIdOnDownload:e?.shouldRegenerateTicketIdOnDownload??!1}}customDocumentInputSchema(){return fo.Ik().shape({name:fo.Yj().required(this.t("le_nom_est_requ_61536")),slug:fo.Yj().required(this.t("le_nom_de_la_va_15472")).test("is-valid",this.t("le_nom_de_la_va_15472"),e=>null!==e.match(/^[a-z][a-z0-9]*$/))})}getConfigurationDefault(){return{bleed:!1,height:er,pages:[this.getPageDefault()],width:tr}}getPageDefault(){return{id:as(),accreditationsSlotsIds:[],accreditationAcronym:"",conditionsCustomFields:[],elements:[],hasConditions:!1,positionsSlotsIds:[],segmentsIds:[]}}getContainerElementDefault(e,t,n){return{type:"container",id:e,inContainer:!!t,inGrid:"grid"===t?.type,backgroundColor:"",accreditationsSlotsIds:[],accreditationAcronym:"",align:"start",borderColor:"#e4e7ec",borderRadius:0,borderSize:0,conditionsCustomFields:[],direction:"row",elements:[],gap:0,hasBackground:!1,hasConditions:!1,hasRotate:!1,height:100,isRatioLocked:!1,justify:"start",left:0,name:this.t("conteneur_1_03989",n+1),positionsSlotsIds:[],px:0,py:0,rotateDegree:0,segmentsIds:[],top:0,width:100,zIndex:1}}getGridElementDefault(e,t,n){return{type:"grid",id:e,inContainer:!!t,inGrid:"grid"===t?.type,backgroundColor:"",accreditationsSlotsIds:[],accreditationAcronym:"",borderColor:"#e4e7ec",borderRadius:0,borderSize:0,columnGap:0,columns:2,conditionsCustomFields:[],elements:[],hasBackground:!1,hasConditions:!1,hasRotate:!1,height:100,isRatioLocked:!1,left:0,name:this.t("grille_1_66496",n+1),positionsSlotsIds:[],px:0,py:0,rotateDegree:0,rowGap:0,rows:2,segmentsIds:[],top:0,width:100,zIndex:1}}getImageElementDefault(e,t,n){return{type:"image",id:e,inContainer:!!t,inGrid:"grid"===t?.type,accreditationsSlotsIds:[],accreditationAcronym:"",borderColor:"#e4e7ec",borderRadius:0,borderSize:0,conditionsCustomFields:[],hasConditions:!1,hasRotate:!1,height:100,isRatioLocked:!1,left:0,name:this.t("image_1_30956",n+1),positionsSlotsIds:[],px:0,py:0,rotateDegree:0,segmentsIds:[],top:0,width:100,zIndex:1}}getTextElementDefault(e,t,n){return{type:"text",id:e,inContainer:!!t,inGrid:"grid"===t?.type,accreditationsSlotsIds:[],accreditationAcronym:"",align:"start",hasBackground:!1,backgroundColor:"",borderColor:"#e4e7ec",borderRadius:0,borderSize:0,conditionsCustomFields:[],hasConditions:!1,hasRotate:!1,height:20,isRatioLocked:!1,left:0,name:this.t("texte_1_59540",n+1),text:"",color:"#1d2939",fontFamily:"Open Sans",fontSize:14,fontWeight:400,justify:"start",lineHeight:1.4,positionsSlotsIds:[],px:0,py:0,rotateDegree:0,segmentsIds:[],textTransform:"none",top:0,width:100,zIndex:1}}};function ir(e){throw new Error("Didn't expect to get here")}nr=function(e,t,n,i){var a,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(a=e[r])&&(o=(s<3?a(o):s>3?a(t,n,o):a(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o}([(0,En._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[bi])],nr);const ar=/^[A-Z]{2}[0-9]{2}[A-Z0-9]{1,30}$/,sr={AD:24,AE:23,AL:28,AO:25,AT:20,AX:18,AZ:28,BA:20,BE:16,BF:28,BG:22,BH:22,BI:27,BJ:28,BL:27,BR:29,BY:28,CF:27,CG:27,CH:21,CI:28,CM:27,CR:22,CV:25,CY:28,CZ:24,DE:22,DJ:27,DK:18,DO:28,DZ:26,EA:24,EE:20,EG:29,ES:24,FI:18,FK:18,FO:18,FR:27,GA:27,GB:22,GE:22,GF:27,GG:22,GI:23,GL:18,GP:27,GQ:27,GR:27,GT:28,GW:25,HN:28,HR:21,HU:28,IC:24,IE:22,IL:23,IM:22,IQ:23,IR:26,IS:26,IT:27,JE:22,JO:30,KM:27,KW:30,KZ:20,LB:28,LC:32,LI:21,LT:20,LU:20,LV:21,LY:25,MA:28,MC:27,MD:24,ME:22,MF:27,MG:27,MK:19,ML:28,MN:20,MQ:27,MR:27,MT:31,MU:30,MZ:25,NC:27,NE:28,NI:28,NL:18,NO:15,OM:23,PF:27,PK:24,PL:28,PM:27,PS:29,PT:25,QA:29,RE:27,RO:24,RS:22,RU:33,SA:24,SC:31,SD:18,SE:24,SI:19,SK:24,SM:27,SN:28,SO:23,ST:25,SV:28,TD:27,TF:27,TG:28,TL:23,TN:24,TR:26,UA:29,VA:22,VG:24,WF:27,XK:20,YE:30,YT:27};function or(e,t){switch(t){case fe.Accreditation:return e("accr_ditations_39450");case fe.Delegation:return e("d_l_gations_78318");case fe.Event:return e("Event");case fe.Position:return e("missions_63972");case fe.UserInfo:return e("membres_11310");default:return ir()}}Le.Checkbox,Le.Select,Le.Validation;const rr=["default","regex"],dr=["all","numbers","noSymbols","uppercase","lowercase"],lr=["any","past","between"];function cr(e){switch(e.fieldType){case Le.Text:return e.fieldSubtype===Ne.Freeform?"text":null;case Le.Textarea:return"text";case Le.Number:return"number";case Le.Date:case Le.Datetime:return e.fieldProperty===ke.DateOfBirth?null:"date";default:return null}}function ur(e){switch(e){case"text":return{mode:"default",allowedCharacters:"all"};case"date":return{range:"any"};default:return{}}}Le.Text,Le.Text,Le.Country,Le.Checkbox,Le.Country,Le.Language,Le.Nationality,Le.Select;const mr=["key","name","acl"];let gr=class extends vo{constructor(e){super(e)}documentInputDefault(){return{key:"",name:"",acl:""}}documentInputSchema(e){const t=h(e)?this.t("_1_est_requis_99856",e):this.t("le_document_est_86403");return fo.Ik().shape({key:fo.Yj().required(t),name:fo.Yj().required(t),acl:fo.Yj().required(t)})}documentInputSchemaNotRequired(){return fo.Ik().shape({key:fo.Yj(),name:fo.Yj(),acl:fo.Yj()})}};gr=function(e,t,n,i){var a,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(a=e[r])&&(o=(s<3?a(o):s>3?a(t,n,o):a(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o}([(0,En._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[bi])],gr);let hr=class extends vo{documentInputService;constructor(e,t){super(t),this.documentInputService=e}customFieldInputDefault(e,t){const n=e?.fieldType??Le.Text,i=e?.fieldSubtype??Ne.Freeform;return{name:e?.name??"",label:e?.label??"",customFieldCategoryId:e?.customFieldCategoryId??t[0].id,description:e?.description??"",variety:e?.variety??fe.UserInfo,fieldType:n,fieldSubtype:i,listType:e?.listType??Ke.Default,fileType:e?.fileType??Fe.Default,isPrivate:e?.isPrivate??!1,values:F(e?.values)?e.values:[],hasCondition:e?.hasCondition??!1,conditionCustomFieldId:e?.conditionCustomFieldId??null,conditionValue:e?.conditionValue??!1,canSelectMultiple:e?.canSelectMultiple??!1,document:e?.document||this.documentInputService.documentInputDefault(),isEncrypted:e?.isEncrypted??!1,canBeUpdatedByUrl:e?.canBeUpdatedByUrl??!1,validationRules:{...ur(cr({fieldType:n,fieldSubtype:i,fieldProperty:e?.fieldProperty})),...e?.validationRules},addressPostalCodeCustomFieldId:e?.addressPostalCodeCustomFieldId??null,addressCityCustomFieldId:e?.addressCityCustomFieldId??null,addressCountryCustomFieldId:e?.addressCountryCustomFieldId??null}}customFieldInputSchema(){return fo.Ik().shape({name:fo.Yj().required(this.t("le_nom_du_champ_17959")),label:fo.Yj(),customFieldCategoryId:fo.ai().required(this.t("la_cat_gorie_es_14008")).typeError(this.t("la_cat_gorie_es_14008")).min(1,this.t("la_cat_gorie_es_14008")),fieldType:fo.Yj().required(this.t("le_type_est_req_41180")).oneOf(Bn,this.t("le_type_est_req_41180")),fieldSubtype:fo.Yj().required(this.t("le_sous_type_es_85221")).oneOf(Un,this.t("le_sous_type_es_85221")),listType:fo.Yj().required(this.t("le_style_des_op_46016")).oneOf(Zn,this.t("le_style_des_op_46016")),fileType:fo.Yj().required(this.t("l_affichage_du_11344")).oneOf(Gn,this.t("l_affichage_du_11344")),isPrivate:fo.zM().nullable(),hasCondition:fo.zM().nullable(),values:fo.YO().when("fieldType",{is:Le.Select,then:e=>e.of(fo.Ik().shape({id:fo.ai(),value:fo.Yj().required(this.t("la_valeur_est_r_70136"))})).required(this.t("vous_devez_s_le_95641")).min(1,this.t("vous_devez_s_le_95641"))}),conditionCustomFieldId:fo.ai().when("hasCondition",{is:!0,then:e=>e.required(),otherwise:e=>e.nullable()}),conditionValue:fo.gl(),canSelectMultiple:fo.zM().nullable(),document:this.documentInputService.documentInputSchemaNotRequired(),isEncrypted:fo.zM().required(),canBeUpdatedByUrl:fo.zM().required(),validationRules:fo.Ik().required().when(["fieldType","fieldSubtype"],([e,t])=>this.validationRulesSchema(e,t)),addressPostalCodeCustomFieldId:fo.ai().nullable(),addressCityCustomFieldId:fo.ai().nullable(),addressCountryCustomFieldId:fo.ai().nullable()})}validationRulesSchema(e,t){const n=()=>fo.ai().nullable().integer(this.t("ce_nombre_doit_35487")),i=e=>n().min(e,this.t("ce_nombre_doit_66066",e)),a=(e,t)=>e.when(t,([e],t)=>"number"==typeof e?t.min(e,this.t("le_maximum_doit_04562")):t);switch(cr({fieldType:e,fieldSubtype:t})){case"text":return fo.Ik().shape({mode:fo.Yj().oneOf([...rr]),minLength:i(0),maxLength:a(i(1),"minLength"),allowedCharacters:fo.Yj().oneOf([...dr]),regex:fo.Yj().when("mode",{is:"regex",then:e=>e.required(this.t("l_expression_r_88693")).test("valid-regex",this.t("l_expression_r_68347"),e=>function(e){try{return new RegExp(e??""),!0}catch{return!1}}(e))}),regexMessage:fo.Yj().when("mode",{is:"regex",then:e=>e.required(this.t("le_message_d_er_84907"))})});case"number":return fo.Ik().shape({min:n(),max:a(n(),"min")});case"date":return fo.Ik().shape({range:fo.Yj().oneOf([...lr]),start:Co.nullable().when("range",{is:"between",then:e=>e.required(this.t("la_date_de_d_bu_05030"))}),end:Co.nullable().when("range",{is:"between",then:e=>e.required(this.t("la_date_de_fin_32246"))}).test("end-after-start",this.t("la_date_de_fin_21930"),function(e){const t=this.parent.start;return!t||!e||Ka(e)>=Ka(t)})});default:return fo.Ik()}}createUpdateCustomFieldSchema(){return fo.Ik().shape({customField:this.customFieldInputSchema()})}};hr=function(e,t,n,i){var a,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(a=e[r])&&(o=(s<3?a(o):s>3?a(t,n,o):a(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o}([(0,En._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[gr,bi])],hr);class pr extends vo{constructor(e){super(e)}customSlotInputDefault(){return{name:"",startTime:"",endTime:""}}customSlotInputSchema(){return fo.Ik().shape({name:fo.Yj().nullable(),startTime:fo.Yj().required(this.t("le_d_but_du_cr_40745")),endTime:fo.Yj().required(this.t("la_fin_du_cr_ne_90351"))})}}let fr=class extends vo{customSlotInputService;constructor(e,t){super(e),this.customSlotInputService=t}customSlotPeriodInputDefault(){return{name:"",customSlots:[this.customSlotInputService.customSlotInputDefault()],hideNameDates:!1,displayAsCalendar:!1,hasCondition:!1,conditionCustomFieldId:null,conditionValue:!1}}customSlotPeriodInputSchema(){return fo.Ik().shape({customSlotPeriod:fo.Ik().shape({name:fo.Yj(),customSlots:fo.YO().of(this.customSlotInputService.customSlotInputSchema()).required("").min(1,"")})})}};fr=function(e,t,n,i){var a,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(a=e[r])&&(o=(s<3?a(o):s>3?a(t,n,o):a(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o}([(0,En._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[bi,pr])],fr);let Ir=class extends vo{constructor(e){super(e)}delegationCategoryBannerInputDefault(){return{bannerType:-1,bannerVehicleType:ee.Car,min:1,max:10}}};Ir=function(e,t,n,i){var a,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(a=e[r])&&(o=(s<3?a(o):s>3?a(t,n,o):a(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o}([(0,En._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[bi])],Ir);let _r=class extends vo{constructor(e){super(e)}delegationCategoryInputDefault(e){return{name:e.name,banners:e.banners}}};_r=function(e,t,n,i){var a,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(a=e[r])&&(o=(s<3?a(o):s>3?a(t,n,o):a(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o}([(0,En._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[bi])],_r);let xr=class extends vo{constructor(e){super(e)}delegationFormInviteValuesDefault(){return{usersInfos:[{email:"",fields:{firstName:"",lastName:""}}]}}delegationFormInviteValuesSchema(){return fo.Ik().shape({usersInfos:fo.YO().of(fo.Ik().shape({email:fo.Yj().email(this.t("l_e_mail_est_re_04856")).required(this.t("l_e_mail_est_re_04856")),fields:fo.gl()})).min(1,"Vous devez invité au moins une personne.")})}};xr=function(e,t,n,i){var a,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(a=e[r])&&(o=(s<3?a(o):s>3?a(t,n,o):a(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o}([(0,En._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[bi])],xr);var yr=n(5582);function Sr(e){return 3145===e||3360===e?{connectionTitle:"Connexion à votre espace personnel d’invitations",connectionSubtitle:"Connectez-vous à votre espace personnel d’invitations afin de gérer vos invités",delegationsListTitle:"Quel espace personnel d’invitations souhaitez-vous voir ?",delegationsListButton:"Voir cet espace personnel d’invitations",delegationHeader:"Gérer votre espace personnel d’invitations.",delegationHeaderEvent:"Gérer votre espace personnel d’invitations.",addMemberButton:"Ajouter un invité",tabMembers:"Invités ({1})",tabAccreditations:"Invitations",dashboardLeaders:"Exposants"}:3136===e?{connectionTitle:"connexion_mon_88378",connectionSubtitle:"connectez_vous_01298",delegationsListTitle:"quelle_d_l_gati_13930",delegationsListButton:"voir_cette_d_l_96190",delegationHeader:"g_rer_votre_d_l_49654",delegationHeaderEvent:"g_rer_votre_d_l_04420",addMemberButton:"ajouter_un_memb_33261",tabMembers:"membres_125561",tabAccreditations:"accr_ditations_39450",dashboardLeaders:"reponsable_82458_plural"}:{connectionTitle:"connexion_l_e_31965",connectionSubtitle:"connectez_vous_37685",delegationsListTitle:"quelle_d_l_gati_13930",delegationsListButton:"voir_cette_d_l_96190",delegationHeader:"g_rer_votre_d_l_49654",delegationHeaderEvent:"g_rer_votre_d_l_04420",addMemberButton:"ajouter_un_memb_33261",tabMembers:"membres_125561",tabAccreditations:"accr_ditations_39450",dashboardLeaders:"reponsable_82458_plural"}}let jr=class extends vo{constructor(e){super(e)}createUpdateDelegationValuesDefault(e,t){return{delegation:this.delegationInputDefault(e,t),selectedAccreditationsSlotsIds:[]}}delegationInputDefault(e,t){const n=t?.forms&&t?.parentDelegation?t.forms.find(e=>e.name===t.parentDelegation?.form.name):null,i=e?.formId??n?.id??-1,a=F(t?.delegationsCategories)&&t?.parentDelegation?t.delegationsCategories.find(e=>e.name===t.parentDelegation?.delegationCategory.name):null;let s=e?.delegationCategoryId??a?.id??t?.delegationCategoryId;return Number.isInteger(s)||(s=null),{...this.getDefaultAccreditations(e),delegationCategoryId:s,parentId:e?.parentId??t?.parentId??null,name:e?.name??"",description:e?.description??"",leadersIds:e?.leadersIds??t?.parentDelegation?.leadersIds??[],formId:i,deadlineDate:e?.deadlineDate??null,maxResources:e?.maxResources??null,showInDelegationSpace:e?.showInDelegationSpace??!0,showFormLinkInDelegationSpace:e?.showFormLinkInDelegationSpace??!0,delegationsSpaceLayoutId:e?.delegationsSpaceLayoutId??null,columns:e?.columns??t?.parentDelegation?.columns??["name","accreditations","accreditation_state"],canLeadersAddMembers:e?.canLeadersAddMembers??!0,canLeadersDeleteMembers:e?.canLeadersDeleteMembers??!0,canLeadersDuplicateMembers:e?.canLeadersDuplicateMembers??!1,canLeadersEditColumns:e?.canLeadersEditColumns??!0,canLeadersEditCustomFields:e?.canLeadersEditCustomFields??!0,canLeadersEditMembers:e?.canLeadersEditMembers??!0,canLeadersImportMembers:e?.canLeadersImportMembers??!1,canLeadersSeeHiddenAccreditationsSlots:e?.canLeadersSeeHiddenAccreditationsSlots??!1,privateNote:e?.privateNote??t?.parentDelegation?.privateNote??"",addDefaultAccreditationsByAvailability:e?.addDefaultAccreditationsByAvailability??!1,showAllAccreditations:e?.showAllAccreditations??!1,tagsIds:e?.tagsIds??t?.parentDelegation?.tagsIds??[],customFields:e?.customFields||[],fields:e?.fields??{},campaignsIds:e?.campaignsIds??[],customDocumentsSlugs:e?.customDocumentsSlugs??[],usedCustomFieldsIds:e?.usedCustomFieldsIds??[],accreditationsProfiles:e?.accreditationsProfiles??[]}}delegationInputSchema(){return fo.Ik().shape({parentId:fo.ai().nullable(),name:fo.Yj().when("parentId",{is:null,then:e=>e.required(this.t("le_nom_de_la_d_10042"))}),description:fo.Yj(),delegationCategoryId:fo.ai().required(this.t("la_cat_gorie_es_14008")).positive(this.t("la_cat_gorie_es_14008")).typeError(this.t("la_cat_gorie_es_14008")),leadersIds:fo.YO().of(fo.ai()),formId:fo.ai().required(this.t("le_formulaire_e_77404")).typeError(this.t("le_formulaire_e_77404")).test("form-id-valid",this.t("le_formulaire_e_77404"),e=>"number"==typeof e&&e>0),deadlineDate:Co.typeError(this.t("la_date_limite_91708")).nullable(),maxResources:fo.ai().min(0).nullable(),showInDelegationSpace:fo.zM().required(),showFormLinkInDelegationSpace:fo.zM().required(),columns:fo.YO().of(fo.Yj()).required(this.t("vous_devez_choi_82605")).min(1,this.t("vous_devez_choi_82605")),canLeadersAddMembers:fo.zM().required(),canLeadersDeleteMembers:fo.zM().required(),canLeadersEditColumns:fo.zM().required(),canLeadersEditMembers:fo.zM().required(),canLeadersEditCustomFields:fo.zM().required(),canLeadersImportMembers:fo.zM().required(),canLeadersSeeHiddenAccreditationsSlots:fo.zM().required(),privateNote:fo.Yj(),accreditations:fo.YO().of(fo.Ik().shape({accreditationCategoryId:fo.ai().required(),accreditationId:fo.ai().required(),maxResources:fo.gl().nullable(),willAutoAccredit:fo.zM().required()})),accreditationsSlots:fo.YO().of(fo.Ik().shape({accreditationCategoryId:fo.ai().required(),accreditationId:fo.ai().required(),accreditationSlotId:fo.ai().required(),isDefault:fo.zM().required(),maxResources:fo.gl().nullable()})),accreditationsProfiles:fo.YO().of(fo.Ik().shape({accreditationProfileId:fo.ai().required(),maxResources:fo.gl().nullable(),willAutoAccredit:fo.zM().required()})),campaignsIds:fo.YO().of(fo.ai()),customDocumentsSlugs:fo.YO().of(fo.gl()),usedCustomFieldsIds:fo.YO().of(fo.ai())})}delegationUpdateFieldsSchema(e){return fo.Ik().shape({fields:e})}createUpdateDelegationSchema(e){const t=this.delegationInputSchema();return fo.Ik().shape({delegation:e?t.shape({fields:e}):t})}adminAddSchema(){return fo.Ik().shape({usersInfosIds:fo.YO().of(fo.ai())})}getDefaultAccreditations(e){let t=e?.accreditationsCategories||[],n=e?.accreditations||[];const i=e?.accreditationsSlots||[];return F(i)&&(t=(0,yr.A)(t.concat(i.map(e=>({accreditationCategoryId:e.accreditationCategoryId,maxResources:null}))),e=>e.accreditationCategoryId)),F(i)&&(n=(0,yr.A)(n.concat(i.map(e=>({accreditationCategoryId:e.accreditationCategoryId,accreditationId:e.accreditationId,maxResources:null,willAutoAccredit:!1}))),e=>e.accreditationId)),{accreditationsCategories:t,accreditations:n,accreditationsSlots:i}}};jr=function(e,t,n,i){var a,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(a=e[r])&&(o=(s<3?a(o):s>3?a(t,n,o):a(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o}([(0,En._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[bi])],jr);var br;let vr=class extends zo{static{br=this}csvInputService;static IMPORT_COLUMNS_DEFAULT={...zo.IMPORT_COLUMNS_DEFAULT,Name:"name",CategoryName:"categoryName",FormId:"formId",Deadline:"deadline",MaxResources:"maxResources",LeadersEmails:"leadersEmails",LeadersFirstNames:"leadersFirstnames",LeadersLastNames:"leadersLastnames",PrivateNote:"privateNote",Tags:"tags"};static IMPORT_COLUMNS_REQUIRED=e=>[...e===Ye.Update?[br.IMPORT_COLUMNS_DEFAULT.Id]:[],br.IMPORT_COLUMNS_DEFAULT.Name,br.IMPORT_COLUMNS_DEFAULT.CategoryName,br.IMPORT_COLUMNS_DEFAULT.FormId];default(e){const t=super.default(e);return t.input={...t.input},t}constructor(e,t){super(e,t),this.csvInputService=e}};vr=br=function(e,t,n,i){var a,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(a=e[r])&&(o=(s<3?a(o):s>3?a(t,n,o):a(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o}([(0,En._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[ko,bi])],vr);const Ar=e=>e.join("/"),Cr=sa.HEAVENT_APPLICATION_BASENAME,Er={FIELDS:{PLURAL:"fields",SINGLE:"field"}},Tr={AUTH:"auth",EDIT:"edit",CREATE:"create",EXPORT:"export",EXPORT_BASIC:"export/basic",EXPORT_API:"export/api",IMPORT:"import",INVITE:"invite"},Rr={INFORMATION:"information",DASHBOARD:"dashboard",HISTORY:"history",REGISTRATION:"registration",DOCUMENTS:"documents",PROFILE:"profile",REPORTING:"reporting",FORMS:"forms",FORM:"form",MEMBER:"member",MEMBERS:"members",PREVIEW:"preview"},Mr={LIST:"list"},Dr=e=>Ar([e,Tr.AUTH]),Or=e=>Ar([e,Mr.LIST]),wr=e=>Ar([e,Tr.CREATE]),Pr=e=>Ar([e,Tr.EDIT]);var $r,kr,Nr,Lr,zr,Fr,Ur,Br,Gr;function Vr(e){switch(e){case Nr.AccreditationsMatrix:case Fr.AccreditationsMatrix:return"table-cells";case zr.Calendar:case Fr.Calendar:return"chart-gantt";case Lr.Card:return"rectangle-list";case kr.List:case Nr.List:case Lr.List:case zr.List:case Fr.List:return"table";case zr.Map:case Fr.Map:return"map-location";case kr.SlotsList:case zr.SlotsList:return"table";case kr.Table:return"table-cells";case kr.WeeklyCalendar:return"calendar";default:return ir()}}function Wr(e,t){switch(t){case Nr.AccreditationsMatrix:case Fr.AccreditationsMatrix:return e("matrice_des_acc_84939");case zr.Calendar:case Fr.Calendar:return e("vue_planning_91663");case Lr.Card:return e("vue_grille_37962");case kr.List:case Nr.List:case Lr.List:case zr.List:case Fr.List:return e("vue_liste_56882");case zr.Map:case Fr.Map:return e("vue_carte_79064");case kr.SlotsList:case zr.SlotsList:return e("vue_liste_cr_n_47406");case kr.Table:return e("vue_tableau_18026");case kr.WeeklyCalendar:return e("vue_calendrier_58086");default:return ir()}}!function(e){e.Category="Category",e.Date="Date"}($r||($r={})),(Gr=kr||(kr={})).List="List",Gr.SlotsList="SlotsList",Gr.Table="Table",Gr.WeeklyCalendar="WeeklyCalendar",(Br=Nr||(Nr={})).AccreditationsMatrix="AccreditationsMatrix",Br.List="List",function(e){e.Card="Card",e.List="List"}(Lr||(Lr={})),(Ur=zr||(zr={})).Calendar="Calendar",Ur.List="List",Ur.Map="Map",Ur.SlotsList="SlotsList",function(e){e.AccreditationsMatrix="AccreditationsMatrix",e.Calendar="Calendar",e.List="List",e.Map="Map"}(Fr||(Fr={}));let qr=class extends vo{constructor(e){super(e)}delegationsSpaceLayoutTabInputDefault(){return{name:this.t("tab_sans_nom_50048"),description:"",slug:"",canDelete:!0,isVisible:!0,isPinned:!1,segmentType:Tt.Volunteers,rendering:Fr.List,infos:{matrixShowAccreditations:!0,matrixShowProfiles:!0}}}defaultDashboardTab(){return{name:this.t("tableau_de_bord_24627"),description:"",slug:Rr.DASHBOARD,canDelete:!1,isVisible:!0,isPinned:!0,segmentType:Tt.Volunteers,rendering:Fr.List,infos:{}}}defaultDocumentsTab(){return{name:this.t("Documents"),description:"",slug:Rr.DOCUMENTS,canDelete:!1,isVisible:!0,isPinned:!1,segmentType:Tt.Volunteers,rendering:Fr.List,infos:{}}}tabInputSchema(){return fo.Ik().shape({name:fo.Yj().required(this.t("le_nom_est_requ_61536")),description:fo.Yj(),slug:fo.Yj().required(this.t("l_url_est_requi_99475")).test("is-valid-slug",this.t("le_slug_ne_doit_10047"),e=>g(e)===e),canDelete:fo.zM().required(),isVisible:fo.zM().required(),isPinned:fo.zM().required(),segmentType:fo.Yj().oneOf([Tt.Accreditations,Tt.Volunteers],this.t("le_type_de_vue_62720")).required(this.t("le_type_de_vue_62720")),rendering:fo.Yj().required(this.t("le_type_de_visu_51393"))})}};qr=function(e,t,n,i){var a,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(a=e[r])&&(o=(s<3?a(o):s>3?a(t,n,o):a(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o}([(0,En._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[bi])],qr);let Yr=class extends vo{tabInput;constructor(e,t){super(e),this.tabInput=t}delegationSpaceLayoutInputDefault(e){return{name:e?.name??"",tabs:e?.tabs??[this.tabInput.defaultDashboardTab(),this.tabInput.defaultDocumentsTab()]}}delegationSpaceLayoutInputSchema(){return fo.Ik().shape({name:fo.Yj().required(this.t("le_nom_du_layou_34851")),tabs:fo.YO().of(this.tabInput.tabInputSchema())})}createUpdateDelegationSpaceLayout(){return fo.Ik().shape({delegationsSpaceLayout:this.delegationSpaceLayoutInputSchema()})}};Yr=function(e,t,n,i){var a,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(a=e[r])&&(o=(s<3?a(o):s>3?a(t,n,o):a(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o}([(0,En._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[bi,qr])],Yr);function Hr(e){return"production"===s.Development&&sa.HIGHLIGHT_CUSTOM_COLOURS?{grayCustom50:"#fabbf6",grayCustom500:"#fa5aef",grayCustom700:"#ff3df2",grayCustom800:"#fc23ee",grayCustom900:"#ff03ee",primaryCustom500:"#9cff66",primaryCustom600:"#61fc0d"}:{grayCustom50:e?.grayCustom50??b.colors.gray50.value,grayCustom500:e?.grayCustom500??b.colors.gray500.value,grayCustom700:e?.grayCustom700??b.colors.gray700.value,grayCustom800:e?.grayCustom800??b.colors.gray800.value,grayCustom900:e?.grayCustom900??b.colors.gray900.value,primaryCustom500:e?.primaryCustom500??b.colors.primary500.value,primaryCustom600:e?.primaryCustom600??b.colors.primary600.value}}let Zr=class extends vo{documentInputService;constructor(e,t){super(t),this.documentInputService=e}designInputDefault(e,t){return{banner:t?.banner??e?.banner??this.documentInputService.documentInputDefault(),logo:t?.logo??e?.logo??this.documentInputService.documentInputDefault(),colors:Hr(t?.colors??e?.colors)}}formParametersDesignInputDefault(e){return{banner:e?.banner??this.documentInputService.documentInputDefault(),colors:Hr(e?.colors)}}};Zr=function(e,t,n,i){var a,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(a=e[r])&&(o=(s<3?a(o):s>3?a(t,n,o):a(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o}([(0,En._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[gr,bi])],Zr);let Kr=class extends vo{documentInputService;constructor(e,t){super(e),this.documentInputService=t}emailSenderInputDefault(e){return{header:e?.header??this.documentInputService.documentInputDefault(),picture:e?.picture??this.documentInputService.documentInputDefault(),footer:e?.footer??this.documentInputService.documentInputDefault(),signature:e?.signature??"",name:e?.name??"",fromEmail:e?.fromEmail??"",fromName:e?.fromName??"",replyTo:e?.replyTo??"",eventsIds:e?.eventsIds??[],isOrganizationDefault:e?.isOrganizationDefault??!1}}emailSenderInputSchema(){return fo.Ik().shape({header:this.documentInputService.documentInputSchemaNotRequired(),picture:this.documentInputService.documentInputSchemaNotRequired(),signature:fo.Yj(),name:fo.Yj().required(this.t("le_label_est_re_86986")),fromEmail:fo.Yj().required(this.t("l_e_mail_de_l_56279")),fromName:fo.Yj().required(this.t("le_nom_de_l_me_01331")),replyTo:fo.Yj()})}createUpdateEmailSenderSchema(){return fo.Ik().shape({emailSender:this.emailSenderInputSchema()})}};Kr=function(e,t,n,i){var a,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(a=e[r])&&(o=(s<3?a(o):s>3?a(t,n,o):a(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o}([(0,En._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[bi,gr])],Kr);const Qr=sa.EMAIL_FROM_NAME;let Xr=class extends vo{constructor(e){super(e)}emailTemplateDefault(e,t,n,i,a){const s=this.emailTypeToDefault(e,t,i,a);return n&&(s.subject=n.subject,s.content=n.content),{useDefault:n?.useDefault??!0,emailType:e,emailSenderId:n?.emailSenderId,attachments:n?.attachments??[],hasCalendarInvite:n?.hasCalendarInvite??!1,calendarInviteName:n?.calendarInviteName??null,calendarInviteStartDate:n?.calendarInviteStartDate??null,calendarInviteStartTime:n?.calendarInviteStartTime??null,calendarInviteEndDate:n?.calendarInviteEndDate??null,calendarInviteEndTime:n?.calendarInviteEndTime??null,...s}}emailTemplateSchema(){return fo.Ik().shape({useDefault:fo.zM().required(""),emailType:fo.Yj().required(this.t("le_type_d_e_mai_84281")).oneOf(zn,this.t("le_type_d_e_mai_84281")),subject:fo.Yj().when("useDefault",{is:!1,then:e=>e.required(this.t("le_sujet_est_re_18923"))}),content:fo.Yj().when("useDefault",{is:!1,then:e=>e.required(this.t("le_contenu_est_45048")).test("contains-code",this.t("le_contenu_doit_64437"),function(){return!(!this.parent.useDefault&&this.parent.emailType===Te.Code)||this.parent.content.includes("{code}")})}),attachments:fo.YO().of(fo.Yj()),hasCalendarInvite:fo.zM().required(),calendarInviteName:fo.Yj().when("hasCalendarInvite",{is:!0,then:e=>e.required(this.t("nom_de_l_v_nem_58512")),otherwise:e=>e.nullable()}),calendarInviteStartDate:Co.when("hasCalendarInvite",{is:!0,then:e=>e.required(this.t("la_date_de_d_bu_05030")).typeError(this.t("la_date_de_d_bu_05030")),otherwise:e=>e.nullable()}),calendarInviteStartTime:fo.Yj().when("hasCalendarInvite",{is:!0,then:e=>e.required(this.t("heure_de_d_but_90785")),otherwise:e=>e.nullable()}),calendarInviteEndDate:Co.when("hasCalendarInvite",{is:!0,then:e=>e.required(this.t("la_date_de_fin_32246")).typeError(this.t("la_date_de_fin_32246")),otherwise:e=>e.nullable()}),calendarInviteEndTime:fo.Yj().when("hasCalendarInvite",{is:!0,then:e=>e.required(this.t("l_heure_de_fin_78626")),otherwise:e=>e.nullable()})})}updateEmailTemplateSchema(){return fo.Ik().shape({emailTemplate:this.emailTemplateSchema()})}emailTypeToDefault(e,t,n,i){switch(e){case Te.Accreditations:return this.accreditationsDefault();case Te.AccreditationsRefused:return this.accreditationsRefusedDefault();case Te.Assignments:return this.assignmentsDefault();case Te.Code:return this.codeDefault(n,i);case Te.FormInvite:return this.formInviteDefault();case Te.FormSubmit:return this.formSubmitDefault(n);case Te.NotifyLeaders:return this.notifyLeadersDefault(t);case Te.DelegationCategoryLeaderAssign:return this.delegationCategoryLeaderAssign(t);case Te.DelegationFormInvite:return this.delegationFormInviteDefault();case Te.DelegationLeaderAssign:return this.delegationLeaderAssign();case Te.PositionCategoryLeaderAssign:return this.positionCategoryLeaderAssignDefault(t);case Te.PositionLeaderAssign:return this.positionLeaderAssign(t);case Te.Refused:return this.refusedDefault();case Te.VolunteerRegistration:return this.volunteerRegistrationDefault();case Te.Campaign:case Te.AccreditationsImport:case Te.AccreditationsProfilesImport:case Te.DelegationsImport:case Te.EventsImport:case Te.FilesImport:case Te.Documents:case Te.EventInvite:case Te.Export:case Te.MembersImport:case Te.NewMember:case Te.OrganizationInvite:case Te.PositionsImport:throw new Error("Impossible to change this email");default:return ir()}}accreditationsDefault(){return{subject:this.t("_event_name_49280"),content:this.t("accreditations_default")}}accreditationsRefusedDefault(){return{subject:this.t("_event_name_01805"),content:this.t("accreditations_refused_default")}}assignmentsDefault(){return{subject:this.t("_event_name_72063"),content:this.t("assignments_default")}}codeDefault(e,t){return{subject:e&&!t?this.t("code_de_v_rific_41117"):this.t("code_de_connexi_57121"),content:this.t("code_default")}}formInviteDefault(){return{subject:this.t("form_invite_subject"),content:this.t("form_invite_content")}}formSubmitDefault(e){return e?{subject:this.t("_event_name_12686"),content:this.t("form_submit_event_default")}:{subject:this.t("_organization_n_21926"),content:this.t("form_submit_organization_default")}}notifyLeadersDefault(e){return{subject:this.t("_event_name_95901"),content:this.t("notify_leaders_default_1",e.href,Qr)}}delegationCategoryLeaderAssign(e){return{subject:this.t("_event_name_69973"),content:this.t("_p_bonjour_use_97817",Qr,e.href,Qr)}}delegationLeaderAssign(){return{subject:this.t("_event_name_92886"),content:this.t("_p_bonjour_use_96380")}}delegationFormInviteDefault(){return{subject:this.t("invitation_re_29033"),content:this.t("_p_bonjour_use_29618")}}positionCategoryLeaderAssignDefault(e){return{subject:this.t("_event_name_63708"),content:this.t("category_leader_assign_default_1",Qr,e.href,Qr)}}positionLeaderAssign(e){return{subject:this.t("_event_name_60486"),content:this.t("leader_assign_default_1",Qr,e.href,Qr)}}refusedDefault(){return{subject:this.t("_event_name_59248"),content:this.t("refused_default")}}volunteerRegistrationDefault(){return{subject:this.t("_event_name_12686"),content:this.t("volunteer_registration_default")}}};Xr=function(e,t,n,i){var a,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(a=e[r])&&(o=(s<3?a(o):s>3?a(t,n,o):a(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o}([(0,En._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[bi])],Xr);let Jr=class extends vo{constructor(e){super(e)}eventDuplicateInputDefault(e){return{name:this.t("copie_de_1_62900",e.name),startAt:e.startAt,endAt:e.endAt,eventId:null,includeAccreditations:!0,includeCustomDocuments:!0,includeCustomFields:!0,includeDelegations:!0,includeEmailsTemplates:!0,includeForms:!0,includePositions:!0,includeSegments:!0,includeTemplates:!0,includeWorkflows:!0}}eventDuplicateSchema(){return fo.Ik().shape({name:fo.Yj().required(this.t("le_nom_est_requ_61536")),startAt:Co.required(this.t("la_date_d_but_d_30022")).typeError(this.t("la_date_d_but_d_30022")),endAt:Co.required(this.t("la_date_de_fin_45068")).typeError(this.t("la_date_de_fin_45068")).test("after-start-at",this.t("la_date_de_fin_00429"),function(){return $a.c9.isDateTime(this.parent.startAt)&&this.parent.startAt.isValid&&$a.c9.isDateTime(this.parent.endAt)&&this.parent.endAt.isValid&&this.parent.endAt>=this.parent.startAt}),includeAccreditations:fo.zM(),includeCustomDocuments:fo.zM(),includeCustomFields:fo.zM(),includeDelegations:fo.zM(),includeEmailsTemplates:fo.zM(),includeForms:fo.zM(),includePositions:fo.zM(),includeSegments:fo.zM(),includeTemplates:fo.zM(),includeWorkflows:fo.zM()})}};Jr=function(e,t,n,i){var a,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(a=e[r])&&(o=(s<3?a(o):s>3?a(t,n,o):a(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o}([(0,En._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[bi])],Jr);let ed=class{countries;countriesCodes;phoneCodes;constructor(e){const t=e.translate.bind(e);this.countries=(0,ho.A)([{phoneCode:"+93",code:"AF",name:t("afghanistan_59344"),nationality:t("afghan_10143"),emoji:"🇦🇫",language:["ps","ps-AR"],smsPrice:.27},{phoneCode:"+35818",code:"AX",name:t("_land_islands_92853"),nationality:t("_land_island_62794"),emoji:"🇦🇽"},{phoneCode:"+355",code:"AL",name:t("albania_07621"),nationality:t("albanian_82021"),emoji:"🇦🇱",language:["sq","sq-AL"],smsPrice:.12},{phoneCode:"+213",code:"DZ",name:t("algeria_37723"),nationality:t("algerian_97855"),emoji:"🇩🇿",language:"ar-DZ",smsPrice:.285},{phoneCode:"+1684",code:"AS",name:t("american_samoa_95023"),nationality:t("american_samoan_76272"),emoji:"🇦🇸"},{phoneCode:"+376",code:"AD",name:t("andorra_45150"),nationality:t("andorran_97838"),emoji:"🇦🇩",smsPrice:.52},{phoneCode:"+244",code:"AO",name:t("angola_15815"),nationality:t("angolan_91942"),emoji:"🇦🇴",smsPrice:.17},{phoneCode:"+1264",code:"AI",name:t("anguilla_53408"),nationality:t("anguillan_92612"),emoji:"🇦🇮"},{phoneCode:"+1268",code:"AG",name:t("antigua_and_bar_05164"),nationality:t("antiguan_or_bar_26833"),emoji:"🇦🇬"},{phoneCode:"+54",code:"AR",name:t("argentina_92219"),nationality:t("argentine_14780"),emoji:"🇦🇷",language:"es-AR",smsPrice:.11},{phoneCode:"+374",code:"AM",name:t("armenia_90330"),nationality:t("armenian_87788"),language:["hy","hy-AM"],emoji:"🇦🇲"},{phoneCode:"+297",code:"AW",name:t("aruba_62942"),nationality:t("aruban_18515"),emoji:"🇦🇼",smsPrice:.33},{phoneCode:"+61",code:"AU",name:t("australia_84647"),nationality:t("australian_83553"),emoji:"🇦🇺",language:"en-AU",smsPrice:.093},{phoneCode:"+43",code:"AT",name:t("austria_67457"),nationality:t("austrian_39761"),emoji:"🇦🇹",language:"de-AT",smsPrice:.066},{phoneCode:"+994",code:"AZ",name:t("azerbaijan_14476"),nationality:t("azerbaijani_az_92428"),emoji:"🇦🇿",language:"az-AZ",smsPrice:.39},{phoneCode:"+1242",code:"BS",name:t("bahamas_33701"),nationality:t("bahamian_86817"),emoji:"🇧🇸"},{phoneCode:"+973",code:"BH",name:t("bahrain_43417"),nationality:t("bahraini_76209"),emoji:"🇧🇭",language:"ar-BH",smsPrice:.12},{phoneCode:"+880",code:"BD",name:t("bangladesh_48531"),nationality:t("bangladeshi_66399"),emoji:"🇧🇩",smsPrice:.425},{phoneCode:"+1246",code:"BB",name:t("barbados_57235"),nationality:t("barbadian_02319"),emoji:"🇧🇧"},{phoneCode:"+375",code:"BY",name:t("belarus_97102"),nationality:t("belarusian_60742"),emoji:"🇧🇾",language:["be","be-BY"],smsPrice:.31},{phoneCode:"+32",code:"BE",name:t("belgium_21048"),nationality:t("belgian_00407"),emoji:"🇧🇪",language:["fr-BE","nl-BE"],smsPrice:.094},{phoneCode:"+501",code:"BZ",name:t("belize_94460"),nationality:t("belizean_90827"),emoji:"🇧🇿",language:"en-BZ",smsPrice:0},{phoneCode:"+229",code:"BJ",name:t("benin_88614"),nationality:t("beninese_benin_55987"),emoji:"🇧🇯",smsPrice:.04},{phoneCode:"+1441",code:"BM",name:t("bermuda_84448"),nationality:t("bermudian_berm_58878"),emoji:"🇧🇲"},{phoneCode:"+975",code:"BT",name:t("bhutan_12608"),nationality:t("bhutanese_34101"),emoji:"🇧🇹",smsPrice:.39},{phoneCode:"+591",code:"BO",name:t("bolivia_plurin_43912"),nationality:t("bolivian_98429"),emoji:"🇧🇴",language:["es-BO","qu-BO"],smsPrice:.38},{phoneCode:"+5997",code:"BQ",name:t("bonaire_sint_e_69605"),nationality:t("bonaire_07340"),emoji:"🇧🇶"},{phoneCode:"+387",code:"BA",name:t("bosnia_and_herz_91990"),nationality:t("bosnian_or_herz_88694"),emoji:"🇧🇦",language:["bs-BA","hr-BA","sr-BA"],smsPrice:.46},{phoneCode:"+267",code:"BW",name:t("botswana_49258"),nationality:t("motswana_botsw_32461"),emoji:"🇧🇼",smsPrice:.13},{phoneCode:"+55",code:"BR",name:t("brazil_03275"),nationality:t("brazilian_74116"),emoji:"🇧🇷",language:"pt-BR",smsPrice:.051},{phoneCode:"+246",code:"IO",name:t("british_indian_92949"),nationality:t("british_indian_08875"),emoji:"🇮🇴"},{phoneCode:"+673",code:"BN",name:t("brunei_darussal_84695"),nationality:t("bruneian_06218"),emoji:"🇧🇳",language:"ms-BN",smsPrice:.05},{phoneCode:"+359",code:"BG",name:t("bulgaria_97045"),nationality:t("bulgarian_79288"),emoji:"🇧🇬",language:["bg","bg-BG"],smsPrice:.16},{phoneCode:"+226",code:"BF",name:t("burkina_faso_55299"),nationality:t("burkinab_02690"),emoji:"🇧🇫",smsPrice:.032},{phoneCode:"+257",code:"BI",name:t("burundi_85561"),nationality:t("burundian_35605"),emoji:"🇧🇮",smsPrice:.05},{phoneCode:"+238",code:"CV",name:t("cabo_verde_28261"),nationality:t("cabo_verdean_88842"),emoji:"🇨🇻",smsPrice:.2},{phoneCode:"+855",code:"KH",name:t("cambodia_77971"),nationality:t("cambodian_19577"),emoji:"🇰🇭",smsPrice:.52},{phoneCode:"+237",code:"CM",name:t("cameroon_44200"),nationality:t("cameroonian_12953"),emoji:"🇨🇲",smsPrice:.024},{phoneCode:"+1",code:"CA",name:t("canada_52584"),nationality:t("canadian_90836"),emoji:"🇨🇦",language:["en-CA","fr-CA"],smsPrice:.03},{phoneCode:"+1345",code:"KY",name:t("cayman_islands_80923"),nationality:t("caymanian_07521"),emoji:"🇰🇾"},{phoneCode:"+236",code:"CF",name:t("central_african_74182"),nationality:t("central_african_89873"),emoji:"🇨🇫",smsPrice:.053},{phoneCode:"+235",code:"TD",name:t("chad_58721"),nationality:t("chadian_55061"),emoji:"🇹🇩",smsPrice:.035},{phoneCode:"+56",code:"CL",name:t("chile_06923"),nationality:t("chilean_69498"),emoji:"🇨🇱",language:"es-CL",smsPrice:.13},{phoneCode:"+86",code:"CN",name:t("china_40708"),nationality:t("chinese_12117"),emoji:"🇨🇳",language:["zh","zh-CN"],smsPrice:.055},{phoneCode:"+6189164",code:"CX",name:t("christmas_islan_46649"),nationality:t("christmas_islan_46649"),emoji:"🇨🇽"},{phoneCode:"+6189162",code:"CC",name:t("cocos_keeling_98180"),nationality:t("cocos_island_82627"),emoji:"🇨🇨"},{phoneCode:"+57",code:"CO",name:t("colombia_37632"),nationality:t("colombian_28222"),emoji:"🇨🇴",language:"es-CO",smsPrice:.033},{phoneCode:"+269",code:"KM",name:t("comoros_35439"),nationality:t("comoran_comori_49754"),emoji:"🇰🇲",smsPrice:.42},{phoneCode:"+242",code:"CG",name:t("congo_republic_97304"),nationality:t("congolese_04965"),emoji:"🇨🇬",smsPrice:.045},{phoneCode:"+243",code:"CD",name:t("congo_democrat_80102"),nationality:t("congolese_04965"),emoji:"🇨🇩",smsPrice:.2},{phoneCode:"+682",code:"CK",name:t("cook_islands_51542"),nationality:t("cook_island_99158"),emoji:"🇨🇰",smsPrice:.12},{phoneCode:"+506",code:"CR",name:t("costa_rica_57058"),nationality:t("costa_rican_17127"),emoji:"🇨🇷",language:"es-CR",smsPrice:.061},{phoneCode:"+225",code:"CI",name:t("c_te_d_ivoire_55380"),nationality:t("ivorian_01729"),emoji:"🇨🇮",smsPrice:.055},{phoneCode:"+385",code:"HR",name:t("croatia_52101"),nationality:t("croatian_62900"),emoji:"🇭🇷",language:["hr","hr-HR"],smsPrice:.13},{phoneCode:"+53",code:"CU",name:t("cuba_11922"),nationality:t("cuban_00956"),emoji:"🇨🇺",smsPrice:.08},{phoneCode:"+5999",code:"CW",name:t("cura_ao_46587"),nationality:t("cura_aoan_65055"),emoji:"🇨🇼"},{phoneCode:"+357",code:"CY",name:t("cyprus_86967"),nationality:t("cypriot_85282"),emoji:"🇨🇾",smsPrice:.083},{phoneCode:"+420",code:"CZ",name:t("czech_republic_57570"),nationality:t("czech_42120"),emoji:"🇨🇿",language:["cs","cs-CZ"],smsPrice:.08},{phoneCode:"+45",code:"DK",name:t("denmark_28356"),nationality:t("danish_44544"),emoji:"🇩🇰",language:["da","da-DK"],smsPrice:.06},{phoneCode:"+253",code:"DJ",name:t("djibouti_38156"),nationality:t("djiboutian_72034"),emoji:"🇩🇯",smsPrice:.12},{phoneCode:"+1767",code:"DM",name:t("dominica_13395"),nationality:t("dominican_54004"),emoji:"🇩🇲"},{phoneCode:["+1809","+1829","+1849"],code:"DO",name:t("dominican_repub_08891"),nationality:t("dominican_54004"),emoji:"🇩🇴",language:"es-DO"},{phoneCode:"+593",code:"EC",name:t("ecuador_25933"),nationality:t("ecuadorian_50591"),emoji:"🇪🇨",language:["es-EC","qu-EC"],smsPrice:.48},{phoneCode:"+20",code:"EG",name:t("egypt_61058"),nationality:t("egyptian_75798"),emoji:"🇪🇬",language:"ar-EG",smsPrice:.45},{phoneCode:"+503",code:"SV",name:t("el_salvador_37036"),nationality:t("salvadoran_02475"),emoji:"🇸🇻",language:"es-SV",smsPrice:.34},{phoneCode:"+240",code:"GQ",name:t("equatorial_guin_39570"),nationality:t("equatorial_guin_44537"),emoji:"🇬🇶",smsPrice:.21},{phoneCode:"+291",code:"ER",name:t("eritrea_67366"),nationality:t("eritrean_20355"),emoji:"🇪🇷",smsPrice:.045},{phoneCode:"+372",code:"EE",name:t("estonia_58256"),nationality:t("estonian_46354"),emoji:"🇪🇪",language:["et","et-EE"],smsPrice:.08},{phoneCode:"+251",code:"ET",name:t("ethiopia_72971"),nationality:t("ethiopian_03019"),emoji:"🇪🇹",smsPrice:.08},{phoneCode:"+500",code:"FK",name:t("falkland_island_59316"),nationality:t("falkland_island_15848"),emoji:"🇫🇰"},{phoneCode:"+298",code:"FO",name:t("faroe_islands_71549"),nationality:t("faroese_32806"),emoji:"🇫🇴",language:["fo","fo-FO"],smsPrice:.046},{phoneCode:"+679",code:"FJ",name:t("fiji_36369"),nationality:t("fijian_39649"),emoji:"🇫🇯",smsPrice:.21},{phoneCode:"+358",code:"FI",name:t("finland_07531"),nationality:t("finnish_24918"),emoji:"🇫🇮",language:["fi","fi-FI","se-FI","sv-FI"],smsPrice:.083},{phoneCode:"+33",code:"FR",name:t("france_26614"),nationality:t("french_86034"),emoji:"🇫🇷",language:["fr","fr-FR"],smsPrice:.045},{phoneCode:"+594",code:"GF",name:t("french_guiana_80598"),nationality:t("french_guianese_02041"),emoji:"🇬🇫",smsPrice:.17},{phoneCode:"+689",code:"PF",name:t("french_polynesi_50842"),nationality:t("french_polynesi_47751"),emoji:"🇵🇫",smsPrice:.18},{phoneCode:"+241",code:"GA",name:t("gabon_58286"),nationality:t("gabonese_62984"),emoji:"🇬🇦",smsPrice:.045},{phoneCode:"+220",code:"GM",name:t("gambia_93575"),nationality:t("gambian_30767"),emoji:"🇬🇲",smsPrice:.19},{phoneCode:"+995",code:"GE",name:t("georgia_93003"),nationality:t("georgian_79366"),emoji:"🇬🇪",language:["ka","ka-GE"]},{phoneCode:"+49",code:"DE",name:t("germany_31193"),nationality:t("german_36386"),emoji:"🇩🇪",language:["de","de-DE"],smsPrice:.089},{phoneCode:"+233",code:"GH",name:t("ghana_32464"),nationality:t("ghanaian_99745"),emoji:"🇬🇭",smsPrice:.033},{phoneCode:"+350",code:"GI",name:t("gibraltar_24360"),nationality:t("gibraltar_24360"),emoji:"🇬🇮",smsPrice:.076},{phoneCode:"+30",code:"GR",name:t("greece_28837"),nationality:t("greek_hellenic_39006"),emoji:"🇬🇷",language:["el","el-GR"],smsPrice:.061},{phoneCode:"+299",code:"GL",name:t("greenland_80916"),nationality:t("greenlandic_67508"),emoji:"🇬🇱",smsPrice:.036},{phoneCode:"+1473",code:"GD",name:t("grenada_04221"),nationality:t("grenadian_25686"),emoji:"🇬🇩"},{phoneCode:"+590",code:"GP",name:t("guadeloupe_95839"),nationality:t("guadeloupe_95839"),emoji:"🇬🇵"},{phoneCode:"+1671",code:"GU",name:t("guam_76384"),nationality:t("guamanian_guam_01132"),emoji:"🇬🇺"},{phoneCode:"+502",code:"GT",name:t("guatemala_49597"),nationality:t("guatemalan_60946"),emoji:"🇬🇹",language:"es-GT",smsPrice:.3},{phoneCode:["+441481","+447781","+447839","+447911"],code:"GG",name:t("guernsey_87507"),nationality:t("channel_island_53762"),emoji:"🇬🇬"},{phoneCode:"+224",code:"GN",name:t("guinea_20770"),nationality:t("guinean_42564"),emoji:"🇬🇳",smsPrice:.056},{phoneCode:"+245",code:"GW",name:t("guinea_bissau_80728"),nationality:t("bissau_guinean_66742"),emoji:"🇬🇼",smsPrice:.09},{phoneCode:"+592",code:"GY",name:t("guyana_92443"),nationality:t("guyanese_56902"),emoji:"🇬🇾",smsPrice:.3},{phoneCode:"+509",code:"HT",name:t("haiti_99471"),nationality:t("haitian_50142"),emoji:"🇭🇹",smsPrice:.3},{phoneCode:"+379",code:"VA",name:t("vatican_city_st_63732"),nationality:t("vatican_36370"),emoji:"🇻🇦"},{phoneCode:"+504",code:"HN",name:t("honduras_79402"),nationality:t("honduran_35392"),emoji:"🇭🇳",language:"es-HN",smsPrice:.267},{phoneCode:"+852",code:"HK",name:t("hong_kong_96239"),nationality:t("hong_kong_hong_64846"),emoji:"🇭🇰",language:"zh-HK",smsPrice:.079},{phoneCode:"+36",code:"HU",name:t("hungary_57981"),nationality:t("hungarian_magy_62212"),emoji:"🇭🇺",language:["hu","hu-HU"],smsPrice:.106},{phoneCode:"+354",code:"IS",name:t("iceland_79438"),nationality:t("icelandic_17689"),emoji:"🇮🇸",language:["is","is-IS"],smsPrice:.085},{phoneCode:"+91",code:"IN",name:t("india_39466"),nationality:t("indian_25592"),emoji:"🇮🇳",language:["gu","gu-IN","hi","hi-IN","kn","kn-IN","kok","kok-IN","mr","mr-IN","pa","pa-IN","sa","sa-IN","ta","ta-IN","te","te-IN"],smsPrice:.078},{phoneCode:"+62",code:"ID",name:t("indonesia_65003"),nationality:t("indonesian_29723"),emoji:"🇮🇩",language:["id","id-ID"],smsPrice:.464},{phoneCode:"+98",code:"IR",name:t("iran_76293"),nationality:t("iranian_persia_76791"),emoji:"🇮🇷",language:["fa","fa-IR"],smsPrice:.38},{phoneCode:"+964",code:"IQ",name:t("iraq_82027"),nationality:t("iraqi_31025"),emoji:"🇮🇶",language:"ar-IQ",smsPrice:.33},{phoneCode:"+353",code:"IE",name:t("ireland_62034"),nationality:t("irish_35774"),emoji:"🇮🇪",language:"en-IE",smsPrice:.065},{phoneCode:["+441624","+447524","+447624","+447924"],code:"IM",name:t("isle_of_man_64982"),nationality:t("manx_86314"),emoji:"🇮🇲"},{phoneCode:"+972",code:"IL",name:t("israel_20033"),nationality:t("israeli_69936"),emoji:"🇮🇱",language:["he","he-IL"],smsPrice:.3},{phoneCode:"+39",code:"IT",name:t("italy_14828"),nationality:t("italian_56623"),emoji:"🇮🇹",language:["it","it-IT"],smsPrice:.038},{phoneCode:"+1876",code:"JM",name:t("jamaica_55090"),nationality:t("jamaican_58881"),emoji:"🇯🇲",language:"en-JM"},{phoneCode:"+81",code:"JP",name:t("japan_61810"),nationality:t("japanese_82636"),emoji:"🇯🇵",language:["ja","ja-JP"],smsPrice:.08},{phoneCode:"+441534",code:"JE",name:t("jersey_78898"),nationality:t("channel_island_53762"),emoji:"🇯🇪"},{phoneCode:"+962",code:"JO",name:t("jordan_36280"),nationality:t("jordanian_41310"),emoji:"🇯🇴",language:"ar-JO",smsPrice:.39},{phoneCode:["+76","+77"],code:"KZ",name:t("kazakhstan_30541"),nationality:t("kazakhstani_ka_27277"),emoji:"🇰🇿",language:["kk","kk-KZ"]},{phoneCode:"+254",code:"KE",name:t("kenya_67944"),nationality:t("kenyan_92311"),emoji:"🇰🇪",language:["sw","sw-KE"],smsPrice:.3},{phoneCode:"+686",code:"KI",name:t("kiribati_25369"),nationality:t("i_kiribati_66745"),emoji:"🇰🇮",smsPrice:.036},{phoneCode:"+383",code:"XK",name:t("kosovo_44440"),nationality:t("kosovare_35920"),emoji:"🇽🇰",smsPrice:.12},{phoneCode:"+850",code:"KP",name:t("korea_democrat_48584"),nationality:t("north_korean_16553"),emoji:"🇰🇵",smsPrice:.045},{phoneCode:"+82",code:"KR",name:t("korea_republic_72269"),nationality:t("south_korean_89943"),emoji:"🇰🇷",language:["ko","ko-KR"],smsPrice:.029},{phoneCode:"+965",code:"KW",name:t("kuwait_22026"),nationality:t("kuwaiti_76148"),emoji:"🇰🇼",language:"ar-KW",smsPrice:.327},{phoneCode:"+996",code:"KG",name:t("kyrgyzstan_84406"),nationality:t("kyrgyzstani_ky_19120"),emoji:"🇰🇬",language:["ky","ky-KG"],smsPrice:.34},{phoneCode:"+856",code:"LA",name:t("lao_people_s_de_31069"),nationality:t("lao_laotian_28318"),emoji:"🇱🇦",smsPrice:.273},{phoneCode:"+371",code:"LV",name:t("latvia_73526"),nationality:t("latvian_53651"),emoji:"🇱🇻",language:["lv","lv-LV"],smsPrice:.057},{phoneCode:"+961",code:"LB",name:t("lebanon_49493"),nationality:t("lebanese_43182"),emoji:"🇱🇧",language:"ar-LB",smsPrice:.32},{phoneCode:"+266",code:"LS",name:t("lesotho_91086"),nationality:t("basotho_52532"),emoji:"🇱🇸",smsPrice:.35},{phoneCode:"+231",code:"LR",name:t("liberia_12077"),nationality:t("liberian_64388"),emoji:"🇱🇷",smsPrice:.3},{phoneCode:"+218",code:"LY",name:t("libya_26741"),nationality:t("libyan_35337"),emoji:"🇱🇾",language:"ar-LY",smsPrice:.38},{phoneCode:"+424",code:"LI",name:t("liechtenstein_56974"),nationality:t("liechtenstein_56974"),emoji:"🇱🇮",language:"de-LI"},{phoneCode:"+370",code:"LT",name:t("lithuania_95793"),nationality:t("lithuanian_94145"),emoji:"🇱🇹",language:["lt","lt-LT"],smsPrice:.06},{phoneCode:"+352",code:"LU",name:t("luxembourg_15613"),nationality:t("luxembourg_lux_47318"),emoji:"🇱🇺",language:["de-LU","fr-LU"],smsPrice:.1},{phoneCode:"+853",code:"MO",name:t("macao_74812"),nationality:t("macanese_chine_74224"),emoji:"🇲🇴",language:"zh-MO",smsPrice:.038},{phoneCode:"+389",code:"MK",name:t("macedonia_the_19021"),nationality:t("macedonian_20446"),emoji:"🇲🇰",language:["mk","mk-MK"],smsPrice:.095},{phoneCode:"+261",code:"MG",name:t("madagascar_57052"),nationality:t("malagasy_02353"),emoji:"🇲🇬",smsPrice:.029},{phoneCode:"+265",code:"MW",name:t("malawi_27143"),nationality:t("malawian_10093"),emoji:"🇲🇼",smsPrice:.3},{phoneCode:"+60",code:"MY",name:t("malaysia_54920"),nationality:t("malaysian_81474"),emoji:"🇲🇾",language:["ms","ms-MY"],smsPrice:.29},{phoneCode:"+960",code:"MV",name:t("maldives_67432"),nationality:t("maldivian_67878"),emoji:"🇲🇻",language:["dv","dv-MV"],smsPrice:.34},{phoneCode:"+223",code:"ML",name:t("mali_95091"),nationality:t("malian_malines_66005"),emoji:"🇲🇱",smsPrice:.055},{phoneCode:"+356",code:"MT",name:t("malta_73993"),nationality:t("maltese_52729"),emoji:"🇲🇹",language:["mt","mt-MT"],smsPrice:.08},{phoneCode:"+692",code:"MH",name:t("marshall_island_92726"),nationality:t("marshallese_30337"),emoji:"🇲🇭",smsPrice:.045},{phoneCode:"+596",code:"MQ",name:t("martinique_79541"),nationality:t("martiniquais_m_01923"),emoji:"🇲🇶"},{phoneCode:"+222",code:"MR",name:t("mauritania_77906"),nationality:t("mauritanian_68205"),emoji:"🇲🇷",smsPrice:.055},{phoneCode:"+230",code:"MU",name:t("mauritius_10801"),nationality:t("mauritian_09142"),emoji:"🇲🇺",smsPrice:.184},{phoneCode:["+262269","+262639"],code:"YT",name:t("mayotte_91167"),nationality:t("mahoran_45424"),emoji:"🇾🇹"},{phoneCode:"+52",code:"MX",name:t("mexico_21962"),nationality:t("mexican_80494"),emoji:"🇲🇽",language:"es-MX",smsPrice:.92},{phoneCode:"+691",code:"FM",name:t("micronesia_fed_39555"),nationality:t("micronesian_97912"),emoji:"🇫🇲",smsPrice:.045},{phoneCode:"+373",code:"MD",name:t("moldova_republ_08796"),nationality:t("moldovan_76486"),emoji:"🇲🇩"},{phoneCode:"+377",code:"MC",name:t("monaco_72117"),nationality:t("mon_gasque_mon_17281"),emoji:"🇲🇨",language:"fr-MC",smsPrice:.1},{phoneCode:"+976",code:"MN",name:t("mongolia_36757"),nationality:t("mongolian_33711"),emoji:"🇲🇳",language:["mn","mn-MN"],smsPrice:.33},{phoneCode:"+382",code:"ME",name:t("montenegro_78236"),nationality:t("montenegrin_68334"),emoji:"🇲🇪",smsPrice:.15},{phoneCode:"+1664",code:"MS",name:t("montserrat_38432"),nationality:t("montserratian_13585"),emoji:"🇲🇸"},{phoneCode:"+212",code:"MA",name:t("morocco_52420"),nationality:t("moroccan_14305"),emoji:"🇲🇦",language:"ar-MA"},{phoneCode:"+258",code:"MZ",name:t("mozambique_60988"),nationality:t("mozambican_68300"),emoji:"🇲🇿",smsPrice:.32},{phoneCode:"+95",code:"MM",name:t("myanmar_78678"),nationality:t("burmese_66869"),emoji:"🇲🇲",smsPrice:1.1},{phoneCode:"+264",code:"NA",name:t("namibia_19026"),nationality:t("namibian_01490"),emoji:"🇳🇦",smsPrice:.048},{phoneCode:"+674",code:"NR",name:t("nauru_16303"),nationality:t("nauruan_52578"),emoji:"🇳🇷",smsPrice:.21},{phoneCode:"+977",code:"NP",name:t("nepal_49088"),nationality:t("nepali_nepales_64761"),emoji:"🇳🇵",smsPrice:.35},{phoneCode:"+31",code:"NL",name:t("netherlands_38005"),nationality:t("dutch_netherla_42451"),emoji:"🇳🇱",language:["nl","nl-NL"],smsPrice:.095},{phoneCode:"+687",code:"NC",name:t("new_caledonia_14574"),nationality:t("new_caledonian_12113"),emoji:"🇳🇨",smsPrice:.1},{phoneCode:"+64",code:"NZ",name:t("new_zealand_61929"),nationality:t("new_zealander_71823"),emoji:"🇳🇿",language:["en-NZ","mi","mi-NZ"],smsPrice:.14},{phoneCode:"+505",code:"NI",name:t("nicaragua_14531"),nationality:t("nicaraguan_06649"),emoji:"🇳🇮",language:"es-NI",smsPrice:.17},{phoneCode:"+227",code:"NE",name:t("niger_59137"),nationality:t("nigerien_06144"),emoji:"🇳🇪",smsPrice:.067},{phoneCode:"+234",code:"NG",name:t("nigeria_77810"),nationality:t("nigerian_43407"),emoji:"🇳🇬",smsPrice:.47},{phoneCode:"+683",code:"NU",name:t("niue_97570"),nationality:t("niuean_70518"),emoji:"🇳🇺",smsPrice:.045},{phoneCode:"+6723",code:"NF",name:t("norfolk_island_62377"),nationality:t("norfolk_island_62377"),emoji:"🇳🇫"},{phoneCode:"+1670",code:"MP",name:t("northern_marian_94262"),nationality:t("northern_marian_82360"),emoji:"🇲🇵"},{phoneCode:"+47",code:"NO",name:t("norway_14236"),nationality:t("norwegian_50751"),emoji:"🇳🇴",language:["nb","nb-NO","nn-NO","se-NO"],smsPrice:.064},{phoneCode:"+968",code:"OM",name:t("oman_20900"),nationality:t("omani_15042"),emoji:"🇴🇲",language:"ar-OM",smsPrice:.21},{phoneCode:"+92",code:"PK",name:t("pakistan_59697"),nationality:t("pakistani_12622"),emoji:"🇵🇰",language:["ur","ur-PK"],smsPrice:.5},{phoneCode:"+680",code:"PW",name:t("palau_46088"),nationality:t("palauan_73033"),emoji:"🇵🇼",smsPrice:.1},{phoneCode:"+970",code:"PS",name:t("palestine_stat_33253"),nationality:t("palestinian_06829"),emoji:"🇵🇸",smsPrice:.35},{phoneCode:"+507",code:"PA",name:t("panama_16821"),nationality:t("panamanian_07882"),emoji:"🇵🇦",language:"es-PA",smsPrice:.17},{phoneCode:"+675",code:"PG",name:t("papua_new_guine_56959"),nationality:t("papua_new_guine_50302"),emoji:"🇵🇬",smsPrice:.2},{phoneCode:"+595",code:"PY",name:t("paraguay_66859"),nationality:t("paraguayan_50310"),emoji:"🇵🇾",language:"es-PY",smsPrice:.124},{phoneCode:"+51",code:"PE",name:t("peru_23048"),nationality:t("peruvian_85045"),emoji:"🇵🇪",language:["es-PE","qu-PE"],smsPrice:.31},{phoneCode:"+63",code:"PH",name:t("philippines_65361"),nationality:t("philippine_fil_40400"),emoji:"🇵🇭",language:["en-PH","tl","tl-PH"],smsPrice:.243},{phoneCode:"+64",code:"PN",name:t("pitcairn_59104"),nationality:t("pitcairn_island_58961"),emoji:"🇵🇳"},{phoneCode:"+48",code:"PL",name:t("poland_13527"),nationality:t("polish_26779"),emoji:"🇵🇱",language:["pl","pl-PL"],smsPrice:.036},{phoneCode:"+351",code:"PT",name:t("portugal_19698"),nationality:t("portuguese_08463"),emoji:"🇵🇹",language:["pt","pt-PT"],smsPrice:.025},{phoneCode:["+1787","+1939"],code:"PR",name:t("puerto_rico_88176"),nationality:t("puerto_rican_10401"),emoji:"🇵🇷",language:"es-PR"},{phoneCode:"+974",code:"QA",name:t("qatar_70548"),nationality:t("qatari_58016"),emoji:"🇶🇦",language:"ar-QA",smsPrice:.3},{phoneCode:"+262",code:"RE",name:t("r_union_34094"),nationality:t("r_unionese_r_u_86871"),emoji:"🇷🇪",smsPrice:.055},{phoneCode:"+40",code:"RO",name:t("romania_41618"),nationality:t("romanian_49647"),emoji:"🇷🇴",language:["ro","ro-RO"],smsPrice:.09},{phoneCode:"+7",code:"RU",name:t("russian_federat_68392"),nationality:t("russian_12506"),emoji:"🇷🇺",language:["ru","ru-RU","tt","tt-RU"],smsPrice:2.63},{phoneCode:"+250",code:"RW",name:t("rwanda_84901"),nationality:t("rwandan_47719"),emoji:"🇷🇼",smsPrice:.1},{phoneCode:"+590",code:"BL",name:t("saint_barth_lem_80830"),nationality:t("barth_lemois_35003"),emoji:"🇧🇱",smsPrice:.09},{phoneCode:"+290",code:"SH",name:t("saint_helena_a_39384"),nationality:t("saint_helenian_19012"),emoji:"🇸🇭",smsPrice:.1},{phoneCode:"+1869",code:"KN",name:t("saint_kitts_and_74455"),nationality:t("kittitian_or_ne_99867"),emoji:"🇰🇳"},{phoneCode:"+1758",code:"LC",name:t("saint_lucia_60679"),nationality:t("saint_lucian_97267"),emoji:"🇱🇨"},{phoneCode:"+590",code:"MF",name:t("saint_martin_f_87295"),nationality:t("saint_martinois_75974"),emoji:"🇸🇽"},{phoneCode:"+508",code:"PM",name:t("saint_pierre_an_55649"),nationality:t("saint_pierrais_60177"),emoji:"🇵🇲",smsPrice:.13},{phoneCode:"+1784",code:"VC",name:t("saint_vincent_a_23833"),nationality:t("saint_vincentia_81882"),emoji:"🇻🇨"},{phoneCode:"+685",code:"WS",name:t("samoa_25648"),nationality:t("samoan_97653"),emoji:"🇼🇸",smsPrice:.21},{phoneCode:"+378",code:"SM",name:t("san_marino_47437"),nationality:t("sammarinese_71553"),emoji:"🇸🇲",smsPrice:.045},{phoneCode:"+239",code:"ST",name:t("sao_tome_and_pr_10491"),nationality:t("s_o_tom_an_21489"),emoji:"🇸🇹",smsPrice:.045},{phoneCode:"+966",code:"SA",name:t("saudi_arabia_06433"),nationality:t("saudi_saudi_ar_22967"),emoji:"🇸🇦",language:"ar-SA",smsPrice:.215},{phoneCode:"+221",code:"SN",name:t("senegal_38099"),nationality:t("senegalese_64680"),emoji:"🇸🇳",smsPrice:.034},{phoneCode:"+381",code:"RS",name:t("serbia_45061"),nationality:t("serbian_68735"),emoji:"🇷🇸",smsPrice:.46},{phoneCode:"+248",code:"SC",name:t("seychelles_67712"),nationality:t("seychellois_69858"),emoji:"🇸🇨",smsPrice:.3},{phoneCode:"+232",code:"SL",name:t("sierra_leone_02995"),nationality:t("sierra_leonean_86179"),emoji:"🇸🇱",smsPrice:.4},{phoneCode:"+65",code:"SG",name:t("singapore_37928"),nationality:t("singaporean_41916"),emoji:"🇸🇬",language:"zh-SG",smsPrice:.064},{phoneCode:"+1721",code:"SX",name:t("sint_maarten_d_57391"),nationality:t("sint_maarten_82241"),emoji:"🇸🇽"},{phoneCode:"+421",code:"SK",name:t("slovakia_10924"),nationality:t("slovak_69840"),emoji:"🇸🇰",language:["sk","sk-SK"],smsPrice:.068},{phoneCode:"+386",code:"SI",name:t("slovenia_75447"),nationality:t("slovenian_slov_38562"),emoji:"🇸🇮",language:["sl","sl-SI"],smsPrice:.18},{phoneCode:"+677",code:"SB",name:t("solomon_islands_05259"),nationality:t("solomon_island_59052"),emoji:"🇸🇧",smsPrice:.155},{phoneCode:"+252",code:"SO",name:t("somalia_56358"),nationality:t("somali_somalia_97997"),emoji:"🇸🇴",smsPrice:.35},{phoneCode:"+27",code:"ZA",name:t("south_africa_61184"),nationality:t("south_african_82152"),emoji:"🇿🇦",language:["af-ZA","en-ZA","ns","ns-ZA","tn","tn-ZA","xh","xh-ZA","zu","zu-ZA"],smsPrice:.13},{phoneCode:"+500",code:"GS",name:t("south_georgia_a_39555"),nationality:t("south_georgia_o_65055"),emoji:"🇬🇸",smsPrice:.12},{phoneCode:"+211",code:"SS",name:t("south_sudan_88232"),nationality:t("south_sudanese_69140"),emoji:"🇸🇸"},{phoneCode:"+34",code:"ES",name:t("spain_40048"),nationality:t("spanish_74199"),emoji:"🇪🇸",language:["ca","ca-ES","es","es-ES","eu-ES","gl-ES"],smsPrice:.044},{phoneCode:"+94",code:"LK",name:t("sri_lanka_51563"),nationality:t("sri_lankan_09436"),emoji:"🇱🇰",smsPrice:.4},{phoneCode:"+249",code:"SD",name:t("sudan_18427"),nationality:t("sudanese_42330"),emoji:"🇸🇩",smsPrice:.322},{phoneCode:"+597",code:"SR",name:t("suriname_78561"),nationality:t("surinamese_38193"),emoji:"🇸🇷",smsPrice:.3},{phoneCode:"+4779",code:"SJ",name:t("svalbard_and_ja_38511"),nationality:t("svalbard_26353"),emoji:"🇸🇯"},{phoneCode:"+268",code:"SZ",name:t("swaziland_91614"),nationality:t("swazi_88825"),emoji:"🇸🇿",smsPrice:.3},{phoneCode:"+46",code:"SE",name:t("sweden_85663"),nationality:t("swedish_90836"),emoji:"🇸🇪",language:["se-SE","sv","sv-SE"],smsPrice:.098},{phoneCode:"+41",code:"CH",name:t("switzerland_07889"),nationality:t("swiss_23240"),emoji:"🇨🇭",language:["de-CH","fr-CH","it-CH"],smsPrice:.098},{phoneCode:"+963",code:"SY",name:t("syrian_arab_rep_72539"),nationality:t("syrian_06992"),emoji:"🇸🇾",language:["ar-SY","syr","syr-SY"],smsPrice:.37},{phoneCode:"+886",code:"TW",name:t("taiwan_provinc_87264"),nationality:t("chinese_taiwan_24003"),emoji:"🇹🇼",language:"zh-TW",smsPrice:.105},{phoneCode:"+992",code:"TJ",name:t("tajikistan_97104"),nationality:t("tajikistani_21375"),emoji:"🇹🇯",smsPrice:.38},{phoneCode:"+255",code:"TZ",name:t("tanzania_unite_52757"),nationality:t("tanzanian_71935"),emoji:"🇹🇿",smsPrice:.38},{phoneCode:"+66",code:"TH",name:t("thailand_97396"),nationality:t("thai_51972"),emoji:"🇹🇭",language:["th","th-TH"],smsPrice:.066},{phoneCode:"+670",code:"TL",name:t("timor_leste_95604"),nationality:t("timorese_87542"),emoji:"🇹🇱",smsPrice:.22},{phoneCode:"+228",code:"TG",name:t("togo_60267"),nationality:t("togolese_55079"),emoji:"🇹🇬",smsPrice:.03},{phoneCode:"+690",code:"TK",name:t("tokelau_79536"),nationality:t("tokelauan_89444"),emoji:"🇹🇰",smsPrice:.045},{phoneCode:"+676",code:"TO",name:t("tonga_96982"),nationality:t("tongan_52630"),emoji:"🇹🇴",smsPrice:.2},{phoneCode:"+1868",code:"TT",name:t("trinidad_and_to_31939"),nationality:t("trinidadian_or_65515"),emoji:"🇹🇹",language:"en-TT"},{phoneCode:"+216",code:"TN",name:t("tunisia_36732"),nationality:t("tunisian_19451"),emoji:"🇹🇳",language:"ar-TN",smsPrice:.35},{phoneCode:"+90",code:"TR",name:t("turkey_65699"),nationality:t("turkish_85889"),emoji:"🇹🇷",language:["tr","tr-TR"],smsPrice:.033},{phoneCode:"+993",code:"TM",name:t("turkmenistan_86069"),nationality:t("turkmen_63945"),emoji:"🇹🇲"},{phoneCode:"+1649",code:"TC",name:t("turks_and_caico_34033"),nationality:t("turks_and_caico_41685"),emoji:"🇹🇨"},{phoneCode:"+688",code:"TV",name:t("tuvalu_52410"),nationality:t("tuvaluan_49403"),emoji:"🇹🇻",smsPrice:.12},{phoneCode:"+256",code:"UG",name:t("uganda_42928"),nationality:t("ugandan_07085"),emoji:"🇺🇬",smsPrice:.3},{phoneCode:"+380",code:"UA",name:t("ukraine_86632"),nationality:t("ukrainian_77624"),emoji:"🇺🇦",language:["uk","uk-UA"],smsPrice:.26},{phoneCode:"+971",code:"AE",name:t("united_arab_emi_58689"),nationality:t("emirati_emiria_12413"),emoji:"🇦🇪",language:"ar-AE",smsPrice:.12},{phoneCode:"+44",code:"GB",name:t("united_kingdom_16783"),nationality:t("british_43680"),emoji:"🇬🇧",language:["cy","cy-GB","en","en-GB"],smsPrice:.078},{phoneCode:"+1",code:"US",name:t("united_states_o_43878"),nationality:t("american_36800"),emoji:"🇺🇸",language:"en-US",smsPrice:.03},{phoneCode:"+598",code:"UY",name:t("uruguay_21979"),nationality:t("uruguayan_28212"),emoji:"🇺🇾",language:"es-UY",smsPrice:.1},{phoneCode:"+998",code:"UZ",name:t("uzbekistan_27729"),nationality:t("uzbekistani_uz_10593"),emoji:"🇺🇿",language:["uz","uz-UZ"],smsPrice:.39},{phoneCode:"+678",code:"VU",name:t("vanuatu_82756"),nationality:t("ni_vanuatu_van_02924"),emoji:"🇻🇺",smsPrice:.21},{phoneCode:"+58",code:"VE",name:t("venezuela_boli_00470"),nationality:t("venezuelan_52634"),emoji:"🇻🇪",language:"es-VE",smsPrice:.31},{phoneCode:"+84",code:"VN",name:t("vietnam_82968"),nationality:t("vietnamese_55360"),emoji:"🇻🇳",language:["vi","vi-VN"],smsPrice:.27},{phoneCode:"+1284",code:"VG",name:t("virgin_islands_14222"),nationality:t("british_virgin_42963"),emoji:"🇻🇬"},{phoneCode:"+1340",code:"VI",name:t("virgin_islands_12516"),nationality:t("american_virgi_98088"),emoji:"🇻🇮"},{phoneCode:"+681",code:"WF",name:t("wallis_and_futu_93206"),nationality:t("wallisian_or_fu_60327"),emoji:"🇼🇫",smsPrice:.09},{phoneCode:"+212",code:"EH",name:t("western_sahara_02173"),nationality:t("sahrawi_sahraw_96671"),emoji:"🇪🇭",smsPrice:.053},{phoneCode:"+967",code:"YE",name:t("yemen_76340"),nationality:t("yemeni_26632"),emoji:"🇾🇪",language:"ar-YE",smsPrice:.23},{phoneCode:"+260",code:"ZM",name:t("zambia_50513"),nationality:t("zambian_85114"),emoji:"🇿🇲",smsPrice:.324},{phoneCode:"+263",code:"ZW",name:t("zimbabwe_70209"),nationality:t("zimbabwean_42291"),emoji:"🇿🇼",language:"en-ZW",smsPrice:.35}],({name:e})=>m(e)),this.countriesCodes=this.countries.map(({code:e})=>e),this.phoneCodes=this.countries.flatMap(({phoneCode:e})=>z(e))}countryCodeExists(e){return!!e&&void 0!==this.countries.find(t=>t.code===e)}getCountriesIdName(e){const t=this.getDefaultCountryValues(e).user.country;return(0,ho.A)(this.countries.map(({code:e,name:t})=>({id:e,name:t})),({id:e,name:n})=>[e===t?1:2,m(n)])}getNationalitiesIdName(e){const t=this.getDefaultCountryValues(e).user.nationality;return(0,ho.A)(this.countries.map(({code:e,nationality:t})=>({id:e,name:t})),({id:e,name:n})=>[e===t?1:2,m(n)])}getNationality(e){return this.countries.find(t=>t.code===e)?.nationality}getName(e){return this.countries.find(t=>t.code===e)?.name}getDefaultCountryValues(e){let t=this.countries.find(({code:t})=>t===e);if(!t){try{t=this.countries.find(e=>z(e.language||[]).map(e=>e.toLowerCase()).includes(navigator.language.toLowerCase()))}catch{}t||(t=this.countries.find(({code:e})=>"FR"===e))}const n=z(t.language||[]);return{user:{language:n.some(e=>e.toLowerCase().startsWith("fr"))?Ot.Fr:n.some(e=>e.toLowerCase().startsWith("es"))?Ot.Es:n.some(e=>e.toLowerCase().startsWith("de"))?Ot.De:n.some(e=>e.toLowerCase().startsWith("nl"))?Ot.Nl:Ot.En,country:t.code,nationality:t.code},phone:{country:t.code,code:z(t.phoneCode)[0]}}}getSmsPriceByPhone(e){return this.countries.find(t=>z(t.phoneCode).some(t=>e.startsWith(t)))?.smsPrice}};ed=function(e,t,n,i){var a,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(a=e[r])&&(o=(s<3?a(o):s>3?a(t,n,o):a(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o}([(0,En._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[bi])],ed);var td=n(7480);const nd=[Ot.De,Ot.En,Ot.Es,Ot.Fr,Ot.Nl];function id(e){return e===Ot.En?"en-gb":e.toString().toLowerCase()}function ad(e){if(h(e)){const t=(0,td.A)(e.trim().substring(0,2));return nd.includes(t)?t:null}return null}Ot.En.toLowerCase(),Ot.Fr.toLowerCase(),Ot.De.toLowerCase(),Ot.Es.toLowerCase(),Ot.Nl.toLowerCase();const sd=["Africa/Abidjan","Africa/Accra","Africa/Addis_Ababa","Africa/Algiers","Africa/Asmara","Africa/Asmera","Africa/Bamako","Africa/Bangui","Africa/Banjul","Africa/Bissau","Africa/Blantyre","Africa/Brazzaville","Africa/Bujumbura","Africa/Cairo","Africa/Casablanca","Africa/Ceuta","Africa/Conakry","Africa/Dakar","Africa/Dar_es_Salaam","Africa/Djibouti","Africa/Douala","Africa/El_Aaiun","Africa/Freetown","Africa/Gaborone","Africa/Harare","Africa/Johannesburg","Africa/Juba","Africa/Kampala","Africa/Khartoum","Africa/Kigali","Africa/Kinshasa","Africa/Lagos","Africa/Libreville","Africa/Lome","Africa/Luanda","Africa/Lubumbashi","Africa/Lusaka","Africa/Malabo","Africa/Maputo","Africa/Maseru","Africa/Mbabane","Africa/Mogadishu","Africa/Monrovia","Africa/Nairobi","Africa/Ndjamena","Africa/Niamey","Africa/Nouakchott","Africa/Ouagadougou","Africa/Porto-Novo","Africa/Sao_Tome","Africa/Timbuktu","Africa/Tripoli","Africa/Tunis","Africa/Windhoek","America/Adak","America/Anchorage","America/Anguilla","America/Antigua","America/Araguaina","America/Argentina/Buenos_Aires","America/Argentina/Catamarca","America/Argentina/Cordoba","America/Argentina/Jujuy","America/Argentina/La_Rioja","America/Argentina/Mendoza","America/Argentina/Rio_Gallegos","America/Argentina/Salta","America/Argentina/San_Juan","America/Argentina/San_Luis","America/Argentina/Tucuman","America/Argentina/Ushuaia","America/Aruba","America/Asuncion","America/Atikokan","America/Atka","America/Bahia","America/Bahia_Banderas","America/Barbados","America/Belem","America/Belize","America/Blanc-Sablon","America/Boa_Vista","America/Bogota","America/Boise","America/Buenos_Aires","America/Cambridge_Bay","America/Campo_Grande","America/Cancun","America/Caracas","America/Catamarca","America/Cayenne","America/Cayman","America/Chicago","America/Chihuahua","America/Coral_Harbour","America/Cordoba","America/Costa_Rica","America/Creston","America/Cuiaba","America/Curacao","America/Danmarkshavn","America/Dawson","America/Dawson_Creek","America/Denver","America/Detroit","America/Dominica","America/Edmonton","America/Eirunepe","America/El_Salvador","America/Ensenada","America/Fort_Nelson","America/Fort_Wayne","America/Fortaleza","America/Glace_Bay","America/Godthab","America/Goose_Bay","America/Grand_Turk","America/Grenada","America/Guadeloupe","America/Guatemala","America/Guayaquil","America/Guyana","America/Halifax","America/Havana","America/Hermosillo","America/Indiana/Indianapolis","America/Indiana/Knox","America/Indiana/Marengo","America/Indiana/Petersburg","America/Indiana/Tell_City","America/Indiana/Vevay","America/Indiana/Vincennes","America/Indiana/Winamac","America/Indianapolis","America/Inuvik","America/Iqaluit","America/Jamaica","America/Jujuy","America/Juneau","America/Kentucky/Louisville","America/Kentucky/Monticello","America/Kralendijk","America/La_Paz","America/Lima","America/Los_Angeles","America/Louisville","America/Lower_Princes","America/Maceio","America/Managua","America/Manaus","America/Marigot","America/Martinique","America/Matamoros","America/Mazatlan","America/Mendoza","America/Menominee","America/Merida","America/Metlakatla","America/Mexico_City","America/Miquelon","America/Moncton","America/Monterrey","America/Montevideo","America/Montreal","America/Montserrat","America/Nassau","America/New_York","America/Nipigon","America/Nome","America/Noronha","America/North_Dakota/Beulah","America/North_Dakota/Center","America/North_Dakota/New_Salem","America/Ojinaga","America/Panama","America/Pangnirtung","America/Paramaribo","America/Phoenix","America/Port-au-Prince","America/Port_of_Spain","America/Porto_Acre","America/Porto_Velho","America/Puerto_Rico","America/Punta_Arenas","America/Rainy_River","America/Rankin_Inlet","America/Recife","America/Regina","America/Resolute","America/Rio_Branco","America/Rosario","America/Santa_Isabel","America/Santarem","America/Santiago","America/Santo_Domingo","America/Sao_Paulo","America/Scoresbysund","America/Shiprock","America/Sitka","America/St_Barthelemy","America/St_Johns","America/St_Kitts","America/St_Lucia","America/St_Thomas","America/St_Vincent","America/Swift_Current","America/Tegucigalpa","America/Thule","America/Thunder_Bay","America/Tijuana","America/Toronto","America/Tortola","America/Vancouver","America/Virgin","America/Whitehorse","America/Winnipeg","America/Yakutat","America/Yellowknife","Antarctica/Casey","Antarctica/Davis","Antarctica/DumontDUrville","Antarctica/Macquarie","Antarctica/Mawson","Antarctica/Palmer","Antarctica/Rothera","Antarctica/South_Pole","Antarctica/Syowa","Antarctica/Troll","Antarctica/Vostok","Arctic/Longyearbyen","Asia/Aden","Asia/Almaty","Asia/Amman","Asia/Anadyr","Asia/Aqtau","Asia/Aqtobe","Asia/Ashgabat","Asia/Ashkhabad","Asia/Atyrau","Asia/Baghdad","Asia/Bahrain","Asia/Baku","Asia/Bangkok","Asia/Barnaul","Asia/Beirut","Asia/Bishkek","Asia/Brunei","Asia/Calcutta","Asia/Chita","Asia/Choibalsan","Asia/Chongqing","Asia/Chungking","Asia/Colombo","Asia/Dacca","Asia/Damascus","Asia/Dhaka","Asia/Dili","Asia/Dubai","Asia/Dushanbe","Asia/Famagusta","Asia/Gaza","Asia/Harbin","Asia/Hebron","Asia/Ho_Chi_Minh","Asia/Hong_Kong","Asia/Hovd","Asia/Irkutsk","Asia/Istanbul","Asia/Jakarta","Asia/Jayapura","Asia/Jerusalem","Asia/Kabul","Asia/Kamchatka","Asia/Karachi","Asia/Kashgar","Asia/Kathmandu","Asia/Katmandu","Asia/Khandyga","Asia/Kolkata","Asia/Krasnoyarsk","Asia/Kuala_Lumpur","Asia/Kuching","Asia/Kuwait","Asia/Macao","Asia/Macau","Asia/Magadan","Asia/Makassar","Asia/Manila","Asia/Muscat","Asia/Nicosia","Asia/Novokuznetsk","Asia/Novosibirsk","Asia/Omsk","Asia/Oral","Asia/Phnom_Penh","Asia/Pontianak","Asia/Pyongyang","Asia/Qatar","Asia/Qostanay","Asia/Qyzylorda","Asia/Rangoon","Asia/Riyadh","Asia/Saigon","Asia/Sakhalin","Asia/Samarkand","Asia/Seoul","Asia/Shanghai","Asia/Singapore","Asia/Srednekolymsk","Asia/Taipei","Asia/Tashkent","Asia/Tbilisi","Asia/Tehran","Asia/Tel_Aviv","Asia/Thimbu","Asia/Thimphu","Asia/Tokyo","Asia/Tomsk","Asia/Ujung_Pandang","Asia/Ulaanbaatar","Asia/Ulan_Bator","Asia/Urumqi","Asia/Ust-Nera","Asia/Vientiane","Asia/Vladivostok","Asia/Yakutsk","Asia/Yangon","Asia/Yekaterinburg","Asia/Yerevan","Atlantic/Azores","Atlantic/Bermuda","Atlantic/Canary","Atlantic/Cape_Verde","Atlantic/Faeroe","Atlantic/Faroe","Atlantic/Jan_Mayen","Atlantic/Madeira","Atlantic/Reykjavik","Atlantic/South_Georgia","Atlantic/St_Helena","Atlantic/Stanley","Australia/Adelaide","Australia/Brisbane","Australia/Broken_Hill","Australia/Canberra","Australia/Currie","Australia/Darwin","Australia/Eucla","Australia/Hobart","Australia/Lindeman","Australia/Lord_Howe","Australia/Melbourne","Australia/North","Australia/Perth","Australia/Queensland","Australia/South","Australia/Sydney","Australia/Tasmania","Australia/Victoria","Australia/West","Australia/Yancowinna","Brazil/Acre","Brazil/East","Brazil/West","Canada/Atlantic","Canada/Central","Canada/Eastern","Canada/Mountain","Canada/Newfoundland","Canada/Pacific","Canada/Saskatchewan","Canada/Yukon","Chile/Continental","Europe/Amsterdam","Europe/Andorra","Europe/Astrakhan","Europe/Athens","Europe/Belfast","Europe/Belgrade","Europe/Berlin","Europe/Bratislava","Europe/Brussels","Europe/Bucharest","Europe/Budapest","Europe/Busingen","Europe/Chisinau","Europe/Copenhagen","Europe/Dublin","Europe/Gibraltar","Europe/Guernsey","Europe/Helsinki","Europe/Isle_of_Man","Europe/Istanbul","Europe/Jersey","Europe/Kaliningrad","Europe/Kiev","Europe/Kirov","Europe/Lisbon","Europe/Ljubljana","Europe/London","Europe/Luxembourg","Europe/Madrid","Europe/Malta","Europe/Mariehamn","Europe/Minsk","Europe/Monaco","Europe/Moscow","Europe/Nicosia","Europe/Oslo","Europe/Paris","Europe/Podgorica","Europe/Prague","Europe/Riga","Europe/Rome","Europe/Samara","Europe/San_Marino","Europe/Sarajevo","Europe/Saratov","Europe/Simferopol","Europe/Skopje","Europe/Sofia","Europe/Stockholm","Europe/Tallinn","Europe/Tirane","Europe/Tiraspol","Europe/Ulyanovsk","Europe/Uzhgorod","Europe/Vaduz","Europe/Vatican","Europe/Vienna","Europe/Vilnius","Europe/Volgograd","Europe/Warsaw","Europe/Zagreb","Europe/Zaporozhye","Europe/Zurich","Indian/Antananarivo","Indian/Chagos","Indian/Christmas","Indian/Cocos","Indian/Comoro","Indian/Kerguelen","Indian/Mahe","Indian/Maldives","Indian/Mauritius","Indian/Mayotte","Indian/Reunion","Mexico/General","Pacific/Apia","Pacific/Auckland","Pacific/Bougainville","Pacific/Chatham","Pacific/Chuuk","Pacific/Easter","Pacific/Efate","Pacific/Enderbury","Pacific/Fakaofo","Pacific/Fiji","Pacific/Funafuti","Pacific/Galapagos","Pacific/Gambier","Pacific/Guadalcanal","Pacific/Guam","Pacific/Honolulu","Pacific/Johnston","Pacific/Kiritimati","Pacific/Kosrae","Pacific/Kwajalein","Pacific/Majuro","Pacific/Marquesas","Pacific/Midway","Pacific/Nauru","Pacific/Niue","Pacific/Norfolk","Pacific/Noumea","Pacific/Pago_Pago","Pacific/Palau","Pacific/Pitcairn","Pacific/Pohnpei","Pacific/Ponape","Pacific/Port_Moresby","Pacific/Rarotonga","Pacific/Saipan","Pacific/Samoa","Pacific/Tahiti","Pacific/Tarawa","Pacific/Tongatapu","Pacific/Truk","Pacific/Wake","Pacific/Wallis","Pacific/Yap"];const od=["country","code","number"];let rd=class extends vo{countriesService;constructor(e,t){super(e),this.countriesService=t}basePhoneInputDefault(){return{country:"",code:"",number:""}}phoneInputDefault(e){return{...this.basePhoneInputDefault(),...e.phone}}phoneInputSchema(){return fo.Ik().shape({country:fo.Yj().required(this.t("le_num_ro_de_t_76885")).oneOf(this.countriesService.countriesCodes,this.t("le_num_ro_de_t_76885")),code:fo.Yj().required(this.t("le_num_ro_de_t_76885")).oneOf(this.countriesService.phoneCodes,this.t("le_num_ro_de_t_76885")),number:fo.Yj().required(this.t("le_num_ro_de_t_76885"))})}phoneInputSchemaNotRequired(){return fo.Ik().nullable().shape({country:fo.Yj(),code:fo.Yj(),number:fo.Yj()})}};rd=function(e,t,n,i){var a,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(a=e[r])&&(o=(s<3?a(o):s>3?a(t,n,o):a(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o}([(0,En._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[bi,ed])],rd);let dd=class extends vo{countriesService;phoneInputService;constructor(e,t,n){super(n),this.countriesService=e,this.phoneInputService=t}organizationInputDefault(e){const t=this.countriesService.getDefaultCountryValues();return{name:"",adminFirstName:"",adminLastName:"",adminPhone:this.phoneInputService.phoneInputDefault(t),weezeventOrganizationId:e}}organizationInputSchema(e){let t=fo.Ik().shape({name:fo.Yj().required(this.t("le_nom_de_l_org_60618")),adminFirstName:fo.Yj().required(this.t("le_pr_nom_est_r_10935")),adminLastName:fo.Yj().required(this.t("le_nom_est_requ_61536")),adminPhone:this.phoneInputService.phoneInputSchema()});return e||(t=t.shape({termsAccepted:fo.zM().oneOf([!0],this.t("il_est_n_cessai_83896")).required(this.t("il_est_n_cessai_83896"))})),t}createOrganizationSchema(e){return fo.Ik().shape({organization:this.organizationInputSchema(e)})}organizationInfosInputDefault(e){const t=this.countriesService.getDefaultCountryValues();return{name:e.name??"",adminName:e.adminName??"",adminEmail:e.adminEmail??"",street:e.street??"",postalCode:e.postalCode??"",city:e.city??"",country:e.country??t.user.country,timeZone:e.timeZone??$a.c9.local().zoneName,emailSenderId:e.emailSenderId,dateFormat:e.dateFormat,datetimeFormat:e.datetimeFormat,timeFormat:e.timeFormat}}organizationInfosInputSchema(){return fo.Ik().shape({name:fo.Yj().required(this.t("le_nom_de_l_org_60618")),adminName:fo.Yj().required(this.t("le_nom_du_respo_43823")),adminEmail:fo.Yj().required(this.t("l_e_mail_du_rep_90871")).email(this.t("l_e_mail_du_rep_90871")).test("clean-admin-email",this.t("l_e_mail_du_rep_90871"),function(){return Ho(this.parent.adminEmail)}),street:fo.Yj().required(this.t("l_adresse_est_r_40489")),postalCode:fo.Yj().required(this.t("le_code_postal_43189")),city:fo.Yj().required(this.t("la_ville_est_re_35239")),country:fo.Yj().oneOf(this.countriesService.countriesCodes).required(this.t("le_pays_est_req_33749")),emailSenderId:fo.ai().nullable(),dateFormat:fo.Yj().required(this.t("le_format_est_r_17097")),datetimeFormat:fo.Yj().required(this.t("le_format_est_r_17097")),timeFormat:fo.Yj().required(this.t("le_format_est_r_17097"))})}updateOrganizationGeneralSchema(){return fo.Ik().shape({organization:this.organizationInfosInputSchema()})}};dd=function(e,t,n,i){var a,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(a=e[r])&&(o=(s<3?a(o):s>3?a(t,n,o):a(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o}([(0,En._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[ed,rd,bi])],dd);let ld=class extends bo{countriesService;organizationInputService;translationService;constructor(e,t,n){super(n),this.countriesService=e,this.organizationInputService=t,this.translationService=n}eventInputDefault(e){const t=this.countriesService.getDefaultCountryValues();return{name:e?.name??"",description:e?.description??"",startAt:e?.startAt??$a.c9.invalid("Invalid"),endAt:e?.endAt??$a.c9.invalid("Invalid"),languages:e?.languages??[t.user.language],timeZone:e?.timeZone??$a.c9.local().zoneName??"utc",country:e?.country??t.user.country,layer:e?.layer??Xe.Google,latitude:e?.latitude??43.6087733,longitude:e?.longitude??3.87963579999996,emailSenderId:e?.emailSenderId,dayStartTime:e?.dayStartTime??"00:00",tagsIds:e?.tagsIds??[],fields:e?.fields??{},isWeezeventSynchronized:e?.isWeezeventSynchronized??!0,useAccreditations:e?.useAccreditations??!0,useCampaigns:e?.useCampaigns??!0,useDelegations:e?.useDelegations??!0,useDocuments:e?.useDocuments??!0,useForms:e?.useForms??!0,usePositions:e?.usePositions??!0,useWorkflows:e?.useWorkflows??!0,delegationsSpaceLayoutId:e?.delegationsSpaceLayoutId??null,groupsAccesses:(e?.groupsAccesses??[]).map(({groupId:e,roleId:t})=>({groupId:e,roleId:t}))}}eventGroupAccessDefault(){return{groupId:null,roleId:null}}eventInputSchema(){return fo.Ik().shape({name:fo.Yj().required(this.t("nom_de_l_v_nem_58512")),description:fo.Yj(),startAt:Co.required(this.t("la_date_d_but_d_30022")).typeError(this.t("la_date_d_but_d_30022")),endAt:Co.required(this.t("la_date_de_fin_45068")).typeError(this.t("la_date_de_fin_45068")).test("after-start-at",this.t("la_date_de_fin_00429"),function(){return $a.c9.isDateTime(this.parent.startAt)&&this.parent.startAt.isValid&&$a.c9.isDateTime(this.parent.endAt)&&this.parent.endAt.isValid&&this.parent.endAt>=this.parent.startAt}),languages:fo.YO().of(fo.Yj().oneOf(nd,this.t("les_langues_doi_27712"))).required(this.t("les_langues_son_53717")).min(1,this.t("vous_devez_s_le_16610")),timeZone:fo.Yj().required(this.t("le_fuseau_horai_37109")).oneOf(sd,this.t("le_fuseau_horai_37109")),latitude:fo.ai().nullable().typeError(this.t("la_latitude_doi_17800")).min(-90,this.t("la_latitude_doi_17800")).max(90,this.t("la_latitude_doi_17800")),longitude:fo.ai().nullable().typeError(this.t("la_longitude_do_28762")).min(-180,this.t("la_longitude_do_28762")).max(180,this.t("la_longitude_do_28762")),emailSenderId:fo.ai().nullable(),dayStartTime:fo.Yj().required(this.t("l_heure_laque_87748")),isWeezeventSynchronized:fo.zM().required(),usePositions:fo.zM().required(),useAccreditations:fo.zM().required(),useDelegations:fo.zM().required(),useForms:fo.zM().required(),useDocuments:fo.zM().required(),useWorkflows:fo.zM().required(),groupsAccesses:fo.YO().of(fo.Ik().shape({groupId:fo.ai().nullable().required(this.t("vous_devez_s_le_78671")),roleId:fo.ai().nullable().required(this.t("vous_devez_s_le_18837"))}))})}eventOrganizationInputSchema(e){return fo.Ik().shape({event:this.eventInputSchema(),organization:this.organizationInputService.organizationInputSchema(e)})}createUpdateEventSchema(e){const t=this.eventInputSchema();return fo.Ik().shape({event:e?t.shape({fields:e}):t})}};ld=function(e,t,n,i){var a,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(a=e[r])&&(o=(s<3?a(o):s>3?a(t,n,o):a(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o}([(0,En._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[ed,dd,bi])],ld);var cd;let ud=class extends zo{static{cd=this}csvInputService;static IMPORT_COLUMNS_DEFAULT={...zo.IMPORT_COLUMNS_DEFAULT,Name:"name",StartAt:"startAt",EndAt:"endAt",Country:"country",DayStartTime:"dayStartTime",Description:"description",Languages:"languages",Latitude:"latitude",Layer:"layer",Longitude:"longitude",Tags:"tags",TimeZone:"timeZone",IsWeezeventSynchronized:"isWeezeventSynchronized",UseAccreditations:"useAccreditations",UseCampaigns:"useCampaigns",UseDelegations:"useDelegations",UseDocuments:"useDocuments",UseForms:"useForms",UsePositions:"usePositions",UseWorkflows:"useWorkflows"};static IMPORT_COLUMNS_REQUIRED=e=>[...e===Ye.Update?[cd.IMPORT_COLUMNS_DEFAULT.Id]:[],cd.IMPORT_COLUMNS_DEFAULT.Name,cd.IMPORT_COLUMNS_DEFAULT.StartAt,cd.IMPORT_COLUMNS_DEFAULT.EndAt];constructor(e,t){super(e,t),this.csvInputService=e}};ud=cd=function(e,t,n,i){var a,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(a=e[r])&&(o=(s<3?a(o):s>3?a(t,n,o):a(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o}([(0,En._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[ko,bi])],ud);let md=class extends vo{constructor(e){super(e)}settingsDesignInputSchema(){return fo.Ik().shape({title:fo.Yj().required(),intro:fo.Yj()})}settingsInputSchema(){return fo.Ik().shape({events:fo.YO().of(fo.Ik().shape({buttonText:fo.Yj().required(),descriptionText:fo.Yj().max(70,this.t("the_maximum_len_30779",70)),eventId:fo.ai().required(),formId:fo.ai().nullable()}))})}};md=function(e,t,n,i){var a,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(a=e[r])&&(o=(s<3?a(o):s>3?a(t,n,o):a(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o}([(0,En._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[bi])],md);var gd=n(6996),hd=n(7231);let pd=class{translationService;constructor(e){this.translationService=e}now(){return $a.c9.utc()}invalid(){return $a.c9.invalid("Invalid")}toLocaleString(e,t){return e.toLocaleString(t,{locale:id(this.translationService.language)})}};pd=function(e,t,n,i){var a,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(a=e[r])&&(o=(s<3?a(o):s>3?a(t,n,o):a(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o}([(0,En._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[bi])],pd);const fd=$a.c9.fromObject({year:1920,month:1,day:1}),Id=$a.c9.now();function _d(e){if($a.c9.isDateTime(e)&&e?.isValid)return e;if(h(e)){const t=$a.c9.fromISO(e);return t.isValid?t:null}return null}var xd=n(2662);const yd=/^[0-9]{11}$/i,Sd=$a.c9.now().year-2e3;function jd(e){if(h(e)&&yd.test(e)){const t=(0,xd.A)(e.substring(0,2),10);let n=(0,xd.A)(e.substring(0,9),10);const i=(0,xd.A)(e.substring(9),10);return t<=Sd&&(n=2e9+n),i===97-n%97}return!1}let bd=class{countriesService;dateTimeService;translationService;constructor(e,t,n){this.countriesService=e,this.dateTimeService=t,this.translationService=n}getValueString(e,t,n={}){switch(e.fieldType){case Le.Text:return this.getTextValue(e,t);case Le.Textarea:case Le.Time:case Le.Address:return t[e.slug]||"";case Le.Sex:return this.getSexValue(e,t);case Le.Language:return this.getLanguageValue(e,t);case Le.Nationality:return this.getNationalityValue(e,t);case Le.Country:return this.getCountryValue(e,t);case Le.Select:return this.getSelectValue(e,t);case Le.Checkbox:case Le.Validation:return this.getBooleanValue(e,t);case Le.Date:return this.getDateValue(e,t,n.dateFormat);case Le.Datetime:return this.getDatetimeValue(e,t,n.datetimeFormat);case Le.File:return"name"===n.fileReturnValue?t[e.slug]?.name||"":t[e.slug]?.url||"";case Le.Phone:return this.getPhoneValue(e,t);case Le.Number:return this.getIntValue(e,t);default:return ir(e.fieldType)}}getValue(e,t){return t[e.slug]}getSelectValues(e,t){const n=z(this.getValue(e,t)??[]);return(0,po.A)(n.map(t=>e.values.find(e=>e.id===t)?.value))}getSelectCustomFieldValues(e,t){const n=z(this.getValue(e,t)??[]);return(0,po.A)(n.map(t=>e.values.find(e=>e.id===t)))}getTextValue(e,t){const n=this.getValue(e,t);return h(n)?function(e,t){return"firstName"===e.slug||"lastName"===e.slug?_(t):e.fieldSubtype===Ne.Avs?function(e){const t=e.replace(/\D/g,"");return 13===t.length&&t.startsWith("756")?`756.${t.substring(3,7)}.${t.substring(7,11)}.${t.substring(11)}`:e}(t):e.fieldSubtype===Ne.Iban?function(e){const t=e.toUpperCase().trim().replace(/\s+/g,"");return ar.test(t)&&t.length===sr[t.substring(0,2)]?t.match(/.{1,4}/g).join(" "):e}(t):t}(e,n):n||""}getSexValue(e,t){return this.translationService.translate(this.getValue(e,t)??"")}getLanguageValue(e,t){return this.translationService.translate(this.getValue(e,t)??"")}getNationalityValue(e,t){return this.countriesService.getNationality(this.getValue(e,t)??"")??""}getCountryValue(e,t){return this.countriesService.getName(this.getValue(e,t)??"")??""}getBooleanValue(e,t){const n=this.getValue(e,t);return!0===n?this.translationService.translate("oui_54361"):!1===n?this.translationService.translate("non_33516"):""}getDateValue(e,t,n){let i=this.getValue(e,t);return h(i)&&(i=$a.c9.fromISO(i,{zone:"utc"})),$a.c9.isDateTime(i)&&i.isValid?h(n)?i.toFormat(n):this.dateTimeService.toLocaleString(i,Za.DateOnly.MonthLong):""}getDatetimeValue(e,t,n){let i=this.getValue(e,t);return h(i)&&(i=$a.c9.fromISO(i,{zone:"utc"})),$a.c9.isDateTime(i)&&i.isValid?h(n)?i.toFormat(n):this.dateTimeService.toLocaleString(i,Za.DateTime):""}getPhoneValue(e,t){return this.getValue(e,t)?.internationalFormat??""}getIntValue(e,t){return this.getValue(e,t)?.toString()??""}getSelectValue(e,t){const n=z(this.getValue(e,t)??[]);return(0,po.A)(n.map(t=>e.values.find(e=>e.id===t)?.value)).join(", ")}};bd=function(e,t,n,i){var a,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(a=e[r])&&(o=(s<3?a(o):s>3?a(t,n,o):a(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o}([(0,En._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[ed,pd,bi])],bd);const vd=[Le.Country,Le.Language,Le.Nationality,Le.Select];function Ad(e,t,n){if(e.hasCondition&&e.conditionCustomField){const i=n.find(t=>t.id===e.conditionCustomField.id);if(i){if(Ad(i,t,n)){const n=t[e.conditionCustomField.slug];return"boolean"==typeof n&&e.conditionCustomField.fieldType===Le.Checkbox?n===e.conditionValue:!(!vd.includes(e.conditionCustomField.fieldType)||!F(e.conditionValue))&&(0,hd.A)(z(n),e.conditionValue).length>0}return!1}return!1}return!0}const Cd=Za.DateOnly.Numeric,Ed=nd.concat(Hn);let Td=class extends vo{countriesService;dateTimeService;documentInputService;phoneInputService;translationService;constructor(e,t,n,i,a){super(a),this.countriesService=e,this.dateTimeService=t,this.documentInputService=n,this.phoneInputService=i,this.translationService=a}fieldsUpdateInputDefault(e,t,n,i){return Object.fromEntries(t.map(t=>{const a=this.getFieldValue(e,t);return[t.slug,a??this.fieldUpdateInputDefault(t,n,i)]}))}getValidationRuleError(e,t,n){switch(cr(e)){case"text":return h(t)?this.textValidationRuleError(e.name,e.validationRules,t):null;case"number":return"number"==typeof t?this.numberValidationRuleError(e.name,e.validationRules,t):null;case"date":{const i=h(t)||$a.c9.isDateTime(t)?Ka(t):null;return i?.isValid?this.dateValidationRuleError(e.name,e.validationRules,i,n):null}default:return null}}changedFieldsSchema(e,t,n){return fo.Ik().shape(Object.fromEntries(e.filter(({slug:e})=>!(0,gd.A)(n[e],t[e])).map(e=>[e.slug,this.fieldSchema(e,!1)])))}fieldSchema(e,t){const n=t=>t.test("validation-rules","",(t,n)=>{const i=this.getValidationRuleError(e,t);return!i||n.createError({message:i})}),i=(i,a)=>{const s=()=>n(i()),o=()=>n(a());if(e.conditionCustomField)return fo.Ik().when(e.conditionCustomField.slug,([n])=>t&&(e.conditionCustomField.fieldType===Le.Checkbox&&n===e.conditionValue||vd.includes(e.conditionCustomField.fieldType)&&F(e.conditionValue)&&(0,hd.A)(z(n),e.conditionValue).length>0)?s():o());{let e;return e=t?s():o(),e}};switch(e.fieldType){case Le.File:return i(()=>this.documentInputService.documentInputSchema(e.name),()=>this.documentInputService.documentInputSchemaNotRequired());case Le.Phone:return i(()=>this.phoneInputService.phoneInputSchema(),()=>this.phoneInputService.phoneInputSchemaNotRequired());case Le.Text:case Le.Textarea:case Le.Time:case Le.Address:return e.fieldProperty===ke.Eid?i(()=>fo.Yj().required(this.t("_1_est_requis_99856",e.name)).typeError(this.t("_1_est_requis_99856",e.name)).test("valid-eid",this.t("le_num_ro_de_re_71488"),e=>!(!h(e)||12!==e.length||!e.startsWith("********"))||jd(e)),()=>fo.Yj()):e.fieldSubtype!==Ne.Freeform?i(()=>fo.Yj().required(this.t("_1_est_requis_99856",e.name)).typeError(this.t("_1_est_requis_99856",e.name)).test("valid-eid",this.t("_1_n_est_pas_a_14932",e.name),t=>{if(h(t)&&12===t.length&&t.startsWith("********"))return!0;switch(e.fieldSubtype){case Ne.Eid:return jd(t);case Ne.Avs:return function(e){if(h(e)){const t=e.replace(/\D/g,"");if(13===t.length&&t.startsWith("756")){const e=t.substring(0,12).split("").reduce((e,t,n)=>n%2==0?e+Number(t):e+3*Number(t),0)%10;return(0===e?0:10-e)===Number(t[12])}return!1}return!1}(t);case Ne.Iban:return function(e){if(h(e)){const t=e.toUpperCase().trim().replace(/\s+/g,"");if(ar.test(t)){const e=t.substring(0,2);if(t.length===sr[e]){const e=`${t.substring(4)}${t.substring(0,4)}`;let n="";for(const t of e)n=/[A-Z]/.test(t)?`${n}${t.charCodeAt(0)-55}`:`${n}${t}`;return BigInt(n)%97n==1n}return!1}return!1}return!1}(t);case Ne.Freeform:return!0;default:return ir(e.fieldSubtype)}}),()=>fo.Yj()):i(()=>fo.Yj().required(this.t("_1_est_requis_99856",e.name)).typeError(this.t("_1_est_requis_99856",e.name)),()=>fo.Yj());case Le.Number:return i(()=>fo.ai().required(this.t("_1_est_requis_99856",e.name)).typeError(this.t("_1_est_requis_99856",e.name)),()=>fo.ai().nullable());case Le.Checkbox:return i(()=>fo.zM().required(this.t("_1_est_requis_99856",e.name)).typeError(this.t("_1_est_requis_99856",e.name)),()=>fo.zM());case Le.Validation:return i(()=>fo.zM().required(this.t("_1_est_requis_99856",e.name)).typeError(this.t("_1_est_requis_99856",e.name)).oneOf([!0],this.t("_1_doit_obliga_82862",e.name)),()=>fo.zM());case Le.Select:return e.canSelectMultiple?i(()=>fo.YO().of(fo.ai().required()).required(this.t("_1_est_requis_99856",e.name)).min(1,this.t("vous_devez_s_le_55757",e.name)),()=>fo.YO().of(fo.ai())):i(()=>fo.ai().oneOf(e.values.map(({id:e})=>e),this.oneOfMessage(e.name,e.values.map(({value:e})=>e))).required(this.t("_1_est_requis_99856",e.name)).typeError(this.t("_1_est_requis_99856",e.name)),()=>fo.ai().oneOf(e.values.map(({id:e})=>e),this.oneOfMessage(e.name,e.values.map(({value:e})=>e))));case Le.Date:case Le.Datetime:return e.fieldProperty===ke.DateOfBirth?i(()=>Co.required(this.t("_1_est_requis_99856",e.name)).typeError(this.t("la_date_est_inv_22002",e.name)).test("valid-date-of-birth",this.t("la_date_de_nais_19129"),e=>!(!$a.c9.isDateTime(e)||!e.isValid)&&e>=fd&&e<=Id),()=>fo.gl().nullable().test("valid-date-of-birth",this.t("la_date_de_nais_19129"),e=>!$a.c9.isDateTime(e)||!e.isValid||e>=fd&&e<=Id)):i(()=>Co.required(this.t("_1_est_requis_99856",e.name)).typeError(this.t("la_date_est_inv_22002",e.name)),()=>fo.gl().nullable());case Le.Sex:return i(()=>fo.Yj().oneOf(ci,this.oneOfMessage(e.name,ci)).required(this.t("_1_est_requis_99856",e.name)).typeError(this.t("_1_est_requis_99856",e.name)),()=>fo.Yj().oneOf(ci,this.oneOfMessage(e.name,ci)));case Le.Language:return i(()=>fo.Yj().oneOf(Ed,this.oneOfMessage(e.name,Ed)).required(this.t("_1_est_requis_99856",e.name)).typeError(this.t("_1_est_requis_99856",e.name)),()=>fo.Yj().oneOf(Ed,this.oneOfMessage(e.name,Ed)));case Le.Nationality:case Le.Country:return i(()=>fo.Yj().oneOf(this.countriesService.countriesCodes,this.oneOfMessage(e.name,this.countriesService.countriesCodes)).required(this.t("_1_est_requis_99856",e.name)).typeError(this.t("_1_est_requis_99856",e.name)),()=>fo.Yj().oneOf(this.countriesService.countriesCodes,this.oneOfMessage(e.name,this.countriesService.countriesCodes)));default:return ir(e.fieldType)}}textValidationRuleError(e,t,n){if("regex"===t.mode)return h(t.regex)&&!new RegExp(t.regex).test(n)?t.regexMessage||this.t("_1_n_a_pas_le_68593",e):null;if(t.noLeadingTrailingSpaces&&n!==n.trim())return this.t("_1_ne_doit_pas_16247",e);if(t.noSpaces&&/\s/.test(n))return this.t("_1_ne_doit_pas_30149",e);if("number"==typeof t.minLength&&n.lengtht.maxLength)return this.t("_1_doit_conten_24426",e,t.maxLength);switch(t.allowedCharacters){case"numbers":return/^[0-9.,]*$/.test(n)?null:this.t("_1_ne_doit_con_32219",e);case"noSymbols":return/^[\p{L}\p{N}\s]*$/u.test(n)?null:this.t("_1_ne_doit_con_83191",e);case"uppercase":return n===n.toLocaleUpperCase()?null:this.t("_1_ne_doit_con_44580",e);case"lowercase":return n===n.toLocaleLowerCase()?null:this.t("_1_ne_doit_con_13605",e);default:return null}}numberValidationRuleError(e,t,n){return"number"==typeof t.min&&nt.max?this.t("_1_doit_tre_i_05381",e,t.max):null}dateValidationRuleError(e,t,n,i){const a=n.toISODate();if("past"===t.range)return a>$a.c9.now().setZone(i??n.zone).toISODate()?this.t("_1_doit_tre_u_03177",e):null;if("between"===t.range){const n=t.start?Ka(t.start):null,i=t.end?Ka(t.end):null;return n?.isValid&&ai.toISODate()?this.t("_1_doit_tre_c_56697",e,n?this.dateTimeService.toLocaleString(n,Cd):"",i?this.dateTimeService.toLocaleString(i,Cd):""):null}return null}fieldUpdateInputDefault(e,t,n){switch(e.fieldType){case Le.Checkbox:case Le.Validation:return!!n&&void 0;case Le.File:return this.documentInputService.documentInputDefault();case Le.Phone:return this.phoneInputService.phoneInputDefault(t);case Le.Select:return e.canSelectMultiple?[]:void 0;case Le.Address:case Le.Date:case Le.Datetime:case Le.Language:case Le.Number:case Le.Sex:case Le.Text:case Le.Textarea:case Le.Time:return;case Le.Country:return t.user.country;case Le.Nationality:return t.user.nationality;default:return ir(e.fieldType)}}getFieldValue(e,t){const n=e[t.slug];return t.fieldType===Le.Phone&&n?(0,D.A)(n,od):t.fieldType===Le.File?(0,D.A)(n,mr):t.fieldType===Le.Date&&n?$a.c9.fromISO(n,{zone:"UTC"}):n}};Td=function(e,t,n,i){var a,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(a=e[r])&&(o=(s<3?a(o):s>3?a(t,n,o):a(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o}([(0,En._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[ed,pd,gr,rd,bi])],Td);let Rd=class extends vo{documentInputService;archiveInputService;constructor(e,t,n){super(n),this.documentInputService=e,this.archiveInputService=t}default(){return{input:{archive:this.documentInputService.documentInputDefault(),fieldId:-1}}}schema(){return fo.Ik().shape({input:fo.Ik().shape({archive:this.archiveInputService.schema(),fieldId:fo.Yj().required(this.t("le_champ_person_80074")).typeError(this.t("le_champ_person_80074"))})})}};Rd=function(e,t,n,i){var a,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(a=e[r])&&(o=(s<3?a(o):s>3?a(t,n,o):a(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o}([(0,En._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[gr,Vo,bi])],Rd);let Md=class extends Wo{constructor(e){super(e)}step1Schema(){return fo.Ik().shape({email:this.email()})}step2Schema(){return fo.Ik().shape({email:this.email(),code:this.code(),password:this.passwordRules()})}};Md=function(e,t,n,i){var a,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(a=e[r])&&(o=(s<3?a(o):s>3?a(t,n,o):a(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o}([(0,En._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[bi])],Md);let Dd=class extends vo{constructor(e){super(e)}formInputDefault(){return{name:""}}formInputSchema(){return fo.Ik().shape({name:fo.Yj().required(this.t("le_nom_est_requ_61536"))})}createFormSchema(){return fo.Ik().shape({form:this.formInputSchema()})}};Dd=function(e,t,n,i){var a,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(a=e[r])&&(o=(s<3?a(o):s>3?a(t,n,o):a(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o}([(0,En._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[bi])],Dd);let Od=class extends vo{constructor(e){super(e)}formParametersAccreditationsInputDefault(e){return{accreditationDisplay:e?.accreditationDisplay||St.None,accreditationFilter:e?.accreditationFilter||vt.None,hiddenAccreditationsCategoriesIds:e?.hiddenAccreditationsCategoriesIds||[],hiddenAccreditationsIds:e?.hiddenAccreditationsIds||[],hiddenAccreditationsSlotsIds:e?.hiddenAccreditationsSlotsIds||[],displayedAccreditationsCategoriesIds:e?.displayedAccreditationsCategoriesIds||[],displayedAccreditationsIds:e?.displayedAccreditationsIds||[],displayedAccreditationsSlotsIds:e?.displayedAccreditationsSlotsIds||[],showFullAccreditation:e?.showFullAccreditation??!0,showAccreditationDescription:e?.showAccreditationDescription??!1,accreditationTitle:e?.accreditationTitle||"",accreditationSubtitle:e?.accreditationSubtitle||""}}formParametersAccreditationsInputSchema(){return fo.Ik().shape({accreditationDisplay:fo.Yj().required(this.t("la_strat_gie_d_70458")).oneOf(ai,this.t("la_strat_gie_d_70458")),accreditationFilter:fo.Yj().required(this.t("la_strat_gie_de_28051")).oneOf(ri,this.t("la_strat_gie_de_28051")),hiddenAccreditationsIds:fo.YO().of(fo.ai()),showFullAccreditation:fo.zM().required(),showAccreditationDescription:fo.zM().required(),accreditationTitle:fo.Yj(),accreditationSubtitle:fo.Yj()})}updateFormParametersAccreditationsSchema(){return fo.Ik().shape({form:this.formParametersAccreditationsInputSchema()})}};Od=function(e,t,n,i){var a,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(a=e[r])&&(o=(s<3?a(o):s>3?a(t,n,o):a(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o}([(0,En._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[bi])],Od);let wd=class extends vo{constructor(e){super(e)}formParametersAvailabilitiesInputDefault(e){return{slotDisplay:e?.slotDisplay||At.Hide,minNumberOfSlots:e?.minNumberOfSlots??1,daysDisplay:e?.daysDisplay||jt.AllDays,customSlotsPeriods:(e?.customSlotsPeriods??[]).map(e=>(0,Pi.A)(e,["id","conditionCustomField"])),slotTitle:e?.slotTitle||"",slotSubtitle:e?.slotSubtitle||""}}formParametersAvailabilitiesInputSchema(){return fo.Ik().shape({slotDisplay:fo.Yj().required(this.t("la_strat_gie_d_34961")).oneOf(di,this.t("la_strat_gie_d_34961")),daysDisplay:fo.Yj().required(this.t("la_strat_gie_de_56435")).oneOf(si,this.t("la_strat_gie_de_56435"))})}updateFormParametersAvailabilitiesSchema(){return fo.Ik().shape({form:this.formParametersAvailabilitiesInputSchema()})}};wd=function(e,t,n,i){var a,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(a=e[r])&&(o=(s<3?a(o):s>3?a(t,n,o):a(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o}([(0,En._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[bi])],wd);let Pd=class extends vo{constructor(e){super(e)}formParametersBroadcastInputDefault(e){return{segmentsIds:(e?.segments??[]).map(e=>e.segmentId),noAccessTitle:e?.noAccessTitle||"",noAccessMessage:e?.noAccessMessage||""}}formParametersBroadcastInputSchema(){return fo.Ik().shape({segmentsIds:fo.YO().of(fo.ai())})}updateFormParametersBroadcastSchema(){return fo.Ik().shape({form:this.formParametersBroadcastInputSchema()})}};Pd=function(e,t,n,i){var a,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(a=e[r])&&(o=(s<3?a(o):s>3?a(t,n,o):a(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o}([(0,En._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[bi])],Pd);let $d=class extends vo{constructor(e){super(e)}formParametersGeneralInputDefault(e){return{name:e?.name??"",setAssignmentStateToWaiting:e?.setAssignmentStateToWaiting??!1,setAccreditationStateToWaiting:e?.setAccreditationStateToWaiting??!1,allowMultiProfiles:e?.allowMultiProfiles??!1,canRefill:e?.canRefill??!1,description:e?.description||"",successTitle:e?.successTitle||"",successMessage:e?.successMessage||"",customFields:e?.customFields||[],areTeamsAllowed:e?.areTeamsAllowed??!1,maxTeamMembers:e?.maxTeamMembers,teamMemberFillFullForm:e?.teamMemberFillFullForm??!0,emailTitle:e?.emailTitle||"",informationTitle:e?.informationTitle||"",registerButtonText:e?.registerButtonText||"",isEditableInMemberSpace:e?.isEditableInMemberSpace??!0,ticketUrl:e?.ticketUrl||""}}formParametersGeneralInputSchema(){return fo.Ik().shape({name:fo.Yj().required(this.t("le_nom_est_requ_61536")),allowMultiProfiles:fo.zM().required(),setAssignmentStateToWaiting:fo.zM().required(),setAccreditationStateToWaiting:fo.zM().required(),description:fo.Yj(),successTitle:fo.Yj(),successMessage:fo.Yj(),areTeamsAllowed:fo.zM().required(),maxTeamMembers:fo.ai().nullable(),teamMemberFillFullForm:fo.zM().required(),informationTitle:fo.Yj(),registerButtonText:fo.Yj(),ticketUrl:fo.Yj().test("valid-ticket-url",this.t("le_lien_doit_co_30275"),e=>!h(e)||e.startsWith("https://"))})}updateFormParametersGeneralSchema(){return fo.Ik().shape({form:this.formParametersGeneralInputSchema()})}};$d=function(e,t,n,i){var a,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(a=e[r])&&(o=(s<3?a(o):s>3?a(t,n,o):a(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o}([(0,En._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[bi])],$d);let kd=class extends vo{constructor(e){super(e)}formParametersMissionsInputDefault(e){return{positionDisplay:e?.positionDisplay||bt.None,positionFilter:e?.positionFilter||vt.FilterWithSlots,positionRanking:e?.positionRanking||Ge.Unranked,positionLimit:e?.positionLimit||3,hiddenPositionsCategoriesIds:e?.hiddenPositionsCategoriesIds||[],hiddenPositionsIds:e?.hiddenPositionsIds||[],hiddenPositionsSlotsIds:e?.hiddenPositionsSlotsIds||[],hiddenPositionsTagsIds:e?.hiddenPositionsTagsIds||[],displayedPositionsCategoriesIds:e?.displayedPositionsCategoriesIds||[],displayedPositionsIds:e?.displayedPositionsIds||[],displayedPositionsSlotsIds:e?.displayedPositionsSlotsIds||[],displayedPositionsTagsIds:e?.displayedPositionsTagsIds||[],showFullPosition:e?.showFullPosition??!0,showPositionCategoryDescription:e?.showPositionCategoryDescription??!1,showPositionDescription:e?.showPositionDescription??!1,positionTitle:e?.positionTitle||"",positionSubtitle:e?.positionSubtitle||"",willAutoAssign:e?.willAutoAssign??!1}}formParametersMissionsInputSchema(){return fo.Ik().shape({positionDisplay:fo.Yj().required(this.t("la_strat_gie_d_44170")).oneOf(oi,this.t("la_strat_gie_d_44170")),positionFilter:fo.Yj().required(this.t("la_strat_gie_de_13294")).oneOf(ri,this.t("la_strat_gie_de_13294")),positionRanking:fo.Yj().required(this.t("le_type_de_clas_66819")).oneOf(Vn,this.t("le_type_de_clas_66819")),positionLimit:fo.ai().required(this.t("le_nombre_maxim_38249")).min(1,this.t("le_nombre_de_ch_27910")),hiddenPositionsCategoriesIds:fo.YO().of(fo.ai()),hiddenPositionsIds:fo.YO().of(fo.ai()),hiddenPositionsSlotsIds:fo.YO().of(fo.ai()),hiddenPositionsTagsIds:fo.YO().of(fo.ai()),displayedPositionsCategoriesIds:fo.YO().of(fo.ai()),displayedPositionsIds:fo.YO().of(fo.ai()),displayedPositionsSlotsIds:fo.YO().of(fo.ai()),displayedPositionsTagsIds:fo.YO().of(fo.ai()),showFullPosition:fo.zM().required(),showPositionCategoryDescription:fo.zM().required(),showPositionDescription:fo.zM().required(),positionTitle:fo.Yj(),positionSubtitle:fo.Yj(),willAutoAssign:fo.zM().required()})}updateFormParametersMissionsSchema(){return fo.Ik().shape({form:this.formParametersMissionsInputSchema()})}};kd=function(e,t,n,i){var a,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(a=e[r])&&(o=(s<3?a(o):s>3?a(t,n,o):a(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o}([(0,En._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[bi])],kd);let Nd=class extends vo{constructor(e){super(e)}formParametersStateInputDefault(e){return{state:e?.state||We.Open,closedTitle:e?.closedTitle||"",closedMessage:e?.closedMessage||"",closedAt:e?.closedAt||null}}formParametersStateInputSchema(){return fo.Ik().shape({state:fo.Yj().required(this.t("cl_turer_le_for_10541")).oneOf(Wn,this.t("cl_turer_le_for_10541")),closedMessage:fo.Yj(),closedAt:Co.when("state",{is:We.ClosedAt,then:e=>e.required(this.t("la_date_de_cl_t_63358")).typeError(this.t("la_date_de_cl_t_63358")),otherwise:e=>e.nullable()})})}updateFormParametersStateSchema(){return fo.Ik().shape({form:this.formParametersStateInputSchema()})}};Nd=function(e,t,n,i){var a,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(a=e[r])&&(o=(s<3?a(o):s>3?a(t,n,o):a(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o}([(0,En._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[bi])],Nd);let Ld=class extends vo{countriesService;documentInputService;fieldInputService;phoneInputService;constructor(e,t,n,i,a){super(e),this.countriesService=t,this.documentInputService=n,this.fieldInputService=i,this.phoneInputService=a}userInfoUpdateInputDefault(e,t,n={}){const i=this.countriesService.getDefaultCountryValues(n.countryCode);return{id:e?.id??null,fields:this.fieldInputService.fieldsUpdateInputDefault(e?.fields||{},t,i,n.checkboxDefaultEmpty)}}updateUserInfoChangedFieldsSchema(e,t,n){return fo.Ik().shape({userInfo:fo.Ik().shape({fields:this.fieldInputService.changedFieldsSchema(e,t,n)})})}formUserInfoInputSchema(e){return fo.Ik().shape({fields:fo.Ik().shape(Object.fromEntries(e.map(({isMandatory:e,customField:t})=>[t.slug,this.fieldInputService.fieldSchema(t,e)])))})}userInfoProfileInputDefault(e){const t=this.countriesService.getDefaultCountryValues();return{email:e.email,fields:{firstName:e.userInfo?.fields?.firstName??"",lastName:e.userInfo?.fields?.lastName??"",language:e.language??e.userInfo?.fields?.language??t.user.language??Ot.En,picture:e.userInfo.fields.picture?(0,D.A)(e.userInfo.fields.picture,mr):this.documentInputService.documentInputDefault(),phone:e.userInfo.fields.phone?(0,D.A)(e.userInfo.fields.phone,od):this.phoneInputService.phoneInputDefault(t)}}}userInfoFields(){return{fields:fo.Ik().shape({firstName:fo.Yj().nullable(),lastName:fo.Yj().nullable(),picture:this.documentInputService.documentInputSchemaNotRequired(),language:fo.Yj().required(this.t("les_langues_doi_27712")).oneOf(nd,this.t("les_langues_doi_27712")),phone:this.phoneInputService.phoneInputSchemaNotRequired()})}}userInfoProfileInputSchema(){return fo.Ik().shape({email:fo.Yj().email(this.t("l_e_mail_est_re_04856")).required(this.t("l_e_mail_est_re_04856")),...this.userInfoFields()})}updateProfileSchema(){return fo.Ik().shape({userInfo:this.userInfoProfileInputSchema()})}userInfoAndTermsInputDefault(e){return{...(0,Pi.A)(e.userInfo,["id"]),termsAccepted:!1}}userInfoAndTermsInputSchema(){return fo.Ik().shape({firstName:fo.Yj().nullable(),lastName:fo.Yj().nullable(),phone:this.phoneInputService.phoneInputSchemaNotRequired(),termsAccepted:fo.zM().oneOf([!0],this.t("il_est_n_cessai_83896")).required(this.t("il_est_n_cessai_83896"))})}updateUserInfoAndTermsSchema(){return fo.Ik().shape({userInfoAndTerms:this.userInfoAndTermsInputSchema()})}};Ld=function(e,t,n,i){var a,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(a=e[r])&&(o=(s<3?a(o):s>3?a(t,n,o):a(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o}([(0,En._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[bi,ed,gr,Td,rd])],Ld);let zd=class extends vo{constructor(e){super(e)}volunteersRegistrationsSlotInputDefault(e){return{startDate:e||$a.c9.invalid("Invalid"),startTime:"",endDate:e||$a.c9.invalid("Invalid"),endTime:""}}volunteersRegistrationsSlotInputSchema(e,t){const n=t.plus({day:1}).endOf("day");return fo.Ik().shape({startDate:Co.required(this.t("la_date_de_d_bu_05030")).typeError(this.t("la_date_de_d_bu_05030")).test("after-event-start-date",this.t("la_date_de_d_bu_68630",e.toLocaleString()),t=>t>=e),startTime:fo.Yj().required(this.t("heure_de_d_but_90785")),endDate:Co.required(this.t("la_date_de_fin_32246")).typeError(this.t("la_date_de_fin_32246")).test("after-start-date",this.t("la_date_de_fin_00429"),(e,t)=>$a.c9.isDateTime(t.parent.startDate)&&t.parent.startDate.isValid&&$a.c9.isDateTime(t.parent.endDate)&&t.parent.endDate.isValid&&t.parent.endDate>=t.parent.startDate).test("before-event-end-date",this.t("la_date_de_fin_49125",t.toLocaleString()),e=>e<=n),endTime:fo.Yj().required(this.t("l_heure_de_fin_78626"))})}};zd=function(e,t,n,i){var a,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(a=e[r])&&(o=(s<3?a(o):s>3?a(t,n,o):a(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o}([(0,En._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[bi])],zd);let Fd=class extends vo{translationService;volunteerRegistrationSlotInputService;constructor(e,t){super(e),this.translationService=e,this.volunteerRegistrationSlotInputService=t}slotsFields(e,t,n,i,a){switch(e){case At.Display:case At.DisplayDays:case At.Calendar:case At.Custom:return{slots:fo.YO().of(this.volunteerRegistrationSlotInputService.volunteersRegistrationsSlotInputSchema(n,i)).min(a?0:t,this.t("vous_devez_ajou_68961",t))};case At.Hide:return{};default:return ir()}}volunteersRegistrationsSlotsUpdateInputDefault(e){return F(e)?e.map(e=>({startDate:e.startDate,startTime:e.startTime,endDate:e.endDate,endTime:e.endTime})):[]}volunteersRegistrationsWishedPositionsInputDefault(){return{positionsCategoriesIds:[],positionsIds:[],positionsSlotsIds:[]}}volunteersRegistrationsWishedPositionsUpdateInputDefault(e){return e?{positionsCategoriesIds:e?.positionsCategoriesIds,positionsIds:e?.positionsIds,positionsSlotsIds:e?.positionsSlotsIds}:this.volunteersRegistrationsWishedPositionsInputDefault()}wishedPositionsFields(e,t,n){if(e===Ge.Ranked){if(t===bt.Category)return{positionsCategoriesIds:fo.YO().of(fo.ai().typeError(this.t("s_lectionner_un_26253"))).min(n?0:1,this.t("vous_devez_s_le_32044")).test("different",this.t("les_missions_so_04441"),e=>{const t=(0,po.A)((e||[]).filter(e=>-1!==e));return F(t)&&(0,Na.A)(t).length===t.length})};if(t===bt.Position)return{positionsIds:fo.YO().of(fo.ai().typeError(this.t("s_lectionner_un_26253"))).min(n?0:1,this.t("vous_devez_s_le_89603")).test("different",this.t("les_missions_so_04441"),e=>{const t=(0,po.A)((e||[]).filter(e=>-1!==e));return F(t)&&(0,Na.A)(t).length===t.length})};if(t===bt.Slot)return{positionsSlotsIds:fo.YO().of(fo.ai().typeError(this.t("s_lectionner_un_26253"))).min(n?0:1,this.t("vous_devez_s_le_89603")).test("different",this.t("les_missions_so_04441"),e=>{const t=(0,po.A)((e||[]).filter(e=>-1!==e));return F(t)&&(0,Na.A)(t).length===t.length})};throw new Error("Should not happen")}switch(t){case bt.Category:return{positionsCategoriesIds:fo.YO().of(fo.ai().typeError(this.t("s_lectionner_un_26253"))).min(n?0:1,this.t("vous_devez_s_le_32044"))};case bt.Position:return{positionsIds:fo.YO().of(fo.ai().typeError(this.t("s_lectionner_un_26253"))).min(n?0:1,this.t("vous_devez_s_le_89603"))};case bt.Slot:return{positionsSlotsIds:fo.YO().of(fo.ai()).min(n?0:1,this.t("vous_devez_s_le_89603"))};case bt.None:return{};default:return ir()}}volunteersRegistrationsWishedAccreditationsInputDefault(){return{accreditationsSlotsIds:[]}}volunteersRegistrationsWishedAccreditationsUpdateInputDefault(e){return e?{accreditationProfileId:e.accreditationProfileId,accreditationsSlotsIds:e.accreditationsSlotsIds}:this.volunteersRegistrationsWishedAccreditationsInputDefault()}accreditationProfileFields(e,t){return e&&F(t)?{accreditationProfileId:fo.ai().required(this.t("vous_devez_s_le_07918"))}:{}}accreditationsFields(e,t,n){if(t)return{};switch(e){case St.Accreditation:return{accreditationsSlotsIds:fo.YO().of(fo.ai().typeError(this.t("s_lectionner_un_96571"))).min(n?0:1,this.t("vous_devez_s_le_72138"))};case St.None:return{};default:return ir()}}userInfoAccreditationsSchema(e){return fo.Ik().shape({userInfo:fo.Ik().shape({accreditations:fo.YO().of(fo.Ik().shape({formId:fo.ai().required(),...this.accreditationsFields(e,null)}))})})}adminAddSchema(){return fo.Ik().shape({usersInfosIds:fo.YO().of(fo.ai()).min(1,this.t("vous_devez_s_le_83608")),sendVolunteerRegistrationEmail:fo.zM().required()})}};Fd=function(e,t,n,i){var a,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(a=e[r])&&(o=(s<3?a(o):s>3?a(t,n,o):a(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o}([(0,En._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[bi,zd])],Fd);let Ud=class extends vo{fieldInputService;userInfoInputService;volunteerRegistrationInputService;volunteerRegistrationSlotInputService;constructor(e,t,n,i,a){super(e),this.fieldInputService=t,this.userInfoInputService=n,this.volunteerRegistrationInputService=i,this.volunteerRegistrationSlotInputService=a}formRegisterInputDefault(e,t,n,i){return{autoAccredit:!1,forOther:i.forOther,positionsSlotsIds:i.team?.positionsSlotsIds??[],positionsIds:i.team?.positionsIds??[],positionsCategoriesIds:i.team?.positionsCategoriesIds??[],accreditationProfileId:null,accreditationsSlotsIds:(i.delegationAccreditationsSlots??[]).filter(e=>e.isDefault).map(e=>e.accreditationSlotId),userInfo:this.userInfoInputService.userInfoUpdateInputDefault(t,n,{countryCode:i.countryCode}),sendNotificationEmail:i.sendNotificationEmail,slots:i.team?.slots??(i.slotDisplay===At.Display?[this.volunteerRegistrationSlotInputService.volunteersRegistrationsSlotInputDefault(i.eventStartDate)]:[]),source:e}}formRegisterInformationsSchema(e){return fo.Ik().shape({formRegister:fo.Ik().shape({userInfo:this.userInfoInputService.formUserInfoInputSchema(e)})})}formRegisterSlotsSchema(e,t,n,i){return fo.Ik().shape({formRegister:fo.Ik().shape({...this.volunteerRegistrationInputService.slotsFields(e,t,n,i)})})}formRegisterPositionsSchema(e,t){return fo.Ik().shape({formRegister:fo.Ik().shape({...this.volunteerRegistrationInputService.wishedPositionsFields(e,t)})})}formRegisterAccreditationsSchema(e,t,n,i){const a=function(e){return Object.values(e.reduce((e,t)=>{if(e[t.customField.slug]){const n=e[t.customField.slug];return{...e,[t.customField.slug]:{accreditationsSlotsIds:n.accreditationsSlotsIds.concat(t.accreditationsSlotsIds),customField:t.customField,isMandatory:n.isMandatory||t.isMandatory}}}return{...e,[t.customField.slug]:{accreditationsSlotsIds:t.accreditationsSlotsIds,customField:t.customField,isMandatory:t.isMandatory}}},{}))}(n);return fo.Ik().shape({formRegister:fo.Ik().shape({...this.volunteerRegistrationInputService.accreditationsFields(e,i),userInfo:fo.Ik().shape({fields:fo.Ik().shape(Object.fromEntries(a.map(e=>{const n=e.isMandatory&&F((0,hd.A)(e.accreditationsSlotsIds,t));return[e.customField.slug,this.fieldInputService.fieldSchema(e.customField,n)]})))})})})}formRegisterSchema(e,{accreditationDisplay:t,areSectionsDisabled:n,delegationAccreditationsProfiles:i,delegationId:a,eventEndDate:s,eventStartDate:o,minNumberOfSlots:r,positionDisplay:d,positionRanking:l,slotDisplay:c}){return fo.Ik().shape({email:fo.Yj().required(this.t("l_e_mail_est_re_04856")).email(this.t("l_e_mail_est_re_04856")),formRegister:fo.Ik().shape({userInfo:this.userInfoInputService.formUserInfoInputSchema(e),...this.volunteerRegistrationInputService.slotsFields(c,r,o,s,n?.isWishedAssignmentsDisabled),...this.volunteerRegistrationInputService.wishedPositionsFields(l,d,n?.isWishedAssignmentsDisabled),...this.volunteerRegistrationInputService.accreditationsFields(t,a,n?.isWishedAccreditationsDisabled),...this.volunteerRegistrationInputService.accreditationProfileFields(a,i)})})}};Ud=function(e,t,n,i){var a,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(a=e[r])&&(o=(s<3?a(o):s>3?a(t,n,o):a(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o}([(0,En._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[bi,Td,Ld,Fd,zd])],Ud);let Bd=class extends vo{constructor(e){super(e)}default(e){return{name:e?.name??"",description:e?.description??"",usersInfosIds:(e?.members??[]).map(({id:e})=>e),eventsAccesses:(e?.accesses??[]).filter(e=>e.scope===Ct.Event&&e.eventId).map(e=>({eventId:e.eventId,roleId:e.roleId}))}}eventAccessDefault(){return{eventId:null,roleId:null}}schema(){return fo.Ik().shape({group:fo.Ik().shape({name:fo.Yj().required(this.t("le_nom_est_requ_61536")),description:fo.Yj(),usersInfosIds:fo.YO().of(fo.ai()).required(),eventsAccesses:fo.YO().of(fo.Ik().shape({eventId:fo.ai().nullable().required(this.t("vous_devez_s_le_61092")),roleId:fo.ai().nullable().required(this.t("vous_devez_s_le_18837"))})).required()}).required()}).required()}};Bd=function(e,t,n,i){var a,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(a=e[r])&&(o=(s<3?a(o):s>3?a(t,n,o):a(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o}([(0,En._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[bi])],Bd);let Gd=class extends vo{translationService;constructor(e){super(e),this.translationService=e}step1Schema(){return fo.Ik().shape({[this.inputName]:fo.Ik().shape(this.step1Fields())})}step2Schema(){return fo.Ik().shape({[this.inputName]:fo.Ik().shape(this.step2Fields())})}schema(){return fo.Ik().shape({...this.step1Fields(),...this.step2Fields()})}strategyField(e=Qn){return fo.Yj().required(this.t("la_strat_gie_es_82287")).oneOf(e,this.t("la_strat_gie_es_82287"))}};Gd=function(e,t,n,i){var a,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(a=e[r])&&(o=(s<3?a(o):s>3?a(t,n,o):a(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o}([(0,En._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[bi])],Gd);let Vd=class extends Gd{translationService;inputName="massAccredit";constructor(e){super(e),this.translationService=e}step1Fields(){return{strategy:this.strategyField()}}step2Fields(){return{accreditationsSlotsIds:fo.YO().of(fo.ai()).required(this.t("vous_devez_s_le_72138")).when("accreditationProfile",{is:e=>!e,then:e=>e.min(1,this.t("vous_devez_s_le_72138"))})}}};Vd=function(e,t,n,i){var a,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(a=e[r])&&(o=(s<3?a(o):s>3?a(t,n,o):a(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o}([(0,En._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[bi])],Vd);let Wd=class extends vo{constructor(e){super(e)}massAddEventInputSchema(){return fo.Ik().shape({massAddEvent:fo.Ik().shape({eventId:fo.ai().required(this.t("l_v_nement_est_88155")).typeError(this.t("l_v_nement_est_88155"))})})}massAddEventSchema(){return fo.Ik().shape({eventId:fo.ai().required(this.t("l_v_nement_est_88155")).typeError(this.t("l_v_nement_est_88155"))})}};Wd=function(e,t,n,i){var a,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(a=e[r])&&(o=(s<3?a(o):s>3?a(t,n,o):a(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o}([(0,En._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[bi])],Wd);let qd=class extends Gd{translationService;inputName="massAssign";constructor(e){super(e),this.translationService=e}step1Fields(){return{strategy:this.strategyField()}}step2Fields(){return{positionsSlotsIds:fo.YO().of(fo.ai()).required(this.t("vous_devez_s_le_28976")).min(1,this.t("vous_devez_s_le_28976"))}}};qd=function(e,t,n,i){var a,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(a=e[r])&&(o=(s<3?a(o):s>3?a(t,n,o):a(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o}([(0,En._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[bi])],qd);let Yd=class extends Gd{translationService;inputName="massAvailabilitiesUpdate";constructor(e){super(e),this.translationService=e}step1Fields(){return{strategy:this.strategyField(),formId:fo.ai().required(this.t("le_formulaire_e_77404"))}}step2Fields(){return{slots:fo.YO().of(fo.Ik()).required(this.t("vous_devez_ajou_68961")).min(1,this.t("vous_devez_ajou_68961"))}}};Yd=function(e,t,n,i){var a,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(a=e[r])&&(o=(s<3?a(o):s>3?a(t,n,o):a(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o}([(0,En._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[bi])],Yd);let Hd=class extends Gd{translationService;inputName="massConditions";constructor(e){super(e),this.translationService=e}step1Fields(){return{strategy:this.strategyField(Xn)}}step2Fields(){return{customFieldId:fo.ai().required(this.t("le_champ_person_80074")),value:fo.gl().required(this.t("la_valeur_est_r_70136"))}}};Hd=function(e,t,n,i){var a,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(a=e[r])&&(o=(s<3?a(o):s>3?a(t,n,o):a(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o}([(0,En._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[bi])],Hd);let Zd=class extends Gd{translationService;inputName="massAccreditationsProfiles";constructor(e){super(e),this.translationService=e}step1Fields(){return{strategy:this.strategyField()}}step2Fields(){return{accreditationsProfiles:fo.YO().of(fo.Ik().shape({accreditationProfileId:fo.ai().required(),maxResources:fo.gl().nullable(),willAutoAccredit:fo.zM().required()})).required(this.t("vous_devez_s_le_98277")).min(1,this.t("vous_devez_s_le_98277"))}}};Zd=function(e,t,n,i){var a,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(a=e[r])&&(o=(s<3?a(o):s>3?a(t,n,o):a(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o}([(0,En._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[bi])],Zd);let Kd=class extends Gd{translationService;inputName="massAccreditationsSlots";constructor(e){super(e),this.translationService=e}step1Fields(){return{strategy:this.strategyField()}}step2Fields(){return{accreditationsSlots:fo.YO().of(fo.Ik().shape({accreditationCategoryId:fo.ai().required(),accreditationId:fo.ai().required(),accreditationSlotId:fo.ai().required(),isDefault:fo.zM().required(),isVisible:fo.zM().required(),maxResources:fo.gl().nullable()})).required(this.t("vous_devez_s_le_72138")).min(1,this.t("vous_devez_s_le_72138"))}}};Kd=function(e,t,n,i){var a,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(a=e[r])&&(o=(s<3?a(o):s>3?a(t,n,o):a(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o}([(0,En._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[bi])],Kd);let Qd=class extends Gd{translationService;inputName="massPreAssign";constructor(e){super(e),this.translationService=e}step1Fields(){return{strategy:this.strategyField(),level:fo.Yj().required(this.t("le_niveau_est_r_81100")).oneOf(Jn,this.t("le_niveau_est_r_81100"))}}step2Fields(){return{positionsCategoriesIds:fo.YO().of(fo.ai()).test("non-empty-categories",this.t("vous_devez_s_le_32044"),function(){return this.parent.level!==tt.Categories||this.parent.positionsCategoriesIds.length>0}),positionsIds:fo.YO().of(fo.ai()).test("non-empty-positions",this.t("vous_devez_s_le_89603"),function(){return this.parent.level!==tt.Positions||this.parent.positionsIds.length>0})}}};Qd=function(e,t,n,i){var a,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(a=e[r])&&(o=(s<3?a(o):s>3?a(t,n,o):a(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o}([(0,En._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[bi])],Qd);let Xd=class extends vo{translationService;constructor(e){super(e),this.translationService=e}default(e){return{...e,groupId:void 0,customDocumentId:void 0,eventDocumentId:void 0,zplDocumentId:void 0}}schema(){const e=this;return fo.Ik().shape({input:fo.Ik().shape({groupId:fo.Yj().required(this.t("le_lieu_d_impre_60407")),customDocumentId:fo.ai().nullable(),eventDocumentId:fo.ai().nullable(),zplDocumentId:fo.ai().nullable()}).test({name:"exactly-one-document",test:({customDocumentId:t,eventDocumentId:n,zplDocumentId:i},a)=>1===[t,n,i].filter(Boolean).length||a.createError({message:e.t("a_wristband_to_25340"),path:"input.zplDocumentId"})})})}};Xd=function(e,t,n,i){var a,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(a=e[r])&&(o=(s<3?a(o):s>3?a(t,n,o):a(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o}([(0,En._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[bi])],Xd);let Jd=class extends vo{translationService;constructor(e){super(e),this.translationService=e}massStateUpdateSchema(){return fo.Ik().shape({state:fo.Yj().required(this.t("le_statut_est_r_13164")).oneOf([Bt.NotApplicable,Bt.PreAssigned,Bt.Refused,Bt.WaitingAssignment],this.t("le_statut_est_r_13164"))})}massAccreditationStateUpdateSchema(){return fo.Ik().shape({state:fo.Yj().required(this.t("le_statut_est_r_13164")).oneOf([J.NotApplicable,J.Refused,J.WaitingAccreditation],this.t("le_statut_est_r_13164"))})}};Jd=function(e,t,n,i){var a,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(a=e[r])&&(o=(s<3?a(o):s>3?a(t,n,o):a(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o}([(0,En._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[bi])],Jd);let el=class extends Gd{translationService;inputName="massProfileUpdate";constructor(e){super(e),this.translationService=e}step1Fields(){return{strategy:this.strategyField([Je.Replace,Je.Delete])}}step2Fields(){return{accreditationProfileId:fo.ai().nullable().when("strategy",{is:e=>e!==Je.Delete,then:e=>e.required(this.t("vous_devez_s_le_07918"))})}}};el=function(e,t,n,i){var a,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(a=e[r])&&(o=(s<3?a(o):s>3?a(t,n,o):a(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o}([(0,En._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[bi])],el);let tl=class{positionsCustomFieldInputSchema(){return fo.Ik().shape({customFieldId:fo.ai().required(),conditionValue:fo.gl().required()})}};tl=function(e,t,n,i){var a,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(a=e[r])&&(o=(s<3?a(o):s>3?a(t,n,o):a(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o}([(0,En._G)()],tl);const nl=/^\d{1,2}:\d{2}$/,il=/^\d{1,2}:\d{2}:\d{2}$/;function al(e){return h(e)&&(null!==e.match(nl)||null!==e.match(il))}function sl(e){if(al(e)){const[t,n]=e.split(":");return[parseInt(t,10),parseInt(n,10)]}return null}let ol=class extends vo{constructor(e){super(e)}positionsSlotInputDefault(e,t){return{id:t?.id,name:t?.name??"",startDate:t?.startDate??e,startTime:t?.startTime??e.toFormat("HH:mm"),endDate:t?.endDate??e,endTime:t?.endTime??e.plus({hour:1}).toFormat("HH:mm"),resources:t?.resources??1,assignedResources:t?.assignedResources}}createPositionSlotSchema(){return fo.Ik().shape({slot:this.positionsSlotInputSchema()})}positionsSlotInputSchema(){return fo.Ik().shape({name:fo.Yj(),startDate:Co.required(this.t("la_date_de_d_bu_05030")).typeError(this.t("la_date_de_d_bu_05030")),startTime:fo.Yj().required(this.t("heure_de_d_but_90785")),endDate:Co.required(this.t("la_date_de_fin_32246")).typeError(this.t("la_date_de_fin_32246")).test("after-start-date",this.t("la_date_de_fin_00429"),(e,t)=>$a.c9.isDateTime(t.parent.startDate)&&t.parent.startDate.isValid&&$a.c9.isDateTime(t.parent.endDate)&&t.parent.endDate.isValid&&t.parent.endDate>=t.parent.startDate),endTime:fo.Yj().required(this.t("l_heure_de_fin_78626")).test("after-start-time",this.t("la_date_de_fin_00429"),(e,t)=>{const n=$a.c9.isDateTime(t.parent.startDate)&&t.parent.startDate.isValid,i=al(t.parent.startTime),a=$a.c9.isDateTime(t.parent.endDate)&&t.parent.endDate.isValid,s=al(t.parent.endTime);if(n&&i&&a&&s){const[e,n]=sl(t.parent.startTime),[i,a]=sl(t.parent.endTime);return t.parent.startDate.set({hours:e,minutes:n})=0;r--)(a=e[r])&&(o=(s<3?a(o):s>3?a(t,n,o):a(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o}([(0,En._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[bi])],ol);let rl=class extends vo{positionsCustomFieldInputService;positionsSlotInputService;constructor(e,t,n){super(n),this.positionsCustomFieldInputService=e,this.positionsSlotInputService=t}positionInputDefault(e,{positionCategoryId:t,layer:n,latitude:i,longitude:a,startAt:s}){let o=e?.category.id??t;return Number.isInteger(o)||(o=null),{positionCategoryId:o,name:e?.name??"",description:e?.description??"",privateNote:e?.privateNote??"",acronym:e?.acronym??"",color:e?.color??b.colors.primary500.value,icon:e?.icon??qe.LocationDot,weezeventIsSynchronized:e?.weezeventIsSynchronized??!1,address:e?.address??null,latitude:e?.latitude??i??null,longitude:e?.longitude??a??null,zoom:e?.zoom??13,layer:e?.layer??n,tracesIds:e?.tracesIds??[],slots:e?.slots??[this.positionsSlotInputService.positionsSlotInputDefault(s)],positionDisplay:e?.positionDisplay??st.List,conditionsOperator:e?.conditionsOperator??ue.And,positionsCustomFields:e?.positionsCustomFields??[],tagsIds:e?.tagsIds??[],fields:e?.fields??{},leadersIds:e?.fields??[]}}createUpdatePositionSchema(e){const t=this.positionInputSchema();return fo.Ik().shape({position:e?t.shape({fields:e}):t})}positionInputSchema(){return fo.Ik().shape({name:fo.Yj().required(this.t("le_nom_de_la_mi_74207")),positionCategoryId:fo.ai().required(this.t("la_cat_gorie_es_14008")).typeError(this.t("la_cat_gorie_es_14008")).min(1,this.t("la_cat_gorie_es_14008")),acronym:fo.Yj(),color:fo.Yj().required(this.t("la_couleur_est_95740")),icon:fo.Yj().required(this.t("l_ic_ne_est_req_15843")).oneOf(qn,this.t("l_ic_ne_est_req_15843")),description:fo.Yj(),privateNote:fo.Yj(),address:fo.Yj().nullable(),latitude:fo.ai().nullable().typeError(this.t("la_latitude_doi_43118")),longitude:fo.ai().nullable().typeError(this.t("la_longitude_do_35170")),traces:fo.YO().of(fo.ai()),slots:fo.YO().of(this.positionsSlotInputService.positionsSlotInputSchema()).required(this.t("vous_devez_avoi_26563")).min(1,this.t("vous_devez_avoi_26563")),positionDisplay:fo.Yj().required(this.t("le_type_d_affic_60154")).oneOf(ei,this.t("le_type_d_affic_60154")),positionsCustomFields:fo.YO().of(this.positionsCustomFieldInputService.positionsCustomFieldInputSchema()),tagsIds:fo.YO().of(fo.ai())})}};rl=function(e,t,n,i){var a,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(a=e[r])&&(o=(s<3?a(o):s>3?a(t,n,o):a(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o}([(0,En._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[tl,ol,bi])],rl);var dl;let ll=class extends zo{static{dl=this}csvInputService;static IMPORT_COLUMNS_DEFAULT={...zo.IMPORT_COLUMNS_DEFAULT,PositionName:"positionName",PositionCategoryName:"positionCategoryName",SlotStart:"slotStart",SlotEnd:"slotEnd",MaxResources:"slotMaxResources",SlotName:"slotName",Acronym:"acronym",Color:"color",Icon:"icon",Description:"description",ConditionsOperator:"conditionsOperator",Address:"address",Latitude:"latitude",Longitude:"longitude",MapLayer:"mapLayer",MapZoom:"mapZoom",LeadersEmails:"leadersEmails",LeadersFirstNames:"leadersFirstnames",LeadersLastNames:"leadersLastnames",PrivateNote:"privateNote",Tags:"tags"};static IMPORT_COLUMNS_REQUIRED=e=>[...e===Ye.Update?[dl.IMPORT_COLUMNS_DEFAULT.Id]:[],dl.IMPORT_COLUMNS_DEFAULT.SlotStart,dl.IMPORT_COLUMNS_DEFAULT.SlotEnd,dl.IMPORT_COLUMNS_DEFAULT.MaxResources,dl.IMPORT_COLUMNS_DEFAULT.PositionName,dl.IMPORT_COLUMNS_DEFAULT.PositionCategoryName];constructor(e,t){super(e,t),this.csvInputService=e}};ll=dl=function(e,t,n,i){var a,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(a=e[r])&&(o=(s<3?a(o):s>3?a(t,n,o):a(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o}([(0,En._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[ko,bi])],ll);function cl(e){return e===lt.StartDate||e===lt.EndDate}function ul(e){return e===lt.StartTime||e===lt.EndTime}let ml=class extends vo{constructor(e){super(e)}positionsSlotsMassEditSchema(){return fo.Ik().shape({massEdit:this.positionsSlotsMassEditInputSchema()})}positionsSlotsMassEditInputSchema(){return fo.Ik().shape({selecteds:fo.Ik().required(),property:fo.Yj().required().oneOf(ti),strategy:fo.Yj().required().oneOf(ni).when("property",{is:cl,then:e=>e.oneOf([ct.Replace])}),value:fo.gl().test("valid-value",(e,t)=>{const{property:n,strategy:i}=t.parent;return cl(n)?$a.c9.isDateTime(e)&&e.isValid||"string"==typeof e&&$a.c9.fromISO(e).isValid||t.createError({message:this.t("la_date_est_req_98470")}):ul(n)&&i===ct.Replace?al(e)||t.createError({message:this.t("l_heure_est_req_51396")}):ul(n)?_o(e)||t.createError({message:this.t("le_nombre_de_mi_02803")}):_o(e)||t.createError({message:this.t("le_nombre_de_me_04870")})})})}};ml=function(e,t,n,i){var a,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(a=e[r])&&(o=(s<3?a(o):s>3?a(t,n,o):a(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o}([(0,En._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[bi])],ml);function gl(e){switch(e){case _t.OrganizationNotLinked:case _t.PartnersUnreachable:case _t.PartnerNotFound:return"weezaccessPartnerId";case _t.EventNotLinked:case _t.GroupsUnreachable:case _t.GroupNotFound:return"printerGroupId";case _t.DocumentNotFound:return"zplDocumentId";default:return ir()}}function hl(e){return $a.c9.isDateTime(e)&&e.isValid}let pl=class extends vo{constructor(e){super(e)}default(e){const t=e?.activationRange;return{weezaccessPartnerId:e?.weezaccessPartnerId??null,printerGroupId:e?.printerGroupId??null,zplDocumentId:e?.zplDocumentId??null,activationStart:t?.start?.toLocal()??null,activationEnd:t?.end?.toLocal()??null}}toInput({weezaccessPartnerId:e,printerGroupId:t,zplDocumentId:n,...i}){if(null===e||null===t||null===n)throw new Error("PrintTriggerInputService.toInput: the schema requires the partner, the printer group and the ZPL document.");return{...i,weezaccessPartnerId:e,printerGroupId:t,zplDocumentId:n,activationStart:hl(i.activationStart)?i.activationStart:null,activationEnd:hl(i.activationEnd)?i.activationEnd:null}}toSubmitErrors(e){return{printTrigger:Object.fromEntries(e.map(({code:e,message:t})=>[gl(e),t]))}}schema(){return fo.Ik().shape({printTrigger:this.printTriggerInputSchema().required()}).required()}printTriggerInputSchema(){return fo.Ik().shape({weezaccessPartnerId:fo.ai().typeError(this.t("l_op_rateur_wee_26038")).required(this.t("l_op_rateur_wee_26038")),printerGroupId:fo.Yj().typeError(this.t("le_point_d_impr_71946")).required(this.t("le_point_d_impr_71946")),zplDocumentId:fo.ai().typeError(this.t("le_document_est_86403")).required(this.t("le_document_est_86403")),activationStart:fo.gl().nullable().test("required-with-end",this.t("la_date_de_d_bu_05030"),(e,{parent:t})=>hl(e)||!hl(t.activationEnd)),activationEnd:fo.gl().nullable().test("required-with-start",this.t("la_date_de_fin_32246"),(e,{parent:t})=>hl(e)||!hl(t.activationStart)).test("after-start",this.t("la_date_de_fin_00429"),(e,{parent:t})=>!hl(e)||!hl(t.activationStart)||e>t.activationStart)})}};var fl;pl=function(e,t,n,i){var a,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(a=e[r])&&(o=(s<3?a(o):s>3?a(t,n,o):a(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o}([(0,En._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[bi])],pl),function(e){e[e.POSITION_READ=0]="POSITION_READ",e[e.POSITION_EDIT=1]="POSITION_EDIT",e[e.MEMBER_EDIT=2]="MEMBER_EDIT",e[e.MEMBER_ASSIGNMENT_STATE_EDIT=3]="MEMBER_ASSIGNMENT_STATE_EDIT",e[e.COMMENT_READ=4]="COMMENT_READ",e[e.COMMENT_ADD=5]="COMMENT_ADD",e[e.MEMBER_AVAILABILITIES_EDIT=6]="MEMBER_AVAILABILITIES_EDIT",e[e.MEMBER_ASSIGN=7]="MEMBER_ASSIGN",e[e.CAMPAIGN_SEND=8]="CAMPAIGN_SEND",e[e.ACCREDITATION_READ=9]="ACCREDITATION_READ",e[e.ACCREDITATION_EDIT=10]="ACCREDITATION_EDIT",e[e.MEMBER_ACCREDIT=11]="MEMBER_ACCREDIT",e[e.DELEGATION_READ=12]="DELEGATION_READ",e[e.DELEGATION_EDIT=13]="DELEGATION_EDIT",e[e.FORM_READ=14]="FORM_READ",e[e.FORM_EDIT=15]="FORM_EDIT",e[e.EMAIL_EDIT=16]="EMAIL_EDIT",e[e.CAMPAIGN_READ=17]="CAMPAIGN_READ",e[e.DOCUMENT_READ=18]="DOCUMENT_READ",e[e.DOCUMENT_EDIT=19]="DOCUMENT_EDIT",e[e.WORKFLOW_READ=20]="WORKFLOW_READ",e[e.WORKFLOW_EDIT=21]="WORKFLOW_EDIT",e[e.CUSTOM_FIELD_READ=22]="CUSTOM_FIELD_READ",e[e.CUSTOM_FIELD_EDIT=23]="CUSTOM_FIELD_EDIT",e[e.SEGMENT_EDIT=24]="SEGMENT_EDIT",e[e.MEMBER_CREATE=25]="MEMBER_CREATE",e[e.MEMBER_DELETE=26]="MEMBER_DELETE",e[e.EVENT_EDIT=27]="EVENT_EDIT",e[e.ORGANIZATION_PARAM_READ=28]="ORGANIZATION_PARAM_READ",e[e.ORGANIZATION_PARAM_EDIT=29]="ORGANIZATION_PARAM_EDIT",e[e.ORGANIZATION_USER_READ=30]="ORGANIZATION_USER_READ",e[e.ORGANIZATION_USER_EDIT=31]="ORGANIZATION_USER_EDIT",e[e.CUSTOM_FIELD_DECRYPT=32]="CUSTOM_FIELD_DECRYPT",e[e.WEEZEVENT_READ=33]="WEEZEVENT_READ",e[e.WEEZEVENT_EDIT=34]="WEEZEVENT_EDIT",e[e.DELEGATIONS_SPACE_PARAM_READ=35]="DELEGATIONS_SPACE_PARAM_READ",e[e.DELEGATIONS_SPACE_PARAM_EDIT=36]="DELEGATIONS_SPACE_PARAM_EDIT",e[e.PRINT_CONFIG_READ=37]="PRINT_CONFIG_READ",e[e.PRINT_CONFIG_EDIT=38]="PRINT_CONFIG_EDIT",e[e.PRINT=39]="PRINT",e[e.TICKET_ID_REGENERATE=40]="TICKET_ID_REGENERATE"}(fl||(fl={}));const Il=Object.keys(fl).length/2;function _l(e){return new Array(Il).fill("0").map((t,n)=>e.includes(n)?"1":"0").join("")}const xl=_l([fl.POSITION_READ,fl.POSITION_EDIT,fl.MEMBER_EDIT,fl.MEMBER_ASSIGNMENT_STATE_EDIT,fl.COMMENT_READ,fl.COMMENT_ADD,fl.MEMBER_AVAILABILITIES_EDIT,fl.MEMBER_ASSIGN,fl.CAMPAIGN_SEND,fl.ACCREDITATION_READ,fl.ACCREDITATION_EDIT,fl.MEMBER_ACCREDIT,fl.DELEGATION_READ,fl.DELEGATION_EDIT,fl.FORM_READ,fl.FORM_EDIT,fl.EMAIL_EDIT,fl.CAMPAIGN_READ,fl.DOCUMENT_READ,fl.DOCUMENT_EDIT,fl.WORKFLOW_READ,fl.WORKFLOW_EDIT,fl.CUSTOM_FIELD_READ,fl.CUSTOM_FIELD_EDIT,fl.SEGMENT_EDIT,fl.MEMBER_CREATE,fl.MEMBER_DELETE,fl.EVENT_EDIT,fl.ORGANIZATION_PARAM_READ,fl.ORGANIZATION_PARAM_EDIT,fl.ORGANIZATION_USER_READ,fl.ORGANIZATION_USER_EDIT,fl.WEEZEVENT_READ,fl.WEEZEVENT_EDIT,fl.DELEGATIONS_SPACE_PARAM_READ,fl.DELEGATIONS_SPACE_PARAM_EDIT,fl.PRINT_CONFIG_READ,fl.PRINT_CONFIG_EDIT,fl.PRINT,fl.TICKET_ID_REGENERATE]),yl=_l([fl.POSITION_READ,fl.COMMENT_READ,fl.ACCREDITATION_READ,fl.DELEGATION_READ,fl.FORM_READ,fl.CAMPAIGN_READ,fl.DOCUMENT_READ,fl.WORKFLOW_READ,fl.CUSTOM_FIELD_READ,fl.ORGANIZATION_PARAM_READ,fl.ORGANIZATION_USER_READ,fl.WEEZEVENT_READ,fl.DELEGATIONS_SPACE_PARAM_READ,fl.PRINT_CONFIG_READ]),Sl=_l([fl.POSITION_READ,fl.POSITION_EDIT,fl.MEMBER_EDIT,fl.MEMBER_ASSIGNMENT_STATE_EDIT,fl.COMMENT_READ,fl.COMMENT_ADD,fl.MEMBER_AVAILABILITIES_EDIT,fl.MEMBER_ASSIGN,fl.CAMPAIGN_SEND,fl.ACCREDITATION_READ,fl.ACCREDITATION_EDIT,fl.MEMBER_ACCREDIT,fl.DELEGATION_READ,fl.DELEGATION_EDIT,fl.FORM_READ,fl.FORM_EDIT,fl.EMAIL_EDIT,fl.CAMPAIGN_READ,fl.DOCUMENT_READ,fl.DOCUMENT_EDIT,fl.WORKFLOW_READ,fl.WORKFLOW_EDIT,fl.CUSTOM_FIELD_READ,fl.CUSTOM_FIELD_EDIT,fl.SEGMENT_EDIT,fl.MEMBER_CREATE,fl.MEMBER_DELETE,fl.WEEZEVENT_READ,fl.WEEZEVENT_EDIT,fl.DELEGATIONS_SPACE_PARAM_READ,fl.DELEGATIONS_SPACE_PARAM_EDIT,fl.PRINT_CONFIG_READ,fl.PRINT_CONFIG_EDIT,fl.PRINT,fl.TICKET_ID_REGENERATE]),jl=_l([fl.POSITION_READ,fl.COMMENT_READ,fl.ACCREDITATION_READ,fl.DELEGATION_READ,fl.FORM_READ,fl.CAMPAIGN_READ,fl.DOCUMENT_READ,fl.WORKFLOW_READ,fl.WEEZEVENT_READ,fl.DELEGATIONS_SPACE_PARAM_READ,fl.PRINT_CONFIG_READ]),bl=_l([fl.POSITION_READ,fl.POSITION_EDIT,fl.COMMENT_READ,fl.MEMBER_ASSIGN,fl.CAMPAIGN_SEND,fl.CAMPAIGN_READ]),vl=_l([fl.POSITION_READ,fl.COMMENT_READ]),Al=_l([fl.DELEGATION_READ]);let Cl=class extends vo{constructor(e){super(e)}default(e){return{name:e?.name??"",description:e?.description??"",accessLevel:e?.accessLevel??Ct.Position,permissions:e?.permissions??bl}}schema(){return fo.Ik().shape({role:fo.Ik().shape({name:fo.Yj().required(this.t("le_nom_est_requ_61536")),description:fo.Yj().required(this.t("la_description_46559")),accessLevel:fo.Yj().required(this.t("le_niveau_d_acc_94726")).oneOf(li,this.t("le_niveau_d_acc_94726")),permissions:fo.Yj().matches(new RegExp(`^[01]{${Il}}$`),this.t("le_format_des_p_68818")).required(this.t("le_format_des_p_68818"))}).required()}).required()}};Cl=function(e,t,n,i){var a,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(a=e[r])&&(o=(s<3?a(o):s>3?a(t,n,o):a(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o}([(0,En._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[bi])],Cl);let El=class extends vo{translationService;constructor(e){super(e),this.translationService=e}segmentFolderInputDefault(e,t){return{name:t?.name??"",segmentType:e}}};El=function(e,t,n,i){var a,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(a=e[r])&&(o=(s<3?a(o):s>3?a(t,n,o):a(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o}([(0,En._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[bi])],El);let Tl=class extends vo{translationService;constructor(e){super(e),this.translationService=e}};Tl=function(e,t,n,i){var a,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(a=e[r])&&(o=(s<3?a(o):s>3?a(t,n,o):a(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o}([(0,En._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[bi])],Tl);let Rl=class extends Wo{constructor(e){super(e)}step1Schema(){return fo.Ik().shape({email:this.email()})}step2Schema(){return fo.Ik().shape({email:this.email(),code:this.code()})}};Rl=function(e,t,n,i){var a,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(a=e[r])&&(o=(s<3?a(o):s>3?a(t,n,o):a(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o}([(0,En._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[bi])],Rl);let Ml=class extends Wo{constructor(e){super(e)}step1Schema(){return fo.Ik().shape({email:this.email(),password:this.passwordRules()})}step2Schema(){return fo.Ik().shape({email:this.email(),code:this.code(),password:this.passwordRules()})}};Ml=function(e,t,n,i){var a,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(a=e[r])&&(o=(s<3?a(o):s>3?a(t,n,o):a(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o}([(0,En._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[bi])],Ml);let Dl=class extends vo{constructor(e){super(e)}connectionInfosInputDefault(e){return{url:e?.url??"",issuer:e?.issuer??"",receiver:e?.receiver??"",synchronizedEventsIds:e?.synchronizedEventsIds??[],seasonEventsIds:e?.seasonEventsIds??[],place:e?.place??""}}};Dl=function(e,t,n,i){var a,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(a=e[r])&&(o=(s<3?a(o):s>3?a(t,n,o):a(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o}([(0,En._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[bi])],Dl);let Ol=class extends vo{constructor(e){super(e)}associateTagsIdsSchema(){return fo.Ik().shape({tagsIds:fo.YO().of(fo.ai())})}};Ol=function(e,t,n,i){var a,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(a=e[r])&&(o=(s<3?a(o):s>3?a(t,n,o):a(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o}([(0,En._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[bi])],Ol);let wl=class extends vo{constructor(e){super(e)}traceInputDefault(e){return{name:e?.name??"",color:e?.color??b.colors.primary500.value,points:e?.points??[],direction:e?.direction??kt.None,startAt:e?.startAt??null,firstRunnerPace:e?.firstRunnerPace??null,lastRunnerPace:e?.lastRunnerPace??null}}traceInputSchema(e){return fo.Ik().shape({name:fo.Yj().required(this.t("le_nom_du_trac_39859")),color:fo.Yj().required(this.t("la_couleur_du_t_36646")),points:fo.YO().required(this.t("le_trac_doit_c_20895")).min(2,this.t("le_trac_doit_c_20895")),startAt:fo.gl().nullable().test("start-at-during-event",this.t("l_heure_de_d_pa_04968"),t=>!$a.c9.isDateTime(t)||!t.isValid||t>=e.startAt&&t<=e.endAt.endOf("day")),firstRunnerPace:this.paceSchema(),lastRunnerPace:this.paceSchema()})}paceSchema(){return fo.ai().nullable().typeError(this.t("l_allure_doit_06495")).integer(this.t("l_allure_doit_06495")).positive(this.t("l_allure_doit_06495"))}createTraceSchema(e){return fo.Ik().shape({trace:this.traceInputSchema(e)})}updateNameSchema(){return fo.Ik().shape({name:fo.Yj().required(this.t("le_nom_du_trac_39859"))})}};wl=function(e,t,n,i){var a,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(a=e[r])&&(o=(s<3?a(o):s>3?a(t,n,o):a(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o}([(0,En._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[bi])],wl);let Pl=class{translationInputDefault(e){return{fr:this.default(e.translationType,e.fr),en:this.default(e.translationType,e.en),es:this.default(e.translationType,e.es),de:this.default(e.translationType,e.de),nl:this.default(e.translationType,e.nl)}}default(e,t){switch(e){case zt.String:return h(t)?t:"";case zt.StringArray:return Array.isArray(t)?t:[];case zt.RichText:return h(t)?t:"";default:return ir()}}};Pl=function(e,t,n,i){var a,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(a=e[r])&&(o=(s<3?a(o):s>3?a(t,n,o):a(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o}([(0,En._G)()],Pl);var $l;let kl=class extends zo{static{$l=this}csvInputService;static IMPORT_COLUMNS_DEFAULT={...zo.IMPORT_COLUMNS_DEFAULT,Email:"email",TicketId:"ticketId"};static IMPORT_COLUMNS_REQUIRED=e=>e===Ye.Update?[$l.IMPORT_COLUMNS_DEFAULT.Id]:[$l.IMPORT_COLUMNS_DEFAULT.Email];constructor(e,t){super(e,t),this.csvInputService=e}};kl=$l=function(e,t,n,i){var a,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(a=e[r])&&(o=(s<3?a(o):s>3?a(t,n,o):a(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o}([(0,En._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[ko,bi])],kl);var Nl=n(8923);const Ll=[Ie.CanLeadersAddMembers,Ie.CanLeadersDeleteMembers,Ie.CanLeadersDuplicateMembers,Ie.CanLeadersEditColumns,Ie.CanLeadersEditCustomFields,Ie.CanLeadersEditMembers,Ie.CanLeadersImportMembers,Ie.CanLeadersSeeHiddenAccreditationsSlots];let zl=class extends vo{constructor(e){super(e)}workflowInputDefault(e){return{name:e?.name??"",state:e?.state??Xt.Active,frequency:e?.frequency??Yt.Every10Minutes,trigger:e?.trigger??Jt.VolunteersSegment,action:e?.action??qt.SetCustomField,data:(0,Nl.A)({recipients:Kt.View},e?.data??{}),onExit:e?.onExit??Ht.Revert}}workflowInputSchema(){return fo.Ik().shape({name:fo.Yj().required(this.t("le_nom_est_requ_61536")),state:fo.Yj().required(this.t("le_statut_est_r_13164")).oneOf(Ii,this.t("le_statut_est_r_13164")),action:fo.Yj().required(this.t("l_action_est_re_08934")).oneOf(gi,this.t("l_action_est_re_08934")),trigger:fo.Yj().required(this.t("le_d_clencheur_32555")).oneOf(_i,this.t("le_d_clencheur_32555")),data:fo.gl().required().test("positions-valid",this.t("les_missions_so_67594"),function(){return this.parent.trigger!==Jt.Assigned||F(this.parent.data.positionsCategoriesIds)||F(this.parent.data.positionsIds)||F(this.parent.data.positionsSlotsIds)||F(this.parent.data.positionsSegmentsIds)}).test("volunteers-segment-id-valid",this.t("la_vue_est_requ_65480"),function(){return this.parent.trigger!==Jt.VolunteersSegment||Number.isInteger(this.parent.data.volunteersSegmentId)}).test("delegations-segment-id-valid",this.t("la_vue_est_requ_65480"),function(){return this.parent.trigger!==Jt.DelegationsSegment||Number.isInteger(this.parent.data.delegationsSegmentId)}).test("form-id-valid",this.t("le_formulaire_e_77404"),function(){return this.parent.trigger!==Jt.FormSubmit||Number.isInteger(this.parent.data.formId)}).test("campaign-id-valid",this.t("la_campagne_est_06708"),function(){return this.parent.trigger!==Jt.VolunteersSegment||this.parent.action!==qt.SendCampaign||Number.isInteger(this.parent.data.campaignId)}).test("campaign-recipients-valid",this.t(this.t("les_destinatair_82420")),function(){return this.parent.trigger!==Jt.VolunteersSegment||this.parent.action!==qt.SendCampaign||fi.includes(this.parent.data.recipients)}).test("campaign-recipients-users-infos",this.t("la_liste_des_me_55886"),function(){return this.parent.trigger!==Jt.VolunteersSegment||this.parent.action!==qt.SendCampaign||this.parent.data.recipients!==Kt.UsersInfosIds||F(this.parent.data.usersInfosIds)}).test("custom-field-id-valid",this.t("le_champ_person_80074"),function(){return(this.parent.trigger!==Jt.VolunteersSegment&&this.parent.trigger!==Jt.DelegationsSegment||this.parent.action!==qt.SetCustomField)&&(this.parent.trigger!==Jt.FormSubmit||this.parent.action!==qt.CreateDelegation)||Number.isInteger(this.parent.data.customFieldId)}).test("duplicate-member-custom-fields-valid",this.t("le_champ_lier_69891"),function(){return this.parent.action!==qt.DuplicateMember||(this.parent.data.customFields||[]).every(e=>!0!==e.fromField||h(e.value))}).test("accreditations-valid",this.t("les_accr_ditati_27943"),function(){return this.parent.trigger===Jt.Assigned?F(this.parent.data.accreditationsSlotsIds):this.parent.trigger!==Jt.VolunteersSegment||this.parent.action!==qt.AddAccreditations&&this.parent.action!==qt.DeleteAccreditations||F(this.parent.data.accreditationsSlotsIds)||"number"==typeof this.parent.data.accreditationProfileId}).test("positions-slots-valid",this.t("les_missions_so_67594"),function(){return this.parent.trigger!==Jt.VolunteersSegment||this.parent.action!==qt.AddPositions&&this.parent.action!==qt.DeletePositions||F(this.parent.data.positionsSlotsIds)}).test("delegation-id-valid",this.t("la_d_l_gation_c_71684"),function(){return this.parent.trigger!==Jt.FormSubmit||this.parent.action!==qt.CreateDelegation||Number.isInteger(this.parent.data.delegationId)}).test("event-id-valid",this.t("l_v_nement_est_88155"),function(){return this.parent.trigger!==Jt.VolunteersSegment||this.parent.action!==qt.AddEvent||Number.isInteger(this.parent.data.eventId)}).test("permissions-valid",this.t("les_permissions_82998"),function(){return this.parent.trigger!==Jt.DelegationsSegment||this.parent.action!==qt.AddDelegationPermissions&&this.parent.action!==qt.DeleteDelegationPermissions||F(this.parent.data.permissions)&&this.parent.data.permissions.every(e=>Ll.includes(e))}),onExit:fo.Yj().required(this.t("l_action_de_fin_64764")).oneOf(pi,this.t("l_action_de_fin_64764"))})}};zl=function(e,t,n,i){var a,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(a=e[r])&&(o=(s<3?a(o):s>3?a(t,n,o):a(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o}([(0,En._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[bi])],zl);let Fl=class{get(){return{[Et.OrganizationAdmin]:{accessLevel:Ct.Organization,permissions:xl,nameKey:"administrateur_11083",descriptionKey:"a_acc_s_toute_73520"},[Et.OrganizationReader]:{accessLevel:Ct.Organization,permissions:yl,nameKey:"acc_s_en_lectur_30252",descriptionKey:"a_acc_s_l_org_94388"},[Et.EventAdmin]:{accessLevel:Ct.Event,permissions:Sl,nameKey:"administrateur_24785",descriptionKey:"a_acc_s_toute_25473"},[Et.EventReader]:{accessLevel:Ct.Event,permissions:jl,nameKey:"acc_s_en_lectur_33482",descriptionKey:"a_acc_s_l_v_17476"},[Et.PositionEditor]:{accessLevel:Ct.Position,permissions:bl,nameKey:"responsable_de_95683",descriptionKey:"peut_modifier_s_82832"},[Et.PositionReader]:{accessLevel:Ct.Position,permissions:vl,nameKey:"responsable_de_72569",descriptionKey:"a_acc_s_ses_m_09741"},[Et.DelegationCategoryLeader]:{accessLevel:Ct.DelegationCategory,permissions:Al,nameKey:"responsable_de_32820",descriptionKey:"a_acc_s_aux_d_l_87634"}}}};Fl=function(e,t,n,i){var a,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(a=e[r])&&(o=(s<3?a(o):s>3?a(t,n,o):a(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o}([(0,En._G)()],Fl);let Ul=class{translationService;constructor(e){this.translationService=e}minutesToHoursMinutesString(e){const t=$a.dw.fromObject({minutes:e},{locale:id(this.translationService.language)}).shiftTo("hours","minutes");return 0===t.minutes?t.shiftTo("hours").toHuman({unitDisplay:"narrow"}):0===t.hours?t.shiftTo("minutes").toHuman({unitDisplay:"narrow"}):t.toHuman({unitDisplay:"narrow"})}};Ul=function(e,t,n,i){var a,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(a=e[r])&&(o=(s<3?a(o):s>3?a(t,n,o):a(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o}([(0,En._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[bi])],Ul);var Bl=n(7773),Gl=n(6666);const Vl=({children:e,dateTime:t,...n})=>{const a=h(t)?t:t.toISO();return(0,i.jsx)(N,{as:"time",dateTime:a,textStyle:"inherit",...n,children:e})};function Wl(e,t){const n=t.formats?.localeFormat||Za.DateOnly.MonthLong,i=Za.TimeOnly,a=t.language?{locale:id(t.language)}:{};t.formats?.displayWeekday&&(n.weekday="long");const s=e.start,o=e.end;return{startDateString:h(t.formats?.dateFormat)?s.toFormat(t.formats.dateFormat):s.toLocaleString(n,a),startTimeString:h(t.formats?.timeFormat)?s.toFormat(t.formats.timeFormat):s.toLocaleString(i,a),endDateString:h(t.formats?.dateFormat)?o.toFormat(t.formats.dateFormat):o.toLocaleString(n,a),endTimeString:h(t.formats?.timeFormat)?o.toFormat(t.formats.timeFormat):o.toLocaleString(i,a)}}function ql(e){const t=e.filter(e=>e.isValid);if(F(t)){const e=(0,ho.A)(t,e=>e.start.toMillis()),n=[e[0]];for(let t=1;t=0;r--)(a=e[r])&&(o=(s<3?a(o):s>3?a(t,n,o):a(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o}([(0,En._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[bi])],Yl);let Hl=class{translationService;constructor(e){this.translationService=e}getFormatter(e={}){return Intl.NumberFormat(id(this.translationService.language),{notation:e.notation||"compact",style:e.style||"unit",unit:e.unit||"byte",unitDisplay:e.unitDisplay||"narrow"})}toNumberOrEmpty(e,{prefix:t}={}){return"number"==typeof e?`${t??""}${e.toLocaleString()}`:""}toNumberOrInfinity(e,{prefix:t}={}){return`${t??""}${"number"==typeof e&&e!==1/0?e.toLocaleString():"∞"}`}static bytesToMegabytes(e){return`${parseFloat((e/1e6).toPrecision(1))} MB`}static bytesToGigabytes(e){return`${parseFloat((e/1e9).toPrecision(1))} GB`}};Hl=function(e,t,n,i){var a,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(a=e[r])&&(o=(s<3?a(o):s>3?a(t,n,o):a(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o}([(0,En._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[bi])],Hl);var Zl=n(141),Kl=n(7431),Ql=n(6618),Xl=n(9669),Jl=n(9385);const ec=(e,t=null,n={})=>(Object.entries(e).forEach(([e,i])=>{const a=t?`${t}.${e}`:e;"object"!=typeof i||null===i||Array.isArray(i)?n[a]=i:ec(i,a,n)}),n),tc="dashboard",nc="users",ic={COMMUNITY:e=>Ar([Rc.ORGANIZATION(e),"community"]),COMMUNITY_DASHBOARD:e=>Ar([ic.COMMUNITY(e),tc]),COMMUNITY_USERS:e=>Ar([ic.COMMUNITY(e),nc])},ac={PLURAL:"events",SINGLE:"event"},sc={PLURAL:"teams",SINGLE:"team"},oc={EVENTS:ac.PLURAL,EVENT:e=>Ar([ac.SINGLE,e]),TEAM:e=>Ar([sc.SINGLE,e])},rc={EVENTS_IMPORT:e=>Ar([Rc.ORGANIZATION(e),oc.EVENTS,Tr.IMPORT]),EVENTS:e=>Ar([Rc.ORGANIZATION(e),oc.EVENTS]),EVENT:({eventId:e,...t})=>Ar([Rc.ORGANIZATION(t),oc.EVENT(e)]),EVENT_FORM:e=>Ar([jc.FORM(e)]),EVENT_TEAM_FORM:({teamCode:e,...t})=>Ar([rc.EVENT_FORM(t),oc.TEAM(e)])},dc={PLURAL:"forms",SINGLE:"form"},lc="elements",cc="emails",uc="integration",mc="parameters",gc="preview",hc="general",pc="design",fc="availabilities",Ic="missions",_c="accreditations",xc="broadcast",yc="state",Sc={FORMS:dc.PLURAL,FORM:e=>Ar([dc.SINGLE,e])},jc={FORMS:({eventId:e,...t})=>Ar([e?rc.EVENT({...t,eventId:e}):ic.COMMUNITY(t),Sc.FORMS]),FORM:({formId:e,...t})=>Ar(["eventId"in t&&t.eventId?rc.EVENT(t):ic.COMMUNITY(t),Sc.FORM(e)]),CREATE:e=>wr(jc.FORMS(e)),FORM_ELEMENTS:e=>Ar([jc.FORM(e),lc]),FORM_INTEGRATION:e=>Ar([jc.FORM(e),uc]),FORM_EMAILS:e=>Ar([jc.FORM(e),cc]),FORM_PREVIEW:e=>Ar([jc.FORM(e),gc]),FORM_PARAMETERS:e=>Ar([jc.FORM(e),mc]),FORM_PARAMETERS_GENERAL:e=>Ar([jc.FORM_PARAMETERS(e),hc]),FORM_PARAMETERS_DESIGN:e=>Ar([jc.FORM_PARAMETERS(e),pc]),FORM_PARAMETERS_AVAILABILITIES:e=>Ar([jc.FORM_PARAMETERS(e),fc]),FORM_PARAMETERS_MISSIONS:e=>Ar([jc.FORM_PARAMETERS(e),Ic]),FORM_PARAMETERS_ACCREDITATIONS:e=>Ar([jc.FORM_PARAMETERS(e),_c]),FORM_PARAMETERS_BROADCAST:e=>Ar([jc.FORM_PARAMETERS(e),xc]),FORM_PARAMETERS_STATE:e=>Ar([jc.FORM_PARAMETERS(e),yc])},bc={PLURAL:"/organizations",SINGLE:"/organization"},vc="delegations",Ac={_BASE:"parameters",COMMON:{DESIGN:"design",INTEGRATION:"integration",EMAIL_TEMPLATES:"emails",SETTINGS:"settings"},EVENTS_SHOWCASE:{_BASE:"events-showcase"},MEMBERS_SPACE:{_BASE:"members-space"},DELEGATION_SPACE:{_BASE:"delegation-space"}},Cc="blocked",Ec="expired",Tc={ORGANIZATIONS:bc.PLURAL,ORGANIZATION:e=>Ar([bc.SINGLE,e])},Rc={ORGANIZATIONS:Tc.ORGANIZATIONS,ORGANIZATION:({organizationId:e})=>Tc.ORGANIZATION(e),ORGANIZATION_SETTINGS:e=>Ar([Rc.ORGANIZATION(e),Ac._BASE]),ORGANIZATION_SETTINGS_EVENTS_SHOWCASE:e=>Ar([Rc.ORGANIZATION_SETTINGS(e),Ac.EVENTS_SHOWCASE._BASE]),ORGANIZATION_SETTINGS_EVENTS_SHOWCASE_DESIGN:e=>Ar([Rc.ORGANIZATION_SETTINGS_EVENTS_SHOWCASE(e),Ac.COMMON.DESIGN]),ORGANIZATION_SETTINGS_EVENTS_SHOWCASE_INTEGRATION:e=>Ar([Rc.ORGANIZATION_SETTINGS_EVENTS_SHOWCASE(e),Ac.COMMON.INTEGRATION]),ORGANIZATION_SETTINGS_EVENTS_SHOWCASE_SETTINGS:e=>Ar([Rc.ORGANIZATION_SETTINGS_EVENTS_SHOWCASE(e),Ac.COMMON.SETTINGS]),ORGANIZATION_SETTINGS_MEMBERS_SPACE:e=>Ar([Rc.ORGANIZATION_SETTINGS(e),Ac.MEMBERS_SPACE._BASE]),ORGANIZATION_SETTINGS_MEMBERS_SPACE_DESIGN:e=>Ar([Rc.ORGANIZATION_SETTINGS_MEMBERS_SPACE(e),Ac.COMMON.DESIGN]),ORGANIZATION_SETTINGS_MEMBERS_SPACE_INTEGRATION:e=>Ar([Rc.ORGANIZATION_SETTINGS_MEMBERS_SPACE(e),Ac.COMMON.INTEGRATION]),ORGANIZATION_SETTINGS_MEMBERS_SPACE_EMAIL_TEMPLATES:e=>Ar([Rc.ORGANIZATION_SETTINGS_MEMBERS_SPACE(e),Ac.COMMON.EMAIL_TEMPLATES]),ORGANIZATION_SETTINGS_MEMBERS_SPACE_SETTINGS:e=>Ar([Rc.ORGANIZATION_SETTINGS_MEMBERS_SPACE(e),Ac.COMMON.SETTINGS]),ORGANIZATION_SETTINGS_DELEGATION_SPACE:e=>Ar([Rc.ORGANIZATION_SETTINGS(e),Ac.DELEGATION_SPACE._BASE]),ORGANIZATION_SETTINGS_DELEGATION_SPACE_DESIGN:e=>Ar([Rc.ORGANIZATION_SETTINGS_DELEGATION_SPACE(e),Ac.COMMON.DESIGN]),ORGANIZATION_SETTINGS_DELEGATION_SPACE_INTEGRATION:e=>Ar([Rc.ORGANIZATION_SETTINGS_DELEGATION_SPACE(e),Ac.COMMON.INTEGRATION]),ORGANIZATION_SETTINGS_DELEGATION_SPACE_EMAIL_TEMPLATES:e=>Ar([Rc.ORGANIZATION_SETTINGS_DELEGATION_SPACE(e),Ac.COMMON.EMAIL_TEMPLATES]),ORGANIZATION_SETTINGS_DELEGATION_SPACE_SETTINGS:e=>Ar([Rc.ORGANIZATION_SETTINGS_DELEGATION_SPACE(e),Ac.COMMON.SETTINGS]),ORGANIZATION_DELEGATIONS:e=>Ar([Rc.ORGANIZATION(e),vc]),IS_BLOCKED:e=>Ar([e,Cc]),IS_EXPIRED:e=>Ar([e,Ec]),ORGANIZATION_FORM:e=>jc.FORM(e)},Mc="evenements.handicap-international.fr",Dc="www.partagetapassion.com",Oc="communaute.rncb.fr",wc="mariage.ravey.fr",Pc="registering.aso.fr",$c="billets.onepiecemarket.fr",kc=[Mc,Dc,Oc,wc,Pc,$c],Nc={[Mc]:1792,[Dc]:858,[Oc]:1773,[wc]:3306,[Pc]:3136,[$c]:3469},Lc=new Map([[1792,Mc],[858,Dc],[1773,Oc],[3306,wc],[3136,Pc],[3469,$c]]),zc={PLURAL:"delegations-categories",SINGLE:"delegation-category"},Fc={PLURAL:"delegations",SINGLE:"delegation"},Uc="accreditations",Bc="availabilities",Gc="positions",Vc={DELEGATIONS_CATEGORIES:zc.PLURAL,DELEGATION_CATEGORY:e=>Ar([zc.SINGLE,e]),DELEGATIONS:Fc.PLURAL,DELEGATION:e=>Ar([Fc.SINGLE,e])},Wc={DELEGATION_CATEGORY:({delegationCategoryId:e,...t})=>Ar(["eventId"in t&&t.eventId?rc.EVENT(t):ic.COMMUNITY(t),Vc.DELEGATION_CATEGORY(e)]),DELEGATION_CATEGORY_DASHBOARD:e=>Ar([Wc.DELEGATION_CATEGORY(e),Rr.DASHBOARD]),DELEGATION_CATEGORY_MEMBERS:e=>Ar([Wc.DELEGATION_CATEGORY(e),Rr.MEMBERS]),DELEGATION_CATEGORY_UPDATE:e=>Pr(Wc.DELEGATION_CATEGORY(e))},qc={DELEGATIONS:e=>Ar(["eventId"in e&&e.eventId?rc.EVENT(e):ic.COMMUNITY(e),Vc.DELEGATIONS]),DELEGATION:({delegationId:e,...t})=>Ar(["eventId"in t&&t.eventId?rc.EVENT(t):ic.COMMUNITY(t),Vc.DELEGATION(e)]),DELEGATION_DASHBOARD:e=>Ar([qc.DELEGATION(e),Rr.DASHBOARD]),DELEGATION_MEMBERS:e=>Ar([qc.DELEGATION(e),Rr.MEMBERS]),DELEGATION_ACCREDITATIONS:e=>Ar([qc.DELEGATION(e),Uc]),DELEGATION_REPORTING:e=>Ar([qc.DELEGATION(e),Rr.REPORTING]),DELEGATION_DOCUMENTS:e=>Ar([qc.DELEGATION(e),Rr.DOCUMENTS]),DELEGATION_TAB:e=>Ar([qc.DELEGATION(e),e.slug]),DELEGATION_MEMBERS_IMPORT:e=>Ar([qc.DELEGATION(e),Tr.IMPORT]),DELEGATION_MEMBER:({userInfoId:e,slug:t,...n})=>Ar([h(t)?qc.DELEGATION_TAB({...n,slug:t}):qc.DELEGATION_MEMBERS(n),Rr.MEMBER,e]),DELEGATION_MEMBER_INFORMATION:e=>Ar([qc.DELEGATION_MEMBER(e),Rr.INFORMATION]),DELEGATION_MEMBER_ACCREDITATIONS:e=>Ar([qc.DELEGATION_MEMBER(e),Uc]),DELEGATION_MEMBER_AVAILABILITIES:e=>Ar([qc.DELEGATION_MEMBER(e),Bc]),DELEGATION_MEMBER_POSITIONS:e=>Ar([qc.DELEGATION_MEMBER(e),Gc]),MEMBERS_INVITE:e=>Ar([qc.DELEGATION(e),Rr.MEMBERS,Tr.INVITE]),MEMBER_CREATE:({formId:e,...t})=>wr(Ar([qc.DELEGATION(t),Rr.MEMBER,Rr.FORM,e])),MEMBER_EDIT:({formId:e,...t})=>Pr(Ar([qc.DELEGATION_MEMBER(t),Rr.FORM,e])),DELEGATION_PROFILE:e=>Ar([qc.DELEGATION(e),Rr.PROFILE]),FIELDS_EDIT:e=>Pr(Ar([qc.DELEGATION(e),Er.FIELDS.PLURAL])),DELEGATION_FORM:({delegationId:e,...t})=>Ar([jc.FORM(t),Vc.DELEGATION(e)])},Yc={...Wc,...qc},Hc=(e,t)=>{t?.startsWith("/")||(console.warn(`Path '${t}' missing leading slash`),t="/"+t);const n=new Bi(sa.HEAVENT_PUBLIC_URL);return Lc.has(e)&&(n.host=Lc.get(e)),n.pathname+=t,n.href},Zc=({organizationId:e,eventId:t,delegationId:n,formId:i,teamCode:a,query:s})=>{const o=new Bi(sa.HEAVENT_PUBLIC_URL);return Lc.has(e)&&(o.host=Lc.get(e)),o.pathname+=`${(()=>{if(n)return"number"==typeof t?Yc.DELEGATION_FORM({organizationId:e,delegationId:n,eventId:t,formId:i}):Yc.DELEGATION_FORM({organizationId:e,delegationId:n,formId:i});{const n="number"==typeof t?rc.EVENT_FORM({organizationId:e,eventId:t,formId:i}):Rc.ORGANIZATION_FORM({organizationId:e,formId:i});return h(a)?`${n}/team/${a}`:n}})()}`,h(s?.email)&&o.searchParams.set("email",s.email),s?.preview&&o.searchParams.set("preview",s?.preview?.toString()),s?.previewState&&o.searchParams.set("state",s?.previewState?.toString()),o.href};var Kc;!function(e){e.QR="qr",e.Code39="code39"}(Kc||(Kc={}));const Qc=(e,t)=>{const n=new Bi(sa.HEAVENT_API_URL);return n.pathname+=`/barcode/${t?.barcodeType??Kc.QR}`,n.searchParams.set("text",e),n.searchParams.set("color",t?.color??"000000"),t?.height&&n.searchParams.set("height",t?.height?.toString()),t?.width&&n.searchParams.set("width",t?.width?.toString()),n.href};function Xc(e,t,n={}){const i=new Bi(sa.HEAVENT_API_URL);i.pathname+=`/documents/${e}.${t}`;const a=new URLSearchParams(Object.entries(n).filter(([e,t])=>h(t)));for(const[e,t]of a)i.searchParams.set(e,t);return i.href}var Jc=n(8389),eu=n(8047),tu=n(4757),nu=n(6452);function iu(e,t,n,i={}){const a=h(t.name)?t.name:"",s=e.toDisplayString(t.range,i.interval?.options),o=(0,po.A)([i.position?.includeName?n:"",a,i.slot?.includeRange||p(a)?s:"",i.position?.includeNameAtEnd?n:""]).join(" - ");return h(o)?o:n}function au(e){return`${e.name}${h(e.acronym)?` (${e.acronym})`:""}`}function su(e,t){const n=t[e.customField.slug];return"boolean"==typeof n&&e.customField.fieldType===Le.Checkbox?n===e.conditionValue:e.customField.fieldType===Le.Select&&e.customField.canSelectMultiple&&F(n)?(0,hd.A)(e.conditionValue,n??[]).length>0:e.customField.fieldType===Le.Select&&"number"==typeof n&&e.conditionValue.includes(n)}function ou(e,t){if(!F(e?.conditionsCustomFields))return!0;switch(e.conditionsOperator){case ue.Or:return e.conditionsCustomFields.some(e=>su(e,t));case ue.And:return e.conditionsCustomFields.every(e=>su(e,t));default:return ir(e.conditionsOperator)}}function ru(e){return h(e.address)}function du(e){return Io(e.latitude)&&Io(e.longitude)}function lu(e){return ru(e)||du(e)}function cu(e){return(0,ho.A)(Object.values((0,Ql.A)(e,e=>e.position.name)).map(e=>{const t=e[0].positionCategory,n=e[0].position,i=e.map(e=>e.positionSlot.range.start.toMillis());return{id:n.id,category:t.name,text:h(n.acronym)?n.acronym:n.name,minDate:(0,nu.A)(i),color:n.color,count:e.length,icon:n.icon}}),({category:e,text:t,minDate:n})=>[e.toLowerCase(),t.toLowerCase(),n])}function uu(e,t,n,i={}){const a=h(t.name)?t.name:"",s=t.date?h(i?.date?.format)?t.date.toFormat(i?.date?.format??""):e.toLocaleString(t.date,i?.date?.localeFormat||Za.DateOnly.Numeric):"",o=(0,po.A)([i?.accreditation?.includeName?n:"",a,s,i?.accreditation?.includeNameAtEnd?n:""]).join(" - ");return h(o)?o:h(i?.defaultName)?i?.defaultName:n}function mu(e){return(0,ho.A)(e,e=>[e.date?.toMillis()??1,e.name.toLowerCase()])}function gu(e){return"production"===s.Development?1===e:3136===e}function hu(e={}){const t=_(e.firstName||"").trim();return`${_(e.lastName||"").trim().toUpperCase()} ${t}`.trim()}const pu=(e,t)=>e.split(t).map(e=>e.trim().length>0?e.trim()[0]:"").join("").substring(0,3),fu=[b.colors.success600.value,b.colors.blueGray600.value,b.colors.blueLight600.value,b.colors.purple600.value,b.colors.pink600.value,b.colors.warning600.value];function Iu(e){const t=e.charCodeAt(0);return fu[t%fu.length]}const _u=/(\{([\w\.]+)\})/g,xu=/^user\.(accreditations|accreditationsSlots|firstAccreditationSlot|lastAccreditationSlot|positions|assignments|firstAssignment|lastAssignment)\./,yu=/^\d+$/,Su="nodate",ju=Number.MAX_SAFE_INTEGER;let bu=class{fieldService;dateTimeService;intervalService;constructor(e,t,n){this.fieldService=e,this.dateTimeService=t,this.intervalService=n}renderText(e,t={},n="HTML"){const i=t.separator??"
",a=t.delegation?this.getDelegation(t.delegation,t):t.volunteerRegistration?.delegation?this.getDelegation(t.volunteerRegistration.delegation,t):void 0,s=this.getFormats(t),o=t.assignments?this.getAssignments(t.assignments,s):void 0,r=t.accreditations?this.getAccreditations(t.accreditations,s,t):void 0,d={organization:t.organization||void 0,event:t.event?this.getEvent(t.event,t):void 0,delegation:a,team:a,invitedBy:t?.invitedBy?this.getUser(t.invitedBy,null,t):void 0,recipient:t?.recipient?this.getUser(t.recipient,null,t):void 0,user:t.userInfo?{...this.getUser(t.userInfo,a,t),...this.getUserAccreditations(r??[]),...this.getUserAssignments(o??[])}:void 0,...o?this.getAssignmentsVariables(o,i):{},...r?this.getAccreditationsVariables(r,i,t):{},...t.extraInfos},l=("HTML"===n?this.replaceVariables(e,ec(d)):(0,Zl.A)(e,{interpolate:/{([\s\S]+?)}/g})(d)).replace(_u,(e,n,i)=>{if(xu.test(i))return"";const[a,s,o,r]=i.split("."),d=t?.userInfo?{lang:this.getLanguage(t.userInfo)}:{};if(8===r?.length?d.date=r:16===r?.length&&(d.date=r.substring(0,8),d.endDate=r.substring(8)),t.userInfo?.links){const e=t.userInfo.links;return i.includes("planningDays")?Xc(e.userPlanningDaysLink,"pdf",d):i.includes("planningList")?Xc(e.userPlanningListLink,"pdf",d):i.includes("planning")?Xc(e.userPlanningLink,"pdf",d):i.includes("assignments")?Xc(e.userAssignmentsLink,"pdf",d):i.includes("paris20kmassignment")&&e?.userCustomBadgeLinks[me.Paris20kmassignment]?Xc(e.userCustomBadgeLinks[me.Paris20kmassignment],"pdf",d):""}return""});return l}replaceVariables(e,t){return e.replace(_u,(e,n,i)=>{const a=Object.hasOwn(t,i)?t[i]:void 0;return void 0===a||Array.isArray(a)?e:String(a)})}getDelegation(e,t){const n=t.customFields||[],i=this.getFields(e.fields,n);return{...e,...i,leader:{email:e.leaders?.[0]?.email??"",firstName:e.leaders?.[0]?.firstName??"",lastName:e.leaders?.[0]?.lastName??"",phone:e.leaders?.[0]?.phone?.internationalFormat??""},formLink:Zc({organizationId:e.organizationId,eventId:e.eventId,delegationId:e.id,formId:e.formId}),spaceLink:Hc(e.organizationId,Dr(Rc.ORGANIZATION_DELEGATIONS({organizationId:e.organizationId})))}}getEvent(e,t){const n=t.customFields||[],i=this.getFields(e.fields,n),a=t.organization?.dateFormat??"yyyy-MM-dd";return{id:e.id,name:e.name,...i,startDate:e.startAt?.toFormat(a)??"",endDate:e.endAt?.toFormat(a)??""}}getFormats(e){return{date:e.organization?.dateFormat||"yyyy-MM-dd",datetime:e.organization?.datetimeFormat||"yyyy-MM-dd HH:mm",time:e.organization?.timeFormat||"HH:mm"}}getAssignments(e,t){return(0,ho.A)(e,e=>e.positionSlot.range.start.toMillis()).map(({id:e,position:n,positionSlot:i})=>{const a=i.range.start,s=i.range.end,o={id:n.category.id,name:n.category.name};return{acronym:n.acronym??"",category:o,date:a.toFormat(t.date),dateKey:a.toFormat("yyyyMMdd"),dateLong:this.dateTimeService.toLocaleString(a,Za.DateOnly.WeekdayLongMonthLong),endDate:s.toFormat(t.date),endDatetime:s.toFormat(t.datetime),id:e,leaders:this.getLeaders((0,yr.A)(n.category.leaders.concat(n.leaders),e=>e.userInfo.id)),name:n.name,position:{acronym:n.acronym??"",address:n.address??"",category:o,color:n.color,description:n.description,id:n.id,name:n.name},range:this.intervalService.toDisplayString(i.range,{formats:{displayWeekday:!0}}),slot:{durationHours:(0,Kl.A)(i.timeDifferenceMinutes/60,1),durationMinutes:i.timeDifferenceMinutes,endTime:s.toFormat(t.time),id:i.id,name:i.name,startTime:a.toFormat(t.time)},startDate:a.toFormat(t.date),startDatetime:a.toFormat(t.datetime)}})}getAssignmentsVariables(e,t){const n=Object.fromEntries(Object.values((0,Ql.A)(e,e=>e.dateKey)).map(e=>[`positions.${e[0].dateKey}`,(0,ho.A)((0,Na.A)(e.map(({position:e})=>e.name))).join(t)])),i=(0,Yo.A)(e,({slot:e})=>e.durationMinutes);return{assignmentsDays:(0,yr.A)(e,({dateKey:e})=>e).map(({dateLong:e})=>e).join(", "),positionsCategories:(0,ho.A)((0,Na.A)(e.map(({position:e})=>e.category.name))).join(", "),positions:(0,ho.A)((0,Na.A)(e.map(({position:e})=>e.name))).join(", "),volunteerMinutes:i,volunteerHours:(0,Kl.A)(i/60,1),...n}}getAccreditations(e,t,n){const i=!!n.organization&&gu(n.organization.id);return(0,ho.A)(e,e=>e.accreditationSlot.date?.isValid?e.accreditationSlot.date.toMillis():ju).map(({accreditation:e,accreditationCategory:n,accreditationSlot:a})=>{const s=a.date?.isValid??!1,o=t=>uu(this.dateTimeService,a,e.name,{accreditation:{includeName:t},date:{localeFormat:Za.DateOnly.WeekdayLongMonthLong}});return{accreditation:{acronym:e.acronym??"",address:e.address??"",color:e.color,description:e.description,icon:e.icon,id:e.id,name:e.name},acronym:e.acronym??"",category:{id:n.id,name:n.name},date:s?a.date.toFormat(t.date):"",dateKey:s?a.date.toFormat("yyyyMMdd"):Su,dateLong:s?this.dateTimeService.toLocaleString(a.date,Za.DateOnly.WeekdayLongMonthLong):"",displayName:o(!i),fullName:o(!0),hasDate:s,name:e.name,slot:{id:a.id,name:a.name}}})}getAccreditationsVariables(e,t,n){const[i,a]=(0,Xl.A)(e,({hasDate:e})=>e),s=Object.values((0,Ql.A)(i,({dateKey:e})=>e)),o=Object.fromEntries(s.map(e=>[`accreditations.${e[0].dateKey}`,(0,ho.A)((0,Na.A)(e.map(({name:e})=>e))).join(t)])),r=Object.fromEntries(s.map(e=>[`accreditationsSlots.${e[0].dateKey}`,e.map(({fullName:e})=>e).join(t)]));return{accreditationsCategories:(0,ho.A)((0,Na.A)(e.map(({category:e})=>e.name))).join(t),accreditationsDates:(0,yr.A)(i,({dateKey:e})=>e).map(({dateLong:e})=>e).join(t),accreditationsText:(0,ho.A)((0,Na.A)(e.map(({name:e})=>e))).join(t),accreditationsSlots:(0,ho.A)(e.map(({displayName:e})=>e)).join(t),[`accreditations.${Su}`]:(0,ho.A)((0,Na.A)(a.map(({name:e})=>e))).join(t),[`accreditationsSlots.${Su}`]:(0,ho.A)((0,Na.A)(a.map(({fullName:e})=>e))).join(t),omFonction:this.getOmFonction(n),...o,...r}}getUserAccreditations(e){const t=this.getDistinct(e,e=>e.accreditation.id,(e,t,n)=>({...e.accreditation,category:e.category,firstSlot:t,lastSlot:n}),e=>this.getLastAccreditationSlot(e));return{accreditations:this.toKeyedItems(t,({acronym:e})=>e),accreditationsSlots:this.toKeyedItems(e),firstAccreditationSlot:e[0],lastAccreditationSlot:this.getLastAccreditationSlot(e)}}getUserAssignments(e){const t=this.getDistinct(e,e=>e.position.id,(e,t,n)=>({...e.position,firstSlot:t,lastSlot:n}),Gl.A);return{positions:this.toKeyedItems(t,({acronym:e})=>e),assignments:this.toKeyedItems(e),firstAssignment:e[0],lastAssignment:(0,Gl.A)(e)}}getDistinct(e,t,n,i){return(0,yr.A)(e,t).map(a=>{const s=e.filter(e=>t(e)===t(a));return n(a,s[0],i(s))})}getLastAccreditationSlot(e){return(0,Jl.A)(e,({hasDate:e})=>e)??(0,Gl.A)(e)}toKeyedItems(e,t){const n={};if(t)for(const i of e){const e=g(t(i),{replacer:o.Underscore});!h(e)||yu.test(e)||Object.hasOwn(n,e)||(n[e]=i)}return{...n,...Object.fromEntries(e.map((e,t)=>[`${t+1}`,e]))}}getOmFonction(e){return e.organization&&3953===e.organization.id?(e.accreditations??[]).find(e=>50851===e.accreditation.fields.cf74460)?.accreditation.name??e.userInfo?.fields?.cf73819?.value??"":""}getLeaders(e){return e.map(({userInfo:e})=>({email:e.email,firstName:e.firstName??"",lastName:e.lastName??"",name:e.name,phone:e.phone?.internationalFormat??""}))}getUser(e,t,n){const i=n.customFields||[],a=this.getFields(e.fields,i),s=this.getLanguage(e),o=s?{lang:s.toString()}:{},r=e.links?Xc(e.links.userAssignmentsLink,"pdf",o):"",d=e.links?Xc(e.links.userPlanningLink,"pdf",o):"",l=e.links?Xc(e.links.userPlanningListLink,"pdf",o):"",c=e.links?Xc(e.links.userPlanningDaysLink,"pdf",o):"",u=e.links?{assignments:r,badge:Xc(e.links.userBadgeLink,"pdf",o),certificate:Xc(e.links.userCertificateLink,"pdf",o),planning:d,planningList:l,planningDays:c,...Object.fromEntries(Object.entries(e.links.userCustomBadgeLinks).map(([e,t])=>[e.toLowerCase(),Xc(t,"pdf",o)])),...Object.fromEntries(Object.entries(e.links.userCustomDocumentLinks).map(([e,t])=>[e,Xc(t,"pdf",o)]))}:{},m=n.volunteerRegistration?.ticketId??"",g=(e.fields.isExpanded?e.fields?.firstName?.value:e.fields.firstName)||"",h=(e.fields.isExpanded?e.fields?.lastName?.value:e.fields.lastName)||"",p=`
\n \n
`;return{id:e.id,organizationLocalId:e.localId,localId:n.volunteerRegistration?.localId||"",email:e.email,...a,firstName:g,lastName:h,ticketId:m,qrcode:p,memberCode:n.volunteerRegistration?.weezevent?.memberCode||"",name:hu({firstName:g,lastName:h}),registrationDate:e.registrationDate?.toFormat(n.organization?.dateFormat??"yyyy-MM-dd")??"",registrationDatetime:e.registrationDate?.toFormat(n.organization?.datetimeFormat??"yyyy-MM-dd HH:mm")??"",assignmentSheet:n.event?r:"",documents:u,team:t,delegation:{...t,name:t?.name??"",leader:{email:t?.leader?.email??"",firstName:t?.leader?.firstName??"",lastName:t?.leader?.lastName??"",phone:t?.leader?.phone??""},spaceLink:t?.spaceLink??""},weezevent:{barcode:m,qrcode:p,identificationNumber:""},profile:n.volunteerRegistration?.accreditationProfile?.name??"",profileCategory:n.volunteerRegistration?.accreditationProfile?.accreditationProfileCategory.name??""}}getFields(e,t){return e.isExpanded?Object.fromEntries(Object.entries(e).flatMap(([e,{label:t,value:n}])=>{const i=F(n)?n.join(", "):h(n)?n:"";return(0,po.A)([[e,i],h(t)?[g(t,{replacer:o.Underscore}),i]:null])})):Object.fromEntries(t.flatMap(t=>{const n=this.fieldService.getValueString(t,e);return(0,po.A)([[t.slug,n],h(t.label)?[g(t.label,{replacer:o.Underscore}),n]:null])}))}getLanguage(e){return e.fields.isExpanded?e.fields?.language?.rawValue:e.fields?.language}};bu=function(e,t,n,i){var a,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(a=e[r])&&(o=(s<3?a(o):s>3?a(t,n,o):a(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o}([(0,En._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[bd,pd,Yl])],bu);var vu=n(7356);let Au=class{validate(e){return async t=>{try{return await e.validate(t,{abortEarly:!1,strict:!0}),{}}catch(e){return this.errorToObject(e)}}}validateSync(e,t){try{return e.validateSync(t,{abortEarly:!1,strict:!0}),{}}catch(e){return this.errorToObject(e)}}isValidSync(e,t){return 0===Object.keys(this.validateSync(e,t)).length}validateForForm(e){return async t=>{try{return await e.validate(t,{abortEarly:!1,strict:!0}),{}}catch(e){return e.inner.reduce((e,t)=>(0,vu.Oe)(e,t.path,t.message),{})}}}errorToObject(e){return e.inner.reduce((e,t)=>({...e,[t.path]:t.message}),{})}};function Cu(e){return function(e){return!!e&&!Array.isArray(e)}(e)?e:Array.isArray(e)&&e.length>0?{operator:pt.And,groups:[{operator:pt.And,predicates:e}]}:{operator:pt.And,groups:[]}}Au=function(e,t,n,i){var a,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(a=e[r])&&(o=(s<3?a(o):s>3?a(t,n,o):a(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o}([(0,En._G)()],Au);const Eu=["formsInsertedAt","campaignSentAt"];function Tu(e){return Eu.includes(e)}function Ru(e){return Tu(e.slug)?{...e,value:e.value2,value2:e.value3,value3:e.value}:e}const Mu=[Le.Date,Le.Number,Le.Text,Le.Textarea],Du=[Le.Phone,Le.Select,Le.Text,Le.Textarea];function Ou(e){return e.groups.flatMap(e=>e.filtersPredicates)}function wu(e,t){return F(e.values)?e.values.map(({id:e,name:n})=>(0,i.jsx)("option",{value:e,children:t(n)},e)):F(e.valuesGroups)?e.valuesGroups.map(({name:e,values:t},n)=>(0,i.jsx)("optgroup",{label:e,children:t.map(e=>(0,i.jsx)("option",{value:e.id,children:e.name},e.id))},n)):[]}let Pu=class extends bo{countriesService;dateTimeService;constructor(e,t,n){super(n),this.countriesService=e,this.dateTimeService=t}filterPredicateToText(e){const{filter:t}=e,n=e.predicate&&Ru(e.predicate);if(!n)return"";{const i=$a.c9.isDateTime(n.value)?n.value:h(n.value)?$a.c9.fromISO(n.value,{zone:"utc",setZone:!0}):$a.c9.invalid("Not valid predicate.value"),a=!i.isValid||t.fieldType!==Ue.DateTimeRange&&t.fieldType!==Ue.Datetime?i.isValid&&t.fieldType===Ue.Date?this.dateTimeService.toLocaleString(i,Za.DateOnly.MonthLong):n.value:this.dateTimeService.toLocaleString(i,Za.DateTime),s=$a.c9.isDateTime(n.value2)?n.value2:h(n.value2)?$a.c9.fromISO(n.value2,{zone:"utc",setZone:!0}):$a.c9.invalid("Not valid predicate.value2"),o=!s.isValid||t.fieldType!==Ue.DateTimeRange&&t.fieldType!==Ue.Datetime?s.isValid&&t.fieldType===Ue.Date?this.dateTimeService.toLocaleString(s,Za.DateOnly.MonthLong):n.value2:this.dateTimeService.toLocaleString(s,Za.DateTime),r=n.value3;switch(n.operator){case ht.Contains:return"condition"===t.slug?this.conditionFilterToString(e):"wishedPositions"===t.slug?this.t("mission_souhait_38008",o,this.valueToString(t,a)):"wishedPositionsCategories"===t.slug?this.t("cat_gorie_souha_24744",o,this.valueToString(t,a)):"isDelegationLeader"===t.slug?this.t("est_responsable_13012",this.valueToString(t,a)):this.t("_1_contient_2_40552",t.name,a);case ht.NotContains:return this.t("_1_ne_contient_14612",t.name,a);case ht.Is:if("isLeader"===t.slug)return this.t("est_responsable_19679");if("isPositionLeader"===t.slug)return this.t("est_responsable_27270");if("isPositionCategoryLeader"===t.slug)return this.t("est_responsable_72923");if("isDelegationLeader"===t.slug)return this.t("est_responsable_87662");if("privacy"===t.slug)return this.t("visibilit_est_12738");if("campaign"===t.slug)return this.campaignFilterToString(e);if("campaignReply"===t.slug)return this.campaignReplyFilterToString(e);if("condition"===t.slug)return this.t("champ_dont_un_a_44854");if("numberOfAssignmentsPerDay"===t.slug||"volunteersMinutesDays"===t.slug)return this.t("_1_pour_la_jou_73174",t.name,this.dateTimeService.toLocaleString(i,Za.DateOnly.MonthLong),o);if(t.fieldType===Ue.Date)return this.t("_1_est_gal_43375",t.name,this.valueDateToString(n.valueDate));if(t.fieldType===Ue.Datetime||t.fieldType===Ue.DateTimeRange){const e=i?.isValid?this.dateTimeService.toLocaleString(i,Za.DateOnly.MonthLong):n.value;return this.t("_1_est_gal_43375",t.name,e)}return this.t("_1_est_gal_43375",t.name,this.valueToString(t,a));case ht.IsNot:if("isLeader"===t.slug)return this.t("n_est_pas_respo_55625");if("isPositionLeader"===t.slug)return this.t("n_est_pas_respo_35508");if("isPositionCategoryLeader"===t.slug)return this.t("n_est_pas_respo_07811");if("isDelegationLeader"===t.slug)return this.t("n_est_pas_respo_91275");if("privacy"===t.slug)return this.t("visibilit_est_55411");if("condition"===t.slug)return this.t("champ_d_pendant_33676");if("numberOfAssignmentsPerDay"===t.slug||"volunteersMinutesDays"===t.slug)return this.t("_1_pour_la_jou_61197",t.name,this.dateTimeService.toLocaleString(i,Za.DateOnly.MonthLong),o);if(t.fieldType===Ue.Date)return this.t("_1_n_est_pas_38478",t.name,this.valueDateToString(n.valueDate));if(t.fieldType===Ue.Datetime||t.fieldType===Ue.DateTimeRange){const e=i?.isValid?this.dateTimeService.toLocaleString(i,Za.DateOnly.MonthLong):n.value;return this.t("_1_n_est_pas_38478",t.name,e)}return this.t("_1_n_est_pas_38478",t.name,this.valueToString(t,a));case ht.IsEmpty:return this.t("_1_est_vide_08225",t.name);case ht.IsNotEmpty:return this.t("_1_n_est_pas_v_31530",t.name);case ht.IsValid:return this.t("_1_est_valide_45209",t.name);case ht.IsNotValid:return this.t("_1_n_est_pas_v_05077",t.name);case ht.GreaterThan:return"numberOfAssignmentsPerDay"===t.slug||"volunteersMinutesDays"===t.slug?this.t("_1_pour_la_jou_91055",t.name,this.dateTimeService.toLocaleString(i,Za.DateOnly.MonthLong),o):this.t("_1_est_plus_gr_93527",t.name,n.value);case ht.GreaterThanEqual:return"numberOfAssignmentsPerDay"===t.slug||"volunteersMinutesDays"===t.slug?this.t("_1_pour_la_jou_41388",t.name,this.dateTimeService.toLocaleString(i,Za.DateOnly.MonthLong),o):this.t("_1_est_gal_ou_95771",t.name,n.value);case ht.LessThan:return"numberOfAssignmentsPerDay"===t.slug||"volunteersMinutesDays"===t.slug?this.t("_1_pour_la_jou_99548",t.name,this.dateTimeService.toLocaleString(i,Za.DateOnly.MonthLong),o):this.t("_1_est_plus_pe_18306",t.name,n.value);case ht.LessThanEqual:return"numberOfAssignmentsPerDay"===t.slug||"volunteersMinutesDays"===t.slug?this.t("_1_pour_la_jou_37455",t.name,this.dateTimeService.toLocaleString(i,Za.DateOnly.MonthLong),o):this.t("_1_est_gal_ou_39305",t.name,n.value);case ht.Overlaps:return this.t("_1_chevauche_45834",t.name,a,o);case ht.NotOverlaps:return this.t("_1_ne_chevauch_01846",t.name,a,o);case ht.Engulfs:return this.t("_1_engloutis_32228",t.name,a,o);case ht.NotEngulfs:return this.t("_1_n_engloutis_52951",t.name,a,o);case ht.EngulfedBy:return this.t("_1_est_englout_36064",t.name,a,o);case ht.NotEngulfedBy:return this.t("_1_n_est_pas_e_89161",t.name,a,o);case ht.IsBefore:return this.t("_1_est_avant_l_83271",t.name,a);case ht.IsAfter:return this.t("_1_est_apr_s_l_63712",t.name,a);case ht.Between:return"numberOfAssignmentsPerDay"===t.slug||"volunteersMinutesDays"===t.slug?this.t("_1_pour_la_jou_66546",t.name,this.dateTimeService.toLocaleString(i,Za.DateOnly.MonthLong),o,r):this.t("_1_est_entre_39871",t.name,a,o);case ht.StartsWith:return this.t("_1_commence_pa_47720",t.name,a);case ht.EndsWith:return this.t("_1_finit_par_65840",t.name,a);case ht.ThisDayMonth:return this.t("_1_est_aujourd_09227",t.name);case ht.Today:return this.t("_1_est_aujourd_42954",t.name);case ht.IsInLast:return this.t("_1_est_dans_le_96995",t.name,a);case ht.IsMoreThanAgo:return this.t("_1_est_il_y_a_01320",t.name,a);case ht.IsInNext:return this.t("_1_est_dans_le_19106",t.name,a);case ht.IsMoreThanAhead:return this.t("_1_est_dans_pl_88491",t.name,a);default:return ir(n.operator)}}}getValues(e){return e.fieldType===Le.Sex?ci.map(e=>({id:e,name:this.t(e)})):e.fieldType===Le.Language?e.fieldProperty===ke.Language?nd.map(e=>({id:e,name:this.t(e)})):Hn.map(e=>({id:e,name:this.t(e)})):e.fieldType===Le.Nationality?this.countriesService.getNationalitiesIdName():e.fieldType===Le.Country?this.countriesService.getCountriesIdName():e.fieldType===Le.Select&&F(e.values)?e.values.map(({id:e,value:t})=>({id:e,name:t})):[]}valueToString(e,t){const n=function(e){return F(e.values)?e.values:F(e.valuesGroups)?e.valuesGroups.flatMap(e=>e.values):[]}(e);return F(n)?z(t).map(e=>this.t(n.find(({id:t})=>t===e)?.name??e)).join(` ${this.t("ou_67404")} `):this.t(t)}valueDateToString(e){const t=[];return"number"==typeof e?.day&&-1!==e.day&&t.push(e.day),"number"==typeof e?.month&&-1!==e.month&&t.push(this.dateTimeService.toLocaleString($a.c9.now().set({month:e.month}),{month:"long"})),"number"==typeof e?.year&&-1!==e.year&&t.push(e.year),t.join(" ")}conditionFilterToString(e){if(e.predicate){const t=e.predicate.value.map(t=>e.filter.values?.find(e=>e.id===t)?.name??"");return 1===t.length?this.t("d_pend_du_champ_43516",t[0]):this.t("d_pend_des_cham_85348",t.join(", "))}return""}campaignFilterToString(e){if(e.predicate){const t=e.predicate.value.map(t=>e.filter.campaigns?.find(e=>e.id===t)?.name??"").join(", "),n=e.predicate.value2.map(e=>this.t(e)).join(", ");return this.t("a_re_u_un_messa_76546",t,n)}return""}campaignReplyFilterToString(e){if(e.predicate){const t=e.predicate.value.map(t=>e.filter.campaigns?.find(e=>e.id===t)?.name??"").join(", ");return this.t("la_r_ponse_des_14160",t,e.predicate.value2)}return""}customFieldsToFilters(e){return e.filter(({fieldType:e})=>[Ue.Address,Ue.Checkbox,Ue.Country,Ue.Date,Ue.Datetime,Ue.File,Ue.Language,Ue.Nationality,Ue.Number,Ue.Phone,Ue.Select,Ue.Sex,Ue.Text,Ue.Textarea,Ue.Validation].includes(e)).map(e=>({...e,category:this.t("champs_de_formu_64126"),fieldType:e.fieldType,values:this.getValues(e),color:"warning",isEncrypted:e.isEncrypted}))}customFieldsToPossibleColumns(e){return e.map(e=>({slug:e.slug,name:e.name,label:e.label,customField:e,isSearchable:Du.includes(e.fieldType),isSortable:!!Mu.includes(e.fieldType)||e.fieldType===Le.Select&&e.isSelectV2&&!e.canSelectMultiple,sortAttribute:e.slug,width:e.fileType===Fe.Picture?80:void 0,minWidth:e.fileType===Fe.Picture?void 0:180}))}};Pu=function(e,t,n,i){var a,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(a=e[r])&&(o=(s<3?a(o):s>3?a(t,n,o):a(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o}([(0,En._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[ed,pd,bi])],Pu);var $u;!function(e){e.Acronym="acronym",e.Address="address",e.AutoAccredit="autoAccredit",e.Category="category",e.Color="color",e.Conditions="conditions",e.CreatedAt="createdAt",e.CreatedBy="createdBy",e.Description="description",e.FillingRate="fillingRate",e.Icon="icon",e.IconColor="iconColor",e.Id="id",e.Index="index",e.Latitude="latitude",e.Longitude="longitude",e.Name="name",e.PrivateNote="privateNote",e.MaxResources="maxResources",e.AssignedResources="resources",e.Slot="slot",e.SlotDate="slotDate",e.SlotName="slotName",e.ScannedResources="scannedResources",e.WishedResources="wishedResources",e.Tags="tags",e.WeezeventChecklistId="weezeventChecklistId",e.WeezeventIsSynchronized="weezeventIsSynchronized"}($u||($u={}));let ku=class extends Pu{constructor(e,t,n){super(e,t,n)}getAccreditationsFilters(e,t){return(0,po.A)([{slug:"name",name:this.t("AccreditationName"),category:this.t("accr_ditations_39450"),fieldType:Ue.Text,hideEmpty:!0},{slug:"accreditation",name:this.t("Accreditation"),category:this.t("accr_ditations_39450"),fieldType:Ue.Select,hideEmpty:!0,needLoading:!0,eventId:e.id},{slug:$u.Description,name:this.t("Description"),category:this.t("accr_ditations_39450"),fieldType:Ue.Text},{slug:$u.PrivateNote,name:this.t("note_priv_e_06303"),category:this.t("accr_ditations_39450"),fieldType:Ue.Text},F(e.accreditationsCategories)?{slug:"accreditationCategory",name:this.t("cat_gorie_00291"),category:this.t("accr_ditations_39450"),fieldType:Ue.Select,values:(0,ho.A)(e.accreditationsCategories,e=>m(e.name)),hideEmpty:!0}:null,{slug:"slotName",name:this.t("nom_du_cr_neau_54351"),category:this.t("accr_ditations_39450"),fieldType:Ue.Text},{slug:"slotDate",name:this.t("Date"),category:this.t("accr_ditations_39450"),fieldType:Ue.Date},{slug:"tag",name:"Tag",category:this.t("accr_ditations_39450"),fieldType:Ue.Select,needLoading:!0,organizationId:e.organizationId,eventId:e.id,tagContext:wt.Accreditations},{slug:"accreditationCustomField",name:this.t("condition_61066"),category:this.t("accr_ditations_39450"),fieldType:Ue.Select,needLoading:!0,organizationId:e.organizationId},{slug:"acronym",name:this.t("Acronym"),category:this.t("accr_ditations_39450"),fieldType:Ue.Text},{slug:"color",name:this.t("Color"),category:this.t("accr_ditations_39450"),fieldType:Ue.Text,hideEmpty:!0},{slug:"icon",name:this.t("ic_ne_55554"),category:this.t("accr_ditations_39450"),fieldType:Ue.Select,values:qn.map(e=>({id:e,name:this.t(e)})),hideEmpty:!0},{slug:"address",name:this.t("Address"),category:this.t("accr_ditations_39450"),fieldType:Ue.Text},{slug:"fillingRate",name:this.t("taux_de_remplis_11913"),category:this.t("accr_ditations_39450"),fieldType:Ue.Number,hideEmpty:!0},{slug:$u.CreatedBy,name:this.t("cr_e_par_30622"),category:this.t("accr_ditations_39450"),fieldType:Ue.Select,hideEmpty:!0,needLoading:!0,organizationId:e.organizationId,eventId:e.id},{slug:$u.CreatedAt,name:this.t("cr_e_le_02658"),category:this.t("accr_ditations_39450"),fieldType:Ue.Datetime,hideEmpty:!0},e.isWeezeventConnected?{slug:$u.WeezeventChecklistId,name:this.t("WeezeventChecklistId"),category:this.t("accr_ditations_39450"),fieldType:Ue.Number}:null,...this.customFieldsToFilters(t)])}getAccreditationsPossibleColumns(e,{isWeezeventConnected:t}){const n=[{slug:$u.Id,name:this.t("id_51738"),isSearchable:!0,isSortable:!0,sortAttribute:X.Id,width:100},{slug:$u.Name,name:this.t("AccreditationName"),isSearchable:!0,isSortable:!0,sortAttribute:X.Name,minWidth:240},{slug:$u.Description,name:this.t("Description"),minWidth:320},{slug:$u.Category,name:this.t("nom_de_la_cat_g_03860"),isSearchable:!0,isSortable:!0,sortAttribute:X.Category,minWidth:240},{slug:$u.SlotName,name:this.t("nom_du_cr_neau_54351"),isSearchable:!0,minWidth:240},{slug:$u.SlotDate,name:this.t("Date"),minWidth:180,isSortable:!0,sortAttribute:Q.Date},{slug:$u.AssignedResources,name:this.t("membres_11310"),minWidth:320},{slug:$u.Tags,name:this.t("tags_79499"),isSearchable:!0,minWidth:240},{slug:$u.Conditions,name:this.t("conditions_77756"),minWidth:320},{slug:$u.Address,name:this.t("Address"),isSearchable:!0,minWidth:240},{slug:$u.Latitude,name:this.t("latitude_46176"),isSearchable:!0,minWidth:180},{slug:$u.Longitude,name:this.t("longitude_01695"),isSearchable:!0,minWidth:180},{slug:$u.Acronym,name:this.t("Acronym"),isSearchable:!0,isSortable:!0,sortAttribute:X.Acronym,minWidth:180},{slug:$u.Color,name:this.t("Color"),isSearchable:!0,width:80},{slug:$u.Icon,name:this.t("ic_ne_55554"),width:80},{slug:$u.IconColor,name:this.t("ic_ne_et_couleu_54485"),width:80},{slug:$u.FillingRate,name:this.t("taux_de_remplis_11913"),minWidth:240},{slug:$u.CreatedBy,name:this.t("cr_e_par_30622"),isSearchable:!0,minWidth:180},{slug:$u.CreatedAt,name:this.t("cr_e_le_02658"),isSortable:!0,sortAttribute:X.CreatedAt,minWidth:180},{slug:$u.AutoAccredit,name:this.t("AutoAccredit"),minWidth:180},{slug:$u.Index,name:this.t("Index"),isSortable:!0,sortAttribute:X.Index,width:200}];return t&&n.push({slug:$u.WeezeventIsSynchronized,name:this.t("WeezeventIsSynchronized"),minWidth:180},{slug:$u.WeezeventChecklistId,name:this.t("WeezeventChecklistId"),minWidth:180}),n.concat(this.customFieldsToPossibleColumns(e))}};ku=function(e,t,n,i){var a,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(a=e[r])&&(o=(s<3?a(o):s>3?a(t,n,o):a(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o}([(0,En._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[ed,pd,bi])],ku);var Nu;!function(e){e.Accreditation="accreditation",e.Accreditations="accreditations",e.AccreditationProfile="accreditation_profile",e.AccreditationSlot="accreditationSlotId",e.Acronym="acronym",e.Category="category",e.Color="color",e.CreatedAt="createdAt",e.CreatedBy="createdBy",e.Description="description",e.Icon="icon",e.IconColor="iconColor",e.Id="id",e.Name="name"}(Nu||(Nu={}));let Lu=class extends Pu{constructor(e,t,n){super(e,t,n)}getAccreditationsProfilesFilters(e){const t=this.t("profils_d_accr_27825");return[{slug:Nu.Name,name:this.t("nom_08311"),category:t,fieldType:Ue.Text,hideEmpty:!0},{slug:Nu.AccreditationProfile,name:this.t("profil_d_accr_d_02274"),category:t,fieldType:Ue.Select,hideEmpty:!0,needLoading:!0,eventId:e.id},...F(e.accreditationsProfilesCategories)?[{slug:Nu.Category,name:this.t("cat_gorie_00291"),category:t,fieldType:Ue.Select,values:(0,ho.A)(e.accreditationsProfilesCategories,e=>m(e.name)),hideEmpty:!0}]:[],{slug:Nu.Description,name:this.t("Description"),category:t,fieldType:Ue.Text},{slug:Nu.Accreditation,name:this.t("Accreditation"),category:t,fieldType:Ue.Select,hideEmpty:!0,needLoading:!0,eventId:e.id},{slug:Nu.AccreditationSlot,name:this.t("cr_neaux_accr_d_70934"),category:t,fieldType:Ue.Select,hideEmpty:!0,needLoading:!0,eventId:e.id},{slug:Nu.Acronym,name:this.t("Acronym"),category:t,fieldType:Ue.Text},{slug:Nu.Color,name:this.t("Color"),category:t,fieldType:Ue.Text,hideEmpty:!0},{slug:Nu.Icon,name:this.t("ic_ne_55554"),category:t,fieldType:Ue.Select,values:qn.map(e=>({id:e,name:this.t(e)})),hideEmpty:!0},{slug:Nu.CreatedBy,name:this.t("cr_e_par_30622"),category:t,fieldType:Ue.Select,hideEmpty:!0,needLoading:!0,organizationId:e.organizationId,eventId:e.id},{slug:Nu.CreatedAt,name:this.t("cr_e_le_02658"),category:t,fieldType:Ue.Datetime,hideEmpty:!0}]}getAccreditationsProfilesPossibleColumns(){return[{slug:Nu.Id,name:this.t("id_51738"),isSearchable:!0,isSortable:!0,width:100,sortAttribute:K.Id},{slug:Nu.Name,name:this.t("nom_08311"),isSearchable:!0,isSortable:!0,sortAttribute:K.Name,minWidth:240},{slug:Nu.Description,name:this.t("Description"),minWidth:320},{slug:Nu.Category,name:this.t("cat_gorie_00291"),isSearchable:!0,isSortable:!0,sortAttribute:K.Category,minWidth:200},{slug:Nu.Accreditations,name:this.t("accr_ditations_39450"),minWidth:320},{slug:Nu.Acronym,name:this.t("Acronym"),isSearchable:!0,minWidth:160},{slug:$u.Color,name:this.t("Color"),isSearchable:!0,width:80},{slug:$u.Icon,name:this.t("ic_ne_55554"),width:80},{slug:$u.IconColor,name:this.t("ic_ne_et_couleu_54485"),width:80},{slug:Nu.CreatedBy,name:this.t("cr_e_par_30622"),isSearchable:!0,minWidth:180},{slug:Nu.CreatedAt,name:this.t("cr_e_le_02658"),isSortable:!0,sortAttribute:K.CreatedAt,minWidth:180}]}};Lu=function(e,t,n,i){var a,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(a=e[r])&&(o=(s<3?a(o):s>3?a(t,n,o):a(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o}([(0,En._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[ed,pd,bi])],Lu);var zu;!function(e){e.Features="features",e.Id="id",e.InsertedAt="insertedAt",e.MembersLimit="membersLimit",e.Name="name",e.NumberOfEvents="numberOfEvents",e.NumberOfMembers="numberOfMembers",e.PeriodEndAt="periodEndAt",e.PricePerMember="pricePerMember",e.WeezeventOrganizationId="weezeventOrganizationId"}(zu||(zu={}));let Fu=class extends Pu{constructor(e,t,n){super(e,t,n)}getFilters(){return[{slug:"features",name:this.t("fonctionnalit_s_47714"),category:this.t("organisation_71863"),fieldType:Ue.Select,values:Fn.map(e=>({id:e,name:e})),hideEmpty:!0},{slug:"isAdmin",name:this.t("est_admin_98471"),category:this.t("organisation_71863"),fieldType:Ue.Checkbox,hideEmpty:!0},{slug:"isActive",name:this.t("est_active_05309"),category:this.t("organisation_71863"),fieldType:Ue.Checkbox,hideEmpty:!0},{slug:"useOldBilling",name:this.t("utilise_l_ancie_27299"),category:this.t("organisation_71863"),fieldType:Ue.Checkbox},{slug:"isOverLimit",name:this.t("d_passe_la_limi_27046"),category:this.t("organisation_71863"),fieldType:Ue.Checkbox,hideEmpty:!0},{slug:zu.MembersLimit,name:this.t("nombre_de_membr_16400"),category:this.t("organisation_71863"),fieldType:Ue.Number},{slug:zu.PricePerMember,name:this.t("prix_par_membre_20633"),category:this.t("organisation_71863"),fieldType:Ue.Number}]}getPossibleColumns(){return[{slug:zu.Id,name:this.t("id_51738"),isSortable:!0,sortAttribute:it.Id,width:100},{slug:zu.Name,name:this.t("nom_de_l_organi_49583"),minWidth:240},{slug:zu.InsertedAt,name:this.t("date_de_cr_atio_00749"),isSortable:!0,sortAttribute:it.InsertedAt,width:200},{slug:zu.PeriodEndAt,name:this.t("date_de_fin_de_17750"),isSortable:!0,sortAttribute:it.PeriodEndAt,width:200},{slug:zu.Features,name:this.t("fonctionnalit_s_47714"),minWidth:320},{slug:zu.NumberOfEvents,name:this.t("nombre_d_v_nem_14214"),minWidth:180},{slug:zu.NumberOfMembers,name:this.t("nombre_de_membr_49522"),minWidth:180},{slug:zu.MembersLimit,name:this.t("nombre_de_membr_16400"),minWidth:180},{slug:zu.PricePerMember,name:this.t("prix_par_membre_20633"),minWidth:180},{slug:zu.WeezeventOrganizationId,name:this.t("id_de_l_organis_67465"),isSortable:!0,sortAttribute:it.WeezeventOrganizationId,width:100}]}};Fu=function(e,t,n,i){var a,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(a=e[r])&&(o=(s<3?a(o):s>3?a(t,n,o):a(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o}([(0,En._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[ed,pd,bi])],Fu);let Uu=class extends Pu{constructor(e,t,n){super(e,t,n)}getCampaignsFilters(e){return[{slug:"state",name:this.t("State"),category:this.t("Campaigns"),fieldType:Ue.Select,values:On.map(e=>({id:e,name:e})),hideEmpty:!0},{slug:"campaign_type",name:this.t("type_35427"),category:this.t("Campaigns"),fieldType:Ue.Select,values:wn.map(e=>({id:e,name:e})),hideEmpty:!0},{slug:"created_by",name:this.t("cr_e_par_30622"),category:this.t("Campaigns"),fieldType:Ue.Select,values:e.map(e=>({id:e.userId,name:e.nameOrEmail})),hideEmpty:!0},{slug:"sent_at",name:this.t("envoy_le_60398"),category:this.t("Campaigns"),fieldType:Ue.Date,hideEmpty:!0}]}};Uu=function(e,t,n,i){var a,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(a=e[r])&&(o=(s<3?a(o):s>3?a(t,n,o):a(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o}([(0,En._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[ed,pd,bi])],Uu);let Bu=class extends Pu{constructor(e,t,n){super(e,t,n)}getCustomFieldsFilters(e,t,n){return[{slug:"name",name:this.t("nom_du_champ_48329"),category:this.t("champs_de_formu_64126"),fieldType:Ue.Text,hideEmpty:!0},{slug:"label",name:this.t("label_08243"),category:this.t("champs_de_formu_64126"),fieldType:Ue.Text},{slug:"customFieldCategory",name:this.t("cat_gorie_00291"),category:this.t("champs_de_formu_64126"),fieldType:Ue.Select,values:(0,ho.A)(n.customFieldsCategories.nodes,e=>m(e.name)),hideEmpty:!0},{slug:"fieldType",name:this.t("type_35427"),category:this.t("champs_de_formu_64126"),fieldType:Ue.Select,values:Bn.map(e=>({id:e,name:e})),hideEmpty:!0},{slug:"variety",name:this.t("typologie_34041"),category:this.t("champs_de_formu_64126"),fieldType:Ue.Select,values:(0,ho.A)(kn.filter(e=>!t||e!==fe.Event).map(e=>({id:e,name:or(this.t.bind(this),e)})),({name:e})=>e),hideEmpty:!0},{slug:"privacy",name:this.t("Privacy"),category:this.t("champs_de_formu_64126"),fieldType:Ue.Checkbox,hideEmpty:!0},{slug:"condition",name:this.t("condition_61066"),category:this.t("champs_de_formu_64126"),fieldType:Ue.Select,values:n.customFields.nodes},{slug:"isEncrypted",name:this.t("est_chiffr_99072"),category:this.t("champs_de_formu_64126"),fieldType:Ue.Checkbox,hideEmpty:!0},{slug:"hasValidationRules",name:this.t("r_gles_de_valid_33082"),category:this.t("champs_de_formu_64126"),fieldType:Ue.Checkbox,hideEmpty:!0},{slug:"createdBy",name:this.t("cr_e_par_30622"),category:this.t("champs_de_formu_64126"),fieldType:Ue.Select,hideEmpty:!0,needLoading:!0,organizationId:e},{slug:"createdAt",name:this.t("cr_e_le_02658"),category:this.t("champs_de_formu_64126"),fieldType:Ue.Datetime,hideEmpty:!0}]}getCustomFieldsPossibleColumns(){return[{slug:"id",name:this.t("id_51738"),isSortable:!0,sortAttribute:pe.Id,width:100},{slug:"name",name:this.t("nom_du_champ_48329"),isSortable:!0,sortAttribute:pe.Name,minWidth:240},{slug:"label",name:this.t("label_08243"),isSortable:!0,sortAttribute:pe.Label,minWidth:180},{slug:"category",name:this.t("Category"),isSortable:!0,sortAttribute:pe.Category,minWidth:240},{slug:"variety",name:this.t("typologie_34041"),minWidth:180},{slug:"fieldType",name:this.t("type_35427"),isSortable:!0,sortAttribute:pe.Type,width:250},{slug:"numberOfTimesUsed",name:this.t("nombre_d_utilis_58389"),width:200},{slug:"state",name:this.t("Privacy"),isSortable:!0,sortAttribute:pe.Status,width:200},{slug:"values",name:this.t("valeurs_34314"),minWidth:240},{slug:"variable",name:this.t("variable_pour_l_45711"),minWidth:180},{slug:"isEncrypted",name:this.t("est_chiffr_99072"),width:200},{slug:"createdBy",name:this.t("cr_par_41994"),minWidth:180},{slug:"createdAt",name:this.t("cr_le_85046"),isSortable:!0,sortAttribute:pe.CreatedAt,minWidth:180}]}};Bu=function(e,t,n,i){var a,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(a=e[r])&&(o=(s<3?a(o):s>3?a(t,n,o):a(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o}([(0,En._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[ed,pd,bi])],Bu);var Gu;!function(e){e.Accreditation="accreditation",e.AccreditationProfile="accreditation_profile",e.Accreditations="accreditations",e.AccreditationSlot="accreditationSlotId",e.AccreditationsProfiles="accreditationsProfiles",e.AssignedResources="resources",e.Campaigns="campaigns",e.CanLeadersAddMembers="canLeadersAddMembers",e.CanLeadersDeleteMembers="canLeadersDeleteMembers",e.CanLeadersDuplicateMembers="canLeadersDuplicateMembers",e.CanLeadersEditColumns="canLeadersEditColumns",e.CanLeadersEditCustomFields="canLeadersEditCustomFields",e.CanLeadersEditMembers="canLeadersEditMembers",e.CanLeadersImportMembers="canLeadersImportMembers",e.CanLeadersSeeHiddenAccreditationsSlots="canLeadersSeeHiddenAccreditationsSlots",e.CategoryLeaders="categoryLeaders",e.CreatedAt="createdAt",e.CreatedBy="createdBy",e.DeadlineDate="deadlineDate",e.DelegationCategory="delegationCategory",e.DelegationSpaceLink="delegationSpaceLink",e.DelegationsSpaceLayout="delegationsSpaceLayout",e.Description="description",e.Documents="documents",e.Events="events",e.FillingRate="fillingRate",e.Form="form",e.FormLink="formLink",e.Id="id",e.IsLocked="isLocked",e.Leaders="leaders",e.MaxResources="maxResources",e.Name="name",e.Parent="parent",e.PrivateNote="privateNote",e.ShowAllAccreditations="showAllAccreditations",e.ShowFormLinkInDelegationSpace="showFormLinkInDelegationSpace",e.ShowInDelegation="showInDelegation",e.State="delegationState",e.Tags="tags",e.UsedCustomFieldsFilled="usedCustomFieldsFilled"}(Gu||(Gu={}));let Vu=class extends Pu{constructor(e,t,n){super(e,t,n)}getDelegationsFilters(e,t,n,i){return(0,po.A)([{slug:Gu.Name,name:this.t("nom_de_la_d_l_g_28087"),category:this.t("d_l_gations_78318"),fieldType:Ue.Text,hideEmpty:!0},{slug:Gu.Description,name:this.t("Description"),category:this.t("d_l_gations_78318"),fieldType:Ue.Text},{slug:Gu.PrivateNote,name:this.t("note_priv_e_06303"),category:this.t("d_l_gations_78318"),fieldType:Ue.Text},F(i)?{slug:Gu.DelegationCategory,name:this.t("cat_gorie_00291"),category:this.t("d_l_gations_78318"),fieldType:Ue.Select,values:(0,ho.A)(i,e=>m(e.name)),hideEmpty:!0}:null,{slug:"delegationState",name:this.t("State"),category:this.t("d_l_gations_78318"),fieldType:Ue.Select,values:Nn.map(e=>({id:e,name:e})),hideEmpty:!0},{slug:Gu.CategoryLeaders,name:this.t("responsables_de_22220"),category:this.t("d_l_gations_78318"),fieldType:Ue.Select,needLoading:!0,organizationId:e,eventId:t},{slug:Gu.Leaders,name:this.t("responsables_de_03381"),category:this.t("d_l_gations_78318"),fieldType:Ue.Select,needLoading:!0,organizationId:e,eventId:t},{slug:"leadersEmailSend",name:this.t("les_responsable_08257"),category:this.t("d_l_gations_78318"),fieldType:Ue.Checkbox,hideEmpty:!0},{slug:"form",name:this.t("Form"),category:this.t("d_l_gations_78318"),fieldType:Ue.Select,hideEmpty:!0,needLoading:!0,organizationId:e,eventId:t},{slug:"deadlineDate",name:this.t("date_limite_d_i_79779"),category:this.t("d_l_gations_78318"),fieldType:Ue.Date},{slug:Gu.MaxResources,name:this.t("MaxResources"),category:this.t("d_l_gations_78318"),fieldType:Ue.Number},{slug:"tag",name:this.t("Tag"),category:this.t("d_l_gations_78318"),fieldType:Ue.Select,needLoading:!0,organizationId:e,eventId:t,tagContext:wt.Delegations},{slug:"resources",name:this.t("nombre_de_membr_08851"),category:this.t("d_l_gations_78318"),fieldType:Ue.Number,hideEmpty:!0},{slug:"fillingRate",name:this.t("taux_de_remplis_11913"),category:this.t("d_l_gations_78318"),fieldType:Ue.Number,hideEmpty:!0},{slug:Gu.ShowInDelegation,name:this.t("ShowInDelegationSpace"),category:this.t("d_l_gations_78318"),fieldType:Ue.Checkbox,hideEmpty:!0},{slug:Gu.CanLeadersAddMembers,name:this.t("CanLeadersAddMembers"),category:this.t("d_l_gations_78318"),fieldType:Ue.Checkbox,hideEmpty:!0},{slug:Gu.CanLeadersDeleteMembers,name:this.t("CanLeadersDeleteMembers"),category:this.t("d_l_gations_78318"),fieldType:Ue.Checkbox,hideEmpty:!0},{slug:Gu.CanLeadersDuplicateMembers,name:this.t("CanLeadersDuplicateMembers"),category:this.t("d_l_gations_78318"),fieldType:Ue.Checkbox,hideEmpty:!0},{slug:Gu.CanLeadersEditMembers,name:this.t("CanLeadersEditMembers"),category:this.t("d_l_gations_78318"),fieldType:Ue.Checkbox,hideEmpty:!0},{slug:Gu.CanLeadersEditColumns,name:this.t("CanLeadersEditColumns"),category:this.t("d_l_gations_78318"),fieldType:Ue.Checkbox,hideEmpty:!0},{slug:Gu.CanLeadersEditCustomFields,name:this.t("CanLeadersEditCustomFields"),category:this.t("d_l_gations_78318"),fieldType:Ue.Checkbox,hideEmpty:!0},{slug:Gu.CanLeadersImportMembers,name:this.t("CanLeadersImportMembers"),category:this.t("d_l_gations_78318"),fieldType:Ue.Checkbox,hideEmpty:!0},{slug:Gu.CanLeadersSeeHiddenAccreditationsSlots,name:this.t("CanLeadersSeeHiddenAccreditationsSlots"),category:this.t("d_l_gations_78318"),fieldType:Ue.Checkbox,hideEmpty:!0},{slug:Gu.ShowFormLinkInDelegationSpace,name:this.t("afficher_le_lie_05841"),category:this.t("d_l_gations_78318"),fieldType:Ue.Checkbox,hideEmpty:!0},{slug:Gu.ShowAllAccreditations,name:this.t("ShowAllAccreditations"),category:this.t("d_l_gations_78318"),fieldType:Ue.Checkbox,hideEmpty:!0},t?{slug:Gu.DelegationsSpaceLayout,name:this.t("DelegationsSpaceLayout"),category:this.t("d_l_gations_78318"),fieldType:Ue.Select,needLoading:!0,eventId:t}:null,t?{slug:Gu.Accreditation,name:this.t("accr_ditations_39450"),category:this.t("d_l_gations_78318"),fieldType:Ue.Select,needLoading:!0,eventId:t}:null,t?{slug:Gu.AccreditationSlot,name:this.t("cr_neaux_accr_d_70934"),category:this.t("d_l_gations_78318"),fieldType:Ue.Select,needLoading:!0,eventId:t}:null,t?{slug:Gu.AccreditationProfile,name:this.t("profil_d_accr_d_02274"),category:this.t("d_l_gations_78318"),fieldType:Ue.Select,needLoading:!0,eventId:t}:null,{slug:Gu.CreatedBy,name:this.t("cr_e_par_30622"),category:this.t("d_l_gations_78318"),fieldType:Ue.Select,hideEmpty:!0,needLoading:!0,organizationId:e,eventId:t},{slug:Gu.CreatedAt,name:this.t("cr_e_le_02658"),category:this.t("d_l_gations_78318"),fieldType:Ue.Datetime,hideEmpty:!0},t?{slug:"parent",name:this.t("est_li_e_une_48471"),category:this.t("d_l_gations_78318"),fieldType:Ue.Checkbox,hideEmpty:!0}:{slug:"event",name:this.t("_v_nement_22345"),category:this.t("d_l_gations_78318"),fieldType:Ue.Select,hideEmpty:!0,needLoading:!0,organizationId:e},{slug:Gu.UsedCustomFieldsFilled,name:this.t("champs_personna_27238"),category:this.t("d_l_gations_78318"),fieldType:Ue.Checkbox,hideEmpty:!0},...this.customFieldsToFilters(n)])}getDelegationsPossibleColumns(e,t){return[{slug:Gu.Id,name:this.t("id_51738"),isSearchable:!0,isSortable:!0,sortAttribute:ye.Id,width:100},{slug:Gu.Name,name:this.t("nom_de_la_d_l_g_28087"),isSearchable:!0,isSortable:!0,sortAttribute:ye.Name,minWidth:240},{slug:Gu.Description,name:this.t("Description"),minWidth:320},{slug:Gu.DelegationCategory,name:this.t("cat_gorie_00291"),isSearchable:!0,isSortable:!0,sortAttribute:ye.Category,minWidth:240},{slug:Gu.State,name:this.t("State"),minWidth:180},{slug:Gu.CategoryLeaders,name:this.t("responsables_de_22220"),isSearchable:!0,minWidth:320},{slug:Gu.Leaders,name:this.t("responsables_de_03381"),isSearchable:!0,minWidth:320},{slug:Gu.Form,name:this.t("Form"),isSearchable:!0,minWidth:180},{slug:Gu.FormLink,name:this.t("FormLink"),minWidth:240},{slug:Gu.DelegationSpaceLink,name:this.t("DelegationSpaceLink"),minWidth:240},{slug:Gu.DelegationsSpaceLayout,name:this.t("DelegationsSpaceLayout"),minWidth:240},{slug:Gu.DeadlineDate,name:this.t("date_limite_d_i_79779"),minWidth:180},{slug:Gu.MaxResources,name:this.t("MaxResources"),minWidth:180,isSortable:!0,sortAttribute:ye.MaxResources},{slug:Gu.AssignedResources,name:this.t("membres_11310"),minWidth:240},{slug:Gu.Tags,name:this.t("tags_79499"),isSearchable:!0,minWidth:240},{slug:Gu.FillingRate,name:this.t("taux_de_remplis_11913"),minWidth:240},{slug:Gu.CreatedBy,name:this.t("cr_e_par_30622"),isSearchable:!0,minWidth:180},{slug:Gu.CreatedAt,name:this.t("cr_e_le_02658"),isSortable:!0,sortAttribute:ye.CreatedAt,minWidth:180},{slug:Gu.ShowInDelegation,name:this.t("ShowInDelegationSpace"),minWidth:180},{slug:Gu.CanLeadersAddMembers,name:this.t("CanLeadersAddMembers"),minWidth:180},{slug:Gu.CanLeadersEditMembers,name:this.t("CanLeadersEditMembers"),minWidth:180},{slug:Gu.CanLeadersDeleteMembers,name:this.t("CanLeadersDeleteMembers"),minWidth:180},{slug:Gu.CanLeadersDuplicateMembers,name:this.t("CanLeadersDuplicateMembers"),minWidth:180},{slug:Gu.CanLeadersEditColumns,name:this.t("CanLeadersEditColumns"),minWidth:180},{slug:Gu.CanLeadersEditCustomFields,name:this.t("CanLeadersEditCustomFields"),minWidth:180},{slug:Gu.CanLeadersImportMembers,name:this.t("CanLeadersImportMembers"),minWidth:180},{slug:Gu.CanLeadersSeeHiddenAccreditationsSlots,name:this.t("CanLeadersSeeHiddenAccreditationsSlots"),minWidth:180},{slug:Gu.ShowFormLinkInDelegationSpace,name:this.t("afficher_le_lie_05841"),minWidth:180},{slug:Gu.ShowAllAccreditations,name:this.t("ShowAllAccreditations"),minWidth:180},{slug:Gu.IsLocked,name:this.t("IsLocked"),minWidth:180},e?{slug:Gu.Parent,name:this.t("d_l_gation_de_l_86100"),minWidth:320}:{slug:Gu.Events,name:this.t("_v_nements_53672"),minWidth:320},...e?[{slug:Gu.Accreditations,name:this.t("accr_ditations_39450"),minWidth:320},{slug:Gu.AccreditationsProfiles,name:this.t("profils_d_accr_27825"),minWidth:320}]:[],{slug:Gu.Campaigns,name:this.t("campagnes_que_l_81468"),minWidth:320},{slug:Gu.Documents,name:this.t("documents_que_l_18755"),minWidth:320},{slug:Gu.UsedCustomFieldsFilled,name:this.t("champs_personna_27238"),minWidth:180},...this.customFieldsToPossibleColumns(t)]}};Vu=function(e,t,n,i){var a,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(a=e[r])&&(o=(s<3?a(o):s>3?a(t,n,o):a(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o}([(0,En._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[ed,pd,bi])],Vu);var Wu;!function(e){e.CreatedAt="createdAt",e.CreatedBy="createdBy",e.Description="description",e.EndAt="endAt",e.Id="id",e.Name="name",e.NumberOfMembers="numberOfMembers",e.NumberOfMembersAccredited="numberOfMembersAccredited",e.NumberOfMembersAssigned="numberOfMembersAssigned",e.StartAt="startAt",e.State="state",e.Tags="tags"}(Wu||(Wu={}));let qu=class extends Pu{constructor(e,t,n){super(e,t,n)}getEventsFilters(e,t){return[{slug:"name",name:this.t("nom_de_l_v_nem_08711"),category:this.t("Event"),fieldType:Ue.Text,hideEmpty:!0},{slug:Wu.Description,name:this.t("Description"),category:this.t("Event"),fieldType:Ue.Text},{slug:"startAt",name:this.t("date_de_d_but_43380"),category:this.t("Event"),fieldType:Ue.Date,hideEmpty:!0},{slug:"endAt",name:this.t("date_de_fin_86920"),category:this.t("Event"),fieldType:Ue.Date,hideEmpty:!0},{slug:"state",name:this.t("State"),category:this.t("Event"),fieldType:Ue.Select,values:[{id:Oe.Ongoing,name:this.t(Oe.Ongoing)},{id:Oe.Upcoming,name:this.t(Oe.Upcoming)},{id:Oe.Done,name:this.t(Oe.Done)}],hideEmpty:!0},{slug:"tag",name:this.t("Tag"),category:this.t("Event"),fieldType:Ue.Select,needLoading:!0,organizationId:e,tagContext:wt.Events},{slug:Wu.CreatedBy,name:this.t("cr_e_par_30622"),category:this.t("Event"),fieldType:Ue.Select,hideEmpty:!0,needLoading:!0,organizationId:e},{slug:Wu.CreatedAt,name:this.t("cr_e_le_02658"),category:this.t("Event"),fieldType:Ue.Datetime,hideEmpty:!0},...this.customFieldsToFilters(t)]}getEventPossibleColumns(e){return[{slug:Wu.Id,name:this.t("id_51738"),isSearchable:!0,isSortable:!0,sortAttribute:De.Id,width:100},{slug:Wu.Name,name:this.t("nom_de_l_v_nem_08711"),isSearchable:!0,isSortable:!0,sortAttribute:De.Name,minWidth:240},{slug:Wu.Description,name:this.t("Description"),minWidth:320},{slug:Wu.StartAt,name:this.t("date_de_d_but_43380"),isSortable:!0,sortAttribute:De.StartAt,minWidth:180},{slug:Wu.EndAt,name:this.t("date_de_fin_86920"),isSortable:!0,sortAttribute:De.EndAt,minWidth:180},{slug:Wu.State,name:this.t("State"),minWidth:180},{slug:Wu.Tags,name:this.t("tags_79499"),minWidth:320},{slug:Wu.NumberOfMembers,name:this.t("nombre_de_membr_08851"),minWidth:180},{slug:Wu.NumberOfMembersAssigned,name:this.t("nombre_de_membr_87779_plural"),minWidth:180},{slug:Wu.NumberOfMembersAccredited,name:this.t("nombre_de_membr_25913"),minWidth:180},{slug:Wu.CreatedBy,name:this.t("cr_e_par_30622"),isSearchable:!0,minWidth:180},{slug:Wu.CreatedAt,name:this.t("cr_e_le_02658"),isSortable:!0,sortAttribute:De.CreatedAt,minWidth:180}].concat(this.customFieldsToPossibleColumns(e))}};qu=function(e,t,n,i){var a,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(a=e[r])&&(o=(s<3?a(o):s>3?a(t,n,o):a(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o}([(0,En._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[ed,pd,bi])],qu);const Yu="custom_document_";function Hu(e){return`${Yu}${e}`}function Zu(e){return e.startsWith(Yu)}function Ku(e,t){return 0===e.length||F((0,hd.A)(e,z(t)))}var Qu;!function(e){e.Delegation="delegation",e.Event="event",e.Id="id",e.Name="name",e.TicketId="ticket_id"}(Qu||(Qu={}));const Xu=[{slug:"cf80691",valueId:61410},{slug:"cf80691",valueId:61409}];function Ju({slug:e,valueId:t}){return`custom_field_value_${e}_${t}`}let em=class extends Pu{constructor(e,t,n){super(e,t,n)}getPossibleColumns(e,t){return[{slug:Qu.Id,name:this.t("id_51738"),isSortable:!0,sortAttribute:Vt.Id,width:100},{slug:Qu.Name,name:this.t("nom_08311"),isSortable:!0,sortAttribute:Vt.Name,minWidth:280},{slug:Qu.Event,name:this.t("_v_nement_22345"),minWidth:240},{slug:Qu.TicketId,name:this.t("TicketId"),width:200},...this.getCustomDocumentsColumns(t),...this.getCustomFieldsValuesColumns(e),...this.customFieldsToPossibleColumns(e)]}getCustomFieldsValuesColumns(e){return Xu.flatMap(({slug:t,valueId:n})=>{const i=e.find(e=>e.slug===t),a=i?.values.find(e=>e.id===n);return i&&a?[{slug:Ju({slug:t,valueId:n}),name:a.value,label:i.name,customField:i,width:200}]:[]})}getCustomDocumentsColumns(e){return(0,ho.A)(Object.entries((0,Ql.A)(e,e=>e.slug)).map(([e,t])=>({slug:Hu(e),name:this.t("imprimer_1_75795",(0,eu.A)(t,e=>e.id).name),label:e,minWidth:240})),e=>m(e.name))}};em=function(e,t,n,i){var a,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(a=e[r])&&(o=(s<3?a(o):s>3?a(t,n,o):a(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o}([(0,En._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[ed,pd,bi])],em);var tm;!function(e){e.Acronym="acronym",e.Address="address",e.Category="category",e.CategoryLeaders="categoryLeaders",e.CheckedInRate="checkedInRate",e.CheckedOutRate="checkedOutRate",e.Color="color",e.Conditions="conditions",e.CreatedAt="createdAt",e.CreatedBy="createdBy",e.Description="description",e.FillingRate="fillingRate",e.Icon="icon",e.IconColor="iconColor",e.Id="id",e.Latitude="latitude",e.Layer="layer",e.Leaders="leaders",e.Longitude="longitude",e.Name="name",e.PrivateNote="privateNote",e.MaxResources="resources",e.AssignedResources="assignedResources",e.Slot="slot",e.SlotName="slotName",e.State="state",e.Tags="tags",e.Traces="traces",e.WeezeventChecklistId="weezeventChecklistId",e.WeezeventIsSynchronized="weezeventIsSynchronized",e.Zoom="zoom"}(tm||(tm={}));let nm=class extends Pu{constructor(e,t,n){super(e,t,n)}getPositionsFilters(e,t){return(0,po.A)([{slug:tm.Name,name:this.t("nom_de_la_missi_64605"),category:this.t("missions_63972"),fieldType:Ue.Text,hideEmpty:!0},{slug:"position",name:this.t("Position"),category:this.t("missions_63972"),fieldType:Ue.Select,hideEmpty:!0,needLoading:!0,eventId:e.id},{slug:tm.Description,name:this.t("Description"),category:this.t("missions_63972"),fieldType:Ue.Text},{slug:tm.PrivateNote,name:this.t("note_priv_e_06303"),category:this.t("missions_63972"),fieldType:Ue.Text},F(e.positionsCategories)?{slug:"positionCategory",name:this.t("cat_gorie_00291"),category:this.t("missions_63972"),fieldType:Ue.Select,values:(0,ho.A)(e.positionsCategories,e=>m(e.name)),hideEmpty:!0}:null,{slug:"positionSlot",name:this.t("cr_neau_11117"),category:this.t("missions_63972"),fieldType:Ue.DateTimeRange,startAt:e.startAt,endAt:e.endAt},{slug:"positionSlotName",name:this.t("nom_du_cr_neau_54351"),category:this.t("missions_63972"),fieldType:Ue.Text},{slug:"tag",name:this.t("Tag"),category:this.t("missions_63972"),fieldType:Ue.Select,needLoading:!0,organizationId:e.organizationId,eventId:e.id,tagContext:wt.Positions},{slug:"positionCustomField",name:this.t("condition_61066"),category:this.t("missions_63972"),fieldType:Ue.Select,needLoading:!0,organizationId:e.organizationId},F(e.traces)?{slug:tm.Traces,name:this.t("Traces"),category:this.t("missions_63972"),fieldType:Ue.Select,values:(0,ho.A)(e.traces,e=>m(e.name))}:null,{slug:"acronym",name:this.t("Acronym"),category:this.t("missions_63972"),fieldType:Ue.Text},{slug:"color",name:this.t("Color"),category:this.t("missions_63972"),fieldType:Ue.Text,hideEmpty:!0},{slug:"icon",name:this.t("ic_ne_55554"),category:this.t("missions_63972"),fieldType:Ue.Select,values:qn.map(e=>({id:e,name:this.t(e)})),hideEmpty:!0},{slug:"address",name:this.t("Address"),category:this.t("missions_63972"),fieldType:Ue.Text},{slug:"latitude",name:this.t("Latitude"),category:this.t("missions_63972"),fieldType:Ue.Number},{slug:"longitude",name:this.t("Longitude"),category:this.t("missions_63972"),fieldType:Ue.Number},{slug:"state",name:this.t("statut_des_ress_73550"),category:this.t("missions_63972"),fieldType:Ue.Select,hideEmpty:!0,values:ii.map(e=>({id:e,name:this.t(e)}))},{slug:"fillingRate",name:this.t("taux_de_remplis_11913"),category:this.t("missions_63972"),fieldType:Ue.Number,hideEmpty:!0},{slug:tm.CheckedInRate,name:this.t("taux_de_pointag_87285"),category:this.t("missions_63972"),fieldType:Ue.Number,hideEmpty:!0},{slug:tm.CheckedOutRate,name:this.t("taux_de_d_point_88315"),category:this.t("missions_63972"),fieldType:Ue.Number,hideEmpty:!0},{slug:tm.Leaders,name:this.t("nombre_de_respo_19772"),category:this.t("missions_63972"),fieldType:Ue.Number,hideEmpty:!0},{slug:tm.CategoryLeaders,name:this.t("nombre_de_respo_01994"),category:this.t("missions_63972"),fieldType:Ue.Number,hideEmpty:!0},{slug:tm.CreatedBy,name:this.t("cr_e_par_30622"),category:this.t("missions_63972"),fieldType:Ue.Select,hideEmpty:!0,needLoading:!0,organizationId:e.organizationId,eventId:e.id},{slug:tm.CreatedAt,name:this.t("cr_e_le_02658"),category:this.t("missions_63972"),fieldType:Ue.Datetime,hideEmpty:!0},e.isWeezeventConnected?{slug:tm.WeezeventChecklistId,name:this.t("WeezeventChecklistId"),category:this.t("missions_63972"),fieldType:Ue.Number}:null,...this.customFieldsToFilters(t)])}getPositionsPossibleColumns(e,{isWeezeventConnected:t}){const n=[{slug:tm.Id,name:this.t("id_51738"),isSearchable:!0,isSortable:!0,sortAttribute:mt.Id,width:100},{slug:tm.Name,name:this.t("nom_de_la_missi_64605"),isSearchable:!0,isSortable:!0,sortAttribute:mt.Name,minWidth:120},{slug:tm.Acronym,name:this.t("acronymes_11499"),isSearchable:!0,isSortable:!0,sortAttribute:mt.Acronym,minWidth:120},{slug:tm.Description,name:this.t("Description"),minWidth:320},{slug:tm.Category,name:this.t("cat_gorie_00291"),isSearchable:!0,isSortable:!0,sortAttribute:mt.Category,minWidth:240},{slug:tm.SlotName,name:this.t("nom_du_cr_neau_54351"),isSearchable:!0,minWidth:180},{slug:tm.Slot,name:this.t("cr_neau_11117"),isSortable:!0,sortAttribute:mt.Slot,minWidth:240},{slug:tm.MaxResources,name:this.t("membres_n_cessa_55227"),minWidth:320},{slug:tm.AssignedResources,name:this.t("membres_11310"),minWidth:320},{slug:"numberOfMinutesRequired",name:this.t("nombre_de_membr_60320_plural"),minWidth:320},{slug:"numberOfMinutesAssigned",name:this.t("nombre_de_membr_87779_plural"),minWidth:320},{slug:tm.Tags,name:this.t("tags_79499"),isSearchable:!0,minWidth:320},{slug:tm.Conditions,name:this.t("conditions_77756"),minWidth:320},{slug:tm.Address,name:this.t("Address"),isSearchable:!0,minWidth:240},{slug:tm.Layer,name:this.t("Layer"),minWidth:180},{slug:tm.Traces,name:this.t("Traces"),minWidth:240},{slug:tm.Zoom,name:this.t("Zoom"),isSearchable:!0,minWidth:180},{slug:tm.Latitude,name:this.t("latitude_46176"),isSearchable:!0,minWidth:180},{slug:tm.Longitude,name:this.t("longitude_01695"),isSearchable:!0,minWidth:180},{slug:tm.Color,name:this.t("Color"),isSearchable:!0,width:80},{slug:tm.Icon,name:this.t("ic_ne_55554"),width:80},{slug:tm.IconColor,name:this.t("ic_ne_et_couleu_54485"),width:80},{slug:tm.State,name:this.t("statut_des_ress_73550"),minWidth:240},{slug:tm.FillingRate,name:this.t("taux_de_remplis_11913"),minWidth:240},{slug:tm.CheckedInRate,name:this.t("taux_de_pointag_87285"),minWidth:240},{slug:tm.CheckedOutRate,name:this.t("taux_de_d_point_88315"),minWidth:240},{slug:tm.CreatedBy,name:this.t("cr_e_par_30622"),isSearchable:!0,minWidth:180},{slug:tm.CreatedAt,name:this.t("cr_e_le_02658"),isSortable:!0,sortAttribute:mt.CreatedAt,minWidth:180},{slug:tm.Leaders,name:this.t("responsables_de_54941"),isSearchable:!0,minWidth:320},{slug:tm.CategoryLeaders,name:this.t("responsables_de_22220"),isSearchable:!0,minWidth:320}];return t&&n.push({slug:tm.WeezeventIsSynchronized,name:this.t("WeezeventIsSynchronized"),minWidth:180},{slug:tm.WeezeventChecklistId,name:this.t("WeezeventChecklistId"),minWidth:180}),n.concat(this.customFieldsToPossibleColumns(e))}};var im;nm=function(e,t,n,i){var a,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(a=e[r])&&(o=(s<3?a(o):s>3?a(t,n,o):a(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o}([(0,En._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[ed,pd,bi])],nm),function(e){e.Id="id",e.WeezaccessPartner="weezaccessPartner",e.PrinterGroup="printerGroup",e.MediaType="mediaType",e.Document="document",e.CreatedBy="createdBy",e.CreatedAt="createdAt",e.ActivationRange="activationRange",e.Status="status"}(im||(im={}));class am extends Pu{constructor(e,t,n){super(e,t,n)}getPrintTriggersPossibleColumns(){return[{slug:im.Id,name:this.t("id_51738"),isSearchable:!0,isSortable:!0,sortAttribute:xt.Id,width:100},{slug:im.WeezaccessPartner,name:this.t("op_rateur_weeza_31732"),isSearchable:!0,isSortable:!0,sortAttribute:xt.WeezaccessPartner,minWidth:280},{slug:im.PrinterGroup,name:this.t("printing_locati_10729"),isSearchable:!0,isSortable:!0,sortAttribute:xt.PrinterGroup,minWidth:200},{slug:im.MediaType,name:this.t("type_d_impressi_00431"),isSortable:!0,sortAttribute:xt.MediaType,minWidth:160},{slug:im.Document,name:this.t("document_87149"),isSearchable:!0,isSortable:!0,sortAttribute:xt.Document,minWidth:200},{slug:im.CreatedBy,name:this.t("cr_par_41994"),minWidth:220},{slug:im.CreatedAt,name:this.t("cr_le_85046"),isSortable:!0,minWidth:180,sortAttribute:xt.CreatedAt},{slug:im.ActivationRange,name:this.t("p_riode_d_activ_48213"),isSortable:!0,sortAttribute:xt.ActivationRange,minWidth:280},{slug:im.Status,name:this.t("State"),isSortable:!0,sortAttribute:xt.Status,minWidth:140}]}}function sm(e){return{includeComments:e.includes("comments"),includeDelegations:e.includes("delegations")||e.includes("delegations_categories"),includeDuplicatedFrom:e.includes("duplicatedFrom"),includeEmails:e.includes("campaigns_states"),includeEvents:e.includes("events")||e.includes("number_of_events"),includeForms:e.includes("forms")||e.includes("forms_inserted_at"),includeTags:e.includes("tags"),includeRoles:e.includes("roles")}}let om=class extends Pu{constructor(e,t,n){super(e,t,n)}getOrganizationUsersFilters(e,t,n){return[...this.getBaseFilters(n.customFields.nodes),...this.getEventsFilters(e),...this.getFormsFilters(e),...this.getPositionsFilters(),...this.getDelegationsFilters(e),...this.getEmailsFilters(e),...this.getCommentsFilters(e),{slug:"tag",name:this.t("Tag"),category:this.t("autres_99130"),fieldType:Ue.Select,needLoading:!0,organizationId:e,tagContext:wt.UsersInfos},{slug:"sameEmail",name:this.t("nombre_de_profi_42316"),category:this.t("autres_99130"),fieldType:Ue.Number,hideEmpty:!0},{slug:"segments",name:this.t("fait_partie_de_44650"),category:this.t("autres_99130"),fieldType:Ue.Select,values:n.segmentsFolders.flatMap(e=>e.segments).filter(e=>e.id!==t),hideEmpty:!0},{slug:"isAdmin",name:this.t("est_administrat_15766"),category:this.t("autres_99130"),fieldType:Ue.Checkbox},{slug:"isLeader",name:this.t("est_responsable_27270"),category:this.t("autres_99130"),fieldType:Ue.Checkbox},{slug:"roles",name:this.t("r_les_61679"),category:this.t("autres_99130"),fieldType:Ue.Select,needLoading:!0,organizationId:e}]}getDelegationMembersFilters(e){return this.getBaseFilters(e)}getOrganizationUsersPossibleColumns(e){return[...this.getBaseColumns(),{slug:"duplicatedFrom",name:this.t("dupliqu_de_28582"),minWidth:240},{slug:"events",name:this.t("_v_nements_53672"),minWidth:320},{slug:"number_of_events",name:this.t("nombre_d_v_nem_14214"),width:230},{slug:"forms",name:this.t("formulaires_rem_62495"),minWidth:320},{slug:"forms_inserted_at",name:this.t("dates_de_rempli_65075"),minWidth:320},{slug:"delegations",name:this.t("d_l_gations_78318"),isSearchable:!0,minWidth:320},{slug:"delegations_categories",name:this.t("cat_gories_de_d_45259"),minWidth:320},{slug:"inserted_at",name:this.t("date_d_inscript_31369"),isSortable:!0,sortAttribute:Ut.InsertedAt,width:230},{slug:"last_seen_at",name:this.t("date_de_derni_r_38795"),isSortable:!0,sortAttribute:Ut.LastSeenAt,width:230},{slug:"campaigns_states",name:this.t("statut_des_camp_25280"),minWidth:320},{slug:"tags",name:this.t("tags_79499"),isSearchable:!0,minWidth:320},{slug:"comments",name:this.t("commentaires_96492"),isSearchable:!0,minWidth:320},{slug:"roles",name:this.t("r_les_61679"),minWidth:320},...this.customFieldsToPossibleColumns(e)]}getDelegationMembersPossibleColumns(e){return[...this.getBaseColumns(),...this.customFieldsToPossibleColumns(e)]}getBaseColumns(){return[{slug:"name",name:this.t("full_name"),isSearchable:!0,isSortable:!0,sortAttribute:Ut.Name,minWidth:240},{slug:"email",name:this.t("e_mail_du_membr_69509"),isSearchable:!0,isSortable:!0,sortAttribute:Ut.Email,minWidth:180},{slug:"id",name:this.t("id_51738"),isSearchable:!0,isSortable:!0,sortAttribute:Ut.Id,width:100},{slug:"local_id",name:this.t("id_sur_l_organi_45566"),isSearchable:!0,isSortable:!0,sortAttribute:Ut.LocalId,width:100}]}getBaseFilters(e){return[{slug:"email",name:this.t("Email"),category:this.t("champs_de_formu_64126"),fieldType:Ue.Text,hideEmpty:!0},{slug:"registrationDate",name:this.t("date_d_inscript_31369"),category:this.t("champs_de_formu_64126"),fieldType:Ue.Date,hideEmpty:!0},{slug:"id",name:this.t("id_51738"),category:this.t("champs_de_formu_64126"),fieldType:Ue.Number,hideEmpty:!0},{slug:"local_id",name:this.t("id_sur_l_organi_45566"),category:this.t("champs_de_formu_64126"),fieldType:Ue.Number,hideEmpty:!0},{slug:"lastSeenAt",name:this.t("date_de_derni_r_38795"),category:this.t("champs_de_formu_64126"),fieldType:Ue.Datetime},{slug:"duplicatedFrom",name:this.t("est_dupliqu_62764"),category:this.t("champs_de_formu_64126"),fieldType:Ue.Checkbox,hideEmpty:!0},...this.customFieldsToFilters(e)]}getEventsFilters(e){return[{slug:"event",name:this.t("_v_nement_22345"),category:this.t("Event"),fieldType:Ue.Select,hideEmpty:!0,needLoading:!0,organizationId:e},{slug:"numberOfEvents",name:this.t("nombre_d_v_nem_14214"),category:this.t("Event"),fieldType:Ue.Number,hideEmpty:!0}]}getFormsFilters(e){return[{slug:"forms",name:this.t("formulaires_rem_62495"),category:this.t("Form_plural"),fieldType:Ue.Select,needLoading:!0,organizationId:e},{slug:"formsInsertedAt",name:this.t("dates_de_rempli_65075"),category:this.t("Form_plural"),fieldType:Ue.Date,hideEmpty:!0,needLoading:!0,organizationId:e}]}getPositionsFilters(){return[{slug:"positionName",name:this.t("nom_de_la_missi_80169"),category:this.t("missions_63972"),fieldType:Ue.Text,hideEmpty:!0},{slug:"positionCategoryName",name:this.t("nom_de_la_cat_g_57279"),category:this.t("missions_63972"),fieldType:Ue.Text,hideEmpty:!0},{slug:"numberOfAssignments",name:this.t("nombre_d_affect_31455"),category:this.t("missions_63972"),fieldType:Ue.Number,hideEmpty:!0}]}getDelegationsFilters(e){return[{slug:"delegation",name:this.t("fait_partie_de_32196"),category:this.t("d_l_gations_78318"),fieldType:Ue.Select,needLoading:!0,organizationId:e},{slug:"delegationCategory",name:this.t("inscrit_via_la_12241"),category:this.t("d_l_gations_78318"),fieldType:Ue.Select,needLoading:!0,organizationId:e},{slug:"isDelegationLeader",name:this.t("est_responsable_87662"),category:this.t("d_l_gations_78318"),fieldType:Ue.Checkbox}]}getEmailsFilters(e){return[{slug:"campaign",name:this.t("campagne_97871"),category:this.t("e_mails_09850"),fieldType:Ue.Campaign,needLoading:!0,organizationId:e},{slug:"emailBlacklist",name:this.t("ne_souhaite_plu_08853"),category:this.t("e_mails_09850"),fieldType:Ue.Checkbox,hideEmpty:!0}]}getCommentsFilters(e){return[{slug:"comments",name:this.t("commentaires_96492"),category:this.t("commentaires_96492"),fieldType:Ue.Text},{slug:"lastCommentAt",name:this.t("date_du_dernier_73554"),category:this.t("commentaires_96492"),fieldType:Ue.Date,hideEmpty:!0},{slug:"commentWrittenBy",name:this.t("commentaire_cr_96610"),category:this.t("commentaires_96492"),fieldType:Ue.Select,hideEmpty:!0,needLoading:!0,organizationId:e}]}};function rm(e){return"production"===s.Development?1===e:2676===e}om=function(e,t,n,i){var a,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(a=e[r])&&(o=(s<3?a(o):s>3?a(t,n,o):a(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o}([(0,En._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[ed,pd,bi])],om);var dm;function lm(e,t,n){return t===Fr.AccreditationsMatrix?{includeAccreditationProfile:!1,includeAccreditations:!1,includeAccreditationsMatrix:!0,includeAvailability:!1,includeComments:!1,includeCustomDocuments:!1,includeDelegation:!1,includeDuplicatedFrom:!1,includeEmails:!1,includeForms:!1,includeFormsUsersInfos:!1,includeNumberOfAccreditations:!1,includeNumberOfAssignments:!1,includeNumberOfAssignmentsDays:!1,includeNumberOfAvailableDays:!1,includePicture:!0,includePositions:!1,includePreassignedPositions:!1,includeRoles:!1,includeTags:!1,includeTeam:!1,includeTraces:!1,includeVolunteerMinutes:!1,includeWeezeventChecklists:!1,includeWeezeventUrls:!1,includeWishedPositions:!1}:t===Fr.Map?{includeAccreditationProfile:!1,includeAccreditations:!1,includeAccreditationsMatrix:!1,includeAvailability:!1,includeComments:!1,includeCustomDocuments:!1,includeDelegation:!1,includeDuplicatedFrom:!1,includeEmails:!1,includeForms:!1,includeFormsUsersInfos:!1,includeNumberOfAccreditations:!1,includeNumberOfAssignments:!1,includeNumberOfAssignmentsDays:!1,includeNumberOfAvailableDays:!1,includePicture:!1,includePositions:!1,includePreassignedPositions:!1,includeRoles:!1,includeTags:!1,includeTeam:!1,includeTraces:!0,includeVolunteerMinutes:!1,includeWeezeventChecklists:!1,includeWeezeventUrls:!1,includeWishedPositions:!1}:{includeAccreditationProfile:e.includes(dm.AccreditationProfile)||e.includes(dm.WishedAccreditationProfile),includeAccreditations:e.includes(dm.Accreditations)||e.includes(dm.AccreditationsCategories)||e.includes(dm.AccreditationsSlots)||e.includes(dm.WishedAccreditationSlots)||e.includes(dm.ScannedAccreditations)||e.includes("bracelet_a_delivrer"),includeAccreditationsMatrix:!1,includeAvailability:e.includes(dm.Availability),includeComments:e.includes(dm.Comments),includeCustomDocuments:e.some(Zu),includeDelegation:e.includes(dm.Delegations)||e.includes(dm.DelegationCategory)||e.includes(dm.DelegationBannerNumber),includeDuplicatedFrom:e.includes(dm.DuplicatedFrom),includeEmails:e.includes(dm.CampaignsStates),includeFormsUsersInfos:e.includes(dm.CompletedForms)||e.includes(dm.FormsInsertedAt)||e.some(e=>e.startsWith("form_inserted_at_"))||e.includes(dm.Availability)||e.includes(dm.TeamCode)||e.includes(dm.TeamMembers)||e.includes(dm.WishedAccreditationProfile),includeForms:e.includes(dm.CompletedForms)||e.includes(dm.FormsInsertedAt)||e.some(e=>e.startsWith("form_inserted_at_"))||e.includes(dm.Availability),includeNumberOfAccreditations:e.includes(dm.NumberOfAccreditations),includeNumberOfAssignments:e.includes(dm.NumberOfAssignments),includeNumberOfAssignmentsDays:e.includes(dm.NumberOfAssignmentsDays),includeNumberOfAvailableDays:e.includes(dm.NumberOfAvailableDays),includePicture:e.includes(dm.Name),includePositions:e.includes(dm.Positions)||e.includes(dm.PositionsCategories)||e.includes(dm.WishedPositions)||e.includes(dm.CheckedInPositions),includeRoles:e.includes(dm.Roles),includeTags:e.includes(dm.Tags),includeTeam:e.includes(dm.TeamCode)||e.includes(dm.TeamMembers),includeTraces:!1,includeVolunteerMinutes:e.includes(dm.VolunteerMinutes),includeWishedPositions:e.includes(dm.WishedPositions),includePreassignedPositions:e.includes(dm.PreassignedPositionsCategories)||e.includes(dm.PreassignedPositions),includeWeezeventChecklists:e.includes(dm.WeezaccessChecklists),includeWeezeventUrls:!0===n?.includeWeezeventUrls&&(e.includes(dm.WeezeventBarcodeId)||e.includes(dm.WeezeventShortTag))}}!function(e){e.AccreditationProfile="accreditation_profile",e.AccreditationState="accreditation_state",e.Accreditations="accreditations",e.AccreditationsCategories="accreditations_categories",e.AccreditationsSlots="accreditations_slots",e.Availability="availability",e.CampaignsStates="campaigns_states",e.CheckedInPositions="checed_in_positions",e.Comments="comments",e.CompletedForms="forms",e.DelegationBannerNumber="delegation_banner_number",e.DelegationCategory="delegation_category",e.Delegations="delegations",e.DuplicatedFrom="duplicatedFrom",e.Email="email",e.FormsInsertedAt="forms_inserted_at",e.Id="id",e.InsertedAt="inserted_at",e.LocalId="local_id",e.Name="name",e.NumberOfAccreditations="number_of_accreditations",e.NumberOfAssignments="number_of_assignments",e.NumberOfAssignmentsDays="number_of_assignments_days",e.NumberOfAvailableDays="number_of_available_days",e.OrganizationLocalId="organization_local_id",e.Positions="positions",e.PositionsCategories="positions_categories",e.PreassignedPositions="preassigned_positions",e.PreassignedPositionsCategories="preassigned_positions_categories",e.Roles="roles",e.ScannedAccreditations="scanned_accreditations",e.Tags="tags",e.TeamCode="teamCode",e.TeamMembers="teamMembers",e.VolunteerMinutes="volunteer_minutes",e.VolunteerRegistrationState="volunteer_registration_state",e.WeezaccessChecklists="weezevent_checklists",e.WeezeventBarcodeId="weezevent_barcode_id",e.WeezeventBarcodeVersion="weezevent_barcode_version",e.WeezeventPairedAt="weezevent_paired_at",e.WeezeventShortTag="weezevent_short_tag",e.WishedAccreditationProfile="wished_accreditation_profile",e.WishedAccreditationSlots="wished_accreditation_slots",e.WishedPositions="wished_positions"}(dm||(dm={}));let cm=class extends Pu{constructor(e,t,n){super(e,t,n)}getVolunteersFilters(e,t,n,i,a,{hasAccreditations:s,hasCampaigns:o,hasDelegations:r,hasForms:d,hasPositions:l,isWeezeventConnected:c}){return[...this.getBaseFilters(i),...this.getBarcodeFilters(),...this.getAvailabilitiesFilters(t,a),...l?this.getPositionsFilters(e,t,a):[],...s?this.getAccreditationsFilters(e,t,a):[],...r?this.getDelegationsFilters(e,t):[],...this.getSegmentsFilters(e,t,n,a),...d?this.getFormsFilters(t):[],...d?this.getTeamsFilters():[],...c?this.getWeezeventFilters(t):[],...this.getEmailsFilters(t,o),...this.getCommentsFilter(e,t),{slug:"tag",name:this.t("Tags"),category:this.t("autres_99130"),fieldType:Ue.Select,needLoading:!0,organizationId:e,eventId:t,tagContext:wt.UsersInfos},{slug:"sameEmail",name:this.t("nombre_de_profi_42316"),category:this.t("autres_99130"),fieldType:Ue.Number,hideEmpty:!0},{slug:"possibleDuplicates",name:this.t("potentiel_doubl_87672"),category:this.t("autres_99130"),fieldType:Ue.Checkbox,hideEmpty:!0},{slug:"isLeader",name:this.t("est_responsable_19679"),category:this.t("autres_99130"),fieldType:Ue.Checkbox},{slug:"isPositionLeader",name:this.t("est_responsable_27270"),category:this.t("autres_99130"),fieldType:Ue.Checkbox},{slug:"isPositionCategoryLeader",name:this.t("est_responsable_91796"),category:this.t("autres_99130"),fieldType:Ue.Checkbox}]}getPositionMembersFilters(e,t,n,i){return[...this.getBaseFilters(n),...this.getAvailabilitiesFilters(t,i),...this.getPositionsFilters(e,t,i)]}getAccreditationMembersFilters(e,t,n,i,{hasDelegations:a}){return[...this.getBaseFilters(n),...this.getAccreditationsFilters(e,t,i),...a?this.getDelegationsFilters(e,t):[]]}getDelegationCategoryMembersFilters(e,t,n,i,a){return[...this.getBaseFilters(n),...this.getAccreditationsFilters(e,t,i),...a?this.getWeezeventFilters(t):[]]}getDelegationMembersFilters(e,t,n,i,a,s){return[...this.getBaseFilters(n),...a.slotDisplay===At.Hide?[]:this.getAvailabilitiesFilters(t,i),...this.getAccreditationsFilters(e,t,i),...a.positionDisplay===bt.None?[]:this.getPositionMembersFilters(e,t,n,i),...s?this.getWeezeventFilters(t):[]]}getVolunteersPossibleColumns(e,t,n,i,{hasAccreditations:a,hasCampaigns:s,hasCustomDocuments:o,hasDelegations:r,hasForms:d,hasPositions:l,isWeezeventConnected:c}){return[...this.getBaseColumns(t,{forDelegationsSpace:!1}),...o?this.getCustomDocumentsColumns(i):[],...d?this.getFormsColumns(n):[],...l?this.getPositionsColumns():[],...c?this.getWeezeventColumns():[],...a?this.getAccreditationsColumns(e):[],...this.getAvailabilitiesColumns(),...r?this.getDelegationsColumns(e):[],...s?[{slug:dm.CampaignsStates,name:this.t("statut_des_camp_25280"),minWidth:320}]:[],{slug:dm.Tags,name:this.t("tags_79499"),isSearchable:!0,minWidth:320},{slug:dm.Comments,name:this.t("commentaires_96492"),isSearchable:!0,minWidth:320},{slug:dm.Roles,name:this.t("r_les_61679"),minWidth:320}]}getPositionMembersPossibleColumns(e){return[...this.getBaseColumns(e,{forDelegationsSpace:!1}),...this.getPositionsColumns()]}getAccreditationMembersPossibleColumns(e,t){return[...this.getBaseColumns(t,{forDelegationsSpace:!1}),...this.getAccreditationsColumns(e),...this.getDelegationsColumns(e)]}getDelegationCategoryMembersPossibleColumns(e,t,n){return[...this.getBaseColumns(t,{forDelegationsSpace:!1}),...this.getAccreditationsColumns(e),...this.getDelegationsColumns(e),...n?this.getWeezeventColumns():[],{slug:dm.CampaignsStates,name:this.t("statut_des_camp_25280")},{slug:dm.Delegations,name:this.t("Delegation"),isSearchable:!0}]}getDelegationMembersPossibleColumns(e,t,{forDelegationsSpace:n,isWeezeventConnected:i,positionDisplay:a,slotDisplay:s}){return[...this.getBaseColumns(t,{forDelegationsSpace:n}),...this.getAccreditationsColumns(e),...a===bt.None?[]:this.getPositionsColumns(),...s===At.Hide?[]:this.getAvailabilitiesColumns(),...i?this.getWeezeventColumns():[],{slug:dm.CampaignsStates,name:this.t("statut_des_camp_25280")}]}getBaseColumns(e,{forDelegationsSpace:t}){return(0,po.A)([{slug:dm.Email,name:this.t("e_mail_du_membr_69509"),isSearchable:!0,isSortable:!0,sortAttribute:Vt.Email,minWidth:180},t?null:{slug:dm.Id,name:this.t("id_51738"),isSearchable:!0,isSortable:!0,sortAttribute:Vt.Id,width:100},t?null:{slug:dm.LocalId,name:this.t("id_sur_l_v_nem_01171"),isSearchable:!0,isSortable:!0,sortAttribute:Vt.LocalId,width:100},t?null:{slug:dm.OrganizationLocalId,name:this.t("id_sur_l_organi_45566"),isSearchable:!0,isSortable:!0,sortAttribute:Vt.OrganizationLocalId,width:100},t?null:{slug:dm.WeezeventBarcodeId,name:this.t("TicketId"),isSearchable:!0,minWidth:240},t?null:{slug:dm.WeezeventBarcodeVersion,name:this.t("version_du_code_15471"),minWidth:100},{slug:dm.Name,name:this.t("full_name"),isSearchable:!0,isSortable:!0,sortAttribute:Vt.Name,minWidth:240},{slug:dm.InsertedAt,name:this.t("date_d_inscript_31369"),isSortable:!0,sortAttribute:Vt.InsertedAt,width:240},t?null:{slug:dm.DuplicatedFrom,name:this.t("dupliqu_de_28582"),minWidth:240},...this.customFieldsToPossibleColumns(e)])}getAvailabilitiesColumns(){return[{slug:dm.Availability,name:this.t("disponibilit_s_49923"),minWidth:320}]}getCustomDocumentsColumns(e){return(0,ho.A)(e,e=>m(e.name)).map(e=>({slug:Hu(e.id),name:this.t("imprimer_1_75795",e.name),customDocument:e,minWidth:240}))}getFormsColumns(e){return[{slug:dm.CompletedForms,name:this.t("formulaires_rem_62495"),minWidth:320},{slug:dm.FormsInsertedAt,name:this.t("dates_de_rempli_65075"),minWidth:320},...(0,ho.A)(e,e=>m(e.name)).map(e=>({slug:`form_inserted_at_${e.id}`,name:this.t("date_de_remplis_00881",e.name),isSortable:!0,sortAttribute:`form_inserted_at_${e.id}`,minWidth:240})),{slug:dm.TeamCode,name:this.t("code_quipe_14296"),isSearchable:!0,isSortable:!0,sortAttribute:Vt.TeamCode,minWidth:180},{slug:dm.TeamMembers,name:this.t("membres_de_l_q_00891"),minWidth:240}]}getPositionsColumns(){return[{slug:dm.NumberOfAssignments,name:this.t("nombre_d_affect_31455"),width:240},{slug:dm.NumberOfAssignmentsDays,name:this.t("nombre_de_jours_86280"),width:240},{slug:dm.NumberOfAvailableDays,name:this.t("nombre_de_jours_07962"),width:240},{slug:dm.Positions,name:this.t("missions_affect_97811"),minWidth:320},{slug:dm.PositionsCategories,name:this.t("cat_gories_de_m_93035"),minWidth:320},{slug:dm.VolunteerMinutes,name:this.t("nombre_de_minut_50497"),width:240},{slug:dm.VolunteerRegistrationState,name:this.t("status_d_affect_75769"),isSortable:!0,sortAttribute:Vt.State,width:240},{slug:dm.WishedPositions,name:this.t("missions_souhai_23225"),minWidth:320},{slug:dm.PreassignedPositions,name:this.t("missions_pr_af_02950"),minWidth:320},{slug:dm.PreassignedPositionsCategories,name:this.t("cat_gories_pr_83825"),minWidth:320},{slug:dm.CheckedInPositions,name:this.t("missions_point_05292"),minWidth:320}]}getAccreditationsColumns(e){return(0,po.A)([{slug:dm.Accreditations,name:this.t("accr_ditations_33155"),minWidth:320},{slug:dm.AccreditationsCategories,name:this.t("cat_gories_d_ac_37678"),minWidth:320},{slug:dm.AccreditationState,name:this.t("statut_d_accr_d_75527"),isSortable:!0,sortAttribute:Vt.AccreditationState,width:240},{slug:dm.NumberOfAccreditations,name:this.t("nombre_d_accr_d_02452"),width:240},{slug:dm.WishedAccreditationSlots,name:this.t("accr_ditations_74375"),minWidth:320},{slug:dm.ScannedAccreditations,name:this.t("accr_ditations_52153"),minWidth:320},{slug:dm.AccreditationProfile,name:this.t("profil_d_accr_d_02274"),minWidth:240},{slug:dm.WishedAccreditationProfile,name:this.t("profil_d_accr_d_63000"),minWidth:240},rm(e)?{slug:"bracelet_a_delivrer",name:this.t("bracelet_d_li_50372")}:null])}getWeezeventColumns(){return[{slug:dm.WeezeventShortTag,name:this.t("puce_50504"),isSearchable:!0,minWidth:180},{slug:dm.WeezeventPairedAt,name:this.t("appair_le_70213"),isSortable:!0,sortAttribute:Vt.PairedAt,minWidth:180},{slug:dm.WeezaccessChecklists,name:this.t("listes_de_contr_55120"),minWidth:320}]}getDelegationsColumns(e){return(0,po.A)([{slug:dm.Delegations,name:this.t("Delegation"),isSearchable:!0,isSortable:!0,sortAttribute:Vt.Delegation,minWidth:240},{slug:dm.DelegationCategory,name:this.t("cat_gorie_de_d_18027"),minWidth:240},gu(e)?{slug:dm.DelegationBannerNumber,name:this.t("num_ro_de_bande_16203"),isSearchable:!0,width:100}:null])}getBaseFilters(e){return[{slug:"email",name:this.t("Email"),category:this.t("champs_de_formu_64126"),fieldType:Ue.Text,hideEmpty:!0},{slug:"insertedAt",name:this.t("date_d_inscript_31369"),category:this.t("champs_de_formu_64126"),fieldType:Ue.Date,hideEmpty:!0},{slug:dm.LocalId,name:this.t("id_sur_l_v_nem_01171"),category:this.t("champs_de_formu_64126"),fieldType:Ue.Number,hideEmpty:!0},{slug:dm.OrganizationLocalId,name:this.t("id_sur_l_organi_45566"),category:this.t("champs_de_formu_64126"),fieldType:Ue.Number,hideEmpty:!0},{slug:dm.DuplicatedFrom,name:this.t("est_dupliqu_62764"),category:this.t("champs_de_formu_64126"),fieldType:Ue.Checkbox,hideEmpty:!0},...this.customFieldsToFilters(e)]}getBarcodeFilters(){return[{slug:dm.WeezeventBarcodeId,name:this.t("TicketId"),category:"Weezevent",fieldType:Ue.Text,hideEmpty:!0},{slug:dm.WeezeventBarcodeVersion,name:this.t("version_du_code_15471"),category:"Weezevent",fieldType:Ue.Number,hideEmpty:!0}]}getAvailabilitiesFilters(e,t){return[{slug:"numberOfAvailableDays",name:this.t("nombre_de_jours_07962"),category:this.t("disponibilit_s_49923"),fieldType:Ue.Number,hideEmpty:!0},{slug:"wishedSlots",name:this.t("disponibilit_s_49923"),category:this.t("disponibilit_s_49923"),fieldType:Ue.DateTimeRange,startAt:t.startAt,endAt:t.endAt},{slug:"wishedSlotsCustom",name:this.t("disponibilit_s_26280"),category:this.t("disponibilit_s_49923"),fieldType:Ue.Select,hideEmpty:!0,needLoading:!0,eventId:e},{slug:"numberOfWishedSlots",name:this.t("nombre_de_dispo_26405"),category:this.t("disponibilit_s_49923"),fieldType:Ue.Number,hideEmpty:!0}]}getPositionsFilters(e,t,n){return[{slug:"volunteerRegistrationState",name:this.t("statut_d_affect_57444"),category:this.t("missions_63972"),fieldType:Ue.Select,values:mi.map(e=>({id:e,name:e})),hideEmpty:!0},{slug:"position",name:this.t("missions_affect_97811"),category:this.t("missions_63972"),fieldType:Ue.Select,hideEmpty:!0,needLoading:!0,eventId:t},{slug:"hasOtherEventPosition",name:this.t("has_shift_on_ot_92375"),category:this.t("missions_63972"),fieldType:Ue.Select,hideEmpty:!0,needLoading:!0,organizationId:e,eventId:t},{slug:"positionSlotId",name:this.t("cr_neau_affect_50400_plural"),category:this.t("missions_63972"),fieldType:Ue.Select,hideEmpty:!0,needLoading:!0,eventId:t},{slug:"positionSlot",name:this.t("date_d_affectat_98566"),category:this.t("missions_63972"),fieldType:Ue.DateTimeRange,startAt:n.startAt,endAt:n.endAt},{slug:"positionCategory",name:this.t("cat_gories_de_m_93035"),category:this.t("missions_63972"),fieldType:Ue.Select,hideEmpty:!0,needLoading:!0,eventId:t},{slug:"numberOfAssignments",name:this.t("nombre_d_affect_31455"),category:this.t("missions_63972"),fieldType:Ue.Number,hideEmpty:!0,needLoading:!0,eventId:t},{slug:"numberOfAssignmentsPerDay",name:this.t("nombre_d_affect_22087"),category:this.t("missions_63972"),fieldType:Ue.Number,hideEmpty:!0,startAt:n.startAt,endAt:n.endAt},{slug:"numberOfAssignmentsDays",name:this.t("nombre_de_jours_86280"),category:this.t("missions_63972"),fieldType:Ue.Number,hideEmpty:!0,startAt:n.startAt,endAt:n.endAt},{slug:"preassignedPosition",name:this.t("missions_pr_af_02950"),category:this.t("missions_63972"),fieldType:Ue.Select,hideEmpty:!0,needLoading:!0,eventId:t},{slug:"numberOfPreAssignments",name:this.t("nombre_de_pr_a_86516"),category:this.t("missions_63972"),fieldType:Ue.Number,hideEmpty:!0},{slug:"preassignedPositionCategory",name:this.t("cat_gories_pr_83825"),category:this.t("missions_63972"),fieldType:Ue.Select,hideEmpty:!0,needLoading:!0,eventId:t},{slug:"wishedPositionsCategories",name:this.t("cat_gories_souh_80851"),category:this.t("missions_63972"),fieldType:Ue.Select,needLoading:!0,eventId:t},{slug:"numberOfWishedPositionsCategories",name:this.t("nombre_de_cat_g_05961"),category:this.t("missions_63972"),fieldType:Ue.Number,hideEmpty:!0},{slug:"wishedPositions",name:this.t("missions_souhai_23225"),category:this.t("missions_63972"),fieldType:Ue.Select,needLoading:!0,eventId:t},{slug:"numberOfWishedPositions",name:this.t("nombre_de_missi_52579"),category:this.t("missions_63972"),fieldType:Ue.Number,hideEmpty:!0},{slug:"wishedPositionsSlots",name:this.t("cr_neaux_souhai_90108"),category:this.t("missions_63972"),fieldType:Ue.Select,needLoading:!0,eventId:t},{slug:"numberOfWishedPositionsSlots",name:this.t("nombre_de_cr_ne_28370"),category:this.t("missions_63972"),fieldType:Ue.Number,hideEmpty:!0},{slug:"volunteersMinutes",name:this.t("nombre_de_minut_50497"),category:this.t("missions_63972"),fieldType:Ue.Number,hideEmpty:!0},{slug:"volunteersMinutesDays",name:this.t("nombre_de_minut_89574"),category:this.t("missions_63972"),fieldType:Ue.Number,hideEmpty:!0,startAt:n.startAt,endAt:n.endAt},{slug:"checkInAt",name:this.t("point_le_93167"),category:this.t("missions_63972"),fieldType:Ue.Datetime,useLocalZone:!0},{slug:"checkOutAt",name:this.t("d_point_le_29289"),category:this.t("missions_63972"),fieldType:Ue.Datetime,useLocalZone:!0},{slug:"checkInState",name:this.t("statut_de_point_44328"),category:this.t("missions_63972"),fieldType:Ue.Select,values:Pn.map(e=>({id:e,name:this.t(e)})),hideEmpty:!0},{slug:"checkInAtPositionSlot",name:this.t("cr_neaux_point_71408"),category:this.t("missions_63972"),fieldType:Ue.Select,hideEmpty:!0,needLoading:!0,eventId:t},{slug:"checkOutAtPositionSlot",name:this.t("cr_neaux_d_poin_45477"),category:this.t("missions_63972"),fieldType:Ue.Select,hideEmpty:!0,needLoading:!0,eventId:t},{slug:"overlappingAssignments",name:this.t("affectations_se_49339"),category:this.t("missions_63972"),fieldType:Ue.Checkbox,hideEmpty:!0},{slug:"differentPositions",name:this.t("les_missions_af_61709"),category:this.t("missions_63972"),fieldType:Ue.Checkbox,hideEmpty:!0}]}getAccreditationsFilters(e,t,n){return(0,po.A)([{slug:"accreditationState",name:this.t("statut_d_accr_d_75527"),category:this.t("accr_ditations_39450"),fieldType:Ue.Select,values:Rn.map(e=>({id:e,name:e})),hideEmpty:!0},{slug:"numberOfAccreditations",name:this.t("nombre_d_accr_d_02452"),category:this.t("accr_ditations_39450"),fieldType:Ue.Number,hideEmpty:!0,needLoading:!0,eventId:t},{slug:"accreditation",name:this.t("accr_ditations_33155"),category:this.t("accr_ditations_39450"),fieldType:Ue.Select,hideEmpty:!0,needLoading:!0,eventId:t},{slug:"hasOtherEventAccreditation",name:this.t("has_accreditati_31831"),category:this.t("accr_ditations_39450"),fieldType:Ue.Select,hideEmpty:!0,needLoading:!0,organizationId:e,eventId:t},{slug:"accreditationCategory",name:this.t("cat_gories_d_ac_37678"),category:this.t("accr_ditations_39450"),fieldType:Ue.Select,hideEmpty:!0,needLoading:!0,eventId:t},{slug:"wishedAccreditationsSlots",name:this.t("accr_ditations_74375"),category:this.t("accr_ditations_39450"),fieldType:Ue.Select,needLoading:!0,eventId:t},{slug:"numberOfWishedAccreditationsSlots",name:this.t("nombre_d_accr_d_92021"),category:this.t("accr_ditations_39450"),fieldType:Ue.Number,hideEmpty:!0},{slug:"accreditationSlotId",name:this.t("cr_neaux_accr_d_70934"),category:this.t("accr_ditations_39450"),fieldType:Ue.Select,hideEmpty:!0,needLoading:!0,eventId:t},{slug:"accreditationSlot",name:this.t("date_d_accr_dit_26214"),category:this.t("accr_ditations_39450"),fieldType:Ue.Date,startAt:n.startAt,endAt:n.endAt,hideEmpty:!0},{slug:"scannedAccreditationsSlots",name:this.t("accr_ditations_52153"),category:this.t("accr_ditations_39450"),fieldType:Ue.Select,hideEmpty:!0,needLoading:!0,eventId:t},{slug:"differentAccreditations",name:this.t("les_accr_ditati_88638"),category:this.t("accr_ditations_39450"),fieldType:Ue.Checkbox,hideEmpty:!0},{slug:dm.AccreditationProfile,name:this.t("profil_d_accr_d_02274"),category:this.t("accr_ditations_39450"),fieldType:Ue.Select,needLoading:!0,eventId:t},{slug:dm.WishedAccreditationProfile,name:this.t("profil_d_accr_d_63000"),category:this.t("accr_ditations_39450"),fieldType:Ue.Select,needLoading:!0,eventId:t}])}getDelegationsFilters(e,t){return(0,po.A)([{slug:"delegation",name:this.t("inscrit_via_la_86398"),category:this.t("d_l_gations_78318"),fieldType:Ue.Select,needLoading:!0,eventId:t},{slug:"delegationCategory",name:this.t("inscrit_via_la_12241"),category:this.t("d_l_gations_78318"),fieldType:Ue.Select,needLoading:!0,organizationId:e,eventId:t},{slug:"isDelegationCategoryLeader",name:this.t("est_responsable_36610"),category:this.t("d_l_gations_78318"),fieldType:Ue.Checkbox},{slug:"isDelegationLeader",name:this.t("est_responsable_87662"),category:this.t("d_l_gations_78318"),fieldType:Ue.Checkbox,needLoading:!0,eventId:t},gu(e)?{slug:dm.DelegationBannerNumber,name:this.t("num_ro_de_bande_16203"),category:this.t("d_l_gations_78318"),fieldType:Ue.Number}:null,{slug:"hasBeenInvitedToDelegation",name:this.t("a_re_u_le_lien_34327"),category:this.t("d_l_gations_78318"),fieldType:Ue.Checkbox,hideEmpty:!0}])}getSegmentsFilters(e,t,n,i){return[{slug:"segments",name:this.t("fait_partie_de_44650"),category:this.t("vues_personnali_80652"),fieldType:Ue.Select,values:i.segmentsFolders.flatMap(e=>e.segments).filter(e=>e.id!==n),hideEmpty:!0},{slug:"usersSegments",name:this.t("fait_partie_de_44893"),category:this.t("vues_personnali_80652"),fieldType:Ue.Select,hideEmpty:!0,needLoading:!0,organizationId:e},{slug:"positionsSegments",name:this.t("affecter_une_10657"),category:this.t("vues_personnali_80652"),fieldType:Ue.Select,hideEmpty:!0,needLoading:!0,eventId:t},{slug:"accreditationsSegments",name:this.t("affecter_une_91431"),category:this.t("vues_personnali_80652"),fieldType:Ue.Select,hideEmpty:!0,needLoading:!0,eventId:t},{slug:"delegationsSegments",name:this.t("affecter_une_45240"),category:this.t("vues_personnali_80652"),fieldType:Ue.Select,hideEmpty:!0,needLoading:!0,eventId:t}]}getFormsFilters(e){return[{slug:"forms",name:this.t("formulaires_rem_62495"),category:this.t("Form_plural"),fieldType:Ue.Select,needLoading:!0,eventId:e},{slug:"formsInsertedAt",name:this.t("dates_de_rempli_65075"),category:this.t("Form_plural"),fieldType:Ue.Date,hideEmpty:!0,needLoading:!0,eventId:e}]}getTeamsFilters(){return[{slug:"isTeam",name:this.t("est_inscrit_en_86193"),category:this.t("_quipes_18817"),fieldType:Ue.Checkbox,hideEmpty:!0},{slug:"teamCode",name:this.t("code_quipe_14296"),category:this.t("_quipes_18817"),fieldType:Ue.Text},{slug:"numberOfTeamMembers",name:this.t("nombre_de_membr_82302"),category:this.t("_quipes_18817"),fieldType:Ue.Number,hideEmpty:!0},{slug:"isTeamLeader",name:this.t("est_chef_d_qui_73792"),category:this.t("_quipes_18817"),fieldType:Ue.Checkbox,hideEmpty:!0}]}getWeezeventFilters(e){return[{slug:dm.WeezeventShortTag,name:this.t("puce_50504"),category:"Weezevent",fieldType:Ue.Text},{slug:dm.WeezeventPairedAt,name:this.t("appair_le_70213"),category:"Weezevent",fieldType:Ue.Datetime,useLocalZone:!0},{slug:dm.WeezaccessChecklists,name:this.t("listes_de_contr_55120"),category:"Weezevent",fieldType:Ue.Select,needLoading:!0,eventId:e}]}getEmailsFilters(e,t){return(0,po.A)([t?{slug:"campaign",name:this.t("campagne_97871"),category:this.t("e_mails_09850"),fieldType:Ue.Campaign,needLoading:!0,eventId:e}:null,t?{slug:"campaignSentAt",name:this.t("date_d_envoi_de_84374"),category:this.t("e_mails_09850"),fieldType:Ue.Date,hideEmpty:!0,needLoading:!0,eventId:e}:null,{slug:"assignmentEmailSentAt",name:this.t("date_d_envoi_de_01614"),category:this.t("e_mails_09850"),fieldType:Ue.Date},{slug:"assignmentEmailState",name:this.t("statut_de_de_l_36346"),category:this.t("e_mails_09850"),fieldType:Ue.Select,values:Ln.filter(e=>e!==Ce.Queued).map(e=>({id:e,name:this.t(e)})),hideEmpty:!0},{slug:"accreditationEmailSentAt",name:this.t("date_d_envoi_de_74383"),category:this.t("e_mails_09850"),fieldType:Ue.Date},{slug:"accreditationEmailState",name:this.t("statut_de_l_e_m_97776"),category:this.t("e_mails_09850"),fieldType:Ue.Select,values:Ln.filter(e=>e!==Ce.Queued).map(e=>({id:e,name:this.t(e)})),hideEmpty:!0},{slug:"emailBlacklist",name:this.t("ne_souhaite_plu_08853"),category:this.t("e_mails_09850"),fieldType:Ue.Checkbox,hideEmpty:!0},t?{slug:"campaignReply",name:this.t("r_ponse_une_c_32448"),category:this.t("e_mails_09850"),fieldType:Ue.Text,needLoading:!0,eventId:e}:null])}getCommentsFilter(e,t){return[{slug:"comments",name:this.t("commentaires_96492"),category:this.t("commentaires_96492"),fieldType:Ue.Text},{slug:"lastCommentAt",name:this.t("date_du_dernier_73554"),category:this.t("commentaires_96492"),fieldType:Ue.Date,hideEmpty:!0},{slug:"commentWrittenBy",name:this.t("commentaire_cr_96610"),category:this.t("commentaires_96492"),fieldType:Ue.Select,hideEmpty:!0,needLoading:!0,organizationId:e,eventId:t}]}};var um;cm=function(e,t,n,i){var a,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(a=e[r])&&(o=(s<3?a(o):s>3?a(t,n,o):a(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o}([(0,En._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[ed,pd,bi])],cm),function(e){e.AccreditationSlot="accreditationSlotId",e.Accreditations="accreditations",e.Action="Action",e.Campaign="campaign",e.CreatedAt="createdAt",e.CreatedBy="createdBy",e.CustomField="customField",e.ExecutedAt="executedAt",e.Frequency="frequency",e.Id="id",e.Name="name",e.PositionSlot="positionSlotId",e.Positions="positions",e.State="state",e.Trigger="trigger",e.VolunteersSegment="volunteersSegment"}(um||(um={}));class mm extends Pu{constructor(e,t,n){super(e,t,n)}getWorkflowsFilters(e,t){return[{slug:um.State,name:this.t("State"),category:this.t("automatisations_60045"),fieldType:Ue.Select,hideEmpty:!0,values:Ii.map(e=>({id:e,name:this.t(e)}))},{slug:um.Trigger,name:this.t("d_clencheur_73493"),category:this.t("automatisations_60045"),fieldType:Ue.Select,hideEmpty:!0,values:_i.map(e=>({id:e,name:this.t(e)}))},{slug:um.Action,name:this.t("action_44224"),category:this.t("automatisations_60045"),fieldType:Ue.Select,hideEmpty:!0,values:gi.map(e=>({id:e,name:this.t(e)}))},{slug:um.Frequency,name:this.t("Frequency"),category:this.t("automatisations_60045"),fieldType:Ue.Select,hideEmpty:!0,values:hi.map(e=>({id:e,name:this.t(e)}))},{slug:um.CreatedBy,name:this.t("cr_e_par_30622"),category:this.t("automatisations_60045"),fieldType:Ue.Select,hideEmpty:!0,needLoading:!0,organizationId:e,eventId:t},{slug:um.CreatedAt,name:this.t("cr_e_le_02658"),category:this.t("automatisations_60045"),fieldType:Ue.Datetime,hideEmpty:!0},...t?[{slug:um.AccreditationSlot,name:this.t("cr_neaux_accr_d_70934"),category:this.t("automatisations_60045"),fieldType:Ue.Select,hideEmpty:!0,needLoading:!0,organizationId:e,eventId:t},{slug:um.PositionSlot,name:this.t("cr_neau_affect_50400_plural"),category:this.t("automatisations_60045"),fieldType:Ue.Select,hideEmpty:!0,needLoading:!0,organizationId:e,eventId:t}]:[],{slug:um.Campaign,name:this.t("campagne_97871"),category:this.t("automatisations_60045"),fieldType:Ue.Select,hideEmpty:!0,needLoading:!0,organizationId:e,eventId:t},{slug:um.CustomField,name:this.t("CustomField"),category:this.t("automatisations_60045"),fieldType:Ue.Select,hideEmpty:!0,needLoading:!0,organizationId:e,eventId:t},{slug:um.VolunteersSegment,name:this.t("vue_s_lectionn_21556"),category:this.t("automatisations_60045"),fieldType:Ue.Select,hideEmpty:!0,needLoading:!0,organizationId:e,eventId:t}]}getWorkflowsPossibleColumns(){return[{slug:um.Id,name:this.t("id_51738"),isSearchable:!0,isSortable:!0,width:100,sortAttribute:Qt.Id},{slug:um.Name,name:this.t("nom_de_l_automa_04883"),isSearchable:!0,isSortable:!0,sortAttribute:Qt.Name,minWidth:240},{slug:um.State,name:this.t("State"),minWidth:180},{slug:um.Trigger,name:this.t("d_clencheur_73493"),minWidth:180},{slug:um.Action,name:this.t("action_44224"),minWidth:180},{slug:um.CreatedBy,name:this.t("cr_e_par_30622"),isSearchable:!0,minWidth:180},{slug:um.CreatedAt,name:this.t("cr_e_le_02658"),isSortable:!0,sortAttribute:Qt.CreatedAt,minWidth:180},{slug:um.VolunteersSegment,name:this.t("vue_s_lectionn_21556"),isSortable:!0,sortAttribute:Qt.VolunteersSegment,minWidth:320},{slug:um.ExecutedAt,name:this.t("ex_cut_e_le_99019"),isSortable:!0,sortAttribute:Qt.ExecutedAt,minWidth:180},{slug:um.Accreditations,name:this.t("accr_ditations_39450"),minWidth:320},{slug:um.Positions,name:this.t("missions_63972"),minWidth:320},{slug:um.Campaign,name:this.t("campagne_97871"),minWidth:240},{slug:um.CustomField,name:this.t("CustomField"),minWidth:240},{slug:um.Frequency,name:this.t("Frequency"),minWidth:180}]}}const gm=new En.i0(e=>{e(Fl).toSelf().inSingletonScope(),e(ed).toSelf().inSingletonScope(),e(pd).toSelf().inSingletonScope(),e(Ul).toSelf().inSingletonScope(),e(Yl).toSelf().inSingletonScope(),e(Hl).toSelf().inSingletonScope(),e(bu).toSelf().inSingletonScope(),e(Au).toSelf().inSingletonScope()}),hm=new En.i0(e=>{e(To).toSelf().inSingletonScope(),e(Ro).toSelf().inSingletonScope(),e(Uo).toSelf().inSingletonScope(),e(Go).toSelf().inSingletonScope(),e(Ao).toSelf().inSingletonScope(),e(Eo).toSelf().inSingletonScope(),e(Vo).toSelf().inSingletonScope(),e(Wo).toSelf().inSingletonScope(),e(qo).toSelf().inSingletonScope(),e(Xo).toSelf().inSingletonScope(),e(Jo).toSelf().inSingletonScope(),e(ko).toSelf().inSingletonScope(),e(nr).toSelf().inSingletonScope(),e(hr).toSelf().inSingletonScope(),e(pr).toSelf().inSingletonScope(),e(fr).toSelf().inSingletonScope(),e(Ir).toSelf().inSingletonScope(),e(_r).toSelf().inSingletonScope(),e(xr).toSelf().inSingletonScope(),e(Zr).toSelf().inSingletonScope(),e(vr).toSelf().inSingletonScope(),e(Yr).toSelf().inSingletonScope(),e(qr).toSelf().inSingletonScope(),e(jr).toSelf().inSingletonScope(),e(gr).toSelf().inSingletonScope(),e(Kr).toSelf().inSingletonScope(),e(Xr).toSelf().inSingletonScope(),e(Jr).toSelf().inSingletonScope(),e(ud).toSelf().inSingletonScope(),e(ld).toSelf().inSingletonScope(),e(md).toSelf().inSingletonScope(),e(Td).toSelf().inSingletonScope(),e(Rd).toSelf().inSingletonScope(),e(Md).toSelf().inSingletonScope(),e(Dd).toSelf().inSingletonScope(),e(Od).toSelf().inSingletonScope(),e(wd).toSelf().inSingletonScope(),e(Pd).toSelf().inSingletonScope(),e($d).toSelf().inSingletonScope(),e(kd).toSelf().inSingletonScope(),e(Nd).toSelf().inSingletonScope(),e(Ud).toSelf().inSingletonScope(),e(Lo).toSelf().inSingletonScope(),e(zo).toSelf().inSingletonScope(),e(Vd).toSelf().inSingletonScope(),e(Wd).toSelf().inSingletonScope(),e(qd).toSelf().inSingletonScope(),e(Yd).toSelf().inSingletonScope(),e(Hd).toSelf().inSingletonScope(),e(Zd).toSelf().inSingletonScope(),e(Kd).toSelf().inSingletonScope(),e(Xd).toSelf().inSingletonScope(),e(Qd).toSelf().inSingletonScope(),e(Jd).toSelf().inSingletonScope(),e(el).toSelf().inSingletonScope(),e(dd).toSelf().inSingletonScope(),e(Bd).toSelf().inSingletonScope(),e(rd).toSelf().inSingletonScope(),e(rl).toSelf().inSingletonScope(),e(ll).toSelf().inSingletonScope(),e(tl).toSelf().inSingletonScope(),e(ol).toSelf().inSingletonScope(),e(ml).toSelf().inSingletonScope(),e(pl).toSelf().inSingletonScope(),e(Cl).toSelf().inSingletonScope(),e(El).toSelf().inSingletonScope(),e(Tl).toSelf().inSingletonScope(),e(Rl).toSelf().inSingletonScope(),e(Ml).toSelf().inSingletonScope(),e(Dl).toSelf().inSingletonScope(),e(Ol).toSelf().inSingletonScope(),e(wl).toSelf().inSingletonScope(),e(Pl).toSelf().inSingletonScope(),e(Ld).toSelf().inSingletonScope(),e(Fd).toSelf().inSingletonScope(),e(zd).toSelf().inSingletonScope(),e(kl).toSelf().inSingletonScope(),e(zl).toSelf().inSingletonScope()}),pm=new En.i0(e=>{e(bd).toSelf().inSingletonScope(),e(Pu).toSelf().inSingletonScope(),e(Lu).toSelf().inSingletonScope(),e(ku).toSelf().inSingletonScope(),e(Fu).toSelf().inSingletonScope(),e(Uu).toSelf().inSingletonScope(),e(Bu).toSelf().inSingletonScope(),e(Vu).toSelf().inSingletonScope(),e(qu).toSelf().inSingletonScope(),e(em).toSelf().inSingletonScope(),e(om).toSelf().inSingletonScope(),e(nm).toSelf().inSingletonScope(),e(am).toSelf().inSingletonScope(),e(cm).toSelf().inSingletonScope(),e(mm).toSelf().inSingletonScope()});function fm(){const e=new En.mc,t=window.HEAVENT_TRANSLATIONS||{},n=window.HEAVENT_LANGUAGE;if(0===Object.keys(t).length)throw new Error("window.HEAVENT_TRANSLATIONS does not exist");if(!ad(n))throw new Error("window.HEAVENT_LANGUAGE is not valid");return e.bind(bi).toConstantValue(new bi(ad(n),t)),e.load(gm,hm,pm),e}const Im=e=>(0,i.jsx)(vi.Provider,{value:{container:fm(),useQuery:ro,useMutation:so,useExecuteQuery:Ss,useParams:co,useHistory:uo,useLocation:mo,useLocalStorage:go},children:e.children}),_m=()=>((0,d.useEffect)(()=>{gs().then(e=>{"true"===sa.LOG_TOKEN&&console.log(`"${is}": "${e||""}"`)})},[]),null),xm=e=>{const t=Di(),n=Oi();return(0,d.useEffect)(()=>{h(e.path)&&(e.replace?n.replace(e.path,e.state):n.push(e.path,e.state)),e.push&&n.push(e.push(t),e.state),e.onLoad&&e.onLoad()},[]),(0,i.jsx)("div",{})},ym=e=>{const t=Di(),{user:n}=io();return n&&e.shouldHaveUser||!n&&!e.shouldHaveUser?(0,i.jsx)(i.Fragment,{children:e.children}):(0,i.jsx)(xm,{path:e.getRedirectPath(t),replace:!0})},Sm={PLURAL:"accreditation-categories",SINGLE:"accreditation-category"},jm={PLURAL:"accreditations",SINGLE:"accreditation"},bm={PLURAL:"slots",SINGLE:"slot"},vm="dashboard",Am="member",Cm="members",Em={ACCREDITATION_CATEGORIES:Sm.PLURAL,ACCREDITATION_CATEGORY:e=>Ar([Sm.SINGLE,e]),ACCREDITATIONS:jm.PLURAL,ACCREDITATION:e=>Ar([jm.SINGLE,e]),ACCREDITATION_SLOTS:bm.PLURAL,ACCREDITATION_SLOT:e=>Ar([bm.SINGLE,e])},Tm={ACCREDITATION_CATEGORY:({accreditationCategoryId:e,...t})=>Ar([rc.EVENT(t),Em.ACCREDITATION_CATEGORY(e)]),ACCREDITATION_CATEGORY_DASHBOARD:e=>Ar([Tm.ACCREDITATION_CATEGORY(e),vm]),ACCREDITATION_CATEGORY_MEMBERS:e=>Ar([Tm.ACCREDITATION_CATEGORY(e),Cm])},Rm={ACCREDITATIONS_IMPORT:e=>Ar([rc.EVENT(e),Em.ACCREDITATIONS,Tr.IMPORT]),ACCREDITATIONS:e=>Ar([rc.EVENT(e),Em.ACCREDITATIONS]),ACCREDITATION:({accreditationId:e,...t})=>Ar([rc.EVENT(t),Em.ACCREDITATION(e)]),ACCREDITATION_DASHBOARD:e=>Ar([Rm.ACCREDITATION(e),vm]),ACCREDITATION_MEMBERS:e=>Ar([Rm.ACCREDITATION(e),Cm]),ACCREDITATION_MEMBER:({userInfoId:e,...t})=>Ar([Rm.ACCREDITATION_MEMBERS(t),Am,e]),ACCREDITATION_MEMBER_INFORMATION:e=>Ar([Rm.ACCREDITATION_MEMBER(e),Rr.INFORMATION])},Mm={ACCREDITATION_SLOT:({accreditationSlotId:e,...t})=>Ar([Dm.ACCREDITATION(t),Em.ACCREDITATION_SLOT(e)]),ACCREDITATION_SLOT_DASHBOARD:e=>Ar([Mm.ACCREDITATION_SLOT(e),vm]),ACCREDITATION_SLOT_MEMBERS:e=>Ar([Mm.ACCREDITATION_SLOT(e),Cm])},Dm={...Tm,...Rm,...Mm},Om={ITEMS:{POSITIONS_CATEGORIES:{PLURAL:"position-categories",SINGLE:"position-category"},POSITIONS:{PLURAL:"positions",SINGLE:"position"},POSITION_SLOTS:{PLURAL:"slots",SINGLE:"slot"}},ACTIONS:{IMPORT:{CSV:`${Tr.IMPORT}/csv`}},SECTIONS:{PREASSIGNED_MEMBERS:"preassigned-members",PLANNING:"planning"}},wm={POSITION_CATEGORIES:Om.ITEMS.POSITIONS_CATEGORIES.PLURAL,POSITION_CATEGORY:e=>Ar([Om.ITEMS.POSITIONS_CATEGORIES.SINGLE,e]),POSITIONS:Om.ITEMS.POSITIONS.PLURAL,POSITION:e=>Ar([Om.ITEMS.POSITIONS.SINGLE,e]),POSITION_SLOTS:Om.ITEMS.POSITION_SLOTS.PLURAL,POSITION_SLOT:e=>Ar([Om.ITEMS.POSITION_SLOTS.SINGLE,e])},Pm={POSITION_CATEGORY:({positionCategoryId:e,...t})=>Ar([rc.EVENT(t),wm.POSITION_CATEGORY(e)]),POSITION_CATEGORY_DASHBOARD:e=>Ar([Pm.POSITION_CATEGORY(e),Rr.DASHBOARD]),POSITION_CATEGORY_MEMBERS:e=>Ar([Pm.POSITION_CATEGORY(e),Rr.MEMBERS]),POSITION_CATEGORY_PREASSIGNED_MEMBERS:e=>Ar([Pm.POSITION_CATEGORY(e),Om.SECTIONS.PREASSIGNED_MEMBERS])},$m={POSITIONS:e=>Ar([rc.EVENT(e),wm.POSITIONS]),POSITION:({positionId:e,positionCategoryId:t,...n})=>Ar(t?[Pm.POSITION_CATEGORY({positionCategoryId:t,...n}),wm.POSITION(e)]:[rc.EVENT(n),wm.POSITION(e)]),POSITION_DASHBOARD:e=>Ar([$m.POSITION(e),Rr.DASHBOARD]),POSITION_MEMBERS:e=>Ar([$m.POSITION(e),Rr.MEMBERS]),POSITION_PREASSIGNED_MEMBERS:e=>Ar([$m.POSITION(e),Om.SECTIONS.PREASSIGNED_MEMBERS]),POSITION_PLANNING:e=>Ar([$m.POSITION(e),Om.SECTIONS.PLANNING]),POSITION_MEMBER:({userInfoId:e,...t})=>Ar([$m.POSITION_MEMBERS(t),Rr.MEMBER,e]),POSITION_MEMBER_INFORMATION:e=>Ar([$m.POSITION_MEMBER(e),Rr.INFORMATION]),POSITION_IMPORT_CSV:e=>Ar([rc.EVENT(e),Om.ACTIONS.IMPORT.CSV])},km={POSITION_SLOTS:e=>Ar([$m.POSITION(e),wm.POSITION_SLOTS]),POSITION_SLOT:({positionSlotId:e,...t})=>Ar([$m.POSITION(t),wm.POSITION_SLOT(e)])},Nm={...Pm,...$m,...km},Lm="/auth",zm=`${Lm}/sign-in`,Fm=`${Lm}/sign-up`,Um="/backoffice",Bm=e=>`${Rc.ORGANIZATION({organizationId:e})}/parameters`,Gm=(e,t,n,i)=>`${Nm.POSITION_SLOT({organizationId:e,eventId:t,positionId:n,positionSlotId:i})}/check-members`,Vm=(e,t,n,i)=>`${Nm.POSITION_SLOT({organizationId:e,eventId:t,positionId:n,positionSlotId:i})}/members`,Wm=(e,t)=>`${rc.EVENT({organizationId:e,eventId:t})}/volunteers`,qm=(e,t)=>`${Wm(e,t)}/search`,Ym=(e,t,n)=>`${qm(e,t)}/volunteer/${n}`,Hm=(e,t,n)=>`${Wm(e,t)}/${n}`,Zm=(e,t,n,i)=>`${Hm(e,t,n)}/volunteer/${i}`,Km=(e,t,n,i)=>`${Hm(e,t,n)}/volunteer-panel/${i}`,Qm=(e,t)=>`${rc.EVENT({organizationId:e,eventId:t})}/emails`,Xm=(e,t)=>`${rc.EVENT({organizationId:e,eventId:t})}/options`,Jm=(e,t)=>`${rc.EVENT({organizationId:e,eventId:t})}/dashboard`,eg={HOME:`/${Cr}`,UNSUBSCRIBE_EMAIL:"/unsubscribe-email",USER_UPDATE_BY_TICKET_ID:(e,t)=>`/organization/${e}/update-by-ticket-id/field/${t}`,USER_FIELD_UPDATE:(e,t,n,i)=>`/organization/${e}/user/${t}/field/${n}/update/${i}`,USER_EVENT_UNREGISTER:(e,t,n)=>`/organization/${e}/user/${t}/event/${n}/unregister`,USER_CHECK_IN:(e,t)=>`/organization/${e}/user/${t}/check-in`,USER_CHECK_OUT:(e,t)=>`/organization/${e}/user/${t}/check-out`,AUTH:Lm,AUTH_FORGOT_PASSWORD:`${Lm}/forgot-password`,AUTH_SIGN_IN:zm,AUTH_SIGN_UP:Fm,AUTH_SIGN_IN_EMAIL:`${zm}/email`,AUTH_SIGN_IN_CODE:`${zm}/code`,AUTH_SIGN_UP_CREDENTIALS:`${Fm}/credentials`,AUTH_SIGN_UP_CODE:`${Fm}/code`,COGNITO_CALLBACK:"/cognito-callback",MAGIC_LINK:(e,t)=>`/magic-link/${e}/${t}`,ACCEPT_TERMS_AND_CONDITIONS:e=>`${Rc.ORGANIZATION({organizationId:e})}/accept-terms-and-conditions`,BACKOFFICE:Um,BACKOFFICE_ORGANIZATIONS:`${Um}/organizations`,EDIT_BACKOFFICE_ORGANIZATION:e=>`${Um}/organization/${e}/edit`,BACKOFFICE_INVOICES:`${Um}/invoices`,ORGANIZATION_PARAMETERS:Bm,ORGANIZATION_PARAMETERS_PROFILE:e=>`${Bm(e)}/profile`,ORGANIZATION_PARAMETERS_INFOS:e=>`${Bm(e)}/general`,ORGANIZATION_PARAMETERS_TEAM:e=>`${Bm(e)}/team`,ORGANIZATION_PARAMETERS_GROUPS:e=>`${Bm(e)}/groups`,CREATE_ORGANIZATION_PARAMETERS_GROUP:e=>`${Bm(e)}/groups/create`,EDIT_ORGANIZATION_PARAMETERS_GROUP:(e,t)=>`${Bm(e)}/groups/group/${t}/edit`,ORGANIZATION_PARAMETERS_ROLES:e=>`${Bm(e)}/roles`,CREATE_ORGANIZATION_PARAMETERS_ROLE:e=>`${Bm(e)}/roles/create`,EDIT_ORGANIZATION_PARAMETERS_ROLE:(e,t)=>`${Bm(e)}/roles/role/${t}/edit`,ORGANIZATION_PARAMETERS_EMAILS:e=>`${Bm(e)}/emails`,CREATE_ORGANIZATION_PARAMETERS_EMAILS_SENDERS:e=>`${Bm(e)}/emails/senders/create`,EDIT_ORGANIZATION_PARAMETERS_EMAILS_SENDERS:(e,t)=>`${Bm(e)}/emails/senders/${t}/edit`,ORGANIZATION_PARAMETERS_EMAILS_SENDERS:e=>`${Bm(e)}/emails/senders`,ORGANIZATION_PARAMETERS_EMAILS_SENDERS_PREVIEW:(e,t)=>`${Bm(e)}/emails/senders/${t}/preview`,ORGANIZATION_PARAMETERS_EMAILS_DNS:e=>`${Bm(e)}/emails/dns`,ORGANIZATION_PARAMETERS_DELEGATIONS_SPACE:e=>`${Bm(e)}/delegations-space`,ORGANIZATION_PARAMETERS_DELEGATIONS_SPACE_DESIGN:e=>`${Bm(e)}/delegations-space/design`,ORGANIZATION_PARAMETERS_DELEGATIONS_SPACE_INTEGRATION:e=>`${Bm(e)}/delegations-space/integration`,ORGANIZATION_PARAMETERS_DELEGATIONS_SPACE_EMAILS:e=>`${Bm(e)}/delegations-space/emails`,ORGANIZATION_PARAMETERS_CATEGORIES:e=>`${Bm(e)}/categories`,ORGANIZATION_PARAMETERS_CATEGORIES_CUSTOM_FIELDS:e=>`${Bm(e)}/categories/custom-fields`,ORGANIZATION_PARAMETERS_CATEGORIES_POSITIONS:e=>`${Bm(e)}/categories/positions`,ORGANIZATION_PARAMETERS_CATEGORIES_ACCREDITATIONS:e=>`${Bm(e)}/categories/accreditations`,ORGANIZATION_PARAMETERS_CATEGORIES_ACCREDITATIONS_PROFILES:e=>`${Bm(e)}/categories/accreditation-profiles`,ORGANIZATION_PARAMETERS_CATEGORIES_DELEGATIONS:e=>`${Bm(e)}/categories/delegations`,ORGANIZATION_PARAMETERS_TAGS:e=>`${Bm(e)}/tags`,ORGANIZATION_PARAMETERS_TRANSLATIONS:e=>`${Bm(e)}/translations`,ORGANIZATION_PARAMETERS_INVOICES:e=>`${Bm(e)}/invoices`,ORGANIZATION_PARAMETERS_ACTIVITY:e=>`${Bm(e)}/activity`,ORGANIZATION_PARAMETERS_SKIDATA:e=>`${Bm(e)}/skidata`,ORGANIZATION_PARAMETERS_ORGANIZATION_SWITCH:e=>`${Bm(e)}/organization-switch`,ORGANIZATION_PARAMETERS_DELETE_ACCOUNT:e=>`${Bm(e)}/delete-account`,COMMUNITY_USERS_SEGMENT:(e,t)=>`${Rc.ORGANIZATION({organizationId:e})}/community/users/${t}`,COMMUNITY_USERS_USER:(e,t,n)=>`${Rc.ORGANIZATION({organizationId:e})}/community/users/${t}/user/${n}`,COMMUNITY_USERS_USER_INFORMATIONS:(e,t,n)=>`${Rc.ORGANIZATION({organizationId:e})}/community/users/${t}/user/${n}/${Rr.INFORMATION}`,COMMUNITY_USERS_DUPLICATES:e=>`${Rc.ORGANIZATION({organizationId:e})}/community/users-duplicates`,COMMUNITY_EDIT_USER:(e,t)=>`${Rc.ORGANIZATION({organizationId:e})}/community/user/${t}/edit`,COMMUNITY_EDIT_USER_FORM:(e,t,n)=>`${Rc.ORGANIZATION({organizationId:e})}/community/user/${t}/edit/form/${n}`,COMMUNITY_VOLUNTEERS_IMPORT:e=>`${Rc.ORGANIZATION({organizationId:e})}/community/import`,COMMUNITY_FILES_IMPORT:e=>`${Rc.ORGANIZATION({organizationId:e})}/community/documents-import`,COMMUNITY_DELEGATIONS:e=>`${Rc.ORGANIZATION({organizationId:e})}/community/delegations`,COMMUNITY_DELEGATIONS_SEGMENT:(e,t)=>`${Rc.ORGANIZATION({organizationId:e})}/community/delegations/${t}`,COMMUNITY_DELEGATION:(e,t)=>`${Rc.ORGANIZATION({organizationId:e})}/community/delegation/${t}`,COMMUNITY_CREATE_DELEGATION(e,t){let n=`${Rc.ORGANIZATION({organizationId:e})}/community/create-delegation`;return t&&(n=`${n}/${t}`),n},COMMUNITY_EDIT_DELEGATION:(e,t)=>`${Rc.ORGANIZATION({organizationId:e})}/community/delegation/${t}/edit`,CREATE_EVENT_WITH_ORGANIZATION(e){let t="/create-event";return e&&(t=`${t}/${e}`),t},CREATE_EVENT:e=>`${Rc.ORGANIZATION({organizationId:e})}/create-event`,EVENTS_SEGMENT:(e,t)=>`${Rc.ORGANIZATION({organizationId:e})}/events/${t}`,EVENT_DELEGATIONS_IMPORT:(e,t)=>`${rc.EVENT({organizationId:e,eventId:t})}/delegations-import`,EVENT_VOLUNTEERS_IMPORT:(e,t)=>`${rc.EVENT({organizationId:e,eventId:t})}/members-import`,EVENT_FILES_IMPORT:(e,t)=>`${rc.EVENT({organizationId:e,eventId:t})}/documents-import`,EDIT_EVENT:(e,t)=>`${rc.EVENT({organizationId:e,eventId:t})}/edit`,DASHBOARD:Jm,DASHBOARD_EVENT_SWITCH:(e,t)=>`${Jm(e,t)}/event-switch`,POSITION_MEMBERS_USER:(e,t,n,i,a)=>`${Nm.POSITION_MEMBERS({organizationId:e,eventId:t,positionCategoryId:n,positionId:i})}/${a}`,POSITION_MEMBERS_USER_INFORMATIONS:(e,t,n,i,a)=>`${Nm.POSITION_MEMBERS({organizationId:e,eventId:t,positionCategoryId:n,positionId:i})}/${a}/${Rr.INFORMATION}`,EXPORT_POSITIONS_MAP:(e,t)=>`/export/event/${e}/positions/${t}/map`,POSITIONS_SEARCH:(e,t)=>`${Nm.POSITIONS({organizationId:e,eventId:t})}/search`,POSITIONS_SEGMENT:(e,t,n)=>`${Nm.POSITIONS({organizationId:e,eventId:t})}/${n}`,CREATE_POSITION(e,t,n){let i=`${rc.EVENT({organizationId:e,eventId:t})}/create-position`;return n&&(i=`${i}/${n}`),i},POSITION_MAP:(e,t)=>`/position/${e}-${t}/map`,POSITION_SETTINGS:(e,t,n)=>`${Nm.POSITION({organizationId:e,eventId:t,positionId:n})}/settings`,EDIT_POSITION:(e,t,n)=>`${Nm.POSITION({organizationId:e,eventId:t,positionId:n})}/edit`,POSITION_SLOT_ASSIGN_VOLUNTEERS:(e,t,n,i)=>`${Nm.POSITION_SLOT({organizationId:e,eventId:t,positionId:n,positionSlotId:i})}/assign-volunteers`,POSITION_SLOT_MEMBERS:Vm,POSITION_SLOT_MEMBERS_USER:(e,t,n,i,a)=>`${Vm(e,t,n,i)}/${a}`,POSITION_SLOT_MEMBERS_USER_INFORMATIONS:(e,t,n,i,a)=>`${Vm(e,t,n,i)}/${a}/${Rr.INFORMATION}`,POSITION_SLOT_MEMBERS_CHECK_OPTIONS:(e,t,n,i)=>`${Vm(e,t,n,i)}/check-options`,POSITION_SLOT_CHECK_MEMBERS_CHECK_IN:(e,t,n,i)=>`${Gm(e,t,n,i)}/check-in`,POSITION_SLOT_CHECK_MEMBERS_CHECK_OUT:(e,t,n,i)=>`${Gm(e,t,n,i)}/check-out`,POSITION_SLOT_CHECK_MEMBERS_RESET:(e,t,n,i)=>`${Gm(e,t,n,i)}/reset`,VOLUNTEERS:Wm,VOLUNTEERS_SEARCH:qm,VOLUNTEERS_SEARCH_USER:Ym,VOLUNTEERS_SEARCH_USER_INFORMATIONS:(e,t,n)=>`${Ym(e,t,n)}/${Rr.INFORMATION}`,VOLUNTEERS_SEGMENT:(e,t,n)=>`${Wm(e,t)}/${n}`,VOLUNTEERS_LIST_USER:Zm,VOLUNTEERS_LIST_USER_INFORMATIONS:(e,t,n,i)=>`${Zm(e,t,n,i)}/${Rr.INFORMATION}`,VOLUNTEERS_LIST_USER_PANEL:Km,VOLUNTEERS_LIST_USER_PANEL_ACCREDITATIONS:(e,t,n,i)=>`${Km(e,t,n,i)}/accreditations`,VOLUNTEERS_LIST_USER_PANEL_AVAILABILITIES:(e,t,n,i)=>`${Km(e,t,n,i)}/availabilities`,VOLUNTEERS_LIST_USER_PANEL_POSITIONS:(e,t,n,i)=>`${Km(e,t,n,i)}/positions`,VOLUNTEERS_LIST_USER_PANEL_TEAM:(e,t,n,i,a)=>`${Km(e,t,n,i)}/team/${a}`,EDIT_USER:(e,t,n)=>`${rc.EVENT({organizationId:e,eventId:t})}/user/${n}/edit`,EDIT_USER_FORM:(e,t,n,i)=>`${rc.EVENT({organizationId:e,eventId:t})}/user/${n}/edit/form/${i}`,EDIT_USER_MISSIONS:(e,t,n)=>`${rc.EVENT({organizationId:e,eventId:t})}/user/${n}/edit-missions`,EDIT_USER_MISSIONS_FORM:(e,t,n,i)=>`${rc.EVENT({organizationId:e,eventId:t})}/user/${n}/edit-missions/form/${i}`,EDIT_USER_SLOTS:(e,t,n)=>`${rc.EVENT({organizationId:e,eventId:t})}/user/${n}/edit-slots`,EDIT_USER_SLOTS_FORM:(e,t,n,i)=>`${rc.EVENT({organizationId:e,eventId:t})}/user/${n}/edit-slots/form/${i}`,EDIT_USER_ACCREDITATIONS:(e,t,n)=>`${rc.EVENT({organizationId:e,eventId:t})}/user/${n}/edit-accreditations`,EDIT_USER_ACCREDITATIONS_FORM:(e,t,n,i)=>`${rc.EVENT({organizationId:e,eventId:t})}/user/${n}/edit-accreditations/form/${i}`,ASSIGNMENTS:(e,t)=>`${rc.EVENT({organizationId:e,eventId:t})}/assignments`,ASSIGNMENT:(e,t,n)=>`${rc.EVENT({organizationId:e,eventId:t})}/assignment/${n}`,EDIT_ASSIGNMENT:(e,t,n)=>`${rc.EVENT({organizationId:e,eventId:t})}/edit-assignment/${n}`,TEAM_ASSIGNMENT:(e,t,n)=>`${rc.EVENT({organizationId:e,eventId:t})}/team-assignment/${n}`,PRE_ASSIGNMENT:(e,t,n)=>`${rc.EVENT({organizationId:e,eventId:t})}/pre-assignment/${n}`,ACCREDITATIONS_ASSIGNMENTS:(e,t)=>`${rc.EVENT({organizationId:e,eventId:t})}/accreditations-assignments`,ACCREDIT:(e,t,n)=>`${rc.EVENT({organizationId:e,eventId:t})}/accredit/${n}`,EDIT_ACCREDIT:(e,t,n)=>`${rc.EVENT({organizationId:e,eventId:t})}/edit-accredit/${n}`,EVENT_EMAILS:Qm,EVENT_EMAILS_PARAMETERS:(e,t)=>`${Qm(e,t)}/parameters`,OPTIONS:Xm,OPTIONS_API:(e,t)=>`${Xm(e,t)}/api`,OPTIONS_WEEZEVENT:(e,t)=>`${Xm(e,t)}/weezevent`,ACCREDITATIONS_SEGMENT:(e,t,n)=>`${Dm.ACCREDITATIONS({organizationId:e,eventId:t})}/${n}`,CREATE_ACCREDITATION(e,t,n){let i=`${rc.EVENT({organizationId:e,eventId:t})}/create-accreditation`;return n&&(i=`${i}/${n}`),i},EDIT_ACCREDITATION:(e,t,n)=>`${Dm.ACCREDITATION({organizationId:e,eventId:t,accreditationId:n})}/edit`,ACCREDITATION_MAP:(e,t)=>`/accreditation/${e}-${t}/map`,DELEGATIONS_SEGMENT:(e,t,n)=>`${Yc.DELEGATIONS({organizationId:e,eventId:t})}/${n}`,CREATE_DELEGATION(e,t,n){let i=`${rc.EVENT({organizationId:e,eventId:t})}/create-delegation`;return n&&(i=`${i}/${n}`),i},EDIT_DELEGATION:(e,t,n)=>`${Yc.DELEGATION({organizationId:e,eventId:t,delegationId:n})}/edit`},tg=(e,t)=>`/volunteers/${e}-${t}`,ng=(e,t)=>`${tg(e,t)}/assignments`,ig=(e,t)=>`${tg(e,t)}/auth`,ag=(e,t,n,i)=>`/magic-link/${e}/${t}/${n}/${i}`,sg=(e,t)=>`${tg(e,t)}/register`,og=ng;function rg(e,t){return e&&!t.startsWith("/embed")?`/embed${t}`:t}const dg=()=>{const{code:e,source:t,organizationId:n,eventId:i}=Di();return(0,d.useEffect)(()=>{const s=localStorage.getItem(ds),o=localStorage.getItem(rs);if(h(s)&&h(o)&&h(e)&&h(t)){localStorage.removeItem(ds),localStorage.removeItem(rs);const r=new os.TU({Username:s,Pool:us()});r.Session=o,r.setAuthenticationFlowType("CUSTOM_AUTH"),r.sendCustomChallengeAnswer(e,{async onSuccess(e){const a=e.getIdToken().getJwtToken();await ys(js,{token:a}),n&&i&&t===Qe.VolunteerRegister?location.href=sg(n,i):n&&i&&t===Qe.VolunteerAssignments?location.href=og(n,i):t===Qe.App?location.href=eg.HOME:location.href="/"},onFailure(e){a("Could not sendCustomChallengeAnswer",e),location.href="/"}})}else location.href="/"},[]),null},lg=n.p+"img/asoFavicon-54a1d8b7694af9631875.png",cg=n.p+"img/faviconWeezcrew-d996db40808b25d12473.png",ug=n.p+"img/netflixFavicon-a36aceec7edf22da5a10.png",mg=n.p+"img/partageTaPassionFavicon-b06b908163009e73794c.png";function gg(e){(0,d.useEffect)(()=>{const t=document.title;return document.title=(n=location.host,`${h(i=e)?`${i} | `:""}${function(e){return e===Dc?"Partage Ta Passion":e===$c?"One Piece":e===Pc?"A.S.O.":Qr}(n)}`),()=>{document.title=t};var n,i},[e])}const hg={PLURAL:"members",SINGLE:"member"},pg={PLURAL:"profiles",SINGLE:"profile"},fg="accreditations",Ig="actions",_g="availabilities",xg="campaigns",yg="changes",Sg="comments",jg="documents",bg="events",vg="form",Ag="forms",Cg="history",Eg="informations",Tg="messages",Rg="positions",Mg="scans",Dg="segments",Og=e=>Ar([hg.SINGLE,e]),wg=e=>Ar([pg.SINGLE,e]),Pg={USER_PROFILE:({userInfoId:e,...t})=>Ar([Rc.ORGANIZATION(t),wg(e)]),USER_PROFILES:e=>Ar([Rc.ORGANIZATION(e),pg.PLURAL]),ORGANIZATION_MEMBERS:e=>Ar([Rc.ORGANIZATION(e),hg.PLURAL]),MEMBERS:e=>Ar(["delegationId"in e?Yc.DELEGATION(e):"eventId"in e&&e.eventId?rc.EVENT(e):ic.COMMUNITY(e),hg.PLURAL]),MEMBER:({userInfoId:e,...t})=>Ar(["eventId"in t&&t.eventId?rc.EVENT(t):ic.COMMUNITY(t),Og(e)]),MEMBER_INFORMATION:e=>Ar([Pg.MEMBER(e),Eg]),MEMBER_ACTIONS:e=>Ar([Pg.MEMBER(e),Ig]),MEMBER_AVAILABILITIES:e=>Ar([Pg.MEMBER(e),_g]),MEMBER_COMMENTS:e=>Ar([Pg.MEMBER(e),Sg]),MEMBER_HISTORY:e=>Ar([Pg.MEMBER(e),Cg]),MEMBER_HISTORY_CHANGES:e=>Ar([Pg.MEMBER(e),Cg,yg]),MEMBER_HISTORY_CAMPAIGNS:e=>Ar([Pg.MEMBER(e),Cg,xg]),MEMBER_HISTORY_EVENTS:e=>Ar([Pg.MEMBER(e),Cg,bg]),MEMBER_HISTORY_FORMS:e=>Ar([Pg.MEMBER(e),Cg,Ag]),MEMBER_HISTORY_SCANS:e=>Ar([Pg.MEMBER(e),Cg,Mg]),MEMBER_HISTORY_SEGMENTS:e=>Ar([Pg.MEMBER(e),Cg,Dg]),MEMBER_POSITIONS:e=>Ar([Pg.MEMBER(e),Rg]),MEMBER_ACCREDITATIONS:e=>Ar([Pg.MEMBER(e),fg]),MEMBER_FORMS:e=>Ar([Pg.MEMBER(e),Ag]),MEMBER_FORM:e=>Ar([Pg.MEMBER(e),vg,e.formId]),MEMBER_FORM_EDIT:e=>Pr(Pg.MEMBER_FORM(e)),MEMBER_MESSAGES:e=>Ar([Pg.MEMBER(e),Tg]),MEMBER_DOCUMENTS:e=>Ar([Pg.MEMBER(e),jg]),CREATE:e=>wr(Pg.MEMBERS(e))};function $g(){return{history:Oi(),params:Di(),translate:Ei()}}function kg(e){try{return location.host===Dc&&e===Nc[Dc]}catch{return!1}}function Ng(e){try{return location.host===Pc&&e===Nc[Pc]}catch{return!1}}function Lg(e){return e?new Promise((t,n)=>{const i=new Image;i.onload=()=>{t(i)},i.onerror=()=>{n(new Error("Could not load image"))},i.src=e}):Promise.resolve(null)}function zg(e){const t=C({colors:{...Hr(e)}});document.getElementById("heavent-react-hook")?.classList.add(t.toString())}const Fg=d.createContext({}),Ug=e=>{const{data:t,isLoading:n}=Ri("query OrganizationPublic(\n $organizationId: OrganizationId!\n $loadDelegationsSpace: Boolean!\n $loadMembersSpace: Boolean!\n) {\n organization: organizationPublic(id: $organizationId) {\n delegationsSpaceDesign: spaceDesign(spaceType: DelegationSpace)\n @include(if: $loadDelegationsSpace) {\n ...DesignColors\n\n banner {\n url\n }\n\n logo {\n url\n }\n }\n\n membersSpaceDesign: spaceDesign(spaceType: MembersSpace) @include(if: $loadMembersSpace) {\n ...DesignColors\n\n banner {\n url\n }\n\n logo {\n url\n }\n }\n }\n}\n",{organizationId:e.organizationId,loadDelegationsSpace:e.loadDelegationsSpace,loadMembersSpace:e.loadMembersSpace},[La.DesignColorsFragment]);const[a,s]=d.useState(void 0),[o,r]=d.useState(void 0),[l,c]=d.useState(!0);return d.useEffect(()=>{t.organization&&(zg(t.organization?.delegationsSpaceDesign?.colors??t.organization.membersSpaceDesign?.colors??{}),(async()=>{t.organization.delegationsSpaceDesign?(await Promise.all([Lg(t.organization.delegationsSpaceDesign?.banner?.url),Lg(t.organization.delegationsSpaceDesign?.logo?.url)]),s(t.organization.delegationsSpaceDesign?.banner?.url),r(t.organization.delegationsSpaceDesign?.logo?.url),c(!1)):t.organization.membersSpaceDesign?(await Promise.all([Lg(t.organization.membersSpaceDesign?.banner?.url),Lg(t.organization.membersSpaceDesign?.logo?.url)]),s(t.organization.membersSpaceDesign?.banner?.url),r(t.organization.membersSpaceDesign?.logo?.url),c(!1)):c(!1)})())},[t.organization]),(0,i.jsx)(Fg.Provider,{value:{bannerUrl:a,logoUrl:o},children:n||l||!0===e.isLoading?e.skeleton:e.children})};var Bg=n(924),Gg=n(952);const Vg=(0,d.createContext)({}),Wg=j("div",{variants:{height:{default:{height:"100%"},1:{minHeight:"$space$1"},2:{minHeight:"$space$2"},3:{minHeight:"$space$3"},4:{minHeight:"$space$4"},5:{minHeight:"$space$5"},6:{minHeight:"$space$6"},7:{minHeight:"$space$7"},8:{minHeight:"$space$8"},9:{minHeight:"$space$9"},10:{minHeight:"$space$10"},11:{minHeight:"$space$11"},12:{minHeight:"$space$12"},13:{minHeight:"$space$13"}},width:{default:{width:"100%"},1:{minWidth:"$space$1"},2:{minWidth:"$space$2"},3:{minWidth:"$space$3"},4:{minWidth:"$space$4"},5:{minWidth:"$space$5"},6:{minWidth:"$space$6"},7:{minWidth:"$space$7"},8:{minWidth:"$space$8"},9:{minWidth:"$space$9"},10:{minWidth:"$space$10"},11:{minWidth:"$space$11"},12:{minWidth:"$space$12"},13:{minWidth:"$space$13"}}},defaultVariants:{height:"default",width:"default"}});var qg=n(2695);const Yg=e=>{const t={iconStyle:"solid"};switch(e.iconStyle){case"error":return(0,i.jsx)(la,{className:"h-alert-icon",icon:"circle-exclamation",...t});case"warning":return(0,i.jsx)(la,{className:"h-alert-icon",icon:"triangle-exclamation",...t});case"success":return(0,i.jsx)(la,{className:"h-alert-icon",icon:"circle-check",...t});case"primary":case"gray":return(0,i.jsx)(la,{className:"h-alert-icon",icon:"circle-info",...t});default:ir(e.iconStyle)}},Hg=j($,{borderRadius:"$1",alignItems:"flex-start",gap:"$2",padding:"$4","& i":{fontSize:"$textMd"},variants:{alertStyle:{error:{background:"$error50",border:"1px solid $error500",color:"$gray800","& i.h-alert-icon":{color:"$error500"}},warning:{background:"$warning50",border:"1px solid $warning500",color:"$gray800","& i.h-alert-icon":{color:"$warning500"}},success:{background:"$success50",border:"1px solid $success500",color:"$gray800","& i.h-alert-icon":{color:"$success500"}},primary:{background:"$primary50",border:"1px solid $primary500",color:"$gray800","& i.h-alert-icon":{color:"$primary500"}},gray:{background:"$gray50",border:"1px solid $gray500",color:"$gray800","& i.h-alert-icon":{color:"$gray500"}}}},defaultVariants:{alertStyle:"error"}}),Zg=({min:e=2,max:t=6,textStyle:n="heading",children:a,...s})=>{t{const i=e?.parentElement;if(!i||n===t)return n;for(const e of Array(i.children))if(e[0]instanceof HTMLHeadingElement)return c(i,++n);return c(i,n)},[t]);return d.useEffect(()=>l(`h${c(o.current?.parentElement,e)}`),[e,t]),(0,i.jsx)(N,{ref:o,as:r,...s,textStyle:n,children:a})},Kg=e=>{const{translate:t}=$g();return(0,i.jsxs)(Hg,{alertStyle:e.alertStyle,"aria-live":e["aria-live"]??"polite",role:"alert",width:e.width,children:[(0,i.jsx)($,{align:"start",children:(0,i.jsx)(Ni,{height:"20px",width:"20px",children:(0,i.jsx)(Yg,{iconStyle:e.alertStyle})})}),(0,i.jsx)($,{align:"start",css:{flex:"1",gap:"2px"},direction:"column",children:e.children}),e.onClose&&(0,i.jsx)(pa,{"aria-label":t("fermer_62479"),color:"invisible",css:{height:"20px",padding:0,width:"20px","& i":{color:"$gray500"}},textAlign:"center",onClick:e.onClose,children:(0,i.jsx)(la,{icon:"xmark"})})]})},Qg=({children:e})=>(0,i.jsx)(Zg,{css:{color:"$gray900",fontWeight:"$medium",fontSize:"$textSm",lineHeight:"1.42857"},children:e}),Xg=({children:e})=>(0,i.jsx)(i.Fragment,{children:e}),Jg=e=>(0,i.jsxs)(Kg,{alertStyle:"error","aria-live":"assertive",children:[(0,i.jsx)(Qg,{children:e.title}),(0,i.jsx)(Xg,{children:e.children})]});function eh(e){return e?(0,Na.A)(Object.values(e).map(e=>"string"==typeof e?e:Array.isArray(e)?(0,po.A)(e).map(e=>eh(e)).flat():eh(e)).flat()):[]}const th=e=>{const{translate:t}=$g(),{formRenderProps:{errors:n,submitErrors:a},showErrors:s}=(0,d.useContext)(Vg),o=eh((0,qg.A)({},n,a));return s&&F(o)?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Jg,{title:t("form_has_errors_14074"),children:(0,i.jsx)("ul",{style:{margin:"0",paddingInlineStart:"var(--space-4)"},children:o.map((e,t)=>(0,i.jsx)("li",{children:e},t))})}),!0!==e.hideSpacer&&(0,i.jsx)(Wg,{height:"6"})]}):null};function nh(e,t){Object.values(t.fields).forEach(e=>{e.data={...e.data,forceDisplayError:!0}})}const ih=e=>{const t=d.useRef(null),{setShowErrors:n}=d.useContext(Vg),a=()=>{const t=e.formRenderProps.handleSubmit();return t?.catch(e=>{console.debug("Form submission failed:",e)}),t},s=i=>(i?.preventDefault?.(),e.formRenderProps.invalid?(n(!0),e.formRenderProps.form.mutators.forceErrors(),setTimeout(()=>{e.customErrorRef&&e.customErrorRef.current?(e.customErrorRef.current.scrollIntoView(),e.customErrorRef.current.scrollTop=0):!e.hideDefaultErrors&&t.current&&(t.current.scrollIntoView(),t.current.scrollTop=0)},100),!e.formRenderProps.hasValidationErrors&&e.formRenderProps.hasSubmitErrors?a():void 0):a());return(0,i.jsxs)($,{ref:t,as:"form",onSubmit:s,...w(e),children:[!e.hideDefaultErrors&&!e.customErrorRef&&(0,i.jsx)(th,{}),(0,i.jsx)("input",{style:{display:"none"},type:"submit",value:"Submit"}),e.render({...e.formRenderProps,handleSubmit:s})]})},ah=e=>{const t=Ci(Au),[n,a]=d.useState(!1);return(0,i.jsx)(Gg.lV,{initialValues:e.initialValues,initialValuesEqual:e.initialValuesEqual??gd.A,mutators:{...e.mutators,...Bg.A,forceErrors:nh},render:t=>(0,i.jsx)(Vg.Provider,{value:{formRenderProps:t,showErrors:n,setShowErrors:a},children:(0,i.jsx)(ih,{...(0,D.A)(e,["direction","align","justify","wrap","gap","css","height","width"]),customErrorRef:e.customErrorRef,formRenderProps:t,hideDefaultErrors:e.hideDefaultErrors,render:e.render})}),validate:n=>e.schema?t.validateForForm(e.schema)(n):"function"==typeof e.validate?e.validate(n):{},onSubmit:async(t,n,i)=>{const s=await e.onSubmit(t,n,i);return Object.keys(s||{}).length>0&&a(!0),s}})};var sh=n(9008);function oh(e){return e.data?.forceDisplayError&&e.invalid||e.touched&&!e.pristine&&e.invalid||!1}var rh=n(5664);function dh(){const[e]=(0,d.useState)(()=>(0,rh.A)("forminput-")),[t]=(0,d.useState)(()=>(0,rh.A)("forminputlabel-")),[n]=(0,d.useState)(()=>(0,rh.A)("forminputdesc-")),[i]=(0,d.useState)(()=>(0,rh.A)("forminputerror-"));return{inputId:e,labelId:t,descId:n,errorId:i}}const lh=({children:e,id:t})=>e?(0,i.jsx)(Ni,{color:"gray500",fontSize:"textXs",id:t,children:e}):null,ch=e=>e.children?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Wg,{height:"1"}),(0,i.jsx)(Ni,{color:"error"===e.state?"error500":"gray500",fontSize:"textXs",id:e.id,role:"error"===e.state?"alert":void 0,children:e.children})]}):null,uh=({id:e,children:t,htmlFor:n,isClickable:a=!0})=>t?(0,i.jsx)("label",{htmlFor:n,id:e,style:{display:"block",cursor:"inherit",fontWeight:"$medium",marginBlockEnd:0},onClick:e=>{a||e.preventDefault()},children:(0,i.jsx)(Ni,{color:"gray700",fontWeight:"medium",children:t})}):null,mh=j("div",{alignItems:"center",borderRadius:"$1",display:"flex",gap:"$space$2",padding:"0 $space$3",position:"relative",width:"100%","& input::placeholder":{color:"$gray500"},"&:focus-within":{border:"2px solid $primaryCustom500"},variants:{state:{active:{backgroundColor:"white",border:"1px solid $gray300",color:"$gray900"},disabled:{background:"$gray50",border:"1px solid $gray300",color:"$gray500"},error:{backgroundColor:"white",border:"1px solid $error500"},search:{backgroundColor:"$gray100",border:"1px solid $gray300",color:"$gray500"}},cursor:{default:{cursor:"default"},text:{cursor:"text"},pointer:{cursor:"pointer"}},height:{fixed:{height:"40px"},fluid:{minHeight:"40px"}}},defaultVariants:{state:"active",height:"fixed"}}),gh=d.forwardRef(({height:e,cursor:t,css:n,icon:a,children:s,state:o,onClick:r,rightIcon:d,rightText:l,onRightIconClick:c,...u},m)=>(0,i.jsxs)(mh,{ref:m,className:"h-styled-input-container",css:n,cursor:t,height:e,state:o,onClick:e=>{r?.(e)},...u,children:[a&&(0,i.jsx)($,{css:{color:"$gray500"},role:"presentation",children:(0,i.jsx)(la,{icon:a})}),s,"error"===o&&(0,i.jsx)($,{className:"styled-input-container-circle-exclamation",css:{color:"$error500"},children:(0,i.jsx)(la,{icon:"circle-exclamation"})}),d&&(0,i.jsx)($,{css:{color:"$gray500",cursor:"function"==typeof c?"pointer":"inherit"},role:"presentation",onClick:e=>{c?.(e)},children:(0,i.jsx)(la,{icon:d})}),h(l)&&(0,i.jsx)(Ni,{css:{userSelect:"none"},font:"gray500 textSm regular",children:l})]}));gh.displayName="StyledInputContainer";const hh=d.forwardRef(({autoComplete:e,isEmail:t,shouldParseAsInt:n,css:a,label:s,description:o,hint:r,onRightIconClick:l,state:c,type:u,onChange:m,rightIcon:g,rightText:p,icon:f,treatIntNaNAsNull:I,..._},x)=>{const y=d.useRef(),S=d.useRef(),j=x??S,{inputId:b,descId:v,errorId:A}=dh();return(0,i.jsxs)($,{ref:y,css:a,direction:"column",width:1,children:[(0,i.jsx)(uh,{htmlFor:b,children:s}),(0,i.jsx)(lh,{id:v,children:o}),(s||o)&&(0,i.jsx)(Wg,{height:"1"}),(0,i.jsx)(gh,{cursor:"text",icon:f,rightIcon:g,rightText:p,state:c,onClick:()=>j.current?.focus(),onRightIconClick:e=>{xa(e),l?.(e)},children:(0,i.jsx)(Ni,{color:"inherit",css:{flex:"1",height:"100%","& input":{background:"transparent",border:"none",color:"$gray800",height:"100%",outline:"none",width:"100%","&:disabled":{color:"$gray500"}},"& input::placeholder":{color:"search"===c?"$gray400":"$gray500",opacity:1},"& input::-ms-input-placeholder ":{color:"search"===c?"$gray400":"$gray500",opacity:1}},children:(0,i.jsx)("input",{ref:j,"aria-describedby":o?v:void 0,"aria-errormessage":"error"===c?A:void 0,"aria-invalid":"error"===c,autoComplete:e??"off",disabled:"disabled"===c,id:b,type:u??(t?"email":n?"number":"text"),onChange:e=>{if(t&&h(e.target.value))m(e.target.value.toLowerCase());else if(!0===n){const t=parseInt(e.target.value,10);isNaN(t)?m(I?null:0):m(t)}else m(e.target.value)},..._})})}),(0,i.jsx)(ch,{id:A,state:c,children:r})]})});hh.displayName="TextInput";const ph=({autoComplete:e,hint:t,shouldParseAsInt:n,name:a,state:s,...o})=>{const r=(0,d.useCallback)(e=>{switch(e){case ke.City:return"address-level1";case ke.DateOfBirth:return"bday";case ke.FirstName:return"given-name";case ke.LastName:return"family-name";case ke.PostalCode:return"postal-code";case ke.Street:return"street-address";case ke.Country:case ke.Language:case ke.Nationality:case ke.Phone:case ke.Picture:case ke.Sex:default:return}},[]),l=(0,d.useMemo)(()=>a.startsWith("formRegister.userInfo.fields.")?r(a.split(".").pop())??e:e,[a,e,r]),c=(0,d.useCallback)(e=>{const a=oh(e.meta);return(0,i.jsx)(hh,{autoComplete:l,hint:a?e.meta.error||e.meta.submitError:t,shouldParseAsInt:n??!1,state:a?"error":s,value:e.input.value,onBlur:e.input.onBlur,onChange:t=>{e.input.onChange(t)},onFocus:e.input.onFocus,...o})},[t,n,s,l,o]);return(0,i.jsx)(Gg.D0,{name:a,parse:sh.A,render:c})},fh={AUTH_EMAIL:"heavent-auth-email",BACKOFFICE_INVOICES_COLUMNS:"heavent-backoffice-invoices-columns",BACKOFFICE_COLUMNS:"heavent-backoffice-columns",BACKOFFICE_LIMIT:"heavent-backoffice-limit",BACKOFFICE_PREDICATES:"heavent-backoffice-predicates",BACKOFFICE_SEARCH:"heavent-backoffice-search",BACKOFFICE_SORT:"heavent-backoffice-sort",CURRENT_EVENT_ID:"heavent-current-event-id",CURRENT_EVENT_NAME:"heavent-current-event-name",CURRENT_ORGANIZATION_ID:"heavent-current-organization-id",DELEGATIONS_SPACE_TAB:"heavent-delegations-space-tab",EVENT_ID:"heavent-event-id",HIDE_HUBSPOT:"hide-hubspot",ORGANIZATION_ID:"heavent-organization-id",ACCREDITATIONS_IMPORT_FORMATS:"heavent-accreditations-import-formats",ACCREDITATIONS_IMPORT_MAPPINGS:"heavent-accreditations-import-mappings",ACCREDITATIONS_IMPORT_MODE:"heavent-accreditations-import-mode",ACCREDITATIONS_IMPORT_PRESETS:e=>`heavent-accreditations-import-presets-${e}`,ACCREDITATIONS_PROFILES_IMPORT_FORMATS:"heavent-accreditations-profiles-import-formats",ACCREDITATIONS_PROFILES_IMPORT_MAPPINGS:"heavent-accreditations-profiles-import-mappings",ACCREDITATIONS_PROFILES_IMPORT_MODE:"heavent-accreditations-profiles-import-mode",ACCREDITATIONS_PROFILES_IMPORT_PRESETS:e=>`heavent-accreditations-profiles-import-presets-${e}`,EVENTS_IMPORT_FORMATS:"heavent-events-import-formats",EVENTS_IMPORT_MAPPINGS:"heavent-events-import-mappings",EVENTS_IMPORT_MODE:"heavent-events-import-mode",EVENTS_IMPORT_PRESETS:e=>`heavent-events-import-presets-${e}`,POSITIONS_IMPORT_FORMATS:"heavent-positions-import-formats",POSITIONS_IMPORT_MAPPINGS:"heavent-positions-import-mappings",POSITIONS_IMPORT_MODE:"heavent-positions-import-mode",POSITIONS_IMPORT_PRESETS:e=>`heavent-positions-import-presets-${e}`,VOLUNTEERS_IMPORT_FORMATS:"heavent-volunteers-import-formats",VOLUNTEERS_IMPORT_MAPPINGS:"heavent-volunteers-import-mappings",VOLUNTEERS_IMPORT_MODE:"heavent-volunteers-import-mode",VOLUNTEERS_IMPORT_PRESETS:e=>`heavent-volunteers-import-presets-${e}`,DELEGATIONS_IMPORT_FORMATS:"heavent-delegations-import-formats",DELEGATIONS_IMPORT_MAPPINGS:"heavent-delegations-import-mappings",DELEGATIONS_IMPORT_PRESETS:e=>`heavent-delegations-import-presets-${e}`,DELEGATIONS_IMPORT_MODE:"heavent-delegations-import-mode",DELEGATION_MEMBERS_IMPORT_FORMATS:"heavent-delegation-members-import-formats",DELEGATION_MEMBERS_IMPORT_MAPPINGS:"heavent-delegation-members-import-mappings",DELEGATION_MEMBERS_IMPORT_PRESETS:e=>`heavent-delegation-members-import-presets-${e}`,DELEGATION_MEMBERS_IMPORT_MODE:"heavent-delegation-members-import-mode"};var Ih=n(2302);const _h=e=>{const t=Ei(),n=wi(),a=Ci(Au),s=Ci(Wo),{mutate:o}=$s(),[r,l]=(0,d.useState)(0),[c,u]=(0,d.useState)(null),m=location.pathname.includes("/delegations")||Ng(e.organizationId),g=(0,d.useCallback)(async t=>{await ys(js,{token:t}),m?(n.removeItem(fh.DELEGATIONS_SPACE_TAB),location.pathname=`${sa.HEAVENT_PUBLIC_URL.pathname}${Or(Rc.ORGANIZATION_DELEGATIONS({organizationId:e.organizationId}))}`):location.pathname=`${sa.HEAVENT_PUBLIC_URL.pathname}${Or(Pg.USER_PROFILES({organizationId:e.organizationId}))}`},[m]),[h,p]=(0,d.useState)(0),[f,I]=(0,d.useState)(!1),[_,x]=(0,d.useState)(Date.now()),y=()=>{location.reload()},{connectionTitle:S,connectionSubtitle:j}=Sr(e.organizationId);return(0,i.jsx)(ah,{css:{...e.css},direction:"column",initialValues:{email:"",code:""},render:({handleSubmit:e,submitting:n})=>(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Ni,{color:"gray900",fontSize:{"@initial":"textXl","@tablet":"displaySm"},fontWeight:"semiBold",textAlign:{"@initial":"center","@desktop":"start"},children:t(m?S:"connexion_mon_39916")}),(0,i.jsx)(Wg,{height:"3"}),(0,i.jsx)(Ni,{color:"gray500",textAlign:{"@initial":"center","@desktop":"start"},children:t(m?j:"connecter_vous_19749")}),(0,i.jsx)(Wg,{height:"7"}),(0,i.jsx)(ph,{autoComplete:"email",isEmail:!0,label:t("adresse_e_mail_60930"),name:"email",placeholder:t("entrez_votre_ad_42451"),state:1===r||f?"disabled":"active"}),1===r&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Wg,{height:"4"}),(0,i.jsx)(ph,{autoComplete:"one-time-code",inputMode:"numeric",label:t("code_re_u_par_e_75150"),name:"code",pattern:"\\d*",placeholder:t("code_re_u_par_e_75150"),state:f?"disabled":void 0})]}),(0,i.jsx)(Wg,{height:"6"}),f?(0,i.jsx)(pa,{textAlign:"center",onClick:y,children:t("recommencer_14712")}):(0,i.jsx)(pa,{isLoading:n,textAlign:"center",onClick:e,children:t(0===r?"recevoir_un_cod_82139":"se_connecter_63820")})]}),validate:a.validateForForm(s.signInSchema()),onSubmit:async n=>{if(0!==r){const{user:e,callbacks:i}=c;return _s({code:n.code,user:e,callbacks:i}).then(g,e=>{if("RETRY"===e.type)return p(h+1),{code:t("le_code_n_est_p_95065",3-(h+1))};{let i;return xs(e.message,n.email,_),I(!0),i=$a.dw.fromMillis(Date.now()-_).as("minutes")>3?t("le_code_a_expir_45975"):t("le_code_n_est_p_12317"),{FORM_ERROR:i}}})}{await o({loginCodeEmail:{email:n.email,organizationId:e.organizationId,source:m?Qe.DelegationsSpace:Qe.MembersSpace}}),x(Date.now());const t=await Is(n.email,Ih.A,Ih.A);u(t),l(1)}}})};function xh(e){const t=window.matchMedia(e),[n,i]=(0,d.useState)(t.matches);return(0,d.useEffect)(()=>{const e=()=>i(t.matches);return t.addEventListener("change",e),()=>t.removeEventListener("change",e)},[n,e]),n}function yh(){return xh(y.desktop)}function Sh(){return xh(y.tablet)}const jh={Aso:{Aso:n(8301),HomeBackground:n(8144),Logo:n(0)},Blanks:{Accreditation:n(7008),Member:n(5594)},Maps:{GooglePlan:n(1416),GoogleSatellite:n(6954),IgnPlan:n(4025)},AvatarGroup:n(384),Background404:n(4236),FormPositionRanked:n(4628),FormPositionUnranked:n(1205),Google:n(1931),GoogleMaps:n(1446),Ign:n(9882),Login:n(2647),Login2x:n(2281),LogoWeezeventSquare:n(6041),NetflixWood:n(5095),UserProfile:n(8264),WeezConstruction:n(6400)},bh={Alert:n(2630),Check:n(3780),DnsBlank:n(1037),DnsWrongDomain:n(8184),Done:n(8652),Done2:n(3574),FileBlank:n(7619),FileCSV:n(9625),FileJPG:n(6751),FilePDF:n(9848),FilePNG:n(6959),FileZIP:n(539),RecrewteerMarker:n(8798),Sad:n(5376),WeezeventBlankHandGlobe:n(2599),WeezeventBlankMessages:n(6687),WeezeventBlankPerson:n(7648),WeezeventBlankSwissArmyKnife:n(4362)},vh=j("div",{display:"grid",variants:{align:{start:{alignItems:"start"},center:{alignItems:"center"},end:{alignItems:"end"}},gap:{1:{gap:"$1"},2:{gap:"$2"},3:{gap:"$3"},4:{gap:"$4"},5:{gap:"$5"},6:{gap:"$6"},7:{gap:"$7"},8:{gap:"$8"},9:{gap:"$9"},10:{gap:"$10"},11:{gap:"$11"},12:{gap:"$12"},13:{gap:"$13"}},columnGap:{1:{columnGap:"$1"},2:{columnGap:"$2"},3:{columnGap:"$3"},4:{columnGap:"$4"},5:{columnGap:"$5"},6:{columnGap:"$6"},7:{columnGap:"$7"},8:{columnGap:"$8"},9:{columnGap:"$9"},10:{columnGap:"$10"},11:{columnGap:"$11"},12:{columnGap:"$12"},13:{columnGap:"$13"}},rowGap:{1:{rowGap:"$1"},2:{rowGap:"$2"},3:{rowGap:"$3"},4:{rowGap:"$4"},5:{rowGap:"$5"},6:{rowGap:"$6"},7:{rowGap:"$7"},8:{rowGap:"$8"},9:{rowGap:"$9"},10:{rowGap:"$10"},11:{rowGap:"$11"},12:{rowGap:"$12"},13:{rowGap:"$13"}}}}),Ah=d.forwardRef((e,t)=>{const n={gridTemplate:e.gridtemplate,gridTemplateColumns:e.gridtemplatecolumns,gridTemplateRows:e.gridtemplaterows};return e.height&&(n.height=O(e.height)),e.width&&(n.width=O(e.width)),(0,i.jsx)(vh,{role:"grid",...e,ref:t,css:{...n,...e.css}})});Ah.displayName="Grid";const Ch=e=>{const t=yh(),n=Sh(),a=t?"720px 1fr":"1fr";return(0,i.jsxs)(Ah,{gridtemplatecolumns:a,gridtemplaterows:"1fr",height:1,width:1,children:[t&&(0,i.jsx)(Ni,{css:{background:`url(${jh.Aso.HomeBackground}) no-repeat`,backgroundSize:"cover",backgroundPosition:"center"}}),(0,i.jsxs)($,{align:"center",css:{overflow:"hidden"},direction:"column",children:[(0,i.jsx)(Wg,{height:"12"}),(0,i.jsx)(Ni,{height:t?160:n?133:96,width:t?383:n?272:231,children:(0,i.jsx)("img",{height:"100%",src:jh.Aso.Logo,width:"100%"})}),(0,i.jsx)(Wg,{height:{"@initial":"10","@tablet":"13"}}),e.children]})]})},Eh=T({"0%":{opacity:1},"50%":{opacity:.4},"100%":{opacity:1}}),Th=d.memo(function(e){const t="circular"===e.variant?e.size:e.height,n="circular"===e.variant?e.size:e.width;return(0,i.jsx)(Ni,{css:{animation:`${Eh} 1.5s ease-in-out 0.5s infinite`,background:"$gray200",borderRadius:"circular"===e.variant?"50%":e.borderRadius,color:"transparent",...e.css},height:t,width:n,children:e.children})}),Rh=()=>(0,i.jsx)(Ch,{children:(0,i.jsxs)($,{direction:"column",width:"$modalMd",children:[(0,i.jsx)(Th,{borderRadius:"$1",height:28,width:1}),(0,i.jsx)(Wg,{height:"1"}),(0,i.jsx)(Th,{borderRadius:"$1",height:42,width:1}),(0,i.jsx)(Wg,{height:"7"}),(0,i.jsx)(Th,{borderRadius:"$1",height:38,width:1}),(0,i.jsx)(Wg,{height:"6"}),(0,i.jsx)(Th,{borderRadius:"$1",height:40,width:1})]})}),Mh=()=>{const{organizationId:e}=Di();return(0,i.jsx)(Ug,{loadDelegationsSpace:!1,loadMembersSpace:!0,organizationId:e,skeleton:(0,i.jsx)(Rh,{}),children:(0,i.jsx)(Ch,{children:(0,i.jsx)(_h,{css:{width:"100%",px:"$6","@tablet":{maxWidth:"100%",px:"$12"},"@desktop":{width:"$modalMd",px:"$3"}},organizationId:e})})})};function Dh(e,t){return t.has("lang")?ad(t.get("lang"))||Ot.En:e||ad(navigator.language)||Ot.En}const Oh=({css:e,children:t,hideIcon:n,to:a,...s})=>{const o=new URL(a.toString(),location.origin),r=n?void 0:["http:","https:"].includes(o.protocol)&&o.origin!==location.origin?"arrow-up-right-from-square":s.download?"arrow-down-to-bracket":void 0;return(0,i.jsx)($,{align:"center",as:"span",css:{cursor:"pointer",fontWeight:"$medium","&:hover":{textDecoration:"underline"},...e},gap:"2",children:(0,i.jsxs)(ra,{to:o,...s,children:[t,r&&(0,i.jsx)(Ni,{as:"span",css:{marginInlineStart:"$1"},children:(0,i.jsx)(la,{icon:r})})]})})};Oh.displayName="LinkText";const wh=e=>{const{translate:t}=$g(),{user:n}=io(),a=Dh(n?.language,new URL(location.href).searchParams),s=(0,d.useMemo)(()=>a===Ot.Fr?`${sa.HEAVENT_ASSETS_URL}/aso/cgus/cgu_fr.pdf`:a===Ot.Es?`${sa.HEAVENT_ASSETS_URL}/aso/cgus/cgu_es.pdf`:`${sa.HEAVENT_ASSETS_URL}/aso/cgus/cgu_en.pdf`,[a]),o=(0,d.useMemo)(()=>a===Ot.Fr?`${sa.HEAVENT_ASSETS_URL}/aso/cgus/confidentialite_fr.pdf`:a===Ot.Es?`${sa.HEAVENT_ASSETS_URL}/aso/cgus/confidentialite_es.pdf`:`${sa.HEAVENT_ASSETS_URL}/aso/cgus/confidentialite_en.pdf`,[a]);return(0,i.jsxs)($,{css:{alignItems:"center",background:"auth"===e.source?"#e20613":"transparent",color:"auth"===e.source?"white":"$gray500 ",fontWeight:"500",gap:"$4",py:"$4","& .h-dot":{display:"none"},"@tablet":{gap:"$7",justifyContent:"center",py:"10px","& .h-dot":{display:"block"}}},direction:{"@initial":"column","@tablet":"row"},width:1,children:[(0,i.jsx)(Ni,{children:(0,i.jsx)(Oh,{hideIcon:!0,to:s,children:t("aso_cgu")})}),(0,i.jsx)(Ni,{className:"h-dot",children:"•"}),(0,i.jsx)(Ni,{children:(0,i.jsx)(Oh,{hideIcon:!0,to:o,children:t("aso_confidentialite")})})]})},Ph=e=>(0,i.jsxs)($,{align:"center",css:{background:"white",paddingTop:"64px","@desktop":{paddingTop:"80px"}},direction:"column",height:1,width:1,children:[(0,i.jsx)(Ni,{height:68,width:185,children:(0,i.jsx)("img",{height:"100%",src:jh.Aso.Aso,width:"100%"})}),(0,i.jsx)(Ni,{css:{minHeight:"148px","@desktop":{minHeight:"98px"}}}),(0,i.jsx)($,{css:{width:"100%",px:"$6","@tablet":{px:"0",width:"360px"},"@desktop":{px:"0",width:"640px"}},children:e.children}),(0,i.jsx)(Ni,{css:{flex:"1"}}),(0,i.jsx)(wh,{source:"auth"})]}),$h=()=>{const{params:{organizationId:e}}=$g();return(0,i.jsx)(Ug,{loadDelegationsSpace:!0,loadMembersSpace:!1,organizationId:e,skeleton:(0,i.jsx)(ua,{}),children:(0,i.jsx)(Ph,{children:(0,i.jsx)(_h,{css:{width:"100%"},organizationId:e})})})},kh=()=>{const{params:{organizationId:e}}=$g(),{logoUrl:t}=d.useContext(Fg);return t?(0,i.jsx)(Ni,{css:{background:`url(${t})`,backgroundSize:"cover"},height:gu(e)?68:120,width:gu(e)?185:120}):null},Nh=()=>(0,i.jsx)($,{css:{marginBottom:"$9","@tablet":{marginBottom:"$10"}},justify:"center",width:1,children:(0,i.jsx)(Th,{borderRadius:"$1",height:140,width:140})}),Lh=j("div",{alignItems:"center",background:"$grayCustom50",display:"flex",flexDirection:"column",height:"100%",overflowY:"auto",padding:"$4",gap:"$7",paddingTop:"$10",width:"100%","@tablet":{padding:"$10"}}),zh={bd:!0,background:"white",padding:"$7 $4",width:"100%","@tablet":{padding:"$7"},"@desktop":{width:"$modalMd"}},Fh=()=>(0,i.jsxs)(Lh,{children:[(0,i.jsx)(Nh,{}),(0,i.jsxs)($,{css:zh,direction:"column",children:[(0,i.jsx)(Th,{borderRadius:"$1",height:28,width:1}),(0,i.jsx)(Wg,{height:"1"}),(0,i.jsx)(Th,{borderRadius:"$1",height:42,width:1}),(0,i.jsx)(Wg,{height:"7"}),(0,i.jsx)(Th,{borderRadius:"$1",height:38,width:1}),(0,i.jsx)(Wg,{height:"6"}),(0,i.jsx)(Th,{borderRadius:"$1",height:40,width:1})]})]}),Uh=e=>{const{organizationId:t}=Di();return(0,i.jsx)(Ug,{loadDelegationsSpace:e.loadDelegationsSpace,loadMembersSpace:e.loadMembersSpace,organizationId:t,skeleton:(0,i.jsx)(Fh,{}),children:(0,i.jsxs)(Lh,{children:[(0,i.jsx)(kh,{}),(0,i.jsx)(_h,{css:zh,organizationId:t})]})})},Bh=e=>{const{params:{organizationId:t}}=$g();return kg(t)?(0,i.jsx)(Mh,{}):Ng(t)?(0,i.jsx)($h,{}):(0,i.jsx)(Uh,{loadDelegationsSpace:e.loadDelegationsSpace,loadMembersSpace:e.loadMembersSpace})},Gh=e=>`/v2/organization/${e}`,Vh=(e,t)=>`${Gh(e)}/member/${t}`,Wh=({organizationId:e,userInfoId:t,eventId:n})=>n?`${Vh(e,t)}/event/${n}`:`${Vh(e,t)}/community`,qh=e=>Gh(e),Yh=e=>`${Gh(e)}/profiles`,Hh=(e,t)=>`${Vh(e,t)}/campaigns`,Zh=(e,t)=>`${Vh(e,t)}/documents`,Kh=Wh,Qh=(e,t,n)=>`${Wh({organizationId:e,userInfoId:t,eventId:n})}/edit`,Xh=(e,t,n)=>`${Wh({organizationId:e,userInfoId:t,eventId:n})}/information`,Jh=(e,t,n)=>`${Wh({organizationId:e,userInfoId:t,eventId:n})}/availability`,ep=(e,t,n)=>`${Wh({organizationId:e,userInfoId:t,eventId:n})}/positions`,tp=(e,t,n)=>`${Wh({organizationId:e,userInfoId:t,eventId:n})}/assignments`,np=(e,t,n)=>`${Wh({organizationId:e,userInfoId:t,eventId:n})}/desired-accreditations`,ip=(e,t,n)=>`${Wh({organizationId:e,userInfoId:t,eventId:n})}/accreditations`,ap=(e,t,n)=>`${Wh({organizationId:e,userInfoId:t,eventId:n})}/information/edit`,sp=(e,t,n,i)=>`${Wh({organizationId:e,userInfoId:t,eventId:n})}/information/edit/${i}`,op=(e,t,n)=>`${Wh({organizationId:e,userInfoId:t,eventId:n})}/availability/edit`,rp=(e,t,n,i)=>`${Wh({organizationId:e,userInfoId:t,eventId:n})}/availability/edit/${i}`,dp=(e,t,n)=>`${Wh({organizationId:e,userInfoId:t,eventId:n})}/positions/edit`,lp=(e,t,n,i)=>`${Wh({organizationId:e,userInfoId:t,eventId:n})}/positions/edit/${i}`,cp=(e,t,n)=>`${Wh({organizationId:e,userInfoId:t,eventId:n})}/desired-accreditations/edit`,up=(e,t,n,i)=>`${Wh({organizationId:e,userInfoId:t,eventId:n})}/desired-accreditations/edit/${i}`,mp=(e,t,n)=>`${Gh(e)}/event/${t}/form/${n}`,gp=(e,t)=>`${Gh(e)}/form/${t}`,hp=(e,t,n,i)=>t?`${Gh(e)}/event/${t}/form/${i}/delegation/${n}`:`${Gh(e)}/form/${i}/delegation/${n}`,pp=(e,t,n,i)=>`${Gh(e)}/event/${t}/form/${n}/team/${i}`,fp=()=>{const e=Pg.MEMBER({organizationId:":organizationId",userInfoId:":userInfoId",eventId:":eventId"}),t=Pg.MEMBER_FORM_EDIT({organizationId:":organizationId",userInfoId:":userInfoId",eventId:":eventId",formId:":formId"}),n=[Kh({organizationId:":organizationId",userInfoId:":userInfoId"}),Kh({organizationId:":organizationId",userInfoId:":userInfoId"}),Kh({organizationId:":organizationId",eventId:":eventId",userInfoId:":userInfoId"}),Qh(":organizationId",":userInfoId",null),Qh(":organizationId",":userInfoId",":eventId"),Xh(":organizationId",":userInfoId",null),Xh(":organizationId",":userInfoId",":eventId"),ap(":organizationId",":userInfoId",null),ap(":organizationId",":userInfoId",":eventId"),Jh(":organizationId",":userInfoId",":eventId"),op(":organizationId",":userInfoId",":eventId"),ep(":organizationId",":userInfoId",":eventId"),dp(":organizationId",":userInfoId",":eventId"),np(":organizationId",":userInfoId",":eventId"),cp(":organizationId",":userInfoId",":eventId")],a=[sp(":organizationId",":userInfoId",null,":formId"),sp(":organizationId",":userInfoId",":eventId",":formId"),rp(":organizationId",":userInfoId",":eventId",":formId"),lp(":organizationId",":userInfoId",":eventId",":formId"),up(":organizationId",":userInfoId",":eventId",":formId")];return(0,i.jsxs)(lo.dO,{children:[(0,i.jsx)(lo.rd,{exact:!0,from:"/v2/organization/:organizationId/event/:eventId/form/:formId/delegation/:delegationId",to:Yc.DELEGATION_FORM({organizationId:":organizationId",eventId:":eventId",delegationId:":delegationId",formId:":formId"})}),(0,i.jsx)(lo.rd,{exact:!0,from:"/v2/organization/:organizationId/form/:formId/delegation/:delegationId",to:Yc.DELEGATION_FORM({organizationId:":organizationId",delegationId:":delegationId",formId:":formId"})}),(0,i.jsx)(lo.rd,{exact:!0,from:"/v2/organization/:organizationId/event/:eventId/form/:formId",to:rc.EVENT_FORM({organizationId:":organizationId",eventId:":eventId",formId:":formId"})}),(0,i.jsx)(lo.rd,{exact:!0,from:"/v2/organization/:organizationId/form/:formId",to:Rc.ORGANIZATION_FORM({organizationId:":organizationId",formId:":formId"})}),(0,i.jsx)(lo.rd,{exact:!0,from:"/v2/organization/:organizationId/delegations/auth",to:Dr(Rc.ORGANIZATION_DELEGATIONS({organizationId:":organizationId"}))}),(0,i.jsx)(lo.rd,{exact:!0,from:Yh(":organizationId"),to:Or(Pg.USER_PROFILES({organizationId:":organizationId"}))}),n.map(t=>(0,i.jsx)(lo.rd,{exact:!0,from:t,to:e},t)),a.map(e=>(0,i.jsx)(lo.rd,{exact:!0,from:e,to:t},e)),(0,i.jsx)(lo.rd,{exact:!0,from:tp(":organizationId",":userInfoId",":eventId"),to:Pg.MEMBER_POSITIONS({organizationId:":organizationId",eventId:":eventId",userInfoId:":userInfoId"})}),(0,i.jsx)(lo.rd,{exact:!0,from:ip(":organizationId",":userInfoId",":eventId"),to:Pg.MEMBER_ACCREDITATIONS({organizationId:":organizationId",eventId:":eventId",userInfoId:":userInfoId"})}),(0,i.jsx)(lo.rd,{exact:!0,from:Hh(":organizationId",":userInfoId"),to:Pg.MEMBER_MESSAGES({organizationId:":organizationId",userInfoId:":userInfoId"})}),(0,i.jsx)(lo.rd,{exact:!0,from:Zh(":organizationId",":userInfoId"),to:Pg.MEMBER_DOCUMENTS({organizationId:":organizationId",userInfoId:":userInfoId"})}),(0,i.jsx)(lo.rd,{exact:!0,from:gp(":organizationId",":formId"),to:Rc.ORGANIZATION_FORM({organizationId:":organizationId",formId:":formId"})}),(0,i.jsx)(lo.rd,{exact:!0,from:mp(":organizationId",":eventId",":formId"),to:rc.EVENT_FORM({organizationId:":organizationId",eventId:":eventId",formId:":formId"})}),(0,i.jsx)(lo.rd,{exact:!0,from:pp(":organizationId",":eventId",":formId",":teamCode"),to:rc.EVENT_TEAM_FORM({organizationId:":organizationId",eventId:":eventId",formId:":formId",teamCode:":teamCode"})}),(0,i.jsx)(lo.rd,{exact:!0,from:hp(":organizationId",null,":delegationId",":formId"),to:Yc.DELEGATION_FORM({organizationId:":organizationId",delegationId:":delegationId",formId:":formId"})}),(0,i.jsx)(lo.rd,{exact:!0,from:hp(":organizationId",":eventId",":delegationId",":formId"),to:Yc.DELEGATION_FORM({organizationId:":organizationId",eventId:":eventId",delegationId:":delegationId",formId:":formId"})}),(0,i.jsx)(lo.rd,{from:qh(":organizationId"),to:Rc.ORGANIZATION({organizationId:":organizationId"})})]})},Ip=({acceptCustomColours:e,css:t,footer:n,header:a,heading:s,subtitle:o,children:r,...d})=>(0,i.jsxs)($,{as:M.Section,className:"card",css:{padding:"unset !important",bd:!0,inlineSize:"100%",backgroundColor:"$white","& .card":{backgroundColor:"$gray50","& .card__body":{padding:"$4 $5"}},...t},direction:"column",...d,children:[a||(s||o)&&(0,i.jsx)($,{align:"center",as:M.Header,css:{borderBlockEnd:"1px solid $gray200",padding:"$6 $7 $5 $7"},gap:"3",children:(0,i.jsxs)(Ni,{css:{flex:"1"},children:[s&&(0,i.jsx)(Zg,{css:e?{color:"$grayCustom900"}:void 0,children:s}),o&&(0,i.jsx)(N,{css:e?{color:"$grayCustom500"}:void 0,textStyle:"subtitle",children:o})]})}),(0,i.jsx)($,{className:"card__body",css:{gap:"$6",padding:"$6 $7","&:empty":{display:"none"}},direction:"column",children:r}),n&&(0,i.jsx)($,{as:M.Footer,css:{borderBlockStart:"1px solid $gray200",padding:"$6","&:empty":{display:"none"}},gap:"3",children:n})]}),_p=e=>(0,i.jsx)($,{css:{bd:!0,alignSelf:"stretch",alignItems:"flex-start",padding:"$4",background:"$gray50"},direction:"column",gap:"3",children:e.children});function xp(e){return{[`${e} p.h-small`]:{fontSize:"12px"},[`${e} h2`]:{fontSize:"20px",fontWeight:"$semiBold"},[`${e} h3`]:{fontSize:"18px",fontWeight:"$semiBold"},[`${e} h4`]:{fontSize:"16px",fontWeight:"$semiBold"},[`${e} a`]:{color:"$primary500"},[`${e} blockquote`]:{borderLeft:"3px solid $gray200",fontStyle:"italic",marginLeft:0,marginRight:0,px:"$4","& p":{margin:0,paddingBottom:"$2",paddingTop:"$2"}}}}const yp=e=>(0,i.jsx)(Ni,{className:"h-rich-text",css:{...xp("&"),"& > p:first-child":{marginTop:0},"& > p:last-child":{marginBottom:0},"& figure":{margin:"auto","& img":{width:"100%"}},...e.css},dangerouslySetInnerHTML:{__html:e.text},width:1,onClick:e=>{const t=e.target;if(t){const n=t.closest("a");n&&(e.preventDefault(),window.open(n.getAttribute("href"),"_blank"))}}});function Sp(){return xh(y.mobile)}const jp=e=>{const t=Sp();return(0,i.jsxs)($,{css:{bd:!0,alignSelf:"stretch",alignItems:"stretch",justifyContent:"space-between",padding:"$3 $4",background:"$white","@tablet":{alignItems:"center"}},direction:t?"column":"row",gap:"3",children:[(0,i.jsxs)($,{direction:"column",gap:"4",children:[(0,i.jsxs)($,{css:{flex:"1"},direction:t?"column":"row",gap:t?"1":"4",children:[(0,i.jsxs)($,{direction:"column",children:[(0,i.jsx)(Ni,{fontWeight:"medium",children:e.title}),e.subtitle&&(0,i.jsx)(yp,{css:{color:"$gray500"},text:e.subtitle.toString()})]}),!t&&(0,i.jsx)(Ni,{css:{blockSize:"fit-content",inlineSize:"fit-content"},children:e.badge})]}),e.children&&(0,i.jsx)($,{css:{flex:"1",overflow:"hidden"},gap:"8",children:e.children})]}),(0,i.jsx)($,{gap:"3",children:e.button})]})},bp=({bannerUrl:e,featureFlags:t,isLoading:n})=>{const[a,s]=(0,d.useState)(!0);return(0,d.useEffect)(()=>{(async()=>{h(e)&&(s(!0),await Lg(e),s(!1))})()},[e]),n||h(e)?a?(0,i.jsx)(Th,{css:{minHeight:"115px",width:"100%","@tablet":{borderRadius:"$2",minHeight:"230px"},"@desktop":{marginLeft:"auto",marginRight:"auto",minHeight:"360px",width:"$container"}}}):(0,i.jsx)(Ni,{css:{background:`url(${e}) no-repeat center`,backgroundSize:"cover",minHeight:"115px",width:"100%","@tablet":{borderRadius:"$2",margin:t?.isV4?"$6 0":void 0,minHeight:"230px"},"@desktop":{marginLeft:"auto",marginRight:"auto",minHeight:"360px",width:"$container"}}}):null},vp="h-dropdown-open";function Ap(e,t){e.dispatchEvent(new CustomEvent(vp,{bubbles:!0,detail:{uuid:t??""}}))}const Cp=d.createContext({}),Ep=e=>{const t=d.useRef(as()),[n,a]=d.useState(e.isOpen??!1),[s,o]=d.useState(null),[r,l]=d.useState(null),c=d.useCallback(n=>{e.disabled||(a(n),e.onStateChange&&e.onStateChange(n),!0===n&&s&&Ap(s,t.current))},[e.disabled,s,a,e.onStateChange]),u=d.useCallback(n=>{n.detail.uuid!==t.current&&!0!==e.doNotCloseOnOtherOpen&&c(!1)},[c]);return d.useEffect(()=>{e.isOpen!==n&&a(e.isOpen??!1)},[e.isOpen]),d.useEffect(()=>(document.addEventListener(vp,u),()=>{document.removeEventListener(vp,u)}),[u]),Sa(()=>{c(!1)}),function(){const e=d.useCallback(()=>{c(!1)},[]);d.useEffect(()=>(document.addEventListener("click",e,!1),()=>{document.removeEventListener("click",e,!1)}),[])}(),(0,i.jsx)(Cp.Provider,{value:{isOpen:n,referenceElement:s,popperElement:r,setIsOpen:c,setReferenceElement:o,setPopperElement:l},children:e.children})};function Tp(){return d.useContext(Cp)}const Rp=e=>(0,i.jsx)(Ni,{css:{padding:"$2 $3"},font:"gray500 textXs semiBold",children:e.children}),Mp=j("div",{display:"flex",flexDirection:"column","& + &":{borderTop:"1px solid $gray100"}}),Dp=e=>d.Children.toArray(e).some(e=>(0,d.isValidElement)(e)&&e.type===d.Fragment?Dp(e.props.children):Boolean(e)),Op=e=>Dp(e.children)?(0,i.jsxs)(Mp,{"aria-label":e.title,role:"group",children:[h(e.title)&&(0,i.jsx)(Rp,{children:e.title}),e.children]}):null,wp=j("div",{alignItems:"center",display:"flex",fontSize:"$textSm",fontWeight:"$regular",minHeight:"40px",px:"$4",py:"$2",userSelect:"none",width:"100%",ellipsis:"",variants:{color:{default:{cursor:"pointer",color:"$gray700","&:hover":{background:"$primary50",color:"$primary500"}},disabled:{color:"$gray400",cursor:"not-allowed"},heading:{color:"$gray500",fontSize:"$textXs",fontWeight:"$semiBold",cursor:"default"},red:{cursor:"pointer",color:"$error700","&:hover":{background:"$error50"}}}},defaultVariants:{color:"default"}}),Pp=({children:e,color:t,css:n,download:a,to:s,onClick:o,target:r,role:d})=>"disabled"!==t&&s?(0,i.jsx)(ra,{download:a,target:r,to:s,onClick:e=>o?.(e),children:(0,i.jsx)(wp,{color:t||"default",css:n,children:e})}):(0,i.jsx)(wp,{color:t||"default",css:n,role:d??"menuitem",tabIndex:s?void 0:"presentation"!==d?0:void 0,onClick:e=>o?.(e),children:e}),$p=({css:e,children:t,color:n,download:a,icon:s,isDisabled:o=!1,onClick:r,to:d,target:l})=>(0,i.jsx)(Pp,{color:n,css:{cursor:o?"not-allowed":"pointer",opacity:o?"0.6":"inherit",...e},download:a,target:l,to:d,onClick:e=>{o||(Ap(e.target),r?.(e))},children:(0,i.jsxs)($,{align:"center",gap:"3",height:1,width:1,children:[(0,i.jsx)($,{align:"center",height:1,justify:"start",width:16,children:(0,i.jsx)(la,{icon:s})}),(0,i.jsx)(Ni,{css:{flex:"1",ellipsis:""},children:t})]})});var kp=n(832);const Np=e=>{const{isOpen:t,referenceElement:n,popperElement:a,setPopperElement:s}=Tp(),{styles:o,attributes:r,update:l}=(0,kp.E)(n,a,{placement:e.placement,modifiers:[{name:"offset",options:{offset:[0,e.offset??8]}}]}),c="match"===e.width?`${n?.getBoundingClientRect().width??240}px`:"number"==typeof e.width?`${e.width}px`:"fit-content";d.useEffect(()=>{l?.()},[l,t,n]),d.useEffect(()=>{if(n){const e=new ResizeObserver(()=>{l?.()});return e.observe(n),()=>{e.disconnect()}}return Ih.A},[l,n]);const u=(0,i.jsx)($,{ref:s,"aria-hidden":!t,"aria-orientation":e["aria-orientation"],css:{background:"white",border:"1px solid $gray200",borderRadius:"$1",boxShadow:"$lg",display:t?"flex":"none",maxHeight:e.maxHeight?`${e.maxHeight}px`:void 0,overflowX:"hidden",overflowY:"auto",py:"$2",width:c,zIndex:"400",...e.css,...o.popper,"&:empty":{opacity:0}},direction:"column",id:e.id,role:"menu",onClick:e=>xa(e,!1),...r.popper,tabIndex:-1,children:e.children});return t?e.renderOnPortal?(0,ya.createPortal)(u,document.body):u:null},Lp=e=>{const{isOpen:t,setIsOpen:n,setReferenceElement:a}=Tp(),s=e.children,o=e=>{xa(e),n(!t),s.props.onClick?.(e)},r=d.cloneElement(d.Children.only(s),{ref(e){a(e)},onClick(e){e.preventDefault(),o(e)},onKeyPress(e){o(e)},tabIndex:0});return(0,i.jsx)(i.Fragment,{children:r})},zp=e=>{switch(e){case 16:return 7;case 24:return 10;case 32:return 14;case 40:return 16;case 48:return 18;case 56:return 20;case 64:return 24;case 88:return 30;case 96:return 36;case 110:return 40;case 160:return 48;case 310:return 120}},Fp=e=>{const[t,n]=(0,d.useState)(h(e.image)?e.image:void 0);if((0,d.useEffect)(()=>{h(e.image)&&n(e.image)},[e.image]),h(t))return(0,i.jsx)("div",{style:{border:e.border,borderRadius:e.size+"px",height:`${e.size}px`,overflow:"hidden",width:`${e.size}px`},children:(0,i.jsx)("img",{alt:"Avatar",src:t,style:{height:`${e.size}px`,width:`${e.size}px`,verticalAlign:"baseline"}})});{const t=function(e,t){if(h(e))return pu(e," ");if(h(t)){const[e]=t.split("@");return pu(e,".")}return""}(e.name,e.email);return(0,i.jsx)("div",{style:{borderRadius:e.size+"px",height:e.size+"px",overflow:"hidden",width:e.size+"px"},children:(0,i.jsx)("div",{className:"h-avatar-initials",style:{alignItems:"center",background:Iu(t),color:"white",display:"flex",fontSize:`${zp(e.size)}px`,height:"100%",justifyContent:"center",textTransform:"uppercase",width:"100%"},children:t})})}},Up=e=>{const{params:{organizationId:t,eventId:n,delegationId:a,userInfoId:s},translate:o}=$g(),{data:r,loader:l}=Ri('query SpaceHeader($organizationId: OrganizationId!) {\n organization(id: $organizationId) {\n id\n name\n showMembersSpaceCommunity\n }\n\n user {\n userInfo(organizationId: $organizationId) {\n ...MemberRegistrationUserInfo\n firstName: fieldValue(slug: "firstName")\n\n events {\n id\n name\n }\n }\n }\n}\n',{organizationId:t},[La.MemberRegistrationUserInfoFragment]),c=Sp(),u=wi(),[m,g]=d.useState(!1),p=d.useMemo(()=>r.user?.userInfo,[r.user?.userInfo]);return l||(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Ni,{css:{flex:"1"}}),(0,i.jsxs)(Ep,{"aria-label":o("menu_utilisateu_40033"),"aria-orientation":"vertical",isOpen:m,onStateChange:g,children:[(0,i.jsx)(Lp,{children:(0,i.jsxs)($,{align:"center","aria-expanded":m,"aria-label":o("ouvrir_le_menu_47803"),css:{fontWeight:"$medium",color:"$gray800",fontSize:"$textSm",cursor:"pointer"},gap:"3",justify:"end",width:300,onClick:()=>document.getElementById("user-menu")?.focus(),children:[(0,i.jsx)(Fp,{email:p?.email,image:p?.picture?.url,name:p?.name,size:32}),!c&&(0,i.jsx)(Ni,{css:{maxWidth:"calc(100% - 66px)"},children:(0,i.jsx)(Ni,{css:{ellipsis:!0},children:p?.name||p?.email})}),(0,i.jsx)("div",{children:m?(0,i.jsx)("i",{className:"far fa-angle-up"}):(0,i.jsx)("i",{className:"far fa-angle-down"})})]})}),(0,i.jsxs)(Np,{"aria-orientation":"vertical",id:"user-menu",maxHeight:500,placement:"bottom-end",width:300,children:[(0,i.jsx)(Op,{children:(0,i.jsx)(Pp,{children:(0,i.jsxs)($,{align:"center",as:M.Nav,css:{cursor:"default"},gap:"3",width:1,children:[(0,i.jsx)(Fp,{email:p?.email,image:p?.picture?.url,name:p?.name,size:32}),(0,i.jsxs)(Ni,{css:{width:"calc(100% - 44px)"},children:[(0,i.jsx)(Ni,{css:{ellipsis:!0},fontWeight:"semiBold",children:p?.name||p?.email}),h(p?.name)&&(0,i.jsx)(Ni,{color:"gray500",css:{ellipsis:!0},children:p?.email})]})]})})}),(0,i.jsx)(Op,{children:r.organization.showMembersSpaceCommunity&&!a&&(0,i.jsx)(Pp,{children:(0,i.jsx)(ra,{to:a?Yc.DELEGATION({organizationId:r.organization.id,delegationId:a}):Pg.MEMBER({organizationId:r.organization.id,userInfoId:s}),width:1,children:(0,i.jsx)(N,{css:{fontWeight:void 0===n&&r.organization.id===t?"bold":"inherit"},children:r.organization.name})})})}),(0,i.jsx)(Op,{children:!a&&r.user.userInfo.events.map(e=>(0,i.jsx)(Pp,{children:(0,i.jsx)(ra,{to:a?Yc.DELEGATION({organizationId:r.organization.id,eventId:e.id,delegationId:a}):Pg.MEMBER({organizationId:t,eventId:e.id,userInfoId:s}),width:1,children:(0,i.jsx)(N,{css:{fontWeight:void 0!==n&&n===e.id?"bold":"inherit"},children:e.name})})},e.id))}),e.extraItems,(0,i.jsx)(Op,{children:(0,i.jsx)(Pp,{color:"red",onClick:()=>{u.removeItem(fh.DELEGATIONS_SPACE_TAB),hs()},children:o("se_d_connecter_74151")})})]})]})]})},Bp=({additionalComponents:e,logoSrc:t,...n})=>{const{params:{organizationId:a,delegationId:s,userInfoId:o}}=$g();return(0,i.jsxs)($,{align:"center",as:"header",css:{backgroundColor:"white",px:"$6",position:"relative",borderBottom:"1px solid $gray200",justifyContent:"center"},height:65,width:1,children:[(0,i.jsxs)($,{align:"center",css:{cursor:t?"pointer":"default",margin:"inherit",padding:"$4","& svg":{height:"50%"}},gap:"7",height:1,children:[t&&(0,i.jsx)(ra,{height:1,to:s?Or(Rc.ORGANIZATION_DELEGATIONS({organizationId:a})):Pg.USER_PROFILE({organizationId:a,userInfoId:o}),children:t&&(0,i.jsx)("img",{height:"100%",src:t,width:"auto"})}),e]}),(0,i.jsx)(lo.qh,{path:[Yc.DELEGATION({delegationId:":delegationId",organizationId:":organizationId"}),Yc.DELEGATION({delegationId:":delegationId",eventId:":eventId",organizationId:":organizationId"}),Pg.MEMBER({organizationId:":organizationId",userInfoId:":userInfoId"}),Pg.MEMBER({organizationId:":organizationId",userInfoId:":userInfoId",eventId:":eventId"})],children:(0,i.jsx)(Up,{...n})})]})},Gp=({children:e,extraItems:t,featureFlags:n,isLoading:a,organization:s,spaceDesign:o})=>{const{params:{organizationId:r}}=$g();return(0,d.useEffect)(()=>{s&&zg(o.themeColors??{})},[s,o.themeColors]),(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Bp,{extraItems:t,logoSrc:o.logoSrc}),(0,i.jsxs)($,{align:"center",as:"main",css:{height:"fit-content",...n?.isV4?{padding:"$7 $4 $12 $4","@desktop":{padding:"$7 0 $12 0"}}:{maxWidth:"1170px",marginLeft:"auto",marginRight:"auto","@tablet":{marginTop:"$6",borderRadius:"$2"},"@desktop":{backgroundColor:"$white",border:"1px solid $gray200",marginBottom:"$8"}}},direction:"column",gap:n?.isV4?"4":void 0,height:1,width:1,children:["edit"!==window.location.pathname.split("/").at(-1)&&"edit"!==window.location.pathname.split("/").at(-2)&&(0,i.jsx)(bp,{bannerUrl:o.bannerSrc,featureFlags:n,isLoading:a}),(0,i.jsx)(Ni,{css:{width:"100%",...n?.isV4?{}:{height:"100%",position:"relative",padding:"$4","@tablet":{padding:"$5 $7"},"@desktop":{paddingBottom:"$7",marginLeft:"auto",marginRight:"auto"}},"@desktop":{width:"$container"}},children:e})]}),Ng(r)&&(0,i.jsx)(wh,{source:"delegation"})]})},Vp=()=>{const{params:{organizationId:e}}=$g(),{data:t,isLoading:n,loader:a}=Ri("query OrganizationEventsShowcase($organizationId: OrganizationId!) {\n organization: organizationPublic(id: $organizationId) {\n ...OrganizationEventsShowcase\n\n eventsShowcaseSettings {\n title\n intro\n events {\n event {\n id\n name\n }\n descriptionText\n buttonText\n form {\n id\n name\n }\n }\n }\n }\n}\n",{organizationId:e},[La.OrganizationEventsShowcaseFragment]);return a||(0,i.jsx)(Gp,{featureFlags:{isV4:!0},isLoading:n,organization:t.organization,spaceDesign:{themeColors:t.organization?.eventsShowcaseDesign?.colors,bannerSrc:t.organization?.eventsShowcaseDesign?.banner?.url,logoSrc:t.organization?.eventsShowcaseDesign?.logo?.url},children:(0,i.jsx)(Ip,{heading:t.organization.eventsShowcaseSettings.title,subtitle:t.organization.eventsShowcaseSettings.intro,children:(0,i.jsx)(_p,{children:t.organization.eventsShowcaseSettings.events.map(t=>(0,i.jsx)(jp,{button:t.form?(0,i.jsx)(pa,{to:Zc({organizationId:e,eventId:t.event.id,formId:t.form.id}),children:t.buttonText}):(0,i.jsx)(pa,{disabled:!0,children:t.buttonText}),subtitle:t.descriptionText,title:t.event.name},t.event.id))})})})};function Wp(e){return`${e.name}${h(e.acronym)?` (${e.acronym})`:""}`}function qp(e){return Yp(e.map(({accreditationSlot:e})=>e))}function Yp(e){return(0,ho.A)(Object.values((0,Ql.A)(e,e=>e.accreditation.id)).map(e=>{const t=e[0].accreditationCategory,n=e[0].accreditation,i=e.map(e=>e.date?.toMillis()??1);return{id:n.id,category:t.name,index:n.index,text:h(n.acronym)?n.acronym:n.name,minDate:(0,nu.A)(i),color:n.color,count:e.length,icon:n.icon}}),({category:e,index:t,text:n,minDate:i})=>[m(e),Hp(t),m(n),i])}function Hp(e){return"number"!=typeof e||isNaN(e)?"9999":e.toString(10).padStart(4,"0")}function Zp(e){return(0,ho.A)(e,e=>[m(e.accreditationCategoryName||""),Hp(e.index),m(e.name)])}function Kp(e){return(0,ho.A)(e.map(e=>({id:e.id,category:e.accreditationProfileCategory.name,text:h(e.acronym)?e.acronym:e.name,color:e.color,icon:e.icon})),({category:e,text:t})=>[m(e),m(t)])}var Qp=n(9116),Xp=n(5315);const Jp=[0,50,100,200,300,400,500,600,700,800,900,950,1e3],ef=Object.fromEntries(["gray","grayDark","primary","error","warning","success","blue","blueGray","blueLight","purple","purpleLight","purpleDark","pink","orange","redLight","redDark","green","greenDark","brown"].flatMap(e=>{const t={50:b.colors[`${e}50`].value,100:b.colors[`${e}100`].value,500:b.colors[`${e}500`].value,700:b.colors[`${e}700`].value};return[[e,t],[t[700],t]]}));function tf(e,t=700){const n=ef[e.toLowerCase()];if(n)return n;{const n=(0,Xp.KI)(e),i=((e,t=700)=>Jp.map(n=>{if(0===n)return{stop:n,tweak:100};if(1e3===n)return{stop:n,tweak:0};if(n===t)return{stop:n,tweak:e};{const i=Math.abs((n-t)/100),a=n[e,n.copy({l:t/100}).formatHex()]))}}const nf={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",goldenrod:"#daa520",gold:"#ffd700",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavenderblush:"#fff0f5",lavender:"#e6e6fa",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"};function af(e){return h(e)&&(function(e){return/^#(([0-9a-fA-F]{2}){3,4}|([0-9a-fA-F]){3,4})$/g.test(e)}(e)||function(e){return Object.keys(nf).includes(e)}(e))}function sf(e,{higherIsBetter:t}={higherIsBetter:!0}){return e<=.2?t?b.colors.error500.value:b.colors.success500.value:e<=.7?b.colors.warning500.value:e<=1?t?b.colors.success500.value:b.colors.error500.value:b.colors.blueGray500.value}const of=j($,{borderRadius:"$2",fontSize:"$textSm",height:"32px",width:"32px",variants:{size:{sm:{},md:{borderRadius:"$3",fontSize:"$textMd",height:"40px",width:"40px"},responsive:{"@tablet":{borderRadius:"$3",fontSize:"$textMd",height:"40px",width:"40px"}}}},defaultVariants:{size:"responsive"}}),rf=e=>{const t=(0,d.useMemo)(()=>tf(e.color??""),[e.color]),n=(0,d.useMemo)(()=>qn.includes(e.icon)?da(e.icon):e.icon,[e.icon]);return(0,i.jsx)(of,{align:"center",css:{background:t[100],color:t[700],...e.css},justify:"center",role:"presentation",size:e.size,children:(0,i.jsx)(la,{icon:n})})},df=e=>{const{translate:t}=$g(),n=(0,d.useMemo)(()=>Wp(e.accreditation),[e.accreditation]),[a,s]=(0,d.useState)(!0),o=e.displaySlots||"function"==typeof e.renderCheckbox;return(0,i.jsxs)($,{css:{background:"white",bd:!0,overflow:"hidden",userSelect:"none"},direction:"column",children:[(0,i.jsxs)($,{align:"center",css:{cursor:o?"pointer":"default",padding:"$3 $4"},gap:"2",onClick:()=>{s(!a),e.onClick?.()},children:[e.displaySlots&&(0,i.jsx)($,{align:"center",css:{fontSize:"$textXs"},height:20,justify:"center",width:20,children:(0,i.jsx)(la,{icon:a?"chevron-down":"chevron-right"})}),e.renderCheckbox?.(),(0,i.jsx)(rf,{color:e.accreditation.color,icon:e.accreditation.icon}),(0,i.jsxs)($,{css:{flex:"1"},direction:"column",gap:"1",children:[(0,i.jsxs)($,{align:"center",gap:"2",children:[(0,i.jsx)(Ni,{font:"gray800 textSm semiBold",children:n}),e.badge]}),e.displayNumberOfSlots&&(0,i.jsx)(Ni,{color:"gray500",children:t("creneau",e.numberOfSlots)})]}),e.renderActions?.()]}),(e.displayFormCustomFields||e.displaySlots&&a)&&(0,i.jsx)($,{css:{borderTop:"1px solid $gray200"},direction:"column",children:e.children})]})},lf=j("div",{background:"white",alignItems:"center",cursor:"pointer",display:"flex",justifyContent:"center",variants:{size:{sm:{borderRadius:"16px",height:"16px",width:"16px"},md:{borderRadius:"20px",height:"20px",width:"20px"}},state:{unchecked:{border:"1px solid $gray300","&:hover":{border:"1px solid $primary600"}},checked:{border:"1px solid $primary600"}},disabled:{true:{cursor:"not-allowed"}}},compoundVariants:[{size:"sm",state:"checked",css:{"& > div":{background:"$primary600",borderRadius:"6px",height:"6px",width:"6px"}}},{size:"md",state:"checked",css:{"& > div":{background:"$primary600",borderRadius:"8px",height:"8px",width:"8px"}}},{state:"unchecked",disabled:!0,css:{background:"$gray100",borderColor:"$gray200","&:hover":{borderColor:"$gray200"}}},{state:"checked",disabled:!0,css:{background:"$gray100",borderColor:"$gray200","& > div":{background:"$gray300 !important"}}}],defaultVariants:{size:"sm",state:"unchecked"}}),cf=({shouldPreventDefault:e=!0,...t})=>{ja("common-front/src/designSystem/components/radio.tsx","common-front/src/designSystem/components/radioCard.tsx for card-style radio buttons, or create a new component following that pattern for other styles of radio button");const n=n=>{e&&xa(n),!0!==t.disabled&&("unchecked"!==t.state&&t.state?t.onClick("unchecked"):t.onClick("checked"))};return(0,i.jsx)(lf,{"aria-describedby":t.descId,"aria-labelledby":t.labelId,disabled:t.disabled,id:t.inputId,role:"radio",size:t.size,state:t.state,tabIndex:t.tabIndex??0,onClick:n,onKeyDown:e=>{"Space"===e.key&&n(e)},children:"checked"===t.state&&(0,i.jsx)("div",{})})},uf=({shouldPreventDefault:e=!0,...t})=>{ja("common-front/src/designSystem/components/radio.tsx","common-front/src/designSystem/components/radioCard.tsx for card-style radio buttons, or create a new component following that pattern for other styles of radio button");const{inputId:n,descId:a,labelId:s}=dh(),o="string"==typeof t.subtext&&t.subtext.length>0,r=n=>{e&&xa(n),!0!==t.disabled&&("unchecked"!==t.state&&t.state?t.onClick("unchecked"):t.onClick("checked"))};return(0,i.jsxs)($,{css:{...t.css,cursor:t.disabled?"not-allowed":"pointer",userSelect:"none"},tabIndex:0,onClick:e=>{r(e)},onKeyDown:e=>{"Space"===e.key&&r(e)},children:[(0,i.jsx)($,{css:{alignItems:"center",height:"md"===t.size?"23px":"20px"},children:(0,i.jsx)(cf,{descId:a,disabled:t.disabled,inputId:n,labelId:s,shouldPreventDefault:!1,size:t.size,state:t.state,tabIndex:-1,onClick:Ih.A})}),(0,i.jsx)(Wg,{width:"2"}),(0,i.jsxs)($,{css:{flexDirection:"column",fontSize:"md"===t.size?"$3":"$2","& div":{cursor:"pointer !important"}},children:[(0,i.jsx)(uh,{htmlFor:n,id:s,children:(0,i.jsx)(Ni,{css:{color:t.disabled&&!o?"$gray300":"$gray800"},fontWeight:"medium",children:t.children})}),t.subtext&&(0,i.jsx)(Ni,{color:"gray500",id:a,children:t.subtext})]})]})},mf=e=>(0,i.jsx)($,{align:"center",css:{background:`$${e.color}50`,borderRadius:"48px",color:`$${e.color}700`,...e.css},height:48,justify:"center",width:48,children:(0,i.jsx)($,{align:"center",css:{background:`$${e.color}100`,borderRadius:"32px"},height:32,justify:"center",width:32,children:(0,i.jsx)(la,{icon:e.icon})})}),gf=j("dialog",{background:"white",border:"none",display:"flex",flexDirection:"column",variants:{mobile:{true:{height:"100%",paddingBottom:"$6",paddingTop:"$8",width:"100%"},false:{borderRadius:"12px",maxHeight:"calc(100% - 80px)",py:"$7"}},size:{sm:{},md:{},lg:{}}},compoundVariants:[{mobile:!1,size:"sm",css:{width:"$modalSm"}},{mobile:!1,size:"md",css:{width:"$modalMd"}},{mobile:!1,size:"lg",css:{width:"$modalLg"}}],defaultVariants:{mobile:!1}}),hf=j("div",{display:"flex",flexDirection:"column",overflow:"auto",width:"100%",variants:{mobile:{true:{flex:"1",px:"$4"},false:{px:"$8"}}}}),pf=j("div",{display:"flex",gap:"$3",variants:{mobile:{true:{boxShadow:"0px -1px 3px rgba(16, 24, 40, 0.1), 0px -1px 2px rgba(16, 24, 40, 0.06)",flexDirection:"column",padding:"$6 $4 0 $4","& .h-button-content":{textAlign:"center"}},false:{flexDirection:"row",justifyContent:"flex-end",px:"$8"}}}}),ff=({buttons:e,children:t,onClose:n,role:a,size:s})=>{const o=Sp();return Sa(n),ja("../../../../../components/modals/__deprecated/modal/modal.tsx","../../../../../components/modals/base/modal.tsx"),(0,ya.createPortal)((0,i.jsx)($,{align:"center",css:{background:"rgba(52, 64, 84, 0.7)",height:"100%",left:0,position:"absolute",top:0,width:"100%",zIndex:"300"},"data-testid":"modal-backdrop",justify:"center",role:"presentation",onMouseDown:n,children:(0,i.jsxs)(gf,{mobile:o,open:!0,role:a,size:s,onClick:e=>xa(e,!1),onMouseDown:e=>xa(e,!1),children:[(0,i.jsx)(hf,{mobile:o,children:t}),e&&(0,i.jsx)(pf,{mobile:o,children:e})]})}),document.body)},If=e=>{const t=Ei();return(0,i.jsxs)(ff,{buttons:(0,i.jsx)(i.Fragment,{children:(0,i.jsx)(pa,{onClick:e.onClose,children:t("fermer_62479")})}),size:"md",onClose:e.onClose,children:[(0,i.jsx)($,{justify:"center",width:1,children:(0,i.jsx)(mf,{color:"primary",icon:"circle-info"})}),(0,i.jsx)(Wg,{height:"4"}),(0,i.jsx)(Ni,{font:"gray900 textLg medium",textAlign:"center",width:1,children:t("informations_su_86120",e.name)}),(0,i.jsx)(Wg,{height:"7"}),h(e.description)&&(0,i.jsxs)($,{css:{overflowY:"auto"},direction:"column",gap:"2",children:[(0,i.jsx)(Ni,{font:"gray900 textMd semiBold",children:t("description_58935")}),(0,i.jsx)(yp,{text:e.description})]}),(0,i.jsx)(Wg,{height:"4"})]})},_f=j("div",{alignItems:"center",borderRadius:"$1",display:"flex",fontWeight:"$medium",gap:"$1",px:"$2",userSelect:"none",height:"fit-content","&:has(.h-badge-count)":{paddingRight:"$1"},"& > .h-badge-count":{borderRadius:"3px",height:"calc(100% - 8px)",marginLeft:"$1",px:"6px"},variants:{size:{sm:{height:"22px",fontSize:"12px","& > .h-badge-count":{fontSize:"10px"}},md:{height:"24px",fontSize:"12px","& > .h-badge-count":{fontSize:"10px"}},lg:{height:"28px",fontSize:"14px","& > .h-badge-count":{fontSize:"12px"}}},cursor:{default:{cursor:"default"},pointer:{cursor:"pointer"},text:{cursor:"text"}},ellipsis:{true:{maxWidth:"80%","& .h-badge-content":{ellipsis:!0,flex:"1"}}}},defaultVariants:{size:"sm",cursor:"default"}}),xf=d.forwardRef((e,t)=>{const n=d.useMemo(()=>{const t=e.color||"gray",n=tf(t);return"gray"===t?{background:"$gray100",color:"$gray700","& > .h-badge-left-icon":{color:"$gray500"},"& > .h-badge-count":{background:"$gray200"}}:"white"===t?{background:"white",border:"1px solid $gray300","& > .h-badge-count":{background:"$gray100"}}:"white-with-green-icon"===t?{background:"white",border:"1px solid $gray300","& > .h-badge-left-icon":{color:"$success500"}}:"orange"===t?{background:"$orange50",color:"$orange700","& > .h-badge-left-icon":{color:"$orange500"}}:{background:n[50],color:n[700],"& > .h-badge-left-icon":{color:n[500]},"& > .h-badge-count":{background:n[100]}}},[e.color]);return(0,i.jsxs)(_f,{ref:t,color:e.color,css:{maxWidth:"100%",...n,...e.css},cursor:e.cursor,ellipsis:e.ellipsis,size:e.size,onClick:e.onClick,children:[e.leftIcon&&(0,i.jsx)($,{className:"h-badge-left-icon",css:{cursor:e.onLeftIconClick?"pointer":"inherit"},onClick:t=>{e.onLeftIconClick?.(t)},children:(0,i.jsx)(la,{icon:e.leftIcon,iconStyle:e.leftIconStyle})}),e.children&&(0,i.jsx)(Ni,{className:"h-badge-content",css:{flex:"1",overflow:"hidden"},title:e.title,onClick:t=>{e.onContentClick?.(t)},children:(0,i.jsx)(Ni,{css:{ellipsis:!0},title:"string"==typeof e.children?e.children:"",children:e.children})}),e.rightIcon&&(0,i.jsx)($,{css:{cursor:e.onRightIconClick?"pointer":"inherit"},onClick:t=>{e.onRightIconClick?.(t)},children:(0,i.jsx)(la,{icon:e.rightIcon})}),("number"==typeof e.count||h(e.count))&&(0,i.jsx)($,{align:"center",className:"h-badge-count",children:e.count})]})});function yf(e,t,n){const i=n-t;return i<=0?e("quota_atteint_12838"):e("quota_1_2_23970",t,n,i)}xf.displayName="Badge";const Sf=e=>{const{translate:t}=$g();return(0,d.useMemo)(()=>{const n=e.getAssignedMaxRemaining(e.slotId);return n?n.remaining<=0?(0,i.jsx)(xf,{color:"error",leftIcon:"circle-xmark",size:"sm",children:yf(t,n.assignedResources,n.maxResources)}):(0,i.jsx)(xf,{color:"white",size:"sm",children:yf(t,n.assignedResources,n.maxResources)}):null},[e.slotId,e.getAssignedMaxRemaining,t])},jf=e=>{const{translate:t}=$g(),[n,a]=(0,d.useState)(!1),s=(0,d.useMemo)(()=>h(e.profile.description)&&e.showDescription,[e.profile,e.showDescription]),o=(0,d.useMemo)(()=>(e.delegationAccreditationsProfiles||[]).find(({accreditationProfileId:t})=>t===e.profile.id),[e.delegationAccreditationsProfiles,e.profile]),r=(0,d.useCallback)(()=>"number"==typeof o?.maxResources?{assignedResources:o.assignedResources,maxResources:o.maxResources,remaining:o.maxResources-o.assignedResources}:null,[o]),l=(0,d.useMemo)(()=>!!o&&o.isFull&&e.alreadyAssignedProfileId!==e.profile.id,[e.alreadyAssignedProfileId,o,e.profile]),c=(0,d.useMemo)(()=>(0,i.jsx)(Sf,{getAssignedMaxRemaining:r,slotId:e.profile.id}),[r,e.profile]);return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(df,{accreditation:e.profile,badge:c,displayNumberOfSlots:!1,displaySlots:!1,numberOfSlots:0,renderActions:()=>s&&(0,i.jsx)(pa,{color:"white",onClick:e=>{e.stopPropagation(),e.nativeEvent.stopImmediatePropagation(),a(!0)},children:t("voir_la_descrip_62304")}),renderCheckbox:()=>(0,i.jsx)(cf,{disabled:l,shouldPreventDefault:!1,state:e.profile.id===e.accreditationProfileId?"checked":"unchecked",onClick:Ih.A}),onClick:()=>{l||e.setAccreditationProfileId(e.profile.id===e.accreditationProfileId?null:e.profile.id)}}),n&&(0,i.jsx)(If,{description:e.profile.description,name:e.profile.name,onClose:()=>a(!1)})]})},bf=e=>{const{translate:t}=$g(),n=(0,d.useCallback)(t=>{e.change(`${e.prefix}accreditationProfileId`,t)},[e.prefix,e.change]);return(0,i.jsxs)($,{direction:"column",gap:"3",children:[(0,i.jsx)(Ni,{font:"gray800 textMd semiBold",children:t("quel_profil_vou_78626")}),(0,i.jsx)($,{css:{background:"$gray50",bd:"gray200 2",padding:"$6"},direction:"column",gap:"3",children:e.accreditationsProfiles.map(t=>(0,i.jsx)(jf,{accreditationProfileId:e.accreditationProfileId,alreadyAssignedProfileId:e.alreadyAssignedProfileId,delegationAccreditationsProfiles:e.delegationAccreditationsProfiles,profile:t,setAccreditationProfileId:n,showDescription:e.options.showAccreditationDescription},t.id))})]})},vf=e=>(0,i.jsx)($,{css:{background:"$gray50",overflowX:"auto",padding:"$6",...e.css},direction:"column",gap:"4",height:1,width:1,children:e.children}),Af=e=>(0,i.jsxs)($,{align:"center",css:e.css,direction:"column",height:1,justify:"center",width:1,children:[(0,i.jsx)(Ni,{css:{inlineSize:"70%","@tablet":{inlineSize:"50%",blockSize:"auto",maxInlineSize:"100px"}},children:(0,i.jsx)("img",{alt:"Blank image",className:"blank-image",height:"100%",src:e.imageSrc??bh.WeezeventBlankPerson,width:"100%"})}),(0,i.jsx)(Wg,{height:"7"}),(0,i.jsx)(Ni,{css:{color:"$gray800",fontSize:"$textMd",fontWeight:"$semiBold","@tablet":{color:"$gray900",fontSize:"$textMd",fontWeight:"$medium"}},textAlign:"center",children:e.title}),h(e.subtitle)&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Wg,{height:"2"}),(0,i.jsx)(Ni,{color:"gray500",fontSize:"textSm",textAlign:"center",children:e.subtitle})]}),e.button&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Wg,{height:"4"}),(0,i.jsx)($,{justify:"center",children:e.button})]})]}),Cf=j("div",{alignItems:"center",borderRadius:"12px",cursor:"pointer",display:"flex",position:"relative",padding:"$1","&:hover":{background:"$gray300"},"& > div":{background:"white",boxShadow:"$sm",position:"absolute",transition:"left 200ms ease-in"},"& > i":{color:"white"},"&:focus":{outline:"none"},"&:focus-visible":{border:"1px solid $success500",boxShadow:"0 0 0 4px rgba(16, 167, 77, 0.16)"},variants:{disabled:{true:{cursor:"not-allowed",background:"$gray100","&:hover":{background:"$gray100"},"&:focus-visible":{border:"1px solid $gray300",boxShadow:"0 0 0 4px rgba(206, 206, 206, 0.4)"},"& > i":{color:"$gray400"}}},size:{sm:{blockSize:"16px",inlineSize:"30px","& > div":{borderRadius:"12px",blockSize:"12px",inlineSize:"12px"},"& > i":{fontSize:"8px"}},md:{blockSize:"24px",inlineSize:"44px","& > div":{borderRadius:"20px",blockSize:"20px",inlineSize:"20px"},"& > i":{fontSize:"12px",paddingInlineStart:"2px"}}},state:{unchecked:{background:"$gray200","& > div":{left:"2px"}},checked:{background:"$success500","&:hover":{background:"$success600"}}}},compoundVariants:[{size:"sm",state:"checked",css:{"& > div":{left:"calc(100% - 2px - 12px)"}}},{size:"md",state:"checked",css:{"& > div":{left:"calc(100% - 2px - 20px)"}}},{disabled:!0,state:"checked",css:{background:"$gray100","&:hover":{background:"$gray100"}}}],defaultVariants:{size:"sm"}}),Ef=e=>(0,i.jsxs)(Cf,{"aria-checked":e.value,"aria-describedby":e.descId,"aria-label":e.label,"aria-labelledby":e.labelId,disabled:e.disabled,id:e.inputId,role:"checkbox",size:e.size,state:e.value?"checked":"unchecked",tabIndex:e.tabIndex??0,onClick:()=>{e.disabled||e.onChange(!e.value)},onKeyDown:t=>{e.disabled||"Space"!==t.code||(t.preventDefault(),e.onChange(!e.value))},children:[(0,i.jsx)(la,{height:"8",icon:"check",width:"8"}),(0,i.jsx)("div",{})]}),Tf=e=>{const{inputId:t,descId:n,labelId:a}=dh(),s=h(e.subtext);return(0,i.jsxs)($,{align:"center","aria-keyshortcuts":e["aria-keyshortcuts"],css:{cursor:e.disabled?"auto":"pointer",userSelect:"none",...e.css},onClick:()=>{e.disabled||e.onChange(!e.value)},onKeyDown:t=>{e.disabled||"Space"!==t.code||(t.preventDefault(),e.onChange(!e.value))},children:[(0,i.jsx)(Ef,{descId:n,disabled:e.disabled,inputId:t,labelId:a,size:e.size,value:e.value,onChange:Ih.A}),(0,i.jsx)(Wg,{width:"2"}),(0,i.jsxs)($,{css:{flex:"1",fontSize:"md"===e.size?"$3":"$2"},direction:"column",children:[(0,i.jsx)(uh,{htmlFor:t,id:a,children:(0,i.jsx)(Ni,{color:"gray800",fontWeight:"medium",children:e.children})}),s&&(0,i.jsx)(Ni,{color:"gray500",id:n,children:e.subtext})]})]})},Rf=e=>(0,i.jsx)(Gg.D0,{name:e.name,render:t=>(0,i.jsx)(Tf,{disabled:e.disabled,size:e.size,subtext:e.subtext,value:t.input.value,onChange:t.input.onChange,children:e.children})}),Mf=e=>(0,i.jsxs)($,{direction:"column",gap:"2",children:[(0,i.jsx)($,{align:"center",css:{color:"$gray800",fontSize:"$textMd",fontWeight:"$medium"},gap:"3",children:e.category}),(0,i.jsx)($,{direction:"column",gap:"3",children:e.children})]}),Df=e=>{const t=Ei();return(0,i.jsxs)($,{align:"center",gap:"1",children:[e.children,(0,i.jsxs)(Ni,{color:"gray500",fontSize:"textXs",fontWeight:"regular",children:["(",t("facultatif_76747"),")"]})]})},Of=e=>{if(0===e.names.length)return e.render(e.fields);{const[t,...n]=e.names;return(0,i.jsx)(Gg.D0,{name:t,render:a=>(0,i.jsx)(Of,{fields:{...e.fields||{},[t]:a},names:n,render:e.render,subscription:e.subscription}),subscription:e.subscription})}},wf=({formattedAddressProps:e,getAddress:t,hint:n,latitudeProps:a,longitudeProps:s,onPlaceChange:o,state:r,...l})=>{const c=Ei(),u=(0,d.useRef)(null),m=(0,d.useRef)({getAddress:t,onPlaceChange:o});m.current={getAddress:t,onPlaceChange:o};const g=oh(e.meta);return(0,d.useEffect)(()=>{const t=new google.maps.places.Autocomplete(u.current,{types:["geocode"]});t.addListener("place_changed",()=>{const n=t.getPlace();if(n.geometry?.location){const t=n.geometry.location.lat(),i=n.geometry.location.lng();e.input.onChange(m.current.getAddress?.(n)??n.formatted_address),a?.input.onChange(t),s?.input.onChange(i),m.current.onPlaceChange?.(n)}})},[]),(0,i.jsx)(hh,{ref:u,hint:g?e.meta.error||e.meta.submitError:n,placeholder:c("indiquez_un_lie_85634"),state:g?"error":r,value:e.input.value,onBlur:e.input.onBlur,onChange:e.input.onChange,onFocus:e.input.onFocus,...l})},Pf=({addressName:e,latitudeName:t,longitudeName:n,...a})=>{const s=[e];return t&&s.push(t),n&&s.push(n),(0,i.jsx)(Of,{names:s,render:s=>(0,i.jsx)(wf,{formattedAddressProps:s[e],latitudeProps:t?s[t]:void 0,longitudeProps:n?s[n]:void 0,...a})})},$f=(0,d.createContext)({});function kf(){return(0,d.useContext)($f)}const Nf=j("div",{alignItems:"center",border:"1px solid $gray300",cursor:"pointer",display:"flex",fontSize:"10px",fontWeight:"$semiBold",justifyContent:"center","& > i":{fontSize:"10px",fontWeight:"$semiBold"},variants:{size:{sm:{borderRadius:"4px",height:"16px",width:"16px"},md:{borderRadius:"6px",height:"20px",width:"20px"}},state:{unchecked:{background:"white","&:hover":{border:"1px solid $primaryCustom600"}},checked:{background:"$primaryCustom600",border:"none",color:"white"},indeterminate:{background:"$primaryCustom600",border:"none",color:"white",padding:"$1","& > div":{borderTop:"2px solid white",width:"100%"}}},disabled:{true:{}}},compoundVariants:[{state:"unchecked",disabled:!0,css:{background:"$gray100",borderColor:"$gray200","&:hover":{borderColor:"$gray200"}}},{state:"checked",disabled:!0,css:{background:"$gray100",borderColor:"$gray200",color:"$gray300"}},{state:"indeterminate",disabled:!0,css:{background:"$gray100",borderColor:"$gray200",color:"$gray300","& > div":{borderTopColor:"$gray300"}}}],defaultVariants:{size:"sm",state:"unchecked"}}),Lf=({shouldPreventDefault:e=!0,...t})=>{ja("common-front/src/designSystem/components/checkbox.tsx","a new component following the pattern of common-front/src/designSystem/components/radioCard.tsx");const n=n=>{e&&xa(n),!0!==t.disabled&&("unchecked"!==t.state&&t.state?t.onClick("unchecked",n):t.onClick("checked",n))};return(0,i.jsxs)(Nf,{"aria-describedby":t.descId,"aria-labelledby":t.labelId,disabled:t.disabled,id:t.inputId,role:"checkbox",size:t.size,state:t.state,tabIndex:t.tabIndex??0,onClick:e=>n(e),onKeyDown:e=>{"Space"===e.code&&n(e)},onMouseDown:e=>{e.shiftKey&&xa(e)},children:["checked"===t.state&&(0,i.jsx)("i",{className:"far fa-check"}),"indeterminate"===t.state&&(0,i.jsx)("div",{})]})},zf=({shouldPreventDefault:e=!0,...t})=>{ja("common-front/src/designSystem/components/checkbox.tsx","a new component following the pattern of common-front/src/designSystem/components/radioCard.tsx");const{descId:n,inputId:a,labelId:s}=dh(),o=void 0!==t.subtext&&null!==t.subtext,r=n=>{e&&n.preventDefault(),!0!==t.disabled&&("unchecked"!==t.state&&t.state?t.onClick("unchecked",n):t.onClick("checked",n))};return(0,i.jsxs)($,{css:{cursor:t.disabled?"not-allowed":"pointer",userSelect:"none",...t.css},tabIndex:0,onClick:r,onKeyDown:e=>{"Space"===e.code&&r(e)},children:[(0,i.jsx)($,{css:{alignItems:"center",height:"md"===t.size?"23px":"20px"},children:(0,i.jsx)(Lf,{descId:n,disabled:t.disabled,inputId:a,labelId:s,shouldPreventDefault:!1,size:t.size,state:t.state,tabIndex:-1,onClick:Ih.A})}),(0,i.jsx)(Wg,{width:"2"}),(0,i.jsxs)($,{css:{flexDirection:"column",fontSize:"md"===t.size?"$3":"$2"},children:[(0,i.jsx)(uh,{htmlFor:a,id:s,children:(0,i.jsx)(Ni,{css:{color:t.disabled&&!o?"$gray300":"$gray800"},fontWeight:"medium",children:t.children})}),o&&(0,i.jsx)(Ni,{color:"gray500",id:n,children:t.subtext})]})]})},Ff=({name:e,children:t,...n})=>{const{isDisabled:a}=kf();return(0,i.jsx)(Gg.D0,{name:e,render:e=>{const s=!0===e.input.checked?"checked":"unchecked";return(0,i.jsx)(zf,{...n,disabled:a??n.disabled,state:s,onClick:()=>{e.input.onChange(!e.input.checked)},children:t})},type:"checkbox"})},Uf=({value:e,css:t,label:n,description:a,hint:s,icon:o,min:r,onChange:d,max:l,state:c,rightIcon:u,onRightIconClick:m,zone:g,...p})=>{const f=e?_d(e):null,I=f?.isValid?f.toFormat(Ua):"",{inputId:_,descId:x,errorId:y}=dh();return(0,i.jsxs)($,{css:t,direction:"column",width:1,children:[(0,i.jsx)(uh,{htmlFor:_,children:n}),(0,i.jsx)(lh,{id:x,children:a}),(n||a)&&(0,i.jsx)(Wg,{height:"1"}),(0,i.jsx)(gh,{cursor:"default",icon:o,rightIcon:u,state:c,onRightIconClick:m,children:(0,i.jsx)(Ni,{css:{flex:"1",height:"100%","& input":{background:"transparent",border:"none",color:"$gray500",fontSize:"$textSm",height:"100%",lineHeight:"20px",outline:"none",width:"100%"}},children:(0,i.jsx)("input",{"aria-describedby":a?x:void 0,"aria-errormessage":"error"===c?y:void 0,"aria-invalid":"error"===c,disabled:"disabled"===c,id:_,max:l?.toFormat(Ua),min:r?.toFormat(Ua),type:"date",value:I,onChange:e=>{h(e.target.value)?d($a.c9.fromFormat(e.target.value,Ua,{zone:g||"UTC"})):d($a.c9.invalid("Invalid"))},...p})})}),(0,i.jsx)(ch,{id:y,state:c,children:s})]})},Bf=(0,d.memo)(function({name:e,hint:t,state:n,...a}){return(0,i.jsx)(Gg.D0,{name:e,render:({input:s,meta:o})=>{const r=o.data?.forceDisplayError&&o.invalid||o.touched&&o.invalid;return(0,i.jsx)(Uf,{hint:r?o.error:t,name:e,state:r?"error":n,value:s.value,onBlur:s.onBlur,onChange:s.onChange,onFocus:s.onFocus,...a})}})}),Gf=({value:e,css:t,label:n,description:a,hint:s,icon:o,min:r,onChange:d,max:l,rightIcon:c,onRightIconClick:u,state:m,zone:g,...p})=>{const f=e?h(e)?$a.c9.fromISO(e,{zone:"utc"}):e:null,I=f?.isValid?f.toFormat(Ba):"",{inputId:_,descId:x,errorId:y}=dh();return(0,i.jsxs)($,{css:t,direction:"column",width:1,children:[(0,i.jsx)(uh,{htmlFor:_,children:n}),(0,i.jsx)(lh,{id:x,children:a}),(n||a)&&(0,i.jsx)(Wg,{height:"1"}),(0,i.jsx)(gh,{cursor:"default",icon:o,rightIcon:c,state:m,onRightIconClick:u,children:(0,i.jsx)(Ni,{css:{flex:"1",height:"100%","& input":{background:"transparent",border:"none",color:"$gray800",height:"100%",outline:"none",width:"100%"}},children:(0,i.jsx)("input",{"aria-describedby":a?x:void 0,"aria-errormessage":"error"===m?y:void 0,"aria-invalid":"error"===m,disabled:"disabled"===m,id:_,max:l?.toFormat(Ba),min:r?.toFormat(Ba),type:"datetime-local",value:I,onChange:e=>{h(e.target.value)?d($a.c9.fromFormat(e.target.value,Ba,{zone:g||"UTC"})):d($a.c9.invalid("Invalid"))},...p})})}),(0,i.jsx)(ch,{id:y,state:m,children:s})]})},Vf=({name:e,hint:t,state:n,...a})=>(0,i.jsx)(Gg.D0,{name:e,render:s=>{const o=s.meta.data?.forceDisplayError&&s.meta.invalid||s.meta.touched&&s.meta.invalid;return(0,i.jsx)(Gf,{hint:o?s.meta.error:t,name:e,state:o?"error":n,value:s.input.value,onBlur:s.input.onBlur,onChange:s.input.onChange,onFocus:s.input.onFocus,...a})}}),Wf=({value:e,css:t,label:n,description:a,hint:s,icon:o,onChange:r,state:d,...l})=>{const c=h(e)&&e.length>5?e.substring(0,5):e,{inputId:u,descId:m,errorId:g}=dh();return(0,i.jsxs)($,{css:t,direction:"column",width:1,children:[(0,i.jsx)(uh,{htmlFor:u,children:n}),(0,i.jsx)(lh,{id:m,children:a}),(n||a)&&(0,i.jsx)(Wg,{height:"1"}),(0,i.jsx)(gh,{cursor:"default",icon:o,state:d,children:(0,i.jsx)(Ni,{css:{flex:"1",height:"100%","& input":{background:"transparent",border:"none",color:"$gray800",height:"100%",outline:"none",width:"100%"}},children:(0,i.jsx)("input",{"aria-describedby":a?m:void 0,"aria-errormessage":"error"===d?g:void 0,"aria-invalid":"error"===d,disabled:"disabled"===d,id:u,type:"time",value:c,onChange:e=>{r(e.target.value)},...l})})}),(0,i.jsx)(ch,{id:g,state:d,children:s})]})},qf=({name:e,hint:t,state:n,...a})=>(0,i.jsx)(Gg.D0,{name:e,render:s=>{const o=oh(s.meta);return(0,i.jsx)(Wf,{hint:o?s.meta.error:t,name:e,state:o?"error":n,value:s.input.value,onBlur:s.input.onBlur,onChange:s.input.onChange,onFocus:s.input.onFocus,...a})}});var Yf;function Hf(e){return z(e).flatMap(e=>{switch(e){case Yf.Archives:return["zip"];case Yf.Csv:return["csv"];case Yf.Gpx:return["gpx"];case Yf.Images:return["jpg","png","jpeg","gif"];case Yf.Kml:return["kml"];case Yf.Pdf:return["pdf"];case Yf.SmallImages:return["jpg","png","jpeg"];case Yf.Videos:return["mp4","mov","webm","mkv"];default:return ir()}})}function Zf(e){return Math.min(...z(e).flatMap(e=>{switch(e){case Yf.Archives:return Do;case Yf.Csv:return Oo;case Yf.Images:case Yf.Pdf:return 2e7;case Yf.Kml:case Yf.Gpx:return 1/0;case Yf.SmallImages:return 2e6;case Yf.Videos:return 5e7;default:return ir()}}))}function Kf(e){return z(e).flatMap(e=>e===Yf.Images?"image/*":Hf(e).map(e=>`.${e}`)).join(",")}async function Qf(e,t,n,i){const s=await gs(),{name:o,extension:r}=wo(t.name),d=`organization/${e}/${as()}/${g(o)}.${r}`,{awsS3PostCredentials:{endpointUrl:l,policy:c,amzCredential:u,amzSignature:m,amzDate:h,amzSecurityToken:p}}=await function(e,t){return ys("query AwsS3PostCredentials($organizationId: OrganizationId!, $acl: String!, $key: String!) {\n awsS3PostCredentials(organizationId: $organizationId, acl: $acl, key: $key) {\n endpointUrl\n policy\n amzSignature\n amzCredential\n amzDate\n amzSecurityToken\n }\n}\n",{variables:e,token:t||void 0,fragments:[]})}({organizationId:e,acl:n,key:d},s),f=new FormData;return f.append("key",d),f.append("acl",n),f.append("success_action_status","201"),f.append("X-Amz-Credential",u),f.append("X-Amz-Algorithm","AWS4-HMAC-SHA256"),f.append("X-Amz-Date",h),p&&f.append("X-Amz-Security-Token",p),f.append("Policy",c),f.append("X-Amz-Signature",m),f.append("Content-Type",$o(r)),f.append("file",t),new Promise((e,s)=>{const o=new XMLHttpRequest;o.upload.onprogress=e=>{if(e.lengthComputable){const t=Math.round(e.loaded/e.total*100);i?.(t)}},o.onerror=()=>{s(new Error("Could not upload file to S3"))},o.onreadystatechange=()=>{if(4===o.readyState){const i=o.responseXML?.querySelector("Error Code");null!==i?(a("Could not upload file to S3",{code:i?.textContent??"",message:o.responseXML?.querySelector("Error Message")?.textContent??""}),s(new Error("Could not upload file to S3"))):e({acl:n,key:d,name:t.name,size:t.size})}},o.open("POST",l,!0),o.send(f)})}!function(e){e[e.Archives=0]="Archives",e[e.Csv=1]="Csv",e[e.Gpx=2]="Gpx",e[e.Images=3]="Images",e[e.Kml=4]="Kml",e[e.Pdf=5]="Pdf",e[e.SmallImages=6]="SmallImages",e[e.Videos=7]="Videos"}(Yf||(Yf={}));const Xf=e=>{switch(e.split(".").at(-1)){case"csv":return bh.FileCSV;case"jpeg":case"jpg":return bh.FileJPG;case"pdf":return bh.FilePDF;case"png":return bh.FilePNG;case"zip":return bh.FileZIP;default:return bh.FileBlank}};function Jf(e,t){return`https://${t}.s3-eu-west-1.amazonaws.com/${e.key}`}var eI=n(4741);function tI(e,t,n){return 25===e?{transform:`translateX(${t}px) rotate(0.25turn)`,transformOrigin:"top left"}:50===e?{transform:"rotate(0.5turn)"}:75===e?{transform:`translateY(${n}px) rotate(0.75turn)`,transformOrigin:"top left"}:{}}const nI=j("div",{alignItems:"center",background:"#434c5e",borderRadius:"$1",color:"white",cursor:"pointer",display:"flex",variants:{controls:{true:{height:"calc(100% - 10px)",paddingLeft:"10px",paddingRight:"10px",width:"200px"}},rotate:{true:{height:"40px",justifyContent:"center",marginLeft:"10px",width:"40px"}}}}),iI=j("input",{"-webkit-appearance":"none",background:"transparent",marginLeft:"10px",marginRight:"10px",width:"100%","&::-webkit-slider-thumb":{"-webkit-appearance":"none",background:"white",borderRadius:"16px",cursor:"pointer",height:"16px",marginTop:"-7px",width:"16px"},"&::-webkit-slider-runnable-track":{background:"white",borderRadius:"2px",cursor:"pointer",height:"2px",width:"100%"},"&:focus::-webkit-slider-runnable-track":{background:"white"},"&::-moz-range-thumb":{background:"white",borderRadius:"16px",cursor:"pointer",height:"16px",width:"16px"},"&::-moz-range-track":{background:"white",borderRadius:"2px",cursor:"pointer",height:"2px",width:"100%"},"&::-ms-thumb":{background:"white",borderRadius:"16px",cursor:"pointer",height:"16px",width:"16px"},"&:focus":{ouline:"none"}});var aI;!function(e){e[e.EmptyFile=0]="EmptyFile",e[e.Pdf=1]="Pdf",e[e.Image=2]="Image"}(aI||(aI={}));class sI extends d.Component{contentRef;renderPagesDebounced;constructor(e){super(e);let t=aI.Image;"string"!=typeof this.props.fileUrl||0===this.props.fileUrl.trim().length?t=aI.EmptyFile:"pdf"===wo(this.props.fileUrl).extension&&(t=aI.Pdf),this.state={image:null,isLoading:!0,fileType:t,pdf:null,rotate:0,zoomLevel:100},this.renderPagesDebounced=(0,eI.A)(()=>{this.renderPdfPages()},200),this.contentRef=d.createRef()}componentDidMount(){var e;this.state.fileType===aI.Pdf?(e=this.props.fileUrl,(void 0===window.pdfjsLib?ka("https://cdn.jsdelivr.net/npm/pdfjs-dist@2.0.943/build/pdf.min.js"):Promise.resolve(!0)).then(()=>window.pdfjsLib.getDocument(e))).then(e=>{this.setState({pdf:e}),this.renderPdfPages()}):this.state.fileType===aI.Image&&this.loaderImage()}renderPdfPages(){this.state.fileType===aI.Pdf&&async function(e,t,n,i){Array.from(t.childNodes).forEach(e=>{t.removeChild(e)});for(let a=1;a<=e.numPages;a++){const s=await e.getPage(a),o=s.getViewport(n),r=document.createElement("div"),d=document.createElement("canvas"),l=d.getContext("2d"),c=tI(i,o.height,o.width);25===i||75===i?(r.style.height=`${o.width}px`,r.style.width=`${o.height}px`):(r.style.height=`${o.height}px`,r.style.width=`${o.width}px`),d.height=o.height,d.width=o.width,d.style.transform=c.transform||"",d.style.transformOrigin=c.transformOrigin||"",r.appendChild(d),t.appendChild(r),s.render({canvasContext:l,viewport:o})}}(this.state.pdf,this.contentRef.current,this.state.zoomLevel/100,this.state.rotate).then(()=>{this.setState({isLoading:!1})})}loaderImage(){if(this.state.fileType===aI.Image){const e=new Image;e.onload=()=>{const t=this.contentRef.current.getBoundingClientRect(),n=t.height/e.height,i=t.width/e.width,a=Math.min(n,i);let s=100;a<1&&(s=100*(a-.1*a)),this.setState({image:e,isLoading:!1,zoomLevel:s})},e.onerror=()=>{this.setState({isLoading:!1,fileType:aI.EmptyFile})},e.src=this.props.fileUrl}}imageHeight(){return this.state.image.height*(this.state.zoomLevel/100)}imageWidth(){return this.state.image.width*(this.state.zoomLevel/100)}zoomMinus(){this.setState({zoomLevel:Math.max(1,10*Math.floor((this.state.zoomLevel-10)/10))}),this.renderPagesDebounced()}zoomPlus(){this.setState({zoomLevel:10*Math.ceil((this.state.zoomLevel+10)/10)}),this.renderPagesDebounced()}rangeChange(e){this.setState({zoomLevel:parseInt(e.target.value,10)}),this.renderPagesDebounced()}rotate(){this.setState(e=>{const t=e.rotate+25;return{rotate:t>=100?0:t}}),this.renderPagesDebounced()}render(){return(0,i.jsx)(Ai,{children:({container:e})=>{const t=e.get(bi);return(0,i.jsxs)($,{css:{position:"relative"},direction:"column",height:1,width:1,children:[(0,i.jsx)(Ni,{ref:this.contentRef,css:{height:"calc(100% - 50px)",overflow:"auto",padding:"10px",width:"100%",zIndex:"1","& > div":{margin:"auto",marginBottom:"20px"},"& > div:last-child":{marginBottom:"0"}}}),this.state.fileType===aI.Image&&!1===this.state.isLoading&&(0,i.jsx)(Ni,{css:{background:"white",height:"calc(100% - 50px)",left:"0",overflow:"auto",padding:"10px",position:"absolute",top:"0",width:"100%",zIndex:"5","& > div:last-child":{marginBottom:"0"}},children:(0,i.jsx)("img",{src:this.state.image.src,style:{height:`${this.imageHeight()}px`,width:`${this.imageWidth()}px`,...tI(this.state.rotate,this.imageHeight(),this.imageWidth())}})}),!0===this.state.isLoading&&(0,i.jsx)(Ni,{css:{background:"white",height:"calc(100% - 50px)",left:"0",position:"absolute",top:"0",width:"100%",zIndex:"10"},children:(0,i.jsx)(ua,{})}),this.state.fileType===aI.EmptyFile&&(0,i.jsx)($,{align:"center",css:{background:"white",fontSize:"22px",height:"calc(100% - 50px)",left:"0",position:"absolute",top:"0",width:"100%",zIndex:"20"},justify:"center",children:t.translate("aucun_fichier_77247")}),(0,i.jsxs)($,{align:"center",css:{height:"50px",width:"100%"},justify:"center",children:[(0,i.jsxs)(nI,{controls:!0,children:[(0,i.jsx)("i",{className:"fas fa-minus",onClick:this.zoomMinus.bind(this)}),(0,i.jsx)(iI,{max:"200",min:"1",step:"1",type:"range",value:this.state.zoomLevel,onChange:this.rangeChange.bind(this)}),(0,i.jsx)("i",{className:"fas fa-plus",onClick:this.zoomPlus.bind(this)})]}),(0,i.jsx)(nI,{rotate:!0,onClick:this.rotate.bind(this),children:(0,i.jsx)("i",{className:"far fa-undo"})})]})]})}})}}const oI=j("div",{display:"flex",flexDirection:"column",height:"100%",width:"100%",zIndex:"10","& .fsp-header":{px:"$7"},"& .fsp-category":{fontSize:"11px",fontWeight:"$semiBold",textTransform:"uppercase"},"& .fsp-title":{fontSize:"$textMd",fontWeight:"$semiBold"},variants:{color:{white:{"& .fsp-header":{background:"white",borderBottom:"1px solid $gray200"},"& .fsp-category":{color:"$gray600"},"& .fsp-title":{color:"$gray900"}},dark:{"& .fsp-header":{background:"$gray900"},"& .fsp-category":{color:"white"},"& .fsp-title":{color:"white"}}}},defaultVariants:{color:"white"}}),rI=e=>{const t=Oi();return(0,i.jsxs)(oI,{color:e.color,children:[(0,i.jsxs)($,{align:"center",className:"fsp-header",gap:"4",height:65,width:1,children:[(0,i.jsx)(Ni,{css:{flexShrink:3},width:300}),(0,i.jsxs)($,{align:"center",css:{flex:"1"},direction:"column",children:[e.category&&(0,i.jsx)(Ni,{className:"fsp-category",children:e.category}),(0,i.jsx)(Ni,{className:"fsp-title",css:{maxWidth:"100%"},ellipsis:!0,children:e.heading})]}),(0,i.jsxs)($,{gap:"4",justify:"end",width:300,children:[e.button,(0,i.jsx)(pa,{color:"dark"===e.color?"gray":"white",css:{flexShrink:0},leftIcon:"xmark",onClick:()=>{"function"==typeof e.onClose?e.onClose():t.goBack(e.fallbackClosePath||eg.HOME)}})]})]}),(0,i.jsx)(Ni,{css:{height:"calc(100% - 65px)"},width:1,children:e.children})]})},dI=({acl:e,document:t,onDelete:n,...a})=>{const{translate:s}=$g(),[o,r]=(0,d.useState)(!1),l=Sp(),c="public-read"===e||h(t.url),u=h(t.url)?t.url:Jf(t,sa.HEAVENT_AWS_UPLOADS_BUCKET),{designSystem:m}=Qs();return(0,i.jsxs)($,{align:"center",css:{background:"white",border:"1px solid $gray200",borderRadius:"$1",boxShadow:"$xs",fontSize:"$textSm",overflow:"hidden",minHeight:"72px","@tablet":{border:"1px solid $gray300",borderRadius:"$2",fontSize:"$textMd"},...(()=>{switch(m){case Hs:return{padding:"$3","@tablet":{padding:"$3"}};case Zs:return{padding:"$4 $6"};default:ir()}})()},justify:"between",width:1,...l&&{onClick:()=>{!function(e,t){const n=document.createElement("a");n.href=e,n.target="_blank",n.download=t,n.click()}(u,t.name)}},...a,children:[(0,i.jsxs)($,{align:"center",css:{maxInlineSize:"80%"},gap:"4",children:[(0,i.jsx)("img",{src:Xf(t.name),style:{color:"black"}}),(0,i.jsx)(N,{css:{ellipsis:!0,wordBreak:"break-all",...(()=>{if(m===Zs)return{fontWeight:"$medium"}})()},children:t.name})]}),(0,i.jsx)(Ni,{css:{flex:"1"}}),(0,i.jsxs)($,{gap:"2",children:[c&&(0,i.jsxs)(i.Fragment,{children:[!1===l&&(0,i.jsx)(pa,{"aria-label":s("view_48132"),color:"white",leftIcon:"eye",onClick:()=>{r(!0)}}),(0,i.jsx)(pa,{"aria-label":s("download_47607"),color:"white",download:t.name,leftIcon:"download",target:"_blank",to:u})]}),n&&(0,i.jsx)(pa,{"aria-label":s("delete_file_40417"),color:"white",leftIcon:"trash-can",onClick:n})]}),o&&(0,ya.createPortal)((0,i.jsx)($,{css:{background:"white",left:"0",position:"absolute",top:"0",zIndex:"250"},height:1,width:1,children:(0,i.jsx)(rI,{heading:t.name,onClose:()=>r(!1),children:(0,i.jsx)(sI,{fileUrl:u})})}),document.body)]})},lI=j("progress",{}),cI=e=>(0,i.jsx)(lI,{...e,children:e.children}),uI=({name:e,progress:t,...n})=>{const a=Math.min(100,Math.max(0,t)),{inputId:s}=dh();return(0,i.jsxs)($,{css:{border:"1px solid $gray300",borderRadius:"$2",padding:"$4"},direction:"column",width:1,gap:"2",...n,children:[(0,i.jsx)(uh,{htmlFor:s,children:e}),(0,i.jsxs)(cI,{id:s,max:"100",value:a,children:[a,"%"]})]})};var mI=n(3112),gI=(n(8181),n(9618));const hI=({allowCrop:e,onChange:t,hint:n,label:a,...s})=>{const o=Ei(),{isDisabled:r}=kf(),l=(0,d.useRef)(null),[c,u]=(0,d.useState)(!1),[m,g]=(0,d.useState)(null),[h,p]=(0,d.useState)(!1),f=Hf(Yf.Images),I=e=>{if(e&&e[0]){const t=URL.createObjectURL(e[0]),n=e[0].type,i=new FileReader;i.onload=i=>{g({src:t,type:(0,mI.h)(i.target?.result,n),name:e[0].name})},i.readAsArrayBuffer(e[0])}p(!0)};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)($,{gap:"4",width:1,children:[(0,i.jsx)($,{align:"center",css:{background:c?"$primary50":"$gray50",border:c?"1px solid $primary300":"1px solid $gray200",borderRadius:"$1",cursor:r?"not-allowed":"pointer"},disabled:r,height:126,justify:"center",width:126,onClick:()=>{l.current?.click()},onDragEnter:e=>{xa(e),u(!0)},onDragLeave:e=>{xa(e),u(!1)},onDragOver:e=>{xa(e),c||u(!0)},onDrop:n=>{xa(n),u(!1);const i=n.dataTransfer.files.item(0);i&&f.includes(wo(i.name).extension)&&(e?I(n.dataTransfer.files):t(i))},children:(0,i.jsx)($,{align:"center",css:{background:c?"$primary100":"$gray100",borderRadius:"36px",color:c?"$primary600":"$gray600"},height:c?48:32,justify:"center",width:c?48:32,children:(0,i.jsx)(la,{icon:"plus"})})}),(0,i.jsxs)($,{css:{flex:"1"},direction:"column",children:[(0,i.jsx)(Ni,{color:"gray700",fontWeight:"medium",children:a}),n&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Wg,{height:"1"}),(0,i.jsx)(Ni,{color:"gray400",children:n})]}),(0,i.jsx)(Wg,{height:"3"}),(0,i.jsx)($,{children:(0,i.jsx)(pa,{onClick:()=>{l.current?.click()},children:o("s_lectionner_un_50712")})})]}),(0,i.jsx)(Ni,{css:{display:"none"},children:(0,i.jsx)("input",{ref:l,accept:Kf(Yf.Images),type:"file",onChange:n=>{n.target.files?.[0]&&(e?I(n.target.files):t(n.target.files[0]))},...s})})]}),e&&h&&m&&(0,i.jsx)(pI,{image:m,onChange:t,onClose:()=>p(!1)})]})},pI=({image:e,onChange:t,onClose:n})=>{const a=Ei(),s=(0,d.useRef)(null);return(0,d.useEffect)(()=>()=>{e&&e.src&&URL.revokeObjectURL(e.src)},[e]),(0,i.jsx)(ff,{size:"md",onClose:n,children:(0,i.jsxs)($,{css:{overflow:"auto"},direction:"column",gap:"3",children:[(0,i.jsx)(gI.IOb,{ref:s,className:"cropper",defaultSize:({imageSize:e,visibleArea:t})=>({width:(t||e).width,height:(t||e).height}),src:e.src,stencilProps:{aspectRatio:1}}),(0,i.jsx)(pa,{size:"lg",textAlign:"center",onClick:()=>{const i=s.current?.getCanvas();i&&i.toBlob(n=>{if(n){const i=new File([n],e.name,{lastModified:(new Date).getTime(),type:e.type});t(i)}},e.type,.95),n()},children:a("submit_21373")})]})})},fI="dragover",II=({accept:e,allowCrop:t,"aria-describedby":n,capture:a,onChange:s,...o})=>{const{translate:r}=$g(),l=Ti(),{isDisabled:c}=kf(),u=(0,rh.A)(),m=(0,d.useRef)(null),[g,h]=(0,d.useState)(void 0),[p,f]=(0,d.useState)(null),[I,_]=(0,d.useState)(!1),x=Hf(e||[]),y=Zf(e||[]),S=e=>{if(e&&e[0]){const t=URL.createObjectURL(e[0]),n=e[0].type,i=new FileReader;i.onload=i=>{f({src:t,type:(0,mI.h)(i.target?.result,n),name:e[0].name})},i.readAsArrayBuffer(e[0])}_(!0)},{designSystem:j}=(0,d.useContext)(Ks);return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("input",{ref:m,accept:e?Kf(e):void 0,"aria-describedby":[n,u].join(" "),capture:a,style:{display:"none"},type:"file",onChange:n=>{if(n.target.files?.[0])if(t){if(e!==Yf.Images)throw new Error("Crop enabled on non-image file uploader");S(n.target.files)}else s(n.target.files[0])},...o}),(0,i.jsxs)($,{align:"center",className:g,css:{background:"$gray50",borderWidth:"1px",borderColor:"$gray200",borderRadius:"$2",cursor:c?"not-allowed":"pointer",padding:"$4",[`&.${fI}`]:{background:"$primary50",borderColor:"$gray200"},...(()=>{switch(j){case Hs:return{borderStyle:"solid"};case Zs:return{borderStyle:"dashed",[`&:hover, &:has( input:focus), &.${fI}`]:{borderStyle:"solid",borderColor:"$primary500"}};default:ir()}})()},direction:"column",disabled:c,gap:"2",width:1,onClick:()=>m.current?.click(),onDragLeave:()=>{h(void 0)},onDragOver:e=>{xa(e),h(fI)},onDrop:n=>{xa(n),h(void 0);const i=n.dataTransfer.files.item(0);if(i&&(0===x.length||x.includes(wo(i.name).extension)))if(t){if(e!==Yf.Images&&e!=Yf.SmallImages)throw new Error("Crop enabled on non-image file uploader");S(n.dataTransfer.files)}else s(i)},children:[(0,i.jsx)($,{align:"center","aria-hidden":!0,css:{color:"$gray600",...(()=>{switch(j){case Hs:return{background:"$gray100",borderRadius:"36px"};case Zs:return;default:ir()}})()},height:32,justify:"center",width:32,children:(0,i.jsx)(la,{icon:"cloud-arrow-down"})}),(0,i.jsxs)($,{css:{textAlign:"center"},direction:"column",justify:"center",wrap:"wrap",children:[(0,i.jsx)(N,{textStyle:"subtitle",children:[...l(r("_1_ou_glisser_61813","{1}"),(0,i.jsx)(pa,{color:"invisible",css:{height:"auto",padding:0},id:"clickHereLink",type:"button",children:r("cliquez_ici_98447")}))]}),(0,i.jsx)(N,{id:u,textStyle:"subtitle",children:[...l(r("_1_accept_2_30390","{1}","{2}"),F(x)?x.map((e,t,{length:n})=>(0,i.jsxs)(d.Fragment,{children:[t>0?n-1!==t?", ":" & ":"",(0,i.jsxs)("code",{children:[".",e]})]},e)):r("all_file_format_50211"),y!==1/0?Hl.bytesToMegabytes(y):r("no_55268"))]})]})]}),t&&I&&p&&(0,i.jsx)(pI,{image:p,onChange:s,onClose:()=>_(!1)})]})};var _I;!function(e){e[e.File=0]="File",e[e.Uploader=1]="Uploader",e[e.Uploading=2]="Uploading"}(_I||(_I={}));const xI=({acl:e,css:t,descId:n,description:a,errorId:s,inputId:o,label:r,labelId:l,hint:c,onChange:u,organizationId:m,state:g,value:h,...p})=>{const{translate:f}=$g(),[I,_]=(0,d.useState)(h?_I.File:_I.Uploader),[x,y]=(0,d.useState)(""),[S,j]=(0,d.useState)(0);return(0,i.jsxs)($,{"aria-live":"polite",css:t,direction:"column",gap:"1",width:1,children:[(r||a)&&(0,i.jsxs)($,{direction:"column",children:[(0,i.jsx)(uh,{htmlFor:o,id:l,children:r}),(0,i.jsx)(lh,{id:n,children:a})]}),I===_I.File&&h?(0,i.jsx)(dI,{acl:e,"aria-label":f("delete_uploaded_14711"),document:h,id:o,role:"button",onDelete:()=>{u(null),_(_I.Uploader)}}):I===_I.Uploading?(0,i.jsx)(uI,{"aria-busy":!0,"aria-describedby":n,"aria-label":f("uploading_file_46483"),id:o,name:x,progress:S}):(0,i.jsx)(II,{"aria-describedby":n,"aria-errormessage":s,"aria-invalid":"error"===g,"aria-label":f("upload_file_97740"),id:o,onChange:async t=>{_(_I.Uploading),y(t.name),j(0);try{if(t.size>Zf(p.accept||[]))throw y(""),alert(f("file_is_too_lar_57859")),new Error;const n=await Qf(m,t,e,j);u({...n,file:t}),_(_I.File)}catch{_(_I.Uploader)}},...p}),(0,i.jsx)(ch,{state:g,children:c})]})},yI=({onChange:e,prefix:t,state:n,withFileField:a,...s})=>{const o=`${t}key`,r=`${t}name`,d=`${t}acl`,l=[o,r,d];let c;return a&&(c=`${t}file`,l.push(c)),(0,i.jsx)(Of,{names:l,render:t=>{let l=null;h(t[o].input.value)&&h(t[r].input.value)&&h(t[d].input.value)&&(l={key:t[o].input.value,name:t[r].input.value,acl:t[d].input.value});const{invalid:u,hint:m}=Object.values(t).reduce((e,t)=>e.invalid?e:oh(t.meta)?{invalid:!0,hint:t.meta.error||t.meta.submitError}:e,{invalid:!1,hint:void 0});return(0,i.jsx)(xI,{hint:m,state:u?"error":n,value:l,onChange:n=>{t[o].input.onChange(n?.key??""),t[o].input.onBlur(),t[r].input.onChange(n?.name??""),t[r].input.onBlur(),t[d].input.onChange(n?.acl??""),t[d].input.onBlur(),a&&(t[c].input.onChange(n?.file),t[c].input.onBlur(),n?.file&&e?.(n.file))},...s})}})},SI=e=>{const t=Ei(),[n,a]=(0,d.useState)(!1);return(0,i.jsxs)($,{gap:"4",width:1,children:[(0,i.jsx)(Ni,{css:{border:"1px solid $gray200",borderRadius:"$1",overflow:"hidden",cursor:e.allowCrop?"pointer":void 0},height:126,width:126,onClick:e.allowCrop?()=>a(!0):void 0,children:(0,i.jsx)("img",{src:e.url,style:{objectFit:"cover",inlineSize:"100%",blockSize:"100%"}})}),(0,i.jsxs)($,{direction:"column",children:[(0,i.jsx)(Ni,{color:"gray700",fontWeight:"medium",children:e.label}),e.hint&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Wg,{height:"1"}),(0,i.jsx)(Ni,{color:"gray400",children:e.hint})]}),(0,i.jsx)(Wg,{height:"3"}),(0,i.jsx)(Ni,{color:"error700",css:{cursor:"pointer"},fontWeight:"medium",onClick:e.onDelete,children:t("supprimer_43083")})]}),e.allowCrop&&n&&(0,i.jsx)(pI,{image:{name:e.url.split("/").pop().split(".").join("-cropped."),src:`${e.url}?cacheblock=true`},onChange:e.onChange,onClose:()=>a(!1)})]})},jI=e=>(0,i.jsxs)($,{gap:"4",width:1,children:[(0,i.jsx)($,{align:"center",css:{background:"$gray50",border:"1px solid $gray200",borderRadius:"$1",cursor:"pointer"},height:126,justify:"center",width:126,children:(0,i.jsx)($,{height:64,width:64,children:(0,i.jsx)(ca,{color:b.colors.gray900.value,height:"64px",strokeWidth:"4",width:"64px"})})}),(0,i.jsxs)($,{direction:"column",children:[(0,i.jsx)(Ni,{color:"gray700",fontWeight:"medium",children:e.label}),e.hint&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Wg,{height:"1"}),(0,i.jsx)(Ni,{color:"gray400",children:e.hint})]})]})]}),bI=({allowCrop:e,value:t,onChange:n,label:a,hint:s,organizationId:o,...r})=>{const[l,c]=(0,d.useState)(t?_I.File:_I.Uploader),u=async e=>{c(_I.Uploading);try{const t=await Qf(o,e,"public-read");n(t),c(_I.File)}catch{c(_I.Uploader)}};return l===_I.File&&t?(0,i.jsx)(SI,{allowCrop:e,hint:s,label:a,url:Jf(t,sa.HEAVENT_AWS_UPLOADS_BUCKET),onChange:u,onDelete:()=>{n(null),c(_I.Uploader)}}):l===_I.Uploading?(0,i.jsx)(jI,{hint:s,label:a}):(0,i.jsx)(hI,{allowCrop:e,hint:s,label:a,onChange:u,...r})},vI=({prefix:e,...t})=>{const n=`${e}key`,a=`${e}name`,s=`${e}acl`;return(0,i.jsx)(Of,{names:[n,a,s],render:e=>{let o=null;return h(e[n].input.value)&&h(e[a].input.value)&&h(e[s].input.value)&&(o={key:e[n].input.value,name:e[a].input.value,acl:e[s].input.value}),(0,i.jsx)(bI,{value:o,onChange:t=>{e[n].input.onChange(t?.key??""),e[a].input.onChange(t?.name??""),e[s].input.onChange(t?.acl??"")},...t})}})},AI=j("div",{variants:{direction:{horizontal:{width:"100%"},vertical:{height:"100%"}},color:{gray100:{},gray200:{}}},compoundVariants:[{direction:"horizontal",color:"gray100",css:{borderTop:"1px solid $gray100"}},{direction:"vertical",color:"gray100",css:{borderRight:"1px solid $gray100"}},{direction:"horizontal",color:"gray200",css:{borderTop:"1px solid $gray200"}},{direction:"vertical",color:"gray200",css:{borderRight:"1px solid $gray200"}}],defaultVariants:{color:"gray200"}}),CI=e=>(0,i.jsx)(AI,{"aria-orientation":e.direction,color:e.color,css:e.css,direction:e.direction,role:"separator"}),EI=e=>(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Wg,{height:e.height}),(0,i.jsx)(AI,{color:e.color,direction:"horizontal",role:"separator"}),(0,i.jsx)(Wg,{height:e.height})]}),TI=({value:e,onChange:t,css:n,label:a,state:s,description:o,hint:r,...l})=>{const c=Ei(),m=(0,d.useCallback)(e=>{e&&f(e.getBoundingClientRect().width)},[]),g=(0,d.useCallback)(e=>e?.focus({preventScroll:!0}),[]),[p,f]=(0,d.useState)(200),[I,_]=(0,d.useState)(!1),[x,y]=(0,d.useState)(""),S=Ci(ed),j=(0,d.useMemo)(()=>(0,ho.A)(S.countries.flatMap(e=>z(e.phoneCode).map(t=>({...e,phoneCode:t}))),({name:e})=>u(e)),[]),b=(0,d.useMemo)(()=>j.find(({code:t,phoneCode:n})=>t===e.country&&n===e.code),[e.country,e.code]),v=(0,d.useMemo)(()=>j.filter(e=>!h(x)||e.name.toLowerCase().includes(x.trim().toLowerCase())||e.phoneCode.includes(x.trim())),[j,x]),A=(0,d.useMemo)(()=>v.map((n,a)=>(0,i.jsx)(Pp,{onClick:()=>{t({...e,country:n.code,code:n.phoneCode}),y(""),_(!1)},children:(0,i.jsxs)($,{gap:"2",width:1,children:[(0,i.jsx)(Ni,{children:n.emoji}),(0,i.jsx)(Ni,{css:{ellipsis:!0},children:n.name}),(0,i.jsx)(Ni,{color:"gray500",children:n.phoneCode})]})},a)),[v,e,t]),{inputId:C,descId:E,errorId:T}=dh();return(0,i.jsxs)($,{ref:m,css:n,direction:"column",width:1,children:[(0,i.jsx)(uh,{htmlFor:C,children:a}),(0,i.jsx)(lh,{id:E,children:o}),(a||o)&&(0,i.jsx)(Wg,{height:"1"}),(0,i.jsxs)($,{children:[(0,i.jsxs)(Ep,{disabled:"disabled"===s,isOpen:I,onStateChange:e=>_(e),children:[(0,i.jsx)(Lp,{children:(0,i.jsx)(gh,{css:{borderRight:"none",borderBottomRightRadius:"0",borderTopRightRadius:"0",userSelect:"none",width:"100px","& .styled-input-container-circle-exclamation":{display:"none"},cursor:"disabled"===s?"not-allowed !important":void 0},cursor:"pointer",rightIcon:I?"chevron-up":"chevron-down",state:s,children:b&&(0,i.jsxs)(Ni,{width:1,children:[b.emoji," ",b.phoneCode]})})}),(0,i.jsx)(Np,{placement:"bottom-start",renderOnPortal:!0,width:p,children:(0,i.jsxs)($,{direction:"column",height:Math.min(201,40*v.length+41),width:1,children:[(0,i.jsx)(Ni,{css:{padding:"$2 $4","& input":{background:"transparent",border:"none",color:"$gray800",height:"100%",outline:"none",width:"100%"},"& input::placeholder":{color:"$gray500",opacity:1},"& input::-ms-input-placeholder ":{color:"$gray500",opacity:1}},height:40,children:(0,i.jsx)("input",{ref:g,"aria-label":c("indicatif_t_l_p_02025"),placeholder:c("rechercher_un_p_04678"),type:"text",value:x,onChange:e=>{y(e.target.value)}})}),(0,i.jsx)(CI,{color:"gray100",direction:"horizontal"}),(0,i.jsx)($,{css:{height:"calc(100% - 41px)",overflowY:"auto"},direction:"column",children:A})]})})]}),(0,i.jsx)(gh,{css:{borderBottomLeftRadius:"0",borderTopLeftRadius:"0",flex:"1"},cursor:"text",state:s,children:(0,i.jsx)(Ni,{css:{flex:"1",height:"100%","& input":{background:"transparent",border:"none",color:"$gray800",height:"100%",outline:"none",width:"100%"},"& input::placeholder":{color:"$gray500",opacity:1},"& input::-ms-input-placeholder ":{color:"$gray500",opacity:1}},children:(0,i.jsx)("input",{"aria-describedby":o?E:void 0,"aria-errormessage":"error"===s?T:void 0,"aria-invalid":"error"===s,autoComplete:"tel-national",disabled:"disabled"===s,id:C,type:"tel",value:e.number,onChange:n=>{t({...e,number:n.target.value})},...l})})})]}),(0,i.jsx)(ch,{id:T,state:s,children:r})]})},RI=(0,d.memo)(function({prefix:e,hint:t,state:n,...a}){const{isDisabled:s}=kf(),o=`${e}country`,r=`${e}code`,d=`${e}number`;return(0,i.jsx)(Of,{names:[o,r,d],render:e=>{const l=oh(e[r].meta)||oh(e[d].meta);return(0,i.jsx)(TI,{hint:l?e[r].meta.error||e[d].meta.error:t,state:l?"error":s?"disabled":n,value:{country:e[o].input.value,code:e[r].input.value,number:e[d].input.value},onChange:t=>{e[o].input.onChange(t.country),e[r].input.onChange(t.code),e[d].input.onChange(t.number)},...a})}})});var MI=n(7456);const DI=e=>(0,i.jsx)($,{css:{background:"$gray50",boxShadow:"0px -1px 3px rgba(16, 24, 40, 0.1), 0px -1px 2px rgba(16, 24, 40, 0.06)",color:"$primary500",cursor:"pointer",padding:"$3 $4",userSelect:"none"},width:1,onClick:e.onClick,children:e.children}),OI=({children:e,index:t,state:n,onToggle:a,...s})=>(0,i.jsxs)(i.Fragment,{children:[0!==t&&(0,i.jsx)(Wg,{height:"6"}),(0,i.jsxs)($,{align:"center",css:a?{cursor:"pointer",userSelect:"none"}:void 0,gap:"2",width:1,onClick:a,children:[a&&(0,i.jsx)(Lf,{shouldPreventDefault:!1,state:n??"unchecked",onClick:Ih.A}),(0,i.jsx)(Ni,{"aria-label":e?.toString(),css:{flex:"1"},font:"gray600 textXs semiBold",role:"group",...s,children:e})]}),(0,i.jsx)(Wg,{height:"2"})]});function wI(e){return d.Children.toArray(e).flatMap(e=>(0,d.isValidElement)(e)&&e.type===d.Fragment?wI(e.props.children):e)}function PI(e){return"string"==typeof e?e:"number"==typeof e?String(e):Array.isArray(e)?e.map(PI).join(""):(0,d.isValidElement)(e)?PI(e.props.children):""}const $I=({badge:e,children:t,color:n,css:a,disabled:s,isCheckbox:o,isRadio:r,isSelected:l,onClick:c,subtext:u,value:m,...g})=>{const p=(0,d.useCallback)(()=>{s||c?.()},[s,c]),f=(0,d.useCallback)(e=>{"Enter"===e.key&&p?.()},[p]),I=(0,d.useMemo)(()=>PI(t),[t]);return(0,i.jsxs)($,{align:"center","aria-checked":o?l:void 0,"aria-label":I,"aria-selected":l,css:{cursor:s?"default":"pointer",minHeight:"40px",padding:"$2 $3",userSelect:"none","&:hover":{background:"$gray100",borderRadius:"$1"},...a},gap:"3",role:"option",tabIndex:0,width:1,onClick:p,onKeyDown:f,...g,children:[o&&(0,i.jsx)(Lf,{disabled:s,shouldPreventDefault:!1,state:l?"checked":"unchecked",onClick:Ih.A}),r&&(0,i.jsx)(cf,{shouldPreventDefault:!1,state:l?"checked":"unchecked",onClick:Ih.A}),(0,i.jsxs)($,{align:"center",css:{flex:"1",overflow:"hidden"},gap:"2",children:[af(n)&&!e&&(0,i.jsx)(Ni,{css:{background:n,borderRadius:"16px",overflow:"hidden"},height:16,width:16}),af(n)&&e?(0,i.jsx)($,{css:{flex:"1",overflow:"hidden"},children:(0,i.jsx)(xf,{color:n,children:t})}):(0,i.jsxs)($,{css:{flex:"1",overflow:"hidden"},direction:"column",gap:"1",children:[(0,i.jsx)(Ni,{color:"gray800",css:{ellipsis:!0},title:I,width:1,children:t}),h(u)&&(0,i.jsx)(Ni,{color:"gray500",css:{ellipsis:!0},title:u,width:1,children:u})]})]}),!o&&!r&&l&&(0,i.jsx)(Ni,{color:"primary500",children:(0,i.jsx)(la,{icon:"check"})})]})};function kI(e,t){if(0===e.length)return"unchecked";{const n=(0,hd.A)(e,t).length;return 0===n?"unchecked":n>=e.length?"checked":"indeterminate"}}function NI(e,t,n){return"checked"===n?(0,tu.A)(e,t):(0,Na.A)(e.concat(t))}function LI(e){return d.Children.toArray(e).map(t=>{if("optgroup"===t.type)return[{id:(0,rh.A)(),type:"group",text:t.props.label}].concat(LI(t.props.children));if("option"===t.type)return{id:(0,rh.A)(),type:"option",text:t.props.children,value:t.props.value,badge:!0===t.props["data-badge"]||"true"===t.props["data-badge"],color:t.props["data-color"],disabled:t.props.disabled,radio:t.props["data-radio"],selected:t.props.selected,style:t.props.style,subtext:t.props["data-subtext"]};if(t.type===Symbol.for("react.fragment"))return LI(t.props.children);throw a("Unexpected child type",t,e),new Error("Unexpected child type")}).flat()}function zI(e){return Object.fromEntries(e.filter(e=>"option"===e.type).map(e=>[e.value,e.text]))}const FI=({children:e,createText:t,css:n,description:a,hint:s,icon:o,isCreateVisible:r,isSearchLoading:l,isSearchVisible:c,isSelectAllVisible:u,label:g,menuWidth:f,multiple:I,onChange:_,onClick:x,onCreateClick:y,placeholder:S,renderOnPortal:j,renderValue:b,searchElement:v,searchPlaceholder:A,state:C,triggerElem:E,values:T})=>{const{translate:R}=$g(),M=(0,d.useCallback)(e=>e?.focus({preventScroll:!0}),[]),[D,O]=(0,d.useState)(!1),[w,P]=(0,d.useState)(""),{inputId:k,descId:N}=dh(),{displayedChildren:L,allValues:z,valuesByGroup:U,childrenByRadio:B,valueToName:G,valueToText:V}=function(e,t){const n=(0,d.useMemo)(()=>LI(e),[e]),i=(0,d.useMemo)(()=>{const e=m(t||"");return n.filter(t=>""===e||"group"===t.type||m(PI(t.text)).includes(e)).filter((e,t,n)=>{const i=n[t+1];return"option"===e.type||"option"===i?.type})},[n,t]),a=(0,d.useMemo)(()=>i.flatMap(e=>"option"===e.type?[e.value]:[]),[i]),s=(0,d.useMemo)(()=>{const e={};let t=null;for(const n of i)"group"===n.type?(t=n.id,e[t]=[]):t&&!n.disabled&&p(n.radio)&&e[t].push(n.value);return e},[i]),o=(0,d.useMemo)(()=>(0,Qp.A)((0,Ql.A)(i.filter(e=>"option"===e.type&&h(e.radio)),e=>e.radio),e=>e.map(e=>e.value)),[i]),r=(0,d.useMemo)(()=>zI(n),[n]),l=(0,d.useMemo)(()=>(0,Qp.A)(r,PI),[r]);return{displayedChildren:i,allValues:a,valuesByGroup:s,childrenByRadio:o,valueToName:r,valueToText:l}}(e,w),W=kI(z,T),q=(0,d.useMemo)(()=>b?b(T[0],G[T[0]]):G[T[0]],[b,T,G]);return(0,d.useEffect)(()=>{D||P("")},[D]),(0,i.jsxs)($,{css:n,direction:"column",width:1,children:[g&&(0,i.jsx)(uh,{htmlFor:k,children:g}),a&&(0,i.jsx)(lh,{id:N,children:a}),(g||a)&&(0,i.jsx)(Wg,{height:"1"}),(0,i.jsxs)(Ep,{disabled:"disabled"===C,isOpen:D,onStateChange:e=>O(e),children:[(0,i.jsx)(Lp,{children:E||(0,i.jsx)(gh,{"aria-describedby":N,"aria-label":(g??S)+(V[T[0]]?` (currently: ${V[T[0]]})`:""),"aria-multiselectable":I,"aria-owns":L.map(e=>e.id).join(" "),"aria-placeholder":S,css:{maxHeight:"200px",overflowY:"auto",padding:"$2 $3",userSelect:"none",cursor:"disabled"===C?"not-allowed":void 0},cursor:"disabled"===C?"default":"pointer",height:"fluid",icon:o,id:k,rightIcon:D?"chevron-up":"chevron-down",role:"listbox",state:C,children:F(T)?I?(0,i.jsx)($,{css:{flex:"1",overflowY:"auto"},gap:"2",height:1,role:"presentation",wrap:"wrap",children:T.map((e,t)=>(0,i.jsx)(xf,{ellipsis:!0,rightIcon:"xmark",onRightIconClick:t=>{xa(t),_((0,MI.A)(T,e))},children:G[e]},t))}):(0,i.jsx)(Ni,{color:"gray800",css:{flex:"1",overflow:"hidden"},role:"presentation",children:(0,i.jsx)(Ni,{css:{ellipsis:!0},title:V[T[0]],children:q})}):(0,i.jsx)(Ni,{color:"gray500",css:{flex:"1"},role:"presentation",children:S})})}),(0,i.jsx)(Np,{css:{padding:"0"},placement:"bottom-start",renderOnPortal:j,width:f??"match",children:(0,i.jsxs)($,{direction:"column",width:1,children:[(0,i.jsxs)($,{css:{padding:"$3"},direction:"column",width:1,children:[c&&(0,i.jsxs)(i.Fragment,{children:[v||(0,i.jsx)(hh,{ref:M,icon:"magnifying-glass",placeholder:A||R("rechercher_50038"),state:"search",value:w,onChange:P}),(0,i.jsx)(Wg,{height:"3"})]}),(0,i.jsx)(Ni,{css:{maxHeight:"250px",overflowY:"auto"},children:l?(0,i.jsxs)($,{direction:"column",gap:"1",children:[(0,i.jsx)(Th,{borderRadius:"$1",height:40}),(0,i.jsx)(Th,{borderRadius:"$1",height:40}),(0,i.jsx)(Th,{borderRadius:"$1",height:40})]}):L.map((e,t)=>{if("group"===e.type){const n=U[e.id]??[],a=!0===I&&F(n),s=kI(n,T);return(0,i.jsx)(OI,{id:e.id,index:t,state:a?s:void 0,onToggle:a?()=>{_(NI(T,n,s))}:void 0,children:e.text},e.id)}{const n=e.value,a=e.selected??T.includes(n),s=e.radio,o=!0===I&&p(s),r=!0===I&&h(s);return(0,i.jsx)($I,{badge:e.badge,color:e.color,css:e.style,disabled:e.disabled,id:e.id,isCheckbox:o,isRadio:r,isSelected:a,subtext:e.subtext,value:e.value,onClick:()=>{if(x)x(n,a);else if(I&&o)_(a?(0,MI.A)(T,n):T.concat(n));else if(I&&r){const e=(0,tu.A)(T,B[s]).concat(a?[]:[n]);_(e)}else _(a?[]:[n]),O(!1)},children:e.text},t)}})})]}),r&&(0,i.jsxs)(DI,{onClick:()=>{y?.(),O(!1)},children:["+ ",t||R("cr_er_82895")]}),u&&(0,i.jsx)(DI,{onClick:()=>{_(NI(T,z,W))},children:R("checked"===W?"tout_d_s_lectio_37372":"tout_s_lectionn_48027")})]})})]}),(0,i.jsx)(ch,{state:C,children:s})]})},UI=({name:e,hint:t,state:n,multiple:a,...s})=>{const{isDisabled:o}=kf();return(0,i.jsx)(Gg.D0,{name:e,render:r=>{const d=oh(r.meta);return(0,i.jsx)(FI,{hint:d?r.meta.error:t,multiple:a,name:e,state:d?"error":o?"disabled":n,values:a?Array.isArray(r.input.value)?r.input.value:[]:"number"==typeof r.input.value||h(r.input.value)?[r.input.value]:[],onChange:e=>{a?r.input.onChange(e):F(e)?r.input.onChange(e[0]):r.input.onChange(null)},...s})}})},BI=j("select",{backgroundColor:"$white",height:"100%",left:0,opacity:0,position:"absolute",top:0,width:"100%"}),GI=j("div",{ellipsis:""}),VI=({autoComplete:e,children:t,css:n,label:a,description:s,shouldParseAsInt:o,shouldParseAsBoolean:r,onChange:l,hint:c,icon:u,state:m,value:g="",...h})=>{const p=d.useMemo(()=>zI(LI(t)),[t]),{inputId:f,descId:I,errorId:_}=dh();return(0,i.jsxs)($,{css:n,direction:"column",width:1,children:[(0,i.jsx)(uh,{htmlFor:f,children:a}),(0,i.jsx)(lh,{id:I,children:s}),(a||s)&&(0,i.jsx)(Wg,{height:"1"}),(0,i.jsxs)(gh,{cursor:"default",icon:u,state:m,children:[(0,i.jsx)($,{align:"center",css:{flex:"1",overflow:"hidden"},height:1,width:1,children:(0,i.jsx)(GI,{children:p[g.toString()]})}),(0,i.jsx)($,{css:{color:"$gray500"},children:(0,i.jsx)(la,{icon:"chevron-down"})}),(0,i.jsx)(BI,{"aria-describedby":s?I:void 0,"aria-errormessage":"error"===m?_:void 0,"aria-invalid":"error"===m,autoComplete:e??"off",css:{cursor:"disabled"===m?"not-allowed":"pointer"},disabled:"disabled"===m,id:f,value:g.toString(),onChange:e=>{l(o?parseInt(e.target.value,10):r?"true"===e.target.value:e.target.value)},...h,children:t})]}),(0,i.jsx)(ch,{id:_,state:m,children:c})]})},WI=({name:e,hint:t,state:n,...a})=>(0,i.jsx)(Gg.D0,{name:e,render:s=>{const o=oh(s.meta);return(0,i.jsx)(VI,{hint:o?s.meta.error:t,name:e,state:o?"error":n,value:s.input.value,onBlur:s.input.onBlur,onChange:e=>{s.input.onChange(e)},onFocus:s.input.onFocus,...a})}}),qI=({css:e,label:t,description:n,state:a,icon:s,hint:o,rightIcon:r,rightText:d,onChange:l,value:c,...u})=>{const{inputId:m,descId:g,errorId:h}=dh();return(0,i.jsxs)($,{css:e,direction:"column",width:1,children:[(0,i.jsx)(uh,{htmlFor:m,children:t}),(0,i.jsx)(lh,{id:g,children:n}),(t||n)&&(0,i.jsx)(Wg,{height:"1"}),(0,i.jsx)(gh,{cursor:"text",height:"fluid",icon:s,rightIcon:r,rightText:d,state:a,children:(0,i.jsxs)(Ah,{css:{flex:"1",minHeight:"100px",py:"$3","& .replicated-text":{whiteSpace:"pre-wrap",visibility:"hidden"},"& textarea":{outline:"none",overflow:"hidden",resize:"none"},"& .replicated-text, & textarea":{background:"transparent",border:"none",gridArea:"1 / 1 / 2 / 2",width:"100%"},"& textarea::placeholder":{color:"$gray500",opacity:1},"& input::-ms-input-placeholder":{color:"$gray500",opacity:1}},children:[(0,i.jsx)("textarea",{"aria-describedby":n?g:void 0,"aria-errormessage":"error"===a?h:void 0,"aria-invalid":"error"===a,disabled:"disabled"===a,id:m,value:c,onChange:e=>{l(e.target.value)},...u}),(0,i.jsxs)(Ni,{className:"replicated-text",children:[c," "]})]})}),(0,i.jsx)(ch,{id:h,state:a,children:o})]})},YI=({name:e,hint:t,state:n,...a})=>(0,i.jsx)(Gg.D0,{name:e,render:s=>{const o=oh(s.meta);return(0,i.jsx)(qI,{hint:o?s.meta.error:t,name:e,state:o?"error":n,value:s.input.value,onBlur:s.input.onBlur,onChange:e=>{s.input.onChange(e)},onFocus:s.input.onFocus,...a})}});function HI(){const e=Ei();return t=>(0,ho.A)(t.map(t=>({value:t,translation:e(t)})),({translation:e})=>m(e)).map(({value:e,translation:t},n)=>(0,i.jsx)("option",{value:e,children:t},n))}function ZI(e,t){const n=Ci(ed),a=HI();return(0,d.useMemo)(()=>e?e.fieldType===Le.Country?n.getCountriesIdName(t).map(({id:e,name:t})=>(0,i.jsx)("option",{value:e,children:t},e)):e.fieldType===Le.Language?e.fieldProperty===ke.Language?a(nd):a(Hn):e.fieldType===Le.Nationality?n.getNationalitiesIdName(t).map(({id:e,name:t})=>(0,i.jsx)("option",{value:e,children:t},e)):e.fieldType===Le.Sex?a(ci):e.values.map(({id:t,value:n,color:a})=>(0,i.jsx)("option",{"data-badge":e.listType===Ke.Badge,"data-color":e.listType===Ke.Default?void 0:a,value:t,children:n},t)):(0,i.jsx)(i.Fragment,{}),[e,t])}function KI(e,t){const n=t=>e.address_components?.find(({types:e})=>e.includes(t)),i=n("country")?.short_name;return{street:e.name,postalCode:n("postal_code")?.long_name,city:n("locality")?.long_name,countryCode:t.countryCodeExists(i)?i:void 0}}const QI=e=>{const{translate:t}=$g(),n=Ci(ed),a=Ci(Td),s=ZI(e.field,e.countryCode),o=e.isMandatory?e.field.name:(0,i.jsx)(Df,{children:e.field.name}),r=`${e.prefix}${e.field.slug}`,l=e.field.description,c=(0,d.useMemo)(()=>r.startsWith("formRegister.userInfo.fields."),[r]),u=function({change:e,field:t,prefix:n}){const i=Ci(ed),a=(0,Gg.mN)();return(0,d.useMemo)(()=>{const s=function(e){return e.fieldProperty===ke.Street?{isCity:!1,postalCode:"postalCode",city:"city",country:"country",latitude:"latitude",longitude:"longitude"}:e.fieldProperty===ke.BirthCity?{isCity:!0,postalCode:"birthPostalCode",city:null,country:"birthCountry",latitude:null,longitude:null}:e.addressPostalCodeCustomField||e.addressCityCustomField||e.addressCountryCustomField?{isCity:!1,postalCode:e.addressPostalCodeCustomField?.slug??null,city:e.addressCityCustomField?.slug??null,country:e.addressCountryCustomField?.slug??null,latitude:null,longitude:null}:null}(t);if(s){const t=(t,i,s=!1)=>{if(t&&void 0!==i){const o=`${n}${t}`;(s||a.getFieldState(o))&&e(o,i)}};return{getAddress(e){const t=KI(e,i);return(s.isCity?t.city:t.street)??e.formatted_address??""},onPlaceChange(e){const n=KI(e,i);t(s.postalCode,n.postalCode),t(s.city,n.city),t(s.country,n.countryCode),t(s.latitude,e.geometry?.location?.lat(),!0),t(s.longitude,e.geometry?.location?.lng(),!0)}}}return{}},[e,i,t,a,n])}(e);if((0,d.useEffect)(()=>{e.display||e.change(r,a.fieldUpdateInputDefault(e.field,n.getDefaultCountryValues()))},[e.display,e.field,e.change]),!e.display)return null;switch(e.field.fieldType){case Le.Text:return(0,i.jsx)(ph,{description:l,disabled:e.disabled,label:o,name:r});case Le.Textarea:return(0,i.jsx)(YI,{description:l,disabled:e.disabled,label:o,name:r});case Le.Checkbox:return(0,i.jsx)(Ff,{disabled:e.disabled,name:r,subtext:l,children:o});case Le.Validation:return(0,i.jsx)(Ff,{disabled:e.disabled,name:r,subtext:(0,i.jsxs)(i.Fragment,{children:[h(l)&&(0,i.jsx)("span",{children:l}),h(l)&&e.field.document&&(0,i.jsx)("br",{}),e.field.document&&(0,i.jsx)(Oh,{css:{color:"$primary500"},download:e.field.document.name,to:e.field.document.url,onClick:e=>{e.stopPropagation(),e.nativeEvent.stopImmediatePropagation()},children:t("consulter_le_do_69928")})]}),children:o});case Le.Select:return e.field.canSelectMultiple?(0,i.jsx)(UI,{description:l,disabled:e.disabled,isSearchVisible:!0,isSelectAllVisible:!0,label:o,multiple:!0,name:r,children:s}):(0,i.jsx)(UI,{description:l,disabled:e.disabled,isSearchVisible:!0,label:o,name:r,placeholder:t("choisir_une_val_00277"),children:s});case Le.Date:return"dateOfBirth"===e.field.slug?(0,i.jsx)(Bf,{autoComplete:c?"bday":void 0,description:l,disabled:e.disabled,label:o,max:Id,min:fd,name:r}):(0,i.jsx)(Bf,{description:l,disabled:e.disabled,label:o,name:r});case Le.Datetime:return(0,i.jsx)(Vf,{description:l,disabled:e.disabled,label:o,name:r});case Le.Time:return(0,i.jsx)(qf,{description:l,disabled:e.disabled,label:o,name:r});case Le.Phone:return(0,i.jsx)(RI,{description:l,disabled:e.disabled,label:o,prefix:`${r}.`});case Le.Number:return(0,i.jsx)(ph,{description:l,disabled:e.disabled,label:o,name:r,shouldParseAsInt:!0});case Le.Sex:return(0,i.jsxs)(WI,{autoComplete:c?"sex":void 0,description:l,disabled:e.disabled,label:o,name:r,children:[(0,i.jsx)("option",{disabled:!0,value:"",children:t("choisir_une_val_00277")}),s]});case Le.Language:return(0,i.jsx)(UI,{autoComplete:c?"language":void 0,description:l,disabled:e.disabled,isSearchVisible:!0,label:o,name:r,placeholder:t("choisir_une_val_00277"),children:s});case Le.Nationality:return(0,i.jsx)(UI,{description:l,disabled:e.disabled,isSearchVisible:!0,label:o,name:r,placeholder:t("choisir_une_val_00277"),children:s});case Le.Address:return(0,i.jsx)(Pf,{addressName:r,autoComplete:c?"street-address":void 0,description:l,disabled:e.disabled,label:o,...u});case Le.Country:return(0,i.jsx)(UI,{autoComplete:c?"country":void 0,description:l,disabled:e.disabled,isSearchVisible:!0,label:o,name:r,placeholder:t("choisir_une_val_00277"),children:s});case Le.File:return e.field.fileType===Fe.Picture?(0,i.jsx)(vI,{allowCrop:!0,disabled:e.disabled,hint:l,label:o,organizationId:e.organizationId,prefix:`${r}.`}):(0,i.jsx)(yI,{accept:[Yf.Images,Yf.Pdf,Yf.Videos],acl:e.fileAcl??"private",description:l,disabled:e.disabled,label:o,organizationId:e.organizationId,prefix:`${r}.`});default:return ir(e.field.fieldType)}};var XI=n(9120);const JI=e=>(0,ho.A)(e,e=>e.toMillis()),e_=j("div",{alignItems:"center",borderRadius:"$2",color:"$gray400",display:"flex",fontWeight:"$medium",height:"32px",justifyContent:"center",userSelect:"none",width:"32px",variants:{isSelectable:{true:{color:"$gray800",cursor:"pointer","&:hover":{background:"$primary500",color:"white"}}},isSelected:{true:{background:"$primary500",color:"white",cursor:"pointer"}}},compoundVariants:[{isSelectable:!0,isSelected:!0,css:{background:"$primary500",color:"white",cursor:"pointer"}}]}),t_=({datesToTitle:e,disabledDates:t,firstDayOfMonth:n,max:a,min:s,onChange:o,startHour:r,values:l})=>{const c=Ei(),u=Ci(pd),m=(0,d.useMemo)(()=>n.minus({day:n.weekday-1}),[n]),g=(0,d.useMemo)(()=>n.endOf("month"),[n]),h=(0,d.useMemo)(()=>{const e=g.plus({day:7-g.weekday});return Math.ceil(e.diff(m,"days").days)},[g]),p=(0,d.useMemo)(()=>(0,Bl.A)(0,h).map(e=>{const i=m.plus({day:e}).set({hour:r||0}),o=i.toMillis(),d=l.some(e=>e.toMillis()===o),c=!!F(t)&&t.some(e=>e.toMillis()===o);return{day:i,isSelected:d,isDisabled:c,isSelectable:!c&&i.month===n.month&&i>=s&&i<=a}}),[m,h,l,t,r]),f=(0,d.useMemo)(()=>!p.some(({isSelectable:e,isSelected:t})=>e&&!t),[p]),I=(0,d.useCallback)(()=>{o(f?[]:p.flatMap(({day:e,isSelectable:t,isSelected:n})=>t||n?[e]:[]))},[p,f,o]);return(0,i.jsxs)($,{css:{background:"white",bd:!0,padding:"$5 $4"},direction:"column",children:[(0,i.jsx)(Ni,{css:{textTransform:"capitalize"},font:"gray800 textXl semiBold",textAlign:"center",width:1,children:u.toLocaleString(n,{month:"long",year:"numeric"})}),(0,i.jsx)(Wg,{height:"6"}),(0,i.jsx)(Ah,{gap:"2",gridtemplatecolumns:"repeat(7, 32px)",gridtemplaterows:"auto",children:(0,Bl.A)(0,7).map(e=>{const t=m.plus({day:e});return(0,i.jsx)(Ni,{css:{textTransform:"capitalize"},font:"gray500 textXs medium",width:32,children:u.toLocaleString(t,{weekday:"short"})},e)})}),(0,i.jsx)(Wg,{height:"5"}),(0,i.jsx)(Ah,{gap:"2",gridtemplatecolumns:"repeat(7, 32px)",gridtemplaterows:"auto",children:p.map(({day:t,isSelected:n,isSelectable:a},s)=>(0,i.jsx)(e_,{isSelectable:a,isSelected:n,title:e?.[t.toMillis()],onClick:e=>{if(a&&n)o(JI((0,XI.A)(l,[t],e=>e.toMillis())));else if(a&&!n){const n=l.findLast(e=>en.plus({day:e+1}));o(JI([...l,...i]))}else o(JI([...l,t]))}},children:t.day},s))}),(0,i.jsx)(Wg,{height:"6"}),(0,i.jsx)(pa,{color:"white",textAlign:"center",onClick:I,children:c(f?"tout_d_s_lectio_37372":"tout_s_lectionn_48027")})]})},n_=e=>{const{translate:t}=$g(),{minDate:n,maxDate:a,numberOfMonths:s,totalDaysDiff:o}=(0,d.useMemo)(()=>function(e){const t=e.filter(e=>e.date?.isValid),n=(0,Jc.A)(t.map(e=>e.date),e=>e.toMillis()),i=(0,eu.A)(t.map(e=>e.date),e=>e.toMillis()),a=Math.ceil(i.endOf("month").diff(n.startOf("month"),"months").months),s=Math.ceil(i.diff(n,"days").days);return{minDate:n,maxDate:i,numberOfMonths:a,totalDaysDiff:s}}(e.slots),[e.slots]),r=(0,d.useMemo)(()=>e.slots.flatMap(t=>t.date?.isValid&&e.accreditationsSlotsIds.includes(t.id)?[t.date]:[]),[e.slots,e.accreditationsSlotsIds]),l=(0,d.useMemo)(()=>(0,Bl.A)(0,o).flatMap(t=>{const i=n.plus({day:t});return e.slots.some(e=>e.date?.isValid&&e.date.toMillis()===i.toMillis())?[]:[i]}),[n,o,e.slots]),c=(0,d.useMemo)(()=>Object.fromEntries(e.slots.flatMap(n=>{const i=e.slotIdToDas?.[n.id];return n.date?.isValid&&"number"==typeof i?.maxResources?[[n.date.toMillis(),yf(t,i.assignedResources,i.maxResources)]]:[]})),[e.slotIdToDas,e.slots,t]);return(0,i.jsx)($,{gap:"4",wrap:"wrap",children:(0,Bl.A)(0,s).map(t=>{const o=n.plus({month:t}).startOf("month"),d=0===t?n:o,u=t===s-1?a:o.endOf("month"),m=r.filter(e=>e.startOf("month").equals(o));return(0,i.jsx)(t_,{datesToTitle:c,disabledDates:l,firstDayOfMonth:o,max:u,min:d,values:m,onChange:t=>{e.onChange(function(e,t,n,i){const a=(0,tu.A)(e,t.flatMap(e=>e.date?.isValid&&n.equals(e.date.startOf("month"))?[e.id]:[]));return t.flatMap(e=>i.some(t=>e.date?.isValid&&t.startOf("day").equals(e.date.startOf("day")))?[e.id]:[]).concat(a)}(e.accreditationsSlotsIds,e.slots,o,t))}},t)})})},i_=e=>{const{translate:t}=$g(),n=(0,d.useMemo)(()=>e.slots.filter(e=>e.date?.isValid),[e.slots]);return F(n)?(0,i.jsx)(n_,{...e,slots:n}):(0,i.jsx)(Af,{imageSrc:bh.WeezeventBlankPerson,subtitle:t("this_may_be_bec_43194"),title:t("no_items_are_cu_47996")})},a_=e=>{const{translate:t}=$g(),n=Ci(pd);return(0,i.jsx)(i.Fragment,{children:F(e.slots)?e.slots.map(t=>(0,i.jsx)(zf,{disabled:e.getDisabled(t.id),state:e.accreditationsSlotsIds.includes(t.id)?"checked":"unchecked",onClick:n=>{e.onChange(B(e.accreditationsSlotsIds,t.id,"checked"===n))},children:(0,i.jsxs)($,{align:"center",gap:"1",children:[(0,i.jsx)(Ni,{css:{textTransform:"capitalize"},children:uu(n,t,e.accreditation.name,{date:{localeFormat:Za.DateOnly.WeekdayLongMonthLong}})}),(0,i.jsx)(Sf,{getAssignedMaxRemaining:e.getAssignedMaxRemaining,slotId:t.id})]})},t.id)):(0,i.jsx)(Af,{imageSrc:bh.WeezeventBlankPerson,subtitle:t("this_may_be_bec_43194"),title:t("no_items_are_cu_47996")})})},s_=e=>{const{translate:t}=$g(),n=Ci(pd),a=(0,d.useMemo)(()=>e.slots.map(e=>e.id),[e.slots]);return(0,i.jsx)(i.Fragment,{children:F(e.slots)?e.slots.map(t=>(0,i.jsx)(uf,{disabled:e.getDisabled(t.id),state:e.accreditationsSlotsIds.includes(t.id)?"checked":"unchecked",onClick:n=>{const i=[...e.accreditationsSlotsIds.filter(e=>!a.includes(e)),..."checked"===n?[t.id]:[]];e.onChange(i)},children:(0,i.jsxs)($,{align:"center",gap:"1",children:[(0,i.jsx)(Ni,{css:{textTransform:"capitalize"},children:uu(n,t,e.accreditation.name,{date:{localeFormat:Za.DateOnly.WeekdayLongMonthLong}})}),(0,i.jsx)(Sf,{getAssignedMaxRemaining:e.getAssignedMaxRemaining,slotId:t.id})]})},t.id)):(0,i.jsx)(Af,{imageSrc:bh.WeezeventBlankPerson,subtitle:t("this_may_be_bec_43194"),title:t("no_items_are_cu_47996")})})},o_=e=>{const{translate:t}=$g(),n=(0,d.useMemo)(()=>e.slots.map(e=>e.id),[e.slots]),a=(0,d.useMemo)(()=>e.accreditation.accreditationDisplay===W.List&&e.slots.every(t=>e.accreditationsSlotsIds.includes(t.id)),[e.accreditation,e.accreditationsSlotsIds,e.slots]),s=(0,d.useCallback)(()=>{a?e.onChange((0,tu.A)(e.accreditationsSlotsIds,n)):e.onChange((0,Na.A)(e.accreditationsSlotsIds.concat(n)))},[a,e.accreditationsSlotsIds,e.onChange,n]);return e.accreditation.accreditationDisplay===W.List?(0,i.jsx)($,{css:{borderTop:"1px solid $gray200",padding:"$4"},children:(0,i.jsx)(Ni,{css:{cursor:"pointer"},font:"primary500 textSm medium",onClick:s,children:t(a?"tout_d_s_lectio_37372":"tout_s_lectionn_48027")})}):null},r_=e=>{const{params:{organizationId:t},translate:n}=$g(),[a,s]=(0,d.useState)(!1),o=(0,d.useMemo)(()=>h(e.accreditation.description)&&e.options.showAccreditationDescription,[e.accreditation,e.options]),r=(0,d.useMemo)(()=>{const t=e.accreditation.hasSlots?e.slots.map(e=>e.id):[e.accreditation.hiddenSlotId];return e.displayFormCustomFields&&F(e.accreditation.formCustomFields)&&F((0,hd.A)(t,e.accreditationsSlotsIds))},[e.accreditation,e.accreditationsSlotsIds,e.displayFormCustomFields,e.slots]),l=(0,d.useMemo)(()=>Object.fromEntries(e.delegationAccreditationsSlots.map(e=>[e.accreditationSlotId,e])),[e.delegationAccreditationsSlots]),c=(0,d.useCallback)(e=>{const t=l[e];return"number"==typeof t?.maxResources?{assignedResources:t.assignedResources,maxResources:t.maxResources,remaining:t.maxResources-t.assignedResources}:null},[l]),u=(0,d.useCallback)(t=>{const n=l[t];return!!n&&n.isFull&&n.willAutoAccredit&&!e.alreadyAssignedSlotsIds.includes(t)},[e.alreadyAssignedSlotsIds,l]),m=(0,d.useMemo)(()=>e.accreditation.hasSlots?null:(0,i.jsx)(Sf,{getAssignedMaxRemaining:c,slotId:e.accreditation.hiddenSlotId}),[c,e.accreditation]),g=(0,d.useCallback)(t=>{e.change(`${e.prefix}accreditationsSlotsIds`,t)},[e.prefix,e.change]),p=e.accreditationsSlotsIds.includes(e.accreditation.hiddenSlotId)?"checked":"unchecked";return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(df,{accreditation:e.accreditation,badge:m,displayFormCustomFields:r,displayNumberOfSlots:!1,displaySlots:e.accreditation.hasSlots,numberOfSlots:0,renderActions:()=>o&&(0,i.jsx)(pa,{color:"white",onClick:e=>{e.stopPropagation(),e.nativeEvent.stopImmediatePropagation(),s(!0)},children:n("voir_la_descrip_62304")}),renderCheckbox:()=>!e.accreditation.hasSlots&&(0,i.jsx)(Lf,{disabled:u(e.accreditation.hiddenSlotId),shouldPreventDefault:!1,state:p,onClick:Ih.A}),onClick:()=>{e.accreditation.hasSlots||u(e.accreditation.hiddenSlotId)||e.change(`${e.prefix}accreditationsSlotsIds`,B(e.accreditationsSlotsIds,e.accreditation.hiddenSlotId,"unchecked"===p))},children:(0,i.jsxs)($,{css:{background:"white",padding:"$4"},direction:"column",gap:"3",children:[e.accreditation.hasSlots?e.accreditation.accreditationDisplay===W.Calendar?(0,i.jsx)(i_,{accreditationsSlotsIds:e.accreditationsSlotsIds,slotIdToDas:l,slots:e.slots,onChange:g}):(0,i.jsxs)($,{css:{background:"white",bd:!0},direction:"column",width:1,children:[(0,i.jsx)($,{css:{padding:"$4"},direction:"column",gap:"3",children:e.accreditation.accreditationDisplay===W.Radio?(0,i.jsx)(s_,{accreditation:e.accreditation,accreditationsSlotsIds:e.accreditationsSlotsIds,getAssignedMaxRemaining:c,getDisabled:u,slots:e.slots,onChange:g}):(0,i.jsx)(a_,{accreditation:e.accreditation,accreditationsSlotsIds:e.accreditationsSlotsIds,getAssignedMaxRemaining:c,getDisabled:u,slots:e.slots,onChange:g})}),(0,i.jsx)(o_,{accreditation:e.accreditation,accreditationsSlotsIds:e.accreditationsSlotsIds,slots:e.slots,onChange:g})]}):null,r&&(0,i.jsx)($,{css:{background:"white",bd:!0,padding:"$4"},direction:"column",gap:"3",width:1,children:e.accreditation.formCustomFields.map(({customField:n,isMandatory:a})=>(0,i.jsx)(QI,{change:e.change,display:!0,field:n,isMandatory:a,organizationId:t,prefix:`${e.prefix}userInfo.fields.`},n.id))})]})}),a&&(0,i.jsx)(If,{description:e.accreditation.description,name:e.accreditation.name,onClose:()=>s(!1)})]})},d_=e=>{const{translate:t}=$g();return(0,i.jsx)(Mf,{category:e.category.name,children:F(e.accreditations)?e.accreditations.map(t=>(0,i.jsx)(r_,{accreditation:t,accreditationsSlotsIds:e.accreditationsSlotsIds,alreadyAssignedSlotsIds:e.alreadyAssignedSlotsIds,change:e.change,delegationAccreditationsSlots:e.delegationAccreditationsSlots,displayFormCustomFields:e.displayFormCustomFields,options:e.options,prefix:e.prefix,slots:e.accreditationIdToSelectableSlots[t.id]},t.id)):(0,i.jsx)(Af,{imageSrc:bh.WeezeventBlankPerson,subtitle:t("this_may_be_bec_43194"),title:t("no_items_are_cu_47996")})})},l_=e=>{const{translate:t}=$g();return(0,i.jsx)(vf,{css:{background:"transparent",padding:"0"},children:F(e.categories)?(0,i.jsxs)(i.Fragment,{children:[e.categories.map(t=>(0,i.jsx)(d_,{accreditationIdToSelectableSlots:e.accreditationIdToSelectableSlots,accreditations:e.categoryIdToSelectableAccreditations[t.id],accreditationsSlotsIds:e.accreditationsSlotsIds,alreadyAssignedSlotsIds:e.alreadyAssignedSlotsIds,category:t,change:e.change,delegationAccreditationsSlots:e.delegationAccreditationsSlots,displayFormCustomFields:e.displayFormCustomFields,options:e.options,prefix:e.prefix},t.id)),e.showAutoAccredit&&(0,i.jsxs)($,{direction:"column",gap:"1",children:[(0,i.jsx)(Ni,{font:"gray900 textSm medium",children:t("attribution_des_59896")}),(0,i.jsx)(Rf,{name:`${e.prefix}autoAccredit`,children:t("attribuer_les_a_75431")})]})]}):F(e.delegationAccreditationsProfiles)?null:(0,i.jsx)(Af,{imageSrc:bh.WeezeventBlankPerson,subtitle:t("this_may_be_bec_43194"),title:t("no_items_are_cu_47996")})})},c_=(0,d.memo)(e=>{const{accreditationIdToSelectableSlots:t,categoryIdToSelectableAccreditations:n,selectableCategories:a,selectableProfiles:s}=(0,d.useMemo)(()=>{const t=ql(e.slots.map(qa)),n=e.event.accreditationsProfilesCategories.flatMap(t=>t.accreditationsProfiles.filter(t=>function(e,t,n){return t.some(t=>t.accreditationProfileId===e.id&&(n===t.accreditationProfileId||!t.isFull))}(t,e.delegationAccreditationsProfiles,e.alreadyAssignedProfileId))),i=e.event.accreditationsCategories.flatMap(n=>n.accreditations.flatMap(n=>n.slots.filter(n=>function(e,t,n,i,a,s){const o=n.slotDisplay===At.Hide||n.accreditationFilter===vt.None||!e.date||t.some(t=>Ha(t,e.date)),r=n.showFullAccreditation||s.includes(e.id),d=n.accreditationDisplay!==St.None&&!n.hiddenAccreditationsSlotsIds.includes(e.id)&&(0===n.displayedAccreditationsSlotsIds.length||n.displayedAccreditationsSlotsIds.includes(e.id))&&(r||!e.isFull),l=i.some(t=>t.accreditationSlotId===e.id&&(r||!t.isFull&&!e.isFull));return!a.includes(e.id)&&!e.isBlocked&&o&&(d||l)}(n,t,e.options,e.delegationAccreditationsSlots,e.scannedSlotsIds,e.alreadyAssignedSlotsIds)))),a=i.map(e=>e.id),s=(0,Qp.A)((0,Ql.A)(i,e=>e.accreditationId),e=>(0,ho.A)(e,e=>(0,po.A)([e.date?.toMillis(),m(e.name)]))),o=e.event.accreditationsCategories.flatMap(t=>t.accreditations.filter(t=>function(e,t,n,i,a){return i.accreditationDisplay!==St.None&&!i.hiddenAccreditationsIds.includes(e.id)&&(0===i.displayedAccreditationsIds.length||i.displayedAccreditationsIds.includes(e.id))&&ou(e,n)&&e.slots.some(e=>t.includes(e.id))||a.some(i=>i.accreditationId===e.id&&ou(e,n)&&e.slots.some(e=>t.includes(e.id)))}(t,a,e.userInfosFields,e.options,e.delegationAccreditationsSlots))),r=o.map(e=>e.id),d=(0,Qp.A)((0,Ql.A)(o,e=>e.accreditationCategoryId),e=>Zp(e)),l=(0,ho.A)(e.event.accreditationsCategories.filter(t=>function(e,t,n,i){return n.accreditationDisplay!==St.None&&!n.hiddenAccreditationsCategoriesIds.includes(e.id)&&(0===n.displayedAccreditationsCategoriesIds.length||n.displayedAccreditationsCategoriesIds.includes(e.id))&&e.accreditations.some(e=>t.includes(e.id))||i.some(n=>n.accreditationCategoryId===e.id&&e.accreditations.some(e=>t.includes(e.id)))}(t,r,e.options,e.delegationAccreditationsSlots)),e=>m(e.name));return{selectableCategories:l,selectableProfiles:n,categoryIdToSelectableAccreditations:d,accreditationIdToSelectableSlots:s}},[e.alreadyAssignedProfileId,e.alreadyAssignedSlotsIds,e.delegationAccreditationsProfiles,e.delegationAccreditationsSlots,e.event.accreditationsCategories,e.event.accreditationsProfilesCategories,e.options,e.scannedSlotsIds,e.slots,e.userInfosFields]);return(0,d.useEffect)(()=>{const t=e.event.accreditationsCategories.flatMap(t=>t.accreditations.filter(t=>!ou(t,e.userInfosFields)).flatMap(e=>e.slots.map(e=>e.id))),n=e.accreditationsSlotsIds.filter(n=>!t.includes(n)||e.alreadyAssignedSlotsIds.includes(n));n.length!==e.accreditationsSlotsIds.length&&e.change(`${e.prefix}accreditationsSlotsIds`,n)},[e.accreditationsSlotsIds,e.alreadyAssignedSlotsIds,e.event.accreditationsCategories,e.userInfosFields]),F(s)||F(e.delegationAccreditationsSlots)||e.options.accreditationDisplay===St.Accreditation?(0,i.jsxs)($,{direction:"column",gap:"9",children:[F(e.delegationAccreditationsProfiles)&&(0,i.jsx)(bf,{accreditationProfileId:e.accreditationProfileId,accreditationsProfiles:s,alreadyAssignedProfileId:e.alreadyAssignedProfileId,change:e.change,delegationAccreditationsProfiles:e.delegationAccreditationsProfiles,options:e.options,prefix:e.prefix}),(0,i.jsx)(l_,{accreditationIdToSelectableSlots:t,accreditationsSlotsIds:e.accreditationsSlotsIds,alreadyAssignedSlotsIds:e.alreadyAssignedSlotsIds,categories:a,categoryIdToSelectableAccreditations:n,change:e.change,delegationAccreditationsProfiles:e.delegationAccreditationsProfiles,delegationAccreditationsSlots:e.delegationAccreditationsSlots,displayFormCustomFields:e.displayFormCustomFields,options:e.options,prefix:e.prefix,showAutoAccredit:e.showAutoAccredit})]}):null}),u_=e=>{const t=Ei(),{data:n,loader:a}=Ri("query FormAccreditations($eventId: EventId!) {\n event: eventPublic(id: $eventId) {\n accreditationsCategories {\n ...FormRegisterAccreditationCategory\n }\n\n accreditationsProfilesCategories {\n ...FormRegisterAccreditationProfileCategory\n }\n }\n}\n",{eventId:e.eventId},[La.FormRegisterAccreditationCategoryFragment,La.FormRegisterAccreditationProfileCategoryFragment]);return a||(0,i.jsxs)(i.Fragment,{children:[h(e.form.accreditationSubtitle)?(0,i.jsx)(yp,{text:e.renderText(e.form.accreditationSubtitle,e.userInfoFields)}):(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Ni,{font:"gray800 textMd semiBold",children:t("s_lectionnez_vo_91873")}),(0,i.jsx)(Wg,{height:"1"}),(0,i.jsx)(Ni,{color:"gray500",children:t("s_lectionnez_le_63924")})]}),(0,i.jsx)(Wg,{height:"6"}),(0,i.jsx)(th,{}),(0,i.jsx)(c_,{accreditationProfileId:null,accreditationsSlotsIds:e.accreditationsSlotsIds,alreadyAssignedProfileId:null,alreadyAssignedSlotsIds:L,change:e.change,delegationAccreditationsProfiles:L,delegationAccreditationsSlots:L,displayFormCustomFields:!0,event:n.event,options:e.form,prefix:"formRegister.",scannedSlotsIds:L,showAutoAccredit:!1,slots:e.slots,userInfosFields:e.userInfoFields}),(0,i.jsx)(Wg,{height:"7"}),(0,i.jsx)($,{children:(0,i.jsx)(pa,{onClick:e.handleSubmit,children:e.registerButtonText})})]})},m_=d.forwardRef((e,t)=>(0,i.jsxs)($,{ref:t,css:{background:"white",bd:"white 1 sm",width:"100%","@tablet":{width:"$containerTablet"},"@desktop":{width:"$container"}},direction:"column",children:[(0,i.jsxs)($,{align:"center",css:{borderBottom:e.isOpen?"1px solid $gray200":"",cursor:e.canSelect?"pointer":"default",padding:"$4","@tablet":{padding:"$4 $6"}},gap:"4",onClick:()=>{e.canSelect&&e.onSelect()},children:[(0,i.jsx)($,{align:"center",css:{background:e.isCompleted?"$success100":"white",border:e.isCompleted?"none":"1px solid $gray200",borderRadius:"32px",color:e.isCompleted?"$success700":"$gray800",fontSize:"$textMd",fontWeight:"$semiBold"},height:32,justify:"center",width:32,children:e.isCompleted?(0,i.jsx)(la,{icon:"check"}):e.number}),(0,i.jsx)(Ni,{color:"gray800",fontSize:"textMd",fontWeight:"semiBold",children:e.title})]}),e.isOpen&&(0,i.jsx)($,{css:{padding:"$6 $4","@tablet":{padding:"$6"},"@desktop":{padding:"$6 70px"}},direction:"column",children:e.children})]}));m_.displayName="FormBox";const g_=[79151,64083,79017,64084,79152,71228];["INTER. COMMISSAIRE TECHNIQUE COURSE D'ACCELERATION DRAGSTER","INTERNATIONALE CHRONOMETREUR A AUTO","INTERNATIONALE CHRONOMETREUR B AUTO","INTERNATIONALE CHRONOMETREUR C CIRCUIT AUTO","INTERNATIONALE CHRONOMETREUR C ROUTE AUTO","INTERNATIONALE CHRONOMETREUR KARTING","INTERNATIONALE COMMISSAIRE A CHEF DE POSTE CIRCUIT","INTERNATIONALE COMMISSAIRE A CHEF DE POSTE ROUTE AUTO","INTERNATIONALE COMMISSAIRE B","INTERNATIONALE COMMISSAIRE SPORTIF AUTO","INTERNATIONALE COMMISSAIRE SPORTIF KARTING","INTERNATIONALE COMMISSAIRE TECHNIQUE A AUTO","INTERNATIONALE COMMISSAIRE TECHNIQUE A KARTING","INTERNATIONALE COMMISSAIRE TECHNIQUE B AUTO","INTERNATIONALE COMMISSAIRE TECHNIQUE B KARTING","INTERNATIONALE COMMISSAIRE TECHNIQUE C AUTO","INTERNATIONALE COMMISSAIRE TECHNIQUE C KARTING","INTERNATIONALE COMMISSAIRE TECHNIQUE D'ACCELERATION DRAGSTER","INTERNATIONALE COMMISSAIRE TECHNIQUE STAGIAIRE AUTO","INTERNATIONALE COMMISSAIRE TECHNIQUE STAGIAIRE KARTING","INTERNATIONALE DIRECTEUR DE COURSE CIRCUIT ASPHALTE","INTERNATIONALE DIRECTEUR DE COURSE CIRCUIT TERRE","INTERNATIONALE DIRECTEUR DE COURSE DRAGSTER","INTERNATIONALE DIRECTEUR DE COURSE KARTING","INTERNATIONALE DIRECTEUR DE COURSE ROUTE AUTO","INTERNATIONALE DIRECTEUR DE COURSE TRIAL 4X4","INTERNATIONALE DIRIGEANT","INTERNATIONALE MEDICALE","INTERNATIONALE PERSONNE SATELLITE","INTERNATIONALE RESPONSABLE DE ZONE TRIAL 4X4","INTERNATIONALE VOLONTAIRE","NATIONALE CHRONOMETREUR STAGIAIRE","NATIONALE COMMISSAIRE C","NATIONALE COMMISSAIRE SPORTIF KARTING GRADE C","NATIONALE COMMISSAIRE SPORTIF KARTING","NATIONALE DIRECTEUR DE COURSE DRIFT","NATIONALE DIRECTEUR DE COURSE KARTING GRADE C","NATIONALE DIRECTEUR DE COURSE KARTING","NATIONALE DIRECTEUR DE COURSE TRIAL 4X4","NATIONALE JUGE DRIFT","NATIONALE MEDIA","NATIONALE MEDICALE","NATIONALE STAGIAIRE OPTION COMMISSAIRE SPORTIF","NATIONALE STAGIAIRE OPTION DIRECTEUR DE COURSE","NATIONALE STAGIAIRE OPTION JUGE DRIFT"].map(e=>function(e){return m(e).replace(/[\u2018\u2019]/g,"'")}(e));const h_=e=>{const t=(0,d.useMemo)(()=>e.elements.flatMap(e=>e.elementType===Be.Field?(0,po.A)([e.customField,e.conditionCustomField]):e.hasCondition&&e.conditionCustomField?[e.conditionCustomField]:[]).map(t=>gu(e.organizationId)&&("production"===s.Development?[14]:[66919,68131,68598,70260,74864,74866,74868]).includes(t.id)&&F(e.asoBannersColors)?{...t,values:t.values.filter(({id:t})=>e.asoBannersColors?.includes(t))}:t),[e.elements]),n=(0,d.useMemo)(()=>Object.fromEntries(t.map(e=>[e.id,e])),[t]);return(0,i.jsx)(Ni,{children:e.elements.map((a,s)=>{switch(a.elementType){case Be.Field:{const o=n[a.customField.id],r=Ad(o,e.values,t);return(0,i.jsxs)(d.Fragment,{children:[r&&0!==s&&(0,i.jsx)(Wg,{height:"4"}),(0,i.jsx)(QI,{change:e.change,countryCode:e.countryCode,disabled:g_.includes(o.id),display:r,field:o,isMandatory:!0===a.isMandatory,organizationId:e.organizationId,prefix:e.prefix},s)]},s)}case Be.Section:return Ad(a,e.values,t)?(0,i.jsx)(d.Fragment,{children:"function"==typeof e.renderSection?e.renderSection(a.section,s):(0,i.jsxs)(i.Fragment,{children:[e.featureFlags?.isV4?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Wg,{height:"5"}),(0,i.jsx)(CI,{direction:"horizontal"}),(0,i.jsx)(Wg,{height:"5"})]}):0!==s&&(0,i.jsx)(Wg,{height:"8"}),(0,i.jsx)(Ni,{font:"grayCustom900 textMd semiBold",children:"function"==typeof e.renderText?e.renderText(a.section):a.section})]})},s):null;case Be.Text:return Ad(a,e.values,t)?(0,i.jsx)(d.Fragment,{children:(0,i.jsxs)(i.Fragment,{children:[0!==s&&(0,i.jsx)(Wg,{height:"4"}),(0,i.jsx)(yp,{text:"function"==typeof e.renderText?e.renderText(a.text):a.text})]})},s):null;default:return ir(a.elementType)}})})},p_=e=>{const{translate:t,params:{organizationId:n}}=$g();return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(th,{}),(0,i.jsx)(h_,{change:e.change,countryCode:e.countryCode,elements:e.elements,organizationId:n,prefix:"formRegister.userInfo.fields.",renderText:t=>e.renderText(t,e.values),values:e.values}),(0,i.jsx)(Wg,{height:{"@initial":"6","@tablet":"7"}}),(0,i.jsx)($,{children:(0,i.jsx)(pa,{onClick:e.handleSubmit,children:e.isFinalStep?e.registerButtonText:t("suivant_62774")})})]})},f_=e=>{const[t,n]=(0,d.useState)(!1),a=h(e.category.description)&&e.options.showPositionCategoryDescription;return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(zf,{css:{alignItems:"center"},state:e.positionsCategoriesIds.includes(e.category.id)?"checked":"unchecked",onClick:t=>{e.change(`${e.prefix}positionsCategoriesIds`,B(e.positionsCategoriesIds,e.category.id,"checked"===t))},children:(0,i.jsxs)($,{align:"center",gap:"2",children:[(0,i.jsx)(Ni,{children:e.category.name}),a&&(0,i.jsx)(Ni,{onClick:e=>{xa(e),n(!0)},children:(0,i.jsx)(la,{icon:"circle-info"})})]})}),t&&(0,i.jsx)(If,{description:e.category.description,name:e.category.name,onClose:()=>{n(!1)}})]})},I_=e=>{const{translate:t}=$g();return(0,i.jsx)(i.Fragment,{children:F(e.categories)?e.categories.map((t,n)=>(0,i.jsxs)(d.Fragment,{children:[0!==n&&(0,i.jsx)(Wg,{height:"3"}),(0,i.jsx)(f_,{category:t,change:e.change,options:e.options,positionsCategoriesIds:e.positionsCategoriesIds,prefix:e.prefix})]},t.id)):(0,i.jsx)(Af,{imageSrc:bh.WeezeventBlankPerson,subtitle:t("this_may_be_bec_43194"),title:t("no_items_are_cu_47996")})})},__=e=>{const[t,n]=(0,d.useState)(!1),a=h(e.position.description)&&e.options.showPositionDescription;return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(zf,{css:{alignItems:"center"},state:e.positionsIds.includes(e.position.id)?"checked":"unchecked",onClick:t=>{e.change(`${e.prefix}positionsIds`,B(e.positionsIds,e.position.id,"checked"===t))},children:(0,i.jsxs)($,{align:"center",gap:"2",children:[(0,i.jsx)(Ni,{children:e.position.name}),a&&(0,i.jsx)(Ni,{onClick:e=>{xa(e),n(!0)},children:(0,i.jsx)(la,{icon:"circle-info"})})]})}),t&&(0,i.jsx)(If,{description:e.position.description,name:e.position.name,onClose:()=>{n(!1)}})]})},x_=e=>{const{translate:t}=$g(),[n,a]=(0,d.useState)(!1),s=h(e.category.description)&&e.options.showPositionCategoryDescription;return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)($,{align:"center",gap:"2",children:[(0,i.jsx)(Ni,{color:"gray900",fontWeight:"semiBold",children:e.category.name}),s&&(0,i.jsx)(Ni,{color:"gray700",onClick:()=>{a(!0)},children:(0,i.jsx)(la,{icon:"circle-info"})})]}),(0,i.jsx)(Wg,{height:"2"}),F(e.positions)?e.positions.map((t,n)=>(0,i.jsxs)(d.Fragment,{children:[0!==n&&(0,i.jsx)(Wg,{height:"3"}),(0,i.jsx)(__,{change:e.change,options:e.options,position:t,positionsIds:e.positionsIds,prefix:e.prefix})]},t.id)):(0,i.jsx)(Af,{imageSrc:bh.WeezeventBlankPerson,subtitle:t("this_may_be_bec_43194"),title:t("no_items_are_cu_47996")}),n&&(0,i.jsx)(If,{description:e.category.description,name:e.category.name,onClose:()=>{a(!1)}})]})},y_=e=>{const{translate:t}=$g();return(0,i.jsx)(i.Fragment,{children:F(e.categories)?e.categories.map((t,n)=>(0,i.jsxs)(d.Fragment,{children:[0!==n&&(0,i.jsx)(Wg,{height:"6"}),(0,i.jsx)(x_,{category:t,change:e.change,options:e.options,positions:e.categoryIdToSelectablePositions[t.id],positionsIds:e.positionsIds,prefix:e.prefix})]},t.id)):(0,i.jsx)(Af,{imageSrc:bh.WeezeventBlankPerson,subtitle:t("this_may_be_bec_43194"),title:t("no_items_are_cu_47996")})})},S_=e=>{const t=Ei(),n=yh(),a=(0,d.useMemo)(()=>e.categories.map(e=>(0,i.jsx)("option",{value:e.id,children:e.name},e.id)),[e.categories]);return(0,i.jsxs)(i.Fragment,{children:[F(a)?n?(0,i.jsxs)(FI,{isSearchVisible:!0,label:t("souhait_n_1_47211",e.index+1),values:[e.positionsCategoriesIds?.[e.index]??-1],onChange:t=>{F(t)&&e.change(`${e.prefix}positionsCategoriesIds[${e.index}]`,t[0])},children:[(0,i.jsx)("option",{value:-1,children:t("choisir_une_mis_90627")}),a]}):(0,i.jsxs)(VI,{label:t("souhait_n_1_47211",e.index+1),shouldParseAsInt:!0,value:e.positionsCategoriesIds?.[e.index]??-1,onChange:t=>{e.change(`${e.prefix}positionsCategoriesIds[${e.index}]`,t)},children:[(0,i.jsx)("option",{value:-1,children:t("choisir_une_mis_90627")}),a]}):(0,i.jsx)(Af,{imageSrc:bh.WeezeventBlankPerson,subtitle:t("this_may_be_bec_43194"),title:t("no_items_are_cu_47996")}),e.index!==e.options.positionLimit-1&&(0,i.jsx)(Wg,{height:"4"})]})},j_=e=>{const{translate:t}=$g(),n=yh(),a=(0,d.useMemo)(()=>e.categories.map(t=>{const n=e.categoryIdToSelectablePositions[t.id];return(0,i.jsx)("optgroup",{label:t.name,children:n.map(e=>(0,i.jsx)("option",{value:e.id,children:e.name},e.id))},t.id)}),[e.categories]);return(0,i.jsxs)(i.Fragment,{children:[F(a)?n?(0,i.jsxs)(FI,{isSearchVisible:!0,label:t("souhait_n_1_47211",e.index+1),values:[e.positionsIds?.[e.index]??-1],onChange:t=>{F(t)&&e.change(`${e.prefix}positionsIds[${e.index}]`,t[0])},children:[(0,i.jsx)("option",{value:-1,children:t("choisir_une_mis_90627")}),a]}):(0,i.jsxs)(VI,{label:t("souhait_n_1_47211",e.index+1),shouldParseAsInt:!0,value:e.positionsIds?.[e.index]??-1,onChange:t=>{e.change(`${e.prefix}positionsIds[${e.index}]`,t)},children:[(0,i.jsx)("option",{value:-1,children:t("choisir_une_mis_90627")}),a]}):(0,i.jsx)(Af,{imageSrc:bh.WeezeventBlankPerson,subtitle:t("this_may_be_bec_43194"),title:t("no_items_are_cu_47996")}),e.index!==e.options.positionLimit-1&&(0,i.jsx)(Wg,{height:"4"})]})};function b_(e,t,n={}){return(0,ho.A)(t,e=>m(e.name)).flatMap(t=>(0,ho.A)(t.positions,e=>m(e.name)).map(a=>{const s=n.usePositionDisplay&&a.positionDisplay===st.Radio?`position-${a.id}`:void 0;return(0,i.jsx)("optgroup",{label:`${t.name} - ${au(a)}`,children:(0,ho.A)(a.slots,e=>[e.range.start.toMillis(),e.name]).map(t=>{const n=iu(e,t,au(a),{position:{includeNameAtEnd:!0},slot:{includeRange:!0}});return(0,i.jsx)("option",{"data-radio":s,value:t.id,children:n},t.id)})},a.id)}))}const v_=e=>{const{translate:t}=$g(),n=Ci(Yl),a=yh(),s=(0,d.useMemo)(()=>{const t=e.categories.map(t=>{const n=e.categoryIdToSelectablePositions[t.id];return{...t,positions:n.map(t=>{const n=e.positionIdToSelectableSlots[t.id];return{...t,slots:n}})}});return b_(n,t)},[e.categories]);return(0,i.jsxs)(i.Fragment,{children:[F(s)?a?(0,i.jsxs)(FI,{isSearchVisible:!0,label:t("souhait_n_1_47211",e.index+1),values:[e.positionsSlotsIds?.[e.index]??-1],onChange:t=>{F(t)&&e.change(`${e.prefix}positionsSlotsIds[${e.index}]`,t[0])},children:[(0,i.jsx)("option",{value:-1,children:t("choisir_une_mis_90627")}),s]}):(0,i.jsxs)(VI,{label:t("souhait_n_1_47211",e.index+1),shouldParseAsInt:!0,value:e.positionsSlotsIds?.[e.index]??-1,onChange:t=>{e.change(`${e.prefix}positionsSlotsIds[${e.index}]`,t)},children:[(0,i.jsx)("option",{value:-1,children:t("choisir_une_mis_90627")}),s]}):(0,i.jsx)(Af,{imageSrc:bh.WeezeventBlankPerson,subtitle:t("this_may_be_bec_43194"),title:t("no_items_are_cu_47996")}),e.index!==e.options.positionLimit-1&&(0,i.jsx)(Wg,{height:"4"})]})},A_=e=>{const{translate:t}=$g();return(0,i.jsx)(i.Fragment,{children:F(e.categories)?(0,Bl.A)(0,e.options.positionLimit).map(t=>e.options.positionDisplay===bt.Category?(0,i.jsx)(S_,{categories:e.categories,change:e.change,index:t,options:e.options,positionsCategoriesIds:e.positionsCategoriesIds,prefix:e.prefix},t):e.options.positionDisplay===bt.Position?(0,i.jsx)(j_,{categories:e.categories,categoryIdToSelectablePositions:e.categoryIdToSelectablePositions,change:e.change,index:t,options:e.options,positionsIds:e.positionsIds,prefix:e.prefix},t):e.options.positionDisplay===bt.Slot?(0,i.jsx)(v_,{categories:e.categories,categoryIdToSelectablePositions:e.categoryIdToSelectablePositions,change:e.change,index:t,options:e.options,positionIdToSelectableSlots:e.positionIdToSelectableSlots,positionsSlotsIds:e.positionsSlotsIds,prefix:e.prefix},t):null):(0,i.jsx)(Af,{imageSrc:bh.WeezeventBlankPerson,subtitle:t("this_may_be_bec_43194"),title:t("no_items_are_cu_47996")})})},C_=d.createContext({}),E_=e=>{const[t,n]=d.useState(!1),[a,s]=d.useState(null),[o,r]=d.useState(null),l=(0,rh.A)("tooltip-");return(0,i.jsx)(C_.Provider,{value:{isVisible:t,referenceElement:a,popperElement:o,tooltipId:l,setIsVisible:n,setReferenceElement:s,setPopperElement:r},children:e.children})};function T_(){return d.useContext(C_)}const R_=e=>{const{isVisible:t,popperElement:n,referenceElement:a,setPopperElement:s,tooltipId:o}=T_(),{styles:r,attributes:l,update:c}=(0,kp.E)(a,n,{placement:e.placement,modifiers:[{name:"offset",options:{offset:[0,4]}}]});d.useEffect(()=>{c?.()},[t,a]);const u=(0,i.jsx)($,{ref:s,align:"center",css:{background:"$grayCustom900",borderRadius:"$1",color:location.origin===sa.HEAVENT_PUBLIC_URL.origin?"contrast-color(var(--colors-grayCustom900))":"white",display:t?"flex":"none",px:"$3",py:"6px",zIndex:1e3,...r.popper},id:o,justify:"center",role:"tooltip",...l.popper,children:e.children});return e.renderOnPortal?(0,ya.createPortal)(u,document.body):u},M_=e=>{const{setIsVisible:t,setReferenceElement:n,tooltipId:a}=T_(),s=d.cloneElement(d.Children.only(e.children),{ref(e){n(e)},"aria-labelledby":a,"aria-describedby":a,onMouseEnter(){t(!0)},onMouseLeave(){t(!1)},onFocus(){t(!0)},onBlur(){t(!1)}});return(0,i.jsx)(Ni,{css:e.css,children:s})},D_=e=>{const{translate:t}=$g(),{rangeString:n,finalName:a,isRenamed:s}=function(e){const t=Ci(Yl),n=(0,d.useMemo)(()=>t.toDisplayString(e.range,{formats:{displayWeekday:!0}}),[e]),i=h(e.name);return{isRenamed:i,finalName:i?e.name:n,rangeString:n}}(e.slot),o=e.position.positionDisplay===st.Radio,r=o?uf:zf,l=(0,d.useMemo)(()=>e.position.slots.map(e=>e.id),[e.position.slots]),c=(0,d.useMemo)(()=>{if(e.options.willAutoAssign){const t=e.allSlots.filter(t=>e.positionsSlotsIds.includes(t.id)&&(!o||!l.includes(t.id)));return function(e,t){return t.some(({id:t,range:n})=>e.id!==t&&n.overlaps(e.range))}(e.slot,t)}return!1},[e.options.willAutoAssign,e.allSlots,e.positionsSlotsIds,o,l]);return(0,i.jsxs)(d.Fragment,{children:[0!==e.index&&(0,i.jsx)(Wg,{height:"3"}),c?(0,i.jsxs)(E_,{children:[(0,i.jsx)(M_,{children:(0,i.jsx)(Ni,{children:(0,i.jsx)(r,{disabled:!0,shouldPreventDefault:!1,state:e.positionsSlotsIds.includes(e.slot.id)?"checked":"unchecked",subtext:s?n:void 0,onClick:Ih.A,children:a})})}),(0,i.jsx)(R_,{placement:"top-start",children:t("ce_cr_neau_en_c_55775")})]}):(0,i.jsx)(r,{state:e.positionsSlotsIds.includes(e.slot.id)?"checked":"unchecked",subtext:s?n:void 0,onClick:t=>{const n="checked"===t;o?e.change(`${e.prefix}positionsSlotsIds`,[...e.positionsSlotsIds.filter(e=>!l.includes(e)),...n?[e.slot.id]:[]]):e.change(`${e.prefix}positionsSlotsIds`,B(e.positionsSlotsIds,e.slot.id,n))},children:a})]},e.slot.id)},O_=e=>{const{translate:t}=$g(),[n,a]=(0,d.useState)(!1),s=h(e.position.description)&&e.options.showPositionDescription;return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Wg,{height:"2"}),(0,i.jsxs)($,{align:"center",gap:"2",children:[(0,i.jsx)(Ni,{color:"gray900",fontWeight:"semiBold",children:e.position.name}),s&&(0,i.jsx)(Ni,{color:"gray700",onClick:()=>{a(!0)},children:(0,i.jsx)(la,{icon:"circle-info"})})]}),(0,i.jsx)(Wg,{height:"2"}),F(e.slots)?e.slots.map((t,n)=>(0,i.jsx)(D_,{allSlots:e.allSlots,change:e.change,index:n,options:e.options,position:e.position,positionsSlotsIds:e.positionsSlotsIds,prefix:e.prefix,slot:t},t.id)):(0,i.jsx)(Af,{imageSrc:bh.WeezeventBlankPerson,subtitle:t("this_may_be_bec_43194"),title:t("no_items_are_cu_47996")}),n&&(0,i.jsx)(If,{description:e.position.description,name:e.position.name,onClose:()=>{a(!1)}})]})},w_=e=>{const{translate:t}=$g(),[n,a]=(0,d.useState)(!1),s=h(e.category.description)&&e.options.showPositionCategoryDescription;return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)($,{align:"center",gap:"2",children:[(0,i.jsx)(Ni,{color:"gray500",css:{textTransform:"uppercase"},fontSize:"textXs",fontWeight:"semiBold",children:e.category.name}),s&&(0,i.jsx)(Ni,{color:"gray700",onClick:()=>{a(!0)},children:(0,i.jsx)(la,{icon:"circle-info"})})]}),F(e.positions)?e.positions.map(t=>(0,i.jsx)(O_,{allSlots:e.allSlots,change:e.change,options:e.options,position:t,positionsSlotsIds:e.positionsSlotsIds,prefix:e.prefix,slots:e.positionIdToSelectableSlots[t.id]},t.id)):(0,i.jsx)(Af,{imageSrc:bh.WeezeventBlankPerson,subtitle:t("this_may_be_bec_43194"),title:t("no_items_are_cu_47996")}),n&&(0,i.jsx)(If,{description:e.category.description,name:e.category.name,onClose:()=>{a(!1)}})]})},P_=e=>{const{translate:t}=$g();return(0,i.jsx)(i.Fragment,{children:F(e.categories)?e.categories.map((t,n)=>(0,i.jsxs)(d.Fragment,{children:[0!==n&&(0,i.jsx)(Wg,{height:"7"}),(0,i.jsx)(w_,{allSlots:e.allSlots,category:t,change:e.change,options:e.options,positionIdToSelectableSlots:e.positionIdToSelectableSlots,positions:e.categoryIdToSelectablePositions[t.id],positionsSlotsIds:e.positionsSlotsIds,prefix:e.prefix},t.id)]},t.id)):(0,i.jsx)(Af,{imageSrc:bh.WeezeventBlankPerson,subtitle:t("this_may_be_bec_43194"),title:t("no_items_are_cu_47996")})})},$_=(0,d.memo)(e=>{const{categoryIdToSelectablePositions:t,positionIdToSelectableSlots:n,selectableCategories:a,selectableSlots:s}=(0,d.useMemo)(()=>{const t=ql(e.slots.map(qa)),n=e.event.positionsCategories.flatMap(n=>n.positions.flatMap(n=>n.slots.filter(n=>function(e,t,n){return!n.hiddenPositionsSlotsIds.includes(e.id)&&(0===n.displayedPositionsSlotsIds.length||n.displayedPositionsSlotsIds.includes(e.id))&&(n.showFullPosition||!e.isFull)&&(n.slotDisplay===At.Hide||n.positionFilter===vt.None||t.some(t=>t.engulfs(e.range)))}(n,t,e.options)))),i=n.map(e=>e.id),a=(0,Qp.A)((0,Ql.A)(n,e=>e.positionId),e=>(0,ho.A)(e,e=>[e.range.start.toMillis(),e.nameOrRange])),s=e.event.positionsCategories.flatMap(t=>t.positions.filter(t=>function(e,t,n,i){return!i.hiddenPositionsIds.includes(e.id)&&(0===i.displayedPositionsIds.length||i.displayedPositionsIds.includes(e.id))&&(0===i.hiddenPositionsTagsIds.length||U((0,hd.A)(i.hiddenPositionsTagsIds,e.tagsIds)))&&(0===i.displayedPositionsTagsIds.length||F((0,hd.A)(i.displayedPositionsTagsIds,e.tagsIds)))&&ou(e,n)&&e.slots.some(e=>t.includes(e.id))}(t,i,e.userInfoFields,e.options))),o=s.map(e=>e.id),r=(0,Qp.A)((0,Ql.A)(s,e=>e.positionCategoryId),e=>(0,ho.A)(e,e=>m(e.name))),d=(0,ho.A)(e.event.positionsCategories.filter(t=>function(e,t,n){return!n.hiddenPositionsCategoriesIds.includes(e.id)&&(0===n.displayedPositionsCategoriesIds.length||n.displayedPositionsCategoriesIds.includes(e.id))&&e.positions.some(e=>t.includes(e.id))}(t,o,e.options)),e=>m(e.name));return{selectableCategories:d,selectableSlots:n,categoryIdToSelectablePositions:r,positionIdToSelectableSlots:a}},[e.event.positionsCategories,e.options,e.slots,e.userInfoFields]);if((0,d.useEffect)(()=>{const t=e.event.positionsCategories.flatMap(t=>t.positions.filter(t=>!ou(t,e.userInfoFields)).map(e=>e.id));if(F(t)){const n=e.event.positionsCategories.flatMap(e=>e.positions.filter(e=>t.includes(e.id)).flatMap(e=>e.slots.map(e=>e.id))),i=e.positionsIds.filter(e=>!t.includes(e)),a=e.positionsSlotsIds.filter(e=>!n.includes(e));i.length!==e.positionsIds.length&&e.change(`${e.prefix}positionsIds`,i),a.length!==e.positionsSlotsIds.length&&e.change(`${e.prefix}positionsSlotsIds`,a)}},[e.event.positionsCategories,e.positionsIds,e.positionsSlotsIds,e.userInfoFields]),e.options.positionRanking===Ge.Ranked)return(0,i.jsx)(A_,{categories:a,categoryIdToSelectablePositions:t,change:e.change,options:e.options,positionIdToSelectableSlots:n,positionsCategoriesIds:e.positionsCategoriesIds,positionsIds:e.positionsIds,positionsSlotsIds:e.positionsSlotsIds,prefix:e.prefix});switch(e.options.positionDisplay){case bt.Category:return(0,i.jsx)(I_,{categories:a,change:e.change,options:e.options,positionsCategoriesIds:e.positionsCategoriesIds,prefix:e.prefix});case bt.Position:return(0,i.jsx)(y_,{categories:a,categoryIdToSelectablePositions:t,change:e.change,options:e.options,positionsIds:e.positionsIds,prefix:e.prefix,slots:e.slots,userInfoFields:e.userInfoFields});case bt.Slot:return(0,i.jsx)(P_,{allSlots:s,categories:a,categoryIdToSelectablePositions:t,change:e.change,options:e.options,positionIdToSelectableSlots:n,positionsSlotsIds:e.positionsSlotsIds,prefix:e.prefix});case bt.None:return null;default:return ir(e.options.positionDisplay)}}),k_=e=>{const t=Ei(),{data:n,loader:a}=Ri("query FormMissions($eventId: EventId!) {\n event: eventPublic(id: $eventId) {\n positionsCategories {\n ...FormRegisterCategory\n }\n }\n}\n",{eventId:e.eventId},[La.FormRegisterCategoryFragment]);return a||(0,i.jsxs)(i.Fragment,{children:[h(e.form.positionSubtitle)?(0,i.jsx)(yp,{text:e.renderText(e.form.positionSubtitle,e.userInfoFields)}):(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Ni,{font:"gray800 textMd semiBold",children:t("s_lectionnez_vo_83925")}),(0,i.jsx)(Wg,{height:"1"}),(0,i.jsx)(Ni,{color:"gray500",children:t("s_lectionnez_le_37648")})]}),(0,i.jsx)(Wg,{height:"6"}),(0,i.jsx)(th,{}),(0,i.jsx)($_,{change:e.change,event:n.event,options:e.form,positionsCategoriesIds:e.positionsCategoriesIds,positionsIds:e.positionsIds,positionsSlotsIds:e.positionsSlotsIds,prefix:"formRegister.",slots:e.slots,userInfoFields:e.userInfoFields}),(0,i.jsx)(Wg,{height:"7"}),(0,i.jsx)($,{children:(0,i.jsx)(pa,{onClick:e.handleSubmit,children:e.isFinalStep?e.registerButtonText:t("suivant_62774")})})]})};function N_(e,t,n,i,a){const s=t.diff(e,"days").days;return(0,Xl.A)((0,Bl.A)(0,s+1).map(t=>e.plus({days:t}).set({hour:a})),e=>i===jt.AllDays||n.some(t=>t.contains(e)||t.start.startOf("day").equals(e.startOf("day"))||t.end.startOf("day").equals(e.startOf("day"))))}function L_(e,t,n,i,a){const s=t.diff(e,"days").days;return(0,Bl.A)(0,s+1).flatMap(t=>{const i=e.plus({days:t});return n.map(e=>{const[t,n]=e.startTime.split(":").map(e=>parseInt(e,10)),[a,s]=e.endTime.split(":").map(e=>parseInt(e,10)),o=i.set({hour:t,minute:n});let r=i.set({hour:a,minute:s});return(aa===jt.AllDays||i.some(t=>t.overlaps(e.interval)))}function z_(e,t){return h(e)?`${e} (${t.toFormat("HH:mm")})`:t.toFormat("HH:mm")}function F_(e,t,n){const i=e.filter(e=>!t.equals(Wa(e)));return i.length===e.length&&n?[...e,Ya(t)]:i.length===e.length||n?e:i}const U_=e=>{const t=(0,d.useMemo)(()=>sl(e.dayStartTime)?.[0]??0,[e.dayStartTime]),[n,a]=(0,d.useMemo)(()=>N_(e.startAt,e.endAt,e.ranges,e.daysDisplay,t),[e.startAt,e.endAt,e.ranges,e.daysDisplay,t]),s=(0,d.useMemo)(()=>(0,Jc.A)(n,e=>e.toMillis()),[n]),o=(0,d.useMemo)(()=>(0,eu.A)(n,e=>e.toMillis()),[n]),r=(0,d.useMemo)(()=>s?.isValid&&o?.isValid?Math.ceil(o.endOf("month").diff(s.startOf("month"),"months").months):0,[s,o]),l=(0,d.useCallback)((t,n)=>{const i=e.currentSlots.filter(e=>e.startDate.year!==t.year||e.startDate.month!==t.month).concat(n.map(e=>Ya($a.IX.fromDateTimes(e,e.plus({day:1})))));e.change(`${e.prefix}slots`,i)},[e.currentSlots,e.prefix,e.change]);return s?.isValid&&o?.isValid&&r>0?(0,i.jsx)($,{gap:"6",wrap:"wrap",children:(0,Bl.A)(0,r).map(n=>{const d=s.plus({month:n}).startOf("month"),c=0===n?s:d,u=n===r-1?o:d.endOf("month"),m=e.currentSlots.flatMap(e=>e.startDate.year===d.year&&e.startDate.month===d.month?[e.startDate.startOf("day").set({hour:t||0})]:[]);return(0,i.jsx)(t_,{disabledDates:a,firstDayOfMonth:d,max:u,min:c,startHour:t,values:m,onChange:e=>{l(d,e)}},n)})}):null},B_=e=>{const{intervals:t,minDate:n,maxDate:a,numberOfMonths:s}=(0,d.useMemo)(()=>{const t=e.intervalsGrouped.flatMap(([e,t])=>t.map(({interval:e})=>e)),n=(0,Jc.A)(t,e=>e.start.toMillis()).start.startOf("day"),i=(0,eu.A)(t,e=>e.end.toMillis()).end.endOf("day"),a=Math.ceil(i.endOf("month").diff(n.startOf("month"),"months").months);return{intervals:t,minDate:n,maxDate:i,numberOfMonths:a}},[e.intervalsGrouped]),o=t.flatMap(t=>e.isSelected(t)?[t.start.startOf("day")]:[]);return(0,i.jsx)($,{gap:"6",wrap:"wrap",children:(0,Bl.A)(0,s).map(r=>{const d=n.plus({month:r}).startOf("month"),l=0===r?n:d,c=r===s-1?a:d.endOf("month"),u=o.filter(e=>e.month===d.month&&e.year===d.year);return(0,i.jsx)(t_,{firstDayOfMonth:d,max:c,min:l,values:u,onChange:n=>{((n,i)=>{e.setSelectedBatch(t.flatMap(e=>{if(e.start.startOf("month").equals(n)){const t=i.some(t=>t.equals(e.start.startOf("day")));return[{interval:e,isSelected:t}]}return[]}))})(d,n)}},r)})})},G_=e=>{const[t,n]=(0,d.useState)(e.intervals.some(({interval:t})=>e.isSelected(t))?"checked":"unchecked"),a=(0,d.useCallback)(()=>{const i="checked"===t?"unchecked":"checked";n(i),"unchecked"===i&&e.intervals.forEach(({interval:t})=>{e.setSelected(t,!1)})},[e.intervals,t,n,e.setSelected]);return(0,i.jsxs)($,{css:{border:"1px solid $gray200",borderRadius:"$1",boxShadow:"$xs"},direction:"column",children:[(0,i.jsxs)($,{align:"center",css:{cursor:"pointer",padding:"$4 $5"},gap:"2",onClick:a,children:[(0,i.jsx)(Ni,{color:"gray900",fontSize:"textXs",children:(0,i.jsx)(la,{icon:"checked"===t?"chevron-down":"chevron-right"})}),(0,i.jsx)(Ni,{font:"gray800 textSm medium",children:e.day})]}),"checked"===t&&(0,i.jsx)($,{css:{borderTop:"1px solid $gray200",padding:"$4 $5"},direction:"column",gap:"3",children:e.intervals.map(({name:t,interval:n},a)=>(0,i.jsx)(zf,{state:e.isSelected(n)?"checked":"unchecked",onClick:t=>{e.setSelected(n,"checked"===t)},children:z_(t,n)},a))})]})},V_=e=>(0,i.jsx)($,{css:{border:"1px solid $gray200",borderRadius:"$1",boxShadow:"$xs",padding:"$4 $5"},direction:"column",gap:"3",children:e.intervalsGrouped.map(([t,[{name:n,interval:a}]],s)=>{const o=`${n} ${a.toFormat("HH:mm")}`.trim(),r=`${t} ${e.hideNameDates?"":`(${o})`}`.trim();return(0,i.jsx)(zf,{state:e.isSelected(a)?"checked":"unchecked",onClick:t=>{e.setSelected(a,"checked"===t)},children:r},s)})}),W_=({customSlotPeriod:e,daysDisplay:t,event:n,isSelected:a,setSelected:s,setSelectedBatch:o})=>{const r=Ci(pd),l=(0,d.useMemo)(()=>L_(e.startDate??n.startAt,e.endDate??n.endAt,e.customSlots,n.ranges,t),[e,n,t]),c=(0,d.useMemo)(()=>(0,ho.A)(Object.entries((0,Ql.A)(l,({interval:e})=>r.toLocaleString(e.start.startOf("day"),Za.DateOnly.WeekdayLongMonthLong))),([e,[{interval:t}]])=>t.start.startOf("day").toMillis()),[l]);return(0,i.jsxs)($,{direction:"column",gap:"2",width:1,children:[h(e.name)&&(0,i.jsx)(Ni,{font:"gray900 textSm semiBold",children:e.name}),1===e.customSlots.length?0===c.length?null:e.displayAsCalendar?(0,i.jsx)(B_,{intervalsGrouped:c,isSelected:a,setSelectedBatch:o}):(0,i.jsx)(V_,{hideNameDates:e.hideNameDates,intervalsGrouped:c,isSelected:a,setSelected:s}):c.map(([e,t],n)=>(0,i.jsx)(G_,{day:e,intervals:t,isSelected:a,setSelected:s},n))]})},q_=e=>{const t=(0,d.useMemo)(()=>e.customSlotsPeriods.flatMap(t=>L_(t.startDate??e.event.startAt,t.endDate??e.event.endAt,t.customSlots,e.event.ranges,e.daysDisplay)).map(({interval:e})=>e),[e.customSlotsPeriods,e.event,e.daysDisplay]),[n,a]=(0,d.useState)(Object.fromEntries(t.map(t=>{const n=e.currentSlots.some(e=>Wa(e).equals(t));return[t.toISO(),n]}))),s=(0,d.useCallback)(e=>n[e.toISO()],[n]),o=(0,d.useCallback)((t,n)=>{const i=t.toISO();a(e=>({...e,[i]:n})),e.change(`${e.prefix}slots`,F_(e.currentSlots,t,n))},[e.currentSlots,a]),r=(0,d.useCallback)(t=>{const n=t.reduce((e,{interval:t,isSelected:n})=>{const i=t.toISO();return a(e=>({...e,[i]:n})),F_(e,t,n)},e.currentSlots);e.change(`${e.prefix}slots`,n)},[e.currentSlots,a]),l=(0,d.useMemo)(()=>e.elements.flatMap(e=>e.elementType===Be.Field?(0,po.A)([e.customField,e.conditionCustomField]):e.hasCondition&&e.conditionCustomField?[e.conditionCustomField]:[]),[e.elements]);return(0,i.jsx)($,{direction:"column",gap:"6",children:e.customSlotsPeriods.map(t=>Ad(t,e.userInfoFields,l)?(0,i.jsx)(W_,{customSlotPeriod:t,daysDisplay:e.daysDisplay,event:e.event,isSelected:s,setSelected:o,setSelectedBatch:r},t.id):null)})},Y_=e=>{const{translate:t}=$g(),[n]=(0,d.useMemo)(()=>N_(e.startAt,e.endAt,e.ranges,e.daysDisplay,sl(e.dayStartTime)?.[0]??0),[e.startAt,e.endAt,e.ranges,e.daysDisplay,e.dayStartTime]),a=(0,d.useMemo)(()=>n.filter(t=>(e.blockedSlots??[]).some(e=>Ha(e,t))),[e.blockedSlots,n]),s=Ci(pd),[o,r]=(0,d.useState)(Object.fromEntries(n.map((t,n)=>{const i=$a.IX.fromDateTimes(t,t.plus({day:1}));return[`day${n}`,void 0!==e.currentSlots.find(e=>Wa(e).equals(i))]})));return(0,i.jsx)(i.Fragment,{children:n.map((n,l)=>{const c=a.includes(n);return(0,i.jsxs)(d.Fragment,{children:[0!==l&&(0,i.jsx)(Wg,{height:"3"}),(0,i.jsx)(zf,{disabled:c,state:o[`day${l}`]?"checked":"unchecked",onClick:t=>{r({...o,[`day${l}`]:"checked"===t}),e.change(`${e.prefix}slots`,F_(e.currentSlots,$a.IX.fromDateTimes(n,n.plus({day:1})),"checked"===t))},children:c?(0,i.jsxs)(E_,{children:[(0,i.jsx)(M_,{children:(0,i.jsx)(N,{children:s.toLocaleString(n,Za.DateOnly.WeekdayLongMonthLong)})}),(0,i.jsx)(R_,{placement:"right",children:t("vous_avez_d_j_92810")})]}):s.toLocaleString(n,Za.DateOnly.WeekdayLongMonthLong)})]},l)})})};var H_=n(3088);const Z_=e=>(0,i.jsxs)(Ip,{children:[(0,i.jsxs)($,{align:"center",gap:"4",children:[(0,i.jsx)(Zg,{css:{flex:"1",textTransform:"uppercase"},textStyle:"smallcapsheading",children:e.title}),e.buttons]}),e.children]}),K_=e=>{const t=Ei();return(0,i.jsx)(Z_,{buttons:(0,i.jsx)(i.Fragment,{children:(0,i.jsx)(Ni,{children:(0,i.jsx)(pa,{color:"white",leftIcon:"trash-can",size:"sm",onClick:e.remove})})}),title:t("disponibilit_n_50484",e.index+1),children:(0,i.jsxs)($,{direction:{"@initial":"column","@desktop":"row"},gap:"4",children:[(0,i.jsx)(Bf,{label:t("date_de_d_but_43380"),max:e.max,min:e.min,name:`${e.prefix}startDate`}),(0,i.jsx)(qf,{label:t("heure_de_d_but_27566"),name:`${e.prefix}startTime`}),(0,i.jsx)(Bf,{label:t("date_de_fin_86920"),max:e.max,min:e.min,name:`${e.prefix}endDate`}),(0,i.jsx)(qf,{label:t("heure_de_fin_95071"),name:`${e.prefix}endTime`})]})})},Q_=e=>{const t=Ei(),n=Ci(zd),a=(0,d.useMemo)(()=>e.max.endOf("day"),[e.max]);return(0,i.jsx)(H_.ED,{name:`${e.prefix}slots`,children:({fields:s})=>(0,i.jsxs)(i.Fragment,{children:[s.map((t,n)=>(0,i.jsxs)(d.Fragment,{children:[0!==n&&(0,i.jsx)(Wg,{height:"4"}),(0,i.jsx)(K_,{index:n,max:a,min:e.min,prefix:`${t}.`,remove:()=>{s.remove(n)}})]},n)),(0,i.jsx)(Wg,{height:"4"}),(0,i.jsx)(pa,{color:"invisible",leftIcon:"plus",onClick:()=>{s.push(n.volunteersRegistrationsSlotInputDefault(e.min))},children:t("ajouter_une_dis_96540")})]})})},X_=(0,d.memo)(e=>{switch(e.slotDisplay){case At.Display:return(0,i.jsx)(Q_,{max:e.event.endAt,min:e.event.startAt,prefix:e.prefix});case At.DisplayDays:return(0,i.jsx)(Y_,{blockedSlots:e.blockedSlots,change:e.change,currentSlots:e.currentSlots,dayStartTime:e.event.dayStartTime,daysDisplay:e.daysDisplay,endAt:e.event.endAt,prefix:e.prefix,ranges:e.event.ranges,startAt:e.event.startAt});case At.Calendar:return(0,i.jsx)(U_,{change:e.change,currentSlots:e.currentSlots,dayStartTime:e.event.dayStartTime,daysDisplay:e.daysDisplay,endAt:e.event.endAt,prefix:e.prefix,ranges:e.event.ranges,startAt:e.event.startAt});case At.Custom:return(0,i.jsx)(q_,{change:e.change,currentSlots:e.currentSlots,customSlotsPeriods:e.customSlotsPeriods,daysDisplay:e.daysDisplay,elements:e.elements,event:e.event,prefix:e.prefix,userInfoFields:e.userInfoFields});case At.Hide:return null;default:return ir(e.slotDisplay)}}),J_=e=>{const t=Ei(),{data:n,loader:a}=Ri("query FormSlots(\n $organizationId: OrganizationId!\n $eventId: EventId!\n $formId: FormId!\n $delegationId: DelegationId\n) {\n organization: organizationPublic(id: $organizationId) {\n form(id: $formId, eventId: $eventId) {\n customSlotsPeriods {\n ...FormRegisterCustomSlotPeriod\n }\n }\n }\n\n event: eventPublic(id: $eventId) {\n startAt\n endAt\n dayStartTime\n ranges(formId: $formId, delegationId: $delegationId)\n }\n}\n",{organizationId:e.organizationId,eventId:e.eventId,formId:e.formId,delegationId:e.delegationId},[La.FormRegisterCustomSlotPeriodFragment]);return a||(0,i.jsxs)(i.Fragment,{children:[h(e.form.slotSubtitle)?(0,i.jsx)(yp,{text:e.renderText(e.form.slotSubtitle,e.userInfoFields)}):(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Ni,{font:"gray800 textMd semiBold",children:t("s_lectionnez_vo_77037")}),(0,i.jsx)(Wg,{height:"1"}),(0,i.jsx)(Ni,{color:"gray500",children:t("vos_disponibili_52929")})]}),(0,i.jsx)(Wg,{height:"6"}),(0,i.jsx)(th,{}),(0,i.jsx)(X_,{change:e.change,currentSlots:e.currentSlots,customSlotsPeriods:n.organization.form.customSlotsPeriods,daysDisplay:e.form.daysDisplay,elements:e.form.elements,event:n.event,prefix:"formRegister.",slotDisplay:e.form.slotDisplay,userInfoFields:e.userInfoFields}),(0,i.jsx)(Wg,{height:"7"}),(0,i.jsx)($,{children:(0,i.jsx)(pa,{onClick:e.handleSubmit,children:e.isFinalStep?e.registerButtonText:t("suivant_62774")})})]})};function ex(e){navigator.clipboard.writeText(e)}function tx(){const[e,t]=(0,d.useState)(!1);return{isLoading:e,copy:(0,d.useCallback)(e=>{t(!0),ex(e),setTimeout(()=>t(!1),500)},[])}}var nx=n(1932);const ix=e=>{const t=Ei();return(0,i.jsxs)($,{direction:"column",gap:"2",children:[(0,i.jsx)(Ni,{css:{textTransform:"uppercase"},font:"gray800 textSm semiBold",children:t("invitation_n_1_64964",e.index+1)}),(0,i.jsx)(hh,{isEmail:!0,label:t("adresse_e_mail_60930"),value:e.email,onChange:e.onChange})]})},ax=({eventId:e,form:t,formId:n,formRegisterResult:a,organizationId:s})=>{const o=Ei(),{mutate:r,isLoading:l}=function(e={}){return Mi("mutation EmailFormInviteSend(\n $organizationId: OrganizationId!\n $eventId: EventId!\n $formId: FormId!\n $invitedById: UsersInfoId\n $teamCode: TeamCode!\n $emails: [UserEmail!]!\n) {\n emailFormInviteSend(\n organizationId: $organizationId\n eventId: $eventId\n formId: $formId\n invitedById: $invitedById\n teamCode: $teamCode\n emails: $emails\n )\n}\n",e)}(),{isLoading:c,copy:u}=tx(),m=Zc({organizationId:s,eventId:e,formId:n,teamCode:a?.teamCode}),[g,h]=(0,d.useState)([""]),[p,f]=(0,d.useState)(void 0),I=t.maxTeamMembers&&g.length>=t.maxTeamMembers-1,_=yh(),x=(0,d.useCallback)(async()=>{await r({organizationId:s,eventId:e,formId:n,invitedById:a?.userInfo?.id,teamCode:a?.teamCode??"",emails:g})&&f(!0)},[g,r,a]);return(0,i.jsxs)($,{css:{background:"$gray50",bd:!0,padding:"$6"},direction:{"@initial":"column","@desktop":"row"},gap:"3",children:[(0,i.jsx)(Ni,{color:"gray800",fontSize:"textXl",children:(0,i.jsx)(la,{icon:"circle-exclamation"})}),(0,i.jsxs)($,{direction:"column",width:1,children:[(0,i.jsx)(Ni,{font:"gray800 textMd semiBold",children:o("vous_souhaitez_73288")}),(0,i.jsx)(Wg,{height:"1"}),(0,i.jsx)(Ni,{color:"gray800",children:o("inviter_vos_qu_82288")}),(0,i.jsx)(Wg,{height:"5"}),(0,i.jsx)(Ni,{font:"gray800 textSm semiBold",children:o("FormLink")}),(0,i.jsx)(Wg,{height:"2"}),(0,i.jsxs)($,{direction:{"@initial":"column","@desktop":"row"},gap:"2",width:1,children:[(0,i.jsx)($,{align:"center",css:{background:"white",border:"1px solid $gray300",borderRadius:"$1",color:"$gray800",flex:_?"1":void 0,px:"$3"},height:40,children:(0,i.jsx)(Ni,{css:{ellipsis:!0},width:1,children:m})}),(0,i.jsx)($,{children:(0,i.jsx)(pa,{isLoading:c,leftIcon:"copy",onClick:()=>{u(m)},children:o("copier_le_lien_54974")})})]}),(0,i.jsx)(Wg,{height:"6"}),(0,i.jsx)(Ni,{font:"gray800 textSm semiBold",children:o("invitations_32350")}),(0,i.jsx)(Wg,{height:"2"}),(0,i.jsx)($,{css:{background:"white",bd:!0,padding:"$6"},direction:"column",gap:"4",children:p?(0,i.jsxs)($,{align:"center",direction:"column",gap:"2",children:[(0,i.jsx)(rf,{color:"success",css:{borderRadius:"50%"},icon:"check"}),(0,i.jsx)(N,{css:{textAlign:"center",color:"$gray800",fontSize:"$textMd",fontWeight:"$semiBold","@tablet":{color:"$gray900",fontSize:"$textMd",fontWeight:"$medium"}},children:o("les_invitations_24485")})]}):(0,i.jsxs)(i.Fragment,{children:[g.map((e,t)=>(0,i.jsx)(ix,{email:e,index:t,onChange:e=>{h((0,nx.jM)(n=>{n[t]=e}))}},t)),!I&&(0,i.jsx)($,{children:(0,i.jsxs)(pa,{color:"primary",onClick:()=>{h(g.concat([""]))},children:["+ ",o("ajouter_une_inv_21322")]})})]})}),(0,i.jsx)(Wg,{height:"3"}),!p&&(0,i.jsx)($,{children:(0,i.jsx)(pa,{disabled:!F(g)||1===g.length&&""===g[0],isLoading:l,onClick:x,children:o("envoyer_les_inv_50560")})})]})]})},sx=e=>{const t=Ei();return(0,i.jsxs)(i.Fragment,{children:[h(e.form.successMessage)?(0,i.jsx)(yp,{text:e.renderText(e.form.successMessage,e.userInfoFields)}):(0,i.jsx)(Ni,{height:250,width:1,children:(0,i.jsx)(Af,{imageSrc:bh.Done,title:t("merci_70020")})}),e.form.areTeamsAllowed&&(0,i.jsx)(ax,{eventId:e.eventId,form:e.form,formId:e.formId,formRegisterResult:e.formRegisterResult,organizationId:e.organizationId}),h(e.form.ticketUrl)&&(0,i.jsx)("div",{style:{height:"600px"},children:(0,i.jsx)("a",{className:"weezevent-widget-integration","data-height":"600","data-id":"1707621","data-nopb":"0","data-noscroll":"0","data-resize":"1","data-src":e.form.ticketUrl,"data-type":"neo","data-width":"650","data-width_auto":"1",href:`https://www.${sa.WEEZEVENT_DOMAIN}?c=sys_widget`,rel:"noreferrer",target:"_blank",title:"Logiciel billetterie en ligne",children:"Billetterie Weezevent"})})]})};function ox(e,t){return{flex:t?"1 1 0":e?"0 0 0":"1",minWidth:t?`${t}px`:e?`${e}px`:void 0}}const rx=d.forwardRef((e,t)=>(0,i.jsx)($,{ref:t,align:"center",className:"table-cell",css:{...ox(e.width,e.minWidth),color:"$gray800",overflow:"hidden",px:"$3",...e.css},height:1,role:"gridcell",onClick:t=>{e.onClick&&e.onClick(t)},...(0,D.A)(e,["direction","align","justify","wrap","gap"]),children:e.children}));rx.displayName="Cell";const dx=e=>(0,i.jsx)($,{align:"center",className:"table-header-cell",css:{...ox(e.width,e.minWidth),color:"$gray500",overflow:"hidden",px:"$3",...e.css},height:1,role:"columnheader",tabIndex:0,onClick:()=>{e.onClick?.()},...(0,D.A)(e,["aria-label","direction","align","justify","wrap","gap"]),children:e.children}),lx=e=>(0,i.jsx)($,{align:"center",className:"table-header-row",css:{background:"$gray50",border:"1px solid $gray200",fontSize:"$textXs",fontWeight:"$medium",height:"44px",width:"100%",...e.css},role:"row",children:e.children}),cx=d.createContext({}),ux=e=>{const[t,n]=d.useState(null);return(0,i.jsx)(cx.Provider,{value:{clickedRowIndex:t,setClickedRowIndex:n},children:e.children})},mx=e=>{const{setClickedRowIndex:t}=d.useContext(cx);return(0,i.jsx)($,{align:"center",className:"table-row",css:{background:"white",borderBottom:"1px solid $gray200",borderLeft:"1px solid $gray200",borderRight:"1px solid $gray200",height:"64px",width:"100%",...e.css,"&:hover .dot-dot-dot":{display:"block"},"&:hover .h-controls":{display:"flex"}},role:"row",onClick:()=>{e.onClick?.()},onMouseLeave:n=>{t?.(null),e.onMouseLeave?.(n)},children:e.children})},gx=({children:e,css:t,hideBorder:n,...a})=>(0,i.jsx)(ux,{children:(0,i.jsx)($,{className:!0===n?"table-no-border":"table",css:{width:"100%","&.table > div:first-child":{borderTopLeftRadius:"$1",borderTopRightRadius:"$1"},"&.table > div:last-child":{borderBottomLeftRadius:"$1",borderBottomRightRadius:"$1"},"&.table-no-border .table-header-row":{borderLeft:"none",borderRight:"none",borderTop:"none"},"&.table-no-border .table-row":{borderLeft:"none",borderRight:"none"},"&.table-no-border .table-row:last-child":{borderBottom:"none"},...t},direction:"column",...a,children:e})}),hx=e=>{const t=Ei(),n=Ci(pd),a=Ci(Yl),s=(0,d.useMemo)(()=>e.team.positionsCategories.map(e=>({name:e.name})).concat(e.team.positions.map(e=>({name:e.name}))).concat(e.team.positionsSlots.map(e=>({name:e.nameOrRange}))),[e.team]),o=(0,d.useCallback)(t=>{switch(e.slotDisplay){case At.Calendar:case At.DisplayDays:return n.toLocaleString(t.start,Za.DateOnly.WeekdayLongMonthLong);case At.Custom:case At.Display:return a.toDisplayString(t,{formats:{displayWeekday:!0}});case At.Hide:return null;default:return ir(e.slotDisplay)}},[e.slotDisplay]);return(0,i.jsxs)(i.Fragment,{children:[F(e.team.slots)&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)($,{css:{background:"white",border:"1px solid $gray200",borderBottom:"none",borderTopLeftRadius:"$2",borderTopRightRadius:"$2",padding:"$5 $6"},children:(0,i.jsx)(Ni,{font:"gray900 textMd medium",children:t("disponibilit_s_49923")})}),(0,i.jsxs)(gx,{children:[(0,i.jsx)(lx,{css:{borderRadius:"0 !important"},children:(0,i.jsx)(dx,{children:t("Date")})}),e.team.slots.map((e,t)=>(0,i.jsx)(mx,{children:(0,i.jsx)(rx,{css:{textTransform:"capitalize"},children:o(e.range)})},t))]}),(0,i.jsx)(Wg,{height:"6"})]}),F(s)&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)($,{css:{background:"white",border:"1px solid $gray200",borderBottom:"none",borderTopLeftRadius:"$2",borderTopRightRadius:"$2",padding:"$5 $6"},children:(0,i.jsx)(Ni,{font:"gray900 textMd medium",children:t("missions_souhai_23225")})}),(0,i.jsxs)(gx,{children:[(0,i.jsx)(lx,{css:{borderRadius:"0 !important"},children:(0,i.jsx)(dx,{children:t("Position")})}),s.map((e,t)=>(0,i.jsx)(mx,{children:(0,i.jsx)(rx,{children:e.name})},t))]}),(0,i.jsx)(Wg,{height:"6"})]}),(0,i.jsx)(YI,{label:(0,i.jsx)(Df,{children:t("commentaire_r_12290")}),name:`formRegister.userInfo.fields.form${e.formId}`})]})},px=e=>{const{data:t,loader:n}=Ri("query FormTeamSummary($eventId: EventId!, $teamCode: TeamCode!) {\n event: eventPublic(id: $eventId) {\n team(teamCode: $teamCode) {\n positionsCategories {\n name\n }\n\n positions {\n name\n }\n\n positionsSlots {\n nameOrRange\n }\n\n slots {\n range\n }\n }\n }\n}\n",{eventId:e.eventId,teamCode:e.teamCode},[]);return n||(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(hx,{formId:e.formId,slotDisplay:e.slotDisplay,team:t.event.team}),(0,i.jsx)(Wg,{height:"7"}),(0,i.jsx)($,{children:(0,i.jsx)(pa,{onClick:e.handleSummit,children:e.registerButtonText})})]})},fx=d.forwardRef((e,t)=>{const n=yh(),a=Math.min(Math.round(360*window.screen.width/1170),360);return(0,i.jsx)(Ni,{ref:t,css:{background:"$grayCustom50",overflowY:"auto"},height:1,width:1,children:(0,i.jsxs)($,{align:"center",direction:"column",width:1,children:[n&&(0,i.jsx)(Wg,{height:"10"}),e.bannerUrl&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Ni,{css:{background:`url(${e.bannerUrl}) no-repeat`,backgroundSize:"cover",height:`${a}px`,width:"100%","@desktop":{borderRadius:"$1",boxShadow:"$xs",width:"$container"}}}),(0,i.jsx)(Wg,{height:{"@initial":"6","@tablet":"7","@desktop":"9"}})]}),e.children]})})});fx.displayName="FormContainer";const Ix=e=>{const t=Ei();return(0,i.jsxs)(fx,{bannerUrl:e.bannerUrl,children:[(0,i.jsx)(m_,{canSelect:!1,isCompleted:!1,isOpen:!0,number:1,title:h(e.closedTitle)?e.closedTitle:t("formulaire_cl_t_92617"),onSelect:Ih.A,children:h(e.closedMessage)?(0,i.jsx)(yp,{text:e.closedMessage}):(0,i.jsx)(Ni,{height:250,width:1,children:(0,i.jsx)(Af,{imageSrc:bh.Done,title:t("ce_formulaire_a_73045")})})}),(0,i.jsx)(Wg,{height:"9"})]})},_x=e=>{const{translate:t,params:{organizationId:n,eventId:a,formId:s}}=$g(),o=Ci(Au),r=Ci(Wo),{user:l}=io(),{mutate:c}=$s(),u=(0,d.useCallback)(async t=>{if(!e.isPreview){const{userCreate:n}=await ys(js,{token:t});await e.onSuccess(n.email,t)}},[e.onSuccess]),[m,g]=(0,d.useState)(null),[p,f]=(0,d.useState)(!1),[I,_]=(0,d.useState)(0),[x,y]=(0,d.useState)(!1),[S,j]=(0,d.useState)(Date.now()),b=(0,d.useMemo)(()=>{const e=new URL(location.href).searchParams,t=h(l?.email)?l.email:h(e.get("email"))?e.get("email"):"";return{email:t,emailConfirm:t,code:""}},[l]),v=()=>{location.reload()};return(0,i.jsx)(ah,{align:"center",direction:"column",hideDefaultErrors:!0,initialValues:b,render:({handleSubmit:n,submitting:a,values:s})=>(0,i.jsxs)(m_,{canSelect:!1,isCompleted:!e.isOpen,isOpen:e.isOpen,number:"1",title:h(e.emailTitle)?e.emailTitle:t("Email"),onSelect:Ih.A,children:[(0,i.jsx)(th,{}),h(e.description)&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(yp,{text:e.description}),(0,i.jsx)(Wg,{height:"4"})]}),(0,i.jsx)(ph,{autoComplete:"email",isEmail:!0,label:t("Email"),name:"email",state:p||x?"disabled":void 0}),(0,i.jsx)(Wg,{height:"4"}),(0,i.jsx)(ph,{autoComplete:"email",isEmail:!0,label:t("confirmation_de_51185"),name:"emailConfirm",state:p||x?"disabled":void 0}),p&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Wg,{height:"7"}),(0,i.jsxs)(Kg,{alertStyle:"gray",children:[(0,i.jsx)(Qg,{children:t("un_code_6_chi_33026",s.email)}),(0,i.jsx)(Xg,{children:(0,i.jsx)(Ni,{css:{fontStyle:"italic"},children:t("attention_ne_16312")})})]}),(0,i.jsx)(Wg,{height:"4"}),(0,i.jsx)(ph,{autoComplete:"one-time-code",inputMode:"numeric",label:t("code_20843"),name:"code",pattern:"\\d*",state:x?"disabled":void 0})]}),(0,i.jsx)(Wg,{height:{"@initial":"6","@tablet":"7"}}),(0,i.jsx)($,{children:x?(0,i.jsx)(pa,{onClick:v,children:t("recommencer_14712")}):(0,i.jsx)(pa,{isLoading:a,onClick:n,children:t("suivant_62774")})})]}),validate:e=>p?o.validateForForm(r.emailCodeSchema())(e):o.validateForForm(r.emailConfirmSchema())(e),width:1,onSubmit:async i=>{if(!e.isPreview){if(h(i.code)){const{user:e,callbacks:n}=m;return _s({code:i.code,user:e,callbacks:n}).then(u,e=>{if("RETRY"===e.type)return _(I+1),{code:t("le_code_n_est_p_95065",3-(I+1))};{let n;return xs(e.message,i.email,S),y(!0),n=$a.dw.fromMillis(Date.now()-S).as("minutes")>3?t("le_code_a_expir_45975"):t("le_code_n_est_p_12317"),{FORM_ERROR:n}}})}if(l?.email===i.email)await u(await gs());else{await ps().catch(()=>!0);const{userExists:t}=await(o={email:i.email},ys("query UserExists($email: UserEmail!) {\n userExists(email: $email)\n}\n",{variables:o,token:void 0,fragments:[]}));if(t){await c({loginCodeEmail:{email:i.email,organizationId:n,eventId:a,formId:s,source:Qe.VolunteerRegister}}),j(Date.now());const e=await Is(i.email,Ih.A,Ih.A);g(e),f(!0)}else await e.onSuccess(i.email)}}var o}})};function xx(e){const t=new URL(location.href);t.searchParams.set("lang",e.toLowerCase()),location.href=t.toString()}const yx=e=>{const t=Ei();return(0,i.jsxs)($,{align:{"@initial":"start","@tablet":"center"},css:{background:"white",bd:"white 1 sm",padding:"$4 $6",width:"100%","@tablet":{padding:"$6",width:"$containerTablet"},"@desktop":{width:"$container"}},direction:{"@initial":"column","@tablet":"row"},gap:"4",children:[(0,i.jsx)(Ni,{color:"gray800",fontSize:"textMd",fontWeight:"semiBold",children:t("langue_du_formu_66193")}),(0,i.jsx)(Ni,{css:{"@mobile":{width:"100%"},"@tablet":{flex:"1"}},children:(0,i.jsx)(VI,{value:e.language,onChange:xx,children:e.languages.map(e=>(0,i.jsx)("option",{value:e,children:t(e)},e))})})]})},Sx=e=>{const t=Ei();return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Wg,{height:"4"}),(0,i.jsx)(m_,{canSelect:!1,isCompleted:!1,isOpen:!0,number:2,title:h(e.noAccessTitle)?e.noAccessTitle:t("acc_s_limit_69177"),onSelect:Ih.A,children:h(e.noAccessMessage)?(0,i.jsx)(yp,{text:e.noAccessMessage}):(0,i.jsx)(Ni,{font:"gray800 textMd semiBold",textAlign:"center",width:1,children:t("vous_n_avez_pas_58193")})})]})},jx=e=>{const t=Ei(),[n,a]=(0,d.useState)(e.userInfoId),[s,o]=(0,d.useState)(!e.userInfoId);return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Ni,{font:"gray800 textSm semiBold",children:t("avec_quel_profi_89563")}),(0,i.jsx)(Wg,{height:"4"}),(0,i.jsxs)($,{direction:"column",gap:"3",width:1,children:[e.usersInfos.map(e=>(0,i.jsx)(uf,{state:n===e.id?"checked":"unchecked",onClick:t=>{"checked"===t&&(a(e.id),o(!1))},children:e.nameOrEmail},e.id)),(0,i.jsx)(uf,{state:s?"checked":"unchecked",onClick:e=>{"checked"===e&&(a(null),o(!0))},children:t("s_inscrire_avec_00521")})]}),(0,i.jsx)(Wg,{height:{"@initial":"6","@tablet":"7"}}),(0,i.jsx)($,{children:(0,i.jsx)(pa,{onClick:()=>{e.onSuccess(n,s)},children:t("suivant_62774")})})]})},bx=e=>{const{translate:t,params:{organizationId:n,eventId:a,delegationId:s,formId:o}}=$g(),{mutate:r}=Rs(),l=Ci(Au),c=Ci(Ud),u=Ci(bu),m=function(e,{isOrganization:t}){const{user:n}=io();return(0,d.useMemo)(()=>{const i=new URL(location.href),a=Dh(n?.language,i.searchParams);return t||e.includes(a)?a:(xx(e[0]),e[0])},[t,e,n])}(e.languages,{isOrganization:"number"!=typeof a}),g=(0,d.useRef)(null),p=(0,d.useCallback)(()=>{g.current&&(g.current.scrollTop=0)},[g]),f=(0,d.useMemo)(()=>e.form.elements.filter(e=>e.elementType===Be.Field),[e.form]),I=(0,d.useMemo)(()=>f.flatMap(e=>(0,po.A)([e.customField,e.conditionCustomField])),[f]),[_,x]=(0,d.useState)(void 0),[y,S]=(0,d.useState)(void 0),[j,b]=(0,d.useState)(0===e.form.segments.length),[v,A]=(0,d.useState)({formRegister:c.formRegisterInputDefault(Ve.Form,null,I,{countryCode:e.countryCode,eventStartDate:e.event?.startAt,forOther:!1,sendNotificationEmail:!0,slotDisplay:e.form.slotDisplay,team:e.team})}),[C,E]=(0,d.useState)(0),[T,R]=(0,d.useState)(null),[M,D]=(0,d.useState)([]),[O,w]=(0,d.useState)(null),P=(0,d.useCallback)((t,n)=>u.renderText(t,{userInfo:T?{...T,fields:{...T.fields,...n}}:{id:-1,localId:-1,email:_,fields:n,registrationDate:$a.c9.now()},event:e.event,organization:e.organization,customFields:I}),[e.event,_,T,I,e.organization]),$=(0,d.useMemo)(()=>h(e.form.description)?u.renderText(e.form.description,{event:e.event,organization:e.organization}):"",[e.event,e.form.description,e.organization]),k=(0,d.useCallback)(async(t,i)=>{if(!e.isPreview){if(i){const{user:t}=await function(e,t){return ys("query UsersInfos($organizationId: OrganizationId!, $eventId: EventId, $formId: FormId!) {\n user {\n userInfo(organizationId: $organizationId) {\n ...UserInfoForm\n }\n\n usersInfos(organizationId: $organizationId) {\n ...UserInfoForm\n }\n }\n}\n",{variables:e,token:t||void 0,fragments:[La.UserInfoFormFragment]})}({organizationId:n,eventId:a,formId:o},i);e.form.allowMultiProfiles?(R(t.userInfo),D(t.usersInfos)):(R(t.userInfo),b(t.userInfo.canAccess),A({formRegister:c.formRegisterInputDefault(Ve.Form,t.userInfo,I,{countryCode:e.countryCode,eventStartDate:e.event?.startAt,forOther:!1,sendNotificationEmail:!0,slotDisplay:e.form.slotDisplay,team:e.team})}))}x(t),S(i),setTimeout(()=>{E(C+1),p()},100)}},[C,I,e.form,e.countryCode,e.team,p]),N=(0,d.useCallback)((t,n)=>{if(!e.isPreview){const i=M.find(e=>e.id===t);R(i),b(i?.canAccess??0===e.form.segments.length),A({formRegister:c.formRegisterInputDefault(Ve.Form,i,I,{countryCode:e.countryCode,eventStartDate:e.event?.startAt,forOther:n,sendNotificationEmail:!0,slotDisplay:e.form.slotDisplay,team:e.team})}),setTimeout(()=>{E(C+1),p()},100)}},[C,I,e.form,e.countryCode,e.team,p]),L=(0,d.useCallback)(async t=>{if(!e.isPreview){if(C===W-2){const i=await r({organizationId:n,eventId:a,delegationId:s,formId:o,email:_,formRegister:{...t.formRegister,teamCode:e.team?.teamCode}},y);w(i.formRegister)}E(C+1),p()}},[_,y,C,E,p]),z=(0,d.useMemo)(()=>e.form.areTeamsAllowed&&h(e.team?.teamCode),[e.form,e.team]),F=(0,d.useMemo)(()=>a&&z&&!e.form.teamMemberFillFullForm,[a,z,e.form]),U=(0,d.useMemo)(()=>e.form.allowMultiProfiles&&M.length>0,[e.form,M]),B=(0,d.useMemo)(()=>e.form.slotDisplay!==At.Hide&&a&&!F,[e.form,a,F]),G=(0,d.useMemo)(()=>e.form.positionDisplay!==bt.None&&a&&!F,[e.form,a,F]),V=(0,d.useMemo)(()=>e.form.accreditationDisplay!==St.None&&a&&!F,[e.form,a,F]),W=(0,d.useMemo)(()=>3+(U?1:0)+(B?1:0)+(G?1:0)+(V?1:0)+(F?1:0),[U,B,G,V,F]),q=U?2:1,Y=B?q+1:q,H=G?Y+1:Y,Z=V?H+1:H,K=q+1,Q=(0,d.useMemo)(()=>c.formRegisterInformationsSchema(f),[f,c]),X=(0,d.useMemo)(()=>c.formRegisterSlotsSchema(e.form.slotDisplay,e.form.minNumberOfSlots,e.event?.startAt??$a.c9.now(),e.event?.endAt??$a.c9.now()),[c,e.event,e.form]),J=(0,d.useMemo)(()=>c.formRegisterPositionsSchema(e.form.positionRanking,e.form.positionDisplay),[c,e.form]),ee=(0,d.useCallback)(t=>C===q?l.validateForForm(Q)(t):B&&C===Y?l.validateForForm(X)(t):G&&C===H?l.validateForForm(J)(t):V&&C===Z?l.validateForForm(c.formRegisterAccreditationsSchema(e.form.accreditationDisplay,t.formRegister.accreditationsSlotsIds,e.form.accreditationsFormCustomFields,s))(t):{},[Z,s,c,Q,q,J,H,e.form,V,G,B,X,Y,C,l]),te=(0,d.useMemo)(()=>h(e.form.registerButtonText)?e.form.registerButtonText:t("s_inscrire_20304"),[e.form]),ne=(0,d.useMemo)(()=>!e.hideFormLanguages&&e.languages.length>1,[e.hideFormLanguages,e.languages]),ie=e.isPreview?"opened"===e.formPreviewState:j,ae=e.isPreview?"blocked"===e.formPreviewState:!(j||0===C||1===C&&U);return(0,i.jsxs)(fx,{ref:g,bannerUrl:e.form.design?.banner?.url,children:[ne&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(yx,{language:m,languages:e.languages}),(0,i.jsx)(Wg,{height:"4"})]}),(0,i.jsx)(_x,{description:$,emailTitle:e.form.emailTitle,isOpen:e.isPreview||0===C,isPreview:e.isPreview,onSuccess:k}),U&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Wg,{height:"4"}),(0,i.jsx)(m_,{canSelect:C>=1&&C!==W-1,isCompleted:C>=1,isOpen:e.isPreview||1===C,number:"2",title:t("choix_du_profil_50142"),onSelect:()=>E(1),children:(0,i.jsx)(jx,{userInfoId:T?.id,usersInfos:M,onSuccess:N})})]}),ie&&(0,i.jsx)(ah,{align:"center",customErrorRef:g,direction:"column",initialValues:v,render:({form:r,handleSubmit:d,values:l})=>(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Wg,{height:"4"}),(0,i.jsx)(m_,{canSelect:C>=q&&C!==W-1,isCompleted:C>=q+1,isOpen:e.isPreview||C===q,number:q+1,title:h(e.form.informationTitle)?e.form.informationTitle:t("informations_pe_37892"),onSelect:()=>E(q),children:(0,i.jsx)(p_,{change:r.change,countryCode:e.countryCode,elements:e.form.elements,handleSubmit:d,isFinalStep:!(B||G||V||F),registerButtonText:te,renderText:P,values:l.formRegister.userInfo.fields})}),(0,i.jsx)(Wg,{height:"4"}),B&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(m_,{canSelect:C>=Y&&C!==W-1,isCompleted:C>=Y+1,isOpen:e.isPreview||C===Y,number:Y+1,title:h(e.form.slotTitle)?e.form.slotTitle:t("disponibilit_s_49923"),onSelect:()=>E(Y),children:(0,i.jsx)(J_,{change:r.change,currentSlots:l.formRegister.slots,delegationId:s,eventId:a,form:e.form,formId:o,handleSubmit:d,isFinalStep:!G&&!V,organizationId:n,registerButtonText:te,renderText:P,userInfoFields:l.formRegister.userInfo.fields})}),(0,i.jsx)(Wg,{height:"4"})]}),G&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(m_,{canSelect:C>=H&&C!==W-1,isCompleted:C>=H+1,isOpen:e.isPreview||C===H,number:H+1,title:h(e.form.positionTitle)?e.form.positionTitle:t("missions_souhai_23225"),onSelect:()=>E(H),children:(0,i.jsx)(k_,{change:r.change,eventId:a,form:e.form,handleSubmit:d,isFinalStep:!V,positionsCategoriesIds:l.formRegister.positionsCategoriesIds,positionsIds:l.formRegister.positionsIds,positionsSlotsIds:l.formRegister.positionsSlotsIds,registerButtonText:te,renderText:P,slots:l.formRegister.slots,userInfoFields:l.formRegister.userInfo.fields})}),(0,i.jsx)(Wg,{height:"4"})]}),V&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(m_,{canSelect:C>=Z&&C!==W-1,isCompleted:C>=Z+1,isOpen:e.isPreview||C===Z,number:Z+1,title:h(e.form.accreditationTitle)?e.form.accreditationTitle:t("accr_ditations_74375"),onSelect:()=>E(Z),children:(0,i.jsx)(u_,{accreditationsSlotsIds:l.formRegister.accreditationsSlotsIds,change:r.change,eventId:a,form:e.form,handleSubmit:d,registerButtonText:te,renderText:P,slots:l.formRegister.slots,userInfoFields:l.formRegister.userInfo.fields})}),(0,i.jsx)(Wg,{height:"4"})]}),F&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(m_,{canSelect:C>=K&&C!==W-1,isCompleted:C>=W-1,isOpen:e.isPreview||C===K,number:K+1,title:t("r_capitulatif_d_48468"),onSelect:()=>E(K),children:(0,i.jsx)(px,{eventId:a,formId:o,handleSummit:d,registerButtonText:te,slotDisplay:e.form.slotDisplay,teamCode:e.team.teamCode})}),(0,i.jsx)(Wg,{height:"4"})]}),(0,i.jsx)(m_,{canSelect:!1,isCompleted:!1,isOpen:e.isPreview||C===W-1,number:W,title:h(e.form.successTitle)?e.form.successTitle:t("confirmation_95122"),onSelect:()=>E(W-1),children:(0,i.jsx)(sx,{eventId:a,form:e.form,formId:o,formRegisterResult:O,organizationId:n,renderText:P,userInfoFields:l.formRegister.userInfo.fields})}),(0,i.jsx)(Wg,{height:"9"})]}),validate:ee,width:1,onSubmit:L}),ae&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Sx,{noAccessMessage:e.form.noAccessMessage,noAccessTitle:e.form.noAccessTitle}),(0,i.jsx)(Wg,{height:"9"})]})]})},vx=()=>{const{organizationId:e,eventId:t,formId:n,delegationId:a,teamCode:s}=Di(),{data:o,loader:r}=Ri("query FormInfos(\n $organizationId: OrganizationId!\n $eventId: EventId\n $formId: FormId!\n $delegationId: DelegationId\n $teamCode: TeamCode\n) {\n organization: organizationPublic(id: $organizationId) {\n id\n name\n country\n dateFormat\n datetimeFormat\n timeFormat\n\n event(id: $eventId) {\n id\n name\n country\n languages\n startAt\n endAt\n fields\n\n team(teamCode: $teamCode) {\n teamCode\n accreditationsSlotsIds\n positionsCategoriesIds\n positionsIds\n positionsSlotsIds\n\n slots {\n startDate\n startTime\n endDate\n endTime\n }\n }\n }\n\n delegation: delegationMaybe(id: $delegationId) {\n state\n }\n\n form(id: $formId, eventId: $eventId) {\n allowMultiProfiles\n description\n successTitle\n successMessage\n isOpen\n closedTitle\n closedMessage\n noAccessTitle\n noAccessMessage\n positionTitle\n positionSubtitle\n accreditationTitle\n accreditationSubtitle\n areTeamsAllowed\n maxTeamMembers\n teamMemberFillFullForm\n emailTitle\n informationTitle\n registerButtonText\n ticketUrl\n\n ...FormSlotsOptions\n ...FormMissionsOptions\n ...FormAccreditationsOptions\n\n design {\n ...DesignColors\n\n banner {\n url\n }\n }\n\n elements {\n ...FormElementDisplay\n }\n\n segments {\n segmentId\n }\n }\n }\n}\n",{organizationId:e,eventId:t,formId:n,delegationId:a,teamCode:s},[La.FormSlotsOptionsFragment,La.FormMissionsOptionsFragment,La.FormAccreditationsOptionsFragment,La.DesignColorsFragment,La.FormElementDisplayFragment]),{isPreview:l,formPreviewState:c,hideFormLanguages:u}=(0,d.useMemo)(()=>{const e=new URLSearchParams(location.search);return{isPreview:"true"===e.get("preview"),formPreviewState:e.get("state"),hideFormLanguages:"true"===e.get("hideFormLanguages")}},[]),m=(0,d.useMemo)(()=>{if(l)return"closed"===c;{const e=o.organization?.form.isOpen??!0,t=!o.organization?.delegation||o.organization?.delegation.state===Se.Ongoing;return!e||!t}},[o.organization,c,l]);return(0,d.useEffect)(()=>{o.organization&&zg(o.organization.form.design?.colors)},[o.organization]),r||(m?(0,i.jsx)(Ix,{bannerUrl:o.organization.form.design?.banner?.url,closedMessage:o.organization.form.closedMessage,closedTitle:o.organization.form.closedTitle}):(0,i.jsx)(bx,{countryCode:o.organization.event?.country??o.organization.country,event:o.organization.event,form:o.organization.form,formPreviewState:c,hideFormLanguages:u,isPreview:l,languages:o.organization.event?.languages??L,organization:o.organization,team:o.organization?.event?.team}))};var Ax;!function(e){e.AUTO_RESIZE_SYN="piglet-widget-auto-resize-syn",e.AUTO_RESIZE_ACK="piglet-widget-auto-resize-ack",e.AUTO_RESIZE_CHANGE_DIMENSIONS="piglet-widget-auto-resize-change-dimensions"}(Ax||(Ax={}));const Cx=`\n .UICta {\n padding: 12px 24px;\n overflow: hidden;\n position: relative;\n display: flex;\n flex-direction: column;\n gap: 16px;\n align-items: start;\n color: #d8b26a;\n border: 0;\n background: none;\n}\n.UICta:hover .UICta-bg-hover,\n.UICta:active .UICta-bg-hover,\n.UICta:focus .UICta-bg-hover {\n opacity: 1;\n}\n.UICta-gradient {\n position: absolute;\n inset: 0;\n border-radius: 10px;\n background: linear-gradient(180deg, #D8B26A 0%, #6E460C 100%);\n transition: all 400ms ease-out;\n}\n.UICta-bg {\n position: absolute;\n inset: 1.5px;\n border-radius: 10px;\n background-image: url('${sa.HEAVENT_ASSETS_URL}/img/bg-cta.jpg');\n background-size: cover;\n transition: all 300ms ease-out;\n}\n.UICta-bg-hover {\n position: absolute;\n inset: 1.5px;\n border-radius: 10px;\n background-image: url('${sa.HEAVENT_ASSETS_URL}/img/bg-cta-hover.jpg');\n background-size: cover;\n opacity: 0;\n transition: all 300ms ease-out;\n}\n.UICta-label {\n position: relative;\n width: 100%;\n font-size: 16px;\n letter-spacing: 1px;\n font-family: 'Netflix Sans Serif', serif;\n text-align: center;\n}\n`,Ex=e=>(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("style",{children:Cx}),(0,i.jsxs)("button",{className:"UICta",type:"button",onClick:e.onClick,children:[(0,i.jsx)("div",{className:"UICta-gradient"}),(0,i.jsx)("div",{className:"UICta-bg"}),(0,i.jsx)("div",{className:"UICta-bg-hover"}),(0,i.jsx)("div",{className:"UICta-label",children:"CONFIRMER MA PRÉSENCE"})]})]}),Tx=()=>{const{params:{userInfoId:e,customFieldSlug:t,value:n}}=$g(),[a,s]=(0,d.useState)(!1),o=`${sa.HEAVENT_API_URL}/users/${e}/field/${t}/update/${n}`,r=$a.c9.now()>$a.c9.fromISO("2026-02-27T10:00:00.000+01:00");return(0,i.jsx)($,{align:"center",className:"netflix",css:{background:`url(${jh.NetflixWood})`,fontFamily:"$FKRomanStandard",py:"40px"},direction:"column",height:1,width:1,children:r?(0,i.jsx)($,{css:{gap:"32px",px:"50px",width:"100%","@desktop":{width:"738px"}},direction:"column",children:(0,i.jsxs)($,{align:"center",css:{fontSize:"22px",textTransform:"uppercase","@desktop":{fontSize:"32px"}},direction:"column",children:[(0,i.jsx)(Ni,{css:{color:"white"},textAlign:"center",children:"L'équipage a levé l'ancre et l'embarquement est maintenant complet"}),(0,i.jsxs)(Ni,{css:{color:"rgb(216, 178, 106)"},textAlign:"center",children:["Le délai pour confirmer ta venue dans l'équipage One Piece Market est dépassé. Ta place n’a malheureusement pas pu être confirmée.",(0,i.jsx)("br",{}),"Pas d'inquiétude ! Il est également possible de venir sans réservation pour explorer le One Piece Market. Cependant, cela ne permettra pas d’accéder au visionnage de l’épisode en avant-première. À votre arrivée, suivez l’entrée VOGUE MERRY.",(0,i.jsx)("br",{}),"Rendez-vous le 10 mars sur Netflix pour la saison 2 de One Piece, en route pour Grand Line ! La quête continue."]})]})}):(0,i.jsxs)($,{css:{gap:"32px",px:"50px",width:"100%","@desktop":{width:"738px"}},direction:"column",children:[(0,i.jsxs)($,{align:"center",css:{fontSize:"22px",textTransform:"uppercase","@desktop":{fontSize:"32px"}},direction:"column",children:[(0,i.jsx)(Ni,{css:{color:"white"},textAlign:"center",children:"LE 28 FÉVRIER ET 1ER MARS CENTQUATRE-PARIS"}),(0,i.jsx)(Ni,{css:{color:"rgb(216, 178, 106)"},textAlign:"center",children:"VOTRE DERNIÈRE ESCALE AVANT GRAND LINE"})]}),a?(0,i.jsxs)($,{align:"center",css:{fontSize:"22px",textTransform:"uppercase","@desktop":{fontSize:"32px"}},direction:"column",children:[(0,i.jsx)(Ni,{css:{color:"white"},textAlign:"center",children:"Réponse enregistrée"}),(0,i.jsx)(Ni,{css:{color:"rgb(216, 178, 106)"},textAlign:"center",children:"Vous allez recevoir vos billets par emails dans quelques minutes"})]}):(0,i.jsx)(Ex,{onClick:async()=>{await fetch(o),s(!0)}})]})})},Rx=d.createContext({}),Mx=e=>(0,i.jsx)(Rx.Provider,{value:{},children:e.children}),Dx=j("div",{alignItems:"center",background:"$grayCustom50",display:"flex",flexDirection:"column",gap:"$10",height:"100%",overflowY:"auto",padding:"$4",paddingTop:"$10",width:"100%","@tablet":{padding:"$10"}}),Ox=()=>(ja("volunteers/src/v2/profiles/list/profilesListSkeleton.tsx","volunteers/src/v2/common/landingSkeleton.tsx"),(0,i.jsxs)(Dx,{children:[(0,i.jsx)(Nh,{}),(0,i.jsxs)($,{css:{width:"100%","@desktop":{width:"$modalMd"}},direction:"column",gap:"3",children:[(0,i.jsx)(Th,{borderRadius:"$1",height:23,width:1}),(0,i.jsx)(Th,{borderRadius:"$2",height:74,width:1}),(0,i.jsx)(Th,{borderRadius:"$2",height:74,width:1}),(0,i.jsx)(Th,{borderRadius:"$2",height:74,width:1})]})]})),wx=({delegation:e})=>{const{params:{organizationId:t},translate:n}=$g(),a=Sh(),{delegationsListButton:s}=Sr(t);return(0,i.jsx)(ra,{to:Yc.DELEGATION({delegationId:e.id,eventId:e.eventId||void 0,organizationId:t}),children:(0,i.jsxs)($,{align:"center",css:{background:"white",bd:!0,padding:"$4 $6"},gap:"3",children:[(0,i.jsx)(Ni,{css:{flex:"1"},font:"gray800 textSm medium",children:e.name}),a?(0,i.jsx)(pa,{color:"white",size:"sm",children:n(s)}):(0,i.jsx)(pa,{color:"white",leftIcon:"arrow-right",size:"sm"})]})})},Px=()=>{const{history:e,translate:t,params:{organizationId:n}}=$g(),{data:a,isLoading:s}=Ri("query DelegationsList($organizationId: OrganizationId!) {\n organization(id: $organizationId) {\n name\n\n events(sort: { attribute: StartAt, direction: Desc }) {\n nodes {\n id\n name\n startAt\n }\n }\n\n delegations(level: Both, onlyVisibleInDelegation: true) {\n nodes {\n id\n name\n eventId\n }\n }\n }\n}\n",{organizationId:n},[]),o=(0,d.useMemo)(()=>a.organization?.events.nodes??[],[a.organization]),{eventDelegationsGroupedByEvent:r,organizationDelegations:l}=(0,d.useMemo)(()=>{const e=(0,ho.A)((a.organization?.delegations.nodes??[]).filter(e=>!e.eventId),e=>e.name.toLowerCase());return{eventDelegationsGroupedByEvent:(0,Qp.A)((0,Ql.A)((a.organization?.delegations.nodes??[]).filter(e=>e.eventId),e=>e.eventId),e=>(0,ho.A)(e,e=>e.name.toLowerCase())),organizationDelegations:e}},[a.organization]);(0,d.useEffect)(()=>{if(1===a.organization?.delegations.nodes.length){const t=a.organization.delegations.nodes[0];e.replace(Yc.DELEGATION({organizationId:n,eventId:t.eventId||void 0,delegationId:t.id}))}},[a.organization]);const{delegationsListTitle:c}=Sr(n);return(0,d.useEffect)(()=>{document.title=a.organization?.name??Qr},[a.organization]),(0,i.jsx)(Ug,{isLoading:s,loadDelegationsSpace:!0,loadMembersSpace:!1,organizationId:n,skeleton:(0,i.jsx)(Ox,{}),children:(0,i.jsxs)(Dx,{children:[(0,i.jsx)(kh,{}),(0,i.jsx)($,{css:{width:"100%","@desktop":{width:"$modalMd"}},direction:"column",gap:"3",children:F(a.organization?.delegations.nodes)?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Ni,{color:"gray800",fontSize:"textMd",fontWeight:"semiBold",children:t(c)}),(0,i.jsx)(Wg,{width:"6"}),F(l)&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Ni,{color:"gray800",fontSize:"textSm",fontWeight:"semiBold",children:a.organization?.name}),l.map(e=>(0,i.jsx)(wx,{delegation:e},e.id))]}),F(Object.values(r))&&(0,i.jsxs)(i.Fragment,{children:[F(l)&&(0,i.jsx)(CI,{direction:"horizontal"}),(0,i.jsx)(Ni,{font:"gray800 textSm semiBold",children:t("_v_nements_53672")}),o.map(e=>{const t=r[e.id];return F(t)?(0,i.jsxs)(d.Fragment,{children:[(0,i.jsx)(Ni,{font:"gray500 textXs semiBold",children:e.name}),t.map(e=>(0,i.jsx)(wx,{delegation:e},e.id))]},e.id):null})]})]}):(0,i.jsxs)($,{align:"center",direction:"column",children:[(0,i.jsx)(Af,{title:t("aucune_d_l_gati_85273")}),(0,i.jsx)($,{children:(0,i.jsx)(pa,{color:"white",onClick:hs,children:t("se_d_connecter_74151")})})]})})]})})};function $x(e,t,n){if("positionCategoryId"in n){const i=e.usersPositionsCategories.some(e=>"ANY"===n.positionCategoryId?t===e.roleId:t===e.roleId&&e.positionCategoryId===n.positionCategoryId);if("positionId"in n){const a=e.usersPositions.some(e=>t===e.roleId&&e.positionId===n.positionId);return i||a}return i}return"delegationCategoryId"in n?e.usersDelegationsCategories.some(e=>"ANY"===n.delegationCategoryId?t===e.roleId:t===e.roleId&&e.delegationCategoryId===n.delegationCategoryId):"eventId"in n&&e.usersEvents.some(e=>"ANY"===n.eventId?t===e.roleId:t===e.roleId&&e.eventId===n.eventId)}function kx(e,t,n){const i=n?e.roles.filter(t=>"positionCategoryId"in n||"positionId"in n?t.accessLevel===Ct.Position?$x(e,t.id,n):t.accessLevel===Ct.Organization||t.accessLevel===Ct.Event:"delegationCategoryId"in n?t.accessLevel===Ct.DelegationCategory?$x(e,t.id,n):t.accessLevel===Ct.Organization||t.accessLevel===Ct.Event:"eventId"in n&&(t.accessLevel===Ct.Event?$x(e,t.id,n):t.accessLevel===Ct.Organization)):e.roles;return t.map(e=>i.some(t=>"1"===t.permissions[e]))}const Nx=d.createContext({}),Lx=e=>{const{params:{eventId:t}}=$g(),n=d.useMemo(()=>e.userPermissions.roles.some(e=>e.accessLevel===Ct.Organization||e.accessLevel===Ct.Event),[e.userPermissions]);return t?(0,i.jsx)(Nx.Provider,{value:{hasEventRole:n,userPermissions:e.userPermissions,hasPermission:(t,n)=>function(e,t,n){return kx(e,[t],n)[0]}(e.userPermissions,t,n),hasPermissions:(t,n)=>kx(e.userPermissions,t,n)},children:e.children}):(0,i.jsx)(i.Fragment,{children:e.children})};function zx(){return d.useContext(Nx)}const Fx=e=>{const{translate:t,params:{organizationId:n,eventId:a,delegationId:s}}=$g(),[o,r]=(0,d.useMemo)(()=>(0,Xl.A)(e.delegations,e=>"number"==typeof e.event?.id),[e.delegations]),l=(0,d.useMemo)(()=>(0,ho.A)(Object.values((0,Ql.A)(o,e=>e.event.id)),([e])=>e.event.name.toLowerCase()),[o]);return e.delegations.length>1?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Op,{title:t("communaut_20896"),children:r.map(e=>(0,i.jsx)(Pp,{to:Yc.DELEGATION({organizationId:n,delegationId:e.id}),children:e.name},e.id))}),l.map((e,t)=>{const a=e[0],s=(0,ho.A)(e,e=>e.name.toLowerCase());return(0,i.jsx)(Op,{title:a.event.name,children:s.map(e=>(0,i.jsx)(Pp,{to:Yc.DELEGATION({organizationId:n,eventId:e.event?.id,delegationId:e.id}),children:e.name},e.id))},t)}),(0,i.jsx)(Op,{children:(0,i.jsx)(Pp,{to:Or(Rc.ORGANIZATION_DELEGATIONS({organizationId:n})),children:t("voir_toutes_les_79250")})}),(0,i.jsx)(Op,{children:(0,i.jsx)(Pp,{to:Yc.DELEGATION_PROFILE({organizationId:n,eventId:a,delegationId:s}),children:t("mon_profil_48224")})})]}):(0,i.jsx)(Op,{children:(0,i.jsx)(Pp,{to:Yc.DELEGATION_PROFILE({organizationId:n,eventId:a,delegationId:s}),children:t("mon_profil_48224")})})},Ux=e=>{const{history:t,translate:n,params:{organizationId:a,eventId:s,delegationId:o}}=$g(),r=Ci(jr),l=Ci(Td),c=Ci(Au),{mutate:u}=function(e={}){return Mi("mutation DelegationUpdateFields(\n $organizationId: OrganizationId!\n $eventId: EventId\n $delegationId: DelegationId!\n $fields: JSON!\n) {\n delegationUpdateFields(\n organizationId: $organizationId\n eventId: $eventId\n delegationId: $delegationId\n fields: $fields\n )\n}\n",e)}(),m=(0,d.useMemo)(()=>({fields:e.delegation.fields}),[e.delegation]),g=(0,d.useCallback)(t=>c.validateForForm(r.delegationUpdateFieldsSchema(l.changedFieldsSchema(e.delegation.usedCustomFields,m.fields,t.fields)))(t),[e.delegation,m]),h=(e=!1)=>e?t.goBack(Yc.DELEGATION_DASHBOARD({organizationId:a,eventId:s,delegationId:o})):t.push(Yc.DELEGATION_DASHBOARD({organizationId:a,eventId:s,delegationId:o}));return(0,i.jsx)(ah,{direction:"column",initialValues:m,render:({form:t,handleSubmit:s,submitting:o,values:r})=>(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(pa,{color:"invisible",leftIcon:"arrow-left",onClick:()=>h(!0),children:n("retour_92202")}),(0,i.jsx)(Wg,{height:"4"}),(0,i.jsx)($,{direction:"column",gap:"4",children:e.delegation.usedCustomFields.map(n=>(0,i.jsx)(QI,{change:t.change,display:Ad(n,r.fields,e.delegation.usedCustomFields),field:n,fileAcl:"public-read",isMandatory:!1,organizationId:a,prefix:"fields."},n.id))}),(0,i.jsx)(Wg,{height:"6"}),(0,i.jsxs)($,{gap:"4",children:[(0,i.jsx)(pa,{isLoading:o,onClick:s,children:n("mettre_jour_85141")}),(0,i.jsx)(pa,{color:"white",onClick:()=>h(!0),children:n("annuler_48254")})]})]}),validate:g,width:1,onSubmit:async e=>{await u({organizationId:a,eventId:s,delegationId:o,fields:e.fields}),h()}})},Bx=()=>{const{params:{organizationId:e,delegationId:t}}=$g(),{data:n,loader:a}=Ri("query DelegationUpdateFieldsInfos($organizationId: OrganizationId!, $delegationId: DelegationId!) {\n organization(id: $organizationId) {\n delegation(id: $delegationId) {\n fields\n\n usedCustomFields {\n ...CustomFieldWithCondition\n }\n }\n }\n}\n",{organizationId:e,delegationId:t},[La.CustomFieldWithConditionFragment]);return a||(0,i.jsx)(Ux,{delegation:n.organization.delegation})},Gx=e=>{const{params:{organizationId:t,eventId:n,delegationId:a}}=$g(),s=wi(),o=e.delegationsSpaceLayoutTabs.find(e=>e.isPinned)?.slug;return h(o)?(0,i.jsx)(xm,{path:Yc.DELEGATION_TAB({organizationId:t,eventId:n,delegationId:a,slug:o}),replace:!0}):"members"===s.getItem(fh.DELEGATIONS_SPACE_TAB)?(0,i.jsx)(xm,{path:Yc.DELEGATION_MEMBERS({organizationId:t,eventId:n,delegationId:a}),replace:!0}):(0,i.jsx)(xm,{path:Yc.DELEGATION_DASHBOARD({organizationId:t,eventId:n,delegationId:a}),replace:!0})},Vx=e=>{const t=(0,d.useContext)(vi).useLocation().pathname.includes(e.basePath||e.path);return(0,i.jsxs)(i.Fragment,{children:[e.disabled?(0,i.jsxs)(E_,{children:[(0,i.jsx)(M_,{children:(0,i.jsx)(Ni,{color:"grayCustom500",css:{borderBottom:"unset",paddingBlock:"$3",fontWeight:"$medium"},children:e.children})}),(0,i.jsx)(R_,{placement:"top",children:e.disabledMessage})]}):(0,i.jsx)(ra,{replace:!0,to:e.path,children:(0,i.jsx)(Ni,{color:t?"primaryCustom500":"grayCustom500",css:{borderBottom:t?"2px solid $primaryCustom500":"unset",cursor:t?"inherit":"pointer",paddingBlock:"$3","&:hover":{color:t?"$primaryCustom600":"$grayCustom800"},fontWeight:"$medium"},children:e.children})}),(0,i.jsx)(Ni,{width:24})]})},Wx=e=>(0,i.jsxs)($,{"aria-orientation":"horizontal",as:M.Nav,css:{borderBottom:"1px solid $gray200",...e.css},width:1,children:[e.center&&(0,i.jsx)(i.Fragment,{children:(0,i.jsx)(Ni,{css:{flex:"1"}})}),e.children,(0,i.jsx)(Ni,{css:{flex:"1"}})]}),qx=e=>(0,i.jsx)(i.Fragment,{children:e.children});qx.displayName="TabPanel";const Yx=e=>{const[t,n]=(0,Xl.A)(d.Children.toArray(e.children),e=>d.isValidElement(e)&&e.type===qx);return(0,i.jsxs)($,{direction:"column",width:1,...w(e),children:[n,(0,i.jsx)(lo.dO,{children:t.map((e,t)=>(0,i.jsx)(lo.qh,{path:e.props.path,children:e},t))})]})},Hx=e=>{const{history:t}=$g(),n=wI(e.children),a=yh(),s=Sh(),o=a||s&&e.tabsOnTablet,r=(e,t)=>{const n=e(t);return h(n)?n:n[0]};return(0,i.jsx)(i.Fragment,{children:o?(0,i.jsxs)(Yx,{height:1,children:[(0,i.jsx)(Wx,{css:e.featureFlags?.isV4?{background:"$white",padding:"$2",borderRadius:"$2"}:void 0,children:n.map((e,t)=>(0,i.jsx)(Vx,{path:r(e.props.getPath),children:e.props.title},t))}),(0,i.jsx)(Wg,{height:"7"}),n.map((e,t)=>(0,i.jsx)(qx,{path:e.props.getPath(!0),children:e.props.featureFlags?.isV4?(0,i.jsx)(Ip,{heading:e.props.title,subtitle:e.props.subtitle,children:e.props.children}):e.props.children},t))]}):(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(VI,{css:{marginTop:"$4"},value:h(sa.HEAVENT_APPLICATION_BASENAME)?location.pathname.replace(new RegExp(`^/${sa.HEAVENT_APPLICATION_BASENAME}`,"gm"),""):location.pathname,onChange:e=>t.replace(e),children:n.map((e,t)=>(0,i.jsx)("option",{value:r(e.props.getPath),children:e.props.title},t))}),(0,i.jsx)(Wg,{height:"5"}),(0,i.jsx)(lo.dO,{children:n.map((e,t)=>(0,i.jsx)(lo.qh,{path:e.props.getPath(!0),children:e.props.featureFlags?.isV4?(0,i.jsx)(Ip,{heading:e.props.title,subtitle:e.props.subtitle,children:e.props.children}):e.props.children},t))})]})})},Zx=e=>(0,i.jsx)(i.Fragment,{children:e.children}),Kx=[25,50,100];const Qx=(0,d.createContext)({});function Xx(){return(0,d.useContext)(Qx)}function Jx(e,t,n={}){return(0,ho.A)(t,e=>m(e.name)).flatMap(t=>Zp(t.accreditations).map(a=>{const s=n.useAccreditationDisplay&&a.accreditationDisplay===W.Radio?a.name:void 0,o=mu(a.slots);return(0,i.jsx)("optgroup",{label:`${t.name} - ${Wp(a)}`,children:o.map(t=>{const o=uu(e,t,Wp(a),{accreditation:{includeNameAtEnd:!0}});return(0,i.jsx)("option",{"data-radio":s,disabled:!(!n.useIsBlocked||!t.isBlocked),value:t.id,children:o},t.id)})},a.id)}))}const ey=async(e,t,n,i)=>{const a=await gs();if("createdBy"===i.slug&&i.organizationId){const{organization:e}=await function(e,t){return ys("query Admins($organizationId: OrganizationId!) {\n organization(id: $organizationId) {\n usersInfos(isResourceCreator: true) {\n nodes {\n userId\n email\n name\n }\n }\n }\n}\n",{variables:e,token:t||void 0,fragments:[]})}({organizationId:i.organizationId},a);i.values=e.usersInfos.nodes.map(({userId:e,email:t,name:n})=>({id:e,name:`${h(n)?n:"-"} - ${t}`})),i.needLoading=!1}else if("categoryLeaders"===i.slug&&i.organizationId){const{organization:e}=await function(e,t){return ys('query DelegationsSegmentsCategoryLeaders($organizationId: OrganizationId!, $eventId: EventId) {\n organization(id: $organizationId) {\n usersInfos(\n eventId: $eventId\n isDelegationCategoryLeader: true\n sort: { attribute: "Name", direction: Asc }\n ) {\n nodes {\n id\n name\n }\n }\n }\n}\n',{variables:e,token:t||void 0,fragments:[]})}({organizationId:i.organizationId,eventId:i.eventId},a);i.values=e.usersInfos.nodes,i.needLoading=!1}else if("leaders"===i.slug&&i.organizationId){const{organization:e}=await function(e,t){return ys('query DelegationsSegmentsLeaders($organizationId: OrganizationId!, $eventId: EventId) {\n organization(id: $organizationId) {\n usersInfos(\n eventId: $eventId\n isDelegationLeader: true\n sort: { attribute: "Name", direction: Asc }\n ) {\n nodes {\n id\n name\n }\n }\n }\n}\n',{variables:e,token:t||void 0,fragments:[]})}({organizationId:i.organizationId,eventId:i.eventId},a);i.values=e.usersInfos.nodes,i.needLoading=!1}else if("delegationCategory"===i.slug&&i.organizationId){const{organization:e}=await function(e,t){return ys("query VolunteersSegmentsDelegationsCategories(\n $organizationId: OrganizationId!\n $level: OrganizationEventLevel!\n $eventId: EventId\n) {\n organization(id: $organizationId) {\n delegationsCategories(level: $level, eventId: $eventId) {\n nodes {\n id\n name\n }\n }\n }\n}\n",{variables:e,token:t||void 0,fragments:[]})}({organizationId:i.organizationId,level:i.eventId?nt.Event:nt.Organization,eventId:i.eventId},a);i.values=(0,ho.A)(e.delegationsCategories.nodes,e=>m(e.name)),i.needLoading=!1}else if("roles"===i.slug&&i.organizationId){const{organization:e}=await function(e,t){return ys("query UsersSegmentsRoles($organizationId: OrganizationId!) {\n organization(id: $organizationId) {\n roles {\n id\n name\n }\n }\n}\n",{variables:e,token:t||void 0,fragments:[]})}({organizationId:i.organizationId},a);i.values=(0,ho.A)(e.roles,e=>m(e.name)),i.needLoading=!1}else if("tag"===i.slug&&i.organizationId){const{organization:e}=await function(e,t){return ys("query Tags($organizationId: OrganizationId!, $eventId: EventId, $context: TagContext) {\n organization(id: $organizationId) {\n tags(eventId: $eventId, context: $context) {\n nodes {\n id\n name\n }\n }\n }\n}\n",{variables:e,token:t||void 0,fragments:[]})}({organizationId:i.organizationId,eventId:i.eventId,context:i.tagContext},a);i.values=(0,ho.A)(e.tags.nodes,e=>m(e.name)),i.needLoading=!1}else if(i.slug===um.CustomField&&i.organizationId){const{organization:e}=await Ts({organizationId:i.organizationId,eventId:i.eventId},a);i.values=(0,ho.A)(e.customFields.nodes,e=>m(e.name)),i.needLoading=!1}else if(i.slug===um.VolunteersSegment&&i.organizationId){const{organization:e}=await function(e,t){return ys("query WorkflowsSegmentsSegments(\n $organizationId: OrganizationId!\n $level: OrganizationEventLevel!\n $eventId: EventId\n) {\n organization(id: $organizationId) {\n volunteersSegmentsFolders: segmentsFolders(\n level: $level\n eventId: $eventId\n segmentType: Volunteers\n ) {\n id\n name\n index\n\n segments {\n id\n name\n index\n }\n }\n\n delegationsSegmentsFolders: segmentsFolders(\n level: $level\n eventId: $eventId\n segmentType: Delegations\n ) {\n id\n name\n index\n\n segments {\n id\n name\n index\n }\n }\n }\n}\n",{variables:e,token:t||void 0,fragments:[]})}({organizationId:i.organizationId,level:i.eventId?nt.Event:nt.Organization,eventId:i.eventId},a),t=(e,t)=>(0,ho.A)(t,e=>e.index).map(t=>({name:`${e} - ${t.name}`,values:(0,ho.A)(t.segments,e=>e.index)}));i.valuesGroups=t(n.translate("membres_11310"),e.volunteersSegmentsFolders).concat(t(n.translate("d_l_gations_78318"),e.delegationsSegmentsFolders)),i.needLoading=!1}else if(i.eventId){if(["preassignedPosition","position","wishedPositions"].includes(i.slug)){const{event:e}=await function(e,t){return ys("query VolunteersSegmentsPositions($eventId: EventId!) {\n event(id: $eventId) {\n positions {\n nodes {\n id\n name\n acronym\n positionCategoryName\n }\n }\n }\n}\n",{variables:e,token:t||void 0,fragments:[]})}({eventId:i.eventId},a);i.valuesGroups=(0,ho.A)(Object.entries((0,Ql.A)(e.positions.nodes,e=>e.positionCategoryName)).map(([e,t])=>({name:t[0].positionCategoryName,values:(0,ho.A)(t.map(e=>({id:e.id,name:`${au(e)} - ${e.positionCategoryName}`})),e=>m(e.name))})),({name:e})=>m(e)),i.needLoading=!1}else if("hasOtherEventPosition"===i.slug&&i.organizationId){const{organization:{positions:e}}=await function(e,t){return ys("query VolunteersSegmentsOtherPositions($organizationId: OrganizationId!, $eventId: EventId!) {\n organization(id: $organizationId) {\n positions(excludedEventId: $eventId) {\n nodes {\n id\n name\n positionCategoryName\n event {\n id\n name\n }\n }\n }\n }\n}\n",{variables:e,token:t||void 0,fragments:[]})}({organizationId:i.organizationId,eventId:i.eventId},a);i.valuesGroups=(0,ho.A)(Object.entries((0,Ql.A)(e.nodes,e=>[e.event.id,e.positionCategoryName])).map(([e,t])=>({name:`${t[0].event.name}: ${t[0].positionCategoryName}`,values:(0,ho.A)(t,e=>m(e.name))})),({name:e})=>m(e)),i.needLoading=!1}else if(["numberOfAssignments","positionSlotId","wishedPositionsSlots","checkInAtPositionSlot","checkOutAtPositionSlot"].includes(i.slug)){const{event:e}=await Ps({eventId:i.eventId},a);i.valuesGroups=function(e,t){return(0,ho.A)(t,e=>m(e.name)).flatMap(t=>(0,ho.A)(t.positions,e=>m(e.name)).map(n=>({id:n.id,name:`${t.name} - ${au(n)}`,values:(0,ho.A)(n.slots,e=>[e.range.start.toMillis(),e.name]).map(t=>{const i=iu(e,t,au(n),{position:{includeNameAtEnd:!0}});return{id:t.id,name:i}})})))}(t,e.positionsCategories),i.needLoading=!1}else if(["positionCategory","preassignedPositionCategory","wishedPositionsCategories"].includes(i.slug)){const{event:e}=await function(e,t){return ys("query VolunteersSegmentsPositionsCategories($eventId: EventId!) {\n event(id: $eventId) {\n positionsCategories {\n id\n name\n }\n }\n}\n",{variables:e,token:t||void 0,fragments:[]})}({eventId:i.eventId},a);i.values=(0,ho.A)(e.positionsCategories,e=>m(e.name)),i.needLoading=!1}else if("wishedSlotsCustom"===i.slug){const{event:t}=await function(e,t){return ys("query VolunteeersSegmentsCustomSlotsPeriods($eventId: EventId!) {\n event(id: $eventId) {\n startAt\n endAt\n ranges\n\n customSlotsPeriods {\n name\n startDate\n endDate\n\n customSlots {\n name\n startTime\n endTime\n }\n }\n }\n}\n",{variables:e,token:t||void 0,fragments:[]})}({eventId:i.eventId},a);i.valuesGroups=((e,t)=>{const n=t.customSlotsPeriods.flatMap(e=>L_(e.startDate??t.startAt,e.endDate??t.endAt,e.customSlots,t.ranges,jt.AllDays));return(0,ho.A)(Object.values((0,Ql.A)(n,({interval:e})=>e.start.startOf("day").toMillis())),e=>e[0].interval.start.startOf("day").toMillis()).map(t=>{const n=t[0].interval;return{name:e.toLocaleString(n.start.startOf("day"),Za.DateOnly.WeekdayLongMonthLong),values:t.map(({name:e,interval:t})=>({id:t.toISO(),name:z_(e,t)}))}})})(e,t),i.needLoading=!1}else if(i.slug==dm.AccreditationProfile||i.slug===dm.WishedAccreditationProfile){const{event:e}=await function(e,t){return ys("query VolunteersSegmentsAccreditationsProfiles($eventId: EventId!) {\n event(id: $eventId) {\n accreditationsProfilesCategories {\n id\n name\n\n accreditationsProfiles {\n id\n name\n acronym\n }\n }\n }\n}\n",{variables:e,token:t||void 0,fragments:[]})}({eventId:i.eventId},a);i.valuesGroups=(0,ho.A)(e.accreditationsProfilesCategories,e=>m(e.name)).map(e=>({name:e.name,values:(0,ho.A)(e.accreditationsProfiles,e=>m(e.name)).map(t=>({id:t.id,name:`${Wp(t)} - ${e.name}`}))})),i.needLoading=!1}else if("accreditation"===i.slug){const{event:e}=await function(e,t){return ys("query VolunteersSegmentsAccreditations($eventId: EventId!) {\n event(id: $eventId) {\n accreditations {\n nodes {\n id\n name\n acronym\n accreditationCategoryName\n }\n }\n }\n}\n",{variables:e,token:t||void 0,fragments:[]})}({eventId:i.eventId},a);i.valuesGroups=(0,ho.A)(Object.entries((0,Ql.A)(e.accreditations.nodes,e=>e.accreditationCategoryName)).map(([e,t])=>({name:t[0].accreditationCategoryName,values:(0,ho.A)(t.map(e=>({id:e.id,name:`${Wp(e)} - ${e.accreditationCategoryName}`})),e=>m(e.name))})),({name:e})=>m(e)),i.needLoading=!1}else if("hasOtherEventAccreditation"===i.slug&&i.organizationId){const{organization:{accreditations:e}}=await function(e,t){return ys("query VolunteersSegmentsOtherAccreditations($organizationId: OrganizationId!, $eventId: EventId!) {\n organization(id: $organizationId) {\n accreditations(excludedEventId: $eventId) {\n nodes {\n id\n name\n accreditationCategoryName\n event {\n id\n name\n }\n }\n }\n }\n}\n",{variables:e,token:t||void 0,fragments:[]})}({organizationId:i.organizationId,eventId:i.eventId},a);i.valuesGroups=(0,ho.A)(Object.entries((0,Ql.A)(e.nodes,e=>e.accreditationCategoryName)).map(([e,t])=>({name:`${t[0].event.name}: ${t[0].accreditationCategoryName}`,values:(0,ho.A)(t,e=>m(e.name))})),({name:e})=>m(e)),i.needLoading=!1}else if("accreditationCategory"===i.slug){const{event:e}=await function(e,t){return ys("query VolunteersSegmentsAccreditationsCategories($eventId: EventId!) {\n event(id: $eventId) {\n accreditationsCategories {\n id\n name\n }\n }\n}\n",{variables:e,token:t||void 0,fragments:[]})}({eventId:i.eventId},a);i.values=(0,ho.A)(e.accreditationsCategories,e=>m(e.name)),i.needLoading=!1}else if("positionsSegments"===i.slug){const{event:e}=await function(e,t){return ys("query VolunteersSegmentsPositionsSegments($eventId: EventId!) {\n event(id: $eventId) {\n segmentsFolders(segmentType: Positions) {\n id\n name\n index\n\n segments {\n id\n name\n index\n }\n }\n }\n}\n",{variables:e,token:t||void 0,fragments:[]})}({eventId:i.eventId},a);i.valuesGroups=(0,ho.A)(e.segmentsFolders,e=>e.index).map(e=>({name:e.name,values:(0,ho.A)(e.segments,e=>e.index)})),i.needLoading=!1}else if("accreditationsSegments"===i.slug){const{event:e}=await function(e,t){return ys("query VolunteersSegmentsAccreditationsSegments($eventId: EventId!) {\n event(id: $eventId) {\n segmentsFolders(segmentType: Accreditations) {\n id\n name\n index\n\n segments {\n id\n name\n index\n }\n }\n }\n}\n",{variables:e,token:t||void 0,fragments:[]})}({eventId:i.eventId},a);i.valuesGroups=(0,ho.A)(e.segmentsFolders,e=>e.index).map(e=>({name:e.name,values:(0,ho.A)(e.segments,e=>e.index)})),i.needLoading=!1}else if("delegationsSegments"===i.slug||"isDelegationLeader"===i.slug){const{event:e}=await function(e,t){return ys("query VolunteersSegmentsDelegationsSegments($eventId: EventId!) {\n event(id: $eventId) {\n segmentsFolders(segmentType: Delegations) {\n id\n name\n index\n\n segments {\n id\n name\n index\n }\n }\n }\n}\n",{variables:e,token:t||void 0,fragments:[]})}({eventId:i.eventId},a);i.valuesGroups=(0,ho.A)(e.segmentsFolders,e=>e.index).map(e=>({name:e.name,values:(0,ho.A)(e.segments,e=>e.index)})),i.needLoading=!1}else if("forms"===i.slug||"form"===i.slug||"formsInsertedAt"===i.slug){const{event:e}=await function(e,t){return ys("query VolunteersSegmentsForms($eventId: EventId!) {\n event(id: $eventId) {\n forms {\n nodes {\n ...SegmentForm\n }\n }\n }\n}\n",{variables:e,token:t||void 0,fragments:[La.SegmentFormFragment]})}({eventId:i.eventId},a);i.values=(0,ho.A)(e.forms.nodes,e=>m(e.name)),i.needLoading=!1}else if("campaign"===i.slug||"campaignReply"===i.slug||"campaignSentAt"===i.slug){const{event:e}=await function(e,t){return ys("query VolunteersSegmentsCampaigns($eventId: EventId!) {\n event(id: $eventId) {\n campaigns(states: [Done, Scheduled, Template]) {\n nodes {\n ...SegmentCampaign\n }\n }\n }\n}\n",{variables:e,token:t||void 0,fragments:[La.SegmentCampaignFragment]})}({eventId:i.eventId},a);i.campaigns=(0,ho.A)(e.campaigns.nodes,e=>m(e.name)),i.values=i.campaigns,i.needLoading=!1}else if("delegation"===i.slug){const{event:e}=await function(e,t){return ys("query VolunteersSegmentsDelegations($eventId: EventId!) {\n event(id: $eventId) {\n delegations {\n nodes {\n id\n name\n }\n }\n }\n}\n",{variables:e,token:t||void 0,fragments:[]})}({eventId:i.eventId},a);i.values=(0,ho.A)(e.delegations.nodes,e=>m(e.name)),i.needLoading=!1}else if(["numberOfAccreditations","accreditationSlotId","scannedAccreditationsSlots","wishedAccreditationsSlots"].includes(i.slug)){const{event:t}=await ws({eventId:i.eventId,loadIsBlocked:!1},a);i.valuesGroups=function(e,t){return(0,ho.A)(t,e=>m(e.name)).flatMap(t=>Zp(t.accreditations).map(n=>{const i=mu(n.slots);return{id:n.id,name:`${t.name} - ${Wp(n)}`,values:i.map(t=>{const i=uu(e,t,Wp(n),{accreditation:{includeNameAtEnd:!0}});return{id:t.id,name:i}})}}))}(e,t.accreditationsCategories),i.needLoading=!1}else if(i.slug===dm.WeezaccessChecklists){const{event:e}=await function(e,t){return ys("query VolunteersWeezaccessChecklists($eventId: EventId!) {\n event(id: $eventId) {\n weezaccessChecklists {\n id\n name\n }\n }\n}\n",{variables:e,token:t||void 0,fragments:[]})}({eventId:i.eventId},a);i.values=(0,ho.A)(e.weezaccessChecklists,e=>m(e.name)),i.needLoading=!1}else if("commentWrittenBy"===i.slug){const{organization:e}=await function(e,t){return ys("query VolunteersSegmentsLeaders($organizationId: OrganizationId!, $eventId: EventId) {\n organization(id: $organizationId) {\n admins: usersInfos(isResourceCreator: true) {\n nodes {\n id\n nameOrEmail\n }\n }\n\n usersInfos(eventId: $eventId, hasRole: true) {\n nodes {\n id\n nameOrEmail\n }\n }\n }\n}\n",{variables:e,token:t||void 0,fragments:[]})}({organizationId:i.organizationId,eventId:i.eventId},a);i.values=(0,ho.A)((0,yr.A)(e.admins.nodes.concat(e.usersInfos.nodes),e=>e.id),e=>m(e.nameOrEmail)).map(({id:e,nameOrEmail:t})=>({id:e,name:t})),i.needLoading=!1}else if(i.slug===Gu.DelegationsSpaceLayout){const{event:e}=await function(e,t){return ys("query DelegationsSegmentsLayouts($eventId: EventId!) {\n event(id: $eventId) {\n delegationsSpaceLayouts {\n id\n name\n }\n }\n}\n",{variables:e,token:t||void 0,fragments:[]})}({eventId:i.eventId},a);i.values=(0,ho.A)(e.delegationsSpaceLayouts,e=>m(e.name)),i.needLoading=!1}}else if(i.organizationId)if("event"===i.slug){const{organization:e}=await function(e,t){return ys("query UsersSegmentsEvents($organizationId: OrganizationId!) {\n organization(id: $organizationId) {\n events {\n nodes {\n ...SegmentEvent\n }\n }\n }\n}\n",{variables:e,token:t||void 0,fragments:[La.SegmentEventFragment]})}({organizationId:i.organizationId},a);i.values=(0,ho.A)(e.events.nodes,e=>m(e.name)),i.needLoading=!1}else if("forms"===i.slug||"formsInsertedAt"===i.slug){const{organization:e}=await function(e,t){return ys("query UsersSegmentsForms($organizationId: OrganizationId!) {\n organization(id: $organizationId) {\n forms(level: Organization) {\n nodes {\n ...SegmentForm\n }\n }\n }\n}\n",{variables:e,token:t||void 0,fragments:[La.SegmentFormFragment]})}({organizationId:i.organizationId},a);i.values=(0,ho.A)(e.forms.nodes,e=>m(e.name)),i.needLoading=!1}else if("campaign"===i.slug){const{organization:e}=await function(e,t){return ys("query UsersSegmentsCampaigns($organizationId: OrganizationId!) {\n organization(id: $organizationId) {\n campaigns(level: Organization, states: [Done, Scheduled, Template]) {\n nodes {\n ...SegmentCampaign\n }\n }\n }\n}\n",{variables:e,token:t||void 0,fragments:[La.SegmentCampaignFragment]})}({organizationId:i.organizationId},a);i.campaigns=(0,ho.A)(e.campaigns.nodes,e=>m(e.name)),i.values=i.campaigns,i.needLoading=!1}else if("positionCustomField"===i.slug||"accreditationCustomField"===i.slug){const{organization:e}=await Ts({organizationId:i.organizationId,eventId:i.eventId,fieldTypes:[Le.Checkbox,Le.Select]},a);i.values=(0,ho.A)(e.customFields.nodes,e=>m(e.name)),i.needLoading=!1}else if("delegation"===i.slug){const{organization:e}=await function(e,t){return ys("query UsersSegmentsDelegations($organizationId: OrganizationId!) {\n organization(id: $organizationId) {\n name\n\n delegations(level: Both) {\n nodes {\n id\n name\n\n event {\n id\n name\n }\n }\n }\n }\n}\n",{variables:e,token:t||void 0,fragments:[]})}({organizationId:i.organizationId},a);i.valuesGroups=(0,ho.A)(Object.entries((0,Ql.A)(e.delegations.nodes,e=>e.event?.id||-1)).map(([t,n])=>({name:n[0].event?.name??e.name,values:(0,ho.A)(n,e=>m(e.name))})),({name:e})=>m(e)),i.needLoading=!1}else if("usersSegments"===i.slug){const{organization:e}=await function(e,t){return ys("query VolunteersSegmentsUsersSegments(\n $organizationId: OrganizationId!\n $level: OrganizationEventLevel!\n $eventId: EventId\n) {\n organization(id: $organizationId) {\n segmentsFolders(level: $level, eventId: $eventId, segmentType: Volunteers) {\n id\n name\n index\n\n segments {\n id\n name\n index\n }\n }\n }\n}\n",{variables:e,token:t||void 0,fragments:[]})}({organizationId:i.organizationId,level:nt.Organization},a);i.valuesGroups=(0,ho.A)(e.segmentsFolders,e=>e.index).map(e=>({name:e.name,values:(0,ho.A)(e.segments,e=>e.index)})),i.needLoading=!1}},ty={boxShadow:"$xs",color:"$gray800"},ny=e=>{const t=Ci(Pu);return e.filterPredicate.filter.needLoading?(0,i.jsx)(xf,{color:"white",css:ty,leftIcon:"loader"}):e.isReadOnly?(0,i.jsx)(xf,{color:"white",css:ty,cursor:"default",ellipsis:!0,children:t.filterPredicateToText(e.filterPredicate)}):(0,i.jsx)(xf,{color:"white",css:ty,cursor:"pointer",ellipsis:!0,rightIcon:"xmark",onContentClick:()=>e.onClick(e.filterPredicate),onRightIconClick:()=>e.onRemove(e.filterPredicate),children:t.filterPredicateToText(e.filterPredicate)})},iy=e=>{const t=Ei();return(0,i.jsx)(Ni,{color:"gray800",css:{textTransform:"uppercase",whiteSpace:"nowrap"},fontSize:"textXs",fontWeight:"medium",children:e.operator===pt.Or?t("Or"):t("And")})},ay=e=>(0,i.jsx)($,{align:"center",css:{background:"$gray100",borderRadius:"$1",padding:"$1 $2"},gap:"2",wrap:"wrap",children:e.group.filtersPredicates.map((t,n)=>(0,i.jsxs)(d.Fragment,{children:[n>0&&(0,i.jsx)(iy,{operator:e.group.operator}),(0,i.jsx)(ny,{filterPredicate:t,isReadOnly:e.isReadOnly,onClick:e.onClick,onRemove:e.onRemove})]},t.predicateIndex))}),sy=e=>{const t=Ei(),{filtersPredicates:n,clearNameCursors:a,setPredicates:s,setIsFilterOpen:o,setSelectedFilterPredicate:r,predicates:l}=Xx(),c=(0,d.useMemo)(()=>Ou(n),[n]),u=(0,d.useMemo)(()=>(0,yr.A)(c,({filter:e})=>e.slug),[c]),m=(0,d.useCallback)(()=>{a(),s({operator:pt.And,groups:[]})},[a,s]),g=(0,d.useCallback)(({groupIndex:e,predicateIndex:t})=>{r({groupIndex:e,predicateIndex:t}),o(!0)},[o,r]),h=(0,d.useCallback)(({groupIndex:e,predicateIndex:t})=>{a(),s(function(e,t,n){const i=e.groups[t];return i&&1===i.predicates.length&&0===n?function(e,t){return{...e,groups:e.groups.filter((e,n)=>n!==t)}}(e,t):function(e,t,n){return{...e,groups:e.groups.map((e,i)=>i===t?n(e):e)}}(e,t,e=>({...e,predicates:e.predicates.filter((e,t)=>t!==n)}))}(l,e,t))},[l,a,s]);return function(e){const t=Ci(pd),n=Ci(Yl),i=Ci(bi),[a,s]=(0,d.useState)(!1);(0,d.useEffect)(()=>{const a=e.filter(({filter:e})=>e.needLoading);F(a)&&(s(!0),Promise.all(a.map(({filter:e})=>ey(t,n,i,e))).then(()=>{s(!1)}))},[e])}(u),F(c)?(0,i.jsxs)($,{align:"center",gap:"2",width:1,wrap:"wrap",children:[n.groups.map((t,a)=>(0,i.jsxs)(d.Fragment,{children:[a>0&&(0,i.jsx)(iy,{operator:n.operator}),(0,i.jsx)(ay,{group:t,isReadOnly:e.isReadOnly,onClick:g,onRemove:h})]},t.groupIndex)),!e.isReadOnly&&(0,i.jsx)(Ni,{color:"gray700",css:{cursor:"pointer",marginLeft:"$1"},fontWeight:"medium",onClick:m,children:t("r_initialiser_l_66835")})]}):null};function oy(){return(0,d.useMemo)(()=>navigator.platform.toLowerCase().startsWith("mac"),[])}const ry=e=>{const{translate:t}=$g(),{columnsSearch:n,setColumnsSearch:a}=Xx(),[s,o]=(0,d.useState)(""),r=(0,d.useMemo)(()=>h(s)?e.searchableColumns.filter(e=>m(e.name).includes(m(s))):e.searchableColumns,[e.searchableColumns,s]);return(0,i.jsxs)(Ep,{children:[(0,i.jsx)(Lp,{children:(0,i.jsx)(pa,{color:"white",css:{borderLeft:"none",borderBottomLeftRadius:"0",borderTopLeftRadius:"0"},leftIcon:"bars-filter"})}),(0,i.jsx)(Np,{css:{padding:"0"},maxHeight:350,placement:"bottom-end",width:320,children:(0,i.jsxs)($,{css:{padding:"$4 $6"},direction:"column",gap:"3",children:[(0,i.jsx)(Ni,{font:"gray800 textMd medium",children:t("rechercher_sur_85243")}),(0,i.jsx)(hh,{icon:"magnifying-glass",placeholder:t("filtrer_78031"),state:"search",value:s,onChange:o}),(0,i.jsx)($,{direction:"column",gap:"3",children:r.map(({slug:e,name:t})=>(0,i.jsx)(zf,{state:n.includes(e)?"checked":"unchecked",onClick:t=>{a(B(n,e,"checked"===t))},children:t},e))})]})})]})},dy=e=>{const t=Ei(),{isEditMode:n,massActions:a,name:s,possibleColumns:o,possibleRenderings:r,rendering:l,setAreColumnsOpen:c,setIsEditMode:u,setIsFilterOpen:m,setName:g,setNameDebounced:h,setRendering:p,setSelectedFilterPredicate:f}=Xx(),I=oy(),_=e.showActions&&!!e.actions&&a.numberOfSelected>0,x=(0,d.useMemo)(()=>(0,ho.A)(o.filter(e=>e.isSearchable),e=>e.name),[o]),y=(0,d.useMemo)(()=>e.showSearchColumns?{"& .h-styled-input-container":{borderBottomRightRadius:"0",borderTopRightRadius:"0"}}:{},[e.showSearchColumns]);return function(e,t){const n=oy(),i=(0,d.useCallback)(e=>{"e"===e.key&&(n&&e.metaKey||!n&&e.ctrlKey)&&t(e)},["e",t]);(0,d.useEffect)(()=>(document.addEventListener("keydown",i,!1),()=>{document.removeEventListener("keydown",i,!1)}),["e",t,i])}(0,(0,d.useCallback)(()=>{e.showEditMode&&u(!n)},[n,e.showEditMode,u])),(0,i.jsxs)($,{align:"center",gap:"4",children:[(0,i.jsxs)($,{width:320,children:[(0,i.jsx)(hh,{autoFocus:!0,css:y,icon:"magnifying-glass",placeholder:e.searchPlaceholder??t("rechercher_50038"),value:s,onChange:e=>{g(e),h(e)}}),e.showSearchColumns&&(0,i.jsx)(ry,{searchableColumns:x})]}),_?(0,i.jsx)($,{css:{flex:"1",justifyContent:"right"},gap:"4",children:e.actions}):(0,i.jsxs)($,{css:{flex:"1"},gap:"4",children:[e.showFilters&&(0,i.jsx)(pa,{color:"gray",leftIcon:"bars-filter",onClick:()=>{f(null),m(!0)},children:t("filtres_64574")}),(0,i.jsx)(Ni,{css:{flex:"1"}}),e.controls,F(r)&&(0,i.jsxs)(Ep,{children:[(0,i.jsx)(Lp,{children:(0,i.jsx)(pa,{color:"white",leftIcon:Vr(l),children:Wr(t,l)})}),(0,i.jsx)(Np,{placement:"bottom-end",children:r.map(e=>(0,i.jsx)($p,{icon:Vr(e),onClick:()=>p(e),children:Wr(t,e)},e))})]}),e.showEditColumns&&(0,i.jsx)(pa,{color:"white",leftIcon:"gear",onClick:()=>{c(!0)},children:t("_diter_les_colo_39630")}),e.showEditMode&&(0,i.jsx)(Tf,{"aria-keyshortcuts":(I?"Meta":"Control")+"+E",value:n,onChange:u,children:t("mode_dition_93778")})]})]})},ly=e=>{const t=Ei(),{massActions:n}=Xx(),a=(0,d.useCallback)(()=>{n.toggleSelectAll("unchecked"),n.setIsAllSelected(!1)},[n]),s=(0,d.useCallback)(()=>{n.setIsAllSelected(!0)},[n]);return(0,i.jsxs)($,{align:"center",css:{background:"$gray50",borderRadius:"$1",padding:"$3 $4"},gap:"3",children:[(0,i.jsx)(Ni,{fontSize:"textMd",fontWeight:"medium",children:(0,i.jsx)(la,{icon:"circle-exclamation"})}),(0,i.jsx)(Ni,{color:"gray700",css:{flex:"1"},fontWeight:"medium",children:n.isAllSelected?e.allSelectedText:e.pageSelectedText}),n.isAllSelected?(0,i.jsx)(Ni,{color:"primary500",css:{cursor:"pointer"},fontWeight:"medium",onClick:a,children:t("effacer_la_s_le_85095")}):(0,i.jsx)(Ni,{color:"primary500",css:{cursor:"pointer"},fontWeight:"medium",onClick:s,children:e.selectAllText})]})},cy=e=>{const{limit:t,massActions:n,reload:a,showMassActions:s,totalCount:o}=Xx(),r=s&&e.showSelectAll&&n.numberOfSelected===t&&o>t;return(0,i.jsxs)($,{css:{border:"1px solid $gray200",borderBottom:"none",borderTopLeftRadius:"$1",borderTopRightRadius:"$1",padding:"$3 $4"},direction:"column",gap:"4",width:1,children:[(0,i.jsx)(dy,{actions:e.renderActions?.(n,o,a),controls:e.renderControls?.(),showActions:s,showEditColumns:e.showEditColumns??!1,showEditMode:e.showEditMode??!1,showFilters:e.showFilters??!1,showSearchColumns:e.showSearchColumns??!1}),e.showPredicatesBadges&&(0,i.jsx)(sy,{isReadOnly:!e.showFilters}),r&&(0,i.jsx)(ly,{allSelectedText:e.renderAllSelectedText?.(o)??"",pageSelectedText:e.renderPageSelectedText?.(t)??"",selectAllText:e.renderSelectAllText?.(o)??""})]})};var uy=n(3627),my=n(4979);const gy=e=>{const{setNodeRef:t,style:n,handleProps:a}=function(e){const{attributes:t,isDragging:n,listeners:i,setActivatorNodeRef:a,setNodeRef:s,transform:o,transition:r}=(0,uy.gl)({id:e,data:void 0});return{handleProps:{ref:a,...t,...i},isDragging:n,setNodeRef:s,style:{position:"relative",transform:my.Ks.Translate.toString(o),transition:r,zIndex:n?1:void 0}}}(e.column.slug);return(0,i.jsxs)($,{ref:t,css:{border:"1px solid $gray200",borderRadius:"$1",boxShadow:"$xs",padding:"$4"},gap:"4",style:n,children:[(0,i.jsx)(Ni,{color:"gray300",css:{cursor:"grab"},...a,children:(0,i.jsx)(la,{icon:"grip-vertical",iconStyle:"solid"})}),(0,i.jsxs)($,{css:{flex:"1",overflow:"hidden"},direction:"column",gap:"1",children:[(0,i.jsx)(Ni,{color:"gray800",css:{ellipsis:!0},title:e.column.name,width:1,children:e.column.name}),h(e.column.label)&&(0,i.jsx)(Ni,{color:"gray500",css:{ellipsis:!0},title:e.column.label,width:1,children:e.column.label})]}),(0,i.jsx)(Ef,{value:e.column.isSelected,onChange:e.onToggle})]})},hy=({children:e,css:t,onClose:n,returnToFallback:a,size:s})=>{const o=Oi(),r=()=>{n?n():o.goBack(a??eg.HOME)};return Sa(r),ja("common-front/src/designSystem/components/rightPanels/__deprecated/rightPanel.tsx","common-front/src/designSystem/components/rightPanels/base/rightPanel.tsx"),(0,ya.createPortal)((0,i.jsx)($,{css:{background:"rgba(52, 64, 84, 0.7)",height:"100%",left:0,position:"absolute",top:0,width:"100%",zIndex:"100",...t},"data-testid":"right-panel-backdrop",onClick:r,children:(0,i.jsxs)($,{css:{background:"white",height:"100%",position:"absolute",right:"0",top:"0",width:"sm"===s?"480px":"650px"},"data-testid":"right-panel-body",direction:"column",onClick:e=>xa(e,!1),children:[(0,i.jsx)(Ni,{color:"gray500",css:{cursor:"pointer",fontSize:"$textMd",position:"absolute",right:"$space$6",top:"$space$6"},onClick:r,children:(0,i.jsx)("i",{className:"far fa-xmark"})}),e]})}),document.body)},py=d.forwardRef((e,t)=>(0,i.jsx)($,{ref:t,css:{flex:"1",overflowY:"auto",px:"$6",...e.css},direction:"column",children:e.children}));py.displayName="RightPanelBody";const fy=e=>(0,i.jsx)(Ni,{color:"gray800",css:{borderTop:"1px solid $gray200",px:"$6",py:"$4"},children:e.children});var Iy=n(3375),_y=n(8831);const xy=[_y.FN,_y.Mk],yy=e=>{const t=(0,Iy.FR)((0,Iy.MS)(Iy.AN,{activationConstraint:{distance:4}}),(0,Iy.MS)(Iy.uN,{coordinateGetter:uy.JR})),n=(0,d.useCallback)(({active:t,over:n})=>{if(n&&t.id!==n.id){const i=e.ids.indexOf(t.id),a=e.ids.indexOf(n.id);-1!==i&&-1!==a&&e.onReorder(i,a)}},[e.ids,e.onReorder]);return(0,i.jsx)(Iy.Mp,{collisionDetection:Iy.fp,modifiers:xy,sensors:t,onDragEnd:n,children:(0,i.jsx)(uy.gB,{items:e.ids,strategy:uy._G,children:e.children})})},Sy=e=>{const t=Ei(),[n,a]=(0,d.useState)(""),[s,o]=(0,d.useState)((0,ho.A)(e.columns.map(t=>({...t,isSelected:e.initialSelectedColumns.includes(t.slug)})),[({slug:t})=>{const n=e.initialSelectedColumns.indexOf(t);return-1===n?e.columns.length:n},({name:e})=>e])),r=e=>{if(h(n)){const t=m(n);return m(e.name).includes(t)||h(e.label)&&m(e.label).includes(t)}return!0},l=s.filter(r).map(e=>e.slug);return(0,i.jsxs)(hy,{css:e.css,size:"sm",onClose:e.onClose,children:[(0,i.jsxs)(py,{children:[(0,i.jsx)(Wg,{height:"6"}),(0,i.jsx)(Ni,{color:"gray900",fontSize:"textXl",children:e.title}),(0,i.jsx)(Ni,{color:"gray500",children:e.subtitle}),(0,i.jsx)(Wg,{height:"6"}),(0,i.jsx)(hh,{icon:"magnifying-glass",placeholder:e.searchPlaceholder,value:n,onChange:a}),(0,i.jsx)(Wg,{height:"6"}),(0,i.jsx)(Ni,{color:"gray900",fontSize:"textMd",fontWeight:"semiBold",children:t("liste_des_champ_00325")}),(0,i.jsx)(Wg,{height:"2"}),(0,i.jsx)(yy,{ids:l,onReorder:(e,t)=>{const n=s.map(e=>e.slug);o(function(e,t,n){const i=[...e],[a]=i.splice(t,1);return i.splice(n,0,a),i}(s,n.indexOf(l[e]),n.indexOf(l[t])))},children:(0,i.jsx)($,{direction:"column",gap:"2",children:s.map((e,t)=>r(e)?(0,i.jsx)(gy,{column:e,onToggle:()=>{((e,t)=>{o((0,nx.jM)(n=>{n[t].isSelected=!e.isSelected}))})(e,t)}},e.slug):null)})}),(0,i.jsx)(Wg,{height:"6"})]}),(0,i.jsx)(fy,{children:(0,i.jsxs)($,{gap:"3",justify:"end",children:[(0,i.jsx)(pa,{onClick:()=>{e.onSave(s.filter(e=>e.isSelected).map(e=>e.slug)),e.onClose()},children:e.saveButtonText}),(0,i.jsx)(pa,{color:"white",onClick:e.onClose,children:t("annuler_48254")})]})})]})};var jy=n(903);const by=["isLeader","isPositionLeader","isPositionCategoryLeader","isDelegationLeader"],vy=[ht.IsInLast,ht.IsMoreThanAgo,ht.IsInNext,ht.IsMoreThanAhead],Ay=[ht.Is,ht.IsNot,ht.GreaterThan,ht.GreaterThanEqual,ht.LessThan,ht.LessThanEqual];function Cy(e){const{slug:t,fieldType:n}=e;if("condition"===t)return"condition";if(by.includes(t))return"leader";if("isAdmin"===t)return"admin";if("privacy"===t)return"privacy";if("isTeam"===t)return"team";if("wishedPositions"===t||"wishedPositionsCategories"===t)return"wishedPositions";if("numberOfAssignmentsPerDay"===t||"volunteersMinutesDays"===t)return"numberPerDay";if("campaignReply"===t)return"campaignReply";switch(n){case Ue.Address:case Ue.Text:case Ue.Textarea:return"text";case Ue.Country:case Ue.Language:case Ue.Nationality:case Ue.Select:case Ue.Sex:return"select";case Ue.Checkbox:case Ue.Validation:return"checkbox";case Ue.Phone:return"phone";case Ue.Number:return"number";case Ue.DateTimeRange:return"dateTimeRange";case Ue.Date:return"date";case Ue.Datetime:return"datetime";case Ue.File:return"file";case Ue.Campaign:return"campaign";default:return"unknown"}}function Ey(e){return null!==_d(e)}function Ty(e){return Number.isInteger(e)&&e>=0}function Ry(e){return"number"==typeof e}function My(e){return null==e||""===e}function Dy(e,t,n){return Ay.includes(e.operator)?Ry(t):e.operator!==ht.Between||Ry(t)&&Ry(n)}function Oy(e,t){const{operator:n,value:i,value2:a,value3:s,value4:o}=t;switch(Cy(e)){case"condition":return n===ht.Is||n===ht.IsNot||F(i);case"leader":return n!==ht.Contains||F(i);case"select":return n!==ht.Is&&n!==ht.IsNot||F(i);case"admin":case"privacy":case"team":case"file":case"checkbox":return!0;case"wishedPositions":return F(i)||n===ht.IsEmpty||n===ht.IsNotEmpty;case"numberPerDay":return Ey(i)&&(Ay.includes(n)||n===ht.Between)&&Dy(t,a,s);case"campaignReply":return F(i)&&(n===ht.Contains&&h(a)||n===ht.IsEmpty||n===ht.IsNotEmpty);case"campaign":return F(i)&&F(a);case"text":case"phone":return n!==ht.Contains&&n!==ht.NotContains||h(i);case"number":return("numberOfAccreditations"===(r=e.slug)||"numberOfAssignments"===r||My(s)&&My(o)||Ey(s)&&Ey(o))&&Dy(t,i,a);case"dateTimeRange":return Ey(i)&&([ht.Contains,ht.NotContains,ht.Is].includes(n)||Ey(a));case"date":{const n=Ru(t);return function(e){const{operator:t,value:n,value2:i,valueDate:a}=e;return t===ht.Is||t===ht.IsNot?[a?.day,a?.month,a?.year].some(e=>"number"==typeof e&&-1!==e):t===ht.IsBefore||t===ht.IsAfter?Ey(n):t===ht.Between?Ey(n)&&Ey(i):!vy.includes(t)||Ty(n)}(n)&&(!Tu(e.slug)||F(n.value3))}case"datetime":return function(e){const{operator:t,value:n,value2:i}=e;return[ht.Is,ht.IsNot,ht.IsBefore,ht.IsAfter].includes(t)?Ey(n):t===ht.Between?Ey(n)&&Ey(i):!vy.includes(t)||Ty(n)}(t);case"unknown":return!1}var r}const wy=e=>{const t=Ei(),[n,a]=(0,d.useState)(e.filterPredicate.predicate?.value??[]),[s,o]=(0,d.useState)(e.filterPredicate.predicate?.value2??[]),r=e.filterPredicate.filter.campaigns??[],l=(0,Na.A)(r.filter(({id:e})=>n.includes(e)).map(({campaignType:e})=>e)),c=(0,Na.A)(["NotSent",...l.includes(re.Email)?Ln.filter(e=>e!==Ce.Queued):[],...l.includes(re.Sms)?ui:[]]),u={operator:ht.Is,value:n,value2:s,slug:e.filterPredicate.filter.slug},m=Oy(e.filterPredicate.filter,u);return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(FI,{isSearchVisible:!0,isSelectAllVisible:!0,multiple:!0,placeholder:t("s_lectionner_un_28439"),values:n,onChange:a,children:r.map(e=>(0,i.jsx)("option",{value:e.id,children:e.name},e.id))}),n.length>0&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Wg,{height:"2"}),(0,i.jsx)(FI,{isSearchVisible:!0,isSelectAllVisible:!0,multiple:!0,placeholder:t("s_lectionner_un_62901"),values:s,onChange:o,children:c.map(e=>(0,i.jsx)("option",{value:e,children:t(e)},e))})]}),(0,i.jsx)(Wg,{height:"7"}),(0,i.jsx)($,{children:(0,i.jsx)(pa,{disabled:!m,onClick:()=>{e.onAdd(u)},children:t("ajouter_le_filt_54222")})})]})},Py=e=>{const t=Ei(),[n,a]=(0,d.useState)(e.filterPredicate.predicate?.value??[]),[s,o]=(0,d.useState)(e.filterPredicate.predicate?.operator??ht.Contains),[r,l]=(0,d.useState)(e.filterPredicate.predicate?.value2??[]),c=e.filterPredicate.filter.campaigns??[],u={operator:s,value:n,value2:r,slug:e.filterPredicate.filter.slug},m=Oy(e.filterPredicate.filter,u);return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(FI,{isSearchVisible:!0,isSelectAllVisible:!0,multiple:!0,placeholder:t("s_lectionner_un_28439"),values:n,onChange:a,children:c.map(e=>(0,i.jsx)("option",{value:e.id,children:e.name},e.id))}),n.length>0&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Wg,{height:"3"}),(0,i.jsx)(uf,{state:"contains"===s?"checked":"unchecked",onClick:()=>o(ht.Contains),children:t("contient_34012")}),"contains"===s&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Wg,{height:"1"}),(0,i.jsxs)($,{children:[(0,i.jsx)(Wg,{width:"6"}),(0,i.jsx)(hh,{value:r,onChange:l})]}),(0,i.jsx)(Wg,{height:"1"})]}),(0,i.jsx)(Wg,{height:"3"}),(0,i.jsx)(uf,{state:"isEmpty"===s?"checked":"unchecked",onClick:()=>o(ht.IsEmpty),children:t("est_vide_96759")}),(0,i.jsx)(Wg,{height:"3"}),(0,i.jsx)(uf,{state:"isNotEmpty"===s?"checked":"unchecked",onClick:()=>o(ht.IsNotEmpty),children:t("n_est_pas_vide_45804")})]}),(0,i.jsx)(Wg,{height:"7"}),(0,i.jsx)($,{children:(0,i.jsx)(pa,{disabled:!m,onClick:()=>{e.onAdd(u)},children:t("ajouter_le_filt_54222")})})]})},$y=e=>{const t=Ei(),[n,a]=(0,d.useState)(e.filterPredicate.predicate?.operator??ht.Is),[s,o]=(0,d.useState)(e.filterPredicate.predicate?.value??!0);return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(uf,{state:"is"===n?"checked":"unchecked",onClick:()=>a(ht.Is),children:t("est_25967")}),"is"===n&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Wg,{height:"1"}),(0,i.jsxs)($,{children:[(0,i.jsx)(Wg,{width:"6"}),(0,i.jsxs)(VI,{shouldParseAsBoolean:!0,value:s,onChange:o,children:[(0,i.jsx)("option",{value:"true",children:t("true")}),(0,i.jsx)("option",{value:"false",children:t("false")})]})]}),(0,i.jsx)(Wg,{height:"1"})]}),(0,i.jsx)(Wg,{height:"3"}),(0,i.jsx)(uf,{state:"isNot"===n?"checked":"unchecked",onClick:()=>a(ht.IsNot),children:t("n_est_pas_97826")}),"isNot"===n&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Wg,{height:"1"}),(0,i.jsxs)($,{children:[(0,i.jsx)(Wg,{width:"6"}),(0,i.jsxs)(VI,{shouldParseAsBoolean:!0,value:s,onChange:o,children:[(0,i.jsx)("option",{value:"true",children:t("true")}),(0,i.jsx)("option",{value:"false",children:t("false")})]})]}),(0,i.jsx)(Wg,{height:"1"})]}),!0!==e.filterPredicate.filter.hideEmpty&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Wg,{height:"3"}),(0,i.jsx)(uf,{state:"isEmpty"===n?"checked":"unchecked",onClick:()=>a(ht.IsEmpty),children:t("est_vide_96759")}),(0,i.jsx)(Wg,{height:"3"}),(0,i.jsx)(uf,{state:"isNotEmpty"===n?"checked":"unchecked",onClick:()=>a(ht.IsNotEmpty),children:t("n_est_pas_vide_45804")})]}),(0,i.jsx)(Wg,{height:"7"}),(0,i.jsx)($,{children:(0,i.jsx)(pa,{onClick:()=>{e.onAdd({operator:n,value:s,slug:e.filterPredicate.filter.slug})},children:t("ajouter_le_filt_54222")})})]})},ky=e=>{const t=Ei(),[n,a]=(0,d.useState)(e.filterPredicate.predicate?.operator??ht.Is),s=e.filterPredicate.filter.values??[],[o,r]=(0,d.useState)(F(e.filterPredicate.predicate?.value)?e.filterPredicate.predicate.value:[]),l={operator:n,value:o,slug:e.filterPredicate.filter.slug},c=Oy(e.filterPredicate.filter,l);return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(uf,{state:"is"===n?"checked":"unchecked",onClick:()=>a(ht.Is),children:t("champ_dont_un_a_44854")}),(0,i.jsx)(Wg,{height:"3"}),(0,i.jsx)(uf,{state:"isNot"===n?"checked":"unchecked",onClick:()=>a(ht.IsNot),children:t("champ_d_pendant_33676")}),s.length>0&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Wg,{height:"3"}),(0,i.jsx)(uf,{state:"contains"===n?"checked":"unchecked",onClick:()=>a(ht.Contains),children:t("d_pends_du_cham_39787")}),"contains"===n&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Wg,{height:"1"}),(0,i.jsxs)($,{children:[(0,i.jsx)(Wg,{width:"6"}),(0,i.jsx)(FI,{isSearchVisible:!0,isSelectAllVisible:!0,multiple:!0,placeholder:t("s_lectionner_de_52380"),values:o,onChange:r,children:s.map(({id:e,name:t})=>(0,i.jsx)("option",{value:e,children:t},e))})]}),(0,i.jsx)(Wg,{height:"1"})]})]}),(0,i.jsx)(Wg,{height:"7"}),(0,i.jsx)($,{children:(0,i.jsx)(pa,{disabled:!c,onClick:()=>{e.onAdd(l)},children:t("ajouter_le_filt_54222")})})]})},Ny=[ht.IsInLast,ht.IsMoreThanAgo,ht.IsInNext,ht.IsMoreThanAhead],Ly=e=>(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Wg,{height:"3"}),(0,i.jsx)(uf,{state:e.operator===e.relativeOperator?"checked":"unchecked",onClick:()=>e.setOperator(e.relativeOperator),children:e.label}),e.operator===e.relativeOperator&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Wg,{height:"1"}),(0,i.jsxs)($,{align:"center",children:[(0,i.jsx)(Wg,{width:"6"}),(0,i.jsx)(hh,{shouldParseAsInt:!0,value:e.days,onChange:e.setDays})]}),(0,i.jsx)(Wg,{height:"1"})]})]});var zy=n(3551);const Fy=e=>{const t=Ei(),n=Ci(pd),a=(0,d.useMemo)(()=>$a.c9.now().startOf("year"),[]);return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Wg,{height:"1"}),(0,i.jsxs)($,{children:[(0,i.jsx)(Wg,{width:"6"}),(0,i.jsxs)(VI,{shouldParseAsInt:!0,value:e.value.day,onChange:t=>{e.setValue({...e.value,day:t})},children:[(0,i.jsx)("option",{value:"-1",children:t("jour_74089")}),(0,Bl.A)(1,32).map(e=>(0,i.jsx)("option",{value:e,children:e},e))]})]}),(0,i.jsx)(Wg,{height:"1"}),(0,i.jsxs)($,{children:[(0,i.jsx)(Wg,{width:"6"}),(0,i.jsxs)(VI,{shouldParseAsInt:!0,value:e.value.month,onChange:t=>{e.setValue({...e.value,month:t})},children:[(0,i.jsx)("option",{value:"-1",children:t("mois_10165")}),(0,Bl.A)(1,13).map(e=>{const t=n.toLocaleString(a.set({month:e}),{month:"long"});return(0,i.jsx)("option",{value:e,children:t},e)})]})]}),(0,i.jsx)(Wg,{height:"1"}),(0,i.jsxs)($,{children:[(0,i.jsx)(Wg,{width:"6"}),(0,i.jsxs)(VI,{shouldParseAsInt:!0,value:e.value.year,onChange:t=>{e.setValue({...e.value,year:t})},children:[(0,i.jsx)("option",{value:"-1",children:t("ann_e_38546")}),(0,zy.A)(1900,a.year+2).map(e=>(0,i.jsx)("option",{value:e,children:e},e))]})]}),(0,i.jsx)(Wg,{height:"1"})]})},Uy=e=>{const t=Ei(),n=Tu(e.filterPredicate.filter.slug),a=e.filterPredicate.predicate?Ru(e.filterPredicate.predicate):void 0,s=(0,d.useMemo)(()=>(e.filterPredicate.filter.values||[]).map(({id:e,name:t})=>(0,i.jsx)("option",{value:e,children:t},e)),[e.filterPredicate.filter]),[o,r]=(0,d.useState)(n?a?.value3??[]:[]),[l,c]=(0,d.useState)(a?.operator??ht.Is),[u,m]=(0,d.useState)(_d(a?.value)||""),[g,h]=(0,d.useState)(_d(a?.value2)||""),[p,f]=(0,d.useState)(a?.valueDate??{day:-1,month:-1,year:-1}),[I,_]=(0,d.useState)(Ny.includes(l)?a?.value??"":""),x=Ny.includes(l),y=function(e){return Tu(e.slug)?{...e,value:e.value3,value2:e.value,value3:e.value2}:e}({operator:l,value:x?I:u,value2:x?"":g,value3:n?o:void 0,valueDate:p,slug:e.filterPredicate.filter.slug}),S=Oy(e.filterPredicate.filter,y);return(0,i.jsxs)(i.Fragment,{children:[n&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(FI,{isSearchVisible:!0,isSelectAllVisible:!0,multiple:!0,placeholder:"campaignSentAt"===e.filterPredicate.filter.slug?t("s_lectionner_un_28439"):t("s_lectionner_un_13356"),values:o,onChange:r,children:s}),(0,i.jsx)(Wg,{height:"3"})]}),(!n||o.length>0)&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(uf,{state:"is"===l?"checked":"unchecked",onClick:()=>c(ht.Is),children:t("est_25967")}),"is"===l&&(0,i.jsx)(Fy,{setValue:f,value:p}),(0,i.jsx)(Wg,{height:"3"}),(0,i.jsx)(uf,{state:"isNot"===l?"checked":"unchecked",onClick:()=>c(ht.IsNot),children:t("n_est_pas_97826")}),"isNot"===l&&(0,i.jsx)(Fy,{setValue:f,value:p}),(0,i.jsx)(Wg,{height:"3"}),(0,i.jsx)(uf,{state:"isBefore"===l?"checked":"unchecked",onClick:()=>c(ht.IsBefore),children:t("est_avant_le_16689")}),"isBefore"===l&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Wg,{height:"1"}),(0,i.jsxs)($,{children:[(0,i.jsx)(Wg,{width:"6"}),(0,i.jsx)(Uf,{max:e.filterPredicate.filter.endAt,min:e.filterPredicate.filter.startAt,value:u,onChange:m})]}),(0,i.jsx)(Wg,{height:"1"})]}),(0,i.jsx)(Wg,{height:"3"}),(0,i.jsx)(uf,{state:"isAfter"===l?"checked":"unchecked",onClick:()=>c(ht.IsAfter),children:t("est_apr_s_le_79703")}),"isAfter"===l&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Wg,{height:"1"}),(0,i.jsxs)($,{children:[(0,i.jsx)(Wg,{width:"6"}),(0,i.jsx)(Uf,{max:e.filterPredicate.filter.endAt,min:e.filterPredicate.filter.startAt,value:u,onChange:m})]}),(0,i.jsx)(Wg,{height:"1"})]}),(0,i.jsx)(Wg,{height:"3"}),(0,i.jsx)(uf,{state:"between"===l?"checked":"unchecked",onClick:()=>c(ht.Between),children:t("est_entre_born_59665")}),"between"===l&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Wg,{height:"1"}),(0,i.jsxs)($,{children:[(0,i.jsx)(Wg,{width:"6"}),(0,i.jsx)(Uf,{max:e.filterPredicate.filter.endAt,min:e.filterPredicate.filter.startAt,value:u,onChange:m}),(0,i.jsx)(Wg,{width:"3"}),(0,i.jsx)(Uf,{max:e.filterPredicate.filter.endAt,min:e.filterPredicate.filter.startAt,value:g,onChange:h})]}),(0,i.jsx)(Wg,{height:"1"})]}),(0,i.jsx)(Ly,{days:I,label:t("est_dans_les_n_05750"),operator:l,relativeOperator:ht.IsInLast,setDays:_,setOperator:c}),(0,i.jsx)(Ly,{days:I,label:t("est_il_y_a_plus_04600"),operator:l,relativeOperator:ht.IsMoreThanAgo,setDays:_,setOperator:c}),(0,i.jsx)(Ly,{days:I,label:t("est_dans_les_n_72234"),operator:l,relativeOperator:ht.IsInNext,setDays:_,setOperator:c}),(0,i.jsx)(Ly,{days:I,label:t("est_dans_plus_d_94311"),operator:l,relativeOperator:ht.IsMoreThanAhead,setDays:_,setOperator:c}),(0,i.jsx)(Wg,{height:"3"}),(0,i.jsx)(uf,{state:"today"===l?"checked":"unchecked",onClick:()=>c(ht.Today),children:t("est_aujourd_hui_82571")}),(0,i.jsx)(Wg,{height:"3"}),(0,i.jsx)(uf,{state:"thisDayMonth"===l?"checked":"unchecked",onClick:()=>c(ht.ThisDayMonth),children:t("est_aujourd_hui_70881")}),!0!==e.filterPredicate.filter.hideEmpty&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Wg,{height:"3"}),(0,i.jsx)(uf,{state:"isEmpty"===l?"checked":"unchecked",onClick:()=>c(ht.IsEmpty),children:t("est_vide_96759")}),(0,i.jsx)(Wg,{height:"3"}),(0,i.jsx)(uf,{state:"isNotEmpty"===l?"checked":"unchecked",onClick:()=>c(ht.IsNotEmpty),children:t("n_est_pas_vide_45804")})]})]}),(0,i.jsx)(Wg,{height:"7"}),(0,i.jsx)($,{children:(0,i.jsx)(pa,{disabled:!S,onClick:()=>{e.onAdd(y)},children:t("ajouter_le_filt_54222")})})]})},By=e=>{const t=Ei(),n=(0,d.useMemo)(()=>e.filterPredicate.filter.useLocalZone?Qa():void 0,[e.filterPredicate]),[a,s]=(0,d.useState)(e.filterPredicate.predicate?.operator??ht.Is),[o,r]=(0,d.useState)(_d(e.filterPredicate.predicate?.value)||""),[l,c]=(0,d.useState)(_d(e.filterPredicate.predicate?.value2)||""),[u,m]=(0,d.useState)(Ny.includes(a)?e.filterPredicate.predicate?.value??"":""),g=Ny.includes(a),h={operator:a,value:g?u:o,value2:g?"":l,slug:e.filterPredicate.filter.slug},p=Oy(e.filterPredicate.filter,h);return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(uf,{state:"is"===a?"checked":"unchecked",onClick:()=>s(ht.Is),children:t("est_25967")}),"is"===a&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Wg,{height:"1"}),(0,i.jsxs)($,{children:[(0,i.jsx)(Wg,{width:"6"}),(0,i.jsx)(Uf,{max:e.filterPredicate.filter.endAt,min:e.filterPredicate.filter.startAt,value:o,onChange:r})]}),(0,i.jsx)(Wg,{height:"1"})]}),(0,i.jsx)(Wg,{height:"3"}),(0,i.jsx)(uf,{state:"isNot"===a?"checked":"unchecked",onClick:()=>s(ht.IsNot),children:t("n_est_pas_97826")}),"isNot"===a&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Wg,{height:"1"}),(0,i.jsxs)($,{children:[(0,i.jsx)(Wg,{width:"6"}),(0,i.jsx)(Uf,{max:e.filterPredicate.filter.endAt,min:e.filterPredicate.filter.startAt,value:o,onChange:r})]}),(0,i.jsx)(Wg,{height:"1"})]}),(0,i.jsx)(Wg,{height:"3"}),(0,i.jsx)(uf,{state:"isBefore"===a?"checked":"unchecked",onClick:()=>s(ht.IsBefore),children:t("est_avant_le_16689")}),"isBefore"===a&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Wg,{height:"1"}),(0,i.jsxs)($,{children:[(0,i.jsx)(Wg,{width:"6"}),(0,i.jsx)(Gf,{value:o,zone:n,onChange:r})]}),(0,i.jsx)(Wg,{height:"1"})]}),(0,i.jsx)(Wg,{height:"3"}),(0,i.jsx)(uf,{state:"isAfter"===a?"checked":"unchecked",onClick:()=>s(ht.IsAfter),children:t("est_apr_s_le_79703")}),"isAfter"===a&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Wg,{height:"1"}),(0,i.jsxs)($,{children:[(0,i.jsx)(Wg,{width:"6"}),(0,i.jsx)(Gf,{value:o,zone:n,onChange:r})]}),(0,i.jsx)(Wg,{height:"1"})]}),(0,i.jsx)(Wg,{height:"3"}),(0,i.jsx)(uf,{state:"between"===a?"checked":"unchecked",onClick:()=>s(ht.Between),children:t("est_entre_born_59665")}),"between"===a&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Wg,{height:"1"}),(0,i.jsxs)($,{children:[(0,i.jsx)(Wg,{width:"6"}),(0,i.jsx)(Gf,{value:o,zone:n,onChange:r})]}),(0,i.jsx)(Wg,{height:"1"}),(0,i.jsxs)($,{children:[(0,i.jsx)(Wg,{width:"6"}),(0,i.jsx)(Gf,{value:l,zone:n,onChange:c})]}),(0,i.jsx)(Wg,{height:"1"})]}),(0,i.jsx)(Ly,{days:u,label:t("est_dans_les_n_05750"),operator:a,relativeOperator:ht.IsInLast,setDays:m,setOperator:s}),(0,i.jsx)(Ly,{days:u,label:t("est_il_y_a_plus_04600"),operator:a,relativeOperator:ht.IsMoreThanAgo,setDays:m,setOperator:s}),(0,i.jsx)(Ly,{days:u,label:t("est_dans_les_n_72234"),operator:a,relativeOperator:ht.IsInNext,setDays:m,setOperator:s}),(0,i.jsx)(Ly,{days:u,label:t("est_dans_plus_d_94311"),operator:a,relativeOperator:ht.IsMoreThanAhead,setDays:m,setOperator:s}),(0,i.jsx)(Wg,{height:"3"}),(0,i.jsx)(uf,{state:"today"===a?"checked":"unchecked",onClick:()=>s(ht.Today),children:t("est_aujourd_hui_82571")}),!0!==e.filterPredicate.filter.hideEmpty&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Wg,{height:"3"}),(0,i.jsx)(uf,{state:"isEmpty"===a?"checked":"unchecked",onClick:()=>s(ht.IsEmpty),children:t("est_vide_96759")}),(0,i.jsx)(Wg,{height:"3"}),(0,i.jsx)(uf,{state:"isNotEmpty"===a?"checked":"unchecked",onClick:()=>s(ht.IsNotEmpty),children:t("n_est_pas_vide_45804")})]}),(0,i.jsx)(Wg,{height:"7"}),(0,i.jsx)($,{children:(0,i.jsx)(pa,{disabled:!p,onClick:()=>{e.onAdd(h)},children:t("ajouter_le_filt_54222")})})]})},Gy=e=>{const t=Ei(),[n,a]=(0,d.useState)(e.filterPredicate.predicate?.operator??ht.Contains),[s,o]=(0,d.useState)(e.filterPredicate.predicate?.value??""),[r,l]=(0,d.useState)(e.filterPredicate.predicate?.value2??""),c={operator:n,value:s,value2:r,slug:e.filterPredicate.filter.slug},u=Oy(e.filterPredicate.filter,c);return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(uf,{state:"contains"===n?"checked":"unchecked",onClick:()=>a(ht.Contains),children:t("contient_34012")}),"contains"===n&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Wg,{height:"1"}),(0,i.jsxs)($,{children:[(0,i.jsx)(Wg,{width:"6"}),(0,i.jsx)(Gf,{max:e.filterPredicate.filter.endAt,min:e.filterPredicate.filter.startAt,value:s,onChange:o})]}),(0,i.jsx)(Wg,{height:"1"})]}),(0,i.jsx)(Wg,{height:"3"}),(0,i.jsx)(uf,{state:"is"===n?"checked":"unchecked",onClick:()=>a(ht.Is),children:t("contient_date_89885")}),"is"===n&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Wg,{height:"1"}),(0,i.jsxs)($,{children:[(0,i.jsx)(Wg,{width:"6"}),(0,i.jsx)(Uf,{max:e.filterPredicate.filter.endAt,min:e.filterPredicate.filter.startAt,value:s,onChange:o})]})]}),(0,i.jsx)(Wg,{height:"3"}),(0,i.jsx)(uf,{state:"notContains"===n?"checked":"unchecked",onClick:()=>a(ht.NotContains),children:t("ne_contient_pas_85399")}),"notContains"===n&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Wg,{height:"1"}),(0,i.jsxs)($,{children:[(0,i.jsx)(Wg,{width:"6"}),(0,i.jsx)(Gf,{max:e.filterPredicate.filter.endAt,min:e.filterPredicate.filter.startAt,value:s,onChange:o})]}),(0,i.jsx)(Wg,{height:"1"})]}),(0,i.jsx)(Wg,{height:"3"}),(0,i.jsx)(uf,{state:"overlaps"===n?"checked":"unchecked",onClick:()=>a(ht.Overlaps),children:t("chevauche_49445")}),"overlaps"===n&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Wg,{height:"1"}),(0,i.jsxs)($,{children:[(0,i.jsx)(Wg,{width:"6"}),(0,i.jsx)(Gf,{max:e.filterPredicate.filter.endAt,min:e.filterPredicate.filter.startAt,placeholder:t("d_but_41840"),value:s,onChange:o})]}),(0,i.jsx)(Wg,{height:"1"}),(0,i.jsxs)($,{children:[(0,i.jsx)(Wg,{width:"6"}),(0,i.jsx)(Gf,{max:e.filterPredicate.filter.endAt,min:e.filterPredicate.filter.startAt,placeholder:t("fin_60104"),value:r,onChange:l})]}),(0,i.jsx)(Wg,{height:"1"})]}),(0,i.jsx)(Wg,{height:"3"}),(0,i.jsx)(uf,{state:"notOverlaps"===n?"checked":"unchecked",onClick:()=>a(ht.NotOverlaps),children:t("ne_chevauche_pa_17307")}),"notOverlaps"===n&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Wg,{height:"1"}),(0,i.jsxs)($,{children:[(0,i.jsx)(Wg,{width:"6"}),(0,i.jsx)(Gf,{max:e.filterPredicate.filter.endAt,min:e.filterPredicate.filter.startAt,placeholder:t("d_but_41840"),value:s,onChange:o})]}),(0,i.jsx)(Wg,{height:"1"}),(0,i.jsxs)($,{children:[(0,i.jsx)(Wg,{width:"6"}),(0,i.jsx)(Gf,{max:e.filterPredicate.filter.endAt,min:e.filterPredicate.filter.startAt,placeholder:t("fin_60104"),value:r,onChange:l})]}),(0,i.jsx)(Wg,{height:"1"})]}),(0,i.jsx)(Wg,{height:"3"}),(0,i.jsx)(uf,{state:"engulfs"===n?"checked":"unchecked",onClick:()=>a(ht.Engulfs),children:t("engloutis_42346")}),"engulfs"===n&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Wg,{height:"1"}),(0,i.jsxs)($,{children:[(0,i.jsx)(Wg,{width:"6"}),(0,i.jsx)(Gf,{max:e.filterPredicate.filter.endAt,min:e.filterPredicate.filter.startAt,placeholder:t("d_but_41840"),value:s,onChange:o})]}),(0,i.jsx)(Wg,{height:"1"}),(0,i.jsxs)($,{children:[(0,i.jsx)(Wg,{width:"6"}),(0,i.jsx)(Gf,{max:e.filterPredicate.filter.endAt,min:e.filterPredicate.filter.startAt,placeholder:t("fin_60104"),value:r,onChange:l})]}),(0,i.jsx)(Wg,{height:"1"})]}),(0,i.jsx)(Wg,{height:"3"}),(0,i.jsx)(uf,{state:"notEngulfs"===n?"checked":"unchecked",onClick:()=>a(ht.NotEngulfs),children:t("n_engloutis_pas_42363")}),"notEngulfs"===n&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Wg,{height:"1"}),(0,i.jsxs)($,{children:[(0,i.jsx)(Wg,{width:"6"}),(0,i.jsx)(Gf,{max:e.filterPredicate.filter.endAt,min:e.filterPredicate.filter.startAt,placeholder:t("d_but_41840"),value:s,onChange:o})]}),(0,i.jsx)(Wg,{height:"1"}),(0,i.jsxs)($,{children:[(0,i.jsx)(Wg,{width:"6"}),(0,i.jsx)(Gf,{max:e.filterPredicate.filter.endAt,min:e.filterPredicate.filter.startAt,placeholder:t("fin_60104"),value:r,onChange:l})]}),(0,i.jsx)(Wg,{height:"1"})]}),(0,i.jsx)(Wg,{height:"3"}),(0,i.jsx)(uf,{state:"engulfedBy"===n?"checked":"unchecked",onClick:()=>a(ht.EngulfedBy),children:t("est_englouti_pa_47852")}),"engulfedBy"===n&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Wg,{height:"1"}),(0,i.jsxs)($,{children:[(0,i.jsx)(Wg,{width:"6"}),(0,i.jsx)(Gf,{max:e.filterPredicate.filter.endAt,min:e.filterPredicate.filter.startAt,placeholder:t("d_but_41840"),value:s,onChange:o})]}),(0,i.jsx)(Wg,{height:"1"}),(0,i.jsxs)($,{children:[(0,i.jsx)(Wg,{width:"6"}),(0,i.jsx)(Gf,{max:e.filterPredicate.filter.endAt,min:e.filterPredicate.filter.startAt,placeholder:t("fin_60104"),value:r,onChange:l})]}),(0,i.jsx)(Wg,{height:"1"})]}),(0,i.jsx)(Wg,{height:"3"}),(0,i.jsx)(uf,{state:"notEngulfedBy"===n?"checked":"unchecked",onClick:()=>a(ht.NotEngulfedBy),children:t("n_est_pas_englo_08733")}),"notEngulfedBy"===n&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Wg,{height:"1"}),(0,i.jsxs)($,{children:[(0,i.jsx)(Wg,{width:"6"}),(0,i.jsx)(Gf,{max:e.filterPredicate.filter.endAt,min:e.filterPredicate.filter.startAt,placeholder:t("d_but_41840"),value:s,onChange:o})]}),(0,i.jsx)(Wg,{height:"1"}),(0,i.jsxs)($,{children:[(0,i.jsx)(Wg,{width:"6"}),(0,i.jsx)(Gf,{max:e.filterPredicate.filter.endAt,min:e.filterPredicate.filter.startAt,placeholder:t("fin_60104"),value:r,onChange:l})]}),(0,i.jsx)(Wg,{height:"1"})]}),(0,i.jsx)(Wg,{height:"7"}),(0,i.jsx)($,{children:(0,i.jsx)(pa,{disabled:!u,onClick:()=>{e.onAdd(c)},children:t("ajouter_le_filt_54222")})})]})},Vy=e=>{const t=Ei(),[n,a]=(0,d.useState)(e.filterPredicate.predicate?.operator??ht.IsEmpty);return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(uf,{state:"isEmpty"===n?"checked":"unchecked",onClick:()=>a(ht.IsEmpty),children:t("est_vide_96759")}),(0,i.jsx)(Wg,{height:"3"}),(0,i.jsx)(uf,{state:"isNotEmpty"===n?"checked":"unchecked",onClick:()=>a(ht.IsNotEmpty),children:t("n_est_pas_vide_45804")}),(0,i.jsx)(Wg,{height:"7"}),(0,i.jsx)($,{children:(0,i.jsx)(pa,{onClick:()=>{e.onAdd({operator:n,value:"",slug:e.filterPredicate.filter.slug})},children:t("ajouter_le_filt_54222")})})]})},Wy=e=>{const t=Ei(),[n,a]=(0,d.useState)(e.filterPredicate.predicate?.operator??ht.Is);return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(uf,{state:"is"===n?"checked":"unchecked",onClick:()=>a(ht.Is),children:t("est_administrat_15766")}),(0,i.jsx)(Wg,{height:"3"}),(0,i.jsx)(uf,{state:"isNot"===n?"checked":"unchecked",onClick:()=>a(ht.IsNot),children:t("n_est_pas_admin_58612")}),(0,i.jsx)(Wg,{height:"7"}),(0,i.jsx)($,{children:(0,i.jsx)(pa,{onClick:()=>{e.onAdd({operator:n,value:"",slug:e.filterPredicate.filter.slug})},children:t("ajouter_le_filt_54222")})})]})},qy=e=>{const t=Ei(),[n,a]=(0,d.useState)(e.filterPredicate.predicate?.operator??ht.Is),s=(0,d.useMemo)(()=>wu(e.filterPredicate.filter,t),[e.filterPredicate.filter]),[o,r]=(0,d.useState)(F(e.filterPredicate.predicate?.value)?e.filterPredicate.predicate.value:[]),l={operator:n,value:o,slug:e.filterPredicate.filter.slug},c=Oy(e.filterPredicate.filter,l),u=(0,d.useMemo)(()=>Array.isArray(o)?o.length:0,[o]);return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(uf,{state:"is"===n?"checked":"unchecked",onClick:()=>a(ht.Is),children:t("est_responsable_47377")}),(0,i.jsx)(Wg,{height:"3"}),"isDelegationLeader"===e.filterPredicate.filter.slug&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(uf,{state:"contains"===n?"checked":"unchecked",onClick:()=>a(ht.Contains),children:t("est_responsable_00281")}),"contains"===n&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Wg,{height:"1"}),(0,i.jsx)($,{css:{paddingLeft:"$6"},children:(0,i.jsx)(FI,{hint:t("_1_s_lectionn_51286",u),isSearchVisible:!0,isSelectAllVisible:!0,multiple:!0,placeholder:t("s_lectionner_de_52380"),values:o,onChange:r,children:s})}),(0,i.jsx)(Wg,{height:"1"})]}),(0,i.jsx)(Wg,{height:"3"})]}),(0,i.jsx)(uf,{state:"isNot"===n?"checked":"unchecked",onClick:()=>a(ht.IsNot),children:t("n_est_pas_respo_55625")}),(0,i.jsx)(Wg,{height:"7"}),(0,i.jsx)($,{children:(0,i.jsx)(pa,{disabled:!c,onClick:()=>{e.onAdd(l)},children:t("ajouter_le_filt_54222")})})]})},Yy=e=>{const t=Ei(),[n,a]=(0,d.useState)(e.filterPredicate.predicate?.operator??ht.Is);return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(uf,{state:"is"===n?"checked":"unchecked",onClick:()=>a(ht.Is),children:t("est_inscrit_en_86193")}),(0,i.jsx)(Wg,{height:"3"}),(0,i.jsx)(uf,{state:"isNot"===n?"checked":"unchecked",onClick:()=>a(ht.IsNot),children:t("n_est_pas_inscr_25311")}),(0,i.jsx)(Wg,{height:"7"}),(0,i.jsx)($,{children:(0,i.jsx)(pa,{onClick:()=>{e.onAdd({operator:n,value:"",slug:e.filterPredicate.filter.slug})},children:t("ajouter_le_filt_54222")})})]})},Hy=e=>{const t=Ei(),n="numberOfAccreditations"===e.filterPredicate.filter.slug,a="numberOfAssignments"===e.filterPredicate.filter.slug,[s,o]=(0,d.useState)(e.filterPredicate.predicate?.operator??ht.Is),[r,l]=(0,d.useState)(e.filterPredicate.predicate?.value??""),[c,u]=(0,d.useState)(e.filterPredicate.predicate?.value2??""),[m,g]=(0,d.useState)(_d(e.filterPredicate.predicate?.value3)||""),[h,p]=(0,d.useState)(_d(e.filterPredicate.predicate?.value4)||""),[f,I]=(0,d.useState)($a.c9.isDateTime(m)&&m.isValid&&$a.c9.isDateTime(h)&&h.isValid?"checked":"unchecked"),[_,x]=(0,d.useState)(!n||U(e.filterPredicate.predicate?.value3)),[y,S]=(0,d.useState)(n&&F(e.filterPredicate.predicate?.value3)?e.filterPredicate.predicate?.value3:[]),[j,b]=(0,d.useState)(!a||U(e.filterPredicate.predicate?.value3)),[v,A]=(0,d.useState)(a&&F(e.filterPredicate.predicate?.value3)?e.filterPredicate.predicate?.value3:[]),C={operator:s,value:r,value2:c,value3:n?y:a?v:"checked"===f?m:"",value4:"checked"===f?h:"",slug:e.filterPredicate.filter.slug},E=Oy(e.filterPredicate.filter,C);return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(uf,{state:"is"===s?"checked":"unchecked",onClick:()=>o(ht.Is),children:t("est_25967")}),"is"===s&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Wg,{height:"1"}),(0,i.jsxs)($,{children:[(0,i.jsx)(Wg,{width:"6"}),(0,i.jsx)(hh,{shouldParseAsInt:!0,value:r,onChange:l})]}),(0,i.jsx)(Wg,{height:"1"})]}),(0,i.jsx)(Wg,{height:"3"}),(0,i.jsx)(uf,{state:"isNot"===s?"checked":"unchecked",onClick:()=>o(ht.IsNot),children:t("n_est_pas_97826")}),"isNot"===s&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Wg,{height:"1"}),(0,i.jsxs)($,{children:[(0,i.jsx)(Wg,{width:"6"}),(0,i.jsx)(hh,{shouldParseAsInt:!0,value:r,onChange:l})]}),(0,i.jsx)(Wg,{height:"1"})]}),(0,i.jsx)(Wg,{height:"3"}),(0,i.jsx)(uf,{state:"greaterThan"===s?"checked":"unchecked",onClick:()=>o(ht.GreaterThan),children:t("plus_grand_que_28412")}),"greaterThan"===s&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Wg,{height:"1"}),(0,i.jsxs)($,{children:[(0,i.jsx)(Wg,{width:"6"}),(0,i.jsx)(hh,{shouldParseAsInt:!0,value:r,onChange:l})]}),(0,i.jsx)(Wg,{height:"1"})]}),(0,i.jsx)(Wg,{height:"3"}),(0,i.jsx)(uf,{state:"greaterThanEqual"===s?"checked":"unchecked",onClick:()=>o(ht.GreaterThanEqual),children:t("_gal_ou_plus_gr_76897")}),"greaterThanEqual"===s&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Wg,{height:"1"}),(0,i.jsxs)($,{children:[(0,i.jsx)(Wg,{width:"6"}),(0,i.jsx)(hh,{shouldParseAsInt:!0,value:r,onChange:l})]}),(0,i.jsx)(Wg,{height:"1"})]}),(0,i.jsx)(Wg,{height:"3"}),(0,i.jsx)(uf,{state:"lessThan"===s?"checked":"unchecked",onClick:()=>o(ht.LessThan),children:t("plus_petit_que_35846")}),"lessThan"===s&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Wg,{height:"1"}),(0,i.jsxs)($,{children:[(0,i.jsx)(Wg,{width:"6"}),(0,i.jsx)(hh,{shouldParseAsInt:!0,value:r,onChange:l})]}),(0,i.jsx)(Wg,{height:"1"})]}),(0,i.jsx)(Wg,{height:"3"}),(0,i.jsx)(uf,{state:"lessThanEqual"===s?"checked":"unchecked",onClick:()=>o(ht.LessThanEqual),children:t("_gal_ou_plus_pe_38400")}),"lessThanEqual"===s&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Wg,{height:"1"}),(0,i.jsxs)($,{children:[(0,i.jsx)(Wg,{width:"6"}),(0,i.jsx)(hh,{shouldParseAsInt:!0,value:r,onChange:l})]}),(0,i.jsx)(Wg,{height:"1"})]}),(0,i.jsx)(Wg,{height:"3"}),(0,i.jsx)(uf,{state:"between"===s?"checked":"unchecked",onClick:()=>o(ht.Between),children:t("est_entre_born_59665")}),"between"===s&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Wg,{height:"1"}),(0,i.jsxs)($,{children:[(0,i.jsx)(Wg,{width:"6"}),(0,i.jsx)(hh,{shouldParseAsInt:!0,value:r,onChange:l}),(0,i.jsx)(Wg,{width:"3"}),(0,i.jsx)(hh,{shouldParseAsInt:!0,value:c,onChange:u})]}),(0,i.jsx)(Wg,{height:"1"})]}),!0!==e.filterPredicate.filter.hideEmpty&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Wg,{height:"3"}),(0,i.jsx)(uf,{state:"isEmpty"===s?"checked":"unchecked",onClick:()=>o(ht.IsEmpty),children:t("est_vide_96759")}),(0,i.jsx)(Wg,{height:"3"}),(0,i.jsx)(uf,{state:"isNotEmpty"===s?"checked":"unchecked",onClick:()=>o(ht.IsNotEmpty),children:t("n_est_pas_vide_45804")})]}),"numberOfAssignmentsDays"===e.filterPredicate.filter.slug&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(EI,{height:"3"}),(0,i.jsx)(zf,{state:f,onClick:I,children:t("filtrer_sur_une_06420")}),"checked"===f&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Wg,{height:"3"}),(0,i.jsxs)($,{gap:"3",children:[(0,i.jsx)(Uf,{max:e.filterPredicate.filter.endAt,min:e.filterPredicate.filter.startAt,value:m,onChange:g}),(0,i.jsx)(Uf,{max:e.filterPredicate.filter.endAt,min:e.filterPredicate.filter.startAt,value:h,onChange:p})]})]})]}),n&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Wg,{height:"7"}),(0,i.jsxs)($,{css:{border:"1px solid $gray200",borderRadius:"$2",background:"$gray50",padding:"$5 $6"},direction:"column",gap:"2",children:[(0,i.jsx)(Ni,{font:"gray900 textSm medium",children:t("le_filtre_se_ba_92445")}),(0,i.jsxs)($,{direction:"column",gap:"3",children:[(0,i.jsx)(uf,{state:_?"checked":"unchecked",onClick:()=>x(!0),children:t("sur_toutes_les_40684")}),(0,i.jsxs)($,{direction:"column",gap:"2",children:[(0,i.jsx)(uf,{state:_?"unchecked":"checked",onClick:()=>x(!1),children:t("sur_certaines_a_13180")}),!_&&(0,i.jsx)($,{css:{paddingLeft:"$6"},children:(0,i.jsx)(FI,{isSearchVisible:!0,isSelectAllVisible:!0,multiple:!0,values:y,onChange:S,children:wu(e.filterPredicate.filter,t)})})]})]})]})]}),a&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Wg,{height:"7"}),(0,i.jsxs)($,{css:{border:"1px solid $gray200",borderRadius:"$2",background:"$gray50",padding:"$5 $6"},direction:"column",gap:"2",children:[(0,i.jsx)(Ni,{font:"gray900 textSm medium",children:t("le_filtre_se_ba_92445")}),(0,i.jsxs)($,{direction:"column",gap:"3",children:[(0,i.jsx)(uf,{state:j?"checked":"unchecked",onClick:()=>b(!0),children:t("sur_toutes_les_97037")}),(0,i.jsxs)($,{direction:"column",gap:"2",children:[(0,i.jsx)(uf,{state:j?"unchecked":"checked",onClick:()=>b(!1),children:t("sur_certaines_m_74733")}),!j&&(0,i.jsx)($,{css:{paddingLeft:"$6"},children:(0,i.jsx)(FI,{isSearchVisible:!0,isSelectAllVisible:!0,multiple:!0,values:v,onChange:A,children:wu(e.filterPredicate.filter,t)})})]})]})]})]}),(0,i.jsx)(Wg,{height:"7"}),(0,i.jsx)($,{children:(0,i.jsx)(pa,{disabled:!E,onClick:()=>{e.onAdd(C)},children:t("ajouter_le_filt_54222")})})]})},Zy=e=>{const t=Ei(),[n,a]=(0,d.useState)(e.filterPredicate.predicate?.operator??ht.Is),[s,o]=(0,d.useState)(e.filterPredicate.predicate?.value??""),[r,l]=(0,d.useState)(e.filterPredicate.predicate?.value2??""),[c,u]=(0,d.useState)(e.filterPredicate.predicate?.value3??""),m={operator:n,value:s,value2:r,value3:c,slug:e.filterPredicate.filter.slug},g=Oy(e.filterPredicate.filter,m);return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Uf,{label:t("jour_d_affectat_27334"),max:e.filterPredicate.filter.endAt,min:e.filterPredicate.filter.startAt,value:s,onChange:o}),(0,i.jsx)(Wg,{height:"6"}),(0,i.jsx)(uh,{children:e.filterPredicate.filter.name}),(0,i.jsx)(Wg,{height:"1"}),(0,i.jsx)(uf,{state:"is"===n?"checked":"unchecked",onClick:()=>a(ht.Is),children:t("est_25967")}),"is"===n&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Wg,{height:"1"}),(0,i.jsxs)($,{children:[(0,i.jsx)(Wg,{width:"6"}),(0,i.jsx)(hh,{min:0,shouldParseAsInt:!0,value:r,onChange:l})]}),(0,i.jsx)(Wg,{height:"1"})]}),(0,i.jsx)(Wg,{height:"3"}),(0,i.jsx)(uf,{state:"isNot"===n?"checked":"unchecked",onClick:()=>a(ht.IsNot),children:t("n_est_pas_97826")}),"isNot"===n&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Wg,{height:"1"}),(0,i.jsxs)($,{children:[(0,i.jsx)(Wg,{width:"6"}),(0,i.jsx)(hh,{min:0,shouldParseAsInt:!0,value:r,onChange:l})]}),(0,i.jsx)(Wg,{height:"1"})]}),(0,i.jsx)(Wg,{height:"3"}),(0,i.jsx)(uf,{state:"greaterThan"===n?"checked":"unchecked",onClick:()=>a(ht.GreaterThan),children:t("plus_grand_que_28412")}),"greaterThan"===n&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Wg,{height:"1"}),(0,i.jsxs)($,{children:[(0,i.jsx)(Wg,{width:"6"}),(0,i.jsx)(hh,{min:0,shouldParseAsInt:!0,value:r,onChange:l})]}),(0,i.jsx)(Wg,{height:"1"})]}),(0,i.jsx)(Wg,{height:"3"}),(0,i.jsx)(uf,{state:"greaterThanEqual"===n?"checked":"unchecked",onClick:()=>a(ht.GreaterThanEqual),children:t("_gal_ou_plus_gr_76897")}),"greaterThanEqual"===n&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Wg,{height:"1"}),(0,i.jsxs)($,{children:[(0,i.jsx)(Wg,{width:"6"}),(0,i.jsx)(hh,{min:0,shouldParseAsInt:!0,value:r,onChange:l})]}),(0,i.jsx)(Wg,{height:"1"})]}),(0,i.jsx)(Wg,{height:"3"}),(0,i.jsx)(uf,{state:"lessThan"===n?"checked":"unchecked",onClick:()=>a(ht.LessThan),children:t("plus_petit_que_35846")}),"lessThan"===n&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Wg,{height:"1"}),(0,i.jsxs)($,{children:[(0,i.jsx)(Wg,{width:"6"}),(0,i.jsx)(hh,{min:0,shouldParseAsInt:!0,value:r,onChange:l})]}),(0,i.jsx)(Wg,{height:"1"})]}),(0,i.jsx)(Wg,{height:"3"}),(0,i.jsx)(uf,{state:"lessThanEqual"===n?"checked":"unchecked",onClick:()=>a(ht.LessThanEqual),children:t("_gal_ou_plus_pe_38400")}),"lessThanEqual"===n&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Wg,{height:"1"}),(0,i.jsxs)($,{children:[(0,i.jsx)(Wg,{width:"6"}),(0,i.jsx)(hh,{min:0,shouldParseAsInt:!0,value:r,onChange:l})]}),(0,i.jsx)(Wg,{height:"1"})]}),(0,i.jsx)(Wg,{height:"3"}),(0,i.jsx)(uf,{state:"between"===n?"checked":"unchecked",onClick:()=>a(ht.Between),children:t("est_entre_born_59665")}),"between"===n&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Wg,{height:"1"}),(0,i.jsxs)($,{children:[(0,i.jsx)(Wg,{width:"6"}),(0,i.jsx)(hh,{shouldParseAsInt:!0,value:r,onChange:l}),(0,i.jsx)(Wg,{width:"3"}),(0,i.jsx)(hh,{shouldParseAsInt:!0,value:c,onChange:u})]}),(0,i.jsx)(Wg,{height:"1"})]}),(0,i.jsx)(Wg,{height:"7"}),(0,i.jsx)($,{children:(0,i.jsx)(pa,{disabled:!g,onClick:()=>{e.onAdd(m)},children:t("ajouter_le_filt_54222")})})]})},Ky=e=>{const t=Ei(),[n,a]=(0,d.useState)(e.filterPredicate.predicate?.operator??ht.Is);return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(uf,{state:"is"===n?"checked":"unchecked",onClick:()=>a(ht.Is),children:t("Public")}),(0,i.jsx)(Wg,{height:"3"}),(0,i.jsx)(uf,{state:"isNot"===n?"checked":"unchecked",onClick:()=>a(ht.IsNot),children:t("Private")}),(0,i.jsx)(Wg,{height:"7"}),(0,i.jsx)($,{children:(0,i.jsx)(pa,{onClick:()=>{e.onAdd({operator:n,value:"",slug:e.filterPredicate.filter.slug})},children:t("ajouter_le_filt_54222")})})]})},Qy=e=>{const t=Ei(),[n,a]=(0,d.useState)(e.filterPredicate.predicate?.operator??ht.Is),s=(0,d.useMemo)(()=>wu(e.filterPredicate.filter,t),[e.filterPredicate.filter]),[o,r]=(0,d.useState)(F(e.filterPredicate.predicate?.value)?e.filterPredicate.predicate.value:[]),l={operator:n,value:o,slug:e.filterPredicate.filter.slug},c=Oy(e.filterPredicate.filter,l),u=(0,d.useMemo)(()=>Array.isArray(o)?o.length:0,[o]);return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(uf,{state:"is"===n?"checked":"unchecked",onClick:()=>a(ht.Is),children:t("est_25967")}),"is"===n&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Wg,{height:"1"}),(0,i.jsx)($,{css:{paddingLeft:"$6"},children:(0,i.jsx)(FI,{hint:t("_1_s_lectionn_51286",u),isSearchVisible:!0,isSelectAllVisible:!0,multiple:!0,placeholder:t("s_lectionner_de_52380"),values:o,onChange:r,children:s})}),(0,i.jsx)(Wg,{height:"1"})]}),(0,i.jsx)(Wg,{height:"3"}),(0,i.jsx)(uf,{state:"isNot"===n?"checked":"unchecked",onClick:()=>a(ht.IsNot),children:t("n_est_pas_97826")}),"isNot"===n&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Wg,{height:"1"}),(0,i.jsx)($,{css:{paddingLeft:"$6"},children:(0,i.jsx)(FI,{hint:t("_1_s_lectionn_51286",u),isSearchVisible:!0,isSelectAllVisible:!0,multiple:!0,placeholder:t("s_lectionner_de_52380"),values:o,onChange:r,children:s})}),(0,i.jsx)(Wg,{height:"1"})]}),!0!==e.filterPredicate.filter.hideEmpty&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Wg,{height:"3"}),(0,i.jsx)(uf,{state:"isEmpty"===n?"checked":"unchecked",onClick:()=>a(ht.IsEmpty),children:t("est_vide_96759")}),(0,i.jsx)(Wg,{height:"3"}),(0,i.jsx)(uf,{state:"isNotEmpty"===n?"checked":"unchecked",onClick:()=>a(ht.IsNotEmpty),children:t("n_est_pas_vide_45804")})]}),(0,i.jsx)(Wg,{height:"7"}),(0,i.jsx)($,{children:(0,i.jsx)(pa,{disabled:!c,onClick:()=>{e.onAdd(l)},children:t("ajouter_le_filt_54222")})})]})},Xy=e=>{const t=Ei(),[n,a]=(0,d.useState)(e.filterPredicate.predicate?.operator??(e.filterPredicate.filter.isEncrypted?ht.IsEmpty:ht.Contains)),[s,o]=(0,d.useState)(e.filterPredicate.predicate?.value??""),r={operator:n,value:s,slug:e.filterPredicate.filter.slug},l=Oy(e.filterPredicate.filter,r);return(0,i.jsxs)(i.Fragment,{children:[!0!==e.filterPredicate.filter.isEncrypted&&(0,i.jsx)(uf,{state:"contains"===n?"checked":"unchecked",onClick:()=>a(ht.Contains),children:t("contient_34012")}),"contains"===n&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Wg,{height:"1"}),(0,i.jsxs)($,{children:[(0,i.jsx)(Wg,{width:"6"}),(0,i.jsx)(hh,{value:s,onChange:o})]}),(0,i.jsx)(Wg,{height:"1"})]}),!0!==e.filterPredicate.filter.isEncrypted&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Wg,{height:"3"}),(0,i.jsx)(uf,{state:"notContains"===n?"checked":"unchecked",onClick:()=>a(ht.NotContains),children:t("ne_contient_pas_85399")})]}),"notContains"===n&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Wg,{height:"1"}),(0,i.jsxs)($,{children:[(0,i.jsx)(Wg,{width:"6"}),(0,i.jsx)(hh,{value:s,onChange:o})]}),(0,i.jsx)(Wg,{height:"1"})]}),!0!==e.filterPredicate.filter.isEncrypted&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Wg,{height:"3"}),(0,i.jsx)(uf,{state:"startsWith"===n?"checked":"unchecked",onClick:()=>a(ht.StartsWith),children:t("commence_par_11056")})]}),"startsWith"===n&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Wg,{height:"1"}),(0,i.jsxs)($,{children:[(0,i.jsx)(Wg,{width:"6"}),(0,i.jsx)(hh,{value:s,onChange:o})]}),(0,i.jsx)(Wg,{height:"1"})]}),!0!==e.filterPredicate.filter.isEncrypted&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Wg,{height:"3"}),(0,i.jsx)(uf,{state:"endsWith"===n?"checked":"unchecked",onClick:()=>a(ht.EndsWith),children:t("finit_par_79657")})]}),"endsWith"===n&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Wg,{height:"1"}),(0,i.jsxs)($,{children:[(0,i.jsx)(Wg,{width:"6"}),(0,i.jsx)(hh,{value:s,onChange:o})]}),(0,i.jsx)(Wg,{height:"1"})]}),!0!==e.filterPredicate.filter.hideEmpty&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Wg,{height:"3"}),(0,i.jsx)(uf,{state:"isEmpty"===n?"checked":"unchecked",onClick:()=>a(ht.IsEmpty),children:t("est_vide_96759")}),(0,i.jsx)(Wg,{height:"3"}),(0,i.jsx)(uf,{state:"isNotEmpty"===n?"checked":"unchecked",onClick:()=>a(ht.IsNotEmpty),children:t("n_est_pas_vide_45804")})]}),e.showIsValid&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Wg,{height:"3"}),(0,i.jsx)(uf,{state:"isValid"===n?"checked":"unchecked",onClick:()=>a(ht.IsValid),children:t("est_valide_72630")}),(0,i.jsx)(Wg,{height:"3"}),(0,i.jsx)(uf,{state:"isNotValid"===n?"checked":"unchecked",onClick:()=>a(ht.IsNotValid),children:t("n_est_pas_valid_75405")})]}),(0,i.jsx)(Wg,{height:"7"}),(0,i.jsx)($,{children:(0,i.jsx)(pa,{disabled:!l,onClick:()=>{e.onAdd(r)},children:t("ajouter_le_filt_54222")})})]})},Jy=e=>{const t=Ei(),[n,a]=(0,d.useState)(e.filterPredicate.predicate?.operator??ht.Is),s=(0,d.useMemo)(()=>wu(e.filterPredicate.filter,t),[e.filterPredicate.filter]),[o,r]=(0,d.useState)(F(e.filterPredicate.predicate?.value)?e.filterPredicate.predicate.value:[]),[l,c]=(0,d.useState)(e.filterPredicate.predicate?.value2??1),u={operator:n,value:o,value2:l,slug:e.filterPredicate.filter.slug},m=Oy(e.filterPredicate.filter,u);return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(uf,{state:"is"===n?"checked":"unchecked",onClick:()=>a(ht.Is),children:t("est_25967")}),"is"===n&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Wg,{height:"1"}),(0,i.jsxs)($,{children:[(0,i.jsx)(Wg,{width:"6"}),(0,i.jsx)(FI,{isSearchVisible:!0,isSelectAllVisible:!0,multiple:!0,placeholder:t("s_lectionner_de_52380"),values:o,onChange:r,children:s})]}),(0,i.jsx)(Wg,{height:"1"})]}),(0,i.jsx)(Wg,{height:"3"}),(0,i.jsx)(uf,{state:"isNot"===n?"checked":"unchecked",onClick:()=>a(ht.IsNot),children:t("n_est_pas_97826")}),"isNot"===n&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Wg,{height:"1"}),(0,i.jsxs)($,{children:[(0,i.jsx)(Wg,{width:"6"}),(0,i.jsx)(FI,{isSearchVisible:!0,isSelectAllVisible:!0,multiple:!0,placeholder:t("s_lectionner_de_52380"),values:o,onChange:r,children:s})]}),(0,i.jsx)(Wg,{height:"1"})]}),(0,i.jsx)(Wg,{height:"3"}),(0,i.jsx)(uf,{state:"contains"===n?"checked":"unchecked",onClick:()=>a(ht.Contains),children:t("est_le_choix_07450")}),"contains"===n&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Wg,{height:"1"}),(0,i.jsxs)($,{children:[(0,i.jsx)(Wg,{width:"6"}),(0,i.jsx)(hh,{shouldParseAsInt:!0,value:l,onChange:c})]}),(0,i.jsx)(Wg,{height:"1"}),(0,i.jsxs)($,{children:[(0,i.jsx)(Wg,{width:"6"}),(0,i.jsx)(FI,{isSearchVisible:!0,isSelectAllVisible:!0,multiple:!0,placeholder:t("s_lectionner_de_52380"),values:o,onChange:r,children:s})]}),(0,i.jsx)(Wg,{height:"1"})]}),(0,i.jsx)(Wg,{height:"3"}),(0,i.jsx)(uf,{state:"isEmpty"===n?"checked":"unchecked",onClick:()=>a(ht.IsEmpty),children:t("est_vide_96759")}),(0,i.jsx)(Wg,{height:"3"}),(0,i.jsx)(uf,{state:"isNotEmpty"===n?"checked":"unchecked",onClick:()=>a(ht.IsNotEmpty),children:t("n_est_pas_vide_45804")}),(0,i.jsx)(Wg,{height:"7"}),(0,i.jsx)($,{children:(0,i.jsx)(pa,{disabled:!m,onClick:()=>{e.onAdd(u)},children:t("ajouter_le_filt_54222")})})]})},eS=e=>{const t=Ei(),n=function(e){const t=Ci(pd),n=Ci(Yl),i=Ci(bi),[a,s]=(0,d.useState)(!1);return(0,d.useEffect)(()=>{e.needLoading&&(s(!0),ey(t,n,i,e).then(()=>{s(!1)}))},[e.needLoading]),a}(e.filterPredicate.filter),a=(()=>{const{filterPredicate:t,onAdd:n}=e;switch(Cy(t.filter)){case"condition":return(0,i.jsx)(ky,{filterPredicate:t,onAdd:n});case"leader":return(0,i.jsx)(qy,{filterPredicate:t,onAdd:n});case"admin":return(0,i.jsx)(Wy,{filterPredicate:t,onAdd:n});case"privacy":return(0,i.jsx)(Ky,{filterPredicate:t,onAdd:n});case"team":return(0,i.jsx)(Yy,{filterPredicate:t,onAdd:n});case"wishedPositions":return(0,i.jsx)(Jy,{filterPredicate:t,onAdd:n});case"numberPerDay":return(0,i.jsx)(Zy,{filterPredicate:t,onAdd:n});case"campaignReply":return(0,i.jsx)(Py,{filterPredicate:t,onAdd:n});case"text":return(0,i.jsx)(Xy,{filterPredicate:t,showIsValid:!1,onAdd:n});case"phone":return(0,i.jsx)(Xy,{filterPredicate:t,showIsValid:!0,onAdd:n});case"select":return(0,i.jsx)(Qy,{filterPredicate:t,onAdd:n});case"checkbox":return(0,i.jsx)($y,{filterPredicate:t,onAdd:n});case"number":return(0,i.jsx)(Hy,{filterPredicate:t,onAdd:n});case"dateTimeRange":return(0,i.jsx)(Gy,{filterPredicate:t,onAdd:n});case"date":return(0,i.jsx)(Uy,{filterPredicate:t,onAdd:n});case"datetime":return(0,i.jsx)(By,{filterPredicate:t,onAdd:n});case"file":return(0,i.jsx)(Vy,{filterPredicate:t,onAdd:n});case"campaign":return(0,i.jsx)(wy,{filterPredicate:t,onAdd:n});case"unknown":return(0,i.jsx)("div",{children:"TODO"})}})();return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)($,{align:"center",css:{color:"$gray500",cursor:"pointer",fontSize:"$textXs",fontWeight:"$semiBold"},gap:"3",onClick:e.onBack,children:[(0,i.jsx)("i",{className:"fa-regular fa-arrow-left"}),t("retour_la_lis_63860")]}),(0,i.jsx)(Wg,{height:"4"}),(0,i.jsx)(Ni,{color:"gray800",fontSize:"textMd",fontWeight:"semiBold",children:e.filterPredicate.filter.name}),(0,i.jsx)(Wg,{height:"3"}),n?(0,i.jsx)(ua,{}):a]})};function tS(e){switch(e){case Ue.Address:return"map-location";case Ue.Text:case Ue.Textarea:return"text";case Ue.Checkbox:return"square-check";case Ue.Validation:return"check";case Ue.Select:return"list-ul";case Ue.Date:return"calendar";case Ue.Datetime:return"calendar-day";case Ue.Time:return"clock";case Ue.File:return"file";case Ue.Phone:return"phone";case Ue.Language:return"language";case Ue.Number:return"00";case Ue.Sex:return"venus-mars";case Ue.Nationality:case Ue.Country:return"flag";case Ue.DateTimeRange:return"calendar-range";case Ue.Campaign:return"paper-plane";default:return ir()}}const nS=e=>{const t=(0,d.useMemo)(()=>(0,Na.A)(e.filtersPredicates.map(({filter:e})=>e.category)),[e.filtersPredicates]),n=(0,d.useMemo)(()=>(0,Ql.A)(e.filtersPredicates,({filter:e})=>e.category),[e.filtersPredicates]);return(0,i.jsx)($,{css:{border:"1px solid $gray200",borderRadius:"$1",boxShadow:"$xs",px:"$4"},direction:"column",children:t.map((t,a)=>{const s=n[t];return(0,i.jsxs)(d.Fragment,{children:[!e.isEdit&&(0,i.jsxs)(i.Fragment,{children:[0!==a&&(0,i.jsx)(Wg,{height:"3"}),(0,i.jsx)(Ni,{css:{paddingBottom:"$2",paddingTop:"$3"},font:"gray500 textXs semiBold",children:t})]}),s.map(t=>{const{filter:n}=t;return(0,i.jsxs)($,{align:"center",css:{py:"$2"},gap:"3",children:[(0,i.jsx)($,{align:"center",css:{borderRadius:"$1",height:"32px",width:"32px"},justify:"center",children:(0,i.jsx)(la,{icon:tS(n.fieldType)})}),(0,i.jsxs)($,{css:{flex:"1",overflow:"hidden"},direction:"column",gap:"1",children:[(0,i.jsx)(Ni,{color:"gray900",css:{ellipsis:!0},fontWeight:"medium",title:n.name,width:1,children:n.name}),h(n.label)&&(0,i.jsx)(Ni,{color:"gray500",css:{ellipsis:!0},title:n.label,width:1,children:n.label})]}),e.isEdit?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(pa,{color:"white",leftIcon:"pen",size:"sm",onClick:()=>e.onEdit(t)}),(0,i.jsx)(pa,{color:"white",leftIcon:"trash-can",size:"sm",onClick:()=>e.onDelete(n.slug)})]}):(0,i.jsx)(pa,{color:"white",leftIcon:"plus",size:"sm",onClick:()=>e.onAdd(t)})]},n.slug)})]},a)})})},iS=e=>{const t=Ei(),[n,a]=(0,d.useState)(e.selectedFilterPredicate),[s,o]=(0,d.useState)((0,jy.A)(e.predicates)),r=(0,d.useCallback)(e=>{o((0,nx.jM)(t=>{const n=t.findIndex(t=>t.slug===e.slug);-1===n?t.push(e):t[n]=e})),a(null)},[o,a]),l=(0,d.useCallback)(e=>{o((0,nx.jM)(t=>{const n=t.findIndex(t=>t.slug===e);t.splice(n,1)}))},[o]),[c,u]=(0,d.useState)(""),[g,p]=function(e,t,n){const i=[],a=[];for(const s of t)if(!h(n)||m(s.name).includes(m(n))||h(s.label)&&m(s.label).includes(m(n))){const t=e.find(({slug:e})=>e===s.slug);t?i.push({filter:s,predicate:t}):a.push({filter:s,predicate:t})}return[i,a]}(s,e.possibleFilters,c);return(0,i.jsxs)(hy,{size:"sm",onClose:e.onClose,children:[(0,i.jsxs)(py,{children:[(0,i.jsx)(Wg,{height:"6"}),(0,i.jsx)(Ni,{color:"gray900",fontSize:"textXl",children:t("filtres_64574")}),h(e.subtitle)&&(0,i.jsx)(Ni,{color:"gray500",children:e.subtitle}),(0,i.jsx)(Wg,{height:"6"}),n?(0,i.jsx)(eS,{filterPredicate:n,onAdd:r,onBack:()=>{a(null)}}):(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(hh,{icon:"magnifying-glass",placeholder:t("rechercher_un_f_22061"),value:c,onChange:u}),(0,i.jsx)(Wg,{height:"6"}),s.length>0&&g.length>0&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Ni,{color:"gray900",fontSize:"textMd",fontWeight:"semiBold",children:t("liste_des_filtr_29511")}),(0,i.jsx)(Wg,{height:"2"}),(0,i.jsx)(nS,{filtersPredicates:g,isEdit:!0,onDelete:l,onEdit:e=>a(e)}),(0,i.jsx)(Wg,{height:"8"})]}),(0,i.jsx)(Ni,{color:"gray900",fontSize:"textMd",fontWeight:"semiBold",children:t("liste_des_filtr_37728")}),p.length>0&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Wg,{height:"2"}),(0,i.jsx)(nS,{filtersPredicates:p,isEdit:!1,onAdd:e=>{a(e)}})]})]}),(0,i.jsx)(Wg,{height:"6"})]}),null===n&&(0,i.jsx)(fy,{children:(0,i.jsxs)($,{gap:"3",justify:"end",children:[(0,i.jsx)(pa,{onClick:()=>{e.onFilter(s),e.onClose()},children:e.buttonText||t("filtrer_78031")}),(0,i.jsx)(pa,{color:"white",onClick:e.onClose,children:t("annuler_48254")})]})})]})},aS=e=>{const t=Ei(),{areColumnsOpen:n,clearNameCursors:a,columns:s,filtersPredicates:o,isFilterOpen:r,possibleColumns:l,predicates:c,selectedFilterPredicate:u,setAreColumnsOpen:m,setColumns:g,setIsFilterOpen:h,setPredicates:p}=Xx(),f=(0,d.useMemo)(()=>function(e){return Cu(e).groups.flatMap(e=>e.predicates)}(c),[c]),I=(0,d.useMemo)(()=>u?Ou(o).find(({groupIndex:e,predicateIndex:t})=>e===u.groupIndex&&t===u.predicateIndex)??null:null,[o,u]);return(0,i.jsxs)(i.Fragment,{children:[r&&(0,i.jsx)(iS,{buttonText:e.filtersButtonText,possibleFilters:e.filters,predicates:f,selectedFilterPredicate:I,subtitle:e.filtersSubtitle,onClose:()=>{h(!1)},onFilter:e=>{a(),p(Cu(e))}}),n&&(0,i.jsx)(Sy,{columns:l,initialSelectedColumns:s,saveButtonText:t("_diter_les_colo_39630"),searchPlaceholder:t("rechercher_un_c_86475"),subtitle:t("personnaliser_l_03763"),title:t("_dition_des_col_70300"),onClose:()=>{m(!1)},onSave:g})]})};function sS(e){return{numberOfPages:(0,d.useMemo)(()=>e?.numberOfPages??1,[e]),totalCount:(0,d.useMemo)(()=>e?.totalCount??0,[e])}}const oS=[];function rS(e,t=500){return(0,d.useCallback)((0,eI.A)(e,t),[])}const dS=e=>{const{isGridDirty:t,...n}=function(e){const{filters:t,initial:n,onChange:i}=e,[a,s]=(0,d.useState)(n.predicates),[o,r]=(0,d.useState)(n.columns),[l,c]=(0,d.useState)(n.columnsSearch),[u,m]=(0,d.useState)(n.rendering),[g,h]=(0,d.useState)(n.sort),[p,f]=(0,d.useState)(n.name||""),[I,_]=(0,d.useState)(n.name||""),[x,y]=(0,d.useState)(n.limit),[S,j]=(0,d.useState)(0),[b,v]=(0,d.useState)(!1),[A,C]=(0,d.useState)(!1),[E,T]=(0,d.useState)(!1),[R,M]=(0,d.useState)(null),D=(0,d.useCallback)(()=>{j(0)},[j]),O=rS(e=>{_(e),D()}),w=(0,d.useCallback)(e=>{i?.setName?.(e),f(e)},[i?.setName,f]),P=(0,d.useCallback)(()=>{w(""),_(""),D()},[w,_,D]),$=(0,d.useCallback)(e=>{i?.setPredicates?.(e),s(e)},[i?.setPredicates,s]),k=(0,d.useCallback)(e=>{i?.setColumns?.(e),r(e)},[i?.setColumns,r]),N=(0,d.useCallback)(e=>{i?.setColumnsSearch?.(e),c(e)},[i?.setColumnsSearch,c]),L=(0,d.useCallback)(e=>{i?.setRendering?.(e),m(e)},[i?.setRendering,m]),z=(0,d.useCallback)(e=>{i?.setLimit?.(e),y(e),D()},[i?.setLimit,y,D]),F=(0,d.useCallback)(e=>{i?.setSort?.(e),h(e),j(0)},[i?.setSort,h,j]),U=(0,d.useMemo)(()=>function(e,t){const n=new Map(t.map(e=>[e.slug,e]));return{operator:e.operator,groups:e.groups.map((e,t)=>({operator:e.operator,groupIndex:t,filtersPredicates:e.predicates.flatMap((e,i)=>{const a=n.get(e.slug);return a?[{filter:a,predicate:e,groupIndex:t,predicateIndex:i}]:[]})})).filter(e=>e.filtersPredicates.length>0)}}(a,t),[a,t]),B=(0,d.useMemo)(()=>JSON.stringify(n.predicates),[n.predicates]),G=(0,d.useMemo)(()=>JSON.stringify(n.columns),[n.columns]),V=(0,d.useMemo)(()=>JSON.stringify(n.columnsSearch),[n.columnsSearch]),W=(0,d.useMemo)(()=>JSON.stringify(n.rendering),[n.rendering]),q=(0,d.useMemo)(()=>JSON.stringify(n.sort),[n.sort]),Y=(0,d.useMemo)(()=>JSON.stringify(a)!==B||JSON.stringify(o)!==G||JSON.stringify(l)!==V||JSON.stringify(u)!==W||JSON.stringify(g)!==q,[B,a,G,o,V,l,W,u,q,g]);return{areColumnsOpen:E,clearNameCursors:P,columns:o,columnsSearch:l,filtersPredicates:U,isEditMode:b,isFilterOpen:A,isGridDirty:Y,limit:x,name:p,nameDebounced:I,offset:S,predicates:a,rendering:u,selectedFilterPredicate:R,setAreColumnsOpen:T,setColumns:k,setColumnsSearch:N,setIsEditMode:v,setIsFilterOpen:C,setLimit:z,setName:w,setNameDebounced:O,setOffset:j,setPredicates:$,setRendering:L,setSelectedFilterPredicate:M,setSort:F,sort:g}}({filters:e.filters,initial:{columns:e.columns,columnsSearch:e.columnsSearch,limit:e.limit,name:e.name,predicates:e.predicates,rendering:e.rendering,sort:e.sort},onChange:{setColumns:e.setColumns,setColumnsSearch:e.setColumnsSearch,setLimit:e.setLimit,setName:e.setName,setPredicates:e.setPredicates,setRendering:e.setRendering,setSort:e.setSort}}),a=function(e){const[t,n]=(0,d.useState)(e),[i,a]=(0,d.useState)(!1),s=(0,d.useMemo)(()=>{const e=Object.values(t).filter(e=>!0!==e.disabled),n=e.filter(e=>"checked"===e.state),i=n.map(e=>e.id),a=(0,Na.A)(e.map(({state:e})=>e)),s=2===a.length?"indeterminate":"checked"===a[0]?"checked":"unchecked";return{numberOfSelected:n.length,selectAllState:s,selecteds:n,selectedsIds:i}},[t]),o=(0,d.useRef)(null),r=(0,d.useCallback)((e,t,i)=>{const s=o.current;n(n=>{const a=i&&s?function(e,t,n){const i=Object.keys(e),a=i.indexOf(t),s=i.indexOf(n);return-1===a||-1===s?[n]:i.slice(Math.min(a,s),Math.max(a,s)+1)}(n,s,e):[e];return{...n,...Object.fromEntries(a.filter(e=>!0!==n[e]?.disabled).map(e=>[e,{...n[e],state:t}]))}}),o.current=e,"unchecked"===t&&a(!1)},[n,a]),l=(0,d.useCallback)(e=>{o.current=null,n(Object.fromEntries(Object.entries(t).filter(([e,t])=>!0!==t.disabled).map(([t,n])=>[t,{...n,state:e}]))),"unchecked"===e&&a(!1)},[t,n,a]);return{getSelectedsInput:(0,d.useCallback)((e,t)=>i?{ids:null,predicatesGroups:e??null,scope:t??null}:{ids:s.selectedsIds,predicatesGroups:null,scope:null},[i,s]),isAllSelected:i,numberOfSelected:s.numberOfSelected,selectAllState:s.selectAllState,selecteds:s.selecteds,selectedsIds:s.selectedsIds,setIsAllSelected:a,setStates:n,states:t,toggleRow:r,toggleSelectAll:l}}({}),s=function(e){const{massActions:t}=e,{columns:n,columnsSearch:i,limit:a,nameDebounced:s,offset:o,predicates:r,rendering:l,sort:c}=e.state,u=(0,d.useMemo)(()=>{const t=e.renderingLoaders?.(l);return null===t?{}:{columnsToIncludes:e.columnsToIncludes,getMassActionId:e.getMassActionId,loadDataList:e.loadDataList,loadDataListParams:e.loadDataListParams,loadRow:e.loadRow,loadRowParams:e.loadRowParams,...t}},[l,e.columnsToIncludes,e.getMassActionId,e.loadDataList,e.loadDataListParams,e.loadRow,e.loadRowParams,e.renderingLoaders]),m=(0,d.useMemo)(()=>u.columnsToIncludes?.(n,l)??{},[n,l,u.columnsToIncludes]),g=(0,d.useMemo)(()=>e.renderingParams?.(l)??{},[l,e.renderingParams]),[p,f]=(0,d.useState)(null),[I,_]=(0,d.useState)(!1),{setIsError:x}=(0,d.useContext)(wa),y=(0,d.useRef)(0),S=(0,d.useCallback)(async()=>{const t=u.loadDataList;if(!t)return;const n=++y.current;_(!0);try{const d=await t({...m,...u.loadDataListParams||{},organizationId:e.organizationId||void 0,eventId:e.eventId||void 0,name:h(s)?s:null,columnsSearch:F(i)?i:null,predicatesGroups:r,limit:a,offset:o,sort:c,...g},await gs());n===y.current&&(f({loadDataList:t,rendering:l,result:d.data}),x(!1),_(!1))}catch(e){n===y.current&&x(!0,e)}},[i,m,a,s,o,r,l,g,x,_,f,c,e.organizationId,e.eventId,u.loadDataList,u.loadDataListParams]),j=!!u.loadDataList&&p?.loadDataList===u.loadDataList&&p.rendering===l,b=j?p.result:null,[v,A]=(0,d.useState)([]),C=j?v:oS,{numberOfPages:E,totalCount:T}=sS(b?.rows),[R,M]=(0,d.useState)({}),D=(0,d.useRef)(0),O=(0,d.useCallback)(async t=>{const n=u.loadRow;if(!n)return;const i=D.current,a=()=>i!==D.current;M(e=>({...e,[t]:!0}));try{const i=(await n({...m,...u.loadRowParams||{},organizationId:e.organizationId||void 0,eventId:e.eventId||void 0,id:t},await gs())).data.row;if(a())return;A(e=>e.map(e=>e.id===t?i:e))}catch(e){if(a())return;x(!0,e)}M(e=>({...e,[t]:!1}))},[m,M,x,e.organizationId,e.eventId,u.loadRow,u.loadRowParams]),w=(0,d.useCallback)(e=>u.getMassActionId?.(e)??e.id,[u.getMassActionId]);return(0,d.useEffect)(()=>(S(),()=>{y.current++,_(!1)}),[i,m,a,s,o,r,l,g,c,e.organizationId,e.eventId,u.loadDataList]),(0,d.useEffect)(()=>{A(p?.result.rows?.nodes??[])},[p]),(0,d.useEffect)(()=>(M({}),()=>{D.current++}),[p,l,u.loadRow]),(0,d.useEffect)(()=>{u.loadDataList&&(t.setStates(Object.fromEntries(C.map(e=>[`r${w(e)}`,{id:w(e),state:"unchecked"}]))),t.setIsAllSelected(!1))},[C,t.setStates,t.setIsAllSelected]),{data:C,getMassActionId:w,idToLoading:R,isLoading:I||!!u.loadDataList&&!j,loadDataResult:b,numberOfPages:E,reload:S,reloadRow:O,totalCount:T}}({columnsToIncludes:e.columnsToIncludes,eventId:e.eventId,getMassActionId:e.getMassActionId,loadDataList:e.loadDataList,loadDataListParams:e.loadDataListParams,loadRow:e.loadRow,loadRowParams:e.loadRowParams,massActions:a,organizationId:e.organizationId,renderingLoaders:e.renderingLoaders,renderingParams:e.renderingParams,state:n});return(0,i.jsxs)(Qx.Provider,{value:{...n,...s,isSaveVisible:t,massActions:a,possibleColumns:e.possibleColumns,possibleRenderings:e.possibleRenderings,showMassActions:e.showMassActions??!1,showRowDropdown:e.showRowDropdown??!1,showRowEdit:e.showRowEdit??!1},children:[!1===e.showHeader?e.children:(0,i.jsxs)($,{css:{background:"white"},direction:"column",height:1,width:1,children:[(0,i.jsx)(cy,{renderActions:e.renderActions,renderAllSelectedText:e.renderAllSelectedText,renderControls:e.renderControls,renderPageSelectedText:e.renderPageSelectedText,renderSelectAllText:e.renderSelectAllText,showEditColumns:e.showEditColumns,showEditMode:e.showEditMode,showFilters:e.showFilters,showPredicatesBadges:e.showPredicatesBadges,showSearchColumns:e.showSearchColumns,showSelectAll:e.showSelectAll}),e.children]}),(0,i.jsx)(aS,{filters:e.filters,filtersButtonText:e.filtersButtonText,filtersSubtitle:e.filtersSubtitle})]})};var lS=n(5830);class cS extends lS.Ay{events;forms;organizations;segmentsFolders;constructor(){super("recrewteer"),this.version(6).stores({events:"id",forms:"id",organizations:"id",segmentsFolders:"id"})}}const uS=new cS;function mS(e,t,n,i){const{getLocalOrganization:a,updateLocalOrganization:s}=function(e){const t=(0,d.useCallback)(async()=>{let t=await uS.organizations.get(e);return t||(t={id:e},await uS.organizations.put(t)),t},[e]),n=(0,d.useCallback)(async n=>{const i=await t(),a=(0,Nl.A)(i,{id:e},n);return await uS.organizations.put(a),a},[e,t]);return{getLocalOrganization:t,updateLocalOrganization:n}}(e),[o,r]=(0,d.useState)(n),[l,c]=(0,d.useState)(!0),u=(0,d.useCallback)(async e=>{r(e),await s({[t]:e})},[t,r,s]);return(0,d.useEffect)(()=>{(async()=>{const e=await a();e[t]&&(i?.includes(e[t])??1)&&r(e[t]),c(!1)})()},[e,i,a,r,c]),[o,u,l]}function gS(e,t,n,i,a,s){const o=mS(n,i,a,s);return(0,d.useMemo)(()=>e?[t(e),Ih.A,!1]:o,[e,o])}function hS(e){return(0,d.useMemo)(()=>new Map(e.map(e=>[e.slug,e])),[e])}const pS=e=>{return(0,i.jsxs)(dx,{css:{cursor:"pointer",userSelect:"none",...e.css||{}},minWidth:e.minWidth,width:e.width,onClick:()=>{var t,n;e.setSort((t=e.sort,n=e.attribute,null===t||t.attribute!==n?{attribute:n,direction:Mt.Asc}:t.direction===Mt.Asc?{attribute:n,direction:Mt.Desc}:null))},children:[e.children,(0,i.jsx)(Wg,{width:"2"}),(0,i.jsx)(la,{icon:(t=e.sort,n=e.attribute,null===t||t.attribute!==n?"arrow-down-arrow-up":t.direction===Mt.Asc?"arrow-up":"arrow-down")})]});var t,n},fS=e=>(0,i.jsx)($,{align:"center",css:{borderBottom:"1px solid $gray200",borderLeft:e.bx?"1px solid $gray200":void 0,borderRight:e.bx?"1px solid $gray200":void 0,padding:"$3",...e.css},height:72,width:1,children:(0,i.jsx)(Th,{borderRadius:"$1",height:1,width:1})}),IS=e=>{const t=!!e.paginationRow;return(0,i.jsx)(ux,{children:(0,i.jsxs)($,{direction:"column",width:1,children:[(0,i.jsxs)(Ah,{css:{borderLeft:"1px solid $gray200",borderRight:"1px solid $gray200",height:"100%",overflow:"auto hidden",width:"100%","& > div:first-child":{borderStartStartRadius:e.featureFlags?.isV4?"$radii$2":void 0,borderStartEndRadius:e.featureFlags?.isV4?"$radii$2":void 0},"& > div:last-child":{borderEndEndRadius:t?void 0:"$radii$2",borderEndStartRadius:t?void 0:"$radii$2"},"& .table-header-row, & .table-row":{borderLeft:"none",borderRight:"none"},...e.css},gridtemplaterows:"44px 1fr",children:[e.headerRow,(0,i.jsx)(Ni,{css:{overflow:"auto"},children:e.children})]}),e.paginationRow]})})},_S=e=>(0,i.jsx)(pa,{color:"white",css:{background:e.active?"$gray100":"white",border:0,borderInlineStart:"1px solid $gray300",color:e.disabled?"$gray400":"$gray700",cursor:e.disabled?"not-allowed":e.cursor,fontWeight:"$medium",inlineSize:"40px",blockSize:"32px",alignItems:"center",justifyContent:"center",borderRadius:"unset"},disabled:e.disabled,textAlign:"center",onClick:()=>{e.onClick()},children:e.children}),xS=e=>{const{translate:t}=$g(),n=Sp(),a=e.limit??25,s=Ti(),o=e.offset/a,r=(0,Bl.A)(Math.max(0,o-2),Math.min(e.numberOfPages,o+3)),d=0===o,l=o===e.numberOfPages-1,c=Math.min(e.totalCount,(o+1)*a);return(0,i.jsxs)(rx,{css:{gap:"$6","@tablet":{justifyContent:"space-between"}},children:[(0,i.jsx)(Ni,{css:{order:1,display:n?"none":void 0},width:150,children:!n&&e.showLimits&&(0,i.jsxs)($,{align:"center",css:{inlineSize:"fit-content",overflow:"hidden"},gap:"4",children:[(0,i.jsx)($,{css:{border:"1px solid $gray300",inlineSize:"fit-content",overflow:"hidden",borderRadius:"$1","& > button:first-child":{borderInlineStart:"none"}},children:Kx.map((t,n)=>(0,i.jsx)(_S,{active:a===t,cursor:"pointer",disabled:!1,onClick:()=>{e.setLimit?.(t)},children:t},n))}),e.itemName&&(0,i.jsx)(N,{css:{width:150},children:t("_1_per_page_06128",e.itemName)})]})}),!n&&(e.totalCount>a?(0,i.jsxs)($,{css:{border:"1px solid $gray300",borderRadius:"$1",overflow:"hidden",order:3,"& > button:first-child":{borderInlineStart:"none"}},children:[(0,i.jsx)(_S,{active:!1,cursor:d?"default":"pointer",disabled:d,onClick:()=>e.setOffset(e.offset-a),children:(0,i.jsx)(la,{icon:"arrow-left"})}),e.numberOfPages<=7?(0,Bl.A)(0,e.numberOfPages).map(t=>(0,i.jsx)(_S,{active:o===t,cursor:"pointer",disabled:!1,onClick:()=>e.setOffset(t*a),children:t+1},t)):(0,i.jsxs)(i.Fragment,{children:[!r.includes(0)&&(0,i.jsx)(_S,{active:!1,cursor:"pointer",disabled:!1,onClick:()=>e.setOffset(0),children:"1"}),!r.includes(1)&&(0,i.jsx)(_S,{active:!1,cursor:"default",disabled:!1,onClick:Ih.A,children:(0,i.jsx)(la,{icon:"ellipsis"})}),r.map(t=>(0,i.jsx)(_S,{active:o===t,cursor:"pointer",disabled:!1,onClick:()=>e.setOffset(t*a),children:t+1},t)),!r.includes(e.numberOfPages-2)&&(0,i.jsx)(_S,{active:!1,cursor:"default",disabled:!1,onClick:Ih.A,children:(0,i.jsx)(la,{icon:"ellipsis"})}),!r.includes(e.numberOfPages-1)&&(0,i.jsx)(_S,{active:!1,cursor:"pointer",disabled:!1,onClick:()=>e.setOffset((e.numberOfPages-1)*a),children:e.numberOfPages})]}),(0,i.jsx)(_S,{active:!1,cursor:l?"default":"pointer",disabled:l,onClick:()=>e.setOffset(e.offset+a),children:(0,i.jsx)(la,{icon:"arrow-right"})})]}):(0,i.jsx)(Ni,{css:{order:3}})),n&&(0,i.jsx)($,{css:{border:"1px solid $gray300",borderRadius:"$1",overflow:"hidden",order:1,inlineSize:"fit-content","& > button:first-child":{borderInlineStart:"none"}},children:(0,i.jsx)(_S,{active:!1,cursor:d?"default":"pointer",disabled:d,onClick:()=>e.setOffset(e.offset-a),children:(0,i.jsx)(la,{icon:"arrow-left"})})}),(0,i.jsx)(Ni,{css:{order:2,flex:"1","@tablet":{order:3,flex:"unset"}},textAlign:n?"center":"end",width:150,children:n?[...s(t("page_1_of_2_92409"),(0,i.jsx)("b",{children:o+1}),(0,i.jsx)("b",{children:e.numberOfPages}))]:[...s(t(e.itemName?"_1_of_2_3_03566":"x_to_y_of_x","{1}",e.totalCount,e.itemName),(0,i.jsxs)("b",{children:[o*a+1,"–",c]}))]}),n&&(0,i.jsx)($,{css:{border:"1px solid $gray300",order:3,borderRadius:"$1",overflow:"hidden",inlineSize:"fit-content","& > button:first-child":{borderInlineStart:"none"}},children:(0,i.jsx)(_S,{active:!1,cursor:l?"default":"pointer",disabled:l,onClick:()=>e.setOffset(e.offset+a),children:(0,i.jsx)(la,{icon:"arrow-right"})})})]})},yS=e=>(0,i.jsx)(mx,{css:{borderBottomLeftRadius:"$2",borderBottomRightRadius:"$2",height:"56px",...e.css},children:e.children}),SS=({children:e,css:t,gap:n,justify:a,width:s})=>(0,i.jsx)(rx,{width:s??100,children:(0,i.jsx)($,{align:"center",className:"h-controls",css:{cursor:"pointer",display:"none",...t},gap:n??"6",height:1,justify:a,width:1,onClick:xa,children:e})}),jS=e=>{const{translate:t}=$g(),{getMassActionId:n,massActions:a,reload:s,reloadRow:o}=Xx(),{showMassActions:r,showRowDropdown:l,showRowEdit:c}=e,u=a.states[`r${n(e.row)}`]?.state??"unchecked",m=d.useCallback(()=>{o(e.row.id)},[e.row.id,o]),g=l||c;return(0,i.jsxs)(mx,{css:{background:"checked"===u?"$primary100":"white","&:hover":{background:"checked"===u?"$primary100":"$gray100"}},onMouseLeave:e=>{Ap(e.target)},children:[r&&(0,i.jsx)(rx,{justify:"center",width:48,children:(0,i.jsx)(Lf,{state:u,onClick:(t,i)=>{a.toggleRow(`r${n(e.row)}`,t,i.shiftKey)}})}),e.selectedColumns.map(t=>(0,i.jsx)(d.Fragment,{children:e.renderCell(t,e.row,m)},t.slug)),g&&(0,i.jsxs)(SS,{justify:"center",children:[c&&e.getEditPath&&(0,i.jsxs)(E_,{children:[(0,i.jsx)(M_,{children:(0,i.jsx)(Ni,{children:(0,i.jsx)(la,{icon:"pen",to:e.getEditPath(e.row)})})}),(0,i.jsx)(R_,{placement:"top",children:t("_diter_62574")})]}),l&&e.renderRowDropdown?.(e.row,s)]}),e.renderRowPanels?.(e.row,m)]})},bS=e=>{const{columns:t,data:n,idToLoading:a,isLoading:s,limit:o,massActions:r,numberOfPages:l,offset:c,possibleColumns:u,setLimit:m,setOffset:g,setSort:h,sort:p,totalCount:f,...I}=Xx(),_=e.showMassActions??I.showMassActions,x=e.showRowDropdown??I.showRowDropdown,y=e.showRowEdit??I.showRowEdit,S=d.useMemo(()=>t.flatMap(e=>(0,po.A)([u.find(t=>t.slug===e)])),[t,u]);return(0,i.jsx)($,{css:{flex:"1",overflow:"hidden"},width:1,children:(0,i.jsx)(IS,{"aria-busy":s,headerRow:(0,i.jsxs)(lx,{children:[_&&(0,i.jsx)(dx,{justify:"center",width:48,children:(0,i.jsx)(Lf,{state:r.selectAllState,onClick:r.toggleSelectAll})}),S.map(e=>e.isSortable?(0,i.jsx)(pS,{attribute:e.sortAttribute,minWidth:e.minWidth,setSort:h,sort:p,width:e.width,children:(0,i.jsx)(Ni,{css:{ellipsis:!0},title:e.name,children:e.name})},e.slug):(0,i.jsx)(dx,{minWidth:e.minWidth,width:e.width,children:(0,i.jsx)(Ni,{css:{ellipsis:!0},title:e.name,children:e.name})},e.slug)),(x||y)&&(0,i.jsx)(dx,{width:100})]}),paginationRow:(0,i.jsx)(yS,{children:(0,i.jsx)(xS,{limit:o,numberOfPages:l,offset:c,setLimit:m,setOffset:g,showLimits:!0,totalCount:f})}),children:s?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(fS,{}),(0,i.jsx)(fS,{}),(0,i.jsx)(fS,{})]}):n.map(t=>a[t.id]?(0,i.jsx)(fS,{},t.id):(0,i.jsx)(jS,{getEditPath:e.getEditPath,renderCell:e.renderCell,renderRowDropdown:e.renderRowDropdown,renderRowPanels:e.renderRowPanels,row:t,selectedColumns:S,showMassActions:_,showRowDropdown:x,showRowEdit:y},t.id))})})};function vS(e,t,n){if(t.startsWith("form_inserted_at")){const i=parseInt(t.substring(17),10);if(isNaN(i))return"";{const t=n.find(({form:e})=>e?.id===i);return t?e.toLocaleString(t.insertedAt.toLocal(),Za.DateTime):""}}return""}const AS=j($,{gap:"$3",variants:{avatarOnTop:{true:{flexDirection:"column",gap:"$2"},false:{alignItems:"center",flexDirection:"row"}}}}),CS=e=>{const{params:{organizationId:t,eventId:n}}=$g(),a=d.useMemo(()=>h(e.userInfo.name)?e.userInfo.name:"-",[e.userInfo.name]),s=()=>(0,i.jsx)(Ni,{color:e.disabled?"gray300":"gray800",css:{ellipsis:""},disabled:e.disabled,fontWeight:"medium",title:a,children:a});return(0,i.jsxs)(AS,{avatarOnTop:{"@initial":!!e.badge,"@tablet":!1},width:1,children:[(0,i.jsx)(Fp,{email:e.userInfo.email,image:e.userInfo.picture?.url,name:e.userInfo.name,size:e.size||40}),(0,i.jsxs)($,{css:{flex:"1",overflow:"hidden"},direction:"column",justify:"center",children:[(0,i.jsxs)($,{align:"center",gap:"2",children:[e.isClickDisabled?s():(0,i.jsx)(Oh,{to:e.clickPath??Pg.MEMBER_INFORMATION({organizationId:t,eventId:n,userInfoId:e.userInfo.id}),children:s()}),(0,i.jsx)(Ni,{css:{flexShrink:0},children:e.badge})]}),(0,i.jsx)(Ni,{color:e.disabled?"gray300":"gray500",css:{ellipsis:""},fontSize:"textSm",title:e.userInfo.email,children:e.areContactLinksEnabled?(0,i.jsx)(Oh,{css:{fontWeight:"normal"},to:`mailto:${e.userInfo.email}`,children:e.userInfo.email}):(0,i.jsx)(i.Fragment,{children:e.userInfo.email})}),e.showPhoneNumber&&(0,i.jsx)(Ni,{color:e.disabled?"gray300":"gray500",css:{ellipsis:""},fontSize:"textSm",title:e.userInfo.phone?.internationalFormat,children:e.areContactLinksEnabled?(0,i.jsx)(Oh,{css:{fontWeight:"normal"},to:`tel:${e.userInfo.phone?.internationalFormat}`,children:e.userInfo.phone?.internationalFormat}):(0,i.jsx)(i.Fragment,{children:e.userInfo.phone?.internationalFormat})})]})]})},ES=e=>{const t=Ci(bd),{isEditMode:n}=Xx(),a=t.getValue(e.customField,e.fields),s=t.getValueString(e.customField,e.fields),o=!0===a?"checked":!1===a?"unchecked":"indeterminate";return n&&e.updatable?(0,i.jsxs)(rx,{css:{border:"2px solid transparent","& > .h-checkbox-cell-hover":{display:"none"},"&:hover":{border:"2px solid $primary500"},"&:hover > .h-checkbox-cell-default":{display:"none"},"&:hover > .h-checkbox-cell-hover":{display:"block"}},minWidth:e.column.minWidth,width:e.column.width,onClick:xa,children:[(0,i.jsx)(Ni,{className:"h-checkbox-cell-default",children:s}),(0,i.jsx)(Ni,{className:"h-checkbox-cell-hover",children:(0,i.jsx)(Lf,{state:o,onClick:async t=>{await e.mutate("checked"===t,e.customField.slug),e.reload()}})})]}):(0,i.jsx)(rx,{css:{border:"2px solid transparent"},minWidth:e.column.minWidth,width:e.column.width,children:s})};class TS extends Error{}function RS(e,t){const n=Ci(Td);return(0,d.useCallback)(i=>{const a=n.getValidationRuleError(e,i);return a?Promise.reject(new TS(a)):t(i,e.slug)},[e,t])}const MS="h-update-cell-open",DS=e=>{const t=Ei(),n=(0,d.useRef)(as()),[a,s]=(0,d.useState)(!1),[o,r]=(0,d.useState)(e.initialValue),[l,c]=(0,d.useState)(!1),[u,m]=(0,d.useState)(null),g=(0,d.useCallback)(e=>{r(e),m(null)},[]),h=(0,d.useCallback)(t=>{s(t),document.body.dispatchEvent(new CustomEvent(MS,{bubbles:!0,detail:{uuid:n.current}})),e.onStateChange?.(t)},[s,e.onStateChange]),p=(0,d.useCallback)(e=>{e.detail.uuid!==n.current&&s(!1)},[s]),f=(0,d.useCallback)(()=>{h(!1),g(e.initialValue)},[e.initialValue,h,g]),I=(0,d.useCallback)(async()=>{c(!0);try{await e.onSave(o)}catch(e){if(!(e instanceof TS))throw e;m(e.message)}finally{c(!1)}},[e.onSave,o]);return(0,d.useEffect)(()=>(document.addEventListener(MS,p),()=>{document.removeEventListener(MS,p)}),[p]),(0,i.jsxs)(Ep,{doNotCloseOnOtherOpen:!0,isOpen:a,onStateChange:h,children:[(0,i.jsx)(Lp,{children:(0,i.jsx)(rx,{css:{...e.css,border:"2px solid transparent",cursor:"text","&:hover":{border:"2px solid $primary700"}},minWidth:e.column.minWidth,width:e.column.width,onClick:xa,children:"function"==typeof e.renderValue?e.renderValue():e.renderValue})}),(0,i.jsxs)(Np,{css:{padding:"0",overflowBlock:"auto",maxBlockSize:"50vh"},placement:"bottom-start",width:380,children:[(0,i.jsx)($,{css:{padding:"$4 $6"},onKeyDown:e=>{"Enter"===e.key&&I()},children:e.renderInput(o,r,u)}),(0,i.jsxs)($,{align:"center",css:{borderTop:"1px solid $gray200",padding:"$4 $6"},gap:"4",justify:"end",children:[(0,i.jsx)(Ni,{css:{cursor:"pointer"},font:"gray700 textSm medium",onClick:f,children:t("annuler_48254")}),(0,i.jsx)(pa,{isLoading:l,size:"sm",onClick:I,children:t("appliquer_05753")})]})]})]})},OS=e=>{const{isEditMode:t}=Xx();return t&&e.updatable?(0,i.jsx)(DS,{column:e.column,initialValue:e.initialValue,renderInput:e.renderInput,renderValue:e.renderValue,onSave:async t=>{await e.mutate(t),e.reload()}}):(0,i.jsx)(rx,{css:{border:"2px solid transparent"},minWidth:e.column.minWidth,width:e.column.width,children:"function"==typeof e.renderValue?e.renderValue():e.renderValue})},wS=e=>{const t=Ci(bd),n=t.getValueString(e.customField,e.fields),a=(0,d.useMemo)(()=>{const n=t.getValue(e.customField,e.fields);return h(n)?$a.c9.fromISO(n,{zone:"utc"}):n},[]),s=RS(e.customField,e.mutate);return(0,i.jsx)(OS,{column:e.column,initialValue:a,mutate:s,reload:e.reload,renderInput:(t,n,a)=>(0,i.jsx)(Uf,{hint:a,label:e.customField.name,state:h(a)?"error":"active",value:t,onChange:n}),renderValue:n,updatable:e.updatable})},PS=e=>{const t=Ci(bd),n=t.getValueString(e.customField,e.fields),a=(0,d.useMemo)(()=>{const n=t.getValue(e.customField,e.fields);return h(n)?$a.c9.fromISO(n,{zone:"utc"}):n},[]),s=RS(e.customField,e.mutate);return(0,i.jsx)(OS,{column:e.column,initialValue:a,mutate:s,reload:e.reload,renderInput:(t,n,a)=>(0,i.jsx)(Gf,{hint:a,label:e.customField.name,state:h(a)?"error":"active",value:t,onChange:n}),renderValue:n,updatable:e.updatable})},$S=e=>{const{params:{organizationId:t}}=$g(),n=Ci(bd),a=n.getValueString(e.customField,e.fields,{fileReturnValue:"name"}),s=n.getValueString(e.customField,e.fields,{fileReturnValue:"url"}),o=(0,d.useMemo)(()=>n.getValue(e.customField,e.fields),[e.customField,e.fields]),r=RS(e.customField,e.mutate),l=e.customField.fileType===Fe.Picture,c=e.customField.fieldProperty===ke.Picture?e.avatarUser:void 0;return(0,i.jsx)(OS,{column:e.column,initialValue:o,mutate:r,reload:e.reload,renderInput:(n,a)=>l?(0,i.jsx)(bI,{allowCrop:!0,label:e.customField.name,organizationId:t,value:n,onChange:a}):(0,i.jsx)(xI,{accept:[Yf.Images,Yf.Pdf],acl:"private",label:e.customField.name,organizationId:t,value:n,onChange:a}),renderValue:()=>l?(h(s)||c)&&(0,i.jsx)(Fp,{email:c?.email,image:s,name:c?.name,size:32}):(0,i.jsx)(Oh,{css:{fontWeight:"$regular"},to:s,children:a}),updatable:e.updatable})},kS=e=>{const t=Ci(bd),n=t.getValueString(e.customField,e.fields),a=(0,d.useMemo)(()=>t.getValue(e.customField,e.fields)||0,[e.customField,e.fields]),s=RS(e.customField,e.mutate);return(0,i.jsx)(OS,{column:e.column,initialValue:a,mutate:s,reload:e.reload,renderInput:(t,n,a)=>(0,i.jsx)(hh,{hint:a,label:e.customField.name,shouldParseAsInt:!0,state:h(a)?"error":"active",value:t,onChange:n}),renderValue:n,updatable:e.updatable})},NS=e=>{const t=Ci(bd),n=Ci(rd),a=t.getValueString(e.customField,e.fields),s=(0,d.useMemo)(()=>{const i=t.getValue(e.customField,e.fields),a=n.basePhoneInputDefault();return{country:i?.country||a.country,code:i?.code||a.code,number:i?.number||a.number}},[e.fields]),o=RS(e.customField,e.mutate);return(0,i.jsx)(OS,{column:e.column,initialValue:s,mutate:o,reload:e.reload,renderInput:(t,n)=>(0,i.jsx)(TI,{label:e.customField.name,value:t,onChange:n}),renderValue:a,updatable:e.updatable})},LS=e=>(0,i.jsxs)($,{align:"center",gap:"2",children:[(0,i.jsx)(Ni,{css:{background:e.color,borderRadius:"16px",flex:"0 0 auto",overflow:"hidden"},height:16,width:16}),(0,i.jsx)(Ni,{css:{clamp:2,minWidth:0,wordBreak:"break-word"},title:e.children,children:e.children})]});let zS=null;function FS(e,{fontSize:t,fontWeight:n}={}){zS||=document.createElement("canvas");const i=zS.getContext("2d");return i.font=`${n||"400"} ${t||"14px"} 'Open Sans`,i.measureText(e).width}const US=({badge:e})=>(0,i.jsx)(xf,{color:e.color,count:e.count,css:{cursor:e.onClick?"pointer":"inherit"},leftIcon:e.icon?qn.includes(e.icon)?da(e.icon):e.icon:void 0,size:"md",onClick:e.onClick,children:e.text}),BS=({badges:e})=>(0,i.jsxs)(Ep,{children:[(0,i.jsx)(Lp,{children:(0,i.jsx)(xf,{cursor:"pointer",size:"md",children:`+${e.length}`})}),(0,i.jsx)(Np,{css:{flexWrap:"wrap",gap:"$2",overflow:"auto",padding:"$4",zIndex:100},maxHeight:300,placement:"top-end",width:400,children:e.map(e=>(0,i.jsx)($,{children:(0,i.jsx)(US,{badge:e})},e.id))})]}),GS=e=>{const[t,n]=(0,d.useState)(0),a=(0,d.useCallback)(e=>{e&&n(e.getBoundingClientRect().width)},[]),s=(0,d.useMemo)(()=>e.badges.some(e=>"number"==typeof e.count||"string"==typeof e.count),[e.badges]),o=(0,d.useMemo)(()=>e.badges.some(e=>!!e.icon),[e.badges]),r=(0,d.useMemo)(()=>(s?28:0)+(o?12:0)+20,[s,o]),l=(0,d.useMemo)(()=>{const t=e.badges.map(e=>({...e,textWidth:Math.floor(FS(e.text,{fontSize:"12px"}))+r}));return!0===e.doNotSort?t:(0,ho.A)(t,({textWidth:e})=>e)},[r,e.badges,e.doNotSort]),[c,u]=(0,d.useMemo)(()=>{let e=37;const n=[],i=[];for(const a of l)e+=a.textWidth+8,eF(u),[u]);return(0,i.jsxs)($,{ref:a,align:"center",css:{cursor:e.onClick?"pointer":"inherit","&:hover":{color:"black"}},gap:"2",height:1,width:1,onClick:t=>{e.onClick&&F(l)&&(xa(t),e.onClick())},children:[c.map(e=>(0,i.jsx)(US,{badge:e},e.id)),m&&(e.onClick?(0,i.jsx)(xf,{css:{cursor:"pointer"},size:"md",children:"+"+(l.length-c.length)}):(0,i.jsx)(BS,{badges:u}))]})},VS=e=>{const t=Ei(),n=Ci(bd),a=(0,d.useMemo)(()=>{if(e.customField.canSelectMultiple){const t=n.getSelectCustomFieldValues(e.customField,e.fields);if(e.customField.listType==Ke.Dot)return(0,i.jsx)($,{align:"center",gap:"3",wrap:"wrap",children:t.map(({value:e,color:t},n)=>(0,i.jsx)(LS,{color:t||"",children:e},n))});{const n=t.map(({value:t,color:n})=>({id:t,color:e.customField.listType===Ke.Badge?n||"":"gray",icon:null,text:t}));return(0,i.jsx)(GS,{badges:n})}}{const t=n.getValueString(e.customField,e.fields);if(h(t)){if(e.customField.listType===Ke.Default)return t;{const a=n.getValue(e.customField,e.fields),s=e.customField.values.find(({id:e})=>e===a)?.color??"";return e.customField.listType===Ke.Dot?(0,i.jsx)(LS,{color:s,children:t}):(0,i.jsx)(xf,{color:s,children:t})}}return""}},[n,e.customField,e.fields]),s=(0,d.useMemo)(()=>{const t=n.getValue(e.customField,e.fields);return e.customField.canSelectMultiple?F(t)?t:[]:t||""},[n,e.customField,e.fields]),o=ZI(e.customField),r=RS(e.customField,e.mutate);return(0,i.jsx)(OS,{column:e.column,initialValue:s,mutate:r,reload:e.reload,renderInput:(n,a)=>e.customField.canSelectMultiple?(0,i.jsx)(FI,{isSearchVisible:!0,isSelectAllVisible:!0,label:e.customField.name,multiple:!0,renderOnPortal:!0,values:n,onChange:a,children:o}):(0,i.jsx)(FI,{isSearchVisible:!0,label:e.customField.name,multiple:!1,placeholder:t("choisir_une_val_00277"),renderOnPortal:!0,values:[n],onChange:e=>{F(e)&&a(e[0])},children:o}),renderValue:a,updatable:e.updatable})},WS=e=>{const t=Ci(bd).getValueString(e.customField,e.fields),n=RS(e.customField,e.mutate);return(0,i.jsx)(OS,{column:e.column,initialValue:t,mutate:n,reload:e.reload,renderInput:(t,n,a)=>(0,i.jsx)(qI,{hint:a,label:e.customField.name,state:h(a)?"error":"active",value:t,onChange:n,onKeyDown:e=>{e.stopPropagation(),e.nativeEvent.stopImmediatePropagation()}}),renderValue:t,updatable:e.updatable})},qS=e=>{const t=Ci(bd).getValueString(e.customField,e.fields),n=RS(e.customField,e.mutate),{isEditMode:a}=Xx(),s="string"==typeof e.clickPath&&(e.column.slug===ke.FirstName||e.column.slug===ke.LastName),o=s&&!a;return(0,i.jsx)(OS,{column:e.column,initialValue:t,mutate:n,reload:e.reload,renderInput:(t,n,a)=>(0,i.jsx)(hh,{autoFocus:!0,hint:a,label:e.customField.name,state:h(a)?"error":"active",value:t,onChange:n}),renderValue:()=>o?(0,i.jsx)(Oh,{to:e.clickPath,children:t}):(0,i.jsx)(Ni,{fontWeight:s?"medium":"inherit",children:t}),updatable:e.updatable})},YS=e=>{const t=Ci(bd),n=t.getValueString(e.customField,e.fields),a=(0,d.useMemo)(()=>t.getValueString(e.customField,e.fields),[]),s=RS(e.customField,e.mutate);return(0,i.jsx)(OS,{column:e.column,initialValue:a,mutate:s,reload:e.reload,renderInput:(t,n)=>(0,i.jsx)(Wf,{label:e.customField.name,value:t,onChange:n}),renderValue:n,updatable:e.updatable})},HS=e=>{const t=Ci(bd);return e.customField?.fieldType===Le.Checkbox?(0,i.jsx)(ES,{column:e.column,customField:e.customField,fields:e.fields,mutate:e.mutate,reload:e.reload,updatable:e.updatable}):e.customField?.fieldType===Le.Date?(0,i.jsx)(wS,{column:e.column,customField:e.customField,fields:e.fields,mutate:e.mutate,reload:e.reload,updatable:e.updatable}):e.customField?.fieldType===Le.Phone?(0,i.jsx)(NS,{column:e.column,customField:e.customField,fields:e.fields,mutate:e.mutate,reload:e.reload,updatable:e.updatable}):e.customField?.fieldType===Le.Select||e.customField?.fieldType===Le.Country||e.customField?.fieldType===Le.Language||e.customField?.fieldType===Le.Sex||e.customField?.fieldType===Le.Nationality?(0,i.jsx)(VS,{column:e.column,customField:e.customField,fields:e.fields,mutate:e.mutate,reload:e.reload,updatable:e.updatable}):e.customField?.fieldType===Le.Text?(0,i.jsx)(qS,{clickPath:e.clickPath,column:e.column,customField:e.customField,fields:e.fields,mutate:e.mutate,reload:e.reload,updatable:e.updatable}):e.customField?.fieldType===Le.Textarea?(0,i.jsx)(WS,{column:e.column,customField:e.customField,fields:e.fields,mutate:e.mutate,reload:e.reload,updatable:e.updatable}):e.customField?.fieldType===Le.Number?(0,i.jsx)(kS,{column:e.column,customField:e.customField,fields:e.fields,mutate:e.mutate,reload:e.reload,updatable:e.updatable}):e.customField?.fieldType===Le.File?(0,i.jsx)($S,{avatarUser:e.avatarUser,column:e.column,customField:e.customField,fields:e.fields,mutate:e.mutate,reload:e.reload,updatable:e.updatable}):e.customField?.fieldType===Le.Datetime?(0,i.jsx)(PS,{column:e.column,customField:e.customField,fields:e.fields,mutate:e.mutate,reload:e.reload,updatable:e.updatable}):e.customField?.fieldType===Le.Time?(0,i.jsx)(YS,{column:e.column,customField:e.customField,fields:e.fields,mutate:e.mutate,reload:e.reload,updatable:e.updatable}):(0,i.jsx)(rx,{children:e.customField?t.getValueString(e.customField,e.fields,{fileReturnValue:"name"}):""})},ZS=e=>{const{params:{organizationId:t,eventId:n}}=$g(),{isEditMode:a}=Xx(),{mutate:s}=Os(),o=(0,d.useCallback)(i=>s({organizationId:t,eventId:n,userInfoId:e.userInfo.id,email:i}),[e.userInfo,s]);return(0,i.jsx)(OS,{column:e.column,initialValue:e.userInfo.email,mutate:o,reload:e.reload,renderInput:(t,n)=>(0,i.jsx)(hh,{isEmail:!0,label:e.column.name,value:t,onChange:n}),renderValue:()=>"string"!=typeof e.clickPath||a?(0,i.jsx)(Ni,{fontWeight:"medium",children:e.userInfo.email}):(0,i.jsx)(Oh,{to:e.clickPath,children:e.userInfo.email}),updatable:e.updatable})},KS=e=>{const{translate:t}=$g(),{isEditMode:n}=Xx(),a=(0,d.useMemo)(()=>({firstName:e.userInfo.fields.firstName||"",lastName:e.userInfo.fields.lastName||""}),[e.userInfo]),s=(0,d.useCallback)(async t=>{await e.mutate(t.firstName,"firstName"),await e.mutate(t.lastName,"lastName"),e.reload()},[e.mutate,e.reload]);return n&&e.updatable?(0,i.jsx)(DS,{column:e.column,initialValue:a,renderInput:(e,n)=>(0,i.jsxs)($,{direction:"column",gap:"2",width:1,children:[(0,i.jsx)(hh,{label:t("pr_nom_66988"),value:e.firstName,onChange:t=>{n({...e,firstName:t})}}),(0,i.jsx)(hh,{label:t("last_name"),value:e.lastName,onChange:t=>{n({...e,lastName:t})}})]}),renderValue:()=>(0,i.jsx)(CS,{clickPath:e.clickPath,isClickDisabled:!0,size:32,userInfo:e.userInfo}),onSave:s}):(0,i.jsx)(rx,{css:{border:"2px solid transparent"},minWidth:e.column.minWidth,width:e.column.width,children:(0,i.jsx)(CS,{clickPath:e.clickPath,size:32,userInfo:e.userInfo})})},QS=e=>{const t=Ei(),n=(0,d.useMemo)(()=>function(e,t){if(e){const n=(e.usersOrganizations||[]).map(e=>({id:`uo-${e.id}`,color:"gray",icon:e.role.type===Et.OrganizationAdmin?"gem":"glasses-round",text:`${e.role.name}`})).concat((e.usersEvents||[]).map(e=>({id:`ue-${e.id}`,color:"gray",icon:e.role.type===Et.EventAdmin?"gem":"glasses-round",text:`${e.event.name} - ${e.role.name}`}))).concat((e.usersDelegations||[]).map(e=>({id:`ud-${e.id}`,color:"gray",icon:"user-group",text:`${e.delegation.name} - ${t("responsable_de_70462")}`}))).concat((e.usersDelegationsCategories||[]).map(e=>({id:`udc-${e.id}`,color:"gray",icon:"user-group",text:`${e.delegationCategory.name} - ${e.role.name}`}))).concat((e.usersPositions||[]).map(e=>({id:`up-${e.id}`,color:"gray",icon:"sitemap",text:`${e.position.name} - ${e.role.name}`}))).concat((e.usersPositionsCategories||[]).map(e=>({id:`upc-${e.id}`,color:"gray",icon:"sitemap",text:`${e.positionCategory.name} - ${e.role.name}`})));return(0,yr.A)(n,({text:e})=>e)}return[]}(e.userPermissions,t),[e.userPermissions]);return(0,i.jsx)(rx,{minWidth:e.minWidth,width:e.width,children:(0,i.jsx)(GS,{badges:n,doNotSort:!0})})};function XS(e){return(0,ho.A)(e,e=>m(e.name)).filter(e=>F(e.accreditationsProfiles)).map(e=>(0,i.jsx)("optgroup",{label:e.name,children:(0,ho.A)(e.accreditationsProfiles,e=>m(e.name)).map(e=>(0,i.jsx)("option",{value:e.id,children:e.name},e.id))},e.id))}const JS=e=>{const{translate:t}=$g(),{mutate:n}=function(e={}){return Mi("mutation VolunteersRegistrationsMassAccreditationProfileUpdate(\n $eventId: EventId!\n $massProfileUpdate: MassAccreditationProfileUpdateInput!\n) {\n numberOfMembers: volunteersRegistrationsMassAccreditationProfileUpdate(\n eventId: $eventId\n massProfileUpdate: $massProfileUpdate\n )\n}\n",e)}(),{isEditMode:a}=Xx(),s=(0,d.useMemo)(()=>(0,po.A)([e.volunteerRegistration.accreditationProfile?.id]),[e.volunteerRegistration]),[o,r]=(0,d.useState)(!0),[l,c]=(0,d.useState)(null),u=(0,d.useMemo)(()=>Kp((0,po.A)([e.volunteerRegistration.accreditationProfile])),[e.volunteerRegistration.accreditationProfile]),m=(0,d.useCallback)(async t=>{if(t&&o){const{event:t}=await(n={eventId:e.eventId},i=await gs(),ys("query EventAccreditationsProfiles($eventId: EventId!) {\n event(id: $eventId) {\n accreditationsProfilesCategories {\n id\n name\n\n accreditationsProfiles {\n id\n name\n color\n icon\n }\n }\n }\n}\n",{variables:n,token:i||void 0,fragments:[]})),a=XS(t.accreditationsProfilesCategories);c(a),r(!1)}var n,i},[e.eventId,o]),g=(0,d.useCallback)(async t=>{U(t)?await n({eventId:e.eventId,massProfileUpdate:{selecteds:{ids:[e.volunteerRegistration.userInfo.id]},strategy:Je.Delete}}):await n({eventId:e.eventId,massProfileUpdate:{accreditationProfileId:t[0],selecteds:{ids:[e.volunteerRegistration.userInfo.id]},strategy:Je.Replace}}),e.reload()},[n,e.eventId,e.volunteerRegistration,e.reload]);return a&&e.updatable?(0,i.jsx)(DS,{column:e.column,css:{gap:"$2"},initialValue:s,renderInput:(e,n)=>o?(0,i.jsxs)($,{direction:"column",gap:"1",width:1,children:[(0,i.jsx)(Th,{borderRadius:"$1",height:20,width:1}),(0,i.jsx)(Th,{borderRadius:"$1",height:40,width:1})]}):(0,i.jsx)(FI,{isSearchVisible:!0,label:t("profil_d_accr_d_02274"),multiple:!1,renderOnPortal:!0,values:e,onChange:n,children:l}),renderValue:()=>(0,i.jsx)(GS,{badges:u}),onSave:g,onStateChange:m}):(0,i.jsx)(rx,{css:{border:"2px solid transparent"},minWidth:e.column.minWidth,width:e.column.width,children:(0,i.jsx)(GS,{badges:u})})},ej=({column:e,eventId:t,onClick:n,reload:a,updatable:s,volunteerRegistration:o})=>{const r=Ei(),{mutate:l}=bs(),{mutate:c}=function(e={}){return Mi("mutation VolunteersRegistrationsMassAccreditationStateUpdate(\n $eventId: EventId!\n $massStateUpdate: MassAccreditationStateUpdateInput!\n) {\n numberOfMembers: volunteersRegistrationsMassAccreditationStateUpdate(\n eventId: $eventId\n massStateUpdate: $massStateUpdate\n )\n}\n",e)}(),u=Ci(pd),{isEditMode:m}=Xx(),[g,h]=(0,d.useState)(!0),[p,f]=(0,d.useState)(null),I=(0,d.useMemo)(()=>o?.accreditationsUsersInfos||[],[o]),_=(0,d.useMemo)(()=>qp(I),[I]),x=(0,d.useMemo)(()=>I.map(e=>e.accreditationSlot.id),[I]),y=(0,d.useCallback)(async e=>{if(e&&g){const{event:e}=await ws({eventId:t,loadIsBlocked:!0},await gs()),n=Jx(u,e.accreditationsCategories,{useAccreditationDisplay:!0,useIsBlocked:!0});f(n),h(!1)}},[u,t,g]),S=(0,d.useCallback)(async e=>{F(e)?await l({eventId:t,massAccredit:{accreditationsSlotsIds:e,selecteds:{ids:[o.userInfo.id]},strategy:Je.Replace}}):await c({eventId:t,massStateUpdate:{selecteds:{ids:[o.userInfo.id]},state:J.WaitingAccreditation}}),a()},[t,o,l,a]);return m&&s?(0,i.jsx)(DS,{column:e,css:{gap:"$2"},initialValue:x,renderInput:(e,t)=>g?(0,i.jsxs)($,{direction:"column",gap:"1",width:1,children:[(0,i.jsx)(Th,{borderRadius:"$1",height:20,width:1}),(0,i.jsx)(Th,{borderRadius:"$1",height:40,width:1})]}):(0,i.jsx)(FI,{isSearchVisible:!0,label:r("accr_ditations_39450"),multiple:!0,renderOnPortal:!0,values:e,onChange:t,children:p}),renderValue:()=>(0,i.jsx)(GS,{badges:_,doNotSort:!0}),onSave:S,onStateChange:y}):(0,i.jsx)(rx,{css:{border:"2px solid transparent"},minWidth:e.minWidth,width:e.width,children:(0,i.jsx)(GS,{badges:_,doNotSort:!0,onClick:n})})},tj=e=>{const t=(0,d.useMemo)(()=>(0,yr.A)(e.volunteerRegistration?.accreditationsUsersInfos??[],e=>e.accreditationSlot.accreditationCategory.id).map(e=>({id:e.accreditationSlot.accreditationCategory.id,color:"gray",icon:null,text:e.accreditationSlot.accreditationCategory.name})),[e.volunteerRegistration]);return(0,i.jsx)(rx,{minWidth:e.column.minWidth,width:e.column.width,children:(0,i.jsx)(GS,{badges:t})})};function nj(e){switch(e){case Bt.Assigned:return{color:"success",leftIcon:"check"};case Bt.Refused:return{color:"error",leftIcon:"xmark"};case Bt.PreAssigned:return{color:"pink",leftIcon:"wand-magic-sparkles"};case Bt.WaitingAssignment:return{color:"warning",leftIcon:"hourglass-empty"};case Bt.NotApplicable:return{color:"gray",leftIcon:"infinity"};default:return ir()}}function ij(e){switch(e){case J.Accredited:return{color:"success",leftIcon:"check"};case J.AutoAccredited:return{color:"success",leftIcon:"bolt-auto"};case J.Refused:return{color:"error",leftIcon:"xmark"};case J.WaitingAccreditation:return{color:"warning",leftIcon:"hourglass-empty"};case J.NotApplicable:return{color:"gray",leftIcon:"infinity"};default:return ir()}}const aj=e=>{const t=Ei(),{mutate:n}=zs();return(0,i.jsx)($,{css:{cursor:"pointer",padding:"$3","&:hover":{background:"$gray100"}},onClick:async()=>{await n({eventId:e.eventId,volunteerRegistrationId:e.volunteerRegistrationId,slug:"accreditation_state",value:e.state}),e.reload(),e.close()},children:(0,i.jsx)(xf,{...ij(e.state),children:t(e.state)})})},sj=e=>{const t=Ei(),{isEditMode:n}=Xx(),[a,s]=(0,d.useState)(!1),o=(0,d.useCallback)(e=>{n&&s(e)},[n,s]),r=(0,d.useCallback)(()=>{o(!1)},[o]);return n&&e.updatable?(0,i.jsx)(rx,{css:{border:"2px solid transparent","&:hover":{border:"2px solid $primary500"}},minWidth:e.column.minWidth,width:e.column.width,onClick:xa,children:(0,i.jsxs)(Ep,{isOpen:a,onStateChange:o,children:[(0,i.jsx)(Lp,{children:(0,i.jsxs)($,{align:"center",gap:"3",height:1,justify:"between",width:1,children:[(0,i.jsx)(xf,{...ij(e.state),cursor:"text",children:t(e.state)}),a&&(0,i.jsx)(Ni,{children:(0,i.jsx)(la,{icon:"chevron-down"})})]})}),(0,i.jsxs)(Np,{offset:2,placement:"bottom",width:240,children:[e.state!==J.WaitingAccreditation&&(0,i.jsx)(aj,{close:r,eventId:e.eventId,reload:e.reload,state:J.WaitingAccreditation,volunteerRegistrationId:e.volunteerRegistrationId}),e.state!==J.NotApplicable&&(0,i.jsx)(aj,{close:r,eventId:e.eventId,reload:e.reload,state:J.NotApplicable,volunteerRegistrationId:e.volunteerRegistrationId})]})]})}):(0,i.jsx)(rx,{css:{border:"2px solid transparent"},minWidth:e.column.minWidth,width:e.column.width,children:(0,i.jsx)(xf,{...ij(e.state),children:t(e.state)})})},oj=e=>{const t=Ci(pd),n=Ci(Yl),a=(0,d.useMemo)(()=>function(e,t,n){return(0,ho.A)((n||[]).flatMap(e=>(e.slots||[]).map(t=>({range:t.range,display:e.form.slotDisplay}))),({range:e})=>e.start.toMillis()).map(n=>n.display===At.Calendar||n.display===At.DisplayDays?e.toLocaleString(n.range.start,Za.DateOnly.Numeric):t.toDisplayString(n.range,{formats:{localeFormat:Za.DateOnly.Numeric}}))}(t,n,e.volunteerRegistration.userInfo.formsUsersInfos).map((e,t)=>({id:t,color:"gray",icon:null,text:e})),[e.volunteerRegistration.userInfo.formsUsersInfos]);return(0,i.jsx)(rx,{minWidth:e.column.minWidth,width:e.column.width,children:(0,i.jsx)(GS,{badges:a,doNotSort:!0,onClick:e.onClick})})},rj=e=>{const{translate:t}=$g(),n=(0,d.useMemo)(()=>e.volunteerRegistration.delegationBannerNumber||0,[e.volunteerRegistration]),a=e.volunteerRegistration.delegationBannerNumber?.toString(10)||"",s=(0,d.useCallback)(t=>e.mutate(t,"banner_number"),[e.mutate]);return(0,i.jsx)(OS,{column:e.column,initialValue:n,mutate:s,reload:e.reload,renderInput:(e,n)=>(0,i.jsx)(hh,{label:t("num_ro_de_bande_16203"),shouldParseAsInt:!0,value:e,onChange:n}),renderValue:a,updatable:e.updatable})},dj=e=>{const{translate:t}=$g();return(0,i.jsxs)(Ta,{children:[(0,i.jsx)(Ra,{children:(0,i.jsx)(Ni,{css:{cursor:"pointer"},height:e.size,width:e.size,children:(0,i.jsx)("img",{height:"100%",src:Qc(e.ticketId,{height:e.size,width:e.size}),width:"100%"})})}),(0,i.jsxs)(Ea,{children:[(0,i.jsx)(Ca,{icon:"qrcode",children:t("code_barres_1_82428",e.nameOrEmail)}),(0,i.jsxs)(Aa,{align:"center",css:{padding:"$4"},gap:"3",justify:"center",children:[(0,i.jsx)(Ni,{height:100,width:100,children:(0,i.jsx)("img",{height:"100%",src:Qc(e.ticketId,{height:100,width:100}),width:"100%"})}),(0,i.jsx)(Ni,{children:e.ticketId})]}),(0,i.jsx)(va,{})]})]})},lj=e=>{const t=e.volunteerRegistration.ticketId;return(0,i.jsxs)(rx,{align:"center",gap:"2",minWidth:e.column.minWidth,width:e.column.width,children:[(0,i.jsx)(dj,{nameOrEmail:e.volunteerRegistration.userInfo.nameOrEmail,size:30,ticketId:e.volunteerRegistration.ticketId}),h(e.volunteerRegistration.weezeventTicketUrl)?(0,i.jsx)(Oh,{css:{fontWeight:"normal"},to:e.volunteerRegistration.weezeventTicketUrl,children:t}):t]})};function cj(e){switch(e){case Ce.Waiting:case Ce.Queued:return{color:"warning",leftIcon:"hourglass-empty"};case Ce.Bounced:return{color:"error",leftIcon:"circle-exclamation"};default:return{color:"success",leftIcon:"check"}}}const uj=e=>{const{translate:t}=$g(),n=(0,d.useMemo)(()=>(e.volunteerRegistration.userInfo.emails??[]).map(e=>{const{color:n,leftIcon:i}=cj(e.state);return{id:e.id,color:n,icon:i,text:`${e.campaign?.name??""} - ${t(e.state)}`}}),[e.volunteerRegistration]);return(0,i.jsx)(rx,{minWidth:e.column.minWidth,width:e.column.width,children:(0,i.jsx)(GS,{badges:n})})},mj=e=>{const t=(0,d.useMemo)(()=>(e.volunteerRegistration.positionsSlotsUsersInfos||[]).filter(e=>e.state!==le.Waiting),[e.volunteerRegistration]),n=(0,d.useMemo)(()=>cu(t),[t]);return(0,i.jsx)(rx,{minWidth:e.column.minWidth,width:e.column.width,children:(0,i.jsx)(GS,{badges:n,doNotSort:!0,onClick:e.onClick})})},gj=e=>{const{translate:t}=$g(),[n,a]=(0,d.useState)("");return(0,i.jsx)(Ta,{isOpen:e.isOpen,onClose:e.onClose,children:(0,i.jsxs)(Ea,{children:[(0,i.jsx)(Ca,{icon:"print",children:t("impression_du_d_03836",e.customDocumentName)}),(0,i.jsxs)(Aa,{gap:"6",children:[(0,i.jsxs)(Kg,{alertStyle:"warning",children:[(0,i.jsx)(Qg,{children:t("le_document_a_d_84754")}),(0,i.jsx)(Xg,{children:t("afin_de_r_dite_85227")})]}),(0,i.jsx)(qI,{label:t("raison_de_l_imp_75064"),value:n,onChange:a})]}),(0,i.jsx)(va,{children:(0,i.jsx)(pa,{disabled:p(n),onClick:()=>e.onPrint(n),children:t("imprimer_le_doc_75788")})})]})})},hj=e=>{const{mutate:t}=function(e={}){return Mi("mutation VolunteerRegistrationCustomDocumentPrint(\n $eventId: EventId!\n $volunteerRegistrationId: VolunteersRegistrationId!\n $customDocumentSlug: String!\n $reason: String!\n) {\n link: volunteerRegistrationCustomDocumentPrint(\n eventId: $eventId\n volunteerRegistrationId: $volunteerRegistrationId\n customDocumentSlug: $customDocumentSlug\n reason: $reason\n )\n}\n",e)}(),n=(0,d.useMemo)(()=>!!e.customDocument&&Ku(e.customDocument.populationsIds??[],e.volunteerRegistration.userInfo.fields?.population),[e.customDocument,e.volunteerRegistration]),a=(0,d.useMemo)(()=>(e.volunteerRegistration.exportedCustomDocumentsSlugs??[]).includes(e.customDocument?.slug??"")&&(e.customDocument?.shouldRegenerateTicketIdOnDownload??!1),[e.customDocument,e.volunteerRegistration]),[s,o]=(0,d.useState)(!1),[r,l]=(0,d.useState)(!1),{name:c,clearName:u}=e.search,m=(0,d.useCallback)(()=>{c.startsWith("185")&&u()},[c,u]),g=(0,d.useCallback)(async(n="")=>{l(!0),o(!1);try{await async function(i,a){const s=window.open("about:blank","_blank");if(!s)throw new Error("Could not open print window, it has probably been blocked");try{const i=await(async()=>{const{link:i}=await t({eventId:e.eventId,volunteerRegistrationId:e.volunteerRegistration.id,customDocumentSlug:e.customDocument?.slug??"",reason:n});return Xc(i,"html",{lang:e.volunteerRegistration.userInfo.fields?.language})})(),o=await fetch(i,{method:"GET"});if(!o.ok)throw new Error(`Could not load document to print: ${o.status}`);const r=await o.text();s.document.write(r),s.document.close(),await Promise.all(Array.from(s.document.images).map(e=>new Promise(t=>{e.complete?t():(e.addEventListener("load",()=>t(),{once:!0}),e.addEventListener("error",()=>t(),{once:!0}))}))),await(s.document.fonts?.ready),s.addEventListener("afterprint",()=>{a?.(),s.close()},{once:!0}),s.focus(),s.print()}catch(e){throw s.close(),e}}(0,m)}catch(e){console.error(`Could not print custom document: ${e.toString()}`)}finally{l(!1),e.reload()}},[t,m,e.customDocument,e.eventId,e.volunteerRegistration,e.reload]);return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(rx,{minWidth:e.column.minWidth,width:e.column.width,children:n&&(0,i.jsx)(pa,{color:"white",css:{overflow:"hidden","& .h-button-content":{overflow:"hidden"}},isLoading:r,leftIcon:"print",size:"sm",onClick:()=>a?o(!0):g(),children:(0,i.jsx)(Ni,{css:{ellipsis:!0},title:e.column.name,width:1,children:e.column.name})})}),s&&(0,i.jsx)(gj,{customDocumentName:e.customDocument?.name??"",isOpen:s,onClose:()=>o(!1),onPrint:g})]})},pj=e=>{const{clearNameCursors:t,name:n}=Xx();return(0,i.jsx)(hj,{column:e.column,customDocument:e.column.customDocument,eventId:e.eventId,reload:e.reload,search:{name:n,clearName:t},volunteerRegistration:e.volunteerRegistration})},fj=e=>{const{translate:t,params:{organizationId:n,eventId:a}}=$g(),{mutate:s}=Ls(),{mutate:o}=vs(),{isEditMode:r}=Xx(),l=(0,d.useMemo)(()=>e.volunteerRegistration.delegation,[e.volunteerRegistration.delegation]),c=(0,d.useMemo)(()=>l?[l.id]:[],[l]),[u,m]=(0,d.useState)(!0),[g,h]=(0,d.useState)([]),p=(0,d.useCallback)(async e=>{if(e&&u){const{event:{delegations:e}}=await(t={eventId:a},n=await gs(),ys("query UpdateCellDelegations($eventId: EventId!) {\n event(id: $eventId) {\n delegations {\n nodes {\n id\n name\n }\n }\n }\n}\n",{variables:t,token:n||void 0,fragments:[]}));h(e.nodes),m(!1)}var t,n},[u]),f=(0,d.useCallback)(async t=>{F(t)?await s({eventId:a,delegationId:t[0],selecteds:{ids:[e.volunteerRegistration.userInfo.id]}}):l&&await o({organizationId:n,eventId:a,delegationId:l.id,selecteds:{ids:[e.volunteerRegistration.userInfo.id]},deleteFromEvent:!1}),e.reload()},[a,e.volunteerRegistration]);return r&&e.updatable?(0,i.jsx)(DS,{column:e.column,css:{gap:"$2"},initialValue:c,renderInput:(e,n)=>u?(0,i.jsxs)($,{direction:"column",gap:"1",width:1,children:[(0,i.jsx)(Th,{borderRadius:"$1",height:20,width:1}),(0,i.jsx)(Th,{borderRadius:"$1",height:40,width:1})]}):(0,i.jsx)(FI,{isSearchVisible:!0,label:t("Delegation"),renderOnPortal:!0,values:e,onChange:n,children:g.map(e=>(0,i.jsx)("option",{value:e.id,children:e.name},e.id))}),renderValue:()=>l?(0,i.jsx)(xf,{cursor:"pointer",ellipsis:!0,title:l.name,children:l.name}):null,onSave:f,onStateChange:p}):(0,i.jsx)(rx,{css:{border:"2px solid transparent"},minWidth:e.column.minWidth,width:e.column.width,children:l&&(0,i.jsx)(xf,{cursor:"pointer",ellipsis:!0,title:l.name,children:(0,i.jsx)(ra,{to:Yc.DELEGATION({organizationId:n,eventId:a,delegationId:l.id}),children:l.name})})})},Ij=e=>{const{params:{organizationId:t,eventId:n}}=$g(),a=e.volunteerRegistration.delegation?.delegationCategory;return(0,i.jsx)(rx,{minWidth:e.column.minWidth,width:e.column.width,children:a&&(0,i.jsx)(xf,{cursor:"pointer",ellipsis:!0,title:a.name,children:(0,i.jsx)(ra,{to:Yc.DELEGATION_CATEGORY({organizationId:t,eventId:n,delegationCategoryId:a.id}),children:a.name})})})},_j=e=>{const{history:t,params:{organizationId:n,eventId:a}}=$g(),s=(0,d.useMemo)(()=>(e.volunteerRegistration.userInfo?.formsUsersInfos??[]).flatMap(e=>e.form?[{id:e.form.id,color:"gray",icon:null,text:e.form.name,onClick(){t.push(jc.FORM_ELEMENTS({organizationId:n,eventId:a,formId:e.form.id}))}}]:[]),[e.volunteerRegistration.userInfo]);return(0,i.jsx)(rx,{minWidth:e.column.minWidth,width:e.column.width,children:(0,i.jsx)(GS,{badges:s})})},xj=e=>{const t=(0,d.useMemo)(()=>function(e,t){const n=(0,ho.A)((0,yr.A)(e.filter(e=>t.includes(e.accreditationCategoryId)),e=>e.accreditation.id),e=>e.accreditation.fields.cf50732).map(e=>e.accreditation.name.substring(9));return n[0]||""}((e.volunteerRegistration.accreditationsUsersInfos||[]).map(e=>({accreditationCategoryId:e.accreditationSlot.accreditationCategory.id,accreditation:e.accreditationSlot.accreditation})),[6870,5709]),[e.volunteerRegistration.accreditationsUsersInfos]);return(0,i.jsx)(rx,{align:"center",gap:"2",minWidth:e.column.minWidth,width:e.column.width,children:t})},yj=e=>{const t=Ei(),{mutate:n}=Ns(),{mutate:a}=function(e={}){return Mi("mutation VolunteersRegistrationsMassStateUpdate(\n $eventId: EventId!\n $massStateUpdate: MassStateUpdateInput!\n) {\n numberOfMembers: volunteersRegistrationsMassStateUpdate(\n eventId: $eventId\n massStateUpdate: $massStateUpdate\n )\n}\n",e)}(),s=Ci(Yl),{isEditMode:o}=Xx(),r=(0,d.useMemo)(()=>e.volunteerRegistration?.positionsSlotsUsersInfos||[],[e.volunteerRegistration]),l=(0,d.useMemo)(()=>cu(r),[r]),c=(0,d.useMemo)(()=>r.map(e=>e.positionSlot.id),[r]),[u,m]=(0,d.useState)(!0),[g,h]=(0,d.useState)([]),p=(0,d.useCallback)(async t=>{if(t&&u){const{event:t}=await Ps({eventId:e.eventId},await gs());h(b_(s,t.positionsCategories,{usePositionDisplay:!0})),m(!1)}},[u]),f=(0,d.useCallback)(async t=>{F(t)?await n({eventId:e.eventId,massAssign:{positionsSlotsIds:t,selecteds:{ids:[e.volunteerRegistration.userInfo.id]},strategy:Je.Replace}}):await a({eventId:e.eventId,massStateUpdate:{selecteds:{ids:[e.volunteerRegistration.userInfo.id]},state:Bt.WaitingAssignment}}),e.reload()},[e.eventId,e.volunteerRegistration,n,e.reload]);return o&&e.updatable?(0,i.jsx)(DS,{column:e.column,css:{gap:"$2"},initialValue:c,renderInput:(e,n)=>u?(0,i.jsxs)($,{direction:"column",gap:"1",width:1,children:[(0,i.jsx)(Th,{borderRadius:"$1",height:20,width:1}),(0,i.jsx)(Th,{borderRadius:"$1",height:40,width:1})]}):(0,i.jsx)(FI,{isSearchVisible:!0,label:t("missions_63972"),multiple:!0,renderOnPortal:!0,values:e,onChange:n,children:g}),renderValue:()=>(0,i.jsx)(GS,{badges:l,doNotSort:!0}),onSave:f,onStateChange:p}):(0,i.jsx)(rx,{css:{border:"2px solid transparent"},minWidth:e.column.minWidth,width:e.column.width,children:(0,i.jsx)(GS,{badges:l,doNotSort:!0,onClick:e.onClick})})},Sj=e=>{const t=(0,d.useMemo)(()=>(0,yr.A)(e.volunteerRegistration?.positionsSlotsUsersInfos??[],e=>e.positionCategory.id).map(e=>({id:e.positionCategory.id,color:"gray",icon:null,text:e.positionCategory.name})),[e.volunteerRegistration]);return(0,i.jsx)(rx,{minWidth:e.column.minWidth,width:e.column.width,children:(0,i.jsx)(GS,{badges:t})})},jj=e=>{const t=(0,d.useMemo)(()=>(e.volunteerRegistration?.preassignPositions||[]).map(e=>({id:e.id,color:"gray",icon:null,text:e.name})),[e.volunteerRegistration]);return(0,i.jsx)(rx,{minWidth:e.column.minWidth,width:e.column.width,children:(0,i.jsx)(GS,{badges:t})})},bj=e=>{const t=(0,d.useMemo)(()=>(e.volunteerRegistration?.preassignPositionsCategories||[]).map(e=>({id:e.id,color:"gray",icon:null,text:e.name})),[e.volunteerRegistration]);return(0,i.jsx)(rx,{minWidth:e.column.minWidth,width:e.column.width,children:(0,i.jsx)(GS,{badges:t})})},vj=e=>{const t=(0,d.useMemo)(()=>(e.volunteerRegistration.accreditationsUsersInfos||[]).filter(e=>e.checkInAt?.isValid),[e.volunteerRegistration]),n=(0,d.useMemo)(()=>qp(t),[t]);return(0,i.jsx)(rx,{minWidth:e.column.minWidth,width:e.column.width,children:(0,i.jsx)(GS,{badges:n,doNotSort:!0,onClick:e.onClick})})},Aj=e=>(0,i.jsx)(rx,{minWidth:e.column.minWidth,width:e.column.width,children:h(e.volunteerRegistration.shortTag)&&h(e.volunteerRegistration.weezeventPayUrl)?(0,i.jsx)(Oh,{css:{fontWeight:"normal"},to:e.volunteerRegistration.weezeventPayUrl,children:e.volunteerRegistration.shortTag}):e.volunteerRegistration.shortTag||""}),Cj=(...e)=>({name:"canRegistrationStateUpdateFn",args:e});async function Ej(e){try{const t=await gs(),n=await function(e,t){return ys("query UserPermission($checks: [PermissionCheck!]!) {\n user {\n permission(checks: $checks)\n }\n}\n",{variables:e,token:t||void 0,fragments:[]})}(e,t);return n.user.permission}catch{return e.checks.map(e=>!1)}}const Tj=new Map;function Rj({checks:e}){const t=e.map(e=>[e,JSON.stringify(e)]),n=t.filter(([e,t])=>!Tj.has(t));if(n.length>0){const e=Ej({checks:n.map(([e,t])=>e)});n.forEach(([t,n],i)=>{Tj.set(n,e.then(e=>e[i]))})}return Promise.all(t.map(([e,t])=>Tj.get(t)))}function Mj({withCaching:e,checks:t}){const[{isLoading:n,permissions:i},a]=(0,d.useState)({isLoading:!0,permissions:new Array(t.length).fill(!1)}),s=e?Rj:Ej;return(0,d.useEffect)(()=>{s({checks:t}).then(e=>{a({isLoading:!1,permissions:e})},()=>{a({isLoading:!1,permissions:i})})},[]),{isLoading:n,permissions:i}}const Dj=e=>{const t=Ei(),{mutate:n}=zs();return(0,i.jsx)($,{css:{cursor:"pointer",padding:"$3","&:hover":{background:"$gray100"}},onClick:async()=>{await n({eventId:e.eventId,volunteerRegistrationId:e.volunteerRegistrationId,slug:"volunteer_registration_state",value:e.state}),e.reload(),e.close()},children:(0,i.jsx)(xf,{cursor:"pointer",...nj(e.state),children:t(e.state)})})},Oj=e=>{const{permissions:[t,n],isLoading:a}=function(...e){return Mj({withCaching:!1,checks:e})}(Cj(e.eventId,Bt.PreAssigned,e.volunteerRegistrationId),Cj(e.eventId,Bt.Assigned,e.volunteerRegistrationId));return a?null:(0,i.jsxs)(i.Fragment,{children:[n&&e.state!==Bt.WaitingAssignment&&(0,i.jsx)(Dj,{close:e.close,eventId:e.eventId,reload:e.reload,state:Bt.WaitingAssignment,volunteerRegistrationId:e.volunteerRegistrationId}),t&&(0,i.jsx)(Dj,{close:e.close,eventId:e.eventId,reload:e.reload,state:Bt.PreAssigned,volunteerRegistrationId:e.volunteerRegistrationId}),n&&e.state!==Bt.Refused&&(0,i.jsx)(Dj,{close:e.close,eventId:e.eventId,reload:e.reload,state:Bt.Refused,volunteerRegistrationId:e.volunteerRegistrationId}),n&&e.state!==Bt.NotApplicable&&(0,i.jsx)(Dj,{close:e.close,eventId:e.eventId,reload:e.reload,state:Bt.NotApplicable,volunteerRegistrationId:e.volunteerRegistrationId})]})},wj=e=>{const t=Ei(),{isEditMode:n}=Xx(),[a,s]=(0,d.useState)(!1),o=(0,d.useCallback)(e=>{n&&s(e)},[n,s]),r=(0,d.useCallback)(()=>{o(!1)},[o]);return n&&e.updatable?(0,i.jsx)(rx,{css:{border:"2px solid transparent","&:hover":{border:"2px solid $primary500"}},minWidth:e.column.minWidth,width:e.column.width,onClick:xa,children:(0,i.jsxs)(Ep,{isOpen:a,onStateChange:o,children:[(0,i.jsx)(Lp,{children:(0,i.jsxs)($,{align:"center",gap:"3",height:1,justify:"between",width:1,children:[(0,i.jsx)(xf,{...nj(e.state),cursor:"text",ellipsis:!0,children:t(e.state)}),a&&(0,i.jsx)(Ni,{children:(0,i.jsx)(la,{icon:"chevron-down"})})]})}),(0,i.jsx)(Np,{offset:2,placement:"bottom",width:230,children:(0,i.jsx)(Oj,{close:r,...e})})]})}):(0,i.jsx)(rx,{css:{border:"2px solid transparent"},minWidth:e.column.minWidth,width:e.column.width,children:(0,i.jsx)(xf,{...nj(e.state),children:t(e.state)})})},Pj=e=>{const t=(0,d.useMemo)(()=>e.volunteerRegistration.userInfo.tags||[],[e.volunteerRegistration]),n=(0,d.useMemo)(()=>t.map(e=>({id:e.id,color:"gray",icon:null,text:e.name})),[]);return(0,i.jsx)(rx,{minWidth:e.column.minWidth,width:e.column.width,children:(0,i.jsx)(GS,{badges:n})})},$j=e=>{const{history:t,translate:n,params:{organizationId:a,eventId:s,segmentId:o}}=$g(),{isEditMode:r}=Xx(),{mutate:l}=zs(),c=(0,d.useMemo)(()=>e.volunteerRegistration.teams||[],[e.volunteerRegistration]),u=(0,d.useMemo)(()=>c.map(({teamCode:n})=>({id:n,color:"gray",icon:null,text:n,onClick:r?void 0:()=>{t.push(eg.VOLUNTEERS_LIST_USER_PANEL_TEAM(a,s,o,e.volunteerRegistration.userInfo.id,n))}})),[c,r]);return 1===c.length&&r?(0,i.jsx)(DS,{column:e.column,css:{gap:"$2"},initialValue:c[0].teamCode,renderInput:(e,t)=>(0,i.jsx)(hh,{label:n("code_quipe_14296"),value:e,onChange:t}),renderValue:()=>(0,i.jsx)(GS,{badges:u}),onSave:async t=>{await l({eventId:s,volunteerRegistrationId:e.volunteerRegistration.id,slug:"team_code",value:t}),e.reload()}}):(0,i.jsx)(rx,{minWidth:e.column.minWidth,width:e.column.width,children:(0,i.jsx)(GS,{badges:u})})},kj=e=>{const{params:{organizationId:t,eventId:n}}=$g(),a=(0,d.useMemo)(()=>(0,ho.A)(e.teamMembers,e=>m(e.name)),[e.teamMembers]);return(0,i.jsx)($,{children:a.map((e,a)=>(0,i.jsxs)(E_,{children:[(0,i.jsx)(M_,{children:(0,i.jsx)(Ni,{css:{cursor:"pointer",position:"relative",left:-4*a+"px"},children:(0,i.jsx)(ra,{to:Pg.MEMBER_INFORMATION({organizationId:t,eventId:n,userInfoId:e.id}),children:(0,i.jsx)(Fp,{email:e.email,image:e.picture?.url,name:e.name,size:24})})})}),(0,i.jsx)(R_,{placement:"top",children:e.name})]},e.id))})},Nj=e=>{const t=(0,d.useMemo)(()=>(e.volunteerRegistration.userInfo.formsUsersInfos||[]).flatMap(e=>e.teamMembers||[]),[e.volunteerRegistration]);return(0,i.jsx)(rx,{minWidth:e.column.minWidth,width:e.column.width,children:(0,i.jsx)(kj,{teamMembers:t})})},Lj=e=>{const t=(0,d.useMemo)(()=>(e.volunteerRegistration.weezaccessChecklists||[]).map(e=>({id:e.id,color:"gray",icon:null,text:e.name})),[e.volunteerRegistration]);return(0,i.jsx)(rx,{minWidth:e.column.minWidth,width:e.column.width,children:(0,i.jsx)(GS,{badges:t})})},zj=e=>{const t=(0,d.useMemo)(()=>Kp((e.volunteerRegistration.userInfo.formsUsersInfos??[]).flatMap(e=>e.accreditationProfile?[e.accreditationProfile]:[])),[e.volunteerRegistration]);return(0,i.jsx)(rx,{minWidth:e.column.minWidth,width:e.column.width,children:(0,i.jsx)(GS,{badges:t,doNotSort:!0})})},Fj=e=>{const t=(0,d.useMemo)(()=>Yp(e.volunteerRegistration?.accreditationsSlots||[]),[e.volunteerRegistration]);return(0,i.jsx)(rx,{minWidth:e.column.minWidth,width:e.column.width,children:(0,i.jsx)(GS,{badges:t,doNotSort:!0,onClick:e.onClick})})},Uj=e=>{const t=Ci(Yl),n=(0,d.useMemo)(()=>function(e,t,n,i){return(0,yr.A)(t,e=>e.id).map(e=>({id:`c-${e.id}`,color:"gray",icon:null,text:e.name})).concat((0,yr.A)(n,e=>e.id).map(e=>({id:`p-${e.id}`,color:e.color,icon:e.icon,text:h(e.acronym)?e.acronym:e.name}))).concat((0,yr.A)(i,e=>e.id).map(t=>{const n=h(t.position.acronym)?t.position.acronym:t.position.name,i=iu(e,t,n,{interval:{options:{formats:{localeFormat:Za.DateOnly.Numeric}}}});return{id:`s-${t.id}`,color:t.position.color,icon:t.position.icon,text:`${n} | ${i}`}}))}(t,e.volunteerRegistration?.positionsCategories||[],e.volunteerRegistration?.positions||[],e.volunteerRegistration?.positionsSlots||[]),[e.volunteerRegistration]);return(0,i.jsx)(rx,{minWidth:e.column.minWidth,width:e.column.width,children:(0,i.jsx)(GS,{badges:n,onClick:e.onClick})})},Bj=e=>{const{history:t,params:{organizationId:n,eventId:a}}=$g(),s=Ci(pd),o=Ci(Ul),r=(0,d.useMemo)(()=>function(e,t){return t.flatMap(t=>t.form?[`${t.form.name} : ${e.toLocaleString(t.insertedAt.toLocal(),Za.DateTime)}`]:[]).join(", ")}(s,e.row.userInfo.formsUsersInfos||[]),[e.row]),{mutate:l}=zs(),c=(0,d.useCallback)((t,n)=>l({eventId:e.eventId,volunteerRegistrationId:e.row.id,slug:n,value:t}),[e.eventId,e.row,l]),u=e.row.userInfo;switch(e.column.slug){case dm.AccreditationProfile:return(0,i.jsx)(JS,{column:e.column,eventId:e.eventId,reload:e.reloadRow,updatable:e.canMemberAccredit,volunteerRegistration:e.row});case dm.Accreditations:return(0,i.jsx)(ej,{column:e.column,eventId:e.eventId,reload:e.reloadRow,updatable:e.canMemberAccredit,volunteerRegistration:e.row,onClick:h(e.accreditationsPanelPath)?()=>{t.push(`${e.accreditationsPanelPath}/assigned`)}:void 0});case dm.AccreditationsCategories:return(0,i.jsx)(tj,{column:e.column,volunteerRegistration:e.row});case dm.AccreditationState:return(0,i.jsx)(sj,{column:e.column,eventId:e.eventId,field:e.column,reload:e.reloadRow,state:e.row.accreditationState,updatable:e.canMemberAccredit,volunteerRegistrationId:e.row.id});case dm.ScannedAccreditations:return(0,i.jsx)(vj,{column:e.column,volunteerRegistration:e.row,onClick:h(e.accreditationsPanelPath)?()=>{t.push(`${e.accreditationsPanelPath}/scanned`)}:void 0});case"bracelet_a_delivrer":return(0,i.jsx)(xj,{column:e.column,volunteerRegistration:e.row});case dm.Availability:return(0,i.jsx)(oj,{column:e.column,volunteerRegistration:e.row,onClick:h(e.availabilitiesPanelPath)?()=>{t.push(e.availabilitiesPanelPath)}:void 0});case dm.Comments:return(0,i.jsx)(rx,{minWidth:e.column.minWidth,width:e.column.width,children:F(u.comments)?u.comments.map(e=>e.content).join("; "):""});case dm.CampaignsStates:return(0,i.jsx)(uj,{column:e.column,volunteerRegistration:e.row});case dm.CheckedInPositions:return(0,i.jsx)(mj,{column:e.column,volunteerRegistration:e.row,onClick:h(e.positionsPanelPath)?()=>{t.push(`${e.positionsPanelPath}/assigned`)}:void 0});case dm.CompletedForms:return(0,i.jsx)(_j,{column:e.column,volunteerRegistration:e.row});case dm.FormsInsertedAt:return(0,i.jsx)(rx,{minWidth:e.column.minWidth,width:e.column.width,children:(0,i.jsx)(Ni,{css:{ellipsis:!0},title:r,children:r})});case dm.Delegations:return(0,i.jsx)(fj,{column:e.column,reload:e.reloadRow,updatable:e.canChangeDelegation,volunteerRegistration:e.row});case dm.DelegationBannerNumber:return(0,i.jsx)(rj,{column:e.column,mutate:c,reload:e.reloadRow,updatable:e.row.userInfo.isEditable??!0,volunteerRegistration:e.row});case dm.DuplicatedFrom:return(0,i.jsx)(rx,{minWidth:e.column.minWidth,width:e.column.width,children:e.row.duplicatedFrom?(0,i.jsx)(CS,{size:32,userInfo:e.row.duplicatedFrom.userInfo}):null});case dm.DelegationCategory:return(0,i.jsx)(Ij,{column:e.column,volunteerRegistration:e.row});case dm.Email:return(0,i.jsx)(ZS,{clickPath:e.informationPanelPath??Pg.MEMBER_INFORMATION({organizationId:n,eventId:a,userInfoId:e.row.userInfo.id}),column:e.column,reload:e.reloadRow,updatable:e.row.userInfo.isEditable??!0,userInfo:u});case dm.Id:return(0,i.jsx)(rx,{minWidth:e.column.minWidth,width:e.column.width,children:u.id});case dm.LocalId:return(0,i.jsx)(rx,{minWidth:e.column.minWidth,width:e.column.width,children:e.row.localId});case dm.OrganizationLocalId:return(0,i.jsx)(rx,{minWidth:e.column.minWidth,width:e.column.width,children:u.localId});case dm.InsertedAt:return(0,i.jsx)(rx,{minWidth:e.column.minWidth,width:e.column.width,children:s.toLocaleString(e.row.insertedAt.toLocal(),Za.DateTime)});case dm.Name:return(0,i.jsx)(KS,{clickPath:e.informationPanelPath,column:e.column,mutate:c,reload:e.reloadRow,updatable:e.row.userInfo.isEditable??!0,userInfo:e.row.userInfo});case dm.NumberOfAccreditations:return(0,i.jsx)(rx,{minWidth:e.column.minWidth,width:e.column.width,children:e.row.numberOfAccreditations});case dm.NumberOfAssignments:return(0,i.jsx)(rx,{minWidth:e.column.minWidth,width:e.column.width,children:e.row.numberOfAssignments});case dm.NumberOfAssignmentsDays:return(0,i.jsx)(rx,{minWidth:e.column.minWidth,width:e.column.width,children:e.row.numberOfAssignmentsDays});case dm.NumberOfAvailableDays:return(0,i.jsx)(rx,{minWidth:e.column.minWidth,width:e.column.width,children:e.row.numberOfAvailableDays});case dm.Positions:return(0,i.jsx)(yj,{column:e.column,eventId:e.eventId,reload:e.reloadRow,updatable:e.canMemberAssign,volunteerRegistration:e.row,onClick:h(e.positionsPanelPath)?()=>{t.push(`${e.positionsPanelPath}/assigned`)}:void 0});case dm.PositionsCategories:return(0,i.jsx)(Sj,{column:e.column,volunteerRegistration:e.row});case dm.PreassignedPositions:return(0,i.jsx)(jj,{column:e.column,volunteerRegistration:e.row});case dm.PreassignedPositionsCategories:return(0,i.jsx)(bj,{column:e.column,volunteerRegistration:e.row});case dm.Roles:return(0,i.jsx)(QS,{minWidth:e.column.minWidth,userPermissions:e.row.userInfo,width:e.column.width});case dm.Tags:return(0,i.jsx)(Pj,{column:e.column,volunteerRegistration:e.row});case dm.TeamCode:return(0,i.jsx)($j,{column:e.column,reload:e.reloadRow,volunteerRegistration:e.row});case dm.TeamMembers:return(0,i.jsx)(Nj,{column:e.column,volunteerRegistration:e.row});case dm.VolunteerMinutes:return(0,i.jsx)(rx,{minWidth:e.column.minWidth,width:e.column.width,children:o.minutesToHoursMinutesString(e.row.volunteerMinutes)});case dm.VolunteerRegistrationState:return(0,i.jsx)(wj,{column:e.column,eventId:e.eventId,field:e.column,reload:e.reloadRow,state:e.row.state,updatable:e.row.canRegistrationStateUpdate??!0,volunteerRegistrationId:e.row.id});case dm.WishedAccreditationProfile:return(0,i.jsx)(zj,{column:e.column,volunteerRegistration:e.row});case dm.WishedAccreditationSlots:return(0,i.jsx)(Fj,{column:e.column,volunteerRegistration:e.row,onClick:h(e.accreditationsPanelPath)?()=>{t.push(`${e.accreditationsPanelPath}/wished`)}:void 0});case dm.WishedPositions:return(0,i.jsx)(Uj,{column:e.column,volunteerRegistration:e.row,onClick:h(e.positionsPanelPath)?()=>{t.push(`${e.positionsPanelPath}/wished`)}:void 0});case dm.WeezaccessChecklists:return(0,i.jsx)(Lj,{column:e.column,volunteerRegistration:e.row});case dm.WeezeventBarcodeId:return(0,i.jsx)(lj,{column:e.column,volunteerRegistration:e.row});case dm.WeezeventBarcodeVersion:return(0,i.jsx)(rx,{minWidth:e.column.minWidth,width:e.column.width,children:e.row.ticketIdVersion});case dm.WeezeventPairedAt:return(0,i.jsx)(rx,{minWidth:e.column.minWidth,width:e.column.width,children:e.row.pairedAt?.isValid?s.toLocaleString(e.row.pairedAt.toLocal(),Za.DateTime):""});case dm.WeezeventShortTag:return(0,i.jsx)(Aj,{column:e.column,volunteerRegistration:e.row});default:return Object.values(dm).includes(e.column.slug)?(console.error(`003: Unhandled default column ${e.column.slug}`),(0,i.jsx)(rx,{children:"ERR"})):e.column.slug.startsWith("form_inserted_at")?(0,i.jsx)(rx,{minWidth:e.column.minWidth,width:e.column.width,children:vS(s,e.column.slug,e.row.userInfo.formsUsersInfos||[])}):Zu(e.column.slug)?(0,i.jsx)(pj,{column:e.column,eventId:e.eventId,reload:e.reloadRow,volunteerRegistration:e.row}):(0,i.jsx)(HS,{avatarUser:e.row.userInfo,clickPath:e.informationPanelPath??Pg.MEMBER_INFORMATION({organizationId:n,eventId:a,userInfoId:e.row.userInfo.id}),column:e.column,customField:e.customField,fields:e.row.userInfo.fields,mutate:c,reload:e.reloadRow,updatable:e.row.userInfo.isEditable??!0})}},Gj=e=>(0,i.jsx)(Ni,{color:"gray800",css:{borderBottom:"1px solid $gray200",padding:"$6"},fontSize:"textXl",fontWeight:"medium",children:e.children}),Vj=({title:e,subtitle:t})=>(0,i.jsx)(mx,{css:{height:"fit-content"},children:(0,i.jsx)(rx,{children:(0,i.jsxs)($,{align:"center",css:{padding:"$8 0"},direction:"column",justify:"center",width:1,children:[(0,i.jsx)(mf,{color:"primary",icon:"magnifying-glass"}),(0,i.jsx)(Wg,{height:"4"}),(0,i.jsx)(Ni,{color:"gray900",fontSize:"textMd",fontWeight:"medium",children:e}),(0,i.jsx)(Wg,{height:"1"}),(0,i.jsx)(Ni,{color:"gray500",children:t})]})})}),Wj=(0,d.createContext)({}),qj=e=>{const{mutate:t}=bs(),{mutate:n}=Bs(),[a,s]=(0,d.useState)(e.volunteerRegistration.accreditationsUsersInfos.map(e=>e.accreditationSlot)),o=(0,d.useMemo)(()=>a.map(({id:e})=>e),[a]),[r,l]=(0,d.useState)(e.volunteerRegistration.accreditationsUsersInfos.flatMap(e=>e.checkInAt?.isValid?[e.accreditationSlot]:[])),[c,u]=(0,d.useState)(e.volunteerRegistration.accreditationsSlots),m=(0,d.useMemo)(()=>(0,ho.A)((0,yr.A)(a.map(e=>e.accreditationCategory),e=>e.id),e=>e.name.toLowerCase()),[a]),g=(0,d.useMemo)(()=>(0,ho.A)((0,yr.A)(r.map(e=>e.accreditationCategory),e=>e.id),e=>e.name.toLowerCase()),[r]),h=(0,d.useMemo)(()=>(0,ho.A)((0,yr.A)(c.map(e=>e.accreditationCategory),e=>e.id),e=>e.name.toLowerCase()),[c]),p=(0,d.useMemo)(()=>(0,yr.A)(a.map(e=>e.accreditation),e=>e.id),[a]),f=(0,d.useMemo)(()=>(0,yr.A)(r.map(e=>e.accreditation),e=>e.id),[r]),I=(0,d.useMemo)(()=>(0,yr.A)(c.map(e=>e.accreditation),e=>e.id),[c]),_=(0,d.useCallback)(async n=>{await t({eventId:e.eventId,massAccredit:{accreditationsSlotsIds:[n],selecteds:{ids:[e.userInfoId]},strategy:Je.Delete}}),s(e=>e.filter(e=>e.id!==n)),l(e=>e.filter(e=>e.id!==n))},[e.eventId,e.userInfoId,s,l]),x=(0,d.useCallback)(async t=>{await n({organizationId:e.organizationId,eventId:e.eventId,delegationId:e.delegationId,massAccredit:{accreditationsSlotsIds:[t],selecteds:{ids:[e.userInfoId]},strategy:Je.Delete}}),u(e=>e.filter(e=>e.id!==t))},[e.eventId,e.delegationId,e.userInfoId]),y=(0,d.useCallback)(async n=>{await t({eventId:e.eventId,massAccredit:{accreditationsSlotsIds:[n],selecteds:{ids:[e.userInfoId]},strategy:Je.Add}});const i=c.find(e=>e.id===n);s(e=>[...e,i])},[e.eventId,e.volunteerRegistration,c,s]),S=(0,d.useCallback)(t=>e.volunteerRegistration.accreditationsUsersInfos.find(e=>e.accreditationSlot.id===t).checkInAt,[e.volunteerRegistration]);return(0,i.jsx)(Wj.Provider,{value:{assignSlot:y,assignedAccreditations:p,assignedCategories:m,assignedSlots:a,assignedSlotsIds:o,canDeleteCheckedIn:e.canDeleteCheckedIn,canMemberAccredit:e.canMemberAccredit,canWishedAccreditationsEdit:e.canWishedAccreditationsEdit,defaultHiddenAccreditationsSlotsIds:e.defaultHiddenAccreditationsSlotsIds,deleteAssignedSlot:_,deleteWishedSlot:x,scannedAccreditations:f,scannedCategories:g,scannedSlots:r,wishedAccreditations:I,wishedCategories:h,wishedSlots:c,getScannedAt:S},children:e.children})};function Yj(){return(0,d.useContext)(Wj)}const Hj=e=>{const{translate:t}=$g(),n=Ci(pd),{assignSlot:a,assignedSlotsIds:s,canMemberAccredit:o,canWishedAccreditationsEdit:r,defaultHiddenAccreditationsSlotsIds:l,deleteAssignedSlot:c,deleteWishedSlot:u,getScannedAt:m}=Yj(),[g,h]=(0,d.useState)(!1);return"assigned"===e.state&&!e.isBlocked&&o?(0,i.jsx)($,{css:{flex:"1",px:"$4"},justify:"end",children:g?(0,i.jsx)(Th,{borderRadius:"$1",height:20,children:t("retirer_05155")}):(0,i.jsx)(Ni,{css:{cursor:"pointer"},font:"error700 textSm medium",onClick:async()=>{h(!0),await c(e.accreditationSlotId)},children:t("retirer_05155")})}):"wished"===e.state&&o?(0,i.jsx)($,{css:{flex:"1",px:"$4"},justify:"end",children:s.includes(e.accreditationSlotId)?(0,i.jsxs)($,{align:"center",gap:"1",children:[(0,i.jsx)(Ni,{color:"success500",children:(0,i.jsx)(la,{icon:"badge-check",iconStyle:"solid"})}),(0,i.jsx)(Ni,{font:"gray800 textXs medium",children:t("d_j_attribu_e_06450")})]}):e.isBlocked?null:(0,i.jsx)(pa,{isLoading:g,size:"sm",onClick:async()=>{h(!0),await a(e.accreditationSlotId),h(!1)},children:t("ajouter_97327")})}):"wished"!==e.state||!r||e.isBlocked||l.includes(e.accreditationSlotId)?"scanned"===e.state?(0,i.jsx)($,{css:{flex:"1",px:"$4"},children:(0,i.jsx)(Ni,{css:{ellipsis:!0},children:n.toLocaleString(m(e.accreditationSlotId),Za.DateTime)})}):(0,i.jsx)($,{css:{flex:"1",px:"$4"}}):(0,i.jsx)($,{css:{flex:"1",px:"$4"},justify:"end",children:g?(0,i.jsx)(Th,{borderRadius:"$1",height:20,children:t("retirer_05155")}):(0,i.jsx)(Ni,{css:{cursor:"pointer"},font:"error700 textSm medium",onClick:async()=>{h(!0),await u(e.accreditationSlotId)},children:t("retirer_05155")})})},Zj=e=>{const t=Ci(pd),{canDeleteCheckedIn:n,canMemberAccredit:a,canWishedAccreditationsEdit:s,scannedSlots:o}=Yj(),r="assigned"===e.state&&a||"scanned"===e.state||"wished"===e.state&&(a||s),l=h(e.slot.name)?e.slot.name:"-",c=(0,d.useMemo)(()=>e.slot.isBlocked?e.slot.isBlocked:!n&&o.some(t=>t.id===e.slot.id),[n,e.slot,o]);return(0,i.jsxs)(mx,{children:[(0,i.jsx)(rx,{css:{textTransform:"capitalize"},children:e.slot.date?t.toLocaleString(e.slot.date,Za.DateOnly.WeekdayShortMonthShort):"-"}),(0,i.jsx)(rx,{children:(0,i.jsx)(Ni,{css:{ellipsis:!0},title:l,width:1,children:l})}),r&&(0,i.jsx)(Hj,{accreditationSlotId:e.slot.id,isBlocked:c,state:e.state})]})},Kj=e=>{const{translate:t}=$g(),{assignedSlots:n,canDeleteCheckedIn:a,canMemberAccredit:s,canWishedAccreditationsEdit:o,scannedSlots:r,wishedSlots:l}=Yj(),c=(0,d.useMemo)(()=>(0,ho.A)(("assigned"===e.state?n:"scanned"===e.state?r:l).filter(t=>t.accreditationId===e.accreditation.id),e=>[e.date?.toMillis()??1,e.name?.toLowerCase()||""]),[n,r,l,e.accreditation,e.state]),u=(0,d.useMemo)(()=>!a&&r.some(t=>t.id===e.accreditation.hiddenSlotId),[a,e.accreditation,r]),m="assigned"===e.state&&s||"scanned"===e.state||"wished"===e.state&&(s||o);return(0,i.jsx)(df,{accreditation:e.accreditation,displayNumberOfSlots:!0,displaySlots:e.accreditation.hasSlots,numberOfSlots:c.length,renderActions:!e.accreditation.hasSlots&&m?()=>(0,i.jsx)(Hj,{accreditationSlotId:e.accreditation.hiddenSlotId,isBlocked:u,state:e.state}):void 0,children:(0,i.jsxs)(gx,{hideBorder:!0,children:[(0,i.jsxs)(lx,{children:[(0,i.jsx)(dx,{children:t("date_du_cr_neau_82295")}),(0,i.jsx)(dx,{children:t("nom_du_cr_neau_54351")}),m&&(0,i.jsx)(dx,{children:"scanned"===e.state&&t("scann_e_le_27812")})]}),c.map(t=>(0,i.jsx)(Zj,{slot:t,state:e.state},t.id))]})})},Qj=e=>{const{assignedAccreditations:t,scannedAccreditations:n,wishedAccreditations:a}=Yj(),s=(0,d.useMemo)(()=>Zp(("assigned"===e.state?t:"scanned"===e.state?n:a).filter(t=>t.accreditationCategoryId===e.category.id)),[t,a,e.category,e.state]);return(0,i.jsx)(Mf,{category:e.category.name,children:s.map(t=>(0,i.jsx)(Kj,{accreditation:t,state:e.state},t.id))})},Xj=e=>{const t=Ei(),{assignedCategories:n,scannedCategories:a,wishedCategories:s}=Yj(),o="assigned"===e.state?n:"scanned"===e.state?a:s;return(0,i.jsx)(vf,{children:F(o)?o.map(t=>(0,i.jsx)(Qj,{category:t,state:e.state},t.id)):(0,i.jsx)(Vj,{title:t("no_accreditations")})})},Jj=e=>{const{translate:t}=$g();return(0,i.jsx)(qj,{canDeleteCheckedIn:e.canDeleteCheckedIn,canMemberAccredit:e.canMemberAccredit,canWishedAccreditationsEdit:e.canWishedAccreditationsEdit,defaultHiddenAccreditationsSlotsIds:e.defaultHiddenAccreditationsSlotsIds,delegationId:e.delegationId,eventId:e.eventId,organizationId:e.organizationId,userInfoId:e.volunteerRegistration.userInfo.id,volunteerRegistration:e.volunteerRegistration,children:(0,i.jsxs)(hy,{size:"md",onClose:e.onClose,children:[(0,i.jsx)(Gj,{children:t("accr_ditations_04710",e.volunteerRegistration.userInfo.name)}),(0,i.jsx)(py,{css:{padding:"0"},children:(0,i.jsxs)(Yx,{height:1,children:[(0,i.jsxs)(Wx,{center:!0,children:[(0,i.jsx)(Vx,{path:`${e.basePath}/assigned`,children:t("attribu_es_48167")}),(0,i.jsx)(Vx,{path:`${e.basePath}/wished`,children:t("souhait_es_78101")}),(0,i.jsx)(Vx,{path:`${e.basePath}/scanned`,children:t("scann_es_13169")})]}),(0,i.jsx)(qx,{path:`${e.basePath}/assigned`,children:(0,i.jsx)(Xj,{state:"assigned"})}),(0,i.jsx)(qx,{path:`${e.basePath}/wished`,children:(0,i.jsx)(Xj,{state:"wished"})}),(0,i.jsx)(qx,{path:`${e.basePath}/scanned`,children:(0,i.jsx)(Xj,{state:"scanned"})})]})})]})})},eb=j(Ni,{overflow:"hidden",textOverflow:"ellipsis",color:"$gray500",fontSize:"$textSm",fontWeight:"$regular","@tablet":{fontSize:"$textSm"}}),tb=e=>{const t=Ci(bd);switch(e.field.fieldType){case Le.File:{const n=t.getValue(e.field,e.fields);return n?(0,i.jsx)(dI,{acl:"public-read",document:n}):(0,i.jsx)(eb,{children:"-"})}case Le.Phone:{const n=t.getValueString(e.field,e.fields);return(0,i.jsx)(eb,{children:h(n)?(0,i.jsx)(Oh,{css:{display:"block",overflow:"hidden",textOverflow:"ellipsis"},hideIcon:!0,to:`tel:${n}`,children:n}):"-"})}case Le.Select:{const n=t.getSelectCustomFieldValues(e.field,e.fields);return(0,i.jsx)($,{align:"center",gap:"3",wrap:"wrap",children:n.map(({value:t,color:n},a)=>e.field.listType===Ke.Dot?(0,i.jsx)(LS,{color:n||"",children:t},a):(0,i.jsx)(xf,{color:e.field.listType===Ke.Badge?n||"":"gray",children:t},a))})}default:{const n=t.getValueString(e.field,e.fields);return(0,i.jsx)(eb,{children:h(n)?URL.canParse(n)?(0,i.jsx)(Oh,{css:{display:"block",overflow:"hidden",textOverflow:"ellipsis"},hideIcon:!0,to:n,children:n}):n:"-"})}}},nb=e=>(0,i.jsx)(Ni,{color:"gray800",css:{overflow:"hidden",textOverflow:"ellipsis",...e.css},fontSize:"textSm",fontWeight:"medium",children:e.children}),ib=e=>(0,i.jsxs)($,{direction:"column",gap:"1",children:[(0,i.jsx)(nb,{children:e.field.name}),(0,i.jsx)(tb,{field:e.field,fields:e.fields})]}),ab=e=>{const{translate:t}=$g(),n=(0,d.useMemo)(()=>e.form.elements.flatMap(e=>e.elementType===Be.Field?[e.customField]:e.hasCondition&&e.conditionCustomField?[e.conditionCustomField]:[]),[e.form]),a=(0,d.useMemo)(()=>e.form.elements.filter(t=>t.elementType===Be.Field?Ad(t.customField,e.userInfo.fields,n):t.elementType===Be.Section&&Ad(t,e.userInfo.fields,n)),[n,e.form.elements,e.userInfo.fields]),s="all"!==e.form.id?(o=e.form.id,{name:t("commentaire_r_12290"),slug:`form${o}`,fieldType:Le.Textarea,listType:Ke.Default,values:[]}):null;var o;return(0,i.jsxs)($,{css:e.css,direction:"column",children:[a.map((t,n)=>{switch(t.elementType){case Be.Field:return(0,i.jsxs)(d.Fragment,{children:[(0,i.jsx)(ib,{field:t.customField,fields:e.userInfo.fields}),n!==a.length-1&&(0,i.jsx)(Wg,{height:"6"})]},t.id);case Be.Section:return(0,i.jsxs)(d.Fragment,{children:[0!==n&&(0,i.jsx)(Wg,{height:"2"}),(0,i.jsx)(Ni,{color:"gray800",fontWeight:"semiBold",children:t.section}),n!==a.length-1&&(0,i.jsx)(Wg,{height:"4"})]},t.id);case Be.Text:return null;default:return ir(t.elementType)}}),s&&h(e.userInfo.fields[s.slug])&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Wg,{height:"6"}),(0,i.jsx)(Ni,{color:"gray800",fontWeight:"semiBold",children:t("inscription_en_49989")}),(0,i.jsx)(Wg,{height:"4"}),(0,i.jsx)(ib,{field:s,fields:e.userInfo.fields})]})]})},sb=e=>{const{data:t,loader:n}=Ri("query DelegationMemberRightPanel(\n $organizationId: OrganizationId!\n $userInfoId: UsersInfoId!\n $formId: FormId!\n) {\n organization(id: $organizationId) {\n userInfo(id: $userInfoId) {\n id\n name\n email\n fields\n picture {\n url\n }\n\n formUserInfo(formId: $formId) {\n insertedAt\n form {\n ...FormMemberRegistration\n }\n }\n }\n }\n}\n",{organizationId:e.organizationId,userInfoId:e.userInfoId,formId:e.delegation.form.id},[La.FormMemberRegistrationFragment]);return(0,i.jsx)(hy,{returnToFallback:e.returnPathFallback,size:"md",children:n||(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Gj,{children:(0,i.jsx)(CS,{areContactLinksEnabled:!0,isClickDisabled:!0,size:48,userInfo:t.organization.userInfo})}),(0,i.jsx)(py,{css:{background:"$gray50",py:"$6"},children:(0,i.jsx)(Ip,{children:(0,i.jsx)(ab,{form:t.organization.userInfo.formUserInfo.form,userInfo:t.organization.userInfo})})})]})})},ob=e=>(0,i.jsxs)(Ep,{isOpen:e.isOpen,onStateChange:e.onStateChange,children:[(0,i.jsx)(Lp,{children:e.triggerElem||(0,i.jsx)($,{align:"center",css:{cursor:"pointer"},height:20,justify:"center",width:20,children:(0,i.jsx)(la,{icon:"ellipsis-vertical"})})}),(0,i.jsx)(Np,{placement:"bottom-end",children:e.children})]}),rb=e=>(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(uf,{state:e.isChecked?"checked":"unchecked",onClick:e.onClick,children:e.text}),e.isChecked&&e.children&&(0,i.jsx)($,{css:{paddingBottom:"$3",paddingLeft:"$6"},gap:"4",children:e.children})]}),db=e=>{const{translate:t}=$g(),{mutate:n}=Cs(),[a,s]=(0,d.useState)(ce.CheckInOut),[o,r]=(0,d.useState)(e.positionSlotUserInfo.checkInAt?.toLocal()),[l,c]=(0,d.useState)(e.positionSlotUserInfo.checkOutAt?.toLocal()),[u,m]=(0,d.useState)(e.positionSlotUserInfo.breakTime),[g,h]=(0,d.useState)(!1),p=(0,d.useMemo)(()=>Qa(),[]),f=a===ce.Reset||o?.isValid&&l?.isValid&&l>o||o?.isValid&&!l?.isValid;return(0,i.jsx)(Ta,{isOpen:e.isOpen,onClose:e.onClose,children:(0,i.jsxs)(Ea,{children:[(0,i.jsx)(Ca,{icon:"sliders",children:t("mise_jour_du_76261")}),(0,i.jsxs)(Aa,{gap:"2",children:[(0,i.jsx)(Ni,{font:"gray700 textSm medium",children:t("que_souhaitez_v_87607")}),(0,i.jsxs)(rb,{isChecked:a===ce.CheckInOut,text:t("mettre_jour_l_00128"),onClick:()=>{s(ce.CheckInOut)},children:[(0,i.jsx)(Gf,{hint:t("date_et_heure_d_93417"),rightIcon:"xmark",value:o,zone:p,onChange:r,onRightIconClick:()=>r(null)}),(0,i.jsx)(Gf,{hint:t("date_et_heure_d_65738"),rightIcon:"xmark",value:l,zone:p,onChange:c,onRightIconClick:()=>c(null)}),(0,i.jsx)(hh,{hint:t("temps_de_pause_00051"),shouldParseAsInt:!0,value:u,onChange:m})]}),(0,i.jsx)(rb,{isChecked:a===ce.Reset,text:t("remettre_z_ro_11572"),onClick:()=>{s(ce.Reset)}})]}),(0,i.jsx)(va,{children:s=>(0,i.jsx)(pa,{disabled:!f,isLoading:g,onClick:async()=>{h(!0),await n({eventId:e.positionSlotUserInfo.eventId,checkIn:{breakTime:u,checkInAt:o?.toUTC(),checkOutAt:l?.toUTC(),strategy:a,positionsSlotsUsersInfosIds:[e.positionSlotUserInfo.id]}}),s()},children:t("mettre_jour_85141")})})]})})},lb=e=>{const{translate:t}=$g(),{mutate:n}=Cs(),{mutate:a}=Ns(),[s,o]=(0,d.useState)(!1);return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(ob,{triggerElem:e.triggerElem,children:[e.canCheckIn&&(0,i.jsx)($p,{icon:"circle-check",onClick:()=>o(!0),children:t("mettre_jour_l_00128")}),e.canCheckIn&&e.psui.state!==le.Waiting&&(0,i.jsx)($p,{icon:"arrows-rotate",onClick:async()=>{await n({eventId:e.psui.eventId,checkIn:{strategy:ce.Reset,positionsSlotsUsersInfosIds:[e.psui.id]}}),e.reloadCheckIn(e.psui.id)},children:t("remettre_z_ro_11572")}),e.canDelete&&(0,i.jsx)($p,{color:"red",icon:"user-xmark",onClick:async()=>{await a({eventId:e.psui.eventId,massAssign:{positionsSlotsIds:[e.psui.positionSlotId],selecteds:{ids:[e.psui.userInfoId]},strategy:Je.Delete}}),e.onDelete(e.psui.id)},children:t("d_saffecter_du_47122")})]}),(0,i.jsx)(db,{isOpen:s,positionSlotUserInfo:e.psui,onClose:()=>{e.reloadCheckIn(e.psui.id),o(!1)}})]})},cb=e=>{const{translate:t}=$g(),n=Ci(pd),a=Ci(Ul),s=Ci(Yl),{mutate:o}=Cs(),r=Sp(),l=(0,d.useMemo)(()=>{const t=e.positionSlotUserInfo.positionSlot;return h(t.name)?`${t.name} - ${s.toDisplayString(t.range)}`:s.toDisplayString(t.range)},[e.positionSlotUserInfo.positionSlot]),c=()=>(0,i.jsxs)($,{align:"center",css:{padding:"$3","@tablet":{padding:"$3 $4"}},gap:"3",width:1,wrap:"wrap",children:[(0,i.jsx)(rf,{color:e.positionSlotUserInfo.position.color,icon:e.positionSlotUserInfo.position.icon}),(0,i.jsxs)($,{css:{flex:"1",overflow:"hidden"},direction:"column",gap:"1",children:[(0,i.jsx)(Ni,{color:"gray800",css:{fontWeight:"$medium",overflow:"hidden",textOverflow:"ellipsis","@tablet":{fontWeight:"$semiBold"}},children:e.positionSlotUserInfo.position.name}),(0,i.jsx)(Ni,{color:"gray500",fontSize:"textSm",children:l})]})]});return(0,i.jsxs)($,{css:{background:"white",border:"1px solid $gray200",borderRadius:"$1",boxShadow:"$xs","@tablet":{borderRadius:"$2"}},direction:"column",width:1,children:[e.canCheckIn?(0,i.jsx)(ra,{to:Nm.POSITION({organizationId:e.positionSlotUserInfo.organizationId,eventId:e.positionSlotUserInfo.eventId,positionId:e.positionSlotUserInfo.position.id}),children:c()}):c(),(e.canCheckIn||e.canDelete)&&(0,i.jsxs)($,{align:"center",css:{borderTop:"1px solid $gray200",padding:"$3","@tablet":{padding:"$3 $4"}},justify:"between",width:1,children:[e.positionSlotUserInfo.state===le.CheckedOut?(0,i.jsx)(xf,{leftIcon:"clock",children:t("temps_total_79448",a.minutesToHoursMinutesString(e.positionSlotUserInfo.timeDifferenceMinutes))}):e.positionSlotUserInfo.state===le.CheckedIn?(0,i.jsx)(xf,{color:"success",leftIcon:"circle",leftIconStyle:"solid",children:t("point_le_1_63576",n.toLocaleString(e.positionSlotUserInfo.checkInAt.toLocal(),r?Za.ShortDateTime:Za.DateTime))}):(0,i.jsx)(xf,{color:"warning",leftIcon:"circle",leftIconStyle:"solid",children:t("non_point_42145")}),(0,i.jsxs)($,{gap:"3",children:[e.canCheckIn&&e.positionSlotUserInfo.state===le.Waiting&&(0,i.jsx)(pa,{size:"sm",onClick:async()=>{await o({eventId:e.positionSlotUserInfo.eventId,checkIn:{strategy:ce.CheckIn,positionsSlotsUsersInfosIds:[e.positionSlotUserInfo.id]}}),e.reloadCheckIn(e.positionSlotUserInfo.id)},children:t("pointer_80927")}),e.canCheckIn&&e.positionSlotUserInfo.state===le.CheckedIn&&(0,i.jsx)(pa,{color:"white",size:"sm",onClick:async()=>{await o({eventId:e.positionSlotUserInfo.eventId,checkIn:{strategy:ce.CheckOut,positionsSlotsUsersInfosIds:[e.positionSlotUserInfo.id]}}),e.reloadCheckIn(e.positionSlotUserInfo.id)},children:t("d_pointer_25328")}),(0,i.jsx)(lb,{canCheckIn:e.canCheckIn,canDelete:e.canDelete,psui:e.positionSlotUserInfo,reloadCheckIn:e.reloadCheckIn,triggerElem:(0,i.jsx)(Ni,{children:(0,i.jsx)(pa,{color:"white",rightIcon:"ellipsis-vertical",size:"sm"})}),onDelete:e.onDelete})]})]})]})},ub=(0,d.createContext)({}),mb=e=>{const{data:t}=Es({organizationId:e.organizationId,eventId:e.eventId,userInfoId:e.volunteerRegistration.userInfo.id}),[n,a]=(0,d.useState)(e.volunteerRegistration.positionsSlotsUsersInfos),s=(0,d.useMemo)(()=>(0,ho.A)((0,yr.A)(n.map(e=>e.positionCategory),e=>e.id),e=>e.name.toLowerCase()),[n]),o=(0,d.useCallback)(e=>{a(t=>t.filter(t=>t.id!==e))},[a]),r=(0,d.useCallback)(async t=>{const i=n.find(e=>e.id===t),{event:{volunteerRegistration:{positionSlotUserInfo:s}}}=await(o={eventId:e.eventId,volunteerRegistrationId:e.volunteerRegistration.id,positionSlotId:i.positionSlot.id},r=await gs(),ys("query PositionSlotUserInfo(\n $eventId: EventId!\n $volunteerRegistrationId: VolunteersRegistrationId!\n $positionSlotId: PositionsSlotId!\n) {\n event(id: $eventId) {\n volunteerRegistration(id: $volunteerRegistrationId) {\n positionSlotUserInfo(positionSlotId: $positionSlotId) {\n ...UserPositionSlotUserInfo\n }\n }\n }\n}\n",{variables:o,token:r||void 0,fragments:[La.UserPositionSlotUserInfoFragment]}));var o,r;a(e=>e.map(e=>e.id===t?s:e))},[e.eventId,e.volunteerRegistration,n,a]);return(0,i.jsx)(ub.Provider,{value:{assignedCategories:s,assignedPsuis:n,canCheckIn:e.canCheckIn,canDelete:e.canDelete,formsUsersInfos:t.organization?.userInfo.formsUsersInfos??[],onAssignedPsuiDelete:o,reloadCheckIn:r},children:e.children})};function gb(){return(0,d.useContext)(ub)}const hb=()=>{const{assignedCategories:e,assignedPsuis:t,canCheckIn:n,canDelete:a,onAssignedPsuiDelete:s,reloadCheckIn:o}=gb(),r=(0,d.useMemo)(()=>(0,Ql.A)(t,e=>e.positionCategory.id),[t]);return(0,i.jsx)(vf,{children:e.map(e=>{const t=r[e.id];return(0,i.jsx)(Mf,{category:e.name,children:t.map(e=>(0,i.jsx)(cb,{canCheckIn:"function"==typeof n?n(e.positionCategoryId,e.position.id):n,canDelete:a(e.positionCategoryId,e.position.id),positionSlotUserInfo:e,reloadCheckIn:o,onDelete:s},e.id))},e.id)})})},pb=({css:e,filters:t,headerCells:n,limit:a,numberOfPages:s,offset:o,rows:r,setLimit:d,setOffset:l,showLimits:c=!1,showPagination:u=!0,title:m,totalCount:g})=>{const{designSystem:h}=Qs(),p=(c||u)&&"number"==typeof s&&"number"==typeof o&&"function"==typeof l&&(g??0)>0;return(0,i.jsxs)(Ni,{css:{...e},children:[(0,i.jsxs)($,{align:"center",css:{background:"white",border:"1px solid $gray200",borderBottom:"none",borderTopLeftRadius:"$2",borderTopRightRadius:"$2",padding:"$3 $6"},gap:"3",children:[m&&(0,i.jsx)(Ni,{color:"gray900",css:{flex:"1"},fontSize:h===Zs?"textMd":"textLg",fontWeight:"medium",children:m}),t]}),(0,i.jsxs)(gx,{role:"grid",children:[(0,i.jsx)(lx,{css:{borderRadius:"0 !important",borderTop:"1px solid $gray200"},children:n}),r,p&&(0,i.jsx)(yS,{children:(0,i.jsx)(xS,{limit:a,numberOfPages:s,offset:o,setLimit:d,setOffset:l,showLimits:c,totalCount:g??0})})]})]})},fb=({message:e,title:t})=>(0,i.jsxs)(Kg,{alertStyle:"warning",children:[(0,i.jsx)(Qg,{children:t}),(0,i.jsx)(Xg,{children:e})]}),Ib=({editDisabled:e,eventId:t,form:n,organizationId:a})=>{const s=Oi();return(0,i.jsx)(xf,{color:"primary",cursor:e?"default":"pointer",onContentClick:()=>{e||s.push(jc.FORM_ELEMENTS({organizationId:a,eventId:t??void 0,formId:n.id}))},children:n.name})},_b=({canMemberAssign:e,editPath:t,formsUsersInfos:n,isEditDisabled:a=!1})=>{const{history:s,params:{organizationId:o,eventId:r},translate:l}=$g(),c=Ci(Yl),u=(0,d.useMemo)(()=>function(e,t,n,i){return(0,ho.A)(e.map(e=>{const a=e.positions.map((a,s)=>({name:a.name,category:a.category.name,range:a.range?t.toDisplayString(a.range):"-",path:Nm.POSITION({organizationId:n,eventId:i,positionId:a.id}),form:e.form,rank:s+1})),s=e.positionsCategories.map((a,s)=>({name:a.name,category:"",range:a.range?t.toDisplayString(a.range):"-",path:Nm.POSITION_CATEGORY({organizationId:n,eventId:i,positionCategoryId:a.id}),form:e.form,rank:s+1})),o=e.positionsSlots.map((t,a)=>({name:t.position.name,category:t.positionCategory.name,range:t.nameOrRange,path:Nm.POSITION({organizationId:n,eventId:i,positionId:t.position.id}),form:e.form,rank:a+1}));return a.concat(s).concat(o)}).flat(),[e=>e.form.name,(e,t)=>t])}(n,c,o,r),[n]),m=Sp();return(0,i.jsxs)($,{direction:"column",gap:"6",width:1,children:[a&&(0,i.jsx)(fb,{message:l("you_are_already_assigned_to_missions"),title:l("wished_positions_can_no_longer_be_changed")}),(0,i.jsx)(pb,{filters:e&&h(t)&&(0,i.jsx)(pa,{color:"white",disabled:a,size:"sm",to:t,children:l("_diter_62574")}),headerCells:(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(dx,{children:l("nom_de_la_missi_64605")}),!m&&(0,i.jsx)(dx,{children:l("Date")}),!m&&(0,i.jsx)(dx,{children:l("Form")})]}),numberOfPages:0,offset:0,rows:(0,i.jsx)(i.Fragment,{children:F(u)?u.map((e,t)=>(0,i.jsxs)(mx,{children:[(0,i.jsxs)(rx,{align:"start",direction:"column",gap:"1",justify:"center",children:[h(e.category)&&(0,i.jsx)(Ni,{color:"gray500",css:{fontSize:"11px",textTransform:"uppercase"},fontWeight:"medium",children:e.category}),(0,i.jsx)(Ni,{css:{cursor:"pointer"},font:"gray900 textSm medium",onClick:()=>{s.push(e.path)},children:e.name}),e.form.positionRanking===Ge.Ranked&&(0,i.jsx)(Ni,{color:"gray500",children:l("choix_n_1_00613",e.rank)}),m&&(0,i.jsx)(Ni,{color:"gray500",children:e.range})]}),!m&&(0,i.jsx)(rx,{children:e.range}),!m&&(0,i.jsx)(rx,{children:(0,i.jsx)(Ib,{editDisabled:a,eventId:r,form:e.form,organizationId:o})})]},t)):(0,i.jsx)(mx,{css:{height:"200px"},children:(0,i.jsx)(rx,{children:(0,i.jsx)(Af,{title:l("aucune_mission_61179")})})})}),setOffset:Ih.A,title:l("missions_souhai_23225"),totalCount:0})]})},xb=()=>{const{formsUsersInfos:e}=gb();return(0,i.jsx)($,{css:{background:"$gray50",padding:"$6"},height:1,width:1,children:(0,i.jsx)(_b,{canMemberAssign:!1,formsUsersInfos:e})})},yb=e=>{const{translate:t}=$g();return(0,i.jsx)(mb,{canCheckIn:e.canCheckIn,canDelete:e.canDelete,eventId:e.eventId,organizationId:e.organizationId,volunteerRegistration:e.volunteerRegistration,children:(0,i.jsxs)(hy,{size:"md",onClose:e.onClose,children:[(0,i.jsx)(Gj,{children:t("missions_de_1_99317",e.volunteerRegistration.userInfo.name)}),(0,i.jsx)(py,{css:{padding:"0"},children:(0,i.jsxs)(Yx,{height:1,children:[(0,i.jsxs)(Wx,{center:!0,children:[(0,i.jsx)(Vx,{path:`${e.basePath}/assigned`,children:t("attribu_es_48167")}),(0,i.jsx)(Vx,{path:`${e.basePath}/wished`,children:t("souhait_es_78101")})]}),(0,i.jsx)(qx,{path:`${e.basePath}/assigned`,children:(0,i.jsx)(hb,{})}),(0,i.jsx)(qx,{path:`${e.basePath}/wished`,children:(0,i.jsx)(xb,{})})]})})]})})},Sb=d.createContext({}),jb=e=>{const{data:t,loader:n}=Ri("query TeamRightPanel($eventId: EventId!, $teamCode: TeamCode!) {\n event(id: $eventId) {\n team(teamCode: $teamCode) {\n form {\n name\n }\n\n members {\n ...UserInfoTeamRightPanel\n }\n }\n }\n}\n",{eventId:e.eventId,teamCode:e.teamCode},[La.UserInfoTeamRightPanelFragment]);const{mutate:a}=Ns(),[s,o]=d.useState([]),r=d.useMemo(()=>{const e=s.flatMap(e=>e.positionsCategories.flatMap(e=>e.positions.flatMap(e=>e.slots.map(t=>({...t,position:(0,D.A)(e,["id","name","icon","color"])}))))),t=s.flatMap(e=>e.positions.flatMap(e=>e.slots.map(t=>({...t,position:(0,D.A)(e,["id","name","icon","color"])})))),n=s.flatMap(e=>e.positionsSlots);return(0,yr.A)(e.concat(t).concat(n),e=>e.id)},[s]),l=d.useMemo(()=>(0,yr.A)(s.flatMap(e=>e.positionsSlotsUsersInfos.map(e=>({...e.positionSlot,position:e.position}))),e=>e.id),[s]),c=d.useMemo(()=>(0,ho.A)((0,yr.A)(r.concat(l),e=>e.id),e=>[e.position.name.toLowerCase(),e.range.start.toMillis()]),[r,l]),u=d.useMemo(()=>Object.fromEntries(s.map(e=>{const t=(0,Na.A)(e.positionsCategories.flatMap(e=>e.positions.flatMap(e=>e.slots.map(e=>e.id))).concat(e.positions.flatMap(e=>e.slots.map(e=>e.id))).concat(e.positionsSlots.map(e=>e.id)));return[e.userInfo.id,t]})),[s]),m=d.useMemo(()=>Object.fromEntries(s.map(e=>{const t=e.positionsSlotsUsersInfos.map(e=>e.positionSlot.id);return[e.userInfo.id,t]})),[s]),g=d.useCallback(async(t,n)=>{await a({eventId:e.eventId,massAssign:{positionsSlotsIds:[n],selecteds:{ids:[t]},strategy:Je.Add}});const{event:i}=await function(e,t){return ys("query TeamRightPanelMember($eventId: EventId!, $userInfoId: UsersInfoId!) {\n event(id: $eventId) {\n volunteerRegistration: volunteerRegistrationByUserInfoId(userInfoId: $userInfoId) {\n ...UserInfoTeamRightPanel\n }\n }\n}\n",{variables:e,token:t||void 0,fragments:[La.UserInfoTeamRightPanelFragment]})}({eventId:e.eventId,userInfoId:t},await gs());o(e=>e.map(e=>e.userInfo.id===t?i.volunteerRegistration:e))},[e.eventId,o]);return d.useEffect(()=>{o(t.event?.team?.members??[])},[t.event,o]),(0,i.jsx)(Sb.Provider,{value:{allSlots:c,form:t.event?.team?.form,loader:n,memberIdToAssignedSlotsIds:m,memberIdToWishedSlotsIds:u,members:s,assign:g},children:e.children})};function bb(){return d.useContext(Sb)}const vb=e=>{const{translate:t}=$g(),{assign:n,memberIdToAssignedSlotsIds:a,memberIdToWishedSlotsIds:s}=bb(),[o,r]=(0,d.useState)(!1),l=a[e.member.userInfo.id].includes(e.slot.id),c=s[e.member.userInfo.id].includes(e.slot.id);return(0,i.jsxs)(mx,{children:[(0,i.jsx)(rx,{children:(0,i.jsx)(CS,{size:32,userInfo:e.member.userInfo})}),(0,i.jsx)(rx,{justify:"end",children:l?(0,i.jsxs)($,{align:"center",gap:"1",children:[(0,i.jsx)(Ni,{color:"success500",children:(0,i.jsx)(la,{icon:"badge-check",iconStyle:"solid"})}),(0,i.jsx)(Ni,{font:"gray800 textXs medium",children:t("d_j_affect_71706")})]}):c?(0,i.jsx)(pa,{isLoading:o,size:"sm",onClick:()=>{r(!0),n(e.member.userInfo.id,e.slot.id)},children:t("affecter_94255")}):(0,i.jsxs)($,{align:"center",gap:"1",children:[(0,i.jsx)(Ni,{color:"error500",children:(0,i.jsx)(la,{icon:"circle-xmark",iconStyle:"solid"})}),(0,i.jsx)(Ni,{font:"gray800 textXs medium",children:t("non_souhait_46147")})]})})]})},Ab=e=>{const{translate:t}=$g(),{members:n}=bb(),a=Ci(Yl),s=(0,d.useMemo)(()=>iu(a,e.slot,e.slot.position.name,{slot:{includeRange:!0}}),[e.slot]);return(0,i.jsxs)($,{css:{background:"white",bd:!0,overflow:"hidden"},direction:"column",children:[(0,i.jsxs)($,{css:{padding:"$3 $4"},gap:"3",children:[(0,i.jsx)(rf,{color:e.slot.position.color,icon:e.slot.position.icon}),(0,i.jsxs)($,{direction:"column",children:[(0,i.jsx)(Ni,{font:"gray800 textSm semiBold",children:e.slot.position.name}),(0,i.jsx)(Ni,{color:"gray500",children:s})]})]}),(0,i.jsxs)(gx,{hideBorder:!0,children:[(0,i.jsxs)(lx,{children:[(0,i.jsx)(dx,{children:t("full_name")}),(0,i.jsx)(dx,{})]}),n.map(t=>(0,i.jsx)(vb,{member:t,slot:e.slot},t.userInfo.id))]})]})},Cb=()=>{const{allSlots:e}=bb();return(0,i.jsx)($,{direction:"column",gap:"3",width:1,children:e.map(e=>(0,i.jsx)(Ab,{slot:e},e.id))})},Eb=e=>{const{translate:t}=$g(),{form:n,loader:a}=bb();return(0,i.jsxs)(hy,{size:"md",onClose:e.onClose,children:[(0,i.jsx)(Gj,{children:(0,i.jsxs)($,{direction:"column",gap:"1",children:[(0,i.jsx)(Ni,{children:t("_quipe_1_19590",e.teamCode)}),(0,i.jsx)(Ni,{color:"gray500",fontSize:"textSm",children:t("formulaire_1_39637",n?.name)})]})}),(0,i.jsx)(py,{css:{background:"$gray50",py:"$6"},children:a||(0,i.jsx)(Cb,{})})]})},Tb=e=>(0,i.jsx)(jb,{eventId:e.eventId,teamCode:e.teamCode,children:(0,i.jsx)(Eb,{...e})}),Rb=({editPath:e,eventId:t,organizationId:n,formsUsersInfos:a,showEditButton:s,isEditDisabled:o=!1})=>{const{translate:r}=$g(),l=Ci(pd),c=Ci(Yl),u=(0,d.useMemo)(()=>(0,ho.A)(a.flatMap(e=>e.slots.map(t=>({range:t.range,display:e.form.slotDisplay,form:e.form}))),({range:e})=>e.start.toMillis()),[a]),m=Sp(),g=(0,d.useCallback)((e,t)=>{switch(t){case At.Calendar:case At.DisplayDays:return(0,i.jsx)(Ni,{children:l.toLocaleString(e.start,Za.DateOnly.MonthLong)});case At.Display:case At.Custom:return(0,i.jsxs)($,{direction:"column",children:[(0,i.jsx)(Ni,{css:{lineHeight:"20px"},children:c.toDisplayString(e,{hideTime:!0})}),(0,i.jsx)(Ni,{color:"gray500",css:{fontWeight:400,lineHeight:"20px"},fontSize:"textSm",children:c.toDisplayString(e,{hideDate:!0})})]});case At.Hide:return null;default:return ir()}},[]);return(0,i.jsxs)($,{direction:"column",gap:"6",children:[o&&(0,i.jsx)(fb,{message:r("you_are_already_assigned_to_missions"),title:r("availabilities_can_no_longer_be_changed")}),(0,i.jsx)(pb,{filters:s&&(0,i.jsx)(pa,{color:"white",disabled:o,size:"sm",to:e,children:r("_diter_62574")}),headerCells:(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(dx,{children:r("Date")}),!m&&(0,i.jsx)(dx,{children:r("Form")})]}),numberOfPages:0,offset:0,rows:(0,i.jsx)(i.Fragment,{children:F(u)?u.map((e,a)=>(0,i.jsxs)(mx,{children:[(0,i.jsx)(rx,{children:g(e.range,e.display)}),!m&&(0,i.jsx)(rx,{children:(0,i.jsx)(Ib,{editDisabled:o,eventId:t,form:e.form,organizationId:n})})]},a)):(0,i.jsx)(mx,{css:{height:"200px"},children:(0,i.jsx)(rx,{children:(0,i.jsx)(Af,{title:r("aucune_disponib_15602")})})})}),setOffset:Ih.A,title:r("disponibilit_s_49923"),totalCount:0})]})},Mb=e=>{const t=Ei(),{data:n,loader:a}=Ri("query UserOverlaySlots(\n $organizationId: OrganizationId!\n $eventId: EventId!\n $userInfoId: UsersInfoId!\n) {\n organization(id: $organizationId) {\n userInfo(id: $userInfoId) {\n ...FormsUsersInfosWished\n }\n }\n\n event(id: $eventId) {\n hasFormWithSlotDisplay\n }\n}\n",{organizationId:e.organizationId,eventId:e.eventId,userInfoId:e.userInfoId},[La.FormsUsersInfosWishedFragment]);const{permissions:[s],isLoading:o}=function(...e){return Mj({withCaching:!0,checks:e})}(((...e)=>({name:"canUserInfoSlotsUpdateFn",args:e}))({eventId:e.eventId,userInfoId:e.userInfoId}));return(0,i.jsxs)(hy,{returnToFallback:e.returnPathFallback,size:"md",children:[(0,i.jsx)(Gj,{children:t("disponibilit_s_49923")}),(0,i.jsx)(py,{children:a||o?a:(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Wg,{height:"6"}),(0,i.jsx)(Rb,{editPath:eg.EDIT_USER_SLOTS(e.organizationId,e.eventId,e.userInfoId),eventId:e.eventId,formsUsersInfos:n.organization.userInfo.formsUsersInfos,organizationId:e.organizationId,showEditButton:s}),(0,i.jsx)(Wg,{height:"6"})]})})]})},Db=e=>{const{history:t,params:{organizationId:n}}=$g();return(0,i.jsxs)(lo.dO,{children:[(0,i.jsx)(lo.qh,{path:e.accreditationsPanelPath,children:(0,i.jsx)(Jj,{basePath:e.accreditationsPanelPath,canDeleteCheckedIn:e.canDeleteCheckedIn,canMemberAccredit:e.canMemberAccredit,canWishedAccreditationsEdit:e.canWishedAccreditationsEdit,defaultHiddenAccreditationsSlotsIds:e.defaultHiddenAccreditationsSlotsIds,delegationId:e.delegation?.id,eventId:e.eventId,organizationId:e.organizationId,volunteerRegistration:e.volunteerRegistration,onClose:()=>{e.reloadRow(),t.goBack(e.returnPathFallback)}})}),(0,i.jsx)(lo.qh,{path:e.availabilitiesPanelPath,children:(0,i.jsx)(Mb,{delegationId:e.delegation?.id,eventId:e.eventId,organizationId:e.organizationId,returnPathFallback:e.availabilitiesPanelPath,userInfoId:e.volunteerRegistration.userInfo.id})}),e.informationPanelPath&&e.delegation&&(0,i.jsx)(lo.qh,{path:e.informationPanelPath,children:(0,i.jsx)(sb,{delegation:e.delegation,organizationId:n,returnPathFallback:e.informationPanelPath,userInfoId:e.volunteerRegistration.userInfo.id})}),(0,i.jsx)(lo.qh,{path:e.positionsPanelPath,children:(0,i.jsx)(yb,{basePath:e.positionsPanelPath,canCheckIn:e.canCheckIn,canDelete:e.canDeletePosition,eventId:e.eventId,organizationId:e.organizationId,volunteerRegistration:e.volunteerRegistration,onClose:()=>{e.reloadRow(),t.goBack(e.returnPathFallback)}})}),(e.teamsPanelsPath||[]).map((n,a)=>(0,i.jsx)(lo.qh,{path:n,children:(0,i.jsx)(Tb,{eventId:e.eventId,teamCode:(e.volunteerRegistration.teams||[])[a].teamCode,onClose:()=>{e.reloadRow(),t.goBack(e.returnPathFallback)}})},a))]})},Ob=j("span",{variants:{color:{inherit:{color:"inherit"},cyan:{color:"$cyan"},gray25:{color:"$gray25"},gray50:{color:"$gray50"},grayCustom50:{color:"$grayCustom50"},gray100:{color:"$gray100"},gray200:{color:"$gray200"},gray300:{color:"$gray300"},gray400:{color:"$gray400"},gray500:{color:"$gray500"},grayCustom500:{color:"$grayCustom500"},gray600:{color:"$gray600"},gray700:{color:"$gray700"},grayCustom700:{color:"$grayCustom700"},gray800:{color:"$gray800"},grayCustom800:{color:"$grayCustom800"},gray900:{color:"$gray900"},grayCustom900:{color:"$grayCustom900"},grayDark50:{color:"$grayDark50"},grayDark100:{color:"$grayDark100"},grayDark500:{color:"$grayDark500"},grayDark700:{color:"$grayDark700"},primary25:{color:"$primary25"},primary50:{color:"$primary50"},primary100:{color:"$primary100"},primary200:{color:"$primary200"},primary300:{color:"$primary300"},primary400:{color:"$primary400"},primary500:{color:"$primary500"},primaryCustom500:{color:"$primaryCustom500"},primary600:{color:"$primary600"},primaryCustom600:{color:"$primaryCustom600"},primary700:{color:"$primary700"},primary800:{color:"$primary800"},primary900:{color:"$primary900"},primary950:{color:"$primary950"},error25:{color:"$error25"},error50:{color:"$error50"},error100:{color:"$error100"},error200:{color:"$error200"},error300:{color:"$error300"},error400:{color:"$error400"},error500:{color:"$error500"},error600:{color:"$error600"},error700:{color:"$error700"},error800:{color:"$error800"},error900:{color:"$error900"},warning25:{color:"$warning25"},warning50:{color:"$warning50"},warning100:{color:"$warning100"},warning200:{color:"$warning200"},warning300:{color:"$warning300"},warning400:{color:"$warning400"},warning500:{color:"$warning500"},warning600:{color:"$warning600"},warning700:{color:"$warning700"},warning800:{color:"$warning800"},warning900:{color:"$warning900"},success25:{color:"$success25"},success50:{color:"$success50"},success100:{color:"$success100"},success200:{color:"$success200"},success300:{color:"$success300"},success400:{color:"$success400"},success500:{color:"$success500"},success600:{color:"$success600"},success700:{color:"$success700"},success800:{color:"$success800"},success900:{color:"$success900"},blue25:{color:"$blue25"},blue50:{color:"$blue50"},blue100:{color:"$blue100"},blue200:{color:"$blue200"},blue300:{color:"$blue300"},blue400:{color:"$blue400"},blue500:{color:"$blue500"},blue600:{color:"$blue600"},blue700:{color:"$blue700"},blue800:{color:"$blue800"},blue900:{color:"$blue900"},blueGray25:{color:"$blueGray25"},blueGray50:{color:"$blueGray50"},blueGray100:{color:"$blueGray100"},blueGray200:{color:"$blueGray200"},blueGray300:{color:"$blueGray300"},blueGray400:{color:"$blueGray400"},blueGray500:{color:"$blueGray500"},blueGray600:{color:"$blueGray600"},blueGray700:{color:"$blueGray700"},blueGray800:{color:"$blueGray800"},blueGray900:{color:"$blueGray900"},blueLight50:{color:"$blueLight50"},blueLight100:{color:"$blueLight100"},blueLight400:{color:"$blueLight400"},blueLight500:{color:"$blueLight500"},blueLight600:{color:"$blueLight600"},blueLight700:{color:"$blueLight700"},blueLight900:{color:"$blueLight900"},purple25:{color:"$purple25"},purple50:{color:"$purple50"},purple100:{color:"$purple100"},purple200:{color:"$purple200"},purple300:{color:"$purple300"},purple400:{color:"$purple400"},purple500:{color:"$purple500"},purple600:{color:"$purple600"},purple700:{color:"$purple700"},purple800:{color:"$purple800"},purple900:{color:"$purple900"},purpleLight50:{color:"$purpleLight50"},purpleLight100:{color:"$purpleLight100"},purpleLight500:{color:"$purpleLight500"},purpleLight700:{color:"$purpleLight700"},purpleDark50:{color:"$purpleDark50"},purpleDark100:{color:"$purpleDark100"},purpleDark500:{color:"$purpleDark500"},purpleDark700:{color:"$purpleDark700"},pink25:{color:"$pink25"},pink50:{color:"$pink50"},pink100:{color:"$pink100"},pink200:{color:"$pink200"},pink300:{color:"$pink300"},pink400:{color:"$pink400"},pink500:{color:"$pink500"},pink600:{color:"$pink600"},pink700:{color:"$pink700"},pink800:{color:"$pink800"},pink900:{color:"$pink900"},orange50:{color:"$orange50"},orange100:{color:"$orange100"},orange400:{color:"$orange400"},orange500:{color:"$orange500"},orange600:{color:"$orange600"},orange700:{color:"$orange700"},redLight50:{color:"$redLight50"},redLight100:{color:"$redLight100"},redLight500:{color:"$redLight500"},redLight700:{color:"$redLight700"},redDark50:{color:"$redDark50"},redDark100:{color:"$redDark100"},redDark500:{color:"$redDark500"},redDark700:{color:"$redDark700"},green50:{color:"$green50"},green100:{color:"$green100"},green500:{color:"$green500"},green700:{color:"$green700"},greenDark50:{color:"$greenDark50"},greenDark100:{color:"$greenDark100"},greenDark500:{color:"$greenDark500"},greenDark700:{color:"$greenDark700"},brown50:{color:"$brown50"},brown100:{color:"$brown100"},brown500:{color:"$brown500"},brown700:{color:"$brown700"},indigo100:{color:"$indigo100"},indigo600:{color:"$indigo600"},white:{color:"white"}},fontSize:{inherit:{fontSize:"inherit"},textXs:{fontSize:"$textXs"},textSm:{fontSize:"$textSm"},textMd:{fontSize:"$textMd"},textLg:{fontSize:"$textLg"},textXl:{fontSize:"$textXl"},displayXs:{fontSize:"$displayXs"},displaySm:{fontSize:"$displaySm"},displayMd:{fontSize:"$displayMd"},displayLg:{fontSize:"$displayLg"},displayXl:{fontSize:"$displayXl"},display2Xl:{fontSize:"$display2Xl"}},fontWeight:{inherit:{fontWeight:"inherit"},regular:{fontWeight:"$regular"},medium:{fontWeight:"$medium"},semiBold:{fontWeight:"$semiBold"},bold:{fontWeight:"$bold"}}},defaultVariants:{color:"inherit",fontSize:"inherit",fontWeight:"inherit"}}),wb=d.forwardRef((e,t)=>(0,i.jsx)(Ob,{...(0,Pi.A)(e,"font"),...$i(e.font),ref:t,css:e.css}));wb.displayName="Span",$a.IX.fromDateTimes($a.c9.fromObject({year:2026,month:5,day:22}).startOf("day"),$a.c9.fromObject({year:2026,month:5,day:24}).endOf("day"));function Pb(e){switch(e){case me.Animajeconvention:return"Animaje Convention";case me.Asoassignment:return"Fiche d'affectation ASO";case me.Hbcldc:return"Badge HBC Ligue des Champions";case me.Hbclnh:return"Badge HBC LNH";case me.P2nassignment:return"Fiche d'affectation P2N (Exploit)";case me.P2nassignmentmontagedemontage:return"Fiche d'affectation P2N (Montage/Démontage)";case me.Paris20km:return"Badge 20km de Paris";case me.Paris20kmassignment:return"Fiche d'affectation 20km de Paris";case me.Paris20kmcontremarque:return"Contremarque 20km de Paris";case me.Playground:return"Fiche d'affectation Playground";case me.T24assignment:return"Fiche d'affectation T24";default:return ir()}}Object.keys({cf25078:"Parcours",cf25079:"Plan village",cf25080:"Poste vélo",cf25511:"Poste course à pied",cf25512:"Plan d'accès"});const $b=e=>{const t=Ei(),[n,a]=d.useState(!1),s=d.useCallback(async()=>{let t=!0;return a(!0),await e.onDelete(),t&&a(!1),()=>{t=!1}},[e.onDelete,n,a]);return(0,i.jsxs)(ff,{size:"md",onClose:e.onClose,children:[(0,i.jsx)($,{justify:"center",children:(0,i.jsx)($,{align:"center",css:{background:"$error100",borderRadius:"48px",color:"$error600",height:"48px",fontSize:"20px",width:"48px"},justify:"center",children:(0,i.jsx)(la,{icon:"circle-exclamation",iconStyle:"light"})})}),(0,i.jsx)(Wg,{height:"5"}),(0,i.jsx)(Ni,{css:{ellipsis:!0},font:"gray900 textLg regular",textAlign:"center",title:e.text,children:e.text}),"subtext"in e&&z(e.subtext).map((e,t)=>(0,i.jsxs)(d.Fragment,{children:[(0,i.jsx)(Wg,{height:"2"}),(0,i.jsx)(Ni,{color:"gray500",textAlign:"center",children:e})]},t)),"children"in e&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Wg,{height:"2"}),(0,i.jsx)(Ni,{color:"gray500",css:{alignSelf:"center"},children:e.children})]}),(0,i.jsx)(Wg,{height:"7"}),(0,i.jsxs)($,{gap:"3",justify:"end",children:[(0,i.jsx)(pa,{color:"error",isLoading:n,onClick:s,children:e.buttonText}),(0,i.jsx)(pa,{color:"white",onClick:e.onClose,children:t("annuler_48254")})]})]})},kb=e=>{const{translate:t,params:{eventId:n,delegationId:a}}=$g(),{mutate:s}=function(e={}){return Mi("mutation VolunteersRegistrationsMassDuplicate(\n $eventId: EventId!\n $delegationId: DelegationId\n $selecteds: MassActionSelectedsInput!\n $numberOfCopies: Int!\n) {\n numberOfCreatedMembers: volunteersRegistrationsMassDuplicate(\n eventId: $eventId\n delegationId: $delegationId\n selecteds: $selecteds\n numberOfCopies: $numberOfCopies\n )\n}\n",e)}(),[o,r]=(0,d.useState)(1),[l,c]=(0,d.useState)(!1);return(0,i.jsx)(Ta,{isOpen:!0,onClose:e.onClose,children:(0,i.jsxs)(Ea,{children:[(0,i.jsx)(Ca,{icon:"clone",children:t("dupliquer_un_me_90016")}),(0,i.jsx)(Aa,{children:(0,i.jsx)(hh,{label:t("nombre_de_copie_37518"),min:1,shouldParseAsInt:!0,value:o,onChange:r})}),(0,i.jsx)(va,{children:(0,i.jsx)(pa,{isLoading:l,onClick:async()=>{c(!0),await s({eventId:n,delegationId:a,selecteds:{ids:[e.userInfoId]},numberOfCopies:o}),e.onClose(),e.reload()},children:t("dupliquer_1_94438",e.name)})})]})})},Nb=e=>{const{translate:t,params:{organizationId:n,eventId:a,delegationId:s}}=$g(),{user:o}=io(),{mutate:r}=ks(),{mutate:l}=vs(),{mutate:c}=function(e={}){return Mi("mutation VolunteersRegistrationsMassDelete(\n $eventId: EventId!\n $selecteds: MassActionSelectedsInput!\n) {\n numberOfMembers: volunteersRegistrationsMassDelete(eventId: $eventId, selecteds: $selecteds)\n}\n",e)}(),[u,m]=(0,d.useState)(!1),[g,h]=(0,d.useState)(!1),[p,f]=(0,d.useState)(!1),I=(0,d.useMemo)(()=>e.customDocuments.filter(t=>Ku(t.populationsIds,e.member.fields.population)),[e.customDocuments,e.member]),_=a&&e.canMemberAccredit&&e.accreditationState===J.WaitingAccreditation,x=a&&e.showDocumentsDownload&&void 0!==e.member.links&&F(e.allowedCustomDocuments),y=x?e.allowedCustomDocuments.map((n,a)=>{const s=I.find(e=>e.slug===n);return s?(0,i.jsx)($p,{download:`${e.member.nameOrEmail}-${s.name}`,icon:"arrow-down-to-bracket",target:"_blank",to:Xc(e.member.links?.userCustomDocumentLinks[n],"pdf",{lang:o?.language}),children:t("t_l_charger_1_80752",s.name)},a):$n.includes(n)?(0,i.jsx)($p,{download:`${e.member.nameOrEmail}-custom-badge`,icon:"arrow-down-to-bracket",target:"_blank",to:Xc(e.member.links?.userCustomBadgeLinks[n],"pdf",{lang:o?.language}),children:t("t_l_charger_1_80752",Pb(n))},a):null}):[];return _||x||e.canDuplicate||e.canDelete||e.showDeleteFromEvent?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(ob,{children:[(0,i.jsx)(Op,{children:_?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)($p,{icon:"check",onClick:async()=>{await r({eventId:a,delegationId:s,selecteds:{ids:[e.member.id]}}),e.reload()},children:t("valider_les_acc_80801")}),(0,i.jsx)($p,{icon:"badge-check",to:eg.ACCREDIT(n,a,e.member.id),children:t("accr_diter_70543")})]}):null}),(0,i.jsx)(Op,{children:y}),(0,i.jsxs)(Op,{children:[e.canDuplicate&&(0,i.jsx)($p,{icon:"clone",onClick:()=>m(!0),children:t("dupliquer_28256")}),e.canDelete&&(0,i.jsx)($p,{color:"red",icon:"user-xmark",onClick:()=>h(!0),children:t("retirer_de_la_d_64963")})]}),(0,i.jsx)(Op,{children:e.showDeleteFromEvent&&(0,i.jsx)($p,{color:"red",icon:"trash-can",onClick:()=>f(!0),children:t("delete_from_eve_69290")})})]}),g&&(0,i.jsx)($b,{buttonText:t("supprimer_43083"),subtext:[t("_tes_vous_sur_d_88752")],text:t("suppression_de_73669",e.member.nameOrEmail),onClose:()=>h(!1),onDelete:async()=>{await l({organizationId:n,eventId:a,delegationId:s,selecteds:{ids:[e.member.id]},deleteFromEvent:e.deleteFromEvent}),e.reload()}}),e.canDuplicate&&u&&(0,i.jsx)(kb,{name:e.member.nameOrEmail,reload:e.reload,userInfoId:e.member.id,onClose:()=>m(!1)}),p&&e.volunteerRegistrationId&&(0,i.jsx)($b,{buttonText:t("supprimer_43083"),subtext:[t("are_you_sure_yo_46668")],text:t("suppression_de_73669",e.member.nameOrEmail),onClose:()=>f(!1),onDelete:async()=>{await c({eventId:a,selecteds:{ids:[e.member.id]}}),e.reload()}})]}):null},Lb=(0,d.forwardRef)(({borderRadius:e,size:t,value:n,onChange:a,...s},o)=>{const r=(0,d.useMemo)(()=>e??4,[e]),l=(0,d.useMemo)(()=>t??24,[t]),c=(0,d.useMemo)(()=>(0,eI.A)(e=>{a(e)},500),[a]);return(0,i.jsx)(Ni,{css:{background:n,borderRadius:`${r}px`,height:`${l}px`,overflow:"hidden",width:`${l}px`,"& input":{background:"transparent",border:"none",borderRadius:"$1",cursor:"pointer",height:`${l}px`,padding:"0",width:`${l}px`,"&::-webkit-color-swatch-wrapper":{padding:0},"&::-webkit-color-swatch":{borderRadius:"$1",border:"none"},"&::-moz-color-swatch":{border:"none"}}},children:(0,i.jsx)("input",{ref:o,type:"color",value:n,onChange:e=>{c(e.target.value)},...s})})});Lb.displayName="ColorPicker";const zb=({onChange:e,css:t,label:n,description:a,value:s,hint:o,state:r,initialValue:l,icon:c,...u})=>{const m=Ei(),g=(0,d.useRef)(null),{inputId:h,descId:p,errorId:f}=dh();return(0,i.jsxs)($,{css:t,direction:"column",width:1,children:[(0,i.jsx)(uh,{htmlFor:h,isClickable:!1,children:n}),(0,i.jsx)(lh,{id:p,children:a}),(n||a)&&(0,i.jsx)(Wg,{height:"1"}),(0,i.jsxs)(gh,{cursor:"default",icon:c,state:r,onClick:()=>{g.current?.click()},children:[(0,i.jsxs)($,{align:"center",css:{flex:"1"},height:1,children:[(0,i.jsx)(Lb,{ref:g,"aria-describedby":a?p:void 0,"aria-errormessage":"error"===r?f:void 0,"aria-invalid":"error"===r,id:h,value:s,onChange:e,...u}),(0,i.jsx)(Wg,{width:"3"}),(0,i.jsx)(Ni,{"aria-hidden":!0,color:"gray800",css:{flex:"1","& input[type=text]":{background:"transparent",border:"none",color:"$gray800",height:"100%",outline:"none",width:"100%"}},height:1,onClick:xa,children:(0,i.jsx)("input",{disabled:"disabled"===r,id:h,type:"text",value:s,onChange:t=>{e(t.target.value)},...u})})]}),l&&s!==l&&(0,i.jsx)(pa,{color:"invisible",css:{color:"$primary500"},onClick:t=>{xa(t),e(l)},children:m("remettre_sa_v_90478")})]}),(0,i.jsx)(ch,{id:f,state:r,children:o})]})},Fb=({name:e,hint:t,state:n,...a})=>(0,i.jsx)(Gg.D0,{name:e,render:s=>{const o=oh(s.meta);return(0,i.jsx)(zb,{hint:o?s.meta.error:t,name:e,state:o?"error":n,value:s.input.value,onChange:e=>{s.input.onChange(e)},...a})}}),Ub=({value:e,onChange:t,...n})=>{const[a,s]=(0,d.useState)(e?.toString()??""),[o,r]=(0,d.useState)(e);return o!==e&&(s(e?.toString()??""),r(e)),(0,i.jsx)(hh,{value:a,onChange:e=>{const n=parseFloat(e);s(e),r(isNaN(n)?null:n),t(isNaN(n)?null:n)},...n})},Bb=({name:e,hint:t,state:n,...a})=>(0,i.jsx)(Gg.D0,{name:e,render:s=>{const o=oh(s.meta);return(0,i.jsx)(Ub,{hint:o?s.meta.error:t,name:e,state:o?"error":n,value:s.input.value,onBlur:s.input.onBlur,onChange:s.input.onChange,onFocus:s.input.onFocus,...a})}}),Gb=j("div",{alignItems:"center",borderRadius:"$1",color:"$gray600",cursor:"pointer",display:"flex",height:"40px",justifyContent:"center",width:"40px",variants:{active:{true:{background:"$primary100",color:"$primary500"},false:{"&:hover":{background:"$gray200",color:"$gray800"}}}}}),Vb=({css:e,label:t,description:n,value:a,height:s,renderOnPortal:o,onChange:r,...l})=>{const c=Ei(),[u,m]=(0,d.useState)(!1),g=(0,d.useMemo)(()=>(0,ho.A)(qn.map(e=>({value:e,name:c(e)})),e=>e.name),[]);return(0,i.jsxs)($,{css:e,direction:"column",width:1,children:[(0,i.jsx)(uh,{children:t}),(0,i.jsx)(lh,{children:n}),(t||n)&&(0,i.jsx)(Wg,{height:"1"}),(0,i.jsxs)(Ep,{isOpen:u,onStateChange:m,children:[(0,i.jsx)(Lp,{children:(0,i.jsx)(gh,{cursor:"pointer",icon:da(a),rightIcon:u?"chevron-up":"chevron-down",...l,children:(0,i.jsx)(Ni,{css:{flex:"1"},children:c(a)})})}),(0,i.jsx)(Np,{maxHeight:300,placement:"bottom",renderOnPortal:o,width:"match",children:(0,i.jsx)($,{css:{px:"$2"},gap:"2",width:1,wrap:"wrap",children:g.map(e=>(0,i.jsx)(Gb,{active:a===e.value,onClick:()=>{m(!1),r(e.value)},children:(0,i.jsx)(la,{icon:da(e.value)})},e.value))})})]})]})},Wb=({name:e,hint:t,state:n,...a})=>(0,i.jsx)(Gg.D0,{name:e,render:s=>{const o=oh(s.meta);return(0,i.jsx)(Vb,{hint:o?s.meta.error:t,name:e,state:o?"error":n,value:s.input.value,onBlur:s.input.onBlur,onChange:e=>{s.input.onChange(e)},onFocus:s.input.onFocus,...a})}});var qb=n(7785),Yb=n(8790),Hb=(n(1036),n(6585)),Zb=n(2230),Kb=n(2910),Qb=n(456);const Xb=(e,t)=>{const n=document.createElement("span");return n.className=e,void 0!==t&&(n.textContent=t),n};class Jb extends Yb.k_1{static get pluginName(){return"VariablesMention"}static get requires(){return[Yb.PXQ]}init(){const e=this.editor,t=e.commands.get("mention");this.listenTo(t,"execute",(t,n)=>{const i=n[0];if("{"!==i.marker)return;t.stop();const a=e.model,s=a.document.selection,o="string"==typeof i.mention?i.mention:i.mention.id;a.change(e=>{const t=new Map(s.getAttributes());t.delete("mention"),a.insertContent(e.createText(o,t),i.range??s.getFirstRange())})},{priority:"high"})}}const ev=E({".ck.ck-mentions":{maxWidth:"420px"},".ck.ck-mentions .ck-button.rich-editor-variable-item":{alignItems:"stretch",background:"transparent !important",borderRadius:"0 !important",boxShadow:"none !important",color:"$gray800 !important",cursor:"pointer",display:"flex",flexDirection:"column",padding:"0 !important",width:"100%"},".ck.ck-mentions .rich-editor-variable-item-group":{borderTop:"1px solid $gray100",color:"$gray500",cursor:"default",fontSize:"$textXs",fontWeight:"$semiBold",padding:"$2 $3 $1"},".ck.ck-mentions .ck-list__item:first-child .rich-editor-variable-item-group":{borderTop:"none"},".ck.ck-mentions .rich-editor-variable-item-row":{alignItems:"baseline",display:"flex",gap:"$4",justifyContent:"space-between",padding:"$2 $3"},".ck.ck-mentions .rich-editor-variable-item:hover .rich-editor-variable-item-row":{background:"$gray100"},".ck.ck-mentions .ck-mentions__item_focused .rich-editor-variable-item-row":{background:"$primary100",color:"$primary700"},".ck.ck-mentions .rich-editor-variable-item-label":{fontSize:"$textSm",whiteSpace:"nowrap"},".ck.ck-mentions .rich-editor-variable-item-key":{color:"$gray500",fontSize:"$textXs",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}}),tv=({css:e,label:t,description:n,state:a,initialValue:s,onChange:o,onBlur:r,onFocus:l,hint:c,placeholder:u,value:g,variables:h,...p})=>{const{translate:f,params:{organizationId:I}}=$g(),{language:_}=Ci(bi),x=(0,d.useRef)(h),[y]=(0,d.useState)(void 0!==h);(0,d.useEffect)(()=>{x.current=h},[h]),y&&ev();const S=(0,d.useMemo)(()=>[{color:"white",label:f("blanc_36425")},{color:b.colors.gray800.value,label:f("gris_fonc_51159")},{color:b.colors.gray400.value,label:f("gris_clair_52465")},{color:b.colors.primary900.value,label:f("bleu_fonc_40491")},{color:b.colors.primary500.value,label:f("bleu_41949")},{color:b.colors.error700.value,label:f("rouge_fonc_45023")},{color:b.colors.error500.value,label:f("rouge_75079")},{color:b.colors.warning300.value,label:f("jaune_53503")},{color:b.colors.warning600.value,label:f("orange_64132")},{color:b.colors.success700.value,label:f("vert_fonc_37265")},{color:b.colors.success500.value,label:f("vert_27018")},{color:b.colors.purple700.value,label:f("violet_fonc_77270")},{color:b.colors.purple500.value,label:f("violet_54005")},{color:b.colors.pink700.value,label:f("rose_fonc_98996")},{color:b.colors.pink500.value,label:f("rose_49360")}],[]);return(0,i.jsxs)($,{css:e,direction:"column",width:1,children:[(0,i.jsx)(uh,{children:t}),(0,i.jsx)(lh,{children:n}),(t||n)&&(0,i.jsx)(Wg,{height:"1"}),(0,i.jsx)(Ni,{css:{"--ck-border-radius":"$radii$1","--ck-color-toolbar-background":"$colors$gray100","& .ck.ck-toolbar":{borderColor:"error"===a?"$error500":"$gray300",borderBottom:"none","& .ck.ck-toolbar__separator":{background:"$gray200"},"& .ck.ck-button":{color:"$gray600","&:hover":{background:"$gray200",color:"$gray800",cursor:"pointer"},"&.ck-on, &.ck-on:hover:not(.ck-disabled)":{background:"$primary100",color:"$primary500"}}},"& .ck.ck-content":{borderColor:"error"===a?"$error500 !important":"$gray300 !important",borderStyle:"solid",borderWidth:"1px",borderTop:"none !important",color:"$gray800",minHeight:"100px",px:"$3","&.ck-editor__editable.ck-focused":{boxShadow:"none"},"& p.h-small":{fontSize:"12px"}},"& .ck.ck-editor__editable > .ck-placeholder::before":{color:"$gray500"},...xp("& .ck.ck-content")},width:1,children:(0,i.jsx)(qb.aF,{config:{licenseKey:"GPL",plugins:[Yb.C1k,Yb.Y0,Yb.yN4,Yb.uwK,Yb.LcX,Yb.rwA,Yb.DZT,Yb._V3,Yb.uXn,Yb.BRX,Yb.J20,Yb.N_E,Yb.B8B,Yb.PXQ,Yb.fzL,Yb.fTX,Yb.z2z,...y?[Jb]:[]],mention:y?{feeds:[{marker:"{",dropdownLimit:Number.MAX_SAFE_INTEGER,feed:e=>function(e){return e.map((t,n)=>({id:`{${t.key}}`,text:`{${t.key}}`,variable:t,isFirstOfGroup:0===n||e[n-1].group!==t.group}))}(function(e,t){const n=m(t).split(/\s+/).filter(e=>e.length>0);return t.includes("}")?[]:0===n.length?e:e.filter(e=>{const t=m(`${e.label} ${e.groupLabel} ${e.key}`);return n.every(e=>t.includes(e))})}(x.current??[],e)),itemRenderer:e=>function(e){const t=Xb("rich-editor-variable-item"),n=Xb("rich-editor-variable-item-row");return e.isFirstOfGroup&&t.append(Xb("rich-editor-variable-item-group",e.variable.groupLabel)),n.append(Xb("rich-editor-variable-item-label",e.variable.label),Xb("rich-editor-variable-item-key",e.variable.key)),t.append(n),t}(e)}]}:void 0,translations:[Hb.A,Zb.A,Kb.A,Qb.A],placeholder:u,fontColor:{colors:S},fontBackgroundColor:{colors:S},language:_.toString().toLowerCase(),simpleUpload:{uploadUrl:`${sa.HEAVENT_API_URL}/image/upload?organizationId=${I}`},heading:{options:[{model:"headingParagraphSmall",view:{name:"p",classes:"h-small"},title:f("paragraphe_pet_01073"),class:"ck-heading_paragraph_small",converterPriority:"high"},{model:"paragraph",title:"Paragraph",class:"ck-heading_paragraph"},{model:"heading1",view:"h2",title:"Heading 1",class:"ck-heading_heading1"},{model:"heading2",view:"h3",title:"Heading 2",class:"ck-heading_heading2"},{model:"heading3",view:"h4",title:"Heading 3",class:"ck-heading_heading2"}]},toolbar:{items:["bold","italic","underline","|","heading","fontColor","fontBackgroundColor","alignment","|","blockQuote","bulletedList","numberedList","|","link","imageUpload","|","undo","redo"],shouldNotGroupWhenFull:!0}},data:s,editor:Yb.aRV,onBlur:()=>{r?.()},onChange:(e,t)=>{o(t.getData())},onFocus:()=>{l?.()},...p})}),(0,i.jsx)(ch,{state:a,children:c})]})},nv=({name:e,hint:t,state:n,...a})=>(0,i.jsx)(Gg.D0,{name:e,parse:sh.A,render:s=>{const o=oh(s.meta);return(0,i.jsx)(tv,{hint:o?s.meta.error:t,initialValue:s.input.value,name:e,state:o?"error":n,onChange:e=>{s.input.onChange(e)},...a})}}),iv=e=>{const{translate:t,params:{organizationId:n}}=$g(),a=Ci(gr),s=Ci(rd),o=ZI(e.customField),r=(0,d.useMemo)(()=>Ii.filter(e=>e!==Xt.Error),[]);if((0,d.useEffect)(()=>{e.slug===q.Acronym||e.slug===q.Address||e.slug===q.Color||e.slug===q.Description||e.slug===q.Icon||e.slug===q.Name||e.slug===ot.Acronym||e.slug===ot.Address||e.slug===ot.Color||e.slug===ot.Description||e.slug===ot.Icon||e.slug===ot.Name||e.slug===Ie.Description||e.slug===Ie.Name||e.customField?.fieldType===Le.Address||e.customField?.fieldType===Le.Country||e.customField?.fieldType===Le.Language||e.customField?.fieldType===Le.Nationality||e.customField?.fieldType===Le.Sex||e.customField?.fieldType===Le.Text||e.customField?.fieldType===Le.Textarea||e.customField?.fieldType===Le.Time?"string"!=typeof e.value&&e.change(e.name,""):e.slug===q.AutoAccredit||e.slug===q.WeezeventIsSynchronized||e.slug===he.Privacy||e.slug===Ie.IsLocked||e.slug===Ie.ShowInDelegationSpace||e.slug===Ie.CanLeadersAddMembers||e.slug===Ie.CanLeadersEditCustomFields||e.slug===Ie.CanLeadersEditMembers||e.slug===Ie.CanLeadersDeleteMembers||e.slug===Ie.CanLeadersDuplicateMembers||e.slug===Ie.CanLeadersEditColumns||e.slug===Ie.CanLeadersImportMembers||e.slug===Ie.CanLeadersSeeHiddenAccreditationsSlots||e.slug===Ie.ShowAllAccreditations||e.slug===Ie.ShowFormLinkInDelegationSpace||e.slug===ot.WeezeventIsSynchronized||e.customField?.fieldType===Le.Checkbox||e.customField?.fieldType===Le.Validation?"boolean"!=typeof e.value&&e.change(e.name,!1):e.slug===q.Category||e.slug===Ie.Category||e.slug===ot.Category?"number"!=typeof e.value&&e.change(e.name,e.categories[0]?.id):e.slug===q.Index||e.slug===q.Latitude||e.slug===q.Longitude||e.slug===ot.Latitude||e.slug===ot.Longitude||e.slug===ot.Zoom||e.slug===Ie.MaxResources||e.customField?.fieldType===Le.Number?"number"!=typeof e.value&&e.change(e.name,0):e.slug===q.Tag||e.slug===ot.Tag||e.slug===Ie.Campaigns||e.slug===Ie.Documents||e.slug===Ie.Tag||e.slug===ot.Traces?Array.isArray(e.value)||e.change(e.name,[]):e.slug===Ie.DeadlineDate||e.customField?.fieldType===Le.Date||e.customField?.fieldType===Le.Datetime?$a.c9.isDateTime(e.value)||h(e.value)||e.change(e.name,$a.c9.invalid("Invalid")):e.customField?.fieldType===Le.File?null!==e.value&&"object"==typeof e.value||e.change(e.name,a.documentInputDefault()):e.customField?.fieldType===Le.Phone?null!==e.value&&"object"==typeof e.value||e.change(e.name,s.basePhoneInputDefault()):e.customField?.fieldType===Le.Select?e.customField.canSelectMultiple&&!Array.isArray(e.value)?e.change(e.name,[]):e.customField.canSelectMultiple||"number"==typeof e.value||e.change(e.name,""):e.slug===Ie.Form?"number"!=typeof e.value&&e.change("massEdit.value",e.forms[0].id):e.slug===Ie.DelegationsSpaceLayout?"number"!=typeof e.value&&F(e.delegationsSpaceLayouts)&&e.change("massEdit.value",e.delegationsSpaceLayouts[0].id):e.slug===ot.Layer?Kn.includes(e.value)||e.change("massEdit.value",Xe.Google):e.slug===Zt.State?r.includes(e.value)||e.change("massEdit.value",r[0]):e.slug===Zt.Frequency&&(hi.includes(e.value)||e.change("massEdit.value",Yt.Every10Minutes))},[e.customField,e.slug]),e.slug===q.Acronym||e.slug===ot.Acronym||e.slug===q.Address||e.slug===ot.Address||e.customField?.fieldType===Le.Address||e.customField?.fieldType===Le.Text)return(0,i.jsx)(ph,{name:e.name});if(e.slug===q.AutoAccredit||e.slug===q.WeezeventIsSynchronized||e.slug===Ie.IsLocked||e.slug===Ie.ShowFormLinkInDelegationSpace||e.slug===Ie.ShowInDelegationSpace||e.slug===Ie.CanLeadersAddMembers||e.slug===Ie.CanLeadersEditCustomFields||e.slug===Ie.CanLeadersEditMembers||e.slug===Ie.CanLeadersDeleteMembers||e.slug===Ie.CanLeadersDuplicateMembers||e.slug===Ie.CanLeadersEditColumns||e.slug===Ie.CanLeadersImportMembers||e.slug===Ie.CanLeadersSeeHiddenAccreditationsSlots||e.slug===Ie.ShowAllAccreditations||e.slug===ot.WeezeventIsSynchronized||e.customField?.fieldType===Le.Checkbox||e.customField?.fieldType===Le.Validation)return(0,i.jsxs)(WI,{name:e.name,shouldParseAsBoolean:!0,children:[(0,i.jsx)("option",{value:"true",children:t("oui_54361")}),(0,i.jsx)("option",{value:"false",children:t("non_33516")})]});if(e.slug===he.Privacy)return(0,i.jsxs)(WI,{name:e.name,shouldParseAsBoolean:!0,children:[(0,i.jsx)("option",{value:"true",children:t("Private")}),(0,i.jsx)("option",{value:"false",children:t("Public")})]});if(e.slug===q.Category||e.slug===Ie.Category||e.slug===ot.Category)return(0,i.jsx)(UI,{isSearchVisible:!0,name:e.name,children:e.categories.map(e=>(0,i.jsx)("option",{value:e.id,children:e.name},e.id))});if(e.slug===q.Color||e.slug===ot.Color)return(0,i.jsx)(Fb,{name:e.name});if(e.slug===q.Description||e.slug===Ie.Description||e.slug===ot.Description)return(0,i.jsx)(Ni,{css:{overflow:"hidden auto"},width:1,children:(0,i.jsx)(nv,{name:e.name})});if(e.slug===q.Icon||e.slug===ot.Icon)return(0,i.jsx)(Wb,{name:e.name});if(e.slug===q.Latitude||e.slug===ot.Latitude)return(0,i.jsx)(Bb,{name:e.name});if(e.slug===q.Longitude||e.slug===ot.Longitude)return(0,i.jsx)(Bb,{name:e.name});if(e.slug===q.Name||e.slug===ot.Name||e.slug===Zt.Name)throw new Error("Should not happen");return e.slug===Zt.State?(0,i.jsx)(WI,{name:e.name,children:r.map(e=>(0,i.jsx)("option",{value:e,children:t(e)},e))}):e.slug===Zt.Frequency?(0,i.jsx)(WI,{name:e.name,children:hi.map(e=>(0,i.jsx)("option",{value:e,children:t(e)},e))}):e.slug===Ie.Campaigns?(0,i.jsx)(UI,{isSearchVisible:!0,multiple:!0,name:e.name,children:e.campaigns.map(e=>(0,i.jsx)("option",{value:e.id,children:e.name},e.id))}):e.slug===Ie.Documents?(0,i.jsx)(UI,{isSearchVisible:!0,multiple:!0,name:e.name,children:e.customDocuments.map(e=>(0,i.jsx)("option",{value:e.slug,children:e.name},e.slug))}):e.slug===q.Tag||e.slug===ot.Tag||e.slug===Ie.Tag?(0,i.jsx)(UI,{isSearchVisible:!0,multiple:!0,name:e.name,children:e.tags.map(e=>(0,i.jsx)("option",{value:e.id,children:e.name},e.id))}):e.slug===ot.Traces?(0,i.jsx)(UI,{isSearchVisible:!0,multiple:!0,name:e.name,children:e.traces.map(e=>(0,i.jsx)("option",{value:e.id,children:e.name},e.id))}):e.slug===q.Index||e.slug===Ie.MaxResources||e.slug===ot.Zoom||e.customField?.fieldType===Le.Number?(0,i.jsx)(ph,{name:e.name,shouldParseAsInt:!0}):e.customField?.fieldType===Le.Country?(0,i.jsx)(UI,{isSearchVisible:!0,name:e.name,children:o}):e.slug===Ie.DeadlineDate||e.customField?.fieldType===Le.Date?(0,i.jsx)(Bf,{name:e.name}):e.customField?.fieldType===Le.Datetime?(0,i.jsx)(Vf,{name:e.name}):e.customField?.fieldType===Le.File?e.customField.fileType===Fe.Picture?(0,i.jsx)(vI,{allowCrop:!0,organizationId:n,prefix:`${e.name}.`}):(0,i.jsx)(yI,{accept:[Yf.Images,Yf.Pdf],acl:"private",organizationId:n,prefix:`${e.name}.`}):e.customField?.fieldType===Le.Language?(0,i.jsxs)(WI,{name:e.name,children:[(0,i.jsx)("option",{value:"",children:t("s_lectionnez_un_31086")}),o]}):e.customField?.fieldType===Le.Nationality?(0,i.jsx)(UI,{isSearchVisible:!0,name:e.name,children:o}):e.customField?.fieldType===Le.Phone?(0,i.jsx)(RI,{prefix:`${e.name}.`}):e.customField?.fieldType===Le.Select?e.customField.canSelectMultiple?(0,i.jsx)(UI,{isSearchVisible:!0,multiple:!0,name:e.name,children:o}):(0,i.jsx)(UI,{isSearchVisible:!0,name:e.name,placeholder:t("s_lectionnez_un_44130"),children:o}):e.customField?.fieldType===Le.Sex?(0,i.jsxs)(WI,{name:e.name,children:[(0,i.jsx)("option",{value:"",children:t("s_lectionnez_un_43620")}),o]}):e.customField?.fieldType===Le.Textarea?(0,i.jsx)(YI,{name:e.name}):e.customField?.fieldType===Le.Time?(0,i.jsx)(qf,{name:e.name}):e.slug===Ie.Form?(0,i.jsx)(UI,{isSearchVisible:!0,multiple:!1,name:"massEdit.value",children:e.forms.map(e=>(0,i.jsx)("option",{value:e.id,children:e.name},e.id))}):e.slug===Ie.DelegationsSpaceLayout?(0,i.jsx)(UI,{isSearchVisible:!0,multiple:!1,name:"massEdit.value",children:e.delegationsSpaceLayouts.map(e=>(0,i.jsx)("option",{value:e.id,children:e.name},e.id))}):e.slug===ot.Layer?(0,i.jsxs)(WI,{name:e.name,children:[(0,i.jsx)("option",{value:Xe.Google,children:"Plan"}),(0,i.jsx)("option",{value:Xe.GoogleSatellite,children:"Satellite"}),(0,i.jsx)("option",{value:Xe.IgnPlan,children:"IGN Plan"})]}):null},av=({displayName:e,isAddDeleteVisible:t,isResetVisible:n,massEditFieldInput:a,reset:s,strategy:o,change:r})=>{const{translate:d}=$g();return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Wg,{height:"4"}),(0,i.jsx)(Ni,{font:"gray700 textSm medium",children:d("que_souhaitez_v_87607")}),(0,i.jsx)(Wg,{height:"2"}),(0,i.jsx)(uf,{state:s||o!==Je.Replace?"unchecked":"checked",onClick:()=>{r("massEdit.reset",!1),r("massEdit.strategy",Je.Replace)},children:d("remplacer_les_v_78885")}),!s&&o===Je.Replace&&a,(0,i.jsx)(Wg,{height:"3"}),t&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(uf,{state:s||o!==Je.Add?"unchecked":"checked",onClick:()=>{r("massEdit.reset",!1),r("massEdit.strategy",Je.Add)},children:d("ajouter_des_val_80159")}),!s&&o===Je.Add&&a,(0,i.jsx)(Wg,{height:"3"}),(0,i.jsx)(uf,{state:s||o!==Je.Delete?"unchecked":"checked",onClick:()=>{r("massEdit.reset",!1),r("massEdit.strategy",Je.Delete)},children:d("supprimer_des_v_96120")}),!s&&o===Je.Delete&&a,(0,i.jsx)(Wg,{height:"3"})]}),n&&(0,i.jsx)(uf,{state:s?"checked":"unchecked",onClick:()=>r("massEdit.reset",!0),children:d("r_initialiser_42983",e)})]})},sv=e=>{const t=Ei(),n=Ci(Td),a=(0,d.useMemo)(()=>(0,ho.A)(e.customFields??[],e=>e.name.toLowerCase()),[e.customFields]),s=(0,d.useMemo)(()=>(0,ho.A)([...a.map(e=>({slug:e.slug,name:e.name,label:e.label})),...e.properties.map(e=>({slug:e,name:t(e),label:null}))],e=>e.name.toLowerCase()),[a,e.properties]);return(0,i.jsx)(ff,{size:"md",onClose:e.onClose,children:(0,i.jsx)(Gg.lV,{initialValues:{massEdit:{reset:!1,selecteds:e.selecteds,slug:"",value:"",strategy:Je.Replace}},initialValuesEqual:gd.A,render:({form:n,handleSubmit:o,submitting:r,values:d})=>{const{reset:l,slug:c,strategy:u}=d.massEdit,m=s.find(e=>e.slug===c),g=a.find(e=>e.slug===c),p=h(c)?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Wg,{height:"1"}),(0,i.jsx)(Ni,{css:{paddingLeft:"$6"},children:(0,i.jsx)(iv,{campaigns:e.campaigns,categories:e.categories,change:n.change,customDocuments:e.customDocuments,customField:g,delegationsSpaceLayouts:e.delegationsSpaceLayouts,forms:e.forms,name:"massEdit.value",slug:c,tags:e.tags,traces:e.traces,value:d.massEdit.value})})]}):null,f=c===q.Tag||c===Ie.Campaigns||c===Ie.Documents||!0===g?.canSelectMultiple,I=c!==q.Category&&c!==he.Category&&c!==Ie.Category&&c!==ot.Category&&c!==ot.Layer&&c!==ot.Zoom&&c!==q.WeezeventIsSynchronized&&c!==he.Privacy&&c!==Ie.Form&&c!==Ie.IsLocked&&c!==Ie.ShowFormLinkInDelegationSpace&&c!==Ie.ShowInDelegationSpace&&c!==Ie.CanLeadersAddMembers&&c!==Ie.CanLeadersEditCustomFields&&c!==Ie.CanLeadersEditMembers&&c!==Ie.CanLeadersDeleteMembers&&c!==Ie.CanLeadersDuplicateMembers&&c!==Ie.CanLeadersEditColumns&&c!==Ie.CanLeadersImportMembers&&c!==Ie.CanLeadersSeeHiddenAccreditationsSlots&&c!==Ie.ShowAllAccreditations&&c!==ot.WeezeventIsSynchronized&&c!==Zt.Frequency&&c!==Zt.State;return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)($,{justify:"center",children:(0,i.jsx)(mf,{color:"primary",icon:"sliders"})}),(0,i.jsx)(Wg,{height:"4"}),(0,i.jsx)(Ni,{color:"gray900",fontSize:"textLg",fontWeight:"medium",textAlign:"center",children:t("_dition_de_la_v_67585")}),(0,i.jsx)(Wg,{height:"7"}),e.isLoading?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Th,{borderRadius:"$1",height:20,width:1}),(0,i.jsx)(Wg,{height:"1"}),(0,i.jsx)(Th,{borderRadius:"$1",height:40,width:1})]}):(0,i.jsx)(UI,{isSearchVisible:!0,label:t("quel_est_le_cha_81138"),name:"massEdit.slug",placeholder:t("s_lectionnez_un_82446"),children:s.map(e=>{return(0,i.jsx)("option",{value:e.slug,children:(t=e,h(t.label)?`${t.name} (${t.label})`:t.name)},e.slug);var t})}),m&&(0,i.jsx)(av,{change:n.change,displayName:m.name,isAddDeleteVisible:f,isResetVisible:I,massEditFieldInput:p,reset:l,strategy:u}),(0,i.jsx)(Wg,{height:"7"}),(0,i.jsxs)($,{gap:"3",justify:"end",children:[(0,i.jsx)(pa,{disabled:(_=d.massEdit,x=g,!(_.reset||!x||x.fieldType!==Le.Select||x.canSelectMultiple||"number"==typeof _.value&&!isNaN(_.value))),isLoading:r,onClick:o,children:t("modifier_la_val_07602")}),(0,i.jsx)(pa,{color:"white",onClick:e.onClose,children:t("annuler_48254")})]})]});var _,x},validate:e=>{const t=a.find(t=>t.slug===e.massEdit.slug),i=t&&!e.massEdit.reset?n.getValidationRuleError(t,e.massEdit.value):null;return i?{massEdit:{value:i}}:{}},onSubmit:async t=>{const n=(await e.mutate(t.massEdit)).numberOfEdited;e.onSuccess(n),e.onClose()}})})},ov=e=>(0,i.jsx)(sv,{campaigns:[],categories:[],customDocuments:[],customFields:e.customFields,delegationsSpaceLayouts:[],forms:[],isLoading:!1,mutate:e.mutate,properties:L,selecteds:e.selecteds,tags:[],traces:[],onClose:e.onClose,onSuccess:e.onSuccess}),rv=j("div",{margin:"auto",width:"$containerTablet","@desktop":{width:"$container"}}),dv=d.forwardRef((e,t)=>(0,i.jsx)(Ni,{ref:t,css:{background:"$gray50",overflowX:"hidden",overflowY:"auto",py:"$10",...e.css},height:1,width:1,children:(0,i.jsx)(rv,{children:e.children})}));dv.displayName="CenteredContainer";const lv=e=>(0,i.jsx)($,{as:"legend",css:{position:"absolute",overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(50%)",width:"1px",height:"1px",whiteSpace:"nowrap"},direction:"column",children:e.heading});var cv;!function(e){e.Dark="dark",e.Normal="normal"}(cv||(cv={}));const uv=({canSelect:e,centerHeader:t,children:n,disabled:a,footerActions:s,heading:o,header:r,headerStyle:l=cv.Normal,headerActions:c,hideHeader:u,initialIsOpen:m,isCompleted:g,isOpen:h,isToggleable:p,onSelect:f,onToggle:I,stepNumber:_,subtitle:x,...y})=>{const S=Ei(),{descId:j}=dh(),[b,v]=d.useState(m??!0),A=p?b:h,C=l===cv.Dark;return(0,i.jsx)($f.Provider,{value:{isDisabled:a},children:(0,i.jsx)(Ip,{"aria-describedby":j,as:"fieldset",css:{borderRadius:C?"$1":void 0,overflow:"hidden","&:disabled :is(input, select, textarea, datalist, button)":{cursor:"not-allowed !important"},...y.css},direction:"column",disabled:a,footer:!1!==A&&s,header:(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(lv,{heading:o}),!u&&(0,i.jsxs)($,{align:"center",as:"header",css:C?{background:A?"$gray900":"white",blockSize:"64px",cursor:e&&!A?"pointer":"default",padding:"$6 $6 $5 $6"}:t?{padding:"$7 $7 0 $7",textAlign:"center"}:!1!==A?{borderBlockEnd:"1px solid $gray200",padding:"$6 $7 $5 $7"}:{padding:"$6 $7"},gap:"3",onClick:f,children:[C&&(0,i.jsx)($,{align:"center",css:{background:g?"$success200":"white",border:g?"none":"1px solid $gray200",borderRadius:"32px",color:g?"$success700":"$gray800",fontWeight:"$medium"},height:32,justify:"center",width:32,children:g?(0,i.jsx)(la,{icon:"check"}):_}),(0,i.jsxs)(Ni,{css:{flex:"1"},children:[o&&(0,i.jsx)(Zg,{"aria-hidden":"true",css:C?A?{color:"white"}:void 0:{fontWeight:"$semiBold"},children:o}),x&&(0,i.jsx)(N,{color:C?A?"white":"gray800":void 0,id:j,textStyle:"subtitle",children:x})]}),c&&(0,i.jsx)($,{gap:"4",justify:"end",children:c}),p&&(0,i.jsx)(Ef,{label:S("toggle_section_92160"),size:"md",value:b,onChange:e=>{v(e),I?.(e)}})]})]}),...y,children:!1!==A&&(0,i.jsx)($,{css:{"&:has(> fieldset.fieldset--column)":{gap:"$9"}},direction:"column",children:n})})})},mv=e=>(0,i.jsx)(ih,{direction:"column",formRenderProps:e.formRenderProps,render:e.render}),gv=e=>{const{translate:t}=$g(),[n,a]=d.useState(!1),[s,o]=d.useState(0),r=Ci(Au),l=d.Children.toArray(e.children),[c,u]=d.useState(!1);return c?(0,i.jsx)(uv,{heading:t("r_capitulaif_76565"),children:e.summaryStep}):(0,i.jsx)(Gg.lV,{initialValues:e.initialValues,initialValuesEqual:gd.A,mutators:{...Bg.A,forceErrors:nh},render:t=>(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Gg.Pc,{subscription:{dirtyFields:!0},children:({dirtyFields:e})=>Object.keys(e).map((e,t)=>(0,i.jsx)(Gg.D0,{name:e,render:()=>null,subscription:{}},t))}),l.map((r,l)=>{const c=s>=l||e.isEdit&&t.valid;if("string"==typeof r||"number"==typeof r||"boolean"==typeof r||!("props"in r))throw new Error("Invalid step passed to wizard");return(0,i.jsxs)(Vg.Provider,{value:{formRenderProps:t,showErrors:n,setShowErrors:a},children:[(0,i.jsx)(uv,{canSelect:c,footerActions:r.props.actions?.(t),headerStyle:cv.Dark,heading:r.props.heading,isCompleted:s>l,isOpen:s===l,stepNumber:l+1,onSelect:()=>{c&&(a(!1),o(l))},children:d.cloneElement(r,{formRenderProps:t})}),(0,i.jsx)(Wg,{height:"6"})]},l)})]}),validate:e=>r.validateForForm(l[s].props.schema)(e),onSubmit:async(t,n)=>{if(s===l.length-1){const i=await e.onSubmit(t,n);return i?(a(!0),e.containerRef&&e.containerRef.current&&(e.containerRef.current.scrollIntoView(),e.containerRef.current.scrollTop=0),i):void u(!0)}return a(!1),void o(s+1)}})},hv=e=>(0,ya.createPortal)((0,i.jsx)(Ni,{css:{background:"white",left:"0",position:"absolute",top:"0",zIndex:"50",...e.css},height:1,width:1,children:e.children}),document.body),pv=e=>(0,i.jsx)(Gg.D0,{name:e.name,render:t=>{const n=t.input.checked?"checked":"unchecked";return(0,i.jsx)(uf,{disabled:e.disabled,size:e.size,state:n,subtext:e.subtext,onClick:()=>{t.input.onChange(e.value)},children:e.children})},type:"radio",value:e.value}),fv=({children:e,handleSubmit:t,nextText:n,prefix:a,strategies:s})=>{const o=Ei();return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Ni,{font:"gray900 textSm medium",children:o("que_souhaitez_v_87607")}),s.map(({label:e,value:t})=>(0,i.jsxs)(d.Fragment,{children:[(0,i.jsx)(Wg,{height:"3"}),(0,i.jsx)(pv,{name:`${a}strategy`,value:t,children:e})]},t)),e&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Wg,{height:"6"}),e]}),(0,i.jsx)(Wg,{height:"7"}),(0,i.jsx)($,{children:(0,i.jsx)(pa,{onClick:t,children:n})})]})},Iv=e=>{const t=Ei();return(0,i.jsx)(fv,{handleSubmit:e.handleSubmit,nextText:t("suivant_accr_25709"),prefix:"massAccredit.",strategies:[{label:t("ajouter_des_acc_17744"),value:Je.Add},{label:t("remplacer_les_a_92733"),value:Je.Replace},{label:t("supprimer_des_a_04246"),value:Je.Delete}]})};function _v(e,t=500){const[n,i]=(0,d.useState)(e),[a,s]=(0,d.useState)(e),o=rS(e=>{s(e)},t);return[n,a,e=>{i(e),o(e)}]}const xv=e=>{const{translate:t}=$g(),n=Ci(Hl),a=(0,d.useMemo)(()=>Wp(e.accreditation),[e.accreditation]),s=(0,d.useMemo)(()=>e.das?.assignedResources??e.slot.assignedResources,[e.das,e.slot]),o=(0,d.useMemo)(()=>e.das?.maxResources??e.slot.maxResources,[e.das,e.slot]),r=e.accreditationsSlotsIds.includes(e.slot.id)?"checked":"unchecked";return(0,i.jsxs)($,{align:"center",css:{background:"white",bd:!0,cursor:"pointer",px:"$4",userSelect:"none"},gap:"2",height:64,onClick:()=>{e.onClick(e.slot.id,"unchecked"===r)},children:[(0,i.jsx)(Lf,{shouldPreventDefault:!1,state:r,onClick:Ih.A}),(0,i.jsx)(rf,{color:e.accreditation.color,icon:e.accreditation.icon}),(0,i.jsx)(Ni,{css:{flex:"1"},font:"gray800 textSm semiBold",children:a}),(0,i.jsx)($,{css:{px:"$3"},width:310,children:(0,i.jsx)(xf,{color:s>=(o||1/0)?"success":"warning",leftIcon:"user-group",children:t("_1_2_membres_04485",s,n.toNumberOrInfinity(o))})})]})},yv=e=>{const t=Ei(),n=Ci(pd),a=Ci(Hl),s=(0,d.useMemo)(()=>e.das?.assignedResources??e.slot.assignedResources,[e.das,e.slot]),o=(0,d.useMemo)(()=>e.das?.maxResources??e.slot.maxResources,[e.das,e.slot]),r=e.accreditationsSlotsIds.includes(e.slot.id)?"checked":"unchecked";return(0,i.jsxs)(mx,{css:{cursor:"pointer"},onClick:()=>{e.onClick(e.slot.id,"unchecked"===r)},children:[(0,i.jsx)(rx,{justify:"center",width:48,children:e.shouldDisplayList?(0,i.jsx)(Lf,{shouldPreventDefault:!1,state:r,onClick:Ih.A}):(0,i.jsx)(cf,{shouldPreventDefault:!1,state:r,onClick:Ih.A})}),(0,i.jsx)(rx,{children:h(e.slot.name)?e.slot.name:"-"}),(0,i.jsx)(rx,{children:e.slot.date?.isValid?n.toLocaleString(e.slot.date,Za.DateOnly.WeekdayLongMonthLong):"-"}),(0,i.jsx)(rx,{children:(0,i.jsx)(xf,{color:s>=(o||1/0)?"success":"warning",leftIcon:"user-group",children:t("_1_2_membres_04485",s,a.toNumberOrInfinity(o))})})]})},Sv=e=>{const t=Ei(),n=(0,d.useMemo)(()=>(0,ho.A)(e.slots.filter(t=>t.accreditation.id===e.accreditation.id),e=>(0,po.A)([e.date?.toMillis(),e.name.toLowerCase()])),[e.slots,e.accreditation]),a=(0,d.useMemo)(()=>n.map(e=>e.id),[n]),s=(0,d.useMemo)(()=>Object.fromEntries(e.delegationAccreditationsSlots.map(e=>[e.accreditationSlotId,e])),[e.delegationAccreditationsSlots]),o=(0,d.useMemo)(()=>{const t=(0,hd.A)(e.accreditationsSlotsIds,a);return t.length===a.length?"checked":0===t.length?"unchecked":"indeterminate"},[a,e.accreditationsSlotsIds]),r=(0,d.useCallback)((t,n)=>{if(e.accreditation.accreditationDisplay===W.Radio){const i=(0,tu.A)(e.accreditationsSlotsIds,a).concat(n?[t]:[]);e.change("massAccredit.accreditationsSlotsIds",i)}else e.change("massAccredit.accreditationsSlotsIds",B(e.accreditationsSlotsIds,t,n))},[e.accreditation,e.accreditationsSlotsIds,e.change,a]),l=(0,d.useCallback)(t=>{e.change("massAccredit.accreditationsSlotsIds",t)},[e.change]),c=e.accreditation.accreditationDisplay===W.List||e.strategy===Je.Delete;return e.accreditation.hasSlots?(0,i.jsx)(df,{accreditation:e.accreditation,displayNumberOfSlots:!0,displaySlots:!0,numberOfSlots:n.length,children:e.accreditation.accreditationDisplay===W.Calendar?(0,i.jsx)($,{css:{background:"$gray50",padding:"$4"},children:(0,i.jsx)(i_,{accreditationsSlotsIds:e.accreditationsSlotsIds,slots:n,onChange:l})}):(0,i.jsxs)(gx,{hideBorder:!0,children:[(0,i.jsxs)(lx,{children:[(0,i.jsx)(dx,{justify:"center",width:48,children:c&&(0,i.jsx)(Lf,{state:o,onClick:t=>{"checked"===t?e.change("massAccredit.accreditationsSlotsIds",(0,Na.A)(e.accreditationsSlotsIds.concat(a))):e.change("massAccredit.accreditationsSlotsIds",(0,tu.A)(e.accreditationsSlotsIds,a))}})}),(0,i.jsx)(dx,{children:t("nom_du_cr_neau_54351")}),(0,i.jsx)(dx,{children:t("date_du_cr_neau_82295")}),(0,i.jsx)(dx,{})]}),n.map(t=>(0,i.jsx)(yv,{accreditationsSlotsIds:e.accreditationsSlotsIds,das:s[t.id]??null,shouldDisplayList:c,slot:t,onClick:r},t.id))]})}):(0,i.jsx)(xv,{accreditation:e.accreditation,accreditationsSlotsIds:e.accreditationsSlotsIds,das:s[n[0].id]??null,slot:n[0],onClick:r})},jv=e=>{const t=(0,d.useMemo)(()=>Zp(e.accreditations.filter(t=>t.accreditationCategoryId===e.category.id)),[e.accreditations,e.category]);return(0,i.jsx)(Mf,{category:e.category.name,children:t.map(t=>(0,i.jsx)(Sv,{accreditation:t,accreditationsSlotsIds:e.accreditationsSlotsIds,change:e.change,delegationAccreditationsSlots:e.delegationAccreditationsSlots,slots:e.slots,strategy:e.strategy},t.id))})},bv=e=>{const t=Ei();return(0,i.jsxs)(Ep,{doNotCloseOnOtherOpen:!0,isOpen:e.isOpen,onStateChange:e.onStateChange,children:[(0,i.jsx)(Lp,{children:(0,i.jsx)(Ni,{children:(0,i.jsxs)(pa,{color:e.color,leftIcon:"bars-filter",children:[t("filtres_64574")," ",(e.numberOfAppliedFilters||0)>0?`(${e.numberOfAppliedFilters})`:""]})})}),(0,i.jsx)(Np,{placement:"bottom-end",width:385,children:(0,i.jsxs)($,{direction:"column",onChange:xa,children:[(0,i.jsxs)($,{css:{padding:"$2 $6 $4 $6"},direction:"column",gap:"4",children:[(0,i.jsx)(Ni,{font:"gray800 textMd medium",children:t("liste_des_filtr_75605")}),e.children]}),e.showButtons&&(0,i.jsxs)($,{align:"center",css:{borderTop:"1px solid $gray200",padding:"$4 $6 $2 $6"},gap:"4",justify:"end",children:[(0,i.jsx)(Ni,{css:{cursor:"pointer"},font:"gray700 textSm medium",onClick:e.reinit,children:t("r_initialiser_77538")}),(0,i.jsx)(pa,{size:"sm",onClick:e.apply,children:t("appliquer_05753")})]})]})})]})},vv=e=>{const t=Ei(),[n,a]=(0,d.useState)(!1),[s,o]=(0,d.useState)(e.excludeEmpty?"checked":"unchecked"),[r,l]=(0,d.useState)(e.excludeFull?"checked":"unchecked"),[c,u]=(0,d.useState)(e.excludePast?"checked":"unchecked"),m=(e.excludeEmpty?1:0)+(e.excludeFull?1:0)+(e.excludePast?1:0);return(0,i.jsxs)($,{css:{background:"$gray100",borderRadius:"$2",padding:"$4"},gap:"3",children:[(0,i.jsx)(Ni,{css:{flex:"1"},children:(0,i.jsx)(hh,{icon:"magnifying-glass",placeholder:t("rechercher_une_65646"),value:e.name,onChange:t=>{e.setName(t)}})}),(0,i.jsxs)(bv,{apply:()=>{e.setExcludeEmpty("checked"===s),e.setExcludeFull("checked"===r),e.setExcludePast("checked"===c),a(!1)},color:"white",isOpen:n,numberOfAppliedFilters:m,reinit:()=>{e.setExcludeEmpty(!1),o("unchecked"),e.setExcludeFull(!1),l("unchecked"),e.setExcludePast(!1),u("unchecked"),e.setName(""),a(!1)},showButtons:!0,onStateChange:a,children:[(0,i.jsx)(zf,{state:s,onClick:o,children:t("cacher_les_cr_n_76382")}),(0,i.jsx)(zf,{state:r,onClick:l,children:t("cacher_les_cr_n_31908")}),(0,i.jsx)(zf,{state:c,onClick:u,children:t("masquer_les_cr_05336")})]})]})},Av=e=>{const t=Ei(),[n,a,s]=_v(""),[o,r]=(0,d.useState)(!1),[l,c]=(0,d.useState)(!1),[u,g]=(0,d.useState)(!1),{data:p,loader:f}=Ri("query MassAccreditSlots(\n $eventId: EventId!\n $delegationId: DelegationId\n $accreditationName: String\n $excludeFull: Boolean\n $excludeEmpty: Boolean\n $excludePast: Boolean\n) {\n event(id: $eventId) {\n delegation: delegationMaybe(id: $delegationId) {\n accreditationsSlots {\n accreditationSlotId\n assignedResources\n maxResources\n }\n }\n\n accreditationsSlots(\n delegationId: $delegationId\n accreditationName: $accreditationName\n includeHidden: true\n excludeFull: $excludeFull\n excludeEmpty: $excludeEmpty\n excludePast: $excludePast\n ) {\n nodes {\n id\n accreditationId\n name\n assignedResources\n maxResources\n date\n isBlocked\n isFull\n\n accreditation {\n id\n accreditationCategoryId\n accreditationCategoryName\n name\n accreditationDisplay\n hasSlots\n color\n icon\n index\n }\n\n accreditationCategory {\n id\n name\n }\n }\n }\n }\n}\n",{eventId:e.eventId,delegationId:e.delegationId,accreditationName:h(a)?a:void 0,excludeEmpty:o,excludeFull:l,excludePast:u},[]);const I=(0,d.useMemo)(()=>(p.event?.accreditationsSlots.nodes??[]).filter(e=>!e.isBlocked),[p.event]),_=(0,d.useMemo)(()=>(0,ho.A)((0,yr.A)(I.map(e=>e.accreditationCategory),e=>e.id),e=>m(e.name)),[I]),x=(0,d.useMemo)(()=>(0,yr.A)(I.map(e=>e.accreditation),e=>e.id),[I]);return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(vv,{excludeEmpty:o,excludeFull:l,excludePast:u,name:n,setExcludeEmpty:r,setExcludeFull:c,setExcludePast:g,setName:s}),(0,i.jsx)(Wg,{height:"6"}),f||(0,i.jsx)(vf,{css:{border:"1px solid $gray100",borderRadius:"$1"},children:_.map(t=>(0,i.jsx)(jv,{accreditations:x,accreditationsSlotsIds:e.values.massAccredit.accreditationsSlotsIds,category:t,change:e.change,delegationAccreditationsSlots:p.event.delegation?.accreditationsSlots??[],slots:I,strategy:e.values.massAccredit.strategy},t.id))}),(0,i.jsx)(Wg,{height:"7"}),(0,i.jsx)($,{children:(0,i.jsx)(pa,{isLoading:e.submitting,onClick:e.handleSubmit,children:h(e.buttonText)?e.buttonText:t(e.values.massAccredit.strategy===Je.Add?"accr_diter_les_78545":e.values.massAccredit.strategy===Je.Replace?"r_accr_diter_le_34059":"d_saccr_diter_l_28590",e.numberOfSelected)})})]})},Cv=({eventId:e,numberOfSelected:t,onClose:n,onSuccess:a,selecteds:s})=>{const o=Ei(),r=Ci(Vd),{mutate:d}=bs();return(0,i.jsx)(hv,{children:(0,i.jsx)(rI,{category:o("Accreditation"),heading:o("accr_diter_les_48281"),onClose:n,children:(0,i.jsx)(dv,{children:(0,i.jsxs)(gv,{initialValues:{massAccredit:{selecteds:s,strategy:Je.Add,accreditationsSlotsIds:[]}},isEdit:!1,onSubmit:async t=>{const i=(await d({eventId:e,massAccredit:t.massAccredit})).numberOfMembers;a(o("_1_membres_ont_05068",i)),n()},children:[(0,i.jsx)(mv,{heading:o("initialisation_38640"),render:({handleSubmit:e})=>(0,i.jsx)(Iv,{handleSubmit:e}),schema:r.step1Schema()}),(0,i.jsx)(mv,{heading:o("accr_ditations_39450"),render:({form:n,handleSubmit:a,submitting:s,values:o})=>(0,i.jsx)(Av,{change:n.change,delegationId:null,eventId:e,handleSubmit:a,numberOfSelected:t,submitting:s,values:o}),schema:r.step2Schema()})]})})})})},Ev={PLURAL:"campaigns",SINGLE:"campaign"},Tv={CAMPAIGNS:Ev.PLURAL,CAMPAIGN:e=>Ar([Ev.SINGLE,e])},Rv={CAMPAIGNS:({organizationId:e,eventId:t})=>Ar([t?rc.EVENT({organizationId:e,eventId:t}):ic.COMMUNITY({organizationId:e}),Tv.CAMPAIGNS]),CAMPAIGNS_SEGMENT:({organizationId:e,segmentId:t})=>Ar([Rv.CAMPAIGNS({organizationId:e}),t]),CAMPAIGN:({organizationId:e,eventId:t,campaignId:n})=>Ar([t?rc.EVENT({organizationId:e,eventId:t}):ic.COMMUNITY({organizationId:e}),Tv.CAMPAIGN(n)]),CAMPAIGN_DASHBOARD:e=>Ar([Rv.CAMPAIGN(e),Rr.DASHBOARD]),CAMPAIGN_PREVIEW:({userInfoId:e,...t})=>Ar([Rv.CAMPAIGN(t),Rr.PREVIEW,e]),CREATE(e){const t=wr(Rv.CAMPAIGNS(e));return e.options?`${t}/${e.options}`:t},CREATE_TEMPLATE:e=>Ar([wr(Rv.CAMPAIGNS(e)),"template"]),UPDATE:e=>Pr(Rv.CAMPAIGN(e))},Mv=e=>{const{history:t,translate:n}=$g(),{mutate:a,isLoading:s}=function(e={}){return Mi("mutation UsersInfosMassCampaignSend(\n $organizationId: OrganizationId!\n $eventId: EventId\n $delegationId: DelegationId\n $campaignId: CampaignId!\n $selecteds: MassActionSelectedsInput!\n) {\n numberOfMembers: usersInfosMassCampaignSend(\n organizationId: $organizationId\n eventId: $eventId\n delegationId: $delegationId\n campaignId: $campaignId\n selecteds: $selecteds\n )\n}\n",e)}(),[o,r]=(0,d.useState)([]),l=F(o);return(0,i.jsxs)(ff,{size:"md",onClose:e.onClose,children:[(0,i.jsx)($,{justify:"center",children:(0,i.jsx)(mf,{color:"primary",icon:"people-group"})}),(0,i.jsx)(Wg,{height:"4"}),(0,i.jsx)(Ni,{font:"gray900 textLg medium",textAlign:"center",children:n("SendCampaign")}),(0,i.jsx)(Wg,{height:"7"}),(0,i.jsx)(FI,{isSearchVisible:!0,label:n("campagne_97871"),values:o,onChange:r,children:e.campaigns.map(e=>(0,i.jsx)("option",{value:e.id,children:e.name},e.id))}),e.canCreate&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Wg,{height:"2"}),(0,i.jsx)(pa,{color:"invisible",leftIcon:"plus",onClick:()=>{const n=function(e){try{return Buffer.from(e).toString("base64")}catch{try{return btoa(e)}catch{return""}}}(JSON.stringify({usersInfosIds:e.selecteds.ids}));t.push(Rv.CREATE({organizationId:e.organizationId,eventId:e.eventId||void 0,options:n}))},children:n("cr_er_une_nouve_86635")})]}),(0,i.jsx)(Wg,{height:"7"}),(0,i.jsxs)($,{gap:"3",justify:"end",children:[(0,i.jsx)(pa,{disabled:!l,isLoading:s,onClick:async()=>{if(F(o)){const t=e.campaigns.find(e=>e.id===o[0]),i=(await a({organizationId:e.organizationId,eventId:e.eventId,delegationId:e.delegationId,selecteds:e.selecteds,campaignId:o[0]})).numberOfMembers;e.onSuccess(n("la_campagne_1_62015",t.name,i)),e.onClose()}},children:n("envoyer_26609")}),(0,i.jsx)(pa,{color:"white",onClick:e.onClose,children:n("annuler_48254")})]})]})},Dv=e=>(0,i.jsx)($,{css:{alignSelf:"stretch",alignItems:"start",padding:"$6",overflowY:"auto",...e.css},direction:"column",gap:"6",children:e.children}),Ov=({handleSubmit:e,isLoading:t=!1,isSubmitDisabled:n=!1,setIsOpen:a,submitStyle:s,submitText:o,...r})=>{const{translate:d}=$g();return(0,i.jsxs)($,{as:"footer",css:{alignItems:"flex-end",alignSelf:"stretch",background:"$white",borderBlockStart:"1px solid $gray200",padding:"$6"},direction:"column",gap:"4",...r,children:[(0,i.jsxs)($,{align:"center",gap:"4",justify:"end",children:[(0,i.jsx)(pa,{color:"white",onClick:()=>a(!1),children:d("annuler_48254")}),(0,i.jsx)(pa,{color:s,disabled:n,isLoading:t,onClick:()=>e(),children:o??d("submit_21373")})]}),r.children]})},wv=({heading:e,leftIcon:t,leftIconColor:n,leftIconBorder:a,leftIconCss:s,setIsOpen:o,...r})=>{const{translate:d}=$g();return(0,i.jsxs)($,{as:"header",css:{alignItems:"flex-start",alignSelf:"stretch",background:"$white",borderBlockEnd:"1px solid $gray200"},direction:"column",gap:"4",...r,children:[(0,i.jsxs)($,{css:{alignItems:"center",alignSelf:"stretch",padding:"$6 $7 $5 $7"},gap:"4",children:[t&&(0,i.jsx)($,{align:"center",css:{padding:"$3",bd:!0,border:a,...s},justify:"center",children:(0,i.jsx)($,{align:"center",height:24,justify:"center",width:24,children:(0,i.jsx)(la,{className:"fa-xl",color:n,icon:t})})}),(0,i.jsx)($,{css:{alignItems:"flex-start",flex:1},direction:"column",justify:"center",children:e})]}),(0,i.jsx)($,{align:"center",css:{padding:"$2",height:"$space$9",width:"$space$9",position:"absolute",right:"$space$4",top:"$space$4"},justify:"center",children:(0,i.jsx)(pa,{"aria-label":d("close_dialog_50926"),color:"invisible",css:{color:"$gray500",width:"$space$6",height:"$space$6",padding:0},textAlign:"center",onClick:()=>o(!1),children:(0,i.jsx)("i",{className:"far fa-xmark"})})}),r.children]})},Pv=d.forwardRef(({shouldLightDismiss:e=!0,initialOpen:t=!1,isOpen:n,setIsOpen:a,onClose:s,children:o,...r},l)=>{const[c,u]=d.useState(t),m=d.useRef(null),g=n??c,h=a??u;return d.useEffect(()=>{const e=m.current;return g?function(e){e&&!e.open&&e.showModal()}(e):e?.close(),()=>{e?.close()}},[g]),d.useEffect(()=>{const t=m.current;function n(e){e.preventDefault(),e.stopPropagation(),r.onClose?.(),h(!1)}function i(e){const{target:t}=e;t instanceof Element&&"DIALOG"===t.nodeName&&n(e)}function a(e){"Escape"===e.code&&n(e)}return e&&t?.addEventListener("click",i),t?.addEventListener("keydown",a),()=>{e&&t?.removeEventListener("click",i),t?.removeEventListener("keydown",a)}},[e,h]),d.useImperativeHandle(l,()=>({close(){h(!1)},showModal(){h(!0)},isOpen:()=>g,addEventListener(e,t,n){m.current?.addEventListener(e,t,n)},removeEventListener(e,t,n){m.current?.removeEventListener(e,t,n)}}),[g,h]),(0,i.jsxs)(i.Fragment,{children:[false,(0,i.jsx)("dialog",{ref:m,"aria-describedby":r["aria-describedby"],"aria-label":r["aria-label"],"aria-labelledby":r["aria-labelledby"],style:r.style,onClose:s,...r["aria-description"]?{"aria-description":r["aria-description"]}:{},children:o})]})});Pv.displayName="Dialog";const $v=({children:e,descId:t,labelId:n,isOpen:a,size:s,setIsOpen:o,...r})=>(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("style",{dangerouslySetInnerHTML:{__html:"\n dialog::backdrop {\n background: rgba(52, 64, 84, 0.7)\n }\n "}}),(0,i.jsx)(Pv,{"aria-describedby":t,"aria-labelledby":n,"data-testid":"modal-body",isOpen:a,setIsOpen:o,style:{border:"none",borderRadius:"var(--radii-3)",padding:0,inlineSize:"70vw",blockSize:"fit-content",maxWidth:"688px"},onClose:r.onClose,children:(0,i.jsx)($,{align:"center",direction:"column",...r,children:e})})]}),kv=({eventId:e,selecteds:t,sort:n,isOpen:a,setIsOpen:s})=>{const{translate:o}=$g(),r=Ci(Xd),{data:l,isLoading:c}=Ri("query MassPrintGroupsAndDocuments($eventId: EventId!) {\n event(id: $eventId) {\n printerGroups {\n __typename\n\n ... on PrinterGroupList {\n nodes {\n id\n name\n }\n }\n\n ... on PrinterGroupError {\n message\n }\n }\n zplDocuments {\n nodes {\n id\n name\n }\n }\n }\n}\n",{eventId:e},[]),{mutate:u}=function(e={}){return Mi("mutation VolunteersRegistrationsMassPrint($eventId: EventId!, $input: MassPrintInput!) {\n count: volunteersRegistrationsMassPrint(eventId: $eventId, input: $input)\n}\n",e)}(),m=dh(),g=(0,d.useRef)(null),h=c?null:l.event.printerGroups,p="PrinterGroupError"===h?.__typename,f="PrinterGroupError"===h?.__typename?h.message:0===h?.nodes.length?o("no_printing_loc_73059"):void 0;return(0,i.jsx)(ah,{css:{dialog:{overflow:"visible"},footer:{borderBottomLeftRadius:"$3",borderBottomRightRadius:"$3"},header:{borderTopLeftRadius:"$3",borderTopRightRadius:"$3"}},customErrorRef:g,initialValues:{input:r.default({selecteds:t,sort:n})},render:({handleSubmit:e,submitting:t})=>(0,i.jsx)(Nv,{disabled:c||t||p,ids:m,isOpen:a,setIsOpen:s,onSubmit:()=>{c||t||p||e()},children:c?(0,i.jsxs)($,{direction:"column",gap:"6",width:"100%",children:[(0,i.jsx)(Th,{borderRadius:"$1",css:{marginTop:"$6"},height:40,width:1}),(0,i.jsx)(Th,{borderRadius:"$1",css:{marginTop:"$6"},height:40,width:1})]}):(0,i.jsxs)(Ni,{width:"100%",children:[(0,i.jsx)(Ni,{ref:g,children:(0,i.jsx)(Ks.Provider,{value:{designSystem:Zs},children:(0,i.jsx)(th,{})})}),(0,i.jsxs)($,{direction:"column",gap:"6",children:[f&&(0,i.jsxs)(Kg,{alertStyle:"warning",children:[(0,i.jsx)(Qg,{children:o("incomplete_prin_64421")}),(0,i.jsx)(Xg,{children:f})]}),(0,i.jsx)(UI,{label:o("wristband_to_pr_39675"),name:"input.zplDocumentId",children:l.event.zplDocuments.nodes.map(e=>(0,i.jsx)("option",{value:e.id,children:e.name},e.id))}),(0,i.jsx)(UI,{label:o("printing_locati_10729"),name:"input.groupId",state:p?"disabled":void 0,children:("PrinterGroupList"===h?.__typename?h.nodes:[]).map(e=>(0,i.jsx)("option",{value:e.id,children:e.name},e.id))})]})]})}),schema:r.schema(),onSubmit:async({input:t},n)=>{if(!n.getState().invalid)try{await u({eventId:e,input:t})}finally{s(!1)}}})},Nv=({children:e,disabled:t,ids:n,isOpen:a,onSubmit:s,setIsOpen:o})=>{const{translate:r}=$g();return(0,i.jsxs)($v,{descId:n.descId,isOpen:a,labelId:n.labelId,role:"dialog",setIsOpen:o,size:"md",onClose:()=>{o(!1)},children:[(0,i.jsx)(wv,{heading:(0,i.jsx)(Zg,{id:n.labelId,children:r("imprimer_un_bra_94539")}),id:n.labelId,leftIcon:"hand-back-fist",leftIconColor:"gray800",setIsOpen:o}),(0,i.jsx)(Dv,{css:{backgroundColor:"white"},id:n.descId,children:e}),(0,i.jsx)(Ov,{handleSubmit:s,isSubmitDisabled:t,setIsOpen:o,submitText:r("print_37582")})]})},Lv=e=>{const{translate:t}=$g(),n=Ci(Vd),{mutate:a}=Bs();return(0,i.jsx)(hv,{children:(0,i.jsx)(rI,{category:t("Accreditation"),heading:t("update_desired_accreditations"),onClose:e.onClose,children:(0,i.jsx)(dv,{css:{py:"$7"},children:(0,i.jsxs)(gv,{initialValues:{massAccredit:{selecteds:e.selecteds,strategy:Je.Add,accreditationsSlotsIds:[]}},isEdit:!1,onSubmit:async t=>{await a({organizationId:e.organizationId,eventId:e.eventId,delegationId:e.delegationId,massAccredit:t.massAccredit}),e.onSuccess(),e.onClose()},children:[(0,i.jsx)(mv,{heading:t("initialisation_38640"),render:({handleSubmit:e})=>(0,i.jsx)(Iv,{handleSubmit:e}),schema:n.step1Schema()}),(0,i.jsx)(mv,{heading:t("accr_ditations_39450"),render:({form:n,handleSubmit:a,values:s,submitting:o})=>(0,i.jsx)(Av,{buttonText:s.massAccredit.strategy===Je.Delete?t("supprimer_les_a_93519"):t("update_desired_accreditations"),change:n.change,delegationId:e.delegationId,eventId:e.eventId,handleSubmit:a,numberOfSelected:e.numberOfSelected,submitting:o,values:s}),schema:n.step2Schema()})]})})})})},zv=e=>{const t=Ei();return(0,i.jsx)(fv,{handleSubmit:e.handleSubmit,nextText:t("suivant_62774"),prefix:"massProfileUpdate.",strategies:[{label:t("remplacer_le_pr_39873"),value:Je.Replace},{label:t("supprimer_le_pr_54358"),value:Je.Delete}]})},Fv=e=>{const t=Ei(),{data:n,loader:a}=Ri("query MassWishedProfileUpdateProfiles($eventId: EventId!, $delegationId: DelegationId!) {\n event(id: $eventId) {\n delegation(id: $delegationId) {\n accreditationsProfiles {\n accreditationProfile {\n id\n name\n\n accreditationProfileCategory {\n id\n name\n }\n }\n }\n }\n }\n}\n",{eventId:e.eventId,delegationId:e.delegationId},[]);const{accreditationProfileId:s,strategy:o}=e.values.massProfileUpdate,r=o===Je.Delete,l=(0,d.useMemo)(()=>(n.event?.delegation.accreditationsProfiles??[]).map(e=>e.accreditationProfile),[n.event]),c=(0,d.useMemo)(()=>Object.values((0,Ql.A)(l,e=>e.accreditationProfileCategory.id)).map(e=>({...e[0].accreditationProfileCategory,accreditationsProfiles:e})),[l]),u=(0,d.useMemo)(()=>XS(c),[c]);return a||(0,i.jsxs)(i.Fragment,{children:[!r&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(FI,{isSearchVisible:!0,label:t("profil_d_accr_d_63000"),multiple:!1,placeholder:t("s_lectionner_un_45763"),values:(0,po.A)([s]),onChange:t=>{e.change("massProfileUpdate.accreditationProfileId",t[0]??null)},children:u}),(0,i.jsx)(Wg,{height:"7"})]}),(0,i.jsx)($,{children:(0,i.jsx)(pa,{isLoading:e.submitting,onClick:e.handleSubmit,children:t(r?"supprimer_le_pr_87965":"mettre_jour_l_05683",e.numberOfSelected)})})]})},Uv=e=>{const{translate:t}=$g(),n=Ci(el),{mutate:a}=Gs();return(0,i.jsx)(hv,{children:(0,i.jsx)(rI,{category:t("Accreditation"),heading:t("mettre_jour_l_03244"),onClose:e.onClose,children:(0,i.jsx)(dv,{css:{py:"$7"},children:(0,i.jsxs)(gv,{initialValues:{massProfileUpdate:{accreditationProfileId:null,selecteds:e.selecteds,strategy:Je.Replace}},isEdit:!1,onSubmit:async t=>{await a({organizationId:e.organizationId,eventId:e.eventId,delegationId:e.delegationId,massProfileUpdate:t.massProfileUpdate}),e.onSuccess(),e.onClose()},children:[(0,i.jsx)(mv,{heading:t("initialisation_38640"),render:({handleSubmit:e})=>(0,i.jsx)(zv,{handleSubmit:e}),schema:n.step1Schema()}),(0,i.jsx)(mv,{heading:t("profil_d_accr_d_02274"),render:({form:t,handleSubmit:n,submitting:a,values:s})=>(0,i.jsx)(Fv,{change:t.change,delegationId:e.delegationId,eventId:e.eventId,handleSubmit:n,numberOfSelected:e.numberOfSelected,submitting:a,values:s}),schema:n.step2Schema()})]})})})})},Bv=e=>{const{translate:t,params:{organizationId:n,eventId:a,delegationId:s}}=$g(),{mutate:o}=function(e={}){return Mi("mutation UsersInfosMassEdit(\n $organizationId: OrganizationId!\n $eventId: EventId\n $delegationId: DelegationId\n $massEdit: MassEditInput!\n) {\n numberOfEdited: usersInfosMassEdit(\n organizationId: $organizationId\n eventId: $eventId\n delegationId: $delegationId\n massEdit: $massEdit\n )\n}\n",e)}(),{mutate:r}=ks(),{mutate:l}=vs(),[c,u]=(0,d.useState)(!1),[m,g]=(0,d.useState)(!1),[h,p]=(0,d.useState)(!1),[f,I]=(0,d.useState)(!1),[_,x]=(0,d.useState)(!1),[y,S]=(0,d.useState)(!1),[j,b]=(0,d.useState)(!1),v=e.massActions.getSelectedsInput(e.predicates,e.scope),A=e.massActions.isAllSelected?e.totalCount:e.massActions.numberOfSelected,C=e.showAccreditationsValidate||F(e.campaigns)||e.showDelete;return(0,i.jsxs)(i.Fragment,{children:[e.canMemberEdit&&(0,i.jsx)(pa,{color:"invisible-gray",leftIcon:"pen",onClick:()=>u(!0),children:t("_diter_un_champ_64621")}),e.showWishedAccreditationsEdit&&(0,i.jsx)(pa,{color:"invisible-gray",leftIcon:"wand-magic-sparkles",onClick:()=>g(!0),children:t("_diter_les_accr_41957")}),e.showWishedProfileEdit&&(0,i.jsx)(pa,{color:"invisible-gray",leftIcon:"wand-magic-sparkles",onClick:()=>p(!0),children:t("_diter_le_profi_54032")}),e.showAccreditationsEdit&&(0,i.jsx)(pa,{color:"invisible-gray",leftIcon:"wand-magic-sparkles",onClick:()=>I(!0),children:t("_diter_les_accr_86042")}),C&&(0,i.jsxs)(Ep,{children:[(0,i.jsx)(Lp,{children:(0,i.jsx)(pa,{color:"invisible-gray",rightIcon:"chevron-down",children:t("plus_77692")})}),(0,i.jsxs)(Np,{placement:"bottom-end",children:[e.showAccreditationsValidate&&(0,i.jsx)($p,{icon:"check",onClick:async()=>{await r({eventId:a,delegationId:s,selecteds:v}),e.onMassEditSuccess()},children:t("valider_les_acc_80801")}),e.showPrint&&(0,i.jsx)($p,{icon:"hand-back-fist",onClick:()=>b(!0),children:t("imprimer_un_bra_94539")}),F(e.campaigns)&&(0,i.jsx)($p,{icon:"paper-plane",onClick:()=>x(!0),children:t("SendCampaign")}),e.showDelete&&(0,i.jsx)($p,{color:"red",icon:"user-xmark",onClick:()=>S(!0),children:t("retirer_de_la_d_64963")})]})]}),c&&(0,i.jsx)(ov,{customFields:e.customFields,mutate:e=>o({organizationId:n,eventId:a,delegationId:s,massEdit:e}),selecteds:v,onClose:()=>u(!1),onSuccess:e.onMassEditSuccess}),m&&(0,i.jsx)(Lv,{delegationId:s,eventId:a,numberOfSelected:A,organizationId:n,selecteds:v,onClose:()=>g(!1),onSuccess:e.onMassEditSuccess}),h&&(0,i.jsx)(Uv,{delegationId:s,eventId:a,numberOfSelected:A,organizationId:n,selecteds:v,onClose:()=>p(!1),onSuccess:e.onMassEditSuccess}),f&&(0,i.jsx)(Cv,{eventId:a,numberOfSelected:A,selecteds:v,onClose:()=>I(!1),onSuccess:e.onMassEditSuccess}),_&&(0,i.jsx)(Mv,{campaigns:e.campaigns,canCreate:!1,delegationId:s,eventId:a,organizationId:n,selecteds:v,onClose:()=>x(!1),onSuccess:e.onMassEditSuccess}),y&&(0,i.jsx)($b,{buttonText:t("supprimer_43083"),subtext:t("_tes_vous_sur_d_29974"),text:t("suppression_de_57689",A),onClose:()=>S(!1),onDelete:async()=>{await l({organizationId:n,eventId:a,delegationId:s,selecteds:v,deleteFromEvent:e.deleteFromEvent}),e.onMassEditSuccess()}}),j&&(0,i.jsx)(kv,{eventId:a,isOpen:j,selecteds:v,setIsOpen:b,sort:e.sort})]})},Gv=e=>{const{translate:t}=$g(),[n,a]=(0,d.useState)(e.selectedSlotsIds),[s,o]=(0,d.useState)(e.selectedProfilesIds),[r,l]=(0,d.useState)(e.rendering),[c,u]=(0,d.useState)(e.showAccreditations),[m,g]=(0,d.useState)(e.showProfiles),[h,p]=(0,d.useState)(e.showQuota);return(0,i.jsxs)($,{direction:"column",onChange:xa,children:[(0,i.jsxs)($,{css:{padding:"$2 $6 $4 $6"},direction:"column",gap:"4",children:[(0,i.jsx)(Tf,{value:c,onChange:u,children:t("afficher_les_ac_56952")}),c&&(0,i.jsx)(FI,{isSearchVisible:!0,isSelectAllVisible:!0,label:t("accr_ditations_39450"),multiple:!0,renderOnPortal:!0,values:n,onChange:a,children:e.accreditationsOptions}),e.accreditationsProfilesOptions&&(0,i.jsx)(Tf,{value:m,onChange:g,children:t("afficher_les_pr_62371")}),e.accreditationsProfilesOptions&&m&&(0,i.jsx)(FI,{isSearchVisible:!0,isSelectAllVisible:!0,label:t("profils_d_accr_27825"),multiple:!0,renderOnPortal:!0,values:s,onChange:o,children:e.accreditationsProfilesOptions}),(0,i.jsxs)(VI,{label:t("grouper_les_acc_40252"),value:r,onChange:l,children:[(0,i.jsx)("option",{value:$r.Category,children:t("cat_gorie_00291")}),(0,i.jsx)("option",{value:$r.Date,children:t("Date")})]}),!e.hideQuotaOption&&(0,i.jsx)(Tf,{value:h,onChange:p,children:t("afficher_les_qu_20761")})]}),(0,i.jsxs)($,{align:"center",css:{borderTop:"1px solid $gray200",padding:"$4 $6 $2 $6"},gap:"4",justify:"end",children:[(0,i.jsx)(Ni,{css:{cursor:"pointer"},font:"gray700 textSm medium",onClick:()=>{e.reset(),e.close()},children:t("r_initialiser_77538")}),(0,i.jsx)(pa,{size:"sm",onClick:()=>{e.setShowAccreditations(c),e.setSelectedSlotsIds(n),e.setShowProfiles(m),e.setSelectedProfilesIds(s),e.setRendering(r),e.hideQuotaOption||e.setShowQuota(h),e.close()},children:t("appliquer_05753")})]})]})};function Vv(e){return Zp((0,yr.A)(e,e=>e.accreditation.id).map(t=>({...t.accreditation,accreditationCategory:t.accreditationCategory,slots:mu(e.filter(e=>e.accreditation.id===t.accreditation.id))})))}const Wv=e=>{const{translate:t}=$g(),n=d.useRef(null),a=Ci(pd),s=Ci(Hl),o=(0,d.useMemo)(()=>(0,yr.A)((0,ho.A)(e.slots.flatMap(e=>e.date?.isValid?[e.date]:[]),e=>e.toMillis()),e=>e.toMillis()),[e.filteredAccreditations]),r=(0,d.useMemo)(()=>(0,Qp.A)((0,Ql.A)(e.slots,e=>e.date?.isValid?e.date.toMillis():"nodate"),e=>e.length),[e.slots]),l=(0,d.useMemo)(()=>Jx(a,e.allCategories),[a,e.allCategories]),c=(0,d.useMemo)(()=>{return F(e.allAccreditationsProfiles)?(t=e.allAccreditationsProfiles,(0,ho.A)((0,yr.A)(t.map(e=>e.accreditationProfileCategory),e=>e.id),e=>m(e.name)).map(e=>(0,i.jsx)("optgroup",{label:e.name,children:(0,ho.A)(t.filter(t=>t.accreditationProfileCategory.id===e.id),e=>m(e.name)).map(e=>(0,i.jsx)("option",{value:e.id,children:e.name},e.id))},e.id))):null;var t},[e.allAccreditationsProfiles]),[u,g]=(0,d.useState)(!1),p=(0,d.useCallback)(()=>{e.setShowAccreditations(!0),e.setSelectedSlotsIds([]),e.setShowProfiles(!0),e.setSelectedProfilesIds([]),e.setRendering($r.Category),e.hideQuotaOption||e.setShowQuota(!1)},[e.hideQuotaOption,e.setRendering,e.setSelectedProfilesIds,e.setSelectedSlotsIds,e.setShowAccreditations,e.setShowProfiles,e.setShowQuota]);return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)($,{ref:n,css:{background:"white",border:"1px solid $gray200"},children:[(0,i.jsxs)($,{css:{width:"calc(2 * $cellWidth)"},direction:"column",children:[(0,i.jsx)($,{align:"center",css:{borderBottom:"1px solid $gray200",borderRight:"1px solid $gray200",height:"$cellHeightSm",px:"$4"},gap:"3",width:1,children:!e.hideOptions&&(0,i.jsxs)(Ep,{doNotCloseOnOtherOpen:!0,isOpen:u,onStateChange:g,children:[(0,i.jsx)(Lp,{children:(0,i.jsx)(Ni,{children:(0,i.jsx)(pa,{color:"white",leftIcon:"bars-filter",size:"sm",children:t("filtres_64574")})})}),(0,i.jsx)(Np,{placement:"bottom-start",width:385,children:(0,i.jsx)(Gv,{accreditationsOptions:l,accreditationsProfilesOptions:c,close:()=>g(!1),hideQuotaOption:e.hideQuotaOption,rendering:e.rendering,reset:p,selectedProfilesIds:e.selectedProfilesIds,selectedSlotsIds:e.selectedSlotsIds,setRendering:e.setRendering,setSelectedProfilesIds:e.setSelectedProfilesIds,setSelectedSlotsIds:e.setSelectedSlotsIds,setShowAccreditations:e.setShowAccreditations,setShowProfiles:e.setShowProfiles,setShowQuota:e.setShowQuota,showAccreditations:e.showAccreditations,showProfiles:e.showProfiles,showQuota:e.showQuota})})]})}),(0,i.jsx)($,{css:{borderRight:"1px solid $gray200",height:"$cellHeightSm"},width:1,onClick:()=>{n.current?.requestFullscreen()}}),e.showQuota&&(0,i.jsx)($,{css:{borderRight:"1px solid $gray200",height:"32px"},width:1}),e.data.map(t=>e.renderLeftColumn(t))]}),(0,i.jsx)($,{css:{flex:"1",overflowX:"auto"},children:(0,i.jsxs)($,{direction:"column",children:[(0,i.jsxs)($,{css:{borderBottom:"1px solid $gray200",height:"$cellHeightSm"},children:[F(e.accreditationsProfiles)&&(0,i.jsx)($,{css:{background:"$gray700",borderRight:"1px solid $gray200",color:"white",fontSize:"$textSm",fontWeight:"$medium",px:"$4",textAlign:"center",textTransform:"uppercase",width:`calc(${e.accreditationsProfiles.length} * ${e.cellWidth}px)`},direction:"column",height:1,justify:"center",children:t("profils_09110")}),e.rendering===$r.Category&&e.filteredAccreditations.map(t=>{const n=h(t.acronym)?t.acronym:t.name;return(0,i.jsxs)($,{align:"center",css:{borderRight:"1px solid $gray200",px:"$4",width:`calc(${t.numberOfSlots} * ${e.cellWidth}px)`},direction:"column",height:1,justify:"center",children:[(0,i.jsx)(Ni,{css:{ellipsis:!0},font:"gray800 textSm medium",textAlign:"center",title:n,width:1,children:n}),(0,i.jsx)(Ni,{color:"gray500",css:{ellipsis:!0},textAlign:"center",title:t.accreditationCategory.name,width:1,children:t.accreditationCategory.name})]},t.id)}),e.rendering===$r.Date&&o.map(t=>{const n=t.toMillis(),s=r[n],o=a.toLocaleString(t,Za.DateOnly.MonthLong);return(0,i.jsx)($,{align:"center",css:{borderRight:"1px solid $gray200",px:"$4",width:`calc(${s} * ${e.cellWidth}px)`},direction:"column",height:1,justify:"center",children:(0,i.jsx)(Ni,{css:{ellipsis:!0},font:"gray800 textSm medium",textAlign:"center",title:o,width:1,children:o})},n)}),e.rendering===$r.Date&&(r.nodate??0)>0&&(0,i.jsx)($,{align:"center",css:{borderRight:"1px solid $gray200",px:"$4",width:`calc(${r.nodate} * ${e.cellWidth}px)`},direction:"column",height:1,justify:"center",children:(0,i.jsx)(Ni,{css:{ellipsis:!0},font:"gray800 textSm medium",textAlign:"center",width:1,children:"-"})})]}),(0,i.jsxs)($,{css:{height:"$cellHeightSm"},children:[e.accreditationsProfiles.map(t=>(0,i.jsxs)($,{align:"center",css:{borderRight:"1px solid $gray200",px:"$4",width:`${e.cellWidth}px`},direction:"column",height:1,justify:"center",children:[(0,i.jsx)(Ni,{css:{ellipsis:!0},font:"gray800 textSm medium",textAlign:"center",title:t.name,width:1,children:t.name}),(0,i.jsx)(Ni,{color:"gray500",css:{ellipsis:!0},textAlign:"center",title:t.accreditationProfileCategory.name,width:1,children:t.accreditationProfileCategory.name})]},t.id)),e.slots.map(t=>{const n=e.rendering===$r.Category?t.name||"-":h(t.accreditation.acronym)?t.accreditation.acronym:t.accreditation.name,s=t.date?.isValid?a.toLocaleString(t.date,Za.DateOnly.Numeric):"-";return(0,i.jsxs)($,{align:"center",css:{borderRight:"1px solid $gray200",px:"$4",width:`${e.cellWidth}px`},direction:"column",height:1,justify:"center",children:[(0,i.jsx)(Ni,{css:{ellipsis:!0},font:"gray800 textSm medium",textAlign:"center",title:n,width:1,children:n}),e.rendering===$r.Category&&(0,i.jsx)(Ni,{color:"gray500",css:{ellipsis:!0},textAlign:"center",title:s,width:1,children:s}),e.rendering===$r.Date&&(0,i.jsx)(Ni,{color:"gray500",css:{ellipsis:!0},textAlign:"center",title:t.accreditationCategory.name,width:1,children:t.accreditationCategory.name})]},t.id)})]}),e.showQuota&&(0,i.jsxs)($,{height:32,children:[e.accreditationsProfiles.map(n=>{const a=n.maxResources??Number.POSITIVE_INFINITY,o=n.assignedResources/a;return(0,i.jsx)($,{align:"center",css:{borderRight:"1px solid $gray200",width:`${e.cellWidth}px`},height:1,justify:"center",children:(0,i.jsx)(xf,{color:sf(o,{higherIsBetter:!1}),size:"sm",children:t("_1_2_membres_04485",n.assignedResources,s.toNumberOrInfinity(a))})},n.id)}),e.slots.map(n=>{const a=n.maxResources??Number.POSITIVE_INFINITY,o=n.assignedResources/a;return(0,i.jsx)($,{align:"center",css:{borderRight:"1px solid $gray200",width:`${e.cellWidth}px`},height:1,justify:"center",children:(0,i.jsx)(xf,{color:sf(o,{higherIsBetter:!1}),size:"sm",children:t("_1_2_membres_04485",n.assignedResources,s.toNumberOrInfinity(a))})},n.id)})]}),e.data.map(t=>e.renderRow(t))]})})]}),(0,i.jsx)(yS,{children:(0,i.jsx)(xS,{limit:e.limit,numberOfPages:e.numberOfPages,offset:e.offset,setLimit:e.setLimit,setOffset:e.setOffset,showLimits:!0,totalCount:e.totalCount})})]})},qv=e=>{const{translate:t}=$g(),n=(0,d.useMemo)(()=>(e.vr.matrixAuis||[]).flatMap(e=>e.isAutoAccredit?[e.accreditationSlotId]:[]),[e.vr]),a=(0,d.useMemo)(()=>(e.vr.matrixAuis||[]).flatMap(e=>e.isAutoAccredit?[]:[e.accreditationSlotId]),[e.vr]),s=(0,d.useMemo)(()=>(e.vr.matrixWishedSlots||[]).map(e=>e.id),[e.vr]),o=(0,d.useMemo)(()=>(e.vr.matrixAuis||[]).flatMap(e=>e.checkInAt?.isValid?[e.accreditationSlotId]:[]),[e.vr]),r=(0,d.useMemo)(()=>(e.vr.matrixAuis||[]).flatMap(e=>e.accreditationProfileId?[e.accreditationSlotId]:[]),[e.vr]);return(0,i.jsxs)($,{css:{borderTop:"1px solid $gray200",height:"$cellHeightSm"},children:[e.accreditationsProfiles.map(n=>{const a=e.vr.accreditationProfileId===n.id,s=e.vr.wishedAccreditationProfileId===n.id,o=e.isEditMode&&("assigned"===e.editMode&&a||"wished"===e.editMode&&s),r=e.isEditMode&&("assigned"===e.editMode&&!a||"wished"===e.editMode&&!s);return(0,i.jsxs)($,{align:"center",css:{borderRight:"1px solid $gray200",padding:"$3 $4",width:"$cellWidth","& > .h-accreditations-matrix-cell":{display:"flex"},"&:hover > .h-accreditations-matrix-cell":{display:"none"},"& > .h-accreditations-matrix-edit-cell":{display:"none"},"&:hover > .h-accreditations-matrix-edit-cell":{display:"flex"}},height:1,children:[o&&(0,i.jsx)($,{align:"center",className:"h-accreditations-matrix-edit-cell",css:{background:"$error200",bd:"error500 1",color:"$error700",cursor:"pointer"},height:1,justify:"center",width:1,onClick:async()=>{await e.deleteAccreditationProfile(e.vr.userInfo.id,n.id),e.reloadRow(e.vr.id)},children:(0,i.jsx)(la,{icon:"trash-can"})}),r&&(0,i.jsx)($,{align:"center",className:"h-accreditations-matrix-edit-cell",css:{background:"$primary100",bd:"primary500 1",color:"$primary500",cursor:"pointer"},height:1,justify:"center",width:1,onClick:async()=>{await e.addAccreditationProfile(e.vr.userInfo.id,n.id),e.reloadRow(e.vr.id)},children:(0,i.jsx)(la,{icon:"plus"})}),a?(0,i.jsx)($,{align:"center",className:r||o?"h-accreditations-matrix-cell":"",css:{background:"$success200",bd:"success500 1",color:"$success700",fontSize:"$textMd"},height:1,justify:"center",width:1,children:(0,i.jsx)(la,{icon:"check"})}):s?(0,i.jsx)($,{align:"center",className:e.isEditMode?"h-accreditations-matrix-cell":"",css:{background:"white",bd:"gray300 1",borderStyle:"dashed"},height:1,justify:"center",width:1,children:(0,i.jsx)(Ni,{font:"gray800 textXs medium",children:t("souhait_19593")})}):null]},n.id)}),e.slots.map(d=>{const l=n.includes(d.id),c=a.includes(d.id),u=s.includes(d.id),m=r.includes(d.id),g=e.isEditMode&&!d.isBlocked&&!m&&(e.canDeleteCheckedIn||!o.includes(d.id))&&("assigned"===e.editMode&&(l||c)||"wished"===e.editMode&&u),h=e.isEditMode&&!d.isBlocked&&("assigned"===e.editMode&&!l&&!c||"wished"===e.editMode&&!u);return(0,i.jsxs)($,{align:"center",css:{borderRight:"1px solid $gray200",padding:"$3 $4",width:"$cellWidth","& > .h-accreditations-matrix-cell":{display:"flex"},"&:hover > .h-accreditations-matrix-cell":{display:"none"},"& > .h-accreditations-matrix-edit-cell":{display:"none"},"&:hover > .h-accreditations-matrix-edit-cell":{display:"flex"}},height:1,children:[g&&(0,i.jsx)($,{align:"center",className:"h-accreditations-matrix-edit-cell",css:{background:"$error200",bd:"error500 1",color:"$error700",cursor:"pointer"},height:1,justify:"center",width:1,onClick:async()=>{await e.deleteAccreditationSlot(e.vr.userInfo.id,d.id),e.reloadRow(e.vr.id)},children:(0,i.jsx)(la,{icon:"trash-can"})}),h&&(0,i.jsx)($,{align:"center",className:"h-accreditations-matrix-edit-cell",css:{background:"$primary100",bd:"primary500 1",color:"$primary500",cursor:"pointer"},height:1,justify:"center",width:1,onClick:async()=>{await e.addAccreditationSlot(e.vr.userInfo.id,d.id),e.reloadRow(e.vr.id)},children:(0,i.jsx)(la,{icon:"plus"})}),l||c?(0,i.jsx)($,{align:"center",className:h||g?"h-accreditations-matrix-cell":"",css:{background:"$success200",bd:"success500 1",color:"$success700",fontSize:"$textMd"},height:1,justify:"center",width:1,children:(0,i.jsx)(la,{icon:m?"layer-group":l?"bolt-auto":"check"})}):u?(0,i.jsx)($,{align:"center",className:e.isEditMode?"h-accreditations-matrix-cell":"",css:{background:"white",bd:"gray300 1",borderStyle:"dashed"},height:1,justify:"center",width:1,children:(0,i.jsx)(Ni,{font:"gray800 textXs medium",children:t("souhait_e_52100")})}):null]},d.id)})]})},Yv=e=>{const{translate:t}=$g(),n=(0,d.useMemo)(()=>function(e){const t=Vv(e);return(0,ho.A)((0,yr.A)(e,e=>e.accreditationCategory.id).map(e=>({...e.accreditationCategory,accreditations:t.filter(t=>t.accreditationCategory.id===e.accreditationCategory.id)})),e=>m(e.name))}(e.allAccreditationsSlots),[e.allAccreditationsSlots]),a=(0,d.useMemo)(()=>Vv(e.allAccreditationsSlots),[e.allAccreditationsSlots]),s=(0,d.useMemo)(()=>e.showAccreditations?function(e,t){return e.flatMap(e=>{const n=e.slots.map(e=>e.id),i=U(t)?e.slots.length:(0,hd.A)(n,t).length;return 0===i?[]:[{...e,numberOfSlots:i}]})}(a,e.selectedSlotsIds):[],[a,e.selectedSlotsIds,e.showAccreditations]),o=(0,d.useMemo)(()=>function(e,t,n){const i=e.flatMap(e=>e.slots.filter(e=>U(t)||t.includes(e.id)));return n===$r.Category?i:(0,ho.A)(i,e=>e.date?.isValid?e.date.toMillis():Number.POSITIVE_INFINITY)}(s,e.selectedSlotsIds,e.rendering),[s,e.selectedSlotsIds,e.rendering]),r=(0,d.useMemo)(()=>(0,ho.A)(e.allAccreditationsProfiles.filter(t=>e.showProfiles&&(U(e.selectedProfilesIds)||e.selectedProfilesIds.includes(t.id))),e=>[m(e.accreditationProfileCategory.name),m(e.name)]),[e.allAccreditationsProfiles,e.selectedProfilesIds,e.showProfiles]),l=(0,d.useCallback)(t=>e.isRowLoading(t.id)?(0,i.jsx)(fS,{css:{border:"none",borderTop:"1px solid $gray200",height:"$cellHeightSm"}},t.userInfo.id):(0,i.jsx)(qv,{accreditationsProfiles:r,addAccreditationProfile:e.addAccreditationProfile,addAccreditationSlot:e.addAccreditationSlot,canDeleteCheckedIn:e.canDeleteCheckedIn,deleteAccreditationProfile:e.deleteAccreditationProfile,deleteAccreditationSlot:e.deleteAccreditationSlot,editMode:e.editMode,isEditMode:e.isEditMode,reloadRow:e.reloadRow,slots:o,vr:t},t.userInfo.id),[e.addAccreditationProfile,e.addAccreditationSlot,e.deleteAccreditationProfile,e.deleteAccreditationSlot,e.editMode,e.isEditMode,e.isRowLoading,e.reloadRow,r,o]);return(0,i.jsx)($,{direction:"column",width:1,children:e.isLoading?(0,i.jsx)(ua,{}):U(e.members)||U(s)&&U(r)?(0,i.jsx)($,{css:{background:"white",border:"1px solid $gray200"},height:400,children:U(e.members)?(0,i.jsx)(Af,{imageSrc:jh.Blanks.Member,title:t("aucun_membre_ne_07054")}):F(e.selectedSlotsIds)||F(e.selectedProfilesIds)||!e.showAccreditations||!e.showProfiles?(0,i.jsx)($,{align:"center",height:1,justify:"center",width:1,children:(0,i.jsx)(pa,{color:"white",leftIcon:"broom-wide",onClick:()=>{e.setShowAccreditations(!0),e.setSelectedSlotsIds([]),e.setShowProfiles(!0),e.setSelectedProfilesIds([])},children:t("remettre_les_fi_83263")})}):(0,i.jsx)(Af,{imageSrc:jh.Blanks.Accreditation,title:t("aucune_accr_dit_97505")})}):(0,i.jsx)(i.Fragment,{children:(0,i.jsx)(Wv,{accreditationsProfiles:r,allAccreditations:a,allAccreditationsProfiles:e.allAccreditationsProfiles,allCategories:n,cellWidth:120,data:e.members,filteredAccreditations:s,hideOptions:e.hideOptions,limit:e.limit,numberOfPages:e.numberOfPages,offset:e.offset,renderLeftColumn:t=>(0,i.jsx)($,{css:{borderRight:"1px solid $gray200",borderTop:"1px solid $gray200",height:"$cellHeightSm",px:"$4"},width:1,children:(0,i.jsx)(CS,{isClickDisabled:!!e.getInformationPanelPath,size:32,userInfo:t.userInfo})},t.userInfo.id),renderRow:l,rendering:e.rendering,selectedProfilesIds:e.selectedProfilesIds,selectedSlotsIds:e.selectedSlotsIds,setLimit:e.setLimit,setOffset:e.setOffset,setRendering:e.setRendering,setSelectedProfilesIds:e.setSelectedProfilesIds,setSelectedSlotsIds:e.setSelectedSlotsIds,setShowAccreditations:e.setShowAccreditations,setShowProfiles:e.setShowProfiles,setShowQuota:e.setShowQuota,showAccreditations:e.showAccreditations,showProfiles:e.showProfiles,showQuota:e.showQuota,slots:o,totalCount:e.totalCount})})})},Hv=e=>{const{params:{organizationId:t,eventId:n,delegationId:a}}=$g(),{data:s,idToLoading:o,isEditMode:r,isLoading:l,limit:c,numberOfPages:u,offset:m,reloadRow:g,setLimit:h,setOffset:p,totalCount:f}=Xx(),{mutate:I}=Bs(),{mutate:_}=Gs(),{data:x,isLoading:y,reload:S}=Ri("query DelegationMembersAccreditationsMatrix($eventId: EventId!, $delegationId: DelegationId!) {\n event(id: $eventId) {\n delegation(id: $delegationId) {\n accreditationsProfiles {\n assignedResources\n maxResources\n\n accreditationProfile {\n ...AccreditationProfileMatrix\n }\n }\n\n allAccreditationsSlots(onlyVisible: true) {\n assignedResources\n maxResources\n\n accreditationSlot {\n ...AccreditationSlotMatrix\n }\n }\n }\n }\n}\n",{eventId:n,delegationId:a},[La.AccreditationProfileMatrixFragment,La.AccreditationSlotMatrixFragment]),j=(0,d.useMemo)(()=>(x.event?.delegation.allAccreditationsSlots??[]).map(e=>({...e.accreditationSlot,assignedResources:e.assignedResources,maxResources:e.maxResources})),[x]),b=(0,d.useMemo)(()=>(x.event?.delegation.accreditationsProfiles??[]).map(e=>({...e.accreditationProfile,assignedResources:e.assignedResources,maxResources:e.maxResources})),[x]),v=(0,d.useCallback)(e=>o[e]??!1,[o]),A=(0,d.useCallback)(async(i,s)=>{await _({organizationId:t,eventId:n,delegationId:a,massProfileUpdate:{accreditationProfileId:s,selecteds:{ids:[i]},strategy:Je.Replace}}),e.matrixShowQuota&&S()},[S,a,n,_,t,e.matrixShowQuota]),C=(0,d.useCallback)(async(i,s)=>{await I({organizationId:t,eventId:n,delegationId:a,massAccredit:{accreditationsSlotsIds:[s],selecteds:{ids:[i]},strategy:Je.Add}}),e.matrixShowQuota&&S()},[S,a,n,I,t,e.matrixShowQuota]),E=(0,d.useCallback)(async(i,s)=>{await _({organizationId:t,eventId:n,delegationId:a,massProfileUpdate:{accreditationProfileId:s,selecteds:{ids:[i]},strategy:Je.Delete}}),e.matrixShowQuota&&S()},[S,a,n,_,t,e.matrixShowQuota]),T=(0,d.useCallback)(async(i,s)=>{await I({organizationId:t,eventId:n,delegationId:a,massAccredit:{accreditationsSlotsIds:[s],selecteds:{ids:[i]},strategy:Je.Delete}}),e.matrixShowQuota&&S()},[S,a,n,I,t,e.matrixShowQuota]);return(0,i.jsx)(Yv,{addAccreditationProfile:A,addAccreditationSlot:C,allAccreditationsProfiles:b,allAccreditationsSlots:j,canDeleteCheckedIn:!1,deleteAccreditationProfile:E,deleteAccreditationSlot:T,editMode:"wished",getInformationPanelPath:e.getInformationPanelPath,hideOptions:e.hideOptions,isEditMode:r,isLoading:l||y,isRowLoading:v,limit:c,members:s,numberOfPages:u,offset:m,reloadRow:g,rendering:e.matrixRendering,selectedProfilesIds:e.selectedProfilesIds,selectedSlotsIds:e.selectedSlotsIds,setLimit:h,setOffset:p,setRendering:e.setMatrixRendering,setSelectedProfilesIds:e.setSelectedProfilesIds,setSelectedSlotsIds:e.setSelectedSlotsIds,setShowAccreditations:e.setMatrixShowAccreditations,setShowProfiles:e.setMatrixShowProfiles,setShowQuota:e.setMatrixShowQuota,showAccreditations:e.matrixShowAccreditations,showProfiles:e.matrixShowProfiles,showQuota:e.matrixShowQuota,totalCount:f})},Zv=e=>{const{translate:t,params:{organizationId:n,eventId:a,delegationId:s}}=$g(),o=Ci(cm),r=wi(),[l,c,u]=gS(e.delegationsSpaceLayoutTab,e=>e.infos?.columns??[],n,"eventDelegationMembers.columns",e.columns),m=(0,d.useMemo)(()=>e.canEditColumns||e.delegationsSpaceLayoutTab?l:e.columns,[l,e.canEditColumns,e.columns,e.delegationsSpaceLayoutTab]),[g,h,p]=mS(n,"eventDelegationMembers.limit",25),[f,I,_]=mS(n,"eventDelegationMembers.predicates",[]),x=(0,d.useMemo)(()=>Cu(f),[f]),y=(0,d.useMemo)(()=>e.delegationsSpaceLayoutTab?.rendering===Fr.List&&F(e.delegationsSpaceLayoutTab?.infos?.accreditationsSlotsIds)?Cu([{slug:"accreditationSlotId",operator:ht.Is,value:e.delegationsSpaceLayoutTab.infos.accreditationsSlotsIds}]):x,[e.delegationsSpaceLayoutTab,x]),[S,j,b]=gS(e.delegationsSpaceLayoutTab,e=>e.rendering,n,"eventDelegationMembers.rendering",Fr.List),[v,A,C]=gS(e.delegationsSpaceLayoutTab,e=>e.infos?.matrixRendering||$r.Category,n,"eventDelegationMembers.matrixRendering",$r.Category),[E,T,R]=gS(e.delegationsSpaceLayoutTab,e=>e.infos?.accreditationsSlotsIds||[],n,"eventDelegationMembers.selectedSlotsIds",[]),[M,D,O]=gS(e.delegationsSpaceLayoutTab,e=>e.infos?.accreditationsProfilesIds||[],n,"eventDelegationMembers.selectedProfilesIds",[]),[w,P,$]=gS(e.delegationsSpaceLayoutTab,e=>e.infos?.matrixShowAccreditations??!0,n,"eventDelegationMembers.matrixShowAccreditations",!0),[k,N,z]=gS(e.delegationsSpaceLayoutTab,e=>e.infos?.matrixShowProfiles??!0,n,"eventDelegationMembers.matrixShowProfiles",!0),[B,G,V]=gS(e.delegationsSpaceLayoutTab,e=>e.infos?.matrixShowQuota??!1,n,"eventDelegationMembers.matrixShowQuota",!1),[W,q,Y]=mS(n,"eventDelegationMembers.sort",null),{data:H,isLoading:Z}=Ri("query EventDelegationMembersInfos(\n $organizationId: OrganizationId!\n $eventId: EventId!\n $delegationId: DelegationId!\n $privacy: CustomFieldPrivacy!\n) {\n organization(id: $organizationId) {\n weezeventOrganizationId\n\n customFields(eventId: $eventId, variety: UserInfo, privacy: $privacy) {\n nodes {\n ...SegmentCustomField\n }\n }\n }\n\n event(id: $eventId) {\n startAt\n endAt\n isWeezeventConnected\n\n customDocuments {\n ...CustomDocumentPopulation\n }\n\n delegation(id: $delegationId) {\n id\n numberOfDelegationsAccreditationsSlots\n numberOfDelegationsAccreditationsProfiles\n\n accreditationsSlots(onlyDefault: true, onlyHidden: true) {\n accreditationSlotId\n }\n\n columnsCustomFields {\n ...SegmentCustomField\n }\n\n form {\n id\n positionDisplay\n slotDisplay\n\n elements {\n customField {\n ...SegmentCustomField\n }\n }\n }\n }\n }\n}\n",{organizationId:n,eventId:a,delegationId:s,privacy:e.customFieldsPrivacy},[La.SegmentCustomFieldFragment,La.CustomDocumentPopulationFragment]);const K=u||p||_||b||C||R||O||$||z||V||Y||Z,Q=(0,d.useMemo)(()=>e.customFieldsPrivacy===ge.All?H.organization?.customFields.nodes??[]:(0,yr.A)((0,po.A)((H.event?.delegation.form.elements.map(e=>e.customField)||[]).concat(H.event?.delegation.columnsCustomFields||[])),e=>e.slug),[e.customFieldsPrivacy,H.organization,H.event]),X=hS(Q),J=(0,d.useMemo)(()=>H.event?o.getDelegationMembersFilters(n,a,Q,H.event,H.event.delegation.form,H.event.isWeezeventConnected):[],[a,Q,H.event]),ee=(0,d.useMemo)(()=>H.event?o.getDelegationMembersPossibleColumns(n,Q,{forDelegationsSpace:e.forDelegationsSpace,isWeezeventConnected:H.event.isWeezeventConnected,positionDisplay:H.event.delegation.form.positionDisplay,slotDisplay:H.event.delegation.form.slotDisplay}):[],[e.forDelegationsSpace,n,Q,H.event]),te=(0,d.useMemo)(()=>(H.event?.delegation.accreditationsSlots??[]).map(e=>e.accreditationSlotId),[H.event]),ne=(0,d.useMemo)(()=>"function"==typeof e.showEditMode?e.showEditMode(S):e.showEditMode,[e.showEditMode,S]),ie=(0,d.useMemo)(()=>U(e.delegationsSpaceLayoutTab?.infos?.accreditationsSlotsIds||[]),[e.delegationsSpaceLayoutTab]),ae=(0,d.useMemo)(()=>U(e.delegationsSpaceLayoutTab?.infos?.accreditationsSlotsIds||[]),[e.delegationsSpaceLayoutTab]),se=(0,d.useMemo)(()=>e.delegationsSpaceLayoutTab?void 0:[Fr.List,Fr.AccreditationsMatrix],[e.delegationsSpaceLayoutTab]),oe=3695!==n&&(H.event?.delegation.numberOfDelegationsAccreditationsSlots??0)>0,re=(H.event?.delegation.numberOfDelegationsAccreditationsProfiles??0)>0,de=window.location.origin===sa.HEAVENT_PUBLIC_URL.origin?t=>`${window.location.origin}${Yc.DELEGATION_MEMBER_INFORMATION({organizationId:n,eventId:a,delegationId:s,slug:e.delegationsSpaceLayoutTab?.slug,userInfoId:t.userInfo.id})}`:void 0;return(0,d.useEffect)(()=>{r.setItem(fh.DELEGATIONS_SPACE_TAB,"members")},[]),K?(0,i.jsx)(ua,{}):(0,i.jsx)(dS,{columns:m,columnsSearch:[],columnsToIncludes:lm,eventId:a,filters:J,getMassActionId:e=>e.userInfo.id,limit:g,loadDataList:Us,loadDataListParams:{delegationId:s,onlyVisibleAccreditationsSlots:e.onlyVisibleAccreditationsSlots,includeCanRegistrationStateUpdate:!1,includeIsEditable:!1},loadRow:Fs,loadRowParams:{delegationId:s,onlyVisibleAccreditationsSlots:e.onlyVisibleAccreditationsSlots,includeCanRegistrationStateUpdate:!1,includeIsEditable:!1},organizationId:n,possibleColumns:ee,possibleRenderings:se,predicates:y,renderActions:(t,n,a)=>(0,i.jsx)(Bv,{campaigns:e.campaigns,canMemberEdit:e.canMemberEdit,customFields:Q,deleteFromEvent:e.deleteFromEvent,massActions:t,predicates:y,scope:{delegationId:s},showAccreditationsEdit:e.showAccreditationsEdit,showAccreditationsValidate:e.showAccreditationsValidate,showDelete:e.canMemberDelete,showPrint:e.showPrint,showWishedAccreditationsEdit:oe,showWishedProfileEdit:re,sort:W,totalCount:n,onMassEditSuccess:a}),renderAllSelectedText:e=>t("les_1_membres_71180",e),renderPageSelectedText:e=>t("les_1_membres_00895",e),renderSelectAllText:e=>t("s_lectionner_le_45277",e),rendering:S,setColumns:c,setLimit:h,setPredicates:I,setRendering:j,setSort:q,showEditColumns:S===Fr.List&&e.canEditColumns,showEditMode:ne,showFilters:ie,showMassActions:e.canMemberEdit||e.canMemberAccredit,showPredicatesBadges:ae,showRowDropdown:!0,showRowEdit:e.canMemberEdit,showSearchColumns:!1,showSelectAll:!0,sort:W,children:S===Fr.AccreditationsMatrix?(0,i.jsx)(Hv,{getInformationPanelPath:de,hideOptions:!!e.delegationsSpaceLayoutTab,matrixRendering:v,matrixShowAccreditations:w,matrixShowProfiles:k,matrixShowQuota:B,selectedProfilesIds:M,selectedSlotsIds:E,setMatrixRendering:A,setMatrixShowAccreditations:P,setMatrixShowProfiles:N,setMatrixShowQuota:G,setSelectedProfilesIds:D,setSelectedSlotsIds:T}):(0,i.jsx)(bS,{getEditPath:e.getEditPath,renderCell:(t,o,r)=>(0,i.jsx)(Bj,{accreditationsPanelPath:Yc.DELEGATION_MEMBER_ACCREDITATIONS({organizationId:n,eventId:a,delegationId:s,slug:e.delegationsSpaceLayoutTab?.slug,userInfoId:o.userInfo.id}),availabilitiesPanelPath:Yc.DELEGATION_MEMBER_AVAILABILITIES({organizationId:n,eventId:a,delegationId:s,slug:e.delegationsSpaceLayoutTab?.slug,userInfoId:o.userInfo.id}),canChangeDelegation:!1,canMemberAccredit:e.canMemberAccredit,canMemberAssign:!1,column:t,customField:X.get(t.slug),eventId:a,informationPanelPath:de?.(o),positionsPanelPath:Yc.DELEGATION_MEMBER_POSITIONS({organizationId:n,eventId:a,delegationId:s,slug:e.delegationsSpaceLayoutTab?.slug,userInfoId:o.userInfo.id}),reloadRow:r,row:o}),renderRowDropdown:(t,n)=>(0,i.jsx)(Nb,{accreditationState:t.accreditationState,allowedCustomDocuments:e.customBadges,canDelete:e.canMemberDelete&&t.canDelete,canDuplicate:e.canDuplicateMembers,canMemberAccredit:e.canMemberAccredit,customDocuments:H.event?.customDocuments??L,deleteFromEvent:e.deleteFromEvent,member:t.userInfo,reload:n,showDeleteFromEvent:e.showDeleteFromEvent,showDocumentsDownload:e.showDocumentsDownload,volunteerRegistrationId:t.id}),renderRowPanels:(t,o)=>(0,i.jsx)(Db,{accreditationsPanelPath:Yc.DELEGATION_MEMBER_ACCREDITATIONS({organizationId:n,eventId:a,delegationId:s,slug:e.delegationsSpaceLayoutTab?.slug,userInfoId:t.userInfo.id}),availabilitiesPanelPath:Yc.DELEGATION_MEMBER_AVAILABILITIES({organizationId:n,eventId:a,delegationId:s,slug:e.delegationsSpaceLayoutTab?.slug,userInfoId:t.userInfo.id}),canCheckIn:!1,canDeleteCheckedIn:!1,canDeletePosition:()=>!1,canMemberAccredit:e.canMemberAccredit,canWishedAccreditationsEdit:!0,defaultHiddenAccreditationsSlotsIds:te,delegation:H.event.delegation,eventId:a,informationPanelPath:Yc.DELEGATION_MEMBER_INFORMATION({organizationId:n,eventId:a,delegationId:s,slug:e.delegationsSpaceLayoutTab?.slug,userInfoId:t.userInfo.id}),organizationId:n,positionsPanelPath:Yc.DELEGATION_MEMBER_POSITIONS({organizationId:n,eventId:a,delegationId:s,slug:e.delegationsSpaceLayoutTab?.slug,userInfoId:t.userInfo.id}),reloadRow:o,returnPathFallback:e.delegationsSpaceLayoutTab?Yc.DELEGATION_TAB({organizationId:n,eventId:a,slug:e.delegationsSpaceLayoutTab?.slug,delegationId:s}):Yc.DELEGATION_MEMBERS({organizationId:n,eventId:a,delegationId:s}),volunteerRegistration:t})})})},Kv=e=>{const{history:t,params:{organizationId:n}}=$g(),a=(0,d.useMemo)(()=>(e.user.events||[]).map(e=>({id:e.id,color:"gray",icon:null,text:e.name,onClick(){t.push(rc.EVENT({organizationId:n,eventId:e.id}))}})),[e.user]);return(0,i.jsx)(rx,{minWidth:e.column.minWidth,width:e.column.width,children:(0,i.jsx)(GS,{badges:a})})},Qv=e=>{const{translate:t,params:{organizationId:n}}=$g(),a=Ci(pd),{mutate:s}=function(e={}){return Mi("mutation UserInfoUpdateField(\n $organizationId: OrganizationId!\n $userInfoId: UsersInfoId!\n $slug: String!\n $value: JSON!\n) {\n userInfoUpdateField(\n organizationId: $organizationId\n userInfoId: $userInfoId\n slug: $slug\n value: $value\n ) {\n id\n }\n}\n",e)}(),o=(0,d.useCallback)((t,i)=>s({organizationId:n,userInfoId:e.row.id,slug:i,value:t}),[e.row,s]),r=(0,d.useMemo)(()=>(e.row.formsUsersInfos||[]).flatMap(e=>e.form?[{id:e.form.id,color:"gray",icon:null,text:e.form.name}]:[]),[e.row.formsUsersInfos]),l=(0,d.useMemo)(()=>(e.row.formsUsersInfos||[]).flatMap(e=>e.form?[`${e.form.name} : ${a.toLocaleString(e.insertedAt.toLocal(),Za.DateTime)}`]:[]).join(", "),[e.row.formsUsersInfos]),c=(0,d.useMemo)(()=>(e.row.delegations||[]).map(e=>({id:e.id,color:"gray",icon:null,text:e.name})),[e.row.delegations]),u=(0,d.useMemo)(()=>(0,yr.A)(e.row.delegations||[],e=>e.delegationCategory.id).map(e=>({id:e.delegationCategory.id,color:"gray",icon:null,text:e.delegationCategory.name})),[e.row.delegations]),m=(0,d.useMemo)(()=>(e.row.emails??[]).map(e=>{const{color:n,leftIcon:i}=cj(e.state);return{id:e.id,color:n,icon:i,text:`${e.campaign?.name??""} - ${t(e.state)}`}}),[e.row.emails]),g=(0,d.useMemo)(()=>(e.row.tags||[]).map(e=>({id:e.id,color:"gray",icon:null,text:e.name})),[e.row.tags]);return"name"===e.column.slug?(0,i.jsx)(KS,{clickPath:e.informationPanelPath,column:e.column,mutate:o,reload:e.reloadRow,updatable:e.updatable,userInfo:e.row}):"id"===e.column.slug?(0,i.jsx)(rx,{minWidth:e.column.minWidth,width:e.column.width,children:e.row.id}):"local_id"===e.column.slug?(0,i.jsx)(rx,{minWidth:e.column.minWidth,width:e.column.width,children:e.row.localId}):"duplicatedFrom"===e.column.slug?(0,i.jsx)(rx,{minWidth:e.column.minWidth,width:e.column.width,children:e.row.duplicatedFrom?(0,i.jsx)(CS,{size:32,userInfo:e.row.duplicatedFrom}):null}):"email"===e.column.slug?(0,i.jsx)(ZS,{clickPath:e.informationPanelPath??Pg.MEMBER_INFORMATION({organizationId:n,userInfoId:e.row.id}),column:e.column,reload:e.reloadRow,updatable:e.updatable,userInfo:e.row}):"events"===e.column.slug?(0,i.jsx)(Kv,{column:e.column,user:e.row}):"number_of_events"===e.column.slug?(0,i.jsx)(rx,{minWidth:e.column.minWidth,width:e.column.width,children:e.row.events?.length??0}):"forms"===e.column.slug?(0,i.jsx)(rx,{minWidth:e.column.minWidth,width:e.column.width,children:(0,i.jsx)(GS,{badges:r})}):"forms_inserted_at"===e.column.slug?(0,i.jsx)(rx,{minWidth:e.column.minWidth,width:e.column.width,children:(0,i.jsx)(Ni,{css:{ellipsis:!0},title:l,children:l})}):"delegations"===e.column.slug?(0,i.jsx)(rx,{minWidth:e.column.minWidth,width:e.column.width,children:(0,i.jsx)(GS,{badges:c})}):"delegations_categories"===e.column.slug?(0,i.jsx)(rx,{minWidth:e.column.minWidth,width:e.column.width,children:(0,i.jsx)(GS,{badges:u})}):"inserted_at"===e.column.slug?(0,i.jsx)(rx,{minWidth:e.column.minWidth,width:e.column.width,children:a.toLocaleString(e.row.insertedAt.toLocal(),Za.DateTime)}):"last_seen_at"===e.column.slug?(0,i.jsx)(rx,{minWidth:e.column.minWidth,width:e.column.width,children:e.row.lastSeenAt?.isValid?a.toLocaleString(e.row.lastSeenAt.toLocal(),Za.DateTime):""}):"campaigns_states"===e.column.slug?(0,i.jsx)(rx,{minWidth:e.column.minWidth,width:e.column.width,children:(0,i.jsx)(GS,{badges:m})}):"tags"===e.column.slug?(0,i.jsx)(rx,{minWidth:e.column.minWidth,width:e.column.width,children:(0,i.jsx)(GS,{badges:g})}):"comments"===e.column.slug?(0,i.jsx)(rx,{minWidth:e.column.minWidth,width:e.column.width,children:F(e.row.comments)?e.row.comments.map(e=>e.content).join("; "):""}):"roles"===e.column.slug?(0,i.jsx)(QS,{minWidth:e.column.minWidth,userPermissions:e.row,width:e.column.width}):(0,i.jsx)(HS,{avatarUser:e.row,clickPath:e.informationPanelPath??Pg.MEMBER_INFORMATION({organizationId:n,userInfoId:e.row.id}),column:e.column,customField:e.customField,fields:e.row.fields,mutate:o,reload:e.reloadRow,updatable:e.updatable})},Xv=e=>{const{params:{organizationId:t}}=$g();return(0,i.jsx)(lo.dO,{children:e.informationPanelPath&&e.delegation&&(0,i.jsx)(lo.qh,{path:e.informationPanelPath,children:(0,i.jsx)(sb,{organizationId:t,delegation:e.delegation,userInfoId:e.userInfo.id,returnPathFallback:e.informationPanelPath})})})},Jv=e=>{const{translate:t,params:{organizationId:n,delegationId:a}}=$g(),s=Ci(om),o=wi(),[r,l,c]=mS(n,"organizationDelegationMembers.columns",e.columns),[u,m,g]=mS(n,"organizationDelegationMembers.limit",25),[h,p,f]=mS(n,"organizationDelegationMembers.predicates",[]),I=(0,d.useMemo)(()=>Cu(h),[h]),[_,x,y]=mS(n,"organizationDelegationMembers.sort",null),{data:S,isLoading:j}=Ri("query OrganizationDelegationMembersInfos(\n $organizationId: OrganizationId!\n $delegationId: DelegationId!\n $privacy: CustomFieldPrivacy!\n) {\n organization(id: $organizationId) {\n customFields(variety: UserInfo, privacy: $privacy) {\n nodes {\n ...SegmentCustomField\n }\n }\n\n delegation(id: $delegationId) {\n id\n columnsCustomFields {\n ...SegmentCustomField\n }\n\n form {\n id\n elements {\n customField {\n ...SegmentCustomField\n }\n }\n }\n }\n }\n}\n",{organizationId:n,privacy:e.canCustomFieldRead?ge.All:ge.Public,delegationId:a},[La.SegmentCustomFieldFragment]);const b=c||g||f||y||j,v=(0,d.useMemo)(()=>e.canCustomFieldRead?S.organization?.customFields.nodes??[]:(0,po.A)((S.organization?.delegation.form.elements.map(e=>e.customField)||[]).concat(S.organization?.delegation.columnsCustomFields??[])),[S.organization]),A=hS(v),C=(0,d.useMemo)(()=>s.getDelegationMembersFilters(v),[v]),E=(0,d.useMemo)(()=>s.getDelegationMembersPossibleColumns(v),[v]);return(0,d.useEffect)(()=>{o.setItem(fh.DELEGATIONS_SPACE_TAB,"members")},[]),b?(0,i.jsx)(ua,{}):(0,i.jsx)(dS,{columns:e.canEditColumns?r:e.columns,columnsSearch:[],columnsToIncludes:sm,eventId:null,filters:C,limit:u,loadDataList:Ds,loadDataListParams:{delegationId:a},loadRow:Ms,organizationId:n,possibleColumns:E,predicates:I,renderActions:(t,n,s)=>(0,i.jsx)(Bv,{campaigns:e.campaigns,canMemberEdit:e.canMemberEdit,customFields:v,deleteFromEvent:!1,massActions:t,predicates:I,scope:{delegationId:a},showAccreditationsEdit:!1,showAccreditationsValidate:!1,showDelete:e.canMemberDelete,showPrint:!1,showWishedAccreditationsEdit:!1,showWishedProfileEdit:!1,sort:_,totalCount:n,onMassEditSuccess:s}),renderAllSelectedText:e=>t("les_1_membres_71180",e),renderPageSelectedText:e=>t("les_1_membres_00895",e),renderSelectAllText:e=>t("s_lectionner_le_45277",e),rendering:Fr.List,setColumns:l,setLimit:m,setPredicates:p,setSort:x,showEditColumns:e.canEditColumns,showEditMode:e.showEditMode,showFilters:!0,showMassActions:!0,showPredicatesBadges:!0,showRowDropdown:!0,showRowEdit:e.canMemberEdit,showSearchColumns:!1,showSelectAll:!0,sort:_,children:(0,i.jsx)(bS,{getEditPath:e.getEditPath,renderCell:(t,s,o)=>(0,i.jsx)(Qv,{column:t,customField:A.get(t.slug),informationPanelPath:a?`${window.location.origin}${Yc.DELEGATION_MEMBER_INFORMATION({organizationId:n,delegationId:a,userInfoId:s.id})}`:void 0,reloadRow:o,row:s,updatable:e.canMemberEdit}),renderRowDropdown:(t,n)=>(0,i.jsx)(Nb,{accreditationState:null,allowedCustomDocuments:e.customBadges,canDelete:e.canMemberDelete,canDuplicate:!1,canMemberAccredit:!1,customDocuments:L,deleteFromEvent:!1,member:t,reload:n,showDeleteFromEvent:!1,showDocumentsDownload:e.showDocumentsDownload,volunteerRegistrationId:null}),renderRowPanels:e=>(0,i.jsx)(Xv,{delegation:S.organization.delegation,informationPanelPath:Yc.DELEGATION_MEMBER_INFORMATION({organizationId:n,delegationId:a,userInfoId:e.id}),userInfo:e})})})},eA=e=>(0,i.jsx)($,{align:"end",css:{background:"gray"===e.background?"$gray50":"none",borderRight:"1px solid $gray200",overflow:"hidden",px:"$4"},direction:"column",height:1,justify:"center",width:1,children:e.children}),tA=(0,d.createContext)({});function nA(){return(0,d.useContext)(tA)}const iA=e=>{const{translate:t}=$g(),n=Ci(Hl),{accreditationIdToOpen:a,accreditationIdToValues:s,accreditationKeyToStats:o,accreditationValueKeyToStats:r,dates:l,hasNoDate:c,hasScanned:u,showTotal:m}=nA(),g=o[`a${e.accreditation.id}__no_date`],h=s[e.accreditation.id]||[],p=F(h),f=a[e.accreditation.id]??!0,{assignedTotal:I,scannedTotal:_}=(0,d.useMemo)(()=>{const t=(0,po.A)(l.map(t=>o[`a${e.accreditation.id}__${t.toSQLDate()}`]));return{assignedTotal:(0,Yo.A)(t,e=>e.assigned??0)+(c?g?.assigned??0:0),scannedTotal:(0,Yo.A)(t,e=>e.scanned??0)+(c?g?.scanned??0:0)}},[o,g,l,c,e.accreditation]);return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)($,{css:{borderTop:"1px solid $gray200",height:"$cellHeightSm"},children:[l.map(a=>{const s=`a${e.accreditation.id}__${a.toSQLDate()}`,r=o[s];return e.accreditation.hasDateSlots?(0,i.jsxs)(eA,{background:"none",children:[(0,i.jsxs)(Ni,{children:[r?.assigned??0,n.toNumberOrInfinity(r?.max,{prefix:"/"})]}),u&&(0,i.jsx)(Ni,{css:{ellipsis:!0},font:"gray500 textXs regular",textAlign:"end",width:1,children:r?.scanned?t("_1_scann_e_19753",r.scanned):"-"})]},a.toISO()):(0,i.jsx)(eA,{background:"none"},a.toISO())}),c&&(e.accreditation.hasDateSlots?(0,i.jsx)(eA,{background:"none"}):(0,i.jsxs)(eA,{background:"none",children:[(0,i.jsxs)(Ni,{children:[g?.assigned??0,n.toNumberOrInfinity(g?.max,{prefix:"/"})]}),u&&(0,i.jsx)(Ni,{css:{ellipsis:!0},font:"gray500 textXs regular",textAlign:"end",width:1,children:g?.scanned?t("_1_scann_e_19753",g.scanned):"-"})]})),m&&(0,i.jsxs)(eA,{background:"none",children:[(0,i.jsxs)(Ni,{children:[I,n.toNumberOrEmpty(e.accreditation.maxResources,{prefix:"/"})]}),u&&(0,i.jsx)(Ni,{css:{ellipsis:!0},font:"gray500 textXs regular",textAlign:"end",width:1,children:_>0?t("_1_scann_e_19753",_):"-"})]})]}),f&&p&&h.map(({id:n})=>{const a=r[`a${e.accreditation.id}__${n}__no_date`];return(0,i.jsxs)($,{css:{borderTop:"1px solid $gray200",height:"$cellHeightSm"},children:[l.map(a=>{const s=`a${e.accreditation.id}__${n}__${a.toSQLDate()}`,o=r[s];return e.accreditation.hasDateSlots?(0,i.jsxs)(eA,{background:"none",children:[(0,i.jsx)(Ni,{children:o?.assigned??0}),u&&(0,i.jsx)(Ni,{css:{ellipsis:!0},font:"gray500 textXs regular",textAlign:"end",width:1,children:o?.scanned?t("_1_scann_e_19753",o.scanned):"-"})]},a.toISO()):(0,i.jsx)(eA,{background:"none"},a.toISO())}),c&&(e.accreditation.hasDateSlots?(0,i.jsx)(eA,{background:"none"}):(0,i.jsxs)(eA,{background:"none",children:[(0,i.jsx)(Ni,{children:a?.assigned??0}),u&&(0,i.jsx)(Ni,{css:{ellipsis:!0},font:"gray500 textXs regular",textAlign:"end",width:1,children:a?.scanned?t("_1_scann_e_19753",a.scanned):"-"})]})),m&&(0,i.jsx)(eA,{background:"none"})]},n)})]})},aA=e=>{const{translate:t}=$g(),n=Ci(Hl),{categoryIdToAccreditations:a,categoryIdToOpen:s,categoryKeyToStats:o,dates:r,hasNoDate:l,hasScanned:c,showTotal:u}=nA(),m=(0,d.useMemo)(()=>a[e.category.id],[a,e.category.id]),g=s[e.category.id]??!0,h=o[`c${e.category.id}__no_date`],{assignedTotal:p,scannedTotal:f}=(0,d.useMemo)(()=>{const t=(0,po.A)(r.map(t=>o[`c${e.category.id}__${t.toSQLDate()}`]));return{assignedTotal:(0,Yo.A)(t,e=>e.assigned??0)+(l?h?.assigned??0:0),scannedTotal:(0,Yo.A)(t,e=>e.scanned??0)+(l?h?.scanned??0:0)}},[o,r,l,h,e.category]);return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)($,{css:{borderTop:"1px solid $gray200",height:"$cellHeightSm"},children:[r.map(n=>{const a=`c${e.category.id}__${n.toSQLDate()}`,s=o[a];return(0,i.jsxs)(eA,{background:"gray",children:[(0,i.jsx)(Ni,{children:s?.assigned??0}),c&&(0,i.jsx)(Ni,{css:{ellipsis:!0},font:"gray500 textXs regular",textAlign:"end",width:1,children:s?.scanned?t("_1_scann_e_19753",s.scanned):"-"})]},n.toISO())}),l&&(0,i.jsxs)(eA,{background:"gray",children:[(0,i.jsx)(Ni,{children:h?.assigned??0}),c&&(0,i.jsx)(Ni,{css:{ellipsis:!0},font:"gray500 textXs regular",textAlign:"end",width:1,children:h?.scanned?t("_1_scann_e_19753",h.scanned):"-"})]}),u&&(0,i.jsxs)(eA,{background:"gray",children:[(0,i.jsxs)(Ni,{children:[p,n.toNumberOrEmpty(e.category.maxResources,{prefix:"/"})]}),c&&(0,i.jsx)(Ni,{css:{ellipsis:!0},font:"gray500 textXs regular",textAlign:"end",width:1,children:f>0?t("_1_scann_e_19753",f):"-"})]})]}),g?m.map(e=>(0,i.jsx)(iA,{accreditation:e},e.id)):null]})},sA=e=>{const{translate:t}=$g(),{categories:n,categoryIdToAccreditations:a,customFields:s,links:o,setLinks:r}=nA(),[l,c]=(0,d.useState)(o),u=(0,d.useMemo)(()=>(0,ho.A)(s,e=>m(e.name)).filter(e=>!e.canSelectMultiple).map(e=>(0,i.jsx)("option",{value:e.slug,children:e.name},e.id)),[s]),g=(0,d.useCallback)((e,t)=>{c((0,nx.jM)(n=>{n[e].customFieldSlug=t}))},[c]),h=(0,d.useCallback)((e,t)=>{c((0,nx.jM)(n=>{n[e].accreditationsIds=t}))},[c]),p=l.every(e=>""!==e.customFieldSlug&&F(e.accreditationsIds));return(0,i.jsxs)(hy,{size:"md",onClose:e.onClose,children:[(0,i.jsx)(Gj,{children:t("ventiler_les_st_00770")}),(0,i.jsx)(py,{css:{padding:"$6"},children:(0,i.jsxs)($,{direction:"column",gap:"3",children:[l.map((e,s)=>(0,i.jsxs)($,{css:{bd:!0},direction:"column",children:[(0,i.jsxs)($,{align:"center",css:{borderBottom:"1px solid $gray200",padding:"$5 $6 $4 $6"},gap:"4",children:[(0,i.jsx)(Ni,{css:{flex:"1"},font:"gray800 textMd medium",children:t("liaison_n_1_48160",s+1)}),(0,i.jsx)(pa,{color:"white",leftIcon:"trash-can",size:"sm",onClick:()=>c(G(l,s))})]}),(0,i.jsxs)($,{css:{padding:"$4 $6 $6 $6"},direction:"column",gap:"4",children:[(0,i.jsx)(FI,{isSearchVisible:!0,label:t("CustomField"),values:[e.customFieldSlug],onChange:e=>{F(e)&&g(s,e[0])},children:u}),(0,i.jsx)(FI,{isSearchVisible:!0,label:t("accr_ditations_39450"),multiple:!0,values:e.accreditationsIds,onChange:e=>h(s,e),children:n.map(e=>{const t=a[e.id];return(0,i.jsx)("optgroup",{label:e.name,children:t.map(e=>(0,i.jsx)("option",{value:e.id,children:e.name},e.id))},e.id)})})]})]},s)),(0,i.jsx)(pa,{color:"invisible",leftIcon:"plus",onClick:()=>c([...l,{accreditationsIds:[],customFieldSlug:""}]),children:t("ajouter_une_lia_43639")})]})}),(0,i.jsx)(fy,{children:(0,i.jsxs)($,{gap:"3",justify:"end",width:1,children:[(0,i.jsx)(pa,{color:"white",onClick:e.onClose,children:t("annuler_48254")}),(0,i.jsx)(pa,{disabled:!p,onClick:()=>{r(l),e.onClose()},children:t("ventiler_10014")})]})})]})},oA=e=>{const{accreditationIdToOpen:t,accreditationIdToValues:n,setAccreditationIdToOpen:a}=nA(),s=n[e.accreditation.id]||[],o=F(s),r=t[e.accreditation.id]??!0;return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)($,{align:"center",css:{borderRight:"1px solid $gray200",borderTop:"1px solid $gray200",cursor:o?"pointer":"default",height:"$cellHeightSm",paddingLeft:"$6",paddingRight:"$4",userSelect:"none"},gap:"2",onClick:()=>{o&&a(t=>({...t,[e.accreditation.id]:!(t[e.accreditation.id]??1)}))},children:[(0,i.jsx)(Ni,{css:{visibility:o?"visible":"hidden"},children:(0,i.jsx)(la,{icon:r?"chevron-up":"chevron-right"})}),(0,i.jsx)(rf,{color:e.accreditation.color,icon:e.accreditation.icon,size:"sm"}),(0,i.jsx)($,{align:"center",css:{flex:"1",overflow:"hidden"},height:1,wrap:"wrap",children:(0,i.jsx)(Ni,{color:"gray800",title:e.accreditation.name,children:e.accreditation.name})})]}),r&&o&&s.map(({id:e,value:t})=>(0,i.jsx)($,{align:"center",css:{borderRight:"1px solid $gray200",borderTop:"1px solid $gray200",height:"$cellHeightSm",paddingLeft:"88px",paddingRight:"$4",userSelect:"none"},gap:"2",children:t},e))]})},rA=e=>{const{categoryIdToAccreditations:t,categoryIdToOpen:n,setCategoryIdToOpen:a}=nA(),s=(0,d.useMemo)(()=>t[e.category.id],[t,e.category.id]),o=n[e.category.id]??!0;return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)($,{align:"center",css:{background:"$gray50",borderRight:"1px solid $gray200",borderTop:"1px solid $gray200",cursor:"pointer",height:"$cellHeightSm",px:"$4",userSelect:"none"},gap:"2",onClick:()=>a(t=>({...t,[e.category.id]:!(t[e.category.id]??1)})),children:[(0,i.jsx)(Ni,{children:(0,i.jsx)(la,{icon:o?"chevron-up":"chevron-right"})}),(0,i.jsx)(Ni,{css:{textTransform:"uppercase"},font:"gray800 textXs medium",children:e.category.name})]}),o?s.map(e=>(0,i.jsx)(oA,{accreditation:e},e.id)):null]})},dA=()=>{const{translate:e}=$g(),{categories:t,links:n,hideOptions:a}=nA(),[s,o]=(0,d.useState)(!1);return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)($,{css:{width:"calc(2 * $cellWidth)"},direction:"column",children:[(0,i.jsx)($,{align:"center",css:{borderRight:"1px solid $gray200",height:"$cellHeightSm",px:"$4"},width:1,children:!a&&(0,i.jsx)(pa,{color:"white",size:"sm",onClick:()=>o(!0),children:`${e("ventiler_par_ch_78972")} (${n.length})`})}),t.map(e=>(0,i.jsx)(rA,{category:e},e.id))]}),s&&(0,i.jsx)(sA,{onClose:()=>o(!1)})]})},lA=e=>{const{translate:t}=$g(),n=Ci(pd),a=(0,d.useMemo)(()=>(0,ho.A)((0,yr.A)(e.slots.flatMap(e=>e.date?.isValid?[e.date.startOf("day")]:[]),e=>e.toMillis()),e=>e.toMillis()),[e.slots]),s=(0,d.useMemo)(()=>e.slots.some(e=>!e.date?.isValid),[e.slots]),o=(0,d.useMemo)(()=>e.slots.some(e=>(e.scannedResources??0)>0),[e.slots]),r=(0,d.useMemo)(()=>e.showTotal&&(F(a)||e.categories.some(e=>"number"==typeof e.maxResources)||e.accreditations.some(e=>"number"==typeof e.maxResources)),[a,e.accreditations,e.categories,e.showTotal]),l=(0,d.useMemo)(()=>(0,ho.A)(e.categories,e=>m(e.name)),[e.categories]),[c,u]=(0,d.useState)({}),[g,h]=(0,d.useState)({}),p=(0,d.useMemo)(()=>(0,Ql.A)(Zp(e.accreditations),e=>e.accreditationCategoryId),[e.accreditations]),f=(0,d.useMemo)(()=>Object.fromEntries(e.accreditations.map(t=>{const n=e.links.find(e=>e.accreditationsIds.includes(t.id));if(n){const i=(0,ho.A)(e.customFields.find(e=>e.slug===n.customFieldSlug)?.values??[],e=>m(e.value));return[t.id,i]}return[t.id,[]]})),[e.accreditations,e.customFields,e.links]),I=(0,d.useMemo)(()=>(0,Qp.A)((0,Ql.A)(e.slots,e=>{const t=e.date?.isValid?e.date.startOf("day").toSQLDate():"no_date";return`c${e.accreditationCategoryId}__${t}`}),e=>({assigned:(0,Yo.A)(e,e=>e.assignedResources),scanned:(0,Yo.A)(e,e=>e.scannedResources??0)})),[e.slots]),_=(0,d.useMemo)(()=>Object.fromEntries(e.slots.map(e=>{const t=e.date?.isValid?e.date.startOf("day").toSQLDate():"no_date";return[`a${e.accreditationId}__${t}`,{assigned:e.assignedResources,max:e.maxResources,scanned:e.scannedResources??0}]})),[e.slots]),x=(0,d.useMemo)(()=>Object.fromEntries(e.slots.flatMap(e=>Object.entries(e.resourcesByFields).flatMap(([t,n])=>{const i=e.date?.isValid?e.date.startOf("day").toSQLDate():"no_date";return n.map(({customFieldValueId:t,assignedResources:n,scannedResources:a})=>[`a${e.accreditationId}__${t}__${i}`,{assigned:n,scanned:a}])}))),[e.slots]);return(0,i.jsx)(tA.Provider,{value:{accreditationKeyToStats:_,accreditationValueKeyToStats:x,accreditationIdToOpen:g,accreditationIdToValues:f,categories:l,categoryIdToAccreditations:p,categoryIdToOpen:c,categoryKeyToStats:I,customFields:e.customFields,dates:a,hasNoDate:s,hasScanned:o,hideOptions:e.hideOptions,links:e.links,showTotal:r,setAccreditationIdToOpen:h,setCategoryIdToOpen:u,setLinks:e.setLinks},children:(0,i.jsxs)($,{css:{background:"white",border:"1px solid $gray200"},children:[(0,i.jsx)(dA,{}),(0,i.jsx)($,{css:{flex:"1",overflowX:"auto"},children:(0,i.jsxs)($,{direction:"column",children:[(0,i.jsxs)($,{css:{height:"$cellHeightSm"},children:[a.map(e=>(0,i.jsx)($,{align:"center",css:{borderRight:"1px solid $gray200",height:"$cellHeightSm",px:"$4"},justify:"center",width:120,children:(0,i.jsx)(Ni,{font:"gray800 textSm medium",children:n.toLocaleString(e,Za.DateOnly.MonthShort)})},e.toISO())),s&&(0,i.jsx)($,{align:"center",css:{borderRight:"1px solid $gray200",height:"$cellHeightSm",px:"$4"},justify:"center",width:120,children:(0,i.jsx)(Ni,{font:"gray800 textSm medium",textAlign:"center",children:t("tout_l_v_nemen_70929")})}),r&&(0,i.jsx)($,{align:"center",css:{borderRight:"1px solid $gray200",height:"$cellHeightSm",px:"$4"},justify:"center",width:120,children:(0,i.jsx)(Ni,{font:"gray800 textSm medium",children:t("total_07173")})})]}),l.map(e=>(0,i.jsx)(aA,{category:e},e.id))]})})]})})},cA=e=>{const t=yh(),n=(0,d.useMemo)(()=>e.min.startOf("week").equals(e.value.startOf("week")),[e.min,e.value]),a=(0,d.useMemo)(()=>e.max.endOf("week").equals(e.value.endOf("week")),[e.max,e.value]);return(0,i.jsxs)($,{gap:"2",children:[(0,i.jsx)(pa,{color:"white",disabled:n,leftIcon:"chevron-left",onClick:()=>{e.onChange(e.value.minus(t?{week:1}:{day:1}))}}),(0,i.jsx)(Ni,{width:160,children:(0,i.jsx)(Uf,{...e})}),(0,i.jsx)(pa,{color:"white",disabled:a,leftIcon:"chevron-right",onClick:()=>{e.onChange(e.value.plus(t?{week:1}:{day:1}))}})]})},uA=(0,d.createContext)({}),mA=e=>{const{days:t,interval:n}=(0,d.useContext)(uA),a=t[0],s=t[6]??t[0],o=(0,d.useMemo)(()=>(e.startAt??$a.c9.max(a,n.start)).startOf("day"),[e.startAt,a,n]),r=(0,d.useMemo)(()=>(e.endAt??$a.c9.min(s,n.end)).endOf("day"),[e.endAt,s,n]),l=(0,d.useMemo)(()=>"number"==typeof e.startHour&&e.startHour>0&&e.startAt?.isValid&&e.startAt.hour{const e=Math.max(o.diff(a,"days").days+1,1);return l?e-1:e},[l,o,a]),u=(0,d.useMemo)(()=>{const e=Math.min(Math.ceil(r.diff(a,"days").days)+1,8);return l?e-1:e},[l,r,a]);return o>s||r{const t=(0,d.useMemo)(()=>{if("week"===e.display){const t=e.date.startOf("week");return(0,Bl.A)(0,7).map(e=>t.plus({day:e}))}return[e.date]},[e.date]),n=(0,d.useMemo)(()=>$a.IX.fromDateTimes(e.minDate.startOf("day"),e.maxDate.endOf("day")),[e.minDate,e.maxDate]),[a,s]=(0,d.useState)(300),o=(0,d.useCallback)(e=>{if(e){const t=Math.max(Math.ceil(e.getBoundingClientRect().height),300);s(t)}},[e.date,s]),r=e.showBorder?{bd:!0,overflow:"hidden"}:{};return(0,i.jsx)(uA.Provider,{value:{days:t,interval:n},children:(0,i.jsxs)($,{css:{...r,...e.css},direction:"column",children:[(0,i.jsx)($,{css:{borderBottom:"1px solid $gray200"},height:60,width:1,children:t.map(e=>(0,i.jsxs)($,{align:"center",css:{background:"$gray50"},direction:"column",height:1,justify:"center",width:1,children:[(0,i.jsx)(Ni,{css:{textTransform:"capitalize"},font:"gray500 textXs medium",children:e.toLocaleString({weekday:"long"})}),(0,i.jsx)(Ni,{font:"gray800 textXl semiBold",children:e.day})]},e.toISO()))}),(0,i.jsxs)($,{className:"h-calendar-events-container",css:{position:"relative"},direction:"column",height:a,width:1,children:[(0,i.jsx)(Ah,{css:{flex:"1","& > div:last-child":{borderRight:"none"}},gridtemplatecolumns:"week"===e.display?"repeat(7, minmax(0, 1fr))":"1",gridtemplaterows:"1fr",width:1,children:t.map((e,t)=>(0,i.jsx)($,{css:{background:n.contains(e)?"white":"$primary50",borderRight:"1px solid $gray200",gridColumn:`${t+1} / ${t+2}`,gridRow:"1 / 2"}},e.toISO()))}),(0,i.jsx)(Ah,{ref:o,css:{gridAutoFlow:"column",rowGap:"$2",position:"absolute",top:"0",py:"$2"},gridtemplatecolumns:"week"===e.display?"repeat(7, minmax(0, 1fr))":"1",width:1,children:e.children})]})]})})},hA=e=>(0,i.jsxs)($,{align:"center",gap:"2",width:1,children:[(0,i.jsx)(Ni,{children:(0,i.jsx)(la,{icon:e.icon})}),(0,i.jsx)(Ni,{css:{flex:"1"},fontSize:"textXs",children:e.text}),(0,i.jsx)($,{align:"center",css:{background:e.background,borderRadius:"$1",fontSize:"$textXs",fontWeight:"$medium",padding:"2px 8px",minWidth:"30px"},justify:"center",children:e.count})]}),pA=n.p+"img/unavailableCell-148d1ec075614a0e294d.png",fA=j(Ni,{alignItems:"center",color:"$gray900",display:"flex",height:"40px",justifyContent:"center",variants:{border:{gray100:{borderBottom:"1px solid $gray100",borderRight:"1px solid $gray100"},gray200:{borderBottom:"1px solid $gray200",borderRight:"1px solid $gray200"}}},defaultVariants:{border:"gray100"}}),IA=(j(Ni,{alignItems:"center",borderBottom:"1px solid $gray100",borderRight:"1px solid $gray100",color:"$gray700",display:"flex",gap:"$2",height:"48px",px:"$4",width:"200px"}),j(Ni,{alignItems:"center",borderBottom:"1px solid $gray100",borderRight:"1px solid $gray100",color:"$gray800",display:"flex",height:"48px",padding:"$2",width:"100px","& > div":{alignItems:"center",background:"$success400",borderRadius:"$1",display:"flex",height:"100%",justifyContent:"center",width:"100%","& svg":{height:"50%"}}}),j(Ni,{background:`url(${pA}) no-repeat`,borderBottom:"1px solid $gray100",borderRight:"1px solid $gray100",color:"$gray700",height:"48px",width:"100px"}),e=>{const{translate:t}=$g();return(0,i.jsx)(mx,{children:(0,i.jsxs)(rx,{children:[(0,i.jsx)(Ni,{css:{flex:"1"},children:(0,i.jsx)(CS,{userInfo:e.userInfo})}),(0,i.jsx)($,{align:"center",gap:"3",children:e.isAssigned?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)($,{align:"center",gap:"1",children:[(0,i.jsx)(Ni,{color:"success500",children:(0,i.jsx)(la,{icon:"badge-check",iconStyle:"solid"})}),(0,i.jsx)(Ni,{font:"gray800 textXs medium",children:e.assignedText})]}),(0,i.jsxs)(Ep,{children:[(0,i.jsx)(Lp,{children:(0,i.jsx)(pa,{color:"white",leftIcon:"ellipsis-vertical",size:"sm"})}),(0,i.jsx)(Np,{placement:"bottom-end",children:(0,i.jsx)($p,{color:"red",icon:"trash-can",onClick:e.onDelete,children:e.deleteText})})]})]}):(0,i.jsx)(pa,{size:"sm",onClick:e.onAdd,children:t("ajouter_97327")})})]})})}),_A=e=>{const{translate:t}=$g();return(0,i.jsx)($,{css:{background:"white",bd:!0,padding:"$4 $6"},direction:"column",gap:"2",children:e.isLoading?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Th,{borderRadius:"$1",height:20,width:1}),(0,i.jsx)(Th,{borderRadius:"$1",height:20,width:1}),(0,i.jsx)(Th,{borderRadius:"$1",height:20,width:1})]}):(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)($,{align:"center",css:{color:"$gray700"},gap:"1",width:1,children:[(0,i.jsx)(Ni,{children:(0,i.jsx)(la,{icon:"badge-check"})}),(0,i.jsx)(Ni,{css:{flex:"1"},children:t("attribu_es_48167")}),(0,i.jsx)(Ni,{children:e.stats.assignedResources})]}),(0,i.jsxs)($,{align:"center",css:{color:"$gray700"},gap:"1",width:1,children:[(0,i.jsx)(Ni,{children:(0,i.jsx)(la,{icon:"hand-holding-heart"})}),(0,i.jsx)(Ni,{css:{flex:"1"},children:t("souhait_es_78101")}),(0,i.jsx)(Ni,{children:e.stats.wishedResources})]}),void 0!==e.stats.scannedResources&&(0,i.jsxs)($,{align:"center",css:{color:"$gray700"},gap:"1",width:1,children:[(0,i.jsx)(Ni,{children:(0,i.jsx)(la,{icon:"scanner-gun"})}),(0,i.jsx)(Ni,{css:{flex:"1"},children:t("scann_es_13169")}),(0,i.jsx)(Ni,{children:e.stats.scannedResources})]})]})})},xA=e=>{const{translate:t}=$g(),[n,a]=(0,d.useState)(!1),[s,o]=(0,d.useState)(e.stats),[r,l]=(0,d.useState)((0,ho.A)(e.members,e=>m(e.userInfo.name))),[c,u]=(0,d.useState)({}),g=(0,d.useCallback)(async t=>{a(!0),u(e=>({...e,[t]:!0}));const{member:n,stats:i}=await e.reloadMember(t);l(e=>e.flatMap(e=>e.userInfo.id===t?n?[n]:[]:[e])),o(i),u(e=>({...e,[t]:!1})),a(!1)},[e.reloadMember,a,o,u,l]),h=(0,d.useCallback)(async t=>{u(e=>({...e,[t]:!0})),await e.add(t),await g(t)},[e.add,g,u]),p=(0,d.useCallback)(async t=>{u(e=>({...e,[t]:!0})),await e.delete(t),await g(t)},[e.delete,g,u]);return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Gj,{children:e.name}),(0,i.jsxs)(py,{css:{background:"$gray50",gap:"$6",padding:"$6"},children:[(0,i.jsx)(_A,{isLoading:n,stats:s}),(0,i.jsxs)(gx,{children:[(0,i.jsx)(lx,{children:(0,i.jsx)(fA,{children:t("nom_du_membre_69353")})}),r.map(t=>c[t.userInfo.id]?(0,i.jsx)(fS,{bx:!0},t.id):(0,i.jsx)(IA,{assignedText:e.assignedText,deleteText:e.deleteText,isAssigned:e.isAssigned(t),userInfo:t.userInfo,onAdd:()=>h(t.userInfo.id),onDelete:()=>p(t.userInfo.id)},t.id))]})]})]})},yA=e=>{const{params:{eventId:t,delegationId:n},translate:a}=$g(),{mutate:s}=bs(),o=(0,d.useMemo)(()=>`${e.accreditation.name}${h(e.accreditationSlot.name)?` - ${e.accreditationSlot.name}`:""}`,[e.accreditation,e.accreditationSlot]),r=(0,d.useCallback)(t=>t.accreditationsUsersInfos.some(t=>t.accreditationSlotId===e.accreditationSlotId),[e.accreditationSlotId]),l=(0,d.useCallback)(async i=>{const{event:a}=await(s={eventId:t,delegationId:n,accreditationSlotId:e.accreditationSlotId,userInfoId:i},o=await gs(),ys("query CalendarAccreditationSlotMember(\n $eventId: EventId!\n $delegationId: DelegationId\n $accreditationSlotId: AccreditationsSlotId!\n $userInfoId: UsersInfoId!\n) {\n event(id: $eventId) {\n accreditationSlot(id: $accreditationSlotId) {\n ...AccreditationSlotStats\n }\n\n delegationMaybe(id: $delegationId) {\n accreditationSlot(id: $accreditationSlotId) {\n ...DelegationAccreditationSlotStats\n }\n }\n\n member: volunteerRegistrationByUserInfoId(userInfoId: $userInfoId) {\n ...VolunteerRegistrationDelegationAccreditationSlot\n }\n }\n}\n",{variables:s,token:o||void 0,fragments:[La.AccreditationSlotStatsFragment,La.DelegationAccreditationSlotStatsFragment,La.VolunteerRegistrationDelegationAccreditationSlotFragment]}));var s,o;const d=a.member.accreditationsSlots.some(t=>t.id===e.accreditationSlotId);return{member:r(a.member)||d?a.member:null,stats:a.delegationMaybe?.accreditationSlot??a.accreditationSlot}},[e.accreditationSlotId,n,t,r]),c=(0,d.useCallback)((n,i)=>s({eventId:t,massAccredit:{accreditationsSlotsIds:[e.accreditationSlotId],selecteds:{ids:[n]},strategy:i}}),[t,s,e.accreditationSlotId]),u=(0,d.useCallback)(e=>c(e,Je.Add),[c]),m=(0,d.useCallback)(e=>c(e,Je.Delete),[c]);return(0,i.jsx)(xA,{add:u,assignedText:a("d_j_attribu_e_06450"),delete:m,deleteText:a("retirer_l_accr_62187"),isAssigned:r,members:e.volunteersRegistrations,name:o,reloadMember:l,stats:e.stats})},SA=e=>{const{data:t,loader:n}=Ri("query AccreditationSlotMembers($eventId: EventId!, $accreditationSlotId: AccreditationsSlotId!) {\n event(id: $eventId) {\n accreditationSlot(id: $accreditationSlotId) {\n ...AccreditationSlotStats\n date\n name\n\n accreditation {\n name\n }\n\n volunteersRegistrations {\n ...VolunteerRegistrationDelegationAccreditationSlot\n }\n }\n }\n}\n",{eventId:e.eventId,accreditationSlotId:e.accreditationSlotId},[La.AccreditationSlotStatsFragment,La.VolunteerRegistrationDelegationAccreditationSlotFragment]);return(0,i.jsx)(hy,{size:"md",onClose:e.onClose,children:n||(0,i.jsx)(yA,{accreditation:t.event.accreditationSlot.accreditation,accreditationSlot:t.event.accreditationSlot,accreditationSlotId:e.accreditationSlotId,stats:t.event.accreditationSlot,volunteersRegistrations:t.event.accreditationSlot.volunteersRegistrations})})},jA=e=>{const{data:t,loader:n}=Ri("query DelegationAccreditationSlotMembers(\n $eventId: EventId!\n $delegationId: DelegationId!\n $accreditationSlotId: AccreditationsSlotId!\n) {\n event(id: $eventId) {\n delegation(id: $delegationId) {\n accreditationSlot(id: $accreditationSlotId) {\n ...DelegationAccreditationSlotStats\n\n accreditationSlot {\n date\n name\n }\n\n accreditation {\n name\n }\n\n volunteersRegistrations {\n ...VolunteerRegistrationDelegationAccreditationSlot\n }\n }\n }\n }\n}\n",{eventId:e.eventId,delegationId:e.delegationId,accreditationSlotId:e.accreditationSlotId},[La.DelegationAccreditationSlotStatsFragment,La.VolunteerRegistrationDelegationAccreditationSlotFragment]);return(0,i.jsx)(hy,{size:"md",onClose:e.onClose,children:n||(0,i.jsx)(yA,{accreditation:t.event.delegation.accreditationSlot.accreditation,accreditationSlot:t.event.delegation.accreditationSlot.accreditationSlot,accreditationSlotId:e.accreditationSlotId,stats:t.event.delegation.accreditationSlot,volunteersRegistrations:t.event.delegation.accreditationSlot.volunteersRegistrations})})},bA=e=>{const{translate:t,params:{eventId:n,delegationId:a}}=$g(),[s,o]=(0,d.useState)(e.stats),r=(0,d.useMemo)(()=>tf(e.accreditation.color),[e.accreditation]),l=(0,d.useMemo)(()=>({background:r[50],border:`1px solid ${r[500]}`,color:r[700]}),[r]),c=(0,d.useMemo)(()=>`${e.accreditation.name}${h(e.accreditationSlot.name)?` - ${e.accreditationSlot.name}`:""}`,[e.accreditation,e.accreditationSlot]),u=(0,d.useCallback)(async()=>{if(a){const{event:{delegation:s}}=await(t={eventId:n,delegationId:a,accreditationSlotId:e.accreditationSlot.id},i=await gs(),ys("query DelegationAccreditationSlotStats(\n $eventId: EventId!\n $delegationId: DelegationId!\n $accreditationSlotId: AccreditationsSlotId!\n) {\n event(id: $eventId) {\n delegation(id: $delegationId) {\n accreditationSlot(id: $accreditationSlotId) {\n ...DelegationAccreditationSlotStats\n }\n }\n }\n}\n",{variables:t,token:i||void 0,fragments:[La.DelegationAccreditationSlotStatsFragment]}));o(s.accreditationSlot)}else{const{event:{accreditationSlot:t}}=await function(e,t){return ys("query AccreditationSlotStats($eventId: EventId!, $accreditationSlotId: AccreditationsSlotId!) {\n event(id: $eventId) {\n accreditationSlot(id: $accreditationSlotId) {\n assignedResources\n maxResources\n scannedResources\n wishedResources\n }\n }\n}\n",{variables:e,token:t||void 0,fragments:[]})}({eventId:n,accreditationSlotId:e.accreditationSlot.id},await gs());o(t)}var t,i},[e.accreditationSlot,o]),[m,g]=(0,d.useState)(!1),p=s.maxResources?`/${s.maxResources}`:"",f=`${s.assignedResources}${p}`;return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)($,{align:"start",css:{...l,borderRadius:"$1",cursor:e.canMemberAccredit?"pointer":"default",minHeight:"32px",padding:"$2"},direction:"column",gap:"2",width:1,onClick:()=>{e.canMemberAccredit&&g(!0)},children:[(0,i.jsx)(Ni,{css:{flex:"1"},fontSize:"textXs",fontWeight:"medium",children:c}),(0,i.jsx)(hA,{background:r[100],count:f,icon:"badge-check",text:t("attribu_es_48167")}),e.showWished&&"number"==typeof s.wishedResources&&(0,i.jsx)(hA,{background:r[100],count:s.wishedResources,icon:"hand-holding-heart",text:t("souhait_es_78101")}),"number"==typeof s.scannedResources&&(0,i.jsx)(hA,{background:r[100],count:s.scannedResources,icon:"scanner-gun",text:t("scann_es_13169")})]}),e.canMemberAccredit&&m?a?(0,i.jsx)(jA,{accreditationSlotId:e.accreditationSlot.id,delegationId:a,eventId:n,onClose:()=>(g(!1),u())}):(0,i.jsx)(SA,{accreditationSlotId:e.accreditationSlot.id,eventId:n,onClose:()=>(g(!1),u())}):null]})},vA=e=>{const t=yh(),n=(0,d.useMemo)(()=>(0,ho.A)(e.accreditationsSlots.filter(e=>!e.accreditationSlot.date?.isValid),e=>[e.accreditationCategory.name,Hp(e.accreditation.index),e.accreditation.name.toLowerCase()]),[e.accreditationsSlots]),a=(0,d.useMemo)(()=>(0,ho.A)(e.accreditationsSlots.filter(e=>e.accreditationSlot.date?.isValid),e=>[e.accreditationCategory.name,Hp(e.accreditation.index),e.accreditation.name.toLowerCase()]),[e.accreditationsSlots]),s=(0,d.useMemo)(()=>Object.fromEntries(e.accreditations.map(e=>[e.accreditationId,e.willAutoAccredit||e.accreditation.willAutoAccredit])),[e.accreditations]);return(0,i.jsxs)(gA,{css:{borderTop:"1px solid $gray200"},date:e.selectedDay,display:t?"week":"day",maxDate:e.event.endAt,minDate:e.event.startAt,children:[n.map(t=>(0,i.jsx)(mA,{children:(0,i.jsx)(bA,{accreditation:t.accreditation,accreditationSlot:t.accreditationSlot,canMemberAccredit:e.canMemberAccredit,showWished:!s[t.accreditationId],stats:t})},t.accreditationSlot.id)),a.map(t=>(0,i.jsx)(mA,{endAt:t.accreditationSlot.date,startAt:t.accreditationSlot.date,children:(0,i.jsx)(bA,{accreditation:t.accreditation,accreditationSlot:t.accreditationSlot,canMemberAccredit:e.canMemberAccredit,showWished:!s[t.accreditationId],stats:t})},t.accreditationSlot.id))]})},AA=e=>{const{translate:t,params:{organizationId:n}}=$g(),[a,s]=(0,d.useState)(""),[o,r]=gS(e.delegationsSpaceLayoutTab,e=>e.rendering,n,"eventDelegationAccreditations.rendering",kr.WeeklyCalendar,[kr.Table,kr.WeeklyCalendar]),[l,c]=(0,d.useState)(e.event.delegation.minAccreditationSlotDate),u=(0,d.useMemo)(()=>l?.isValid?l:e.event.startAt,[e.event,l]),[g,p]=(0,d.useState)(null),f=(0,d.useMemo)(()=>{const t=m(a||""),n=e.delegationsSpaceLayoutTab?.infos.accreditationsSlotsIds;return e.event.delegation.allAccreditationsSlots.filter(e=>{const i=!h(t)||m(e.accreditation.name).includes(t)||m(e.accreditationSlot.name).includes(t)||o===kr.Table&&m(e.accreditationCategory.name).includes(t),a=!g?.isValid||!!e.accreditationSlot.date?.isValid&&g.toSQLDate()===e.accreditationSlot.date.toSQLDate(),s=!F(n)||n.includes(e.accreditationSlotId);return i&&a&&s})},[e.delegationsSpaceLayoutTab,e.event,a,o,g]),I=(0,d.useMemo)(()=>f.map(e=>({accreditationCategoryId:e.accreditationCategory.id,accreditationId:e.accreditationSlot.accreditationId,date:e.accreditationSlot.date,assignedResources:e.assignedResources,maxResources:e.maxResources,resourcesByFields:e.resourcesByFields,scannedResources:e.scannedResources})),[f]),_=(0,d.useMemo)(()=>{const t=f.map(e=>e.accreditationId);return e.event.delegation.allAccreditations.filter(e=>t.includes(e.accreditationId))},[e.event,f]),x=(0,d.useMemo)(()=>_.map(e=>({id:e.accreditation.id,accreditationCategoryId:e.accreditation.accreditationCategoryId,index:e.accreditation.index,name:e.accreditation.name,color:e.accreditation.color,icon:e.accreditation.icon,hasDateSlots:e.accreditation.hasDateSlots,maxResources:e.maxResources})),[_]),y=(0,d.useMemo)(()=>{const t=f.map(e=>e.accreditationCategoryId);return e.event.delegation.allAccreditationsCategories.filter(e=>t.includes(e.accreditationCategoryId)).map(e=>({id:e.accreditationCategory.id,name:e.accreditationCategory.name,maxResources:e.maxResources}))},[f,e.event]),S=(0,d.useMemo)(()=>!e.delegationsSpaceLayoutTab,[e.delegationsSpaceLayoutTab]),j=(0,d.useMemo)(()=>h(e.delegationsSpaceLayoutTab?.infos.customFieldSlug)&&F(x)?[{accreditationsIds:x.map(e=>e.id),customFieldSlug:e.delegationsSpaceLayoutTab.infos.customFieldSlug}]:[],[e.delegationsSpaceLayoutTab,x]);return(0,i.jsxs)($,{css:{background:"white",bd:!0,overflow:"hidden"},direction:"column",children:[(0,i.jsxs)($,{css:{background:"white",padding:"$5 $5"},gap:"3",children:[(0,i.jsx)(Ni,{width:320,children:(0,i.jsx)(hh,{icon:"magnifying-glass",placeholder:t("rechercher_une_65646"),value:a,onChange:s})}),(0,i.jsx)(Ni,{css:{flex:"1"}}),o===kr.WeeklyCalendar&&(0,i.jsx)(cA,{max:e.event.endAt,min:e.event.startAt,value:u,onChange:c}),o===kr.Table&&(0,i.jsx)(Ni,{width:160,children:(0,i.jsx)(Uf,{max:e.event.endAt,min:e.event.startAt,value:g,onChange:p})}),S&&(0,i.jsxs)(Ep,{children:[(0,i.jsx)(Lp,{children:(0,i.jsx)(pa,{color:"white",leftIcon:Vr(o),children:Wr(t,o)})}),(0,i.jsxs)(Np,{placement:"bottom-end",children:[(0,i.jsx)($p,{icon:Vr(kr.WeeklyCalendar),onClick:()=>r(kr.WeeklyCalendar),children:Wr(t,kr.WeeklyCalendar)}),(0,i.jsx)($p,{icon:Vr(kr.Table),onClick:()=>r(kr.Table),children:Wr(t,kr.Table)})]})]})]}),o===kr.Table?(0,i.jsx)(lA,{accreditations:x,categories:y,customFields:e.organization.customFields.nodes,hideOptions:!0,links:j,setLinks:Ih.A,showTotal:!0,slots:I}):(0,i.jsx)(vA,{accreditations:_,accreditationsSlots:f,canMemberAccredit:e.canMemberAccredit,event:e.event,selectedDay:u})]})},CA=()=>{const e=Ei();return(0,i.jsx)($,{align:"center",css:{background:"white",border:"1px solid $gray200",borderRadius:"$1",boxShadow:"$xs"},height:1,justify:"center",width:1,children:(0,i.jsx)(Ni,{height:250,width:1,children:(0,i.jsx)(Af,{title:e("aucune_accr_dit_27643")})})})},EA=e=>{const{params:{organizationId:t,eventId:n,delegationId:a}}=$g(),{data:s,loader:o}=Ri("query DelegationAccreditations(\n $organizationId : OrganizationId!\n $eventId: EventId!\n $delegationId: DelegationId!\n $onlyVisible: Boolean!\n) {\n organization(id: $organizationId){\n customFields(eventId: $eventId, fieldTypes: [Select], variety: UserInfo, privacy: Public){\n nodes {\n ...ConditionCustomField\n }\n }\n }\n\n event(id: $eventId) {\n startAt\n endAt\n\n delegation(id: $delegationId) {\n minAccreditationSlotDate\n\n allAccreditationsCategories {\n accreditationCategoryId\n maxResources\n\n accreditationCategory {\n id\n name\n }\n }\n\n allAccreditations {\n accreditationId\n accreditationCategoryId\n willAutoAccredit\n maxResources\n\n accreditation {\n id\n accreditationCategoryId\n name\n color\n icon\n hasSlots\n index\n willAutoAccredit\n hasDateSlots\n }\n }\n\n allAccreditationsSlots(onlyVisible: $onlyVisible) {\n ...DelegationAccreditationSlotStats\n\n accreditationSlot {\n id\n accreditationId\n date\n name\n }\n\n accreditation {\n name\n color\n index\n }\n\n accreditationCategory {\n id\n name\n }\n }\n }\n }\n}\n",{organizationId:t,eventId:n,delegationId:a,onlyVisible:e.onlyVisible},[La.ConditionCustomFieldFragment,La.DelegationAccreditationSlotStatsFragment]);return o||(U(s.event?.delegation.allAccreditationsSlots)?(0,i.jsx)(CA,{}):(0,i.jsx)(AA,{canMemberAccredit:e.canMemberAccredit,delegationsSpaceLayoutTab:e.delegationsSpaceLayoutTab,event:s.event,organization:s.organization}))},TA=e=>{const{params:{organizationId:t,eventId:n,delegationId:a},translate:s}=$g(),{mutate:o,isLoading:r}=function(e={}){return Mi("mutation EventDocumentsExport(\n $organizationId: OrganizationId!\n $eventId: EventId!\n $delegationId: DelegationId\n $documentsExport: DocumentsExportInput!\n) {\n jobId: eventDocumentsExport(\n organizationId: $organizationId\n eventId: $eventId\n delegationId: $delegationId\n documentsExport: $documentsExport\n )\n}\n",e)}(),l=(0,d.useMemo)(()=>e.customDocuments.filter(t=>t.slug===e.slug),[e.customDocuments,e.slug]),c=(0,d.useMemo)(()=>F(l)?l.map(e=>e.name).join(", "):$n.includes(e.slug)?Pb(e.slug):null,[l,e.slug]),u=F(l);return c?(0,i.jsxs)($,{align:"center",css:{borderBottom:"1px solid $gray200",padding:"$4 $6","&:last-child":{borderBottom:"none"}},gap:"3",children:[(0,i.jsx)($,{align:"center",css:{background:"$blueGray100",borderRadius:"12px",color:"$blueGray700"},height:40,justify:"center",width:40,children:(0,i.jsx)(la,{icon:"file-lines"})}),(0,i.jsx)(Ni,{css:{flex:"1"},font:"gray900 textSm medium",children:c}),(0,i.jsxs)(E_,{children:[(0,i.jsx)(M_,{children:(0,i.jsx)(Ni,{children:(0,i.jsx)(pa,{color:"white",isLoading:r,leftIcon:"download",onClick:()=>o({organizationId:t,eventId:n,delegationId:a,documentsExport:{badgeType:u?null:e.slug,customDocumentSlug:u?e.slug:null,documentType:u?Ae.UserCustomDocument:Ae.CustomBadge,language:Ot.Fr,oneFile:!1,segmentsIds:[],strategy:be.OnePerPage}})})})}),(0,i.jsx)(R_,{placement:"top",children:s("recevoir_les_do_31669")})]})]}):null},RA=e=>{const{translate:t}=$g();return(0,i.jsxs)($,{direction:"column",gap:"2",children:[(0,i.jsx)(Ni,{font:"gray900 textMd medium",children:t("documents_dispo_46996")}),(0,i.jsx)($,{css:{background:"white",border:"1px solid $gray200",borderRadius:"$2",flex:"1",overflow:"hidden"},direction:"column",children:e.delegationsSpaceCustomBadges.map(t=>(0,i.jsx)(TA,{customDocuments:e.customDocuments,slug:t},t))})]})},MA=e=>{const{designSystem:t}=Qs(),n=t===Zs?({children:e})=>(0,i.jsx)($,{className:"h-detail-box-content",css:{flex:"1",padding:"$6"},width:1,children:e}):({children:e})=>(0,i.jsx)(Ni,{className:"h-detail-box-content",css:{flex:"1",padding:"$6"},width:1,children:e});return(0,i.jsx)($,{css:{background:"white",bd:!0,...e.css},direction:"column",width:1,children:(0,i.jsxs)($,{direction:"column",height:1,width:1,children:[(0,i.jsxs)($,{css:{borderBottom:e.hideTitleBorder?void 0:"1px solid $gray200",paddingBottom:e.hideTitleBorder?"0":"$5",paddingTop:"$5",px:"$6"},gap:"3",width:1,children:[(0,i.jsx)(Zg,{css:{flex:"1",alignContent:"center"},children:e.title}),e.rightIcon&&(0,i.jsx)(Ni,{color:"gray900",css:{cursor:"pointer"},fontSize:"textMd",fontWeight:"semiBold",textAlign:"center",width:20,onClick:t=>{e.rightIconClick?.(t)},children:(0,i.jsx)(la,{icon:e.rightIcon})}),e.select]}),(0,i.jsx)(n,{children:e.children})]})})},DA=({css:e,title:t,children:n})=>(0,i.jsxs)($,{direction:"column",gap:"3",children:[(0,i.jsx)(Ni,{color:"gray900",fontSize:"textLg",fontWeight:"semiBold",children:t}),(0,i.jsx)($,{css:{bd:!0,padding:"$4",...e},direction:"column",children:n})]}),OA=({children:e,...t})=>Sp()?(0,i.jsx)(DA,{...t,children:e}):(0,i.jsx)(MA,{...t,children:e}),wA=e=>(0,i.jsx)($,{direction:"column",gap:"4",width:1,children:e.customFields.map((t,n)=>(0,i.jsxs)(d.Fragment,{children:[0!==n&&(0,i.jsx)(CI,{direction:"horizontal"}),(0,i.jsx)(ib,{field:t,fields:e.delegation.fields})]},t.id))}),PA=({percent:e,prospectivePercent:t})=>(0,i.jsxs)(Ni,{css:{background:"$gray100",borderRadius:"$1",position:"relative"},height:8,width:1,children:[(0,i.jsx)(Ni,{css:{background:sf(e),borderRadius:"$1",left:0,maxWidth:"100%",position:"absolute",top:0,width:100*e+"%"},height:1}),void 0!==t&&(0,i.jsx)(Ni,{css:{background:sf(t),borderRadius:"$1",left:0,opacity:.4,maxWidth:"100%",position:"absolute",top:0,width:100*t+"%"},height:1})]}),$A=e=>(0,i.jsx)($,{align:"center",css:{bd:!0,fontSize:"$textMd"},height:48,justify:"center",width:48,children:(0,i.jsx)(la,{icon:e.icon})}),kA=({delegation:e})=>{const{translate:t,params:{organizationId:n}}=$g(),a=Ci(pd),s=Ci(Hl),{dashboardLeaders:o}=Sr(n);return(0,i.jsxs)($,{direction:"column",gap:"4",width:1,children:[e.deadlineDate&&(0,i.jsxs)($,{align:"center",gap:"4",children:[(0,i.jsx)($A,{icon:"calendar"}),(0,i.jsxs)($,{css:{flex:"1"},direction:"column",gap:"1",children:[(0,i.jsx)(Ni,{font:"gray800 textSm medium",children:t("date_butoir_dinscription")}),(0,i.jsx)(Ni,{color:"gray500",children:a.toLocaleString(e.deadlineDate,Za.DateOnly.MonthLong)})]})]}),(0,i.jsxs)($,{align:"center",gap:"4",children:[(0,i.jsx)($A,{icon:"gem"}),(0,i.jsxs)($,{css:{flex:"1"},direction:"column",gap:"1",children:[(0,i.jsx)(Ni,{font:"gray800 textSm medium",children:t(o)}),(0,i.jsx)($,{gap:"3",wrap:"wrap",children:e.leaders.map(e=>(0,i.jsxs)($,{align:"center",css:{bd:"gray300 1 xs",px:"$1"},gap:"1",height:22,children:[(0,i.jsx)(Fp,{email:e.email,image:e.picture?.url,name:e.name,size:16}),(0,i.jsx)(Ni,{font:"gray800 textXs medium",children:e.nameOrEmail})]},e.id))})]})]}),(0,i.jsxs)($,{align:"center",gap:"4",children:[(0,i.jsx)($A,{icon:"users"}),(0,i.jsxs)($,{direction:"column",gap:"1",children:[(0,i.jsx)(Ni,{font:"gray800 textSm medium",children:t("quota_00069")}),(0,i.jsxs)($,{align:"center",css:{flex:"1"},gap:"3",children:[(0,i.jsx)(Ni,{width:100,children:(0,i.jsx)(PA,{percent:e.maxResources?e.numberOfResources/e.maxResources:1})}),(0,i.jsxs)(Ni,{color:"gray500",children:[e.numberOfResources,"/",s.toNumberOrInfinity(e.maxResources)]})]})]})]})]})},NA=()=>{const{translate:e,params:{organizationId:t}}=$g(),{dashboardLeaders:n}=Sr(t);return(0,i.jsxs)($,{direction:"column",gap:"4",width:1,children:[(0,i.jsxs)($,{align:"center",gap:"4",children:[(0,i.jsx)($A,{icon:"gem"}),(0,i.jsxs)($,{css:{flex:"1"},direction:"column",gap:"1",children:[(0,i.jsx)(Ni,{font:"gray800 textSm medium",children:e(n)}),(0,i.jsx)(Th,{borderRadius:"$1",height:20,width:1})]})]}),(0,i.jsxs)($,{align:"center",gap:"4",children:[(0,i.jsx)($A,{icon:"users"}),(0,i.jsxs)($,{css:{flex:"1"},direction:"column",gap:"1",children:[(0,i.jsx)(Ni,{font:"gray800 textSm medium",children:e("quota_00069")}),(0,i.jsx)(Th,{borderRadius:"$1",height:20,width:1})]})]})]})},LA=e=>{const{params:{organizationId:t,eventId:n,delegationId:a},translate:s}=$g(),o=(0,d.useMemo)(()=>Zc({organizationId:e.delegation.organizationId,eventId:e.delegation.eventId,delegationId:e.delegation.id,formId:e.delegation.form.id}),[e.delegation]);return(0,i.jsx)(OA,{css:{height:"fit-content"},hideTitleBorder:!0,title:s("Form"),children:(0,i.jsxs)($,{direction:"column",gap:"4",width:1,children:[(0,i.jsx)(Ni,{color:"gray800",children:s("envoyez_le_lien_23853")}),(0,i.jsxs)($,{gap:"3",width:1,children:[(0,i.jsx)($,{css:{flex:"1"},children:(0,i.jsx)(pa,{css:{width:"100%"},textAlign:"center",to:Yc.MEMBERS_INVITE({organizationId:t,eventId:n,delegationId:a}),children:s("envoyer_par_e_m_11240")})}),(0,i.jsxs)(E_,{children:[(0,i.jsx)(M_,{children:(0,i.jsx)(pa,{color:"white",leftIcon:"arrow-up-right-from-square",target:"_blank",to:o})}),(0,i.jsx)(R_,{placement:"top",children:s("ouvrir_40131")})]}),(0,i.jsxs)(E_,{children:[(0,i.jsx)(M_,{children:(0,i.jsx)(pa,{color:"white",leftIcon:"copy",onClick:()=>ex(o)})}),(0,i.jsx)(R_,{placement:"top",children:s("copier_75889")})]})]})]})})},zA=e=>{const{translate:t}=$g();return(0,i.jsx)(OA,{css:{"& .h-detail-box-content":{padding:"0","& :last-child":{borderBottom:"none"}}},title:(0,i.jsx)($,{gap:"2",children:(0,i.jsx)(Ni,{children:t("invitations_32350")})}),children:e.delegation.usersInfosInvitations.nodes.map(({userInfo:e})=>(0,i.jsx)($,{css:{borderBottom:"1px solid $gray200",padding:"$3 $6"},children:(0,i.jsx)(CS,{isClickDisabled:!0,userInfo:e})},e.id))})},FA=()=>{const{history:e,translate:t,params:{organizationId:n,eventId:a,delegationId:s}}=$g(),o=Ci(bu),{data:r,isLoading:l}=Ri('query DelegationSpaceDashboard($organizationId: OrganizationId!, $delegationId: DelegationId!) {\n organization(id: $organizationId) {\n allowDelegationSpaceDownload\n\n delegation(id: $delegationId) {\n id\n name\n description\n organizationId\n eventId\n formId\n deadlineDate\n numberOfResources\n maxResources\n columns\n state\n showFormLinkInDelegationSpace\n fields\n canLeadersEditCustomFields\n usedCustomFieldsFilled\n\n category: delegationCategory {\n id\n name\n }\n\n form {\n id\n name\n }\n\n leaders {\n id\n email\n name\n nameOrEmail\n firstName: fieldValue(slug: "firstName")\n lastName: fieldValue(slug: "lastName")\n phone: fieldValue(slug: "phone")\n\n picture {\n url\n }\n }\n\n usedCustomFields {\n ...CustomFieldWithCondition\n }\n\n usersInfosInvitations(limit: 5, offset: 0) {\n nodes {\n userInfo {\n id\n email\n name\n\n picture {\n url\n }\n }\n }\n\n pageInfo {\n hasNextPage\n }\n }\n }\n }\n}\n',{organizationId:n,delegationId:s},[La.CustomFieldWithConditionFragment]),c=(0,d.useMemo)(()=>r.organization?.delegation.canLeadersEditCustomFields??!1,[r.organization]),u=(0,d.useMemo)(()=>r.organization?.delegation.usedCustomFields??[],[r.organization]),m=(0,d.useCallback)(()=>e.push(Yc.FIELDS_EDIT({organizationId:n,eventId:a,delegationId:s})),[n,a,s]),g=(0,d.useMemo)(()=>!(r.organization?.delegation.usedCustomFieldsFilled??1),[r.organization]),p=(0,d.useMemo)(()=>{if(h(r.organization?.delegation.description)){const e=r.organization.delegation;return o.renderText(e.description,{delegation:e})}return""},[r.organization]);return(0,i.jsxs)($,{direction:"column",gap:"4",width:1,children:[g&&c&&(0,i.jsxs)(Kg,{alertStyle:"warning",children:[(0,i.jsx)(Qg,{children:t("informations_im_33187")}),(0,i.jsx)(Xg,{children:(0,i.jsxs)($,{direction:"column",gap:"2",children:[t("des_information_10949"),(0,i.jsx)($,{width:1,children:(0,i.jsx)(pa,{color:"invisible",css:{color:"inherit",px:"0","&:hover":{color:"inherit"}},rightIcon:"arrow-right",onClick:m,children:t("_diter_les_info_35201")})})]})})]}),(0,i.jsxs)($,{gap:"4",width:1,children:[(0,i.jsxs)($,{css:{flex:"1"},direction:"column",gap:"4",children:[h(p)&&(0,i.jsx)($,{children:(0,i.jsx)(OA,{hideTitleBorder:!0,title:t("description_58935"),children:(0,i.jsx)(yp,{text:p})})}),(0,i.jsx)(OA,{hideTitleBorder:!0,title:t("informations_g_79325"),children:l?(0,i.jsx)(NA,{}):(0,i.jsx)(kA,{delegation:r.organization.delegation})}),F(u)&&(0,i.jsx)($,{children:(0,i.jsx)(OA,{hideTitleBorder:!0,rightIcon:c?"pen":void 0,rightIconClick:m,title:t("informations_co_28407"),children:l?(0,i.jsx)(NA,{}):(0,i.jsx)(wA,{customFields:u,delegation:r.organization.delegation})})})]}),!0===r.organization?.delegation.showFormLinkInDelegationSpace&&(0,i.jsxs)($,{direction:"column",gap:"4",width:450,children:[(0,i.jsx)(LA,{delegation:r.organization.delegation}),F(r.organization.delegation.usersInfosInvitations.nodes)&&(0,i.jsx)(zA,{delegation:r.organization.delegation})]})]})]})},UA=e=>{switch(e){case BA.Event:return{color:"success",leftIcon:"calendar"};case BA.ParentDelegation:return{color:"pink",leftIcon:"people-group"};default:return ir()}};var BA;!function(e){e.Event="event",e.ParentDelegation="parent-delegation"}(BA||(BA={}));const GA=({state:e,userInfo:t,onClick:n})=>{const a=Ei(),s=h(t.name);return(0,i.jsxs)($,{align:"center",css:{borderBottom:"1px solid $gray200",cursor:"pointer",py:"$3",userSelect:"none",width:"100%","&:last-child":{border:"none"}},onClick:n,children:[(0,i.jsx)(Lf,{shouldPreventDefault:!1,state:e,onClick:Ih.A}),(0,i.jsx)(Wg,{width:"3"}),(0,i.jsx)(Fp,{email:t.email,image:t.picture?.url,name:t.name,size:40}),(0,i.jsx)(Wg,{width:"4"}),(0,i.jsxs)($,{css:{flex:"1",overflow:"hidden"},direction:"column",children:[(0,i.jsx)(Ni,{ellipsis:!0,color:"gray700",children:s?t.name:t.email}),s&&(0,i.jsx)(Ni,{ellipsis:!0,color:"gray500",children:t.email})]}),t.source&&(0,i.jsx)(Ni,{children:(0,i.jsx)(xf,{...UA(t.source),leftIconStyle:"solid",children:t.source===BA.Event?a("_v_nement_22345"):a("d_l_gation_pare_68507")})})]})},VA=()=>(0,i.jsxs)($,{align:"center",css:{borderBottom:"1px solid $gray200",cursor:"pointer",py:"$3",userSelect:"none",width:"100%","&:last-child":{border:"none"}},children:[(0,i.jsx)(Lf,{shouldPreventDefault:!1,state:"unchecked",onClick:Ih.A}),(0,i.jsx)(Wg,{width:"3"}),(0,i.jsx)(Th,{size:40,variant:"circular"}),(0,i.jsx)(Wg,{width:"4"}),(0,i.jsxs)($,{css:{flex:"1",overflow:"hidden"},direction:"column",gap:"1",children:[(0,i.jsx)(Th,{borderRadius:"$1",height:12,width:1}),(0,i.jsx)(Th,{borderRadius:"$1",height:12,width:1})]})]}),WA=e=>{const{translate:t,params:{organizationId:n,eventId:a,delegationId:s}}=$g(),{mutate:o,isLoading:r}=Ls(),[l,c,u]=_v(""),{data:m,isLoading:g}=Ri("query ParentUsersInfos(\n $organizationId: OrganizationId!\n $delegationId: DelegationId!\n $name: String\n) {\n organization(id: $organizationId) {\n delegation(id: $delegationId) {\n parentUsersInfos(name: $name) {\n ...ExistingVolunteer\n }\n }\n }\n}\n",{organizationId:n,delegationId:s,name:h(c)?c:void 0},[La.ExistingVolunteerFragment]);const[p,f]=(0,d.useState)([]);return(0,i.jsxs)(ff,{size:"md",onClose:e.onClose,children:[(0,i.jsx)(Ni,{color:"gray800",css:{height:"56px",textAlign:"center"},children:(0,i.jsx)("img",{alt:"Avatars",height:"100%",src:jh.AvatarGroup})}),(0,i.jsx)(Wg,{height:"6"}),(0,i.jsx)(Ni,{color:"gray800",fontSize:"textLg",fontWeight:"medium",textAlign:"center",children:t("ajouter_un_memb_33261")}),(0,i.jsx)(Wg,{height:"1"}),(0,i.jsx)(Ni,{color:"gray500",textAlign:"center",children:t("ajouter_un_ou_d_21477")}),(0,i.jsx)(Wg,{height:"6"}),(0,i.jsx)(hh,{icon:"magnifying-glass",placeholder:t("rechercher_un_m_05904"),value:l,onChange:u}),(0,i.jsx)(Wg,{height:"6"}),(0,i.jsx)($,{css:{flex:"1",overflowY:"auto"},direction:"column",children:g?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(VA,{}),(0,i.jsx)(VA,{}),(0,i.jsx)(VA,{})]}):m.organization.delegation.parentUsersInfos.map(e=>{const t=p.includes(e.id)?"checked":"unchecked";return(0,i.jsx)(GA,{state:t,userInfo:e,onClick:()=>{f(B(p,e.id,"unchecked"===t))}},e.id)})}),(0,i.jsx)(Wg,{height:"7"}),(0,i.jsxs)($,{align:"center",gap:"3",justify:"end",children:[(0,i.jsx)(pa,{disabled:!F(p),isLoading:r,onClick:async()=>{await o({eventId:a,delegationId:s,selecteds:{ids:p}}),location.reload()},children:t("ajouter_97327")}),(0,i.jsx)(pa,{color:"white",onClick:e.onClose,children:t("annuler_48254")})]})]})},qA=({delegation:e,name:t})=>{const{translate:n,params:{organizationId:a,delegationId:s}}=$g(),[o,r]=(0,d.useState)(!1),l=e.canLeadersAddMembers&&e.state===Se.Ongoing,c=l&&(!!e.eventId&&!!e.parentId||e.canLeadersImportMembers),{delegationHeader:u,delegationHeaderEvent:m,addMemberButton:g}=Sr(a);return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)($,{gap:"3",children:[(0,i.jsxs)($,{css:{flex:"1"},direction:"column",gap:"1",children:[(0,i.jsx)(Ni,{font:"grayCustom900 displayXs semiBold",children:n("bienvenue_1_42255",t||"")}),(0,i.jsx)(Ni,{color:"grayCustom500",children:e.event?n(m,e.name,e.event.name):n(u,e.name)})]}),c?(0,i.jsxs)(Ep,{children:[(0,i.jsx)(Lp,{children:(0,i.jsx)(pa,{children:n(g)})}),(0,i.jsxs)(Np,{placement:"bottom-end",children:[e.eventId&&e.parentId&&(0,i.jsx)($p,{icon:"user-group",onClick:()=>{r(!0)},children:n("ajouter_des_mem_06922")}),(0,i.jsx)($p,{icon:"user-plus",to:Yc.MEMBER_CREATE({organizationId:a,eventId:e.eventId||void 0,delegationId:s,formId:e.formId}),children:n("ajouter_un_nouv_29283")}),e.canLeadersImportMembers&&(0,i.jsx)($p,{icon:"file-import",to:Yc.DELEGATION_MEMBERS_IMPORT({organizationId:a,eventId:e.eventId||void 0,delegationId:s}),onClick:e=>Ap(e.target),children:n("importer_via_un_61623")})]})]}):l?(0,i.jsx)(pa,{to:Yc.MEMBER_CREATE({organizationId:a,eventId:e.eventId||void 0,delegationId:s,formId:e.formId}),children:n(g)}):null]}),o&&(0,i.jsx)(WA,{onClose:()=>{r(!1)}})]})},YA=e=>{const{translate:t,params:{organizationId:n,eventId:a,delegationId:s}}=$g(),o=(0,d.useMemo)(()=>e.user?gu(n)?`${e.user.userInfo.firstName||""} ${e.user.userInfo.lastName||""}`.trim():e.user.userInfo.firstName||"":"",[e.user]),r=(0,d.useMemo)(()=>e.delegation.canLeadersDeleteMembers&&e.delegation.state!==Se.Locked,[e.delegation]),l=(0,d.useMemo)(()=>e.delegation.canLeadersDuplicateMembers&&e.delegation.state!==Se.Locked,[e.delegation]),c=(0,d.useMemo)(()=>e.delegation.canLeadersEditMembers&&e.delegation.state!==Se.Locked,[e.delegation]),u=(0,d.useCallback)(e=>e===Fr.AccreditationsMatrix&&c,[c]),m=(0,d.useMemo)(()=>(e.delegation.numberOfDelegationsAccreditationsSlots??0)>0,[e.delegation]),g=(0,d.useMemo)(()=>e.delegationsSpaceLayoutTabs.find(e=>e.slug===Rr.DOCUMENTS),[e.delegationsSpaceLayoutTabs]),h=(0,d.useMemo)(()=>g?g.isVisible&&F(g?.infos.customDocumentsSlugs??[]):e.allowDelegationSpaceDownload||F(e.delegation.customDocuments??[]),[e.allowDelegationSpaceDownload,e.delegation,g]),p=(0,d.useMemo)(()=>(e.delegationsSpaceCustomBadges??[]).concat(e.delegation.customDocuments.map(e=>e.slug)??[]).concat(g?.infos.customDocumentsSlugs??[]),[e.delegation,e.delegationsSpaceCustomBadges,g]),f=(0,d.useMemo)(()=>e.delegation.event?.customDocuments??[],[e.delegation]),I=e=>({organizationId:e?":organizationId":n,eventId:a?e?":eventId":a:void 0,delegationId:e?":delegationId":s}),{tabMembers:_,tabAccreditations:x}=Sr(n),y=!e.delegation.canLeadersSeeHiddenAccreditationsSlots,S=(0,d.useMemo)(()=>{const n=e.delegationsSpaceLayoutTabs.find(e=>e.slug===Rr.DASHBOARD),a=n?.name.trim();return n?.isVisible??1?(0,i.jsx)(Zx,{getPath:(e=!1)=>Yc.DELEGATION_DASHBOARD(I(e)),title:a||t("tableau_de_bord_24627"),children:(0,i.jsx)(FA,{})},Rr.DASHBOARD):null},[e.delegationsSpaceLayoutTabs,I]),j=(0,d.useMemo)(()=>{const e=g?.name.trim();return a&&h?(0,i.jsx)(Zx,{getPath:(e=!1)=>Yc.DELEGATION_DOCUMENTS(I(e)),title:e||t("Documents"),children:(0,i.jsx)(RA,{customDocuments:f,delegationsSpaceCustomBadges:p})},Rr.DOCUMENTS):null},[g,f,e.delegationsSpaceLayoutTabs,p,a,I,h]);return(0,i.jsxs)($,{direction:"column",gap:"6",children:[(0,i.jsx)(qA,{delegation:e.delegation,name:o}),(0,i.jsx)($,{direction:"column",children:(0,i.jsx)(Hx,{children:F(e.delegationsSpaceLayoutTabs)?e.delegationsSpaceLayoutTabs.map(t=>t.slug===Rr.DASHBOARD?S:t.slug===Rr.DOCUMENTS?j:(0,i.jsx)(Zx,{getPath:(e=!1)=>Yc.DELEGATION_TAB({...I(e),slug:t.slug}),title:t.name,children:t.segmentType===Tt.Volunteers?(0,i.jsx)(Zv,{campaigns:e.delegation.campaigns,canDuplicateMembers:l,canEditColumns:e.delegation.canLeadersEditColumns,canMemberAccredit:!1,canMemberDelete:r,canMemberEdit:c,columns:e.delegation.columns,customBadges:p,customFieldsPrivacy:ge.Public,delegationsSpaceLayoutTab:t,deleteFromEvent:!0,forDelegationsSpace:!0,getEditPath:t=>Yc.MEMBER_EDIT({delegationId:s,eventId:a,organizationId:n,userInfoId:t.userInfo.id,formId:e.delegation.formId}),onlyVisibleAccreditationsSlots:!e.delegation.canLeadersSeeHiddenAccreditationsSlots,showAccreditationsEdit:!1,showAccreditationsValidate:!1,showDeleteFromEvent:!1,showDocumentsDownload:h,showEditMode:u,showPrint:!1}):(0,i.jsx)(EA,{canMemberAccredit:!1,delegationsSpaceLayoutTab:t,onlyVisible:y})},t.id)):(0,i.jsxs)(i.Fragment,{children:[S,(0,i.jsx)(Zx,{getPath:(e=!1)=>Yc.DELEGATION_MEMBERS(I(e)),title:t(_,e.delegation.numberOfResources),children:a?(0,i.jsx)(Zv,{campaigns:e.delegation.campaigns,canDuplicateMembers:l,canEditColumns:e.delegation.canLeadersEditColumns,canMemberAccredit:!1,canMemberDelete:r,canMemberEdit:c,columns:e.delegation.columns,customBadges:p,customFieldsPrivacy:ge.Public,deleteFromEvent:!0,forDelegationsSpace:!0,getEditPath:t=>Yc.MEMBER_EDIT({delegationId:s,eventId:a,organizationId:n,userInfoId:t.userInfo.id,formId:e.delegation.formId}),onlyVisibleAccreditationsSlots:!e.delegation.canLeadersSeeHiddenAccreditationsSlots,showAccreditationsEdit:!1,showAccreditationsValidate:!1,showDeleteFromEvent:!1,showDocumentsDownload:h,showEditMode:u,showPrint:!1}):(0,i.jsx)(Jv,{campaigns:e.delegation.campaigns,canCustomFieldRead:!1,canEditColumns:e.delegation.canLeadersEditColumns,canMemberDelete:r,canMemberEdit:c,columns:e.delegation.columns,customBadges:p,getEditPath:t=>Yc.MEMBER_EDIT({delegationId:s,organizationId:n,userInfoId:t.id,formId:e.delegation.formId}),showDocumentsDownload:h,showEditMode:!1})}),a&&m&&(0,i.jsx)(Zx,{getPath:(e=!1)=>Yc.DELEGATION_ACCREDITATIONS(I(e)),title:t(x),children:(0,i.jsx)(EA,{canMemberAccredit:!1,onlyVisible:y})}),j]})})})]})},HA=(0,d.createContext)({}),ZA=({children:e,...t})=>(0,i.jsx)(HA.Provider,{value:{shouldShowModeSelection:Boolean(t.createCard||t.upsertCard||t.updateCard),...t},children:e});function KA(){return(0,d.useContext)(HA)}var QA=n(6632);const XA=e=>{const t=(0,d.useRef)(null);return(0,i.jsx)(i.Fragment,{children:(0,i.jsxs)("details",{ref:t,open:e.showSection,onToggle:t=>{const n=t.currentTarget.open;n!==e.showSection&&(e.setShowSection(n),e.onToggle?.(n))},children:[(0,i.jsx)("summary",{style:{cursor:"pointer"},children:(0,i.jsxs)($,{align:"center",gap:"2",children:[(0,i.jsx)(Ef,{tabIndex:-1,value:e.showSection,onChange:Ih.A}),(0,i.jsx)(N,{css:{fontWeight:"$medium"},children:e.toggle})]})}),(0,i.jsx)($,{css:{marginBlockStart:"$5",borderBlockStart:"1px solid $gray200",paddingBlockStart:"$6","&:has(> .card)":{borderBlockStart:"unset",marginBlockStart:"$4",paddingBlockStart:"unset"}},direction:"column",gap:"3",children:e.children})]})})},JA=({css:e,disabled:t,hideHeading:n,isOpen:a,isOpenToggleLabel:o,onToggle:r,...l})=>{const{descId:c}=dh(),[u,m]=d.useState(a??!1);return"production"!==s.Production&&d.Children.toArray(l.children).filter(e=>["RadioText","Radio"].includes(e.type.name)).length>=2&&"radiogroup"!==l.role&&console.warn('This `` element contains multiple `` components, but does not have `role="radiogroup"` set; this may result in incorrect styling (i.e., too much vertical spacing).'),(0,i.jsx)($f.Provider,{value:{isDisabled:t},children:(0,i.jsxs)($,{"aria-describedby":c,as:"fieldset",className:"fieldset--column",css:{border:"unset",padding:"unset",margin:"unset",'&[role="radiogroup"]':{gap:"$2","& header":{borderBlockEnd:"unset",paddingBlockEnd:"unset","& > h2":{fontSize:"$textSm",color:"$gray700"},"& + div":{gap:"$3"}}},"&:disabled :is(input, select, textarea, datalist, button)":{cursor:"not-allowed !important"},...e},direction:"column",disabled:o?!u:void 0,gap:o?"5":"6",...l,children:[(0,i.jsx)(lv,{heading:l.heading}),!n&&(0,i.jsxs)($,{as:M.Header,css:{paddingBlockEnd:o?void 0:"$5",borderBlockEnd:o?void 0:"1px solid $gray200"},direction:"column",gap:"1",children:[(0,i.jsxs)($,{gap:"1",children:[(0,i.jsx)(Zg,{"aria-hidden":"true",color:"gray800",textStyle:"heading",children:l.heading}),l.tooltip]}),l.subtitle&&(0,i.jsx)(N,{id:c,textStyle:"subtitle",children:l.subtitle})]}),o?(0,i.jsx)(XA,{setShowSection:m,showSection:u,toggle:o,onToggle:r,children:l.children}):(0,i.jsx)(i.Fragment,{children:(0,i.jsx)($,{css:{gap:"$6",'&:not(role="radiogroup"):has(> fieldset.fieldset--column + fieldset.fieldset--column)':{gap:"$9"},"&:has(> fieldset.fieldset--row)":{gap:"unset"}},direction:"column",children:l.children})})]})})},eC=({disabled:e,...t})=>{const{descId:n}=dh();return(0,i.jsx)($f.Provider,{value:{isDisabled:e},children:(0,i.jsxs)($,{"aria-describedby":n,as:"fieldset",className:"fieldset--row",css:{border:"unset",padding:"unset",margin:"unset","&:disabled :is(input, select, button)":{cursor:"not-allowed !important"},"& + &":{borderBlockStart:"1px solid $gray200",marginBlockStart:"$5",paddingBlockStart:"$5"},"& fieldset.fieldset--column":{gap:"$2","& header":{paddingBlockEnd:"unset",borderBlockEnd:"unset !important","& > div > :is(h1, h2, h3, h4, h5, h6)":{fontSize:"$textSm !important",fontWeight:"$medium !important"}}}},direction:"row",gap:"7",...t,children:[(0,i.jsx)(lv,{heading:t.heading}),(0,i.jsxs)($,{as:M.Header,direction:"row",gap:"1",width:280,children:[(0,i.jsx)(Zg,{"aria-hidden":"true",color:"gray800",css:{fontSize:"$textSm"},textStyle:"subheading",children:t.heading}),(0,i.jsx)(N,{id:n,textStyle:"subtitle",children:t.subtitle})]}),(0,i.jsx)($,{css:{flex:"1"},direction:"column",gap:"4",children:t.children})]})})},tC=e=>{const{params:{organizationId:t},translate:n}=$g(),{data:a,loader:s}=As({organizationId:t}),o=dh(),r=(0,d.useMemo)(()=>e.formRenderProps.values.input.csv.file,[e.formRenderProps.values.input.csv]),l=(0,d.useMemo)(()=>{const t=localStorage.getItem(fh[`${e.localStorageKeyPrefix}_FORMATS`]);return t?JSON.parse(t):t},[e.localStorageKeyPrefix]),c=(0,d.useMemo)(()=>{const t=t=>e.formRenderProps.values.input.csv.formats?.[t]===a.organization?.[t]?(0,i.jsx)(xf,{css:{textTransform:"uppercase"},children:n("from_organisati_25675")}):l?.[t]===e.formRenderProps.values.input.csv.formats?.[t]&&(0,i.jsx)(xf,{css:{textTransform:"uppercase"},children:n("from_saved_22150")});return{datetime:t("datetimeFormat"),date:t("dateFormat"),timeBadge:t("timeFormat")}},[a.organization,l,e.formRenderProps.values.input.csv.formats]),u=Ti(),m=[e.ImportInputService.IMPORT_COLUMNS_DEFAULT.Id];window.location.origin===sa.HEAVENT_PUBLIC_URL.origin&&m.push(kl.IMPORT_COLUMNS_DEFAULT.TicketId);const g=Object.values(e.ImportInputService.IMPORT_COLUMNS_DEFAULT).filter(e=>!m.includes(e)),h=[[...g,...e.customFields.map(e=>e.slug.startsWith("cf")?`${e.name} [${e.slug}]`:e.name)],new Array(g.length+e.customFields.length)].map(e=>e.map(e=>{return`${t=e,t.includes(",")||t.includes('"')||t.includes("\n")||t.includes(" ")?'"'+t.replace(/"/g,'""')+'"':t}`;var t}).join(",")).join("\n"),p=`data:text/csv;charset=utf-8,${encodeURIComponent(h)}`;return s||(0,i.jsxs)($,{direction:"column",gap:"8",children:[(0,i.jsx)(JA,{css:{"& header":{borderBlockEnd:"unset",paddingBlockEnd:"unset"}},heading:n("choix_du_fichie_30517"),subtitle:[...u(n("s_lectionnez_vo_53506","{1}"),(0,i.jsx)(Oh,{css:{color:"$primary600"},download:"export-sample-file.csv",to:p,children:n("t_l_charger_un_46976")}))],children:(0,i.jsx)(yI,{...o,accept:Yf.Csv,acl:"private",organizationId:t,prefix:"input.csv.",withFileField:!0,onChange:t=>e.onChange(t,e.formRenderProps)})}),(0,i.jsxs)(JA,{heading:n("param_tres_du_f_01675"),isOpenToggleLabel:n("afficher_les_pa_96893"),subtitle:n("personnaliser_s_29361"),children:[(0,i.jsxs)(eC,{heading:n("type_de_carat_r_62356"),children:[(0,i.jsx)(ph,{hint:n("laissez_ce_cham_07837"),label:n("d_limitateur_77701"),name:"input.csv.delimiter",state:r?"disabled":void 0}),(0,i.jsx)(ph,{hint:n("leave_blank_if_02058"),label:n("caract_re_d_ch_56847"),name:"input.csv.quoteChar",state:r?"disabled":void 0}),(0,i.jsxs)(WI,{hint:n("leave_blank_if_02058"),label:n("caract_re_de_re_71491"),name:"input.csv.newline",state:r?"disabled":void 0,children:[(0,i.jsx)("option",{value:void 0,children:"Auto-detect"}),(0,i.jsx)("option",{value:"\r",children:"\\r"}),(0,i.jsx)("option",{value:"\n",children:"\\n"}),(0,i.jsx)("option",{value:"\r\n",children:"\\r\\n"})]})]}),(0,i.jsxs)(eC,{heading:n("type_de_format_68432"),children:[(0,i.jsx)(ph,{label:(0,i.jsxs)($,{align:"center",gap:"2",children:[n("format_d_heure_46798"),c.timeBadge]}),name:"input.csv.formats.timeFormat",state:r?"disabled":void 0}),(0,i.jsx)(ph,{label:(0,i.jsxs)($,{align:"center",gap:"2",children:[n("format_de_date_82059"),c.date]}),name:"input.csv.formats.dateFormat",state:r?"disabled":void 0}),(0,i.jsx)(ph,{label:(0,i.jsxs)($,{align:"center",gap:"2",children:[n("format_de_date_24474"),c.datetime]}),name:"input.csv.formats.datetimeFormat",state:r?"disabled":void 0})]})]})]})},nC=j("input",{blockSize:"fit-content",inlineSize:"fit-content"}),iC=(0,d.forwardRef)((e,t)=>(0,i.jsx)(nC,{ref:t,type:"radio",...e}));iC.displayName="Radio";const aC=({children:e,css:t,icon:n,subtext:a,...s})=>{const{inputId:o,descId:r,labelId:l}=dh(),c=(0,d.useRef)(null);return(0,i.jsx)($,{css:{bd:!0,flexGrow:"1",margin:"-1px",cursor:"pointer",'&:has( input[type="radio"]:checked)':{border:"2px solid $primary500"},...t},onClick:()=>c.current?.click(),children:(0,i.jsx)($,{css:{border:"1px solid transparent",padding:"$4",'&:has( input[type="radio"]:checked)':{border:"none"}},children:(0,i.jsxs)($,{gap:"1",children:[(0,i.jsxs)($,{direction:"column",gap:"3",children:[(0,i.jsx)($,{css:{bd:!0,border:"1px solid $gray200",inlineSize:"fit-content"},justify:"start",children:(0,i.jsx)(rf,{css:{color:"$gray800",background:"unset"},icon:n})}),(0,i.jsxs)($,{direction:"column",children:[(0,i.jsx)(uh,{htmlFor:o,id:l,children:(0,i.jsx)(N,{css:{fontSize:"$textSm",fontWeight:"$medium"},children:e})}),a&&(0,i.jsx)(N,{id:r,children:a})]}),(0,i.jsx)($,{css:{flex:"1"}})]}),(0,i.jsx)(iC,{ref:c,"aria-describedby":r,"aria-labelledby":l,id:o,...s})]})})})},sC=({name:e,value:t,...n})=>(0,i.jsx)(Gg.D0,{name:e,render:({input:e})=>(0,i.jsx)(aC,{checked:e.checked,name:e.name,value:t,onChange:e.onChange,...n,children:n.children}),type:"radio",value:t});function oC(e){const t=(0,Ql.A)(e,e=>e.category.id);return(n=(0,yr.A)(e.map(e=>e.category),e=>e.id),(0,ho.A)(n,e=>m(e.name))).map(e=>({category:e,items:(0,ho.A)(t[e.id],e=>m(e.name))}));var n}const rC=e=>{const{translate:t}=$g(),n=(0,d.useMemo)(()=>[{id:-1,name:t("default_fields_04920"),fields:Object.entries(e.defaultFields).map(([e,n])=>({name:h(t(e))?t(e):e,slug:n,id:parseInt((0,rh.A)())}))},...e.categories].map(t=>({...t,fields:(0,ho.A)(t.fields,t=>{const n=t.name.toLowerCase(),i=t.slug.toLowerCase(),a=e.column.name.toLowerCase(),s=Math.min(x(n,a),x(i,a));return s{const a=Object.values(e.defaultFields).find(e=>e===t);return a&&e.requiredFieldSlugs.includes(a)?(0,i.jsx)("strong",{children:n}):n},[e.defaultFields,e.requiredFieldSlugs]);return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(hh,{state:"disabled",value:e.column.name,onChange:()=>{}}),(0,i.jsx)(la,{icon:"arrow-right"}),(0,i.jsx)(UI,{isSearchVisible:!0,multiple:!1,name:`input.mappings.${e.column.index}`,placeholder:t("s_lectionnez_un_12007"),renderValue:a,children:n.map(t=>(0,i.jsx)("optgroup",{label:t.name,children:t.fields.map(t=>(0,i.jsx)("option",{style:{fontWeight:e.requiredFieldSlugs.includes(t.slug)?"bold":"inherit",opacity:e.values.includes(t.slug)?.5:1},value:t.slug,children:t.name},t.id))},t.id))})]})},dC=j("div",{display:"grid",gridTemplateColumns:"[column] 1fr auto [field] 1fr",gap:"$4 $5",alignItems:"center"}),lC=j("div",{color:"$gray800",gridColumn:"column",fontWeight:"$medium"}),cC=j("div",{color:"$gray800",gridColumn:"field",fontWeight:"$medium"}),uC=e=>{const{translate:t}=$g();return(0,i.jsxs)(dC,{children:[(0,i.jsx)(lC,{children:t("titres_de_vos_c_31388")}),(0,i.jsx)(cC,{children:t("champs_de_formu_64126")}),e.columns.map((t,n)=>(0,i.jsx)(rC,{categories:e.categories,column:{name:t,index:n},defaultFields:e.defaultFields,requiredFieldSlugs:e.requiredFieldSlugs,values:e.values},n))]})},mC=e=>{const{translate:t}=$g(),{alertDescriptionKey:n}=KA(),{formRenderProps:{values:{input:{mappings:a}}}}=(0,d.useContext)(Vg),s=(0,d.useMemo)(()=>Object.entries(e.defaultFields).filter(([t,n])=>e.requiredFieldSlugs.includes(n)&&!a.includes(n)).map(([e,n])=>h(t(e))?t(e):e),[e.defaultFields,e.requiredFieldSlugs,a]),o=Ti();return(0,i.jsxs)(JA,{css:{"& > header":{borderBlockEnd:"unset",paddingBlockEnd:"unset"}},gap:"5",heading:t("donn_es_de_mapp_98874"),subtitle:t("s_lectionnez_le_13978"),children:[F(s)&&(0,i.jsxs)(Kg,{alertStyle:"warning",children:[(0,i.jsx)(Qg,{children:t("required_field_46113",s.length)}),(0,i.jsx)(Xg,{children:[...o(t(n,"{1}"),(0,i.jsx)("ul",{style:{margin:"0",paddingInlineStart:"var(--space-4)"},children:s.map(e=>(0,i.jsx)("li",{children:e},e))}))]})]}),(0,i.jsx)(uC,{...e})]})};function gC(e,t=e=>e.id){return oC(e).map(({category:e,items:n})=>(0,i.jsx)("optgroup",{label:e.name,children:n.map(e=>(0,i.jsx)("option",{"data-subtext":e.label,value:t(e),children:e.name},e.id))},e.id))}const hC=/^\{user\.(.+)\}$/,pC=e=>{const{translate:t}=$g(),n=e.customFields.find(t=>t.id===e.customFieldValues.customFieldId),a=!0===e.canLinkToField&&n?.fieldType!==Le.Select,s=a&&(e.customFieldValues.fromField??(h(e.customFieldValues.value)&&hC.test(e.customFieldValues.value.trim()))),o=(0,d.useMemo)(()=>n?e.customFields.filter(e=>e.fieldType===n.fieldType&&e.id!==n.id):[],[e.customFields,n]),r=(0,d.useMemo)(()=>gC(e.customFields),[e.customFields]),l=(0,d.useMemo)(()=>gC(o,e=>`{user.${e.slug}}`),[o]),c=n&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(iv,{campaigns:[],categories:[],change:e.change,customDocuments:[],customField:n,delegationsSpaceLayouts:[],forms:[],name:`${e.field}.value`,slug:n.slug,tags:[],traces:[],value:e.customFieldValues.value}),(u=n,u.fieldType===Le.Select&&u.canSelectMultiple&&(0,i.jsx)(Ff,{name:`${e.field}.addValues`,children:t("ajouter_les_val_22996")}))]});var u;const m=t=>{t!==s&&(e.change(`${e.field}.fromField`,t),e.change(`${e.field}.value`,void 0),e.change(`${e.field}.addValues`,!1))};return(0,i.jsx)(Z_,{buttons:(0,i.jsxs)(E_,{children:[(0,i.jsx)(M_,{children:(0,i.jsx)(Ni,{children:(0,i.jsx)(pa,{color:"white",leftIcon:"trash-can",size:"sm",onClick:e.remove})})}),(0,i.jsx)(R_,{placement:"top",children:t("supprimer_43083")})]}),title:t("champ_de_formul_73221",e.index+1),children:(0,i.jsxs)($,{direction:"column",gap:"4",children:[(0,i.jsxs)(UI,{isSearchVisible:!0,label:t("CustomField"),name:`${e.field}.customFieldId`,children:[(0,i.jsx)("option",{value:"-1",children:t("s_lectionner_un_48159")}),r]}),n&&(0,i.jsxs)($,{direction:"column",gap:"1",children:[(0,i.jsx)(Ni,{font:"gray700 textSm medium",children:t("nouvelle_valeur_39039",n.name)}),a?(0,i.jsxs)($,{direction:"column",gap:"3",children:[(0,i.jsx)(uf,{state:s?"unchecked":"checked",onClick:()=>m(!1),children:t("saisir_une_nouv_92931")}),!s&&(0,i.jsx)($,{css:{paddingLeft:"$6"},direction:"column",gap:"1",children:c}),(0,i.jsx)(uf,{state:s?"checked":"unchecked",onClick:()=>m(!0),children:t("lier_un_autre_51509")}),s&&(0,i.jsx)(Ni,{css:{paddingLeft:"$6"},children:(0,i.jsx)(UI,{isSearchVisible:!0,name:`${e.field}.value`,placeholder:t("choisir_un_cham_67587"),children:l})})]}):c]})]})})},fC=e=>{const t=Ei();return(0,i.jsx)($,{direction:"column",gap:"3",children:F(e.values)?(0,i.jsxs)(i.Fragment,{children:[e.values.map((t,n)=>{const a=`${e.name}[${n}]`;return(0,i.jsx)($,{direction:"column",children:(0,i.jsx)($,{gap:"3",children:(0,i.jsx)(pC,{canLinkToField:e.canLinkToField,change:e.change,customFieldValues:e.values[n],customFields:e.customFields,field:a,index:n,remove:()=>{e.change(e.name,G(e.values,n))}})})},n)}),(0,i.jsx)(pa,{color:"invisible",css:{"::before":{content:"+",marginInlineEnd:"$1"}},onClick:()=>{e.change(e.name,e.values.concat([{customFieldId:-1,addValues:!1}]))},children:t("ajouter_un_nouv_22370")})]}):(0,i.jsx)(Ip,{align:"center",css:{background:"$gray50",textAlign:"center"},gap:"2",children:(0,i.jsxs)($,{align:"center",css:{textAlign:"center"},direction:"column",gap:"2",children:[(0,i.jsx)(N,{css:{fontWeight:"$medium"},children:t("aucun_champ_est_98607")}),(0,i.jsx)(pa,{color:"invisible",css:{inlineSize:"fit-content","::before":{content:"+",marginInlineEnd:"$1"}},onClick:()=>{e.change(e.name,e.values.concat([{customFieldId:-1,addValues:!1}]))},children:t("_lier_un_champ_52842")})]})})})},IC=({file:e,onToggle:t,...n})=>{const a=Ei();return(0,i.jsx)(JA,{heading:a("attribution_d_u_50979"),isOpen:F(n.values)??!1,isOpenToggleLabel:a("attribuer_autom_74319"),subtitle:a("d_finissez_dire_31742"),onToggle:t,children:(0,i.jsx)(eC,{heading:a("liste_des_champ_94862"),children:(0,i.jsx)(fC,{name:"input.presets",...n})})})},_C=(e,t)=>{switch(t.type){case"LOADING":return{isLoading:!0,columns:void 0,errors:void 0};case"SUCCESS":return{isLoading:!1,columns:t.columns,errors:void 0};case"ERROR":return{isLoading:!1,columns:void 0,errors:t.errors}}};function xC(e){const{translate:t}=$g(),{isLoading:n,columns:a,errors:s}=((e,t)=>{const[n,i]=(0,d.useReducer)(_C,{isLoading:!0,columns:void 0,errors:void 0});return(0,d.useEffect)(()=>{i({type:"LOADING"}),(0,Mo.parse)(e,{preview:1,...t,complete:({data:e,errors:t})=>{t.filter(e=>"UndetectableDelimiter"!==e.code).length?i({type:"ERROR",errors:t}):i({type:"SUCCESS",columns:e[0]})}})},[e]),n})(e.file,{delimiter:e.values.input.csv.delimiter??void 0,quoteChar:e.values.input.csv.quoteChar??void 0,newline:e.values.input.csv.newline??void 0}),o=(0,d.useMemo)(()=>{const t=oC(e.customFields).map(({category:e,items:t})=>({id:e.id,name:e.name,fields:t.map(e=>e.fieldType===Le.File?{...e,name:`${e.name} (URL)`}:e)}));return e.additionalCategories?t.concat(e.additionalCategories):t},[e.additionalCategories,e.customFields]);return n||s?null:(0,i.jsxs)(i.Fragment,{children:[e.additionalOptions&&(0,i.jsx)(JA,{heading:t("param_tres_d_im_18876"),children:e.additionalOptions}),(0,i.jsx)(mC,{categories:o,columns:a,defaultFields:e.defaultFields,modeSelection:e.modeSelection,requiredFieldSlugs:e.requiredFieldSlugs,values:e.values.input.mappings}),F(e.customFields)&&(0,i.jsx)(IC,{change:e.form.change,customFields:e.customFields,file:e.file,values:e.values.input.presets,onToggle:e.onToggle})]})}const yC=e=>{const{params:{organizationId:t},translate:n}=$g(),{createCard:a,upsertCard:s,updateCard:o,shouldShowModeSelection:r}=KA();return(0,i.jsxs)($,{direction:"column",gap:"8",children:[r&&(0,i.jsx)(JA,{heading:n("type_d_action_d_35533"),name:"input.mode",role:"radiogroup",subtitle:n("s_lectionnez_la_32551"),children:(0,i.jsxs)($,{gap:"4",justify:"evenly",children:[a&&(0,i.jsx)($,{css:{flex:"1"},direction:"column",children:(0,i.jsx)(sC,{icon:"user-plus",name:"input.mode",subtext:a.description,value:Ye.Create,children:a.heading})}),s&&(0,i.jsx)($,{css:{flex:"1"},direction:"column",children:(0,i.jsx)(sC,{icon:"user-pen",name:"input.mode",subtext:s.description,value:Ye.Upsert,children:s.heading})}),o&&(0,i.jsx)($,{css:{flex:"1"},direction:"column",children:(0,i.jsx)(sC,{icon:"arrows-rotate",name:"input.mode",subtext:o.description,value:Ye.Update,children:o.heading})})]})}),e.formRenderProps.values.input.csv?.file&&jC(e.formRenderProps.form)&&(0,i.jsx)(xC,{additionalCategories:e.additionalCategories,additionalOptions:e.additionalOptions,customFields:e.customFields,defaultFields:e.ImportInputService.IMPORT_COLUMNS_DEFAULT,file:e.formRenderProps.values.input.csv.file,form:e.formRenderProps.form,requiredFieldSlugs:e.ImportInputService.IMPORT_COLUMNS_REQUIRED(e.formRenderProps.values.input.mode),values:e.formRenderProps.values,onToggle:n=>{if(!e.formRenderProps.values.input.csv.file)throw new Error("No file in input!");try{n?e.formRenderProps.form.change("input.presets",JSON.parse(localStorage.getItem(fh[`${e.localStorageKeyPrefix}_PRESETS`](t))??"[]")):e.formRenderProps.form.change("input.presets",[])}catch(e){console.debug(`LocalStorage not available: ${e.toString()}`)}}}),(0,i.jsxs)(JA,{heading:n("identify_your_i_87636"),subtitle:n("by_default_you_75833"),children:[(0,i.jsx)(ph,{label:n("your_import_tag_41852"),name:"input.tag",state:"disabled"}),!e.isTagInputDisabled&&(0,i.jsx)(hh,{label:n("specify_an_impo_41868"),onChange:t=>{h(t)?e.formRenderProps.form.change("input.tag",`${e.importTagPrefix}-csv-${t}`):e.formRenderProps.form.change("input.tag",`${e.importTagPrefix}-csv-${$a.c9.now().toFormat(Ga)}`)}})]})]})},SC=e=>{const{translate:t}=$g();return(0,i.jsxs)($,{align:"center",css:{alignSelf:"center",maxInlineSize:"640px"},direction:"column",gap:"8",children:[(0,i.jsxs)($,{align:"center",direction:"column",gap:"4",children:[(0,i.jsx)($,{css:{bd:!0,border:"1px solid $gray200",inlineSize:"fit-content"},justify:"start",children:(0,i.jsx)(rf,{css:{color:"$gray800",background:"unset"},icon:"party-horn"})}),(0,i.jsxs)($,{css:{textAlign:"center"},direction:"column",gap:"1",children:[(0,i.jsx)(Zg,{children:t("l_importation_e_12369")}),(0,i.jsx)(N,{textStyle:"subtitle",children:t("_la_fin_du_pro_00757")})]})]}),(0,i.jsxs)($,{gap:"3",children:[(0,i.jsx)(pa,{onClick:()=>window.location.reload(),children:t("nouvel_import_48306")}),e.returnLink]})]})},jC=e=>!!e.getFieldState("input.csv.key")?.valid&&!!e.getFieldState("input.csv.file")?.valid,bC=e=>RegExp.escape(e).match(/(cf[0-9]+)\]$/)?.[1],vC=(e,t)=>{const n=e.find(e=>e.slug.toLowerCase()===bC(t));if(n)return n.slug;const i=e.find(e=>e.name.toLowerCase()===t.toLowerCase());return i?.slug??null},AC=(0,QA.A)(({ImportInputService:e,columns:t,customFields:n})=>{const i=Object.values(e.IMPORT_COLUMNS_DEFAULT).map(e=>e.toLowerCase()),a=Object.keys(e.IMPORT_COLUMNS_DEFAULT).map(e=>e.toLowerCase());return t.map(t=>{const s=bC(t);return s?i.includes(s)?e.IMPORT_COLUMNS_DEFAULT[Object.values(e.IMPORT_COLUMNS_DEFAULT).find(e=>e.toLowerCase()===s)]:vC(n,t):a.includes(t.toLowerCase())?e.IMPORT_COLUMNS_DEFAULT[Object.keys(e.IMPORT_COLUMNS_DEFAULT).find(e=>e.toLowerCase()===t.toLowerCase())]:vC(n,t)})}),CC=(e,t,n)=>t.formatListValues(e.IMPORT_COLUMNS_REQUIRED(n.mode).filter(e=>!n.mappings.includes(e)),"conjunction"),EC=e=>{const{params:{organizationId:t,eventId:n,delegationId:a},translate:s}=$g(),{shouldShowModeSelection:o}=KA();gg(e.heading);const r=Ci(bi),{data:l}=As({organizationId:t}),c=wi(),u=Ci(e.ImportInputService),m=(0,d.useRef)(null),[g,p]=(0,d.useState)(!1),f=(0,d.useMemo)(()=>{try{const t={dateFormat:l.organization.dateFormat,datetimeFormat:l.organization.datetimeFormat,timeFormat:l.organization.timeFormat},n=JSON.parse(c.getItem(fh[`${e.localStorageKeyPrefix}_FORMATS`])??"{}");return{...t,...n}}catch{return null}},[l.organization]),I=(0,d.useMemo)(()=>{const t=c.getItem(fh[`${e.localStorageKeyPrefix}_FORMATS`]);return t?JSON.parse(t):t},[e.localStorageKeyPrefix]),_=(0,d.useMemo)(()=>{const t=u.default(f).input;let n=t.mode;if(o)try{n=c.getItem(fh[`${e.localStorageKeyPrefix}_MODE`])??Ye.Upsert}catch(e){console.debug(`LocalStorage not available: ${e.toString()}`)}return{input:{...t,mode:n,tag:`${e.importTagPrefix}-csv-${$a.c9.now().toFormat(Ga)}`}}},[u,f,o,e.localStorageKeyPrefix,e.importTagPrefix]),x=Ci(zo),y=(0,d.useCallback)((n,i)=>{(0,Mo.parse)(n,{delimiter:i.values.input.csv.delimiter,preview:1,newline:i.values.input.csv.newline,quoteChar:i.values.input.csv.quoteChar,complete:({data:t,errors:n})=>{let a;if(!n.length||1===n.length&&"UndetectableDelimiter"===n[0].code){const n=t[0],s=AC({ImportInputService:e.ImportInputService,columns:n,customFields:e.customFields});try{a=JSON.parse(c.getItem(fh[`${e.localStorageKeyPrefix}_MAPPINGS`])??"{}")}catch(e){console.debug(`LocalStorage not available: ${e.toString()}`)}i.form.change("input.mappings",n.map((e,t)=>void 0!==a[e]?a[e]:s[t])),e.skipMappingIfAllColumnsMatch&&n.every(e=>s.includes(e))&&p(!0)}}});try{i.form.change("input.presets",JSON.parse(c.getItem(fh[`${e.localStorageKeyPrefix}_PRESETS`](t))??"[]"))}catch(e){console.debug(`LocalStorage not available: ${e.toString()}`)}},[e.customFields]);return(0,i.jsx)(Ks.Provider,{value:{designSystem:Zs},children:(0,i.jsx)(rI,{category:s("nouvel_import_48306"),color:"dark",fallbackClosePath:e.closePath,heading:e.heading,children:(0,i.jsx)(dv,{ref:m,children:(0,i.jsxs)(gv,{containerRef:m,initialValues:_,isEdit:!1,summaryStep:(0,i.jsx)(SC,{returnLink:e.returnLink}),onSubmit:async({input:i})=>{if(!((e,t)=>e.IMPORT_COLUMNS_REQUIRED(t.mode).every(e=>t.mappings.includes(e)))(e.ImportInputService,i))return{[vu.Ym]:s("you_have_not_ma_46806",CC(e.ImportInputService,r,i))};(n=>{const i=n.csv.file;if(!i)throw new Error("No file in input!");(0,Mo.parse)(i,{delimiter:n.csv.delimiter,preview:1,newline:n.csv.newline,quoteChar:n.csv.quoteChar,complete:({data:t,errors:i})=>{if(!i.length)try{const i=t[0],a=AC({ImportInputService:e.ImportInputService,columns:i,customFields:e.customFields}),s=JSON.parse(c.getItem(fh[`${e.localStorageKeyPrefix}_MAPPINGS`])??"{}"),o={};for(const[e,t]of n.mappings.entries()){const n=i[e];t?o[n]=t:delete s[n],h(a[e])&&!o[n]&&(o[n]=null)}c.setItem(fh[`${e.localStorageKeyPrefix}_MAPPINGS`],JSON.stringify({...s,...o}))}catch(e){console.debug(`LocalStorage not available: ${e.toString()}`)}}});try{const i=JSON.parse(c.getItem(fh[`${e.localStorageKeyPrefix}_PRESETS`](t))??"[]");c.setItem(fh[`${e.localStorageKeyPrefix}_PRESETS`](t),JSON.stringify([...new Map([...i,...n.presets].map(e=>[e.customFieldId,e])).values()])),c.setItem(fh[`${e.localStorageKeyPrefix}_FORMATS`],JSON.stringify(n.csv.formats?Object.fromEntries(Object.entries(n.csv.formats).filter(([e,t])=>h(t))):{})),o&&c.setItem(fh[`${e.localStorageKeyPrefix}_MODE`],n.mode)}catch(e){console.debug(`LocalStorage not available: ${e.toString()}`)}})(i);const d=(e=>{const t={...e.csv};return delete t.file,{...e,csv:t}})(i);try{const{jobId:i}=await e.mutate({organizationId:t,eventId:n,delegationId:a,input:d});e.checkImport(i,t,n)}catch{}},children:[(0,i.jsx)(mv,{actions:t=>(0,i.jsxs)($,{gap:"3",children:[(0,i.jsx)(pa,{disabled:!jC(t.form),onClick:t.handleSubmit,children:s("suivant_donn_08625")}),I&&(0,i.jsx)(pa,{color:"invisible-gray",onClick:()=>{c.removeItem(fh[`${e.localStorageKeyPrefix}_FORMATS`]),window.location.reload()},children:s("clear_saved_set_61259")})]}),heading:s("choix_du_fichie_30517"),render:t=>(0,i.jsx)(tC,{ImportInputService:e.ImportInputService,customFields:e.customFields,formRenderProps:t,localStorageKeyPrefix:e.localStorageKeyPrefix,onChange:y}),schema:x.settingsStepSchema()}),!g&&(0,i.jsx)(mv,{actions:e=>(0,i.jsx)(pa,{type:"submit",onClick:e.handleSubmit,children:s("importer_90688")}),heading:s("donn_es_impor_12371"),render:t=>(0,i.jsx)(yC,{ImportInputService:e.ImportInputService,additionalCategories:e.additionalCategories,additionalOptions:e.additionalOptions,customFields:e.customFields,formRenderProps:t,importTagPrefix:e.importTagPrefix,isTagInputDisabled:e.isTagInputDisabled,localStorageKeyPrefix:e.localStorageKeyPrefix}),schema:u.mappingStepSchema()})]})})})})},TC=()=>{const{params:{organizationId:e,eventId:t,delegationId:n},translate:a}=$g(),s=Ci(pd),{data:o,loader:r}=Ri("query DelegationImportInfos($organizationId: OrganizationId!, $delegationId: DelegationId!) {\n organization: organizationPublic(id: $organizationId) {\n delegation(id: $delegationId) {\n form {\n elements {\n elementType\n customField {\n ...CustomFieldImport\n }\n }\n }\n\n accreditationsProfiles {\n accreditationProfile {\n ...AccreditationProfileImport\n }\n }\n\n accreditationsSlots(onlyVisible: true) {\n accreditationSlot {\n id\n name\n date\n isBlocked\n accreditation {\n id\n name\n }\n }\n }\n }\n }\n}\n",{organizationId:e,delegationId:n},[La.CustomFieldImportFragment,La.AccreditationProfileImportFragment]),{mutate:l}=function(e={}){return Mi("mutation VolunteersImport(\n $eventId: EventId\n $organizationId: OrganizationId!\n $delegationId: DelegationId\n $input: MappableImportInput!\n) {\n jobId: volunteersImport(\n eventId: $eventId\n organizationId: $organizationId\n delegationId: $delegationId\n input: $input\n )\n}\n",e)}(),{checkVolunteersImport:c}=(0,d.useContext)(eo),u=(0,d.useCallback)((e,t,i)=>c(e,t,i,n),[c,n]),m=(0,d.useMemo)(()=>{const e=new Map;return(0,ho.A)((o.organization?.delegation.accreditationsSlots??[]).filter(e=>!e.accreditationSlot.isBlocked),e=>e.accreditationSlot.date?.toMillis()??0).forEach(({accreditationSlot:{accreditation:t,id:n,name:i,date:a}})=>{const s={id:n,name:i,date:a},o=e.get(t.id);o?o.slots.push(s):e.set(t.id,{...t,slots:[s]})}),((e,t)=>t.map(t=>({id:t.id,name:t.name,fields:t.slots.map(n=>({id:n.id,slug:`accreditation_slot_${n.id}`,name:uu(e,n,t.name,{accreditation:{includeNameAtEnd:!0}})}))})))(s,[...e.values()]).concat((t=(o.organization?.delegation.accreditationsProfiles??[]).map(e=>e.accreditationProfile),Object.values((0,Ql.A)(t,e=>e.accreditationProfileCategory.id)).map(e=>({id:e[0].accreditationProfileCategory.id,name:e[0].accreditationProfileCategory.name,fields:e.map(e=>({id:e.id,slug:`accreditation_profile_${e.id}`,name:e.name}))}))));var t},[o.organization,s]),g=(0,d.useMemo)(()=>(o.organization?.delegation.form.elements??[]).flatMap(e=>e.elementType===Be.Field?[e.customField]:[]),[o.organization]);return r||(0,i.jsx)(ZA,{alertDescriptionKey:"to_add_a_member_56912",children:(0,i.jsx)(EC,{ImportInputService:kl,additionalCategories:m,checkImport:u,closePath:Yc.DELEGATION_MEMBERS({organizationId:e,eventId:t,delegationId:n}),customFields:g,heading:a("import_de_membr_48618"),importTagPrefix:`delegation-${n}`,isTagInputDisabled:!0,localStorageKeyPrefix:"DELEGATION_MEMBERS_IMPORT",mutate:l,returnLink:(0,i.jsx)(Oh,{to:Yc.DELEGATION({organizationId:e,eventId:t,delegationId:n}),children:a("revenir_aux_d_l_04236")}),skipMappingIfAllColumnsMatch:!0})})},RC=e=>(0,i.jsx)(uv,{disabled:e.disabled,heading:e.heading,hideHeader:e.hideHeader,children:(0,i.jsx)($,{direction:"column",children:e.children})}),MC=e=>{const{translate:t}=$g();return(0,i.jsx)(RC,{heading:(0,i.jsxs)($,{justify:"between",width:1,css:{display:"flex !important"},children:[(0,i.jsx)(Ni,{children:t("invit_n_1_57041",e.index+1)}),e.showRemove&&(0,i.jsx)(pa,{color:"white",leftIcon:"trash-can",size:"sm",onClick:e.onRemove})]}),children:(0,i.jsxs)($,{direction:"column",gap:"4",width:1,children:[(0,i.jsx)(ph,{isEmail:!0,label:t("Email"),name:`${e.prefix}email`}),(0,i.jsxs)($,{gap:"4",children:[(0,i.jsx)(ph,{label:(0,i.jsx)(Df,{children:t("pr_nom_66988")}),name:`${e.prefix}fields.firstName`}),(0,i.jsx)(ph,{label:(0,i.jsx)(Df,{children:t("last_name")}),name:`${e.prefix}fields.lastName`})]})]})})},DC=()=>{const{history:e,translate:t,params:{organizationId:n,eventId:a,delegationId:s}}=$g(),o=Ci(xr),{mutate:r}=function(e={}){return Mi("mutation DelegationFormInvite(\n $organizationId: OrganizationId!\n $eventId: EventId\n $delegationId: DelegationId!\n $usersInfos: [UsersInfoEmailInput!]!\n) {\n delegationFormInvite(\n organizationId: $organizationId\n eventId: $eventId\n delegationId: $delegationId\n usersInfos: $usersInfos\n )\n}\n",e)}(),d=()=>{e.goBack(Yc.DELEGATION_DASHBOARD({organizationId:n,eventId:a,delegationId:s}))};return(0,i.jsxs)($,{direction:"column",gap:"7",children:[(0,i.jsx)(pa,{color:"invisible",leftIcon:"arrow-left",onClick:d,children:t("retour_92202")}),(0,i.jsx)(Ni,{font:"gray800 textLg bold",children:t("envoyer_le_lien_38138")}),(0,i.jsx)(ah,{direction:"column",gap:"6",hideDefaultErrors:!0,initialValues:o.delegationFormInviteValuesDefault(),render:({handleSubmit:e,submitting:n})=>(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(th,{hideSpacer:!0}),(0,i.jsx)(H_.ED,{name:"usersInfos",children:({fields:e})=>(0,i.jsxs)(i.Fragment,{children:[e.map((t,n)=>(0,i.jsx)(MC,{index:n,prefix:`${t}.`,showRemove:(e?.length??0)>1,onRemove:()=>e.remove(n)},n)),(0,i.jsx)(pa,{color:"invisible",leftIcon:"plus",onClick:()=>{e.push({email:"",fields:{firstName:"",lastName:""}})},children:t("ajouter_un_invi_90855")})]})}),(0,i.jsx)($,{children:(0,i.jsx)(pa,{isLoading:n,onClick:e,children:t("envoyer_le_lien_38138")})})]}),schema:o.delegationFormInviteValuesSchema(),onSubmit:async e=>{await r({organizationId:n,eventId:a,delegationId:s,usersInfos:e.usersInfos}),d()}})]})},OC=e=>{const{translate:t,params:{organizationId:n,eventId:a}}=$g(),s=Ci(bu),o=(0,d.useMemo)(()=>h(e.form.description)?s.renderText(e.form.description,{event:e.event,organization:e.organization}):"",[e.event,e.form.description,e.organization]),r=(0,d.useMemo)(()=>a&&e.form.slotDisplay!==At.Hide,[e.form,a]),l=(0,d.useMemo)(()=>a&&e.form.positionDisplay!==bt.None,[e.form,a]),c=(0,d.useMemo)(()=>a&&(e.form.accreditationDisplay!==St.None||F(e.delegationAccreditationsSlots)||F(e.delegationAccreditationsProfiles)),[e.delegationAccreditationsProfiles,e.delegationAccreditationsSlots,e.form,a]),u=(0,d.useMemo)(()=>e.userInfo?.volunteerRegistration?.accreditationsUsersInfos.flatMap(e=>e.checkInAt?.isValid?[e.accreditationSlotId]:[])??[],[e.userInfo]),m=function(e,t=300){const[n,i]=(0,d.useState)(e),a=rS(i,t);return(0,d.useEffect)(()=>{a(e)},[e]),n}(e.values.formRegister.userInfo.fields);return(0,i.jsxs)(i.Fragment,{children:[e.showEmail&&(0,i.jsxs)(RC,{hideHeader:!0,children:[h(o)&&(0,i.jsx)(yp,{text:o}),(0,i.jsx)(ph,{isEmail:!0,label:t("Email"),name:"email"})]}),(0,i.jsx)(RC,{heading:h(e.form.informationTitle)?e.form.informationTitle:t("informations_pe_37892"),children:e.disabled?(0,i.jsx)(ab,{form:e.form,userInfo:e.userInfo}):(0,i.jsx)(h_,{asoBannersColors:e.asoBannersColors,change:e.change,elements:e.form.elements,organizationId:n,prefix:"formRegister.userInfo.fields.",values:e.values.formRegister.userInfo.fields})}),r&&e.event&&(0,i.jsxs)(RC,{heading:h(e.form.slotTitle)?e.form.slotTitle:t("disponibilit_s_49923"),children:[h(e.form.slotSubtitle)&&(0,i.jsx)(yp,{text:e.form.slotSubtitle}),e.areSectionsDisabled?.isWishedAssignmentsDisabled?(0,i.jsxs)(Kg,{alertStyle:"warning",children:[(0,i.jsx)(Qg,{children:t("no_longer_modif_99663")}),(0,i.jsx)(Xg,{children:t("you_are_already_assigned_to_missions")})]}):(0,i.jsx)(X_,{blockedSlots:e.blockedSlots,change:e.change,currentSlots:e.values.formRegister.slots,customSlotsPeriods:e.form.customSlotsPeriods,daysDisplay:e.form.daysDisplay,elements:e.form.elements,event:e.event,prefix:"formRegister.",slotDisplay:e.form.slotDisplay,userInfoFields:m})]}),l&&e.event&&(0,i.jsxs)(RC,{heading:h(e.form.positionTitle)?e.form.positionTitle:t("missions_souhai_23225"),children:[h(e.form.positionSubtitle)&&(0,i.jsx)(yp,{text:e.form.positionSubtitle}),e.areSectionsDisabled?.isWishedAssignmentsDisabled?(0,i.jsxs)(Kg,{alertStyle:"warning",children:[(0,i.jsx)(Qg,{children:t("no_longer_modif_99663")}),(0,i.jsx)(Xg,{children:t("you_are_already_assigned_to_missions")})]}):(0,i.jsx)($_,{change:e.change,event:e.event,options:e.form,positionsCategoriesIds:e.values.formRegister.positionsCategoriesIds,positionsIds:e.values.formRegister.positionsIds,positionsSlotsIds:e.values.formRegister.positionsSlotsIds,prefix:"formRegister.",slots:e.values.formRegister.slots,userInfoFields:m})]}),c&&e.event&&(0,i.jsx)(i.Fragment,{children:(0,i.jsxs)(RC,{heading:h(e.form.accreditationTitle)?e.form.accreditationTitle:t("accr_ditations_74375"),children:[h(e.form.accreditationSubtitle)&&(0,i.jsx)(yp,{text:e.form.accreditationSubtitle}),e.areSectionsDisabled?.isWishedAccreditationsDisabled?(0,i.jsxs)(Kg,{alertStyle:"warning",children:[(0,i.jsx)(Qg,{children:t("no_longer_modif_99663")}),(0,i.jsx)(Xg,{children:t("you_are_already_assigned_to_accreditations")})]}):(0,i.jsx)(c_,{accreditationProfileId:e.values.formRegister.accreditationProfileId,accreditationsSlotsIds:e.values.formRegister.accreditationsSlotsIds,alreadyAssignedProfileId:e.alreadyAssignedProfileId,alreadyAssignedSlotsIds:e.alreadyAssignedSlotsIds,change:e.change,delegationAccreditationsProfiles:e.delegationAccreditationsProfiles??L,delegationAccreditationsSlots:e.delegationAccreditationsSlots??L,displayFormCustomFields:!0,event:e.event,options:e.form,prefix:"formRegister.",scannedSlotsIds:u,showAutoAccredit:e.showAutoAccredit,slots:e.values.formRegister.slots,userInfosFields:m})]})})]})},wC=e=>{const{params:{delegationId:t},translate:n}=$g(),a=Ci(Au),s=Ci(Ud),o=(0,d.useRef)(null),r=e.form,l=(0,d.useMemo)(()=>r.elements.filter(e=>e.elementType===Be.Field),[r.elements]),c=(0,d.useMemo)(()=>s.formRegisterSchema(l,{...r,eventStartDate:e.event?.startAt??$a.c9.now(),eventEndDate:e.event?.endAt??$a.c9.now(),delegationId:t,delegationAccreditationsProfiles:e.delegationAccreditationsProfiles||[],areSectionsDisabled:e.areSectionsDisabled}),[t,l,r,e.areSectionsDisabled,e.delegationAccreditationsProfiles,e.event]),u=(0,d.useCallback)(e=>a.validateForForm(c)(e),[c]);return(0,i.jsxs)($,{ref:o,direction:"column",gap:"7",children:[(0,i.jsx)(pa,{color:"invisible",leftIcon:"arrow-left",onClick:e.handleRedirect,children:n("retour_92202")}),e.header,(0,i.jsx)(ah,{customErrorRef:o,direction:"column",gap:"6",initialValues:e.initialValues,render:({form:{change:t},submitting:a,values:s,handleSubmit:o})=>(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(th,{featureFlags:e.featureFlags,hideSpacer:!0}),(0,i.jsx)(OC,{alreadyAssignedProfileId:e.alreadyAssignedProfileId,alreadyAssignedSlotsIds:e.alreadyAssignedSlotsIds,areSectionsDisabled:e.areSectionsDisabled,asoBannersColors:e.asoBannersColors,blockedSlots:e.blockedSlots,change:t,delegationAccreditationsProfiles:e.delegationAccreditationsProfiles,delegationAccreditationsSlots:e.delegationAccreditationsSlots,disabled:e.disabled,event:e.event,form:e.form,organization:e.organization,showAutoAccredit:!1,showEmail:e.showEmail,userInfo:e.userInfo,values:s}),(0,i.jsxs)($,{gap:"4",children:[(0,i.jsx)(pa,{isLoading:a,onClick:o,children:e.isUpdate?n("enregistrer_06519"):n("cr_er_le_membre_78743")}),(0,i.jsx)(pa,{color:"white",onClick:e.handleRedirect,children:n("annuler_48254")})]})]}),validate:u,width:1,onSubmit:async t=>{await e.mutate(t.email,t.formRegister),e.reload(),e.handleRedirect()}})]})},PC=e=>{const{params:{organizationId:t,delegationId:n},translate:a}=$g(),s=Ci(Ud),{mutate:o}=Rs(),r=(0,d.useMemo)(()=>({email:"",formRegister:s.formRegisterInputDefault(Ve.DelegationsSpace,null,e.customFields,{countryCode:e.country,delegationAccreditationsSlots:e.delegationAccreditationsSlots,eventStartDate:e.event?.startAt,forOther:!0,sendNotificationEmail:!1,slotDisplay:e.form.slotDisplay,team:null})}),[e.customFields]),l=(0,d.useCallback)((i,a)=>o({organizationId:t,eventId:e.eventId,delegationId:n,formId:e.form.id,email:i,formRegister:a}),[]);return(0,i.jsx)(wC,{alreadyAssignedProfileId:null,alreadyAssignedSlotsIds:L,asoBannersColors:e.asoBannersColors,delegationAccreditationsProfiles:e.delegationAccreditationsProfiles,delegationAccreditationsSlots:e.delegationAccreditationsSlots,event:e.event,form:e.form,handleRedirect:e.handleRedirect,header:(0,i.jsx)(Ni,{font:"gray800 textLg bold",children:a("cr_ation_d_un_m_98624")}),initialValues:r,isUpdate:!1,mutate:l,organization:e.organization,reload:e.reload,showEmail:e.showEmail})},$C=e=>{const{params:{organizationId:t,eventId:n,delegationId:a,formId:s,userInfoId:o},translate:r}=$g(),l=Ci(Ud),{mutate:c}=Os(),{mutate:u}=function(e={}){return Mi("mutation UserInfoUpdate(\n $organizationId: OrganizationId!\n $eventId: EventId\n $delegationId: DelegationId\n $userId: UserId!\n $userInfo: UsersInfoInput!\n $filledFormsIds: [FormId!]\n $memberSpaceFormId: FormId\n $formKeyToTeamCode: JSON\n) {\n userInfoUpdate(\n organizationId: $organizationId\n eventId: $eventId\n delegationId: $delegationId\n userId: $userId\n userInfo: $userInfo\n filledFormsIds: $filledFormsIds\n formKeyToTeamCode: $formKeyToTeamCode\n memberSpaceFormId: $memberSpaceFormId\n ) {\n id\n }\n}\n",e)}(),{mutate:m}=function(e={}){return Mi("mutation UserInfoSlotsUpdate(\n $eventId: EventId!\n $userId: UserId\n $delegationId: DelegationId\n $userInfoId: UsersInfoId!\n $userInfoSlots: [UserInfoSlotsInput!]!\n) {\n userInfoSlotsUpdate(\n eventId: $eventId\n userId: $userId\n delegationId: $delegationId\n userInfoId: $userInfoId\n userInfoSlots: $userInfoSlots\n )\n}\n",e)}(),{mutate:g}=function(e={}){return Mi("mutation UserInfoPositionsUpdate(\n $eventId: EventId!\n $userId: UserId\n $delegationId: DelegationId\n $userInfoId: UsersInfoId!\n $userInfoPositions: [UserInfoPositionsInput!]!\n) {\n userInfoPositionsUpdate(\n eventId: $eventId\n userId: $userId\n delegationId: $delegationId\n userInfoId: $userInfoId\n userInfoPositions: $userInfoPositions\n )\n}\n",e)}(),{mutate:h}=function(e={}){return Mi("mutation UserInfoAccreditationsUpdate(\n $eventId: EventId!\n $userId: UserId\n $delegationId: DelegationId\n $userInfoId: UsersInfoId!\n $userInfoAccreditations: [UserInfoAccreditationsInput!]!\n) {\n userInfoAccreditationsUpdate(\n eventId: $eventId\n userId: $userId\n delegationId: $delegationId\n userInfoId: $userInfoId\n userInfoAccreditations: $userInfoAccreditations\n )\n}\n",e)}(),p=(0,d.useMemo)(()=>{const t=(e.form.elements??[]).flatMap(e=>e.elementType===Be.Field?[e.customField]:[]),n=(e.event?.accreditationsCategories??[]).flatMap(e=>e.accreditations.flatMap(e=>e.formCustomFields.map(({customField:e})=>e)));return t.concat(n)},[e.form,e.event]),f=(0,d.useMemo)(()=>({email:e.userInfo.email,formRegister:{...l.formRegisterInputDefault(Ve.DelegationsSpace,e.userInfo,p,{countryCode:e.country,eventStartDate:e.event?.startAt,forOther:!0,sendNotificationEmail:!1,slotDisplay:e.form.slotDisplay,team:null}),positionsSlotsIds:e.userInfo.formUserInfo.positionsSlotsIds,positionsIds:e.userInfo.formUserInfo.positionsIds,positionsCategoriesIds:e.userInfo.formUserInfo.positionsCategoriesIds,accreditationProfileId:e.userInfo.formUserInfo.accreditationProfileId,accreditationsSlotsIds:e.userInfo.formUserInfo.accreditationsSlotsIds.concat(e.delegationAccreditationsSlots?.filter(e=>e.isDefault).map(e=>e.accreditationSlotId)??[]),slots:e.userInfo.formUserInfo.slots.map(e=>({startDate:e.startDate,startTime:e.startTime,endDate:e.endDate,endTime:e.endTime}))}}),[e.userInfo,e.country,e.form,e.event,p]),I=(0,d.useCallback)(async(i,r)=>(i!==e.userInfo.email&&await c({organizationId:t,eventId:n,delegationId:a,userInfoId:o,email:i}),e.disabled||await u({organizationId:t,eventId:n,delegationId:a,userId:e.userInfo.userId,userInfo:r.userInfo}),n&&e.form.slotDisplay!==At.Hide&&await m({eventId:n,delegationId:a,userId:e.userInfo.userId,userInfoId:o,userInfoSlots:[{formId:s,slots:r.slots}]}),n&&e.form.positionDisplay!==bt.None&&await g({eventId:n,delegationId:a,userId:e.userInfo.userId,userInfoId:o,userInfoPositions:[{formId:s,positionsCategoriesIds:r.positionsCategoriesIds,positionsIds:r.positionsIds,positionsSlotsIds:r.positionsSlotsIds}]}),n&&await h({eventId:n,delegationId:a,userId:e.userInfo.userId,userInfoId:o,userInfoAccreditations:[{formId:s,accreditationProfileId:r.accreditationProfileId,accreditationsSlotsIds:r.accreditationsSlotsIds}]}),!0),[e.userInfo,e.form]);return(0,i.jsx)(wC,{alreadyAssignedProfileId:e.userInfo.formUserInfo.accreditationProfileId,alreadyAssignedSlotsIds:e.userInfo.formUserInfo.accreditationsSlotsIds,areSectionsDisabled:e.areSectionsDisabled,asoBannersColors:e.asoBannersColors,blockedSlots:e.blockedSlots,delegationAccreditationsProfiles:e.delegationAccreditationsProfiles,delegationAccreditationsSlots:e.delegationAccreditationsSlots,disabled:e.disabled,event:e.event,featureFlags:e.featureFlags,form:e.form,handleRedirect:e.handleRedirect,header:(0,i.jsx)(RC,{hideHeader:!0,children:(0,i.jsxs)($,{align:"center",gap:"3",children:[(0,i.jsx)(Fp,{email:e.userInfo.email,image:e.userInfo.picture?.url,name:e.userInfo.name,size:64}),(0,i.jsxs)($,{direction:"column",gap:"1",children:[(0,i.jsx)(Ni,{font:"gray500 textXs medium",children:r("mise_jour_des_00596")}),(0,i.jsx)(Ni,{font:"gray800 textXl bold",children:e.userInfo.name})]})]})}),initialValues:f,isUpdate:!0,mutate:I,organization:e.organization,reload:e.reload,showEmail:e.showEmail,userInfo:e.userInfo})},kC=e=>{const{history:t,params:{organizationId:n,eventId:a,delegationId:s,formId:o}}=$g(),{data:r,loader:l}=Ri("query DelegationsSpaceCreateMember(\n $organizationId: OrganizationId!\n $eventId: EventId\n $delegationId: DelegationId!\n $formId: FormId!\n) {\n organization(id: $organizationId) {\n id\n name\n dateFormat\n datetimeFormat\n\n ...OrganizationDelegationsSpace\n\n delegation(id: $delegationId) {\n eventId\n\n delegationCategory {\n banners(excludeFull: true) {\n bannerType\n }\n }\n\n accreditationsProfiles {\n ...DelegationAccreditationProfile\n }\n\n accreditationsSlots(onlyVisible: true) {\n ...DelegationAccreditationSlot\n }\n\n form {\n ...CreateUpdateMemberForm\n }\n }\n\n event: eventMaybe(id: $eventId) {\n ...EventCreateUpdateMember\n }\n }\n}\n",{organizationId:n,eventId:a,delegationId:s,formId:o},[La.OrganizationDelegationsSpaceFragment,La.DelegationAccreditationProfileFragment,La.DelegationAccreditationSlotFragment,La.CreateUpdateMemberFormFragment,La.EventCreateUpdateMemberFragment]),c=(0,d.useMemo)(()=>(r.organization?.delegation.form.elements??[]).flatMap(e=>e.elementType===Be.Field?[e.customField]:[]),[r.organization]),u=(0,d.useMemo)(()=>(r.organization?.delegation.delegationCategory.banners??[]).flatMap(e=>"number"==typeof e.bannerType?[e.bannerType]:[]),[r.organization]);return l||(0,i.jsx)(PC,{asoBannersColors:u,country:r.organization.event?.country,customFields:c,delegationAccreditationsProfiles:r.organization.delegation.accreditationsProfiles,delegationAccreditationsSlots:r.organization.delegation.accreditationsSlots,event:r.organization.event,eventId:r.organization.delegation.eventId,form:r.organization.delegation.form,organization:r.organization,handleRedirect:()=>t.goBack(Yc.DELEGATION({organizationId:n,eventId:a,delegationId:s})),reload:e.reload,showEmail:!0})},NC=e=>{const{history:t,params:{organizationId:n,eventId:a,delegationId:s,formId:o,userInfoId:r}}=$g(),{data:l,loader:c}=Ri("query DelegationsSpaceUpdateMember(\n $organizationId: OrganizationId!\n $eventId: EventId\n $delegationId: DelegationId!\n $formId: FormId!\n $userInfoId: UsersInfoId!\n) {\n organization(id: $organizationId) {\n id\n name\n dateFormat\n datetimeFormat\n\n ...OrganizationDelegationsSpace\n country\n\n delegation(id: $delegationId) {\n eventId\n\n delegationCategory {\n banners(excludeFull: true) {\n bannerType\n }\n }\n\n accreditationsProfiles {\n ...DelegationAccreditationProfile\n }\n\n accreditationsSlots(onlyVisible: true) {\n ...DelegationAccreditationSlot\n }\n\n form {\n ...CreateUpdateMemberForm\n }\n }\n\n event: eventMaybe(id: $eventId) {\n ...EventCreateUpdateMember\n }\n\n userInfo(id: $userInfoId) {\n ...UserInfoUpdateMember\n }\n }\n}\n",{organizationId:n,eventId:a,delegationId:s,formId:o,userInfoId:r},[La.OrganizationDelegationsSpaceFragment,La.DelegationAccreditationProfileFragment,La.DelegationAccreditationSlotFragment,La.CreateUpdateMemberFormFragment,La.EventCreateUpdateMemberFragment,La.UserInfoUpdateMemberFragment]),u=(0,d.useMemo)(()=>(l.organization?.delegation.delegationCategory.banners??[]).flatMap(e=>"number"==typeof e.bannerType?[e.bannerType]:[]),[l.organization]);return c||(0,i.jsx)($C,{asoBannersColors:u,country:l.organization.event?.country??l.organization.country,delegationAccreditationsProfiles:l.organization.delegation.accreditationsProfiles,delegationAccreditationsSlots:l.organization.delegation.accreditationsSlots,event:l.organization.event,form:l.organization.delegation.form,organization:l.organization,handleRedirect:()=>t.goBack(Yc.DELEGATION({organizationId:n,eventId:a,delegationId:s})),reload:e.reload,showEmail:!0,userInfo:l.organization.userInfo})},LC=({inputName:e})=>{const t=Ei(),n=HI();return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)($,{css:{gap:"$6","@tablet":{gap:"$4","> *":{flexGrow:1,width:"auto"}}},wrap:"wrap",children:[(0,i.jsx)(ph,{autoComplete:"given-name",label:t("pr_nom_66988"),name:`${e}fields.firstName`}),(0,i.jsx)(ph,{autoComplete:"family-name",label:t("last_name"),name:`${e}fields.lastName`})]}),(0,i.jsx)(Wg,{height:"6"}),(0,i.jsx)(ph,{autoComplete:"email",isEmail:!0,label:t("e_mail_13869"),name:`${e}email`}),(0,i.jsx)(Wg,{height:"6"}),(0,i.jsx)(WI,{autoComplete:"language",label:t("Language"),name:`${e}fields.language`,children:n(nd)}),(0,i.jsx)(Wg,{height:"6"}),(0,i.jsx)(RI,{label:t("Phone"),prefix:`${e}fields.phone.`})]})},zC=()=>{const{history:e,translate:t,params:{organizationId:n,eventId:a,delegationId:s}}=$g(),{data:o,loader:r}=Ri("query Profile($organizationId: OrganizationId!) {\n user {\n email\n language\n\n userInfo(organizationId: $organizationId) {\n id\n fields\n }\n }\n}\n",{organizationId:n},[]),d=Ci(Ld),l=Ci(Au),{mutate:c,isLoading:u}=function(e={}){return Mi("mutation UserProfileUpdate(\n $userId: UserId!\n $userInfoId: UsersInfoId!\n $userInfo: UsersInfoEmailInput!\n) {\n userProfileUpdate(userId: $userId, userInfoId: $userInfoId, userInfo: $userInfo) {\n email\n language\n }\n}\n",e)}(),{user:m}=io(),g=Yc.DELEGATION({organizationId:n,eventId:a,delegationId:s}),h=(t=!1)=>t?e.goBack(g):e.push(g);return r||(0,i.jsx)(ah,{direction:"column",height:1,initialValues:{userInfo:d.userInfoProfileInputDefault(o.user)},render:({handleSubmit:e})=>(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(pa,{color:"invisible",leftIcon:"arrow-left",onClick:()=>h(!0),children:t("retour_92202")}),(0,i.jsx)(Wg,{height:"4"}),(0,i.jsx)(Ni,{font:"gray800 textLg bold",children:t("mise_jour_du_49930")}),(0,i.jsx)(Wg,{height:"6"}),(0,i.jsx)(th,{}),(0,i.jsx)(yI,{accept:Yf.Images,acl:"public-read",allowCrop:!0,label:t("photo_de_profil_08618"),organizationId:n,prefix:"userInfo.fields.picture."}),(0,i.jsx)(Wg,{height:"6"}),(0,i.jsx)(LC,{inputName:"userInfo."}),(0,i.jsx)(Wg,{height:"6"}),(0,i.jsxs)($,{gap:"4",children:[(0,i.jsx)(pa,{isLoading:u,onClick:e,children:t("enregistrer_les_30411")}),(0,i.jsx)(pa,{color:"white",onClick:()=>h(!0),children:t("annuler_48254")})]})]}),validate:l.validateForForm(d.updateProfileSchema()),width:1,onSubmit:async e=>{const{userProfileUpdate:{email:t,language:n}}=await c({userId:m.id,userInfoId:o.user.userInfo.id,userInfo:e.userInfo});m.email!==t||m.language!==n?hs():h()}})},FC=()=>{const{params:{organizationId:e,eventId:t,delegationId:n}}=$g(),{data:a,loader:s,reload:o}=Ri('query DelegationsSpaceDelegation(\n $delegationId: DelegationId!\n $organizationId: OrganizationId!\n $eventId: EventId\n) {\n organization(id: $organizationId) {\n ...OrganizationDelegationsSpace\n\n event: eventMaybe(id: $eventId) {\n defaultDelegationsSpaceLayout {\n tabs {\n ...DelegationsSpaceLayoutTab\n }\n }\n\n delegationsSpaceDesign: spaceDesign(spaceType: DelegationSpace) {\n ...DesignColors\n\n logo {\n url\n }\n\n banner {\n url\n }\n }\n }\n\n delegations(level: Both, onlyVisibleInDelegation: true) {\n nodes {\n id\n name\n\n event {\n id\n name\n }\n }\n }\n\n delegation(id: $delegationId) {\n eventId\n formId\n parentId\n numberOfDelegationsAccreditationsSlots\n numberOfResources\n name\n columns\n state\n canLeadersAddMembers\n canLeadersEditMembers\n canLeadersDeleteMembers\n canLeadersDuplicateMembers\n canLeadersEditColumns\n canLeadersImportMembers\n canLeadersSeeHiddenAccreditationsSlots\n\n campaigns {\n id\n name\n }\n\n customDocuments {\n slug\n name\n }\n\n delegationsSpaceLayout {\n tabs {\n ...DelegationsSpaceLayoutTab\n }\n }\n\n event {\n name\n\n customDocuments {\n slug\n name\n }\n }\n }\n }\n\n user {\n ...UserPermissions\n\n userInfo(organizationId: $organizationId) {\n ...MemberRegistrationUserInfo\n firstName: fieldValue(slug: "firstName")\n lastName: fieldValue(slug: "lastName")\n }\n }\n}\n',{delegationId:n,organizationId:e,eventId:t},[La.OrganizationDelegationsSpaceFragment,La.DelegationsSpaceLayoutTabFragment,La.DesignColorsFragment,La.UserPermissionsFragment,La.MemberRegistrationUserInfoFragment]),r=(0,d.useMemo)(()=>{const e=a.organization?.delegations.nodes??[];return(0,i.jsx)(Fx,{delegations:e})},[a.organization]),l=(0,d.useMemo)(()=>a.organization?.delegation?.delegationsSpaceLayout?.tabs??a.organization?.event?.defaultDelegationsSpaceLayout?.tabs??L,[a.organization]);return(0,d.useEffect)(()=>{const e=a.organization?.delegation?.event?.name??a.organization?.name??"Recrewteer";document.title=(0,po.A)([e,a.organization?.delegation?.name]).join(" - ")},[a.organization]),s||(0,i.jsx)(Lx,{userPermissions:a.user,children:(0,i.jsxs)(lo.dO,{children:[(0,i.jsx)(lo.qh,{path:[Yc.DELEGATION_MEMBERS_IMPORT({organizationId:":organizationId",delegationId:":delegationId",eventId:":eventId"}),Yc.DELEGATION_MEMBERS_IMPORT({organizationId:":organizationId",delegationId:":delegationId"})],children:(0,i.jsx)(TC,{})}),(0,i.jsx)(lo.qh,{children:(0,i.jsx)(Gp,{extraItems:r,isLoading:!1,organization:a.organization,spaceDesign:{themeColors:a.organization?.event?.delegationsSpaceDesign?.colors??a.organization?.delegationsSpaceDesign?.colors,bannerSrc:a.organization?.event?.delegationsSpaceDesign?.banner?.url??a.organization?.delegationsSpaceDesign?.banner?.url,logoSrc:a.organization?.event?.delegationsSpaceDesign?.logo?.url??a.organization?.delegationsSpaceDesign?.logo?.url},children:(0,i.jsxs)(lo.dO,{children:[(0,i.jsx)(lo.qh,{exact:!0,path:[Yc.DELEGATION({organizationId:":organizationId",delegationId:":delegationId"}),Yc.DELEGATION({organizationId:":organizationId",eventId:":eventId",delegationId:":delegationId"})],children:(0,i.jsx)(Gx,{delegationsSpaceLayoutTabs:l})}),(0,i.jsx)(lo.qh,{path:[Yc.MEMBERS_INVITE({organizationId:":organizationId",delegationId:":delegationId"}),Yc.MEMBERS_INVITE({organizationId:":organizationId",eventId:":eventId",delegationId:":delegationId"})],children:(0,i.jsx)(DC,{})}),(0,i.jsx)(lo.qh,{path:[Yc.MEMBER_EDIT({organizationId:":organizationId",delegationId:":delegationId",userInfoId:":userInfoId",formId:":formId"}),Yc.MEMBER_EDIT({organizationId:":organizationId",eventId:":eventId",delegationId:":delegationId",userInfoId:":userInfoId",formId:":formId"})],children:(0,i.jsx)(NC,{reload:o})}),(0,i.jsx)(lo.qh,{path:[Yc.MEMBER_CREATE({organizationId:":organizationId",delegationId:":delegationId",formId:":formId"}),Yc.MEMBER_CREATE({organizationId:":organizationId",eventId:":eventId",delegationId:":delegationId",formId:":formId"})],children:(0,i.jsx)(kC,{reload:o})}),(0,i.jsx)(lo.qh,{path:[Yc.DELEGATION_PROFILE({organizationId:":organizationId",delegationId:":delegationId"}),Yc.DELEGATION_PROFILE({organizationId:":organizationId",eventId:":eventId",delegationId:":delegationId"})],children:(0,i.jsx)(zC,{})}),(0,i.jsx)(lo.qh,{path:[Yc.FIELDS_EDIT({organizationId:":organizationId",delegationId:":delegationId"}),Yc.FIELDS_EDIT({organizationId:":organizationId",eventId:":eventId",delegationId:":delegationId"})],children:(0,i.jsx)(Bx,{})}),(0,i.jsx)(lo.qh,{children:(0,i.jsx)(YA,{allowDelegationSpaceDownload:a.organization.allowDelegationSpaceDownload,delegation:a.organization.delegation,delegationsSpaceCustomBadges:a.organization.delegationsSpaceCustomBadges,delegationsSpaceLayoutTabs:l,user:a.user})})]})})})]})})},UC=()=>(0,i.jsxs)(lo.dO,{children:[(0,i.jsx)(lo.qh,{path:[Yc.DELEGATION({delegationId:":delegationId",organizationId:":organizationId"}),Yc.DELEGATION({delegationId:":delegationId",eventId:":eventId",organizationId:":organizationId"})],children:(0,i.jsx)(FC,{})}),(0,i.jsx)(lo.rd,{from:"/v2/organization/:organizationId/delegations",to:Dr(Rc.ORGANIZATION_DELEGATIONS({organizationId:":organizationId"}))})]}),BC=()=>(0,i.jsx)(Mx,{children:(0,i.jsx)(UC,{})}),GC=()=>(0,i.jsxs)(lo.dO,{children:[(0,i.jsx)(lo.rd,{exact:!0,from:Rc.ORGANIZATION_DELEGATIONS({organizationId:":organizationId"}),to:Or(Rc.ORGANIZATION_DELEGATIONS({organizationId:":organizationId"}))}),(0,i.jsx)(lo.qh,{path:Or(Rc.ORGANIZATION_DELEGATIONS({organizationId:":organizationId"})),children:(0,i.jsx)(Px,{})}),(0,i.jsx)(lo.qh,{path:[Yc.DELEGATION({delegationId:":delegationId",organizationId:":organizationId"}),Yc.DELEGATION({delegationId:":delegationId",eventId:":eventId",organizationId:":organizationId"})],children:(0,i.jsx)(BC,{})})]}),VC=()=>(0,i.jsx)(Mx,{children:(0,i.jsx)(GC,{})});function WC(e,t,n){const i=Za.DateOnly.MonthLong;return t.equals(n)?e.toLocaleString(t,i):[e.toLocaleString(t,Za.DateOnly.MonthShort),e.toLocaleString(n,Za.DateOnly.MonthShort)].join(" - ")}function qC(e){switch(e){case Oe.Archived:case Oe.Done:return"error";case Oe.Ongoing:return"success";case Oe.Upcoming:return"purple";default:return ir()}}function YC(e,t){const n=$a.c9.now().setZone("utc",{keepLocalTime:!0}).startOf("day");return $a.IX.fromDateTimes(e.startOf("day"),t.endOf("day")).contains(n)?n:e}const HC=e=>{const t=Ei(),n=Ci(pd);return(0,i.jsxs)($,{direction:"column",gap:"1",width:200,children:[(0,i.jsx)(Ni,{font:"gray500 textXs regular",children:t("date_de_l_v_ne_69973")}),(0,i.jsx)(Ni,{font:"gray800 textSm medium",children:WC(n,e.event.startAt,e.event.endAt)})]})},ZC=e=>{const t=Ei();return(0,i.jsxs)($,{direction:"column",gap:"1",width:100,children:[(0,i.jsx)(Ni,{font:"gray500 textXs regular",children:t("State")}),(0,i.jsx)($,{children:(0,i.jsx)(xf,{color:qC(e.event.state),children:t(e.event.state)})})]})},KC=e=>(0,i.jsxs)($,{css:{alignItems:"center",padding:"$4",inlineSize:"100%",background:"$grayCustom50","@tablet":{maxInlineSize:"$containerTablet"},"@desktop":{maxInlineSize:"$container"}},direction:"column",gap:"7",children:[(0,i.jsx)(kh,{}),(0,i.jsx)($,{css:{alignItems:"flex-start",alignSelf:"stretch"},direction:"column",gap:"6",children:e.children})]}),QC=j("div",{display:"flex",justifyContent:"center",alignItems:"center",background:"$grayCustom50",padding:"$10 $4 0 $4"}),XC=()=>(0,i.jsx)(QC,{children:(0,i.jsxs)(KC,{children:[(0,i.jsx)(Nh,{}),(0,i.jsxs)($,{css:{width:"100%","@desktop":{width:"$modalMd"}},direction:"column",gap:"3",children:[(0,i.jsx)(Th,{borderRadius:"$1",height:23,width:1}),(0,i.jsx)(Th,{borderRadius:"$2",height:74,width:1}),(0,i.jsx)(Th,{borderRadius:"$2",height:74,width:1}),(0,i.jsx)(Th,{borderRadius:"$2",height:74,width:1})]})]})}),JC=()=>{const{params:{organizationId:e,userInfoId:t},translate:n}=$g(),a=Sp(),{data:s,isLoading:o,loader:r}=Ri('query MemberRegistrations($organizationId: OrganizationId!, $userInfoId: UsersInfoId!) {\n organization(id: $organizationId) {\n ...OrganizationMembersSpace\n }\n\n userInfo(id: $userInfoId) {\n email\n name\n firstName: fieldValue(slug: "firstName")\n lastName: fieldValue(slug: "lastName")\n\n picture {\n url\n }\n\n volunteersRegistrations {\n id\n isAccreditationsEmailSent\n isAssignmentsEmailSent\n\n event {\n id\n name\n range\n startAt\n endAt\n description\n state\n }\n\n positionsSlotsUsersInfos {\n id\n\n position {\n name\n }\n\n positionSlot {\n range\n }\n }\n\n accreditationsUsersInfos {\n id\n\n accreditationSlot {\n name\n date\n }\n\n accreditation {\n name\n acronym\n }\n\n accreditationCategory {\n name\n }\n }\n }\n }\n}\n',{organizationId:e,userInfoId:t},[La.OrganizationMembersSpaceFragment]),l=(0,d.useMemo)(()=>s.userInfo?gu(e)?`${s.userInfo.firstName||""} ${s.userInfo.lastName||""}`.trim():s.userInfo.firstName||"":"",[s.userInfo]),c=Ti(),u=(0,d.useMemo)(()=>{const e=(s.userInfo?.volunteersRegistrations??[]).map(e=>({...e,accreditationsUsersInfos:s.organization?.hideAccreditationsUntilConfirmationEmailSent&&!e.isAccreditationsEmailSent?[]:e.accreditationsUsersInfos,positionsSlotsUsersInfos:s.organization?.hideAssignmentsUntilConfirmationEmailSent&&!e.isAssignmentsEmailSent?[]:e.positionsSlotsUsersInfos}));return(0,ho.A)(e,e=>-(e.event.range?.start?.toMillis()??e.event.startAt.toMillis()))},[s.userInfo,s.organization]);return r||(0,i.jsx)(Ug,{isLoading:o,loadDelegationsSpace:!1,loadMembersSpace:!0,organizationId:e,skeleton:(0,i.jsx)(XC,{}),children:(0,i.jsx)(QC,{children:(0,i.jsxs)(KC,{children:[(0,i.jsx)(Ip,{acceptCustomColours:!0,heading:(0,i.jsx)(Ni,{fontSize:"displayXs",fontWeight:"semiBold",children:n("bonjour_1_97713",l)}),subtitle:[...c(n("g_rer_et_visual_89310","{1}"),(0,i.jsx)("b",{style:{color:"var(--colors-grayCustom800)"},children:s.organization.name}))]}),(0,i.jsx)(Ip,{heading:n("listes_des_v_n_07148"),subtitle:n("visualisez_tous_48942"),children:(0,i.jsxs)($,{direction:"column",gap:"8",children:[s.organization.showMembersSpaceCommunity&&(0,i.jsx)(_p,{children:(0,i.jsx)(jp,{button:(0,i.jsx)(pa,{featureFlags:{isV4:!0},to:Pg.MEMBER({organizationId:e,userInfoId:t}),children:n("voir_les_inform_25921")}),title:s.organization.name})}),F(u)&&(0,i.jsx)(_p,{children:u.map(s=>(0,i.jsxs)(jp,{button:(0,i.jsx)(pa,{featureFlags:{isV4:!0},to:Pg.MEMBER({organizationId:e,userInfoId:t,eventId:s.event.id}),children:n("voir_l_v_nemen_72358")}),subtitle:s.event.description,title:s.event.name,children:[(0,i.jsx)(HC,{event:s.event}),!a&&(0,i.jsx)(ZC,{event:s.event})]},s.id))})]})})]})})})},eE=d.createContext({}),tE=e=>(0,i.jsx)(eE.Provider,{value:{},children:e.children}),nE=e=>{const{history:t,params:{organizationId:n,eventId:a,formId:s,userInfoId:o}}=$g(),{data:r,loader:l}=Ri("query MemberSpaceUpdateMember(\n $organizationId: OrganizationId!\n $eventId: EventId\n $formId: FormId!\n $delegationId: DelegationId # EventCreateUpdateMember expects $delegationId, so we have to add it to the params even if it's null and we don't use it\n $userInfoId: UsersInfoId!\n) {\n organization(id: $organizationId) {\n id\n name\n dateFormat\n datetimeFormat\n\n event: eventMaybe(id: $eventId) {\n ...EventCreateUpdateMember\n }\n\n userInfo(id: $userInfoId) {\n ...UserInfoUpdateMember\n\n volunteerRegistration(eventId: $eventId) {\n numberOfAssignments\n numberOfAccreditations\n\n positionsSlotsUsersInfos {\n positionSlot {\n range\n }\n }\n }\n }\n }\n\n organizationPublic(id: $organizationId) {\n ...OrganizationDelegationsSpace\n country\n }\n}\n",{organizationId:n,eventId:a,formId:s,userInfoId:o},[La.EventCreateUpdateMemberFragment,La.UserInfoUpdateMemberFragment,La.OrganizationDelegationsSpaceFragment]),c=(0,d.useMemo)(()=>(r.organization?.userInfo.volunteerRegistration?.positionsSlotsUsersInfos??[]).map(e=>e.positionSlot.range),[r.organization?.userInfo.volunteerRegistration]);return l||(0,i.jsx)($C,{areSectionsDisabled:{isWishedAccreditationsDisabled:r.organization.userInfo.volunteerRegistration?r.organization.userInfo.volunteerRegistration?.numberOfAccreditations>0:void 0,isWishedAssignmentsDisabled:r.organization.userInfo.volunteerRegistration?r.organization.userInfo.volunteerRegistration?.numberOfAssignments>0:void 0},blockedSlots:c,country:r.organization.event?.country??r.organizationPublic.country,disabled:!1===r.organization.userInfo.formUserInfo.form.isEditableInMemberSpace,event:r.organization.event,featureFlags:{isV4:!0},form:r.organization.userInfo.formUserInfo.form,organization:r.organization,handleRedirect:()=>t.goBack(Pg.MEMBER_FORMS({organizationId:n,eventId:a,userInfoId:o})),reload:e.reload,showEmail:!1,userInfo:r.organization.userInfo})},iE=e=>{const t=Ci(pd),n=d.useMemo(()=>{const t=tf(e.aui.accreditation.color);return{background:t[50],color:t[700]}},[e.aui]);return(0,i.jsx)(i.Fragment,{children:e.renderAccreditation((0,i.jsxs)($,{css:{...n,borderRadius:"$1",padding:"$1 $2"},direction:"column",gap:"1",justify:"center",width:1,children:[(0,i.jsxs)($,{align:"center",css:{fontSize:"10px"},gap:"1",children:[(0,i.jsx)(Ni,{children:uu(t,e.aui.accreditationSlot,"")}),e.aui.isAutoAccredit&&(0,i.jsx)(Ni,{fontSize:"textXs",children:(0,i.jsx)(la,{icon:"bolt-auto"})})]}),(0,i.jsx)(Ni,{fontSize:"textXs",fontWeight:"medium",children:e.aui.accreditation.name})]}),e.aui.accreditation.id)})},aE=e=>{const t=yh(),n=d.useMemo(()=>(0,ho.A)(e.event.volunteerRegistration.accreditationsUsersInfos.filter(e=>!e.accreditationSlot.date?.isValid),e=>[e.accreditationCategory.name.toLowerCase(),Hp(e.accreditation.index),e.accreditation.name.toLowerCase(),e.accreditationSlot.name.toLowerCase()]),[e.event]),a=d.useMemo(()=>(0,ho.A)(e.event.volunteerRegistration.accreditationsUsersInfos.filter(e=>e.accreditationSlot.date?.isValid),e=>[e.accreditationCategory.name.toLowerCase(),Hp(e.accreditation.index),e.accreditation.name.toLowerCase(),e.accreditationSlot.name.toLowerCase()]),[e.event]);return(0,i.jsxs)(gA,{css:e.featureFlags?.isV4?{bd:!0,overflow:"auto"}:{borderTop:"1px solid $gray200"},date:e.selectedDay,display:t?"week":"day",maxDate:e.event.endAt,minDate:e.event.startAt,children:[n.map(t=>(0,i.jsx)(mA,{children:(0,i.jsx)(iE,{aui:t,renderAccreditation:e.renderAccreditation})},t.id)),a.map(t=>(0,i.jsx)(mA,{endAt:t.accreditationSlot.date,startAt:t.accreditationSlot.date,children:(0,i.jsx)(iE,{aui:t,renderAccreditation:e.renderAccreditation})},t.id))]})},sE=e=>{const{translate:t,params:{organizationId:n,eventId:a,userInfoId:s}}=$g(),o=Ci(pd),{mutate:r}=bs(),{mutate:l}=function(e={}){return Mi("mutation AccreditationsSlotsUsersInfosCheckIn(\n $eventId: EventId!\n $checkIn: AccreditationSlotCheckInInput!\n) {\n accreditationsSlotsUsersInfosCheckIn(eventId: $eventId, checkIn: $checkIn)\n}\n",e)}(),c=(0,d.useMemo)(()=>uu(o,e.aui.accreditationSlot,e.aui.accreditation.name),[e.aui]);return(0,i.jsxs)(mx,{children:[(0,i.jsxs)(rx,{align:"center",gap:"3",children:[(0,i.jsx)(rf,{color:e.aui.accreditation.color,icon:e.aui.accreditation.icon}),(0,i.jsxs)($,{css:{flex:"1",overflow:"hidden"},direction:"column",children:[(0,i.jsx)(Ni,{color:"gray500",css:{fontSize:"11px",textTransform:"uppercase"},fontWeight:"medium",children:e.aui.accreditationCategory.name}),(0,i.jsx)(Oh,{css:{overflow:"hidden",width:"100%","& > a":{width:"100%"}},to:Dm.ACCREDITATION({organizationId:n,eventId:a,accreditationId:e.aui.accreditation.id}),children:(0,i.jsx)(Ni,{css:{ellipsis:!0},title:e.aui.accreditation.name,width:1,children:e.aui.accreditation.name})}),c!==e.aui.accreditation.name&&(0,i.jsx)(Ni,{color:"gray500",css:{ellipsis:!0},title:c,width:1,children:c})]})]}),(0,i.jsxs)(rx,{align:"start",direction:"column",justify:"center",children:[e.aui.state===le.Waiting&&(0,i.jsxs)($,{align:"center",gap:"1",children:[(0,i.jsx)(Ni,{color:"warning500",children:(0,i.jsx)(la,{icon:"hourglass-empty",iconStyle:"solid"})}),(0,i.jsx)(Ni,{font:"gray800 textXs medium",children:t("pas_encore_scan_88057")})]}),e.aui.state===le.CheckedIn&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)($,{align:"center",gap:"1",children:[(0,i.jsx)(Ni,{color:"success500",children:(0,i.jsx)(la,{icon:"badge-check",iconStyle:"solid"})}),(0,i.jsx)(Ni,{font:"gray800 textXs medium",children:t("scann_e_01567")})]}),(0,i.jsx)(Ni,{font:"gray500 textXs regular",children:e.aui.checkInAt?.isValid?o.toLocaleString(e.aui.checkInAt.toLocal(),Za.DateTime):""})]})]}),(0,i.jsx)(rx,{children:e.aui.isAutoAccredit&&(0,i.jsx)(Ni,{color:"success700",fontSize:"textMd",children:(0,i.jsx)(la,{icon:"check"})})}),(0,i.jsx)(rx,{children:e.aui.isWorkflow&&(0,i.jsx)(Ni,{color:"success700",fontSize:"textMd",children:(0,i.jsx)(la,{icon:"check"})})}),(0,i.jsx)(rx,{children:e.aui.accreditationProfile?e.aui.accreditationProfile.name:"-"}),(0,i.jsxs)(rx,{align:"start",direction:"column",justify:"center",children:[(0,i.jsx)(Ni,{children:e.aui.createdBy?.name||e.aui.createdBy?.email||"-"}),(0,i.jsx)(Ni,{color:"gray500",children:o.toLocaleString(e.aui.insertedAt.toLocal(),Za.DateTime)})]}),e.canMemberAccredit&&(0,i.jsxs)(SS,{justify:"end",width:200,children:[e.aui.state===le.Waiting&&(0,i.jsx)(pa,{color:"white",size:"sm",onClick:async()=>{await l({eventId:e.aui.eventId,checkIn:{strategy:ce.CheckIn,accreditationsSlotsUsersInfosIds:[e.aui.id]}}),e.reload()},children:"Scanner"}),(0,i.jsx)(ob,{children:(0,i.jsx)($p,{color:"red",icon:"trash-can",onClick:async()=>{await r({eventId:a,massAccredit:{accreditationsSlotsIds:[e.aui.accreditationSlot.id],selecteds:{ids:[s]},strategy:Je.Delete}}),e.reload()},children:t("d_saffecter_du_47122")})})]})]})},oE=e=>{const{translate:t}=$g(),n=(0,d.useMemo)(()=>(0,ho.A)(e.event.volunteerRegistration.accreditationsUsersInfos.filter(t=>!e.selectedDay?.isValid||!!t.accreditationSlot.date?.isValid&&t.accreditationSlot.date.startOf("day").toMillis()===e.selectedDay.startOf("day").toMillis()),e=>[e.accreditationCategory.name.toLowerCase(),Hp(e.accreditation.index),e.accreditation.name.toLowerCase(),e.accreditationSlot.date?.toMillis()??1,e.accreditationSlot.name.toLowerCase()]),[e.event,e.selectedDay]);return(0,i.jsxs)(gx,{css:{borderTop:"1px solid $gray200"},hideBorder:!0,children:[(0,i.jsxs)(lx,{children:[(0,i.jsx)(dx,{children:t("Accreditation")}),(0,i.jsx)(dx,{children:t("scann_e_le_27812")}),(0,i.jsx)(dx,{children:t("affect_e_automa_74071")}),(0,i.jsx)(dx,{children:t("ajout_via_une_69544")}),(0,i.jsx)(dx,{children:t("ajout_via_un_p_85925")}),(0,i.jsx)(dx,{children:t("ajout_e_par_71330")}),e.canMemberAccredit&&(0,i.jsx)(dx,{width:200})]}),n.map(t=>(0,i.jsx)(sE,{aui:t,canMemberAccredit:e.canMemberAccredit,reload:e.reload},t.id))]})},rE=e=>{const{translate:t}=$g(),[n,a]=d.useState(YC(e.event.startAt,e.event.endAt)),[s,o]=d.useState(null);return(0,i.jsx)(i.Fragment,{children:(0,i.jsxs)($,{as:"section",css:{background:"white",bd:!0,overflow:"hidden",padding:e.featureFlags?.isV4?"$6 $7 $7 $7":void 0},direction:"column",gap:e.featureFlags?.isV4?"6":void 0,justify:"center",children:[(0,i.jsxs)($,{align:"center",as:"header",css:{padding:e.featureFlags?.isV4?void 0:"$5 $6"},gap:"4",children:[(0,i.jsxs)(Ni,{as:"hgroup",css:{flex:"1"},children:[(0,i.jsx)(Zg,{children:e.title}),e.subtitle&&(0,i.jsx)(N,{textStyle:"subtitle",children:e.subtitle})]}),(0,i.jsxs)($,{as:"nav",gap:"3",children:["calendar"===e.accreditationsDisplay&&(0,i.jsx)(cA,{max:e.event.endAt,min:e.event.startAt,value:n,onChange:a}),"list"===e.accreditationsDisplay&&!e.hideListView&&(0,i.jsx)(Ni,{width:160,children:(0,i.jsx)(Uf,{rightIcon:"xmark",value:s,onChange:o,onRightIconClick:()=>o(null)})}),!e.hideListView&&e.setAccreditationsDisplay&&(0,i.jsx)(Ni,{width:200,children:(0,i.jsxs)(VI,{value:e.accreditationsDisplay,onChange:e.setAccreditationsDisplay,children:[(0,i.jsx)("option",{value:"calendar",children:t("Calendar")}),(0,i.jsx)("option",{value:"list",children:t("List")})]})}),e.actions]})]}),"calendar"===e.accreditationsDisplay?(0,i.jsx)(aE,{event:e.event,featureFlags:e.featureFlags,renderAccreditation:e.renderAccreditation,selectedDay:n}):(0,i.jsx)(oE,{canMemberAccredit:e.canMemberAccredit,event:e.event,reload:e.reload,selectedDay:s})]})})};var dE=n(2096);const lE=(0,d.memo)(e=>{const t=(0,d.useCallback)(t=>{t&&(n.current&&(a.current?.setMap(null),n.current=null),n.current=new google.maps.Map(t,{zoom:e.coordinatesFieldsProps?.zoomProps.input.value??e.initialZoom??13,center:xo(e.center)||yo,gestureHandling:"cooperative",mapTypeControl:!1,streetViewControl:!1,mapTypeId:jo(e.layer),...e.mapOptions||{}}),n.current.mapTypes.set(Xe.IgnPlan,new google.maps.ImageMapType({getTileUrl:(e,t)=>((e,t)=>`https://data.geopf.fr/wmts?${["REQUEST=GetTile","SERVICE=WMTS","VERSION=1.0.0","STYLE=normal","TILEMATRIXSET=PM",`FORMAT=${encodeURIComponent("image/png")}`,"LAYER=GEOGRAPHICALGRIDSYSTEMS.PLANIGNV2",`TILEMATRIX=${t}`,`TILEROW=${e.y}`,`TILECOL=${e.x}`].join("&")}`)(e,t),tileSize:new google.maps.Size(256,256),name:Xe.IgnPlan,maxZoom:18})),n.current.addListener("zoom_changed",()=>{e.coordinatesFieldsProps&&e.coordinatesFieldsProps.zoomProps.input.onChange(n.current.getZoom())}),n.current.addListener("tilesloaded",()=>{e.onTilesloaded?.()}),o())},[]),n=(0,d.useRef)(null),a=(0,d.useRef)(null),s=(0,d.useRef)([]),o=()=>{s.current.forEach(e=>e.setMap(null)),F(e.traces)?s.current=e.traces.map(e=>{const t=e.points.map(([e,t])=>({lat:e,lng:t})),i=e.direction===kt.None?[]:[{icon:{path:e.direction===kt.Backward?google.maps.SymbolPath.BACKWARD_OPEN_ARROW:google.maps.SymbolPath.FORWARD_OPEN_ARROW,scale:4,strokeColor:e.color},offset:"0%",repeat:"200px"}],a=new google.maps.Polyline({path:t,geodesic:!0,strokeColor:e.color,strokeOpacity:1,strokeWeight:4,icons:i});return a.setMap(n.current),a}):s.current=[]};return(0,d.useEffect)(()=>{(()=>{if(a.current&&a.current.setMap(null),e.point&&n.current){const t=xo(e.point);n.current.setCenter(t),a.current=new google.maps.Marker({position:t,map:n.current,draggable:"object"==typeof e.coordinatesFieldsProps&&null!==e.coordinatesFieldsProps}),e.coordinatesFieldsProps&&a.current.addListener("dragend",t=>{e.coordinatesFieldsProps?.latitudeProps.input.onChange(t.latLng.lat()),e.coordinatesFieldsProps?.longitudeProps.input.onChange(t.latLng.lng())})}})()},[JSON.stringify(e.point)]),(0,d.useEffect)(()=>{n.current?.setMapTypeId(jo(e.layer))},[e.layer]),(0,d.useEffect)(()=>{o()},[JSON.stringify(e.traces||[])]),(0,i.jsx)(Ni,{ref:t,height:1,width:1,children:e.coordinatesFieldsProps?.zoomProps&&(0,i.jsx)(dE.Yr,{name:e.coordinatesFieldsProps.zoomProps.input.name,children:e=>{n.current?.setZoom(e)}})})},gd.A);lE.displayName="Map";const cE=({children:e,labelId:t,isOpen:n,size:a,setIsOpen:s,...o})=>{const r=yh();return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("style",{dangerouslySetInnerHTML:{__html:"\n dialog::backdrop {\n background: rgba(52, 64, 84, 0.7)\n }\n "}}),(0,i.jsx)(Pv,{"aria-labelledby":t,"data-testid":"right-panel-body",isOpen:n,setIsOpen:s,style:{maxHeight:"none",maxWidth:"none",margin:"0 0 0 0",marginInlineStart:r?"auto":"0",height:"100%",border:"none",inlineSize:r?"sm"===a?"480px":"690px":"100%",top:0,padding:0},onClose:o.onClose,children:(0,i.jsx)($,{align:"center",css:{background:"$gray50",boxShadow:"$shadowsXl",blockSize:"100%",flex:1},direction:"column",...o,children:e})})]})},uE=({heading:e,id:t,leftIcon:n,leftIconColor:a,leftIconBorder:s,setIsOpen:o,...r})=>(0,i.jsxs)($,{as:"header",css:{alignItems:"flex-start",alignSelf:"stretch",background:"$white",borderBlockEnd:"1px solid $gray200"},direction:"column",gap:"4",...r,children:[(0,i.jsxs)($,{css:{alignItems:"center",alignSelf:"stretch",padding:"$6 $7 $5 $7"},gap:"4",children:[n&&(0,i.jsx)($,{align:"center",css:{border:s},justify:"center",children:(0,i.jsx)(rf,{color:a,icon:n})}),(0,i.jsx)($,{css:{alignItems:"flex-start",flex:1},direction:"column",id:t,justify:"center",children:e})]}),(0,i.jsx)($,{align:"center",css:{padding:"$2",height:"$space$9",width:"$space$9",position:"absolute",right:"$space$4",top:"$space$4"},justify:"center",children:(0,i.jsx)(pa,{color:"invisible",css:{color:"$gray500",width:"$space$6",height:"$space$6",padding:0},textAlign:"center",onClick:()=>o(!1),children:(0,i.jsx)("i",{className:"far fa-xmark"})})}),r.children]}),mE=e=>(0,i.jsx)($,{css:{alignSelf:"stretch",alignItems:"start",padding:"$6",overflowY:"auto",...e.css},direction:"column",gap:"6",children:e.children}),gE=({children:e,...t})=>(0,i.jsx)(N,{as:"address",textStyle:"inherit",...t,children:e}),hE=e=>{const{params:{organizationId:t,eventId:n},translate:a}=$g(),{data:s,loader:o}=Ri("query AccreditationRightPanel(\n $organizationId: OrganizationId!\n $eventId: EventId\n $accreditationId: AccreditationId!\n) {\n organization: organizationPublic(id: $organizationId) {\n event(id: $eventId) {\n accreditation(id: $accreditationId) {\n id\n name\n acronym\n color\n icon\n description\n address\n latitude\n longitude\n zoom\n layer\n }\n }\n }\n}\n",{organizationId:t,eventId:n,accreditationId:e.accreditationId},[]);return o||(s.organization.event?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(uE,{heading:(0,i.jsx)(Zg,{children:s.organization.event.accreditation.name}),id:e.labelId,leftIcon:da(s.organization.event.accreditation.icon),leftIconColor:s.organization.event.accreditation.color,setIsOpen:e.setIsOpen}),(0,i.jsx)(mE,{children:(0,i.jsx)(Ip,{children:(0,i.jsx)($,{direction:"column",gap:"6",children:s.organization.event.accreditation.description||lu(s.organization.event.accreditation)?(0,i.jsxs)(i.Fragment,{children:[s.organization.event.accreditation.description&&(0,i.jsxs)($,{direction:"column",gap:"1",children:[(0,i.jsx)(Zg,{textStyle:"subheading",children:a("description_58935")}),(0,i.jsx)(yp,{text:s.organization.event.accreditation.description})]}),lu(s.organization.event.accreditation)&&(0,i.jsxs)($,{direction:"column",gap:"1",children:[(0,i.jsx)(Zg,{textStyle:"subheading",children:a("localisation_38416")}),ru(s.organization.event.accreditation)&&(0,i.jsx)(gE,{children:s.organization.event.accreditation.address}),du(s.organization.event.accreditation)&&(0,i.jsx)(Ni,{height:380,width:1,children:(0,i.jsx)(lE,{initialZoom:s.organization.event.accreditation.zoom,layer:s.organization.event.accreditation.layer,point:So(s.organization.event.accreditation)})})]})]}):(0,i.jsx)(Af,{imageSrc:bh.WeezeventBlankPerson,title:a("il_n_y_a_aucun_10373")})})})})]}):(0,i.jsx)(xm,{}))},pE=e=>{const[t,n]=(0,d.useState)(!1),a=(0,rh.A)("rightpanel-");return(0,d.useEffect)(()=>(e.accreditationId&&!t?n(!0):n(!1),()=>{n(!1)}),[e.accreditationId]),(0,i.jsx)(cE,{isOpen:t,labelId:a,setIsOpen:n,size:"md",onClose:()=>e.setDisplayedAccreditationId(null),children:e.accreditationId&&(0,i.jsx)(hE,{accreditationId:e.accreditationId,labelId:a,setIsOpen:n})})},fE=e=>{const{params:{organizationId:t,eventId:n,userInfoId:a},translate:s}=$g(),{data:o,loader:r,reload:l}=Ri("query UserProfileAccreditations(\n $organizationId: OrganizationId!\n $eventId: EventId!\n $userInfoId: UsersInfoId!\n $excludeAccreditations: [AccreditationId!]\n) {\n organization(id: $organizationId) {\n hideAccreditationsUntilConfirmationEmailSent\n\n userInfo(id: $userInfoId) {\n formsUsersInfos(eventId: $eventId, level: Event) {\n accreditationsSlots {\n name\n date\n\n accreditation {\n id\n name\n index\n }\n\n accreditationCategory {\n name\n }\n }\n\n form {\n id\n name\n }\n }\n }\n }\n\n event(id: $eventId) {\n name\n dayStartTime\n startAt\n endAt\n hasFormWithAccreditationDisplay\n\n volunteerRegistration: volunteerRegistrationByUserInfoId(userInfoId: $userInfoId) {\n isAccreditationsEmailSent\n\n accreditationsUsersInfos(excludeAccreditations: $excludeAccreditations) {\n ...UserPanelAccreditationSlotUserInfo\n }\n }\n }\n}\n",{organizationId:t,eventId:n,userInfoId:a,excludeAccreditations:e.excludeAccreditations},[La.UserPanelAccreditationSlotUserInfoFragment]);const[c,u]=(0,d.useState)(null),m=Ti(),g=(0,d.useMemo)(()=>(0,ho.A)(!o.organization?.hideAccreditationsUntilConfirmationEmailSent||o.organization?.hideAccreditationsUntilConfirmationEmailSent&&o.event?.volunteerRegistration.isAccreditationsEmailSent?o.event?.volunteerRegistration.accreditationsUsersInfos:[],e=>e.accreditationSlot.date?.toMillis()??0),[o.event,o.organization]),h=s("planning_de_vos_42899"),p=[...m(s("visualiser_l_in_46133","{1}"),(0,i.jsx)("b",{style:{color:"var(--colors-gray800)"},children:o.event?.name}))];return r||(0,i.jsxs)(i.Fragment,{children:[F(g)?(0,i.jsx)(rE,{accreditationsDisplay:"calendar",canMemberAccredit:!1,event:o.event,featureFlags:{isV4:!0},hideListView:!0,reload:()=>{l(),g.length<=1&&e.reloadHeader()},renderAccreditation:(e,t)=>(0,i.jsx)(pa,{color:"invisible",style:{width:"100%",padding:"unset"},onClick:()=>u(t),children:e}),subtitle:p,title:h}):(0,i.jsxs)($,{as:"section",css:{background:"white",bd:!0,padding:"$6 $7 $7 $7"},direction:"column",gap:"6",justify:"center",children:[(0,i.jsx)($,{align:"center",as:"header",gap:"4",children:(0,i.jsxs)(Ni,{as:"hgroup",css:{flex:"1"},children:[(0,i.jsx)(Zg,{children:h}),p&&(0,i.jsx)(N,{textStyle:"subtitle",children:p})]})}),(0,i.jsx)($,{css:{bd:!0,padding:"$9 $7"},children:(0,i.jsx)(Af,{imageSrc:bh.WeezeventBlankHandGlobe,subtitle:s("ici_seront_affi_51536"),title:s("encore_un_peu_d_88675")})})]}),(0,i.jsx)(pE,{accreditationId:c,setDisplayedAccreditationId:u})]})},IE=e=>{const{translate:t,params:{eventId:n}}=$g(),a=Ci(Yl),{mutate:s}=Cs(),o=(0,d.useMemo)(()=>Qa(),[]),[r,l]=(0,d.useState)(e.assignments.map(e=>({...e,checkInAt:e.checkInAt?.toLocal(),checkOutAt:e.checkOutAt?.toLocal()}))),c=(0,d.useMemo)(()=>r.every(e=>e.checkInAt?.isValid&&e.checkOutAt?.isValid&&e.checkOutAt>e.checkInAt||e.checkInAt?.isValid&&!e.checkOutAt?.isValid||!e.checkInAt?.isValid&&!e.checkOutAt?.isValid),[r]),u=(0,d.useCallback)((e,t,n)=>{l((0,nx.jM)(i=>{i.forEach(i=>{i.id===e&&(i[t]=n||void 0)})}))},[r,l]);return(0,i.jsx)(Ta,{isOpen:e.isOpen,onClose:e.onClose,children:(0,i.jsxs)(Ea,{children:[(0,i.jsx)(Ca,{icon:"sliders",children:t("mettre_jour_d_54198")}),(0,i.jsx)(Aa,{gap:"4",children:r.map(e=>(0,i.jsxs)($,{direction:"column",gap:"1",children:[(0,i.jsxs)(Ni,{font:"gray800 textSm medium",children:[e.position.name," -"," ",(0,i.jsx)(wb,{fontWeight:"regular",children:iu(a,e.positionSlot,"",{slot:{includeRange:!0}})})]}),(0,i.jsxs)($,{gap:"6",children:[(0,i.jsx)(Gf,{rightIcon:"xmark",value:e.checkInAt,zone:o,onChange:t=>{u(e.id,"checkInAt",t)},onRightIconClick:()=>{u(e.id,"checkInAt",null)}}),(0,i.jsx)(Gf,{rightIcon:"xmark",value:e.checkOutAt,zone:o,onChange:t=>{u(e.id,"checkOutAt",t)},onRightIconClick:()=>{u(e.id,"checkOutAt",null)}}),(0,i.jsx)(hh,{shouldParseAsInt:!0,value:e.breakTime,onChange:t=>{u(e.id,"breakTime",t)}})]})]},e.id))}),(0,i.jsx)(va,{children:(0,i.jsx)(pa,{disabled:!c,onClick:async()=>{await Promise.all(r.map(e=>s({eventId:n,checkIn:{strategy:ce.CheckInOut,breakTime:e.breakTime,checkInAt:e.checkInAt,checkOutAt:e.checkOutAt,positionsSlotsUsersInfosIds:[e.id]}}))),e.onClose(),e.onSuccess()},children:t("mettre_jour_85141")})})]})})},_E=e=>{const{translate:t}=$g(),n=Ci(Yl),a=(0,d.useMemo)(()=>{const t=tf(e.psui.position.color);return{background:t[50],color:t[700]}},[e.psui]);return(0,i.jsx)(i.Fragment,{children:e.renderPosition((0,i.jsxs)($,{css:{...a,borderRadius:"$1",padding:"$1 $2"},direction:"column",gap:"1",justify:"center",width:1,children:[(0,i.jsxs)($,{align:"center",css:{fontSize:"10px"},gap:"1",children:[(0,i.jsxs)($,{direction:"column",gap:"1",children:[e.psui.positionSlot.name&&(0,i.jsx)(Ni,{children:e.psui.positionSlot.name}),(0,i.jsx)(Ni,{children:n.toDisplayString(e.psui.positionSlot.range,{hideDate:!0})})]}),e.psui.state===le.CheckedOut&&(0,i.jsx)(la,{icon:"stopwatch",title:t("d_pointer_25328")}),e.psui.state===le.CheckedIn&&(0,i.jsx)(la,{icon:"timer",title:t("pointer_80927")})]}),(0,i.jsx)(Ni,{fontSize:"textXs",fontWeight:"medium",children:e.psui.position.name})]}),e.psui.position.id)})},xE=e=>{const t=yh(),[n]=sl(e.dayStartTime),a=(0,d.useMemo)(()=>function(e,t,n,i){const a=Math.ceil(n.endOf("day").diff(t.startOf("day"),"days").days),s=(0,Bl.A)(0,a).map(e=>t.startOf("day").set({hour:i}).plus({day:e}));return e.flatMap(e=>{const{start:t,end:n}=e.range,i=s.filter(e=>e>t&&e({...e,range:t}))})}(e.assignments.map(e=>({...e,range:e.positionSlot.range})),e.startAt,e.endAt,n),[e.assignments,e.startAt,e.endAt,n]);return(0,i.jsx)(gA,{css:e.featureFlags?.isV4?{bd:!0,overflow:"auto"}:{borderTop:"1px solid $gray200"},date:e.selectedDay,display:t?"week":"day",maxDate:e.endAt,minDate:e.startAt,children:a.map((t,a)=>(0,i.jsx)(mA,{endAt:t.range.start,startAt:t.range.start,startHour:n,children:(0,i.jsx)(_E,{psui:t,renderPosition:e.renderPosition,startHour:n})},a))})},yE=e=>{const{translate:t,params:{organizationId:n,eventId:a}}=$g(),{hasPermission:s}=zx(),o=Ci(pd),r=Ci(Ul),l=Ci(Yl),{mutate:c}=Cs(),u=(0,d.useMemo)(()=>iu(l,e.psui.positionSlot,"",{slot:{includeRange:!0}}),[e.psui]),m=s(fl.MEMBER_ASSIGN),g=s(fl.POSITION_READ,{positionCategoryId:e.psui.positionCategoryId,positionId:e.psui.position.id});return(0,i.jsxs)(mx,{children:[(0,i.jsxs)(rx,{align:"center",gap:"3",children:[(0,i.jsx)(rf,{color:e.psui.position.color,icon:e.psui.position.icon}),(0,i.jsxs)($,{css:{flex:"1",overflow:"hidden"},direction:"column",children:[(0,i.jsx)(Ni,{color:"gray500",css:{fontSize:"11px",textTransform:"uppercase"},fontWeight:"medium",children:e.psui.positionCategory.name}),(0,i.jsx)(Oh,{css:{overflow:"hidden",width:"100%","& > a":{width:"100%"}},to:Nm.POSITION({organizationId:n,eventId:a,positionId:e.psui.position.id}),children:(0,i.jsx)(Ni,{css:{ellipsis:!0},title:e.psui.position.name,width:1,children:e.psui.position.name})}),(0,i.jsx)(Ni,{color:"gray500",css:{ellipsis:!0},title:u,width:1,children:u})]})]}),(0,i.jsx)(rx,{children:e.psui.state===le.CheckedOut?(0,i.jsx)(xf,{leftIcon:"clock",children:t("temps_total_79448",r.minutesToHoursMinutesString(e.psui.timeDifferenceMinutes))}):e.psui.state===le.CheckedIn?(0,i.jsx)(xf,{color:"success",leftIcon:"circle",leftIconStyle:"solid",children:t("point_le_1_63576",o.toLocaleString(e.psui.checkInAt.toLocal(),Za.DateTime))}):(0,i.jsx)(xf,{color:"warning",leftIcon:"circle",leftIconStyle:"solid",children:t("non_point_42145")})}),(0,i.jsx)(rx,{children:e.psui.isAutoAssign&&(0,i.jsx)(Ni,{color:"success700",fontSize:"textMd",children:(0,i.jsx)(la,{icon:"check"})})}),(0,i.jsx)(rx,{children:e.psui.isWorkflow&&(0,i.jsx)(Ni,{color:"success700",fontSize:"textMd",children:(0,i.jsx)(la,{icon:"check"})})}),(0,i.jsxs)(rx,{align:"start",direction:"column",justify:"center",children:[(0,i.jsx)(Ni,{children:e.psui.createdBy?.name||e.psui.createdBy?.email||"-"}),(0,i.jsx)(Ni,{color:"gray500",children:o.toLocaleString(e.psui.insertedAt.toLocal(),Za.DateTime)})]}),(0,i.jsxs)(SS,{justify:"end",width:200,children:[g&&(e.psui.state===le.Waiting?(0,i.jsx)(pa,{color:"white",size:"sm",onClick:async()=>{await c({eventId:e.psui.eventId,checkIn:{strategy:ce.CheckIn,positionsSlotsUsersInfosIds:[e.psui.id]}}),e.reload()},children:t("pointer_80927")}):e.psui.state===le.CheckedIn?(0,i.jsx)(pa,{color:"white",size:"sm",onClick:async()=>{await c({eventId:e.psui.eventId,checkIn:{strategy:ce.CheckOut,positionsSlotsUsersInfosIds:[e.psui.id]}}),e.reload()},children:t("d_pointer_25328")}):null),(0,i.jsx)(lb,{canCheckIn:g,canDelete:m,psui:e.psui,reloadCheckIn:e.reload,onDelete:e.reload})]})]})},SE=e=>{const{translate:t}=$g(),{hasPermission:n}=zx(),a=n(fl.POSITION_READ),s=(0,d.useMemo)(()=>e.assignments.filter(t=>!e.selectedDay?.isValid||t.positionSlot.range.contains(e.selectedDay)||t.positionSlot.range.start.startOf("day").toMillis()===e.selectedDay.startOf("day").toMillis()||t.positionSlot.range.end.startOf("day").toMillis()===e.selectedDay.startOf("day").toMillis()),[e.assignments,e.selectedDay]);return(0,i.jsxs)(gx,{css:{borderTop:"1px solid $gray200"},hideBorder:!0,children:[(0,i.jsxs)(lx,{children:[(0,i.jsx)(dx,{children:t("Position")}),(0,i.jsx)(dx,{children:t("statut_du_point_52451")}),(0,i.jsx)(dx,{children:t("affect_e_automa_74071")}),(0,i.jsx)(dx,{children:t("ajout_via_une_69544")}),(0,i.jsx)(dx,{children:t("ajout_e_par_71330")}),a&&(0,i.jsx)(dx,{width:200})]}),s.map(t=>(0,i.jsx)(yE,{psui:t,reload:e.reload},t.id))]})},jE=e=>{const{params:{organizationId:t,eventId:n,userInfoId:a},translate:s}=$g(),[o,r]=(0,d.useState)(YC(e.event.startAt,e.event.endAt)),[l,c]=(0,d.useState)(null),[u,m]=(0,d.useState)(!1);return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)($,{as:"section",css:{background:"white",bd:!0,overflow:"hidden",padding:e.featureFlags?.isV4?"$6 $7 $7 $7":void 0},direction:"column",gap:e.featureFlags?.isV4?"6":void 0,justify:"center",children:[(0,i.jsxs)($,{align:"center",as:"header",css:{padding:e.featureFlags?.isV4?void 0:"$5 $6"},gap:"4",children:[(0,i.jsxs)(Ni,{as:"hgroup",css:{flex:"1"},children:[(0,i.jsx)(Zg,{children:e.title}),e.subtitle&&(0,i.jsx)(N,{textStyle:"subtitle",children:e.subtitle})]}),(0,i.jsxs)($,{as:"nav",gap:"3",children:["calendar"===e.positionsDisplay&&(0,i.jsx)(cA,{max:e.event.endAt,min:e.event.startAt,value:o,onChange:r}),"list"===e.positionsDisplay&&!e.hideListView&&(0,i.jsx)(Ni,{width:160,children:(0,i.jsx)(Uf,{rightIcon:"xmark",value:l,onChange:c,onRightIconClick:()=>c(null)})}),!e.hideListView&&e.setPositionsDisplay&&(0,i.jsx)(Ni,{width:200,children:(0,i.jsxs)(VI,{value:e.positionsDisplay,onChange:e.setPositionsDisplay,children:[(0,i.jsx)("option",{value:"calendar",children:s("Calendar")}),(0,i.jsx)("option",{value:"list",children:s("List")})]})}),e.canMemberAssign&&(0,i.jsx)(pa,{to:eg.EDIT_ASSIGNMENT(t,n,a),children:s("_diter_les_affe_42283")}),e.canMemberAssign&&(0,i.jsxs)(Ep,{children:[(0,i.jsx)(Lp,{children:(0,i.jsx)(pa,{color:"white",leftIcon:"ellipsis-vertical"})}),(0,i.jsx)(Np,{placement:"bottom-end",children:(0,i.jsx)($p,{icon:"circle-check",onClick:()=>m(!0),children:s("mettre_jour_d_54198")})})]})]})]}),"calendar"===e.positionsDisplay?(0,i.jsx)(xE,{assignments:e.assignments,dayStartTime:e.event.dayStartTime,endAt:e.event.endAt,featureFlags:e.featureFlags,renderPosition:e.renderPosition,selectedDay:o,startAt:e.event.startAt}):!e.hideListView&&(0,i.jsx)(SE,{assignments:e.assignments,reload:e.reload,selectedDay:l})]}),IE&&(0,i.jsx)(IE,{assignments:e.assignments,isOpen:u,onClose:()=>m(!1),onSuccess:()=>e.reload()})]})},bE=d.createContext({});function vE(){return d.useContext(bE)}const AE=e=>(0,i.jsx)(i.Fragment,{children:e.children});AE.displayName="TabPanel";const CE=j(pa,{height:"auto",borderRadius:"initial",fontWeight:"$medium",paddingBlock:"$3",alignItems:"center",justifyContent:"center",flex:"1 0 0",variants:{selected:{true:{cursor:"inherit",color:"$primary500",borderBlockEnd:"2px solid $primary500"},false:{color:"$gray500",borderBlockEnd:"2px solid transparent","&:hover, &:focus-visible":{color:"$gray800"},"&:hover":{borderBlockEnd:"2px solid $gray200"}}}}}),EE={Root:({children:e,...t})=>{const[n,a]=d.useState(0);return(0,i.jsx)(bE.Provider,{value:{currentTab:n,setCurrentTab:a},children:(0,i.jsx)(cE,{...t,children:e})})},Header:({children:e,...t})=>{const[n,a]=d.useMemo(()=>(0,Xl.A)(d.Children.toArray(e),e=>d.isValidElement(e)&&e.type===EE.Tabs),[e]);return(0,i.jsxs)(uE,{...t,children:[a,n]})},Body:({children:e,...t})=>{const{currentTab:n}=vE(),a=d.useMemo(()=>d.Children.toArray(e).filter(e=>d.isValidElement(e)&&e.type===AE),[e]);return(0,i.jsx)(mE,{...t,children:a[n]})},Tabs:({children:e,...t})=>{const{currentTab:n,setCurrentTab:a}=vE(),s=d.useMemo(()=>d.Children.toArray(e).filter(e=>d.isValidElement(e)&&e.type===EE.Tab),[e]);return(0,i.jsx)($,{direction:"column",width:1,...w(t),children:(0,i.jsx)(EE.TabList,{children:s.map((e,t)=>(0,i.jsx)(CE,{color:"invisible",role:"tab",selected:n===t,onClick:()=>{a(t)},children:e},t))})})},Tab:e=>(0,i.jsx)($,{align:"center",css:{paddingBlock:"$4"},gap:"2",justify:"center",children:e.children}),TabList:e=>(0,i.jsx)($,{"aria-orientation":"horizontal",as:M.Nav,css:{borderBottom:"1px solid $gray200",alignItems:"stretch",alignContent:"center",justifyContent:"center",padding:"0 $6",gap:"$6",...e.css},role:"tablist",width:1,children:e.children}),TabPanel:AE},TE=({children:e,...t})=>(0,i.jsx)(N,{as:"abbr",textStyle:"abbreviation",...t,children:e}),RE=e=>(0,i.jsx)(Ni,{"aria-atomic":!0,"aria-live":"polite",css:{background:"white",borderBottom:"1px solid $gray200",borderLeft:"1px solid $gray200",borderRight:"1px solid $gray200",width:"100%",paddingBlock:"$6",...e.css},children:(0,i.jsx)(Af,{...e})}),ME=e=>(0,i.jsx)(Ni,{"aria-atomic":!0,"aria-live":"polite",children:e.children}),DE=()=>(0,i.jsxs)(Ni,{"aria-busy":!0,children:[(0,i.jsx)(fS,{}),(0,i.jsx)(fS,{}),(0,i.jsx)(fS,{})]}),OE=e=>{const{params:{organizationId:t,eventId:n},translate:a}=$g(),[s,o,r]=_v(""),[l,c]=d.useState(null),[u,m]=d.useState(0),{data:g,isLoading:p}=Ri("query PositionAssignedMembersTabPanel(\n $organizationId: OrganizationId!\n $eventId: EventId\n $positionId: PositionId!\n $name: String\n $limit: Int\n $offset: Int\n $sort: UsersInfosSort\n) {\n organization: organizationPublic(id: $organizationId) {\n event(id: $eventId) {\n position(id: $positionId) {\n assignedMembers(name: $name, limit: $limit, offset: $offset, sort: $sort) {\n nodes {\n id\n ...UserInfoNameAndPicture\n }\n numberOfPages\n totalCount\n }\n }\n }\n }\n}\n",{organizationId:t,eventId:n,positionId:e.positionId,name:h(o)?o:void 0,offset:u,sort:l},[La.UserInfoNameAndPictureFragment]);const{numberOfPages:f,totalCount:I}=sS(g.organization?.event?.position.assignedMembers),_=g.organization?.event;return(0,i.jsx)(i.Fragment,{children:(0,i.jsx)($,{css:{flex:"1",overflow:"hidden"},width:1,children:(0,i.jsx)(pb,{css:{width:"100%"},filters:(0,i.jsx)(Ni,{role:"search",width:320,children:(0,i.jsx)(hh,{icon:"magnifying-glass",placeholder:a("rechercher_un_m_05904"),type:"search",value:s,onChange:r})}),headerCells:(0,i.jsx)(lx,{children:(0,i.jsx)(pS,{attribute:Ut.Name,setSort:c,sort:l,children:a("nom_complet_du_71872")})}),numberOfPages:f,offset:u,rows:p?(0,i.jsx)(DE,{}):F(_.position.assignedMembers.nodes)?(0,i.jsx)(ME,{children:_.position.assignedMembers.nodes.map(e=>(0,i.jsx)(mx,{children:(0,i.jsx)(rx,{role:"gridcell",children:(0,i.jsx)(CS,{userInfo:{...e,email:""}})})},e.id))}):(0,i.jsx)(RE,{imageSrc:bh.WeezeventBlankPerson,title:a("il_n_y_a_aucun_10373")}),setOffset:m,totalCount:I})})})},wE=e=>{const{params:{organizationId:t,eventId:n},translate:a}=$g(),{data:s,loader:o}=Ri("query PositionInformationTabPanel(\n $organizationId: OrganizationId!\n $eventId: EventId\n $positionId: PositionId!\n) {\n organization: organizationPublic(id: $organizationId) {\n event(id: $eventId) {\n position(id: $positionId) {\n description\n range\n leaders {\n ...LeaderInfos\n }\n address\n latitude\n longitude\n zoom\n layer\n traces {\n ...Trace\n }\n }\n }\n }\n}\n",{organizationId:t,eventId:n,positionId:e.positionId},[La.LeaderInfosFragment,La.TraceFragment]);const r=Ci(Yl),d=s.organization?.event;return(0,i.jsx)(Ip,{children:o||!d||(d.position.description||d.position.range||F(d.position.leaders)||d.position.range||lu(d.position)?(0,i.jsxs)($,{direction:"column",gap:"6",children:[d.position.description&&(0,i.jsxs)($,{direction:"column",gap:"1",children:[(0,i.jsx)(Zg,{textStyle:"subheading",children:a("description_du_95106")}),(0,i.jsx)(yp,{text:d.position.description})]}),d.position.range&&(0,i.jsxs)($,{direction:"column",gap:"1",children:[(0,i.jsx)(Zg,{textStyle:"subheading",children:a("Date")}),(0,i.jsx)(N,{children:r.toComponents(d.position.range)})]}),F(d.position.leaders)&&(0,i.jsxs)($,{direction:"column",gap:"1",children:[(0,i.jsx)(Zg,{textStyle:"subheading",children:a("reponsable_82458_plural")}),d.position.leaders.map(e=>(0,i.jsx)(Ni,{children:(0,i.jsx)(CS,{areContactLinksEnabled:!0,showPhoneNumber:!0,size:40,userInfo:e.userInfo})},e.userInfo.id))]}),lu(d.position)&&(0,i.jsxs)($,{direction:"column",gap:"1",children:[(0,i.jsx)(Zg,{textStyle:"subheading",children:a("localisation_38416")}),ru(d.position)&&(0,i.jsx)(gE,{children:d.position.address}),du(d.position)&&(0,i.jsx)(Ni,{height:380,width:1,children:(0,i.jsx)(lE,{initialZoom:d.position.zoom,layer:d.position.layer,point:So(d.position),traces:d.position.traces})})]})]}):(0,i.jsx)(Af,{imageSrc:bh.WeezeventBlankPerson,title:a("il_n_y_a_aucun_10373")}))})},PE=e=>{const{params:{organizationId:t,eventId:n},translate:a}=$g(),{data:s,loader:o}=Ri("query PositionRightPanel(\n $organizationId: OrganizationId!\n $eventId: EventId\n $positionId: PositionId!\n) {\n organization: organizationPublic(id: $organizationId) {\n event(id: $eventId) {\n position(id: $positionId) {\n id\n name\n acronym\n color\n icon\n assignedMembers {\n totalCount\n }\n }\n }\n }\n}\n",{organizationId:t,eventId:n,positionId:e.positionId},[]);return o||(s.organization.event?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(EE.Header,{heading:(0,i.jsxs)(Zg,{children:[s.organization.event.position.name,h(s.organization.event.position.acronym)&&(0,i.jsx)(TE,{css:{marginInlineStart:"$2"},children:s.organization.event.position.acronym})]}),id:e.labelId,leftIcon:da(s.organization.event.position.icon),leftIconColor:s.organization.event.position.color,setIsOpen:e.setIsOpen,children:(0,i.jsxs)(EE.Tabs,{css:{},height:1,children:[(0,i.jsx)(EE.Tab,{children:a("informations_22954")}),(0,i.jsx)(EE.Tab,{children:a("membres_affect_76655",s.organization.event.position.assignedMembers.totalCount)})]})}),(0,i.jsxs)(EE.Body,{children:[(0,i.jsx)(EE.TabPanel,{children:(0,i.jsx)(wE,{positionId:e.positionId})}),(0,i.jsx)(EE.TabPanel,{children:(0,i.jsx)(OE,{positionId:e.positionId})})]})]}):(0,i.jsx)(xm,{}))},$E=e=>{const[t,n]=(0,d.useState)(!1),a=(0,rh.A)("rightpanel-");return(0,d.useEffect)(()=>(e.positionId&&!t?n(!0):n(!1),()=>{n(!1)}),[e.positionId]),(0,i.jsx)(EE.Root,{isOpen:t,labelId:a,setIsOpen:n,size:"md",onClose:()=>e.setDisplayedPositionId(null),children:e.positionId&&(0,i.jsx)(PE,{labelId:a,positionId:e.positionId,setIsOpen:n})})},kE=e=>{const{params:{organizationId:t,eventId:n,userInfoId:a},translate:s}=$g(),{data:o,loader:r,reload:l}=Es({organizationId:t,eventId:n,userInfoId:a}),[c,u]=(0,d.useState)(null),m=Ti(),g=(0,d.useMemo)(()=>(0,ho.A)(!o.organization?.hideAssignmentsUntilConfirmationEmailSent||o.organization?.hideAssignmentsUntilConfirmationEmailSent&&o.event?.volunteerRegistration.isAssignmentsEmailSent?o.event?.volunteerRegistration.positionsSlotsUsersInfos:[],e=>e.positionSlot.range.start.toMillis()),[o.event,o.organization]),h=s("planning_de_vos_51737"),p=[...m(s("visualisez_l_in_88697","{1}"),(0,i.jsx)("b",{style:{color:"var(--colors-gray800)"},children:o.event?.name}))];return r||(0,i.jsxs)(i.Fragment,{children:[F(g)?(0,i.jsx)(jE,{assignments:g,canMemberAssign:!1,event:o.event,featureFlags:{isV4:!0},hideListView:!0,positionsDisplay:"calendar",reload:()=>{l(),g.length<=1&&e.reloadHeader()},renderPosition:(e,t)=>(0,i.jsx)(pa,{color:"invisible",style:{width:"100%",padding:"unset",blockSize:"fit-content"},onClick:()=>u(t),children:e}),subtitle:p,title:h}):(0,i.jsxs)($,{as:"section",css:{background:"white",bd:!0,padding:"$6 $7 $7 $7"},direction:"column",gap:"6",justify:"center",children:[(0,i.jsx)($,{align:"center",as:"header",gap:"4",children:(0,i.jsxs)(Ni,{as:"hgroup",css:{flex:"1"},children:[(0,i.jsx)(Zg,{children:h}),p&&(0,i.jsx)(N,{textStyle:"subtitle",children:p})]})}),(0,i.jsx)($,{css:{bd:!0,padding:"$9 $7"},children:(0,i.jsx)(Af,{imageSrc:bh.WeezeventBlankPerson,subtitle:s("ici_seront_affi_69159"),title:s("encore_un_peu_d_88675")})})]}),c&&(0,i.jsx)($E,{positionId:c,setDisplayedPositionId:u})]})},NE=e=>{const t=Ei(),n=Sp(),a=Sh(),s=Ci(Hl),o=d.useMemo(()=>{try{return s.getFormatter()}catch{return null}},[]);return(0,i.jsxs)($,{align:"center",css:{boxShadow:"$xs",padding:"$4",flex:"1",blockSize:"100%"},gap:"4",children:[!n&&(0,i.jsx)($,{align:"center",css:{background:"$gray100",borderRadius:"$2",color:"$gray700"},height:40,justify:"center",width:40,children:(0,i.jsx)(la,{icon:"file-lines"})}),(0,i.jsxs)($,{css:{flex:"1"},direction:"column",children:[(0,i.jsx)(Zg,{css:{lineBreak:"anywhere",whiteSpace:"normal"},textStyle:"subheading",children:e.document.name}),(0,i.jsxs)($,{css:{ellipsis:!0},direction:n?"column":"row",gap:n?void 0:"1",children:[e.subtitle&&(0,i.jsx)(i.Fragment,{children:(0,i.jsxs)(N,{textStyle:"subtitle",children:[e.subtitle,!n&&" | "]})}),(0,i.jsx)(N,{textStyle:"subtitle",children:o&&"number"==typeof e.document.size&&e.document.size>0&&o.format(e.document.size).replace(/^([\d,.]+)/,"$1 ")})]})]}),(0,i.jsx)(pa,{color:"white",download:!0,leftIcon:"arrow-down-to-bracket",target:"_blank",to:e.document.url,children:a&&t("t_l_charger_03283")})]})},LE=e=>{const{params:{organizationId:t,userInfoId:n},translate:a}=$g(),s=Ci(pd),o=(0,d.useCallback)(e=>{e&&(e.onload=()=>{const t=e.contentDocument.body.scrollHeight;e.style.height=`${t}px`,e.contentDocument.body.style.margin="0",e.contentDocument.body.style.overflow="hidden",e.parentElement.style.height=`${t+64}px`})},[]),r=Ti(),{data:l,loader:c}=Ri("query CampaignRightPanel(\n $organizationId: OrganizationId!\n $userInfoId: UsersInfoId!\n $campaignId: CampaignId!\n) {\n organization(id: $organizationId) {\n userInfo(id: $userInfoId) {\n campaign(id: $campaignId) {\n id\n name\n sentAt\n campaignType\n subject\n text\n preview(userInfoId: $userInfoId)\n\n documents {\n ...DocumentEmailPreview\n }\n\n emailSender {\n fromEmail\n fromName\n }\n createdBy {\n email\n name\n nameOrEmail\n }\n }\n }\n }\n}\n",{organizationId:t,userInfoId:n,campaignId:e.campaignId},[La.DocumentEmailPreviewFragment]);const u=l.organization?.userInfo.campaign.sentAt?.setZone($a.c9.local().zone);return c||(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(uE,{heading:(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Zg,{children:l.organization.userInfo.campaign.name}),(0,i.jsx)(N,{textStyle:"subtitle",children:[...r(a("envoy_e_le_1_90336","{1}","{2}"),(0,i.jsx)(Vl,{dateTime:u,children:s.toLocaleString(u,Za.DateTime)}),(0,i.jsx)(Oh,{to:`mailto:${l.organization.userInfo.campaign.createdBy.email}?subject=${encodeURIComponent(a("re_1_84422",l.organization.userInfo.campaign.subject))}`,children:l.organization.userInfo.campaign.createdBy?.nameOrEmail}))]})]}),id:e.labelId,leftIcon:l.organization.userInfo.campaign.campaignType===re.Email?"at":"message",leftIconColor:"black",setIsOpen:e.setIsOpen}),(0,i.jsx)(mE,{css:{blockSize:"100%",backgroundColor:"$gray100"},children:(0,i.jsx)($,{css:{background:"white",borderRadius:"$2",boxShadow:"$md",inlineSize:"100%"},direction:"column",gap:"3",children:(0,i.jsxs)($,{css:{background:"$gray200",borderRadius:"$2",padding:"$7"},direction:"column",gap:"6",children:[(0,i.jsx)(Ni,{css:{padding:0,minBlockSize:"300px",marginBlockStart:"$3",blockSize:"fit-content !important","& iframe":{background:"white",border:"none",borderRadius:"$2",overflow:"hidden",inlineSize:"100%"}},children:(0,i.jsx)("iframe",{ref:o,srcDoc:l.organization.userInfo.campaign.preview})}),F(l.organization.userInfo.campaign.documents)&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Zg,{textStyle:"subheading",children:a("pi_ces_jointes_36761")}),(0,i.jsx)(Ip,{css:{padding:0},children:(0,i.jsx)($,{direction:"column",children:l.organization.userInfo.campaign.documents.map(e=>(0,i.jsx)(NE,{document:e},e.id))})})]})]})})})]})},zE=e=>{const[t,n]=(0,d.useState)(!1),a=(0,rh.A)("rightpanel-");return(0,d.useEffect)(()=>(e.campaignId&&!t?n(!0):n(!1),()=>{n(!1)}),[e.campaignId]),(0,i.jsx)(cE,{isOpen:t,labelId:a,setIsOpen:n,size:"md",onClose:()=>e.setDisplayedCampaignId(null),children:e.campaignId&&(0,i.jsx)(LE,{campaignId:e.campaignId,labelId:a,setIsOpen:n})})},FE=e=>{const{translate:t}=$g(),n=Sp(),a=Ti(),s=Ci(pd),o=e.campaign.email?.sentAt??e.campaign.sentAt?.setZone($a.c9.local().zone)??$a.c9.now();return(0,i.jsxs)(mx,{css:{"&:hover":{background:"$gray100"}},onMouseLeave:e=>{Ap(e.target)},children:[(0,i.jsx)(rx,{css:{flex:"1"},children:(0,i.jsxs)($,{direction:"column",width:1,children:[(0,i.jsx)(Zg,{css:{ellipsis:!0,fontSize:"$textSm"},textStyle:"subheading",children:e.campaign.name}),(0,i.jsx)(N,{css:{ellipsis:!0},textStyle:"subtitle",children:[...a(t("envoy_e_le_1_90336","{1}","{2}"),(0,i.jsx)(Vl,{dateTime:o,children:s.toLocaleString(o,n?Za.ShortDateTime:Za.DateTime)}),(0,i.jsx)(Oh,{to:`mailto:${e.campaign.createdBy.email}?subject=${encodeURIComponent(t("re_1_84422",e.campaign.subject))}`,children:e.campaign.createdBy.nameOrEmail}))]})]})}),(0,i.jsxs)(rx,{css:{flex:n?"0 50px":"0 150px"},children:[(0,i.jsx)(Ni,{width:22,children:e.campaign.campaignType===re.Email?(0,i.jsx)(la,{icon:"at"}):(0,i.jsx)(la,{icon:"message"})}),!n&&e.campaign.campaignType]}),(0,i.jsx)(rx,{css:{flex:"0 200px"},justify:"end",children:(0,i.jsx)(pa,{color:"white",textAlign:"center",onClick:()=>e.setDisplayedCampaignId(e.campaign.id),children:t("lire_le_message_68344")})})]})},UE=()=>{const{params:{organizationId:e,eventId:t,userInfoId:n},translate:a}=$g(),s=Sp(),[o,r]=(0,d.useState)(null),[l,c]=(0,d.useState)(25),[u,m]=(0,d.useState)(0),g=(0,d.useCallback)(()=>{m(0)},[m]),h=(0,d.useCallback)(e=>{c(e),g()},[c,g]),{data:p,isLoading:f,loader:I}=Ri("query UserCampaigns(\n $organizationId: OrganizationId!\n $eventId: EventId\n $userInfoId: UsersInfoId!\n $limit: Int\n $offset: Int\n $sort: CampaignsSort\n) {\n organization(id: $organizationId) {\n name\n\n event: eventMaybe(id: $eventId) {\n name\n }\n }\n\n userInfo(id: $userInfoId) {\n campaigns(\n eventId: $eventId\n states: [Done, Template]\n limit: $limit\n offset: $offset\n sort: $sort\n ) {\n nodes {\n id\n name\n campaignType\n state\n subject\n sentAt\n\n email(userInfoId: $userInfoId) {\n sentAt\n }\n\n createdBy {\n id\n email\n nameOrEmail\n }\n }\n\n numberOfPages\n totalCount\n }\n }\n}\n",{organizationId:e,eventId:t??null,userInfoId:n,limit:l,offset:u,sort:o},[]),{numberOfPages:_,totalCount:x}=sS(p.userInfo?.campaigns),[y,S]=(0,d.useState)(null);return I||(0,i.jsxs)(i.Fragment,{children:[F(p.userInfo.campaigns.nodes)?(0,i.jsx)($,{css:{flex:"1",overflow:"hidden"},width:1,children:(0,i.jsx)(IS,{css:{borderStartStartRadius:"$radii$2",borderStartEndRadius:"$radii$2",blockSize:"fit-content"},featureFlags:{isV4:!0},headerRow:(0,i.jsxs)(lx,{children:[(0,i.jsx)(pS,{attribute:se.Name,setSort:r,sort:o,children:a("titre_de_la_cam_20463")}),(0,i.jsx)(pS,{attribute:se.Type,css:{flex:s?"0 50px":"0 150px"},setSort:r,sort:o,children:a("type_35427")}),(0,i.jsx)(dx,{width:200})]}),paginationRow:(0,i.jsx)(yS,{children:(0,i.jsx)(xS,{limit:l,numberOfPages:_,offset:u,setLimit:h,setOffset:m,showLimits:!0,totalCount:x})}),children:f?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(fS,{}),(0,i.jsx)(fS,{}),(0,i.jsx)(fS,{})]}):p.userInfo.campaigns.nodes.map(e=>(0,i.jsx)(FE,{campaign:e,setDisplayedCampaignId:S},e.id))})}):(0,i.jsx)($,{css:{bd:!0,padding:"$9 $7"},children:(0,i.jsx)(Af,{imageSrc:bh.WeezeventBlankSwissArmyKnife,subtitle:a("ici_seront_affi_69159"),title:a("ici_seront_affi_06596")})}),(0,i.jsx)(zE,{campaignId:y,setDisplayedCampaignId:S})]})},BE=()=>{const{params:{organizationId:e,eventId:t,userInfoId:n},translate:a}=$g(),s=Sp(),[o,r]=(0,d.useState)(null),[l,c]=(0,d.useState)(2),[u,m]=(0,d.useState)(0),g=(0,d.useCallback)(()=>{m(0)},[m]),h=(0,d.useCallback)(e=>{c(e),g()},[c,g]),{data:p,loader:f,isLoading:I}=Ri('query UserDocuments(\n $organizationId: OrganizationId!\n $eventId: EventId\n $isEvent: Boolean!\n $userInfoId: UsersInfoId!\n $limit: Int\n $offset: Int\n $sort: DocumentsSort\n) {\n organization(id: $organizationId) {\n ...OrganizationMembersSpace\n country\n customBadges\n hideAssignmentsUntilConfirmationEmailSent\n\n event: eventMaybe(id: $eventId) {\n name\n country\n usePositions\n }\n\n userInfo(id: $userInfoId) {\n name\n nameOrEmail\n fields\n language: fieldValue(slug: "language")\n\n volunteerRegistration(eventId: $eventId) {\n state\n isAssignmentsEmailSent\n\n customDocuments(sent: true) {\n ...CustomDocumentPopulation\n }\n }\n\n links(eventId: $eventId) @include(if: $isEvent) {\n ...UserInfoLinks\n }\n\n documents(eventId: $eventId, limit: $limit, offset: $offset, sort: $sort) {\n nodes {\n ...DocumentEmailPreview\n\n campaigns {\n id\n name\n sentAt\n\n emailSender {\n fromEmail\n fromName\n }\n\n createdBy {\n email\n name\n nameOrEmail\n }\n }\n }\n\n numberOfPages\n totalCount\n }\n }\n }\n}\n',{organizationId:e,eventId:t??null,isEvent:!!t,userInfoId:n,limit:l,offset:u,sort:o},[La.OrganizationMembersSpaceFragment,La.CustomDocumentPopulationFragment,La.UserInfoLinksFragment,La.DocumentEmailPreviewFragment]),_=(0,d.useMemo)(()=>p.organization?.userInfo,[p.organization?.userInfo]),x=(0,d.useMemo)(()=>(0,ho.A)(_?.volunteerRegistration?.customDocuments.filter(e=>Ku(e.populationsIds,_.fields.population)),e=>e.name),[_?.volunteerRegistration?.customDocuments,_]),y=!!p.organization?.event?.usePositions&&_?.volunteerRegistration?.state===Bt.Assigned&&(!p.organization.hideAssignmentsUntilConfirmationEmailSent||_.volunteerRegistration.isAssignmentsEmailSent),S=(0,d.useMemo)(()=>_?.links&&(y||F(p.organization.customBadges)||F(x))||F(_?.documents.nodes),[x,p.organization?.customBadges,y,_]),{numberOfPages:j,totalCount:b}=sS(_?.documents),v=Ci(pd),A=Ti(),C={lang:_?.language};return f||(0,i.jsx)(i.Fragment,{children:S?(0,i.jsxs)(i.Fragment,{children:[_.links&&(0,i.jsxs)($,{direction:"column",gap:"3",children:[y&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(pa,{color:"white",download:`${_.nameOrEmail}-assignments`,leftIcon:"arrow-down-to-bracket",rightIcon:"arrow-right",to:Xc(_.links.userAssignmentsLink,"pdf"),children:a("t_l_charger_la_82882")}),(0,i.jsx)(pa,{color:"white",download:`${_.nameOrEmail}-planning`,leftIcon:"arrow-down-to-bracket",rightIcon:"arrow-right",to:Xc(_.links.userPlanningLink,"pdf"),children:a("t_l_charger_le_74660")}),(0,i.jsx)(pa,{color:"white",download:`${_.nameOrEmail}-planning-days`,leftIcon:"arrow-down-to-bracket",rightIcon:"arrow-right",to:Xc(_.links.userPlanningDaysLink,"pdf"),children:a("t_l_charger_le_43587")}),(0,i.jsx)(pa,{color:"white",download:`${_.nameOrEmail}-planning-list`,leftIcon:"arrow-down-to-bracket",rightIcon:"arrow-right",to:Xc(_.links.userPlanningListLink,"pdf"),children:a("t_l_charger_le_58518")})]}),p.organization.customBadges.map(e=>(0,i.jsx)(pa,{color:"white",download:`${_.nameOrEmail}-custom-badge`,leftIcon:"arrow-down-to-bracket",rightIcon:"arrow-right",to:Xc(_.links.userCustomBadgeLinks[e],"pdf",C),children:a("t_l_charger_1_80752",Pb(e))},e)),x.map((e,t)=>(0,i.jsx)(pa,{color:"white",download:`${_.nameOrEmail}-custom-document`,leftIcon:"arrow-down-to-bracket",rightIcon:"arrow-right",to:Xc(_.links.userCustomDocumentLinks[e.slug],"pdf",C),children:a("t_l_charger_1_80752",e.name)},t))]}),F(_.documents.nodes)&&(0,i.jsx)($,{css:{flex:"1",overflow:"hidden"},width:1,children:(0,i.jsx)(IS,{css:{borderStartStartRadius:"$radii$2",borderStartEndRadius:"$radii$2",blockSize:"fit-content"},featureFlags:{isV4:!0},headerRow:(0,i.jsxs)(lx,{children:[(0,i.jsx)(pS,{attribute:ve.Name,setSort:r,sort:o,children:a("nom_du_document_73868")}),(0,i.jsx)(dx,{width:200})]}),paginationRow:(0,i.jsx)(yS,{children:(0,i.jsx)(xS,{limit:l,numberOfPages:j,offset:u,setLimit:h,setOffset:m,showLimits:!0,totalCount:b})}),children:I?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(fS,{}),(0,i.jsx)(fS,{}),(0,i.jsx)(fS,{})]}):_.documents.nodes.map(e=>(0,i.jsx)(mx,{children:(0,i.jsx)(NE,{document:e,subtitle:F(e.campaigns)?1===e.campaigns.length?[...A(a("envoy_e_le_1_90336","{1}","{2}"),(0,i.jsx)(Vl,{dateTime:e.campaigns[0].sentAt,children:v.toLocaleString(e.campaigns[0].sentAt,s?Za.ShortDateTime:Za.DateTime)}),(0,i.jsx)(Oh,{to:`mailto:${e.campaigns[0].createdBy.email}?subject=${encodeURIComponent(a("re_1_84422",e.name))}`,children:e.campaigns[0].createdBy?.nameOrEmail}))]:a("sent_multiple_t_40457"):void 0})},e.id))})})]}):(0,i.jsx)($,{css:{bd:!0,padding:"$9 $7"},children:(0,i.jsx)(Af,{imageSrc:bh.WeezeventBlankSwissArmyKnife,subtitle:a("ici_seront_affi_73099"),title:a("pour_le_moment_62758")})})})},GE=e=>{const t=Ei(),n=Ci(pd),a=Ti();return(0,i.jsx)(xf,{color:"white-with-green-icon",leftIcon:"circle-check",leftIconStyle:"solid",children:[...a(t("rempli_le_1_29292","{1}"),(0,i.jsx)(Vl,{dateTime:e.formUserInfo.insertedAt,children:n.toLocaleString(e.formUserInfo.insertedAt,Za.DateOnly.MonthLong)}))]})},VE=()=>{const{params:{organizationId:e,eventId:t,userInfoId:n},translate:a}=$g(),s=Sp(),{data:o,loader:r}=Ri("query MemberRegistrationForms($eventId: EventId, $userInfoId: UsersInfoId!) {\n userInfo(id: $userInfoId) {\n ...MemberRegistrationUserInfo\n\n ...FormsUsersInfosWished\n\n volunteerRegistration(eventId: $eventId) {\n state\n accreditationState\n volunteerMinutes\n isAccreditationsEmailSent\n isAssignmentsEmailSent\n\n positionsSlotsUsersInfos {\n ...MemberAssignment\n }\n\n accreditationsUsersInfos {\n ...MemberAccreditation\n }\n }\n }\n}\n",{eventId:t,userInfoId:n},[La.MemberRegistrationUserInfoFragment,La.FormsUsersInfosWishedFragment,La.MemberAssignmentFragment,La.MemberAccreditationFragment]),l=(0,d.useMemo)(()=>{const e=o.userInfo?.formsUsersInfos.filter(e=>t?null!==e.eventId:null===e.eventId);return F(e)?e.flatMap(e=>e.form.elements.length>0?[e]:[]):[]},[o.userInfo?.formsUsersInfos,t]);return r||(0,i.jsx)(i.Fragment,{children:F(l)?(0,i.jsx)(_p,{children:l.map(o=>(0,i.jsx)(jp,{badge:(0,i.jsx)(GE,{formUserInfo:o}),button:(0,i.jsx)(pa,{to:Pg.MEMBER_FORM_EDIT({organizationId:e,userInfoId:n,eventId:t,formId:o.formId}),children:s?(0,i.jsx)(la,{icon:"eye"}):a("view_48132")}),title:o.form.name},o.form.id))}):(0,i.jsx)($,{css:{bd:!0,padding:"$9 $7"},children:(0,i.jsx)(Af,{imageSrc:bh.WeezeventBlankPerson,subtitle:a("ici_seront_affi_54352"),title:a("encore_un_peu_d_88675")})})})},WE=()=>{const{params:{organizationId:e,eventId:t,userInfoId:n},translate:a}=$g(),{data:s,loader:o,reload:r}=Ri("query MemberRegistration($organizationId: OrganizationId!, $eventId: EventId, $isEvent: Boolean!) {\n organization(id: $organizationId) {\n ...OrganizationMembersSpace\n country\n\n event: eventMaybe(id: $eventId) @include(if: $isEvent) {\n name\n country\n usePositions\n useAccreditations\n useForms\n useCampaigns\n useDocuments\n }\n }\n\n user {\n ...UserPermissions\n }\n}\n",{organizationId:e,eventId:t,isEvent:!!t},[La.OrganizationMembersSpaceFragment,La.UserPermissionsFragment]),d=Ti(),l=s.organization?.event,c=!!l?.usePositions,u=!!l?.useAccreditations,m=!t||!!l?.useCampaigns,g=!t||!!l?.useDocuments,h=!(t&&!l?.useForms&&(c||u||m||g)),p=c?Pg.MEMBER_POSITIONS({organizationId:e,userInfoId:n,eventId:t}):u?Pg.MEMBER_ACCREDITATIONS({organizationId:e,userInfoId:n,eventId:t}):h?Pg.MEMBER_FORMS({organizationId:e,userInfoId:n,eventId:t}):m?Pg.MEMBER_MESSAGES({organizationId:e,userInfoId:n,eventId:t}):Pg.MEMBER_DOCUMENTS({organizationId:e,userInfoId:n,eventId:t});return o||(0,i.jsx)(Lx,{userPermissions:s.user,children:(0,i.jsx)(Gp,{featureFlags:{isV4:!0},isLoading:!1,organization:s.organization,spaceDesign:{themeColors:s.organization?.membersSpaceDesign?.colors,bannerSrc:s.organization?.membersSpaceDesign?.banner?.url,logoSrc:s.organization?.membersSpaceDesign?.logo?.url},children:(0,i.jsxs)(lo.dO,{children:[(0,i.jsx)(lo.rd,{exact:!0,from:Pg.MEMBER({organizationId:":organizationId",userInfoId:":userInfoId"}),to:Pg.MEMBER_FORMS({organizationId:e,userInfoId:n})}),(0,i.jsx)(lo.rd,{exact:!0,from:Pg.MEMBER({organizationId:":organizationId",userInfoId:":userInfoId",eventId:":eventId"}),to:p}),(0,i.jsx)(lo.qh,{path:[Pg.MEMBER_FORM_EDIT({organizationId:":organizationId",userInfoId:":userInfoId",formId:":formId"}),Pg.MEMBER_FORM_EDIT({organizationId:":organizationId",userInfoId:":userInfoId",eventId:":eventId",formId:":formId"})],children:(0,i.jsx)(nE,{reload:r})}),(0,i.jsx)(lo.qh,{children:(0,i.jsxs)(Hx,{featureFlags:{isV4:!0},children:[h&&(0,i.jsx)(Zx,{featureFlags:{isV4:!0},getPath:(i=!1)=>Pg.MEMBER_FORMS({organizationId:i?":organizationId":e,userInfoId:i?":userInfoId":n,eventId:i?t?":eventId":void 0:t}),subtitle:[...d(a(t?"pr_visualiser_e_41845":"pr_visualiser_e_26744","{1}"),(0,i.jsx)("b",{style:{color:"var(--colors-gray800)"},children:t?s.organization.event?.name:s.organization.name}))],title:a("formulaires_rem_62495"),children:(0,i.jsx)(VE,{})}),t&&c&&(0,i.jsx)(Zx,{featureFlags:{isV4:!1},getPath:(i=!1)=>Pg.MEMBER_POSITIONS({organizationId:i?":organizationId":e,eventId:i?":eventId":t,userInfoId:i?":userInfoId":n}),title:a("planning_de_vos_51737"),children:(0,i.jsx)(kE,{reloadHeader:r})}),t&&u&&(0,i.jsx)(Zx,{featureFlags:{isV4:!1},getPath:(i=!1)=>Pg.MEMBER_ACCREDITATIONS({organizationId:i?":organizationId":e,userInfoId:i?":userInfoId":n,eventId:i?":eventId":t}),title:a("accr_ditations_39450"),children:(0,i.jsx)(fE,{excludeAccreditations:s.organization.membersSpaceExcludeAccreditations,reloadHeader:r})}),m&&(0,i.jsx)(Zx,{featureFlags:{isV4:!0},getPath:(i=!1)=>Pg.MEMBER_MESSAGES({organizationId:i?":organizationId":e,userInfoId:i?":userInfoId":n,eventId:i?t?":eventId":void 0:t}),subtitle:[...d(a(t?"visualiser_l_en_66953":"visualiser_l_en_48128","{1}"),(0,i.jsx)("b",{style:{color:"var(--colors-gray800)"},children:t?s.organization.event?.name:s.organization.name}))],title:a("messages_37744"),children:(0,i.jsx)(UE,{})}),g&&(0,i.jsx)(Zx,{featureFlags:{isV4:!0},getPath:(i=!1)=>Pg.MEMBER_DOCUMENTS({organizationId:i?":organizationId":e,userInfoId:i?":userInfoId":n,eventId:i?t?":eventId":void 0:t}),subtitle:[...d(a(t?"visualiser_l_en_48475":"visualiser_l_en_47798","{1}"),(0,i.jsx)("b",{style:{color:"var(--colors-gray800)"},children:t?s.organization.event?.name:s.organization.name}))],title:a("Documents"),children:(0,i.jsx)(BE,{})})]})})]})})})},qE=()=>(0,i.jsx)(tE,{children:(0,i.jsx)(WE,{})}),YE=e=>{const{params:{organizationId:t},translate:n}=$g(),a=Sh();return(0,i.jsxs)($,{align:"center",css:{padding:"$4 $6",borderBlockEnd:"1px solid $gray200","&:last-of-type":{borderBlockEnd:"none"}},gap:"3",children:[(0,i.jsx)(Fp,{email:e.userInfo.email,image:e.userInfo.picture?.url,name:e.userInfo.name,size:40}),(0,i.jsxs)($,{css:{flex:"1",overflow:"hidden"},direction:"column",children:[(0,i.jsx)(Ni,{color:"gray800",css:{ellipsis:!0},fontWeight:"medium",children:h(e.userInfo.name)?e.userInfo.name:"-"}),(0,i.jsx)(Ni,{color:"gray500",css:{ellipsis:!0},children:e.userInfo.email})]}),(0,i.jsx)($,{children:a?(0,i.jsx)(pa,{color:"white",size:"sm",to:Pg.USER_PROFILE({organizationId:t,userInfoId:e.userInfo.id}),children:n("voir_son_profil_99428")}):(0,i.jsx)(pa,{color:"white",leftIcon:"arrow-right",size:"sm",to:Pg.USER_PROFILE({organizationId:t,userInfoId:e.userInfo.id})})})]})};function HE(){const{history:e,params:{organizationId:t}}=$g(),{data:n,isLoading:i}=Ri("query Profiles($organizationId: OrganizationId!) {\n user {\n usersInfos(organizationId: $organizationId) {\n id\n name\n email\n picture {\n url\n }\n }\n }\n}\n",{organizationId:t},[]);return(0,d.useEffect)(()=>{1===n.user?.usersInfos.length&&e.replace(Pg.USER_PROFILE({organizationId:t,userInfoId:n.user.usersInfos[0].id}))},[n.user]),{isLoading:i,usersInfos:n.user?.usersInfos}}const ZE=()=>(0,i.jsx)(Ch,{children:(0,i.jsxs)($,{css:{width:"100%","@desktop":{width:"$modalMd"}},direction:"column",gap:"3",children:[(0,i.jsx)(Th,{borderRadius:"$1",height:23,width:1}),(0,i.jsx)(Th,{borderRadius:"$2",height:74,width:1}),(0,i.jsx)(Th,{borderRadius:"$2",height:74,width:1}),(0,i.jsx)(Th,{borderRadius:"$2",height:74,width:1})]})}),KE=()=>{const e=Ei(),{organizationId:t}=Di(),{usersInfos:n,isLoading:a}=HE();return(0,i.jsx)(Ug,{isLoading:a,loadDelegationsSpace:!1,loadMembersSpace:!0,organizationId:t,skeleton:(0,i.jsx)(ZE,{}),children:(0,i.jsx)(Ch,{children:(0,i.jsxs)($,{css:{width:"100%","@desktop":{width:"$modalMd"}},direction:"column",gap:"3",children:[(0,i.jsx)(Ni,{color:"gray800",fontSize:"textMd",fontWeight:"semiBold",children:e("_quel_profil_s_67307")}),(n??[]).map(e=>(0,i.jsx)(YE,{userInfo:e},e.id))]})})})},QE=()=>{const e=Ei(),{organizationId:t}=Di(),{usersInfos:n,isLoading:a}=HE();return(0,i.jsx)(Ug,{isLoading:a,loadDelegationsSpace:!1,loadMembersSpace:!0,organizationId:t,skeleton:(0,i.jsx)(XC,{}),children:(0,i.jsx)(QC,{children:(0,i.jsx)(KC,{children:(0,i.jsx)(Ip,{heading:e("s_lectionnez_le_89411"),subtitle:F(n)?[e("listes_des_prof_08757",n[0].email)]:void 0,children:(0,i.jsx)($,{css:{bd:!0},direction:"column",children:(n??[]).map(e=>(0,i.jsx)(YE,{userInfo:e},e.id))})})})})})},XE=()=>{const{params:{organizationId:e}}=$g();return(0,i.jsxs)(lo.dO,{children:[(0,i.jsx)(lo.rd,{exact:!0,from:Pg.USER_PROFILES({organizationId:":organizationId"}),to:Or(Pg.USER_PROFILES({organizationId:":organizationId"}))}),(0,i.jsx)(lo.qh,{children:kg(e)?(0,i.jsx)(KE,{}):(0,i.jsx)(QE,{})})]})},JE=()=>(0,i.jsxs)(lo.dO,{children:[(0,i.jsx)(lo.qh,{path:Pg.USER_PROFILES({organizationId:":organizationId"}),children:(0,i.jsx)(XE,{})}),(0,i.jsx)(lo.qh,{path:Pg.USER_PROFILE({organizationId:":organizationId",userInfoId:":userInfoId"}),children:(0,i.jsx)(JC,{})}),(0,i.jsx)(lo.qh,{path:[Rc.ORGANIZATION_DELEGATIONS({organizationId:":organizationId"}),Yc.DELEGATIONS({organizationId:":organizationId"}),Yc.DELEGATIONS({organizationId:":organizationId",eventId:":eventId"}),Yc.DELEGATION({organizationId:":organizationId",delegationId:":delegationId"}),Yc.DELEGATION({organizationId:":organizationId",eventId:":eventId",delegationId:":delegationId"})],children:(0,i.jsx)(VC,{})}),(0,i.jsx)(lo.qh,{path:[Pg.MEMBER({organizationId:":organizationId",userInfoId:":userInfoId"}),Pg.MEMBER({organizationId:":organizationId",userInfoId:":userInfoId",eventId:":eventId"})],children:(0,i.jsx)(qE,{})}),(0,i.jsx)(lo.rd,{to:Dr(Rc.ORGANIZATION({organizationId:":organizationId"}))})]});var eT,tT,nT;function iT(){return iT=Object.assign?Object.assign.bind():function(e){for(var t=1;t{const e=Ei(),{user:t}=io(),n=wi();let a=null,s=null;try{a=n.getItemInt(fh.ORGANIZATION_ID),s=n.getItemInt(fh.EVENT_ID)}catch{}return kc.includes(location.host)?(a=Nc[window.location.host],(0,i.jsx)(xm,{path:`/v2/organization/${a}/auth`})):a&&s?t?(0,i.jsx)(xm,{path:og(a,s)}):(0,i.jsx)(xm,{path:ig(a,s)}):(0,i.jsxs)($,{align:"center",css:{backgroundImage:`url(${jh.Background404})`,backgroundSize:"cover",height:"100%",width:"100%"},direction:"column",justify:"center",children:[(0,i.jsx)(Ni,{css:{marginBottom:"100px",width:"300px"},children:(0,i.jsx)(aT,{})}),(0,i.jsx)(Ni,{css:{color:"white",fontSize:"24px"},children:e("il_n_y_a_rien_33749")})]})},oT=e=>(0,i.jsx)(ym,{getRedirectPath:({organizationId:t,eventId:n,userInfoId:i,delegationId:a})=>"number"!=typeof t||"number"!=typeof n||i||a?location.pathname.includes("delegation")&&"number"==typeof t?Dr(Rc.ORGANIZATION_DELEGATIONS({organizationId:t})):location.pathname.startsWith(`${sa.HEAVENT_PUBLIC_URL.pathname}/organization`)&&"number"==typeof t?Dr(Rc.ORGANIZATION({organizationId:t})):eg.HOME:rg(e.isEmbed,ig(t,n)),shouldHaveUser:!0,children:e.children}),rT=e=>(0,i.jsx)(ym,{getRedirectPath:({organizationId:t,eventId:n})=>"number"==typeof t&&"number"==typeof n?rg(e.isEmbed,og(t,n)):location.pathname.includes("delegations")&&"number"==typeof t?Or(Rc.ORGANIZATION_DELEGATIONS({organizationId:t})):location.pathname.startsWith(`${sa.HEAVENT_PUBLIC_URL.pathname}/organization`)&&"number"==typeof t?Or(Pg.USER_PROFILES({organizationId:t})):eg.HOME,shouldHaveUser:!1,children:e.children}),dT=e=>(0,i.jsxs)(lo.dO,{children:[(0,i.jsx)(lo.qh,{path:"/v2",children:(0,i.jsx)(fp,{})}),(0,i.jsx)(lo.rd,{from:rg(e.isEmbed,ig(":organizationId",":eventId")),to:Dr(Rc.ORGANIZATION({organizationId:":organizationId"}))}),(0,i.jsx)(lo.rd,{from:rg(e.isEmbed,sg(":organizationId",":eventId")),to:Dr(Rc.ORGANIZATION({organizationId:":organizationId"}))}),(0,i.jsx)(lo.qh,{exact:!0,path:[Rc.ORGANIZATION_FORM({organizationId:":organizationId",formId:":formId"}),rc.EVENT_FORM({organizationId:":organizationId",eventId:":eventId",formId:":formId"}),rc.EVENT_TEAM_FORM({organizationId:":organizationId",eventId:":eventId",formId:":formId",teamCode:":teamCode"}),Yc.DELEGATION_FORM({organizationId:":organizationId",delegationId:":delegationId",formId:":formId"}),Yc.DELEGATION_FORM({organizationId:":organizationId",delegationId:":delegationId",eventId:":eventId",formId:":formId"})],children:(0,i.jsx)(vx,{})}),(0,i.jsx)(lo.qh,{exact:!0,path:rc.EVENTS({organizationId:":organizationId"}),children:(0,i.jsx)(Vp,{})}),(0,i.jsx)(lo.qh,{path:eg.USER_FIELD_UPDATE(":organizationId",":userInfoId",":customFieldSlug",":value"),children:(0,i.jsx)(Tx,{})}),(0,i.jsx)(lo.qh,{path:Dr(Rc.ORGANIZATION_DELEGATIONS({organizationId:":organizationId"})),children:(0,i.jsx)(rT,{isEmbed:!1,children:(0,i.jsx)(Bh,{loadDelegationsSpace:!0,loadMembersSpace:!1})})}),(0,i.jsx)(lo.qh,{path:Dr(Rc.ORGANIZATION({organizationId:":organizationId"})),children:(0,i.jsx)(rT,{isEmbed:!1,children:(0,i.jsx)(Bh,{loadDelegationsSpace:!1,loadMembersSpace:!0})})}),(0,i.jsx)(lo.qh,{path:Rc.ORGANIZATION({organizationId:":organizationId"}),children:(0,i.jsx)(oT,{isEmbed:!1,children:(0,i.jsx)(JE,{})})}),(0,i.jsx)(lo.qh,{children:(0,i.jsx)(sT,{})})]}),lT=()=>(gg(""),(0,d.useEffect)(()=>{const e=document.querySelector("link[rel~='icon']");var t;e&&(e.href=(t=location.host)===Dc?mg:t===$c?ug:t===Pc?lg:cg)}),function(){const[e,t]=(0,d.useState)(null),n=({data:e})=>{const{type:n,...i}=e||{};n===Ax.AUTO_RESIZE_ACK&&(t(i),window.parent.postMessage({id:window.name,type:Ax.AUTO_RESIZE_CHANGE_DIMENSIONS,blockSize:window.outerHeight,inlineSize:743},i.page??"*"))};(0,d.useEffect)(()=>null===e?(window.addEventListener("message",n),window.parent.postMessage({id:window.name,type:Ax.AUTO_RESIZE_SYN},"*"),()=>window.removeEventListener("message",n)):void 0,[e])}(),(0,i.jsx)(Ni,{css:{color:"$gray800",height:"100%",overflow:"auto",position:"relative",width:"100%",backgroundColor:"$grayCustom50"},children:(0,i.jsx)(zi.Kd,{basename:sa.HEAVENT_PUBLIC_URL.pathnameOptional,children:(0,i.jsxs)(lo.dO,{children:[(0,i.jsx)(lo.qh,{path:ag(":code",":source",":organizationId",":eventId"),children:(0,i.jsx)(dg,{})}),(0,i.jsx)(lo.qh,{path:"/embed",children:(0,i.jsx)(dT,{isEmbed:!0})}),(0,i.jsx)(lo.qh,{children:(0,i.jsx)(dT,{isEmbed:!1})})]})})}));(0,ya.render)((0,i.jsx)(d.StrictMode,{children:(0,i.jsx)(e=>{const[t,n]=(0,d.useState)(null);return(0,d.useEffect)(()=>{let e=!0;return Vs().then(t=>{e&&n(t)}).catch(()=>{alert("Could not load application, please try again.")}),()=>{e=!1}},[]),t?e.render(t):(0,i.jsx)(ua,{})},{render:e=>(0,i.jsx)(no.Provider,{value:e,children:(0,i.jsx)(Im,{children:(0,i.jsx)(Ys,{children:(0,i.jsx)(Pa,{children:(0,i.jsx)(to,{children:(0,i.jsxs)(Ks.Provider,{value:{designSystem:Hs},children:[(0,i.jsx)(_m,{}),(0,i.jsx)(lT,{})]})})})})})})})}),document.getElementById("heavent-react-hook"))},6400:(e,t,n)=>{"use strict";e.exports=n.p+"img/weezConstruction-fb73dc7a26ba038c44b3.png"},6687:(e,t,n)=>{"use strict";e.exports=n.p+"svg/weezeventBlankMessages-76d6e6c79babc98388e9.svg"},6751:(e,t,n)=>{"use strict";e.exports=n.p+"svg/fileJPG-aed94d931a32b62e488d.svg"},6954:(e,t,n)=>{"use strict";e.exports=n.p+"img/googleSatellite-0706bcb1678d6e9f219c.png"},6959:(e,t,n)=>{"use strict";e.exports=n.p+"svg/filePNG-c7dc0a7230035611ad34.svg"},7008:(e,t,n)=>{"use strict";e.exports=n.p+"img/accreditation-7f66e46aebab965fa566.png"},7619:(e,t,n)=>{"use strict";e.exports=n.p+"svg/fileBlank-8285380bb91a4d9e73d7.svg"},7648:(e,t,n)=>{"use strict";e.exports=n.p+"svg/weezeventBlankPerson-e5c7b9cf3fcac68f3df8.svg"},8144:(e,t,n)=>{"use strict";e.exports=n.p+"img/asoHomeBackground-e46035697a28c8d248e6.jpg"},8184:(e,t,n)=>{"use strict";e.exports=n.p+"svg/dnsWrongDomain-3954cd8d9805c779a7bc.svg"},8242:e=>{"use strict";e.exports="data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMjAgMjAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZmlsbD0iI2ZmZiIgZD0ibTExLjA3NyAxNSAuOTkxLTEuNDE2YS43NS43NSAwIDEgMSAxLjIyOS44NmwtMS4xNDggMS42NGEuNzQ4Ljc0OCAwIDAgMS0uMjE3LjIwNiA1LjI1MSA1LjI1MSAwIDAgMS04LjUwMy01Ljk1NS43NDEuNzQxIDAgMCAxIC4xMi0uMjc0bDEuMTQ3LTEuNjM5YS43NS43NSAwIDEgMSAxLjIyOC44Nkw0LjkzMyAxMC43bC4wMDYuMDAzYTMuNzUgMy43NSAwIDAgMCA2LjEzMiA0LjI5NGwuMDA2LjAwNHptNS40OTQtNS4zMzVhLjc0OC43NDggMCAwIDEtLjEyLjI3NGwtMS4xNDcgMS42MzlhLjc1Ljc1IDAgMSAxLTEuMjI4LS44NmwuODYtMS4yM2EzLjc1IDMuNzUgMCAwIDAtNi4xNDQtNC4zMDFsLS44NiAxLjIyOWEuNzUuNzUgMCAwIDEtMS4yMjktLjg2bDEuMTQ4LTEuNjRhLjc0OC43NDggMCAwIDEgLjIxNy0uMjA2IDUuMjUxIDUuMjUxIDAgMCAxIDguNTAzIDUuOTU1em0tNC41NjMtMi41MzJhLjc1Ljc1IDAgMCAxIC4xODQgMS4wNDVsLTMuMTU1IDQuNTA1YS43NS43NSAwIDEgMS0xLjIyOS0uODZsMy4xNTUtNC41MDZhLjc1Ljc1IDAgMCAxIDEuMDQ1LS4xODR6Ii8+PC9zdmc+"},8264:(e,t,n)=>{"use strict";e.exports=n.p+"img/userProfile-37c0493d81fa861def54.png"},8301:(e,t,n)=>{"use strict";e.exports=n.p+"img/aso-897aab2a976d58ba485d.png"},8652:(e,t,n)=>{"use strict";e.exports=n.p+"svg/done-d3eb25606e0846af3988.svg"},8798:(e,t,n)=>{"use strict";e.exports=n.p+"svg/recrewteerMarker-a76de3956f8adec5ded2.svg"},9191:()=>{},9625:(e,t,n)=>{"use strict";e.exports=n.p+"svg/fileCSV-6ea65d2431d3a4293aad.svg"},9848:(e,t,n)=>{"use strict";e.exports=n.p+"svg/filePDF-37cadc96dae9bc3a10ef.svg"},9882:(e,t,n)=>{"use strict";e.exports=n.p+"img/ign-3cfd31ba578060a32efa.png"}},e=>{e.O(0,[121],()=>e(e.s=6377)),e.O()}]); //# sourceMappingURL=volunteers-c6debd285735949521c2.cjs.map