It’s not possible to access document from Velo because Wix uses a virtual DOM. To use this specific library without modification you’ll need to put it in a Custom Element and also adjust the import to be a tag that retrieves the library from a CDN.
There may also be other libraries that do this kind of functionality but don’t require DOM access.