整理桌面
This commit is contained in:
		
							
								
								
									
										20
									
								
								node_modules/nanoid/LICENSE
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										20
									
								
								node_modules/nanoid/LICENSE
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							@@ -0,0 +1,20 @@
 | 
			
		||||
The MIT License (MIT)
 | 
			
		||||
 | 
			
		||||
Copyright 2017 Andrey Sitnik <andrey@sitnik.ru>
 | 
			
		||||
 | 
			
		||||
Permission is hereby granted, free of charge, to any person obtaining a copy of
 | 
			
		||||
this software and associated documentation files (the "Software"), to deal in
 | 
			
		||||
the Software without restriction, including without limitation the rights to
 | 
			
		||||
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
 | 
			
		||||
the Software, and to permit persons to whom the Software is furnished to do so,
 | 
			
		||||
subject to the following conditions:
 | 
			
		||||
 | 
			
		||||
The above copyright notice and this permission notice shall be included in all
 | 
			
		||||
copies or substantial portions of the Software.
 | 
			
		||||
 | 
			
		||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 | 
			
		||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
 | 
			
		||||
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
 | 
			
		||||
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
 | 
			
		||||
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
 | 
			
		||||
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 | 
			
		||||
							
								
								
									
										39
									
								
								node_modules/nanoid/README.md
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										39
									
								
								node_modules/nanoid/README.md
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							@@ -0,0 +1,39 @@
 | 
			
		||||
# Nano ID
 | 
			
		||||
 | 
			
		||||
<img src="https://ai.github.io/nanoid/logo.svg" align="right"
 | 
			
		||||
     alt="Nano ID logo by Anton Lovchikov" width="180" height="94">
 | 
			
		||||
 | 
			
		||||
**English** | [Русский](./README.ru.md) | [简体中文](./README.zh-CN.md)
 | 
			
		||||
 | 
			
		||||
A tiny, secure, URL-friendly, unique string ID generator for JavaScript.
 | 
			
		||||
 | 
			
		||||
> “An amazing level of senseless perfectionism,
 | 
			
		||||
> which is simply impossible not to respect.”
 | 
			
		||||
 | 
			
		||||
* **Small.** 130 bytes (minified and gzipped). No dependencies.
 | 
			
		||||
  [Size Limit] controls the size.
 | 
			
		||||
* **Fast.** It is 2 times faster than UUID.
 | 
			
		||||
* **Safe.** It uses hardware random generator. Can be used in clusters.
 | 
			
		||||
* **Short IDs.** It uses a larger alphabet than UUID (`A-Za-z0-9_-`).
 | 
			
		||||
  So ID size was reduced from 36 to 21 symbols.
 | 
			
		||||
* **Portable.** Nano ID was ported
 | 
			
		||||
  to [19 programming languages](#other-programming-languages).
 | 
			
		||||
 | 
			
		||||
```js
 | 
			
		||||
import { nanoid } from 'nanoid'
 | 
			
		||||
model.id = nanoid() //=> "V1StGXR8_Z5jdHi6B-myT"
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
Supports modern browsers, IE [with Babel], Node.js and React Native.
 | 
			
		||||
 | 
			
		||||
[online tool]: https://gitpod.io/#https://github.com/ai/nanoid/
 | 
			
		||||
[with Babel]:  https://developer.epages.com/blog/coding/how-to-transpile-node-modules-with-babel-and-webpack-in-a-monorepo/
 | 
			
		||||
[Size Limit]:  https://github.com/ai/size-limit
 | 
			
		||||
 | 
			
		||||
<a href="https://evilmartians.com/?utm_source=nanoid">
 | 
			
		||||
  <img src="https://evilmartians.com/badges/sponsored-by-evil-martians.svg"
 | 
			
		||||
       alt="Sponsored by Evil Martians" width="236" height="54">
 | 
			
		||||
</a>
 | 
			
		||||
 | 
			
		||||
## Docs
 | 
			
		||||
Read **[full docs](https://github.com/ai/nanoid#readme)** on GitHub.
 | 
			
		||||
							
								
								
									
										35
									
								
								node_modules/nanoid/async/index.browser.cjs
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										35
									
								
								node_modules/nanoid/async/index.browser.cjs
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							@@ -0,0 +1,35 @@
 | 
			
		||||
let random = bytes =>
 | 
			
		||||
  Promise.resolve(crypto.getRandomValues(new Uint8Array(bytes)))
 | 
			
		||||
let customAlphabet = (alphabet, size) => {
 | 
			
		||||
  let mask = (2 << (Math.log(alphabet.length - 1) / Math.LN2)) - 1
 | 
			
		||||
  let step = -~((1.6 * mask * size) / alphabet.length)
 | 
			
		||||
  return () => {
 | 
			
		||||
    let id = ''
 | 
			
		||||
    while (true) {
 | 
			
		||||
      let bytes = crypto.getRandomValues(new Uint8Array(step))
 | 
			
		||||
      let i = step
 | 
			
		||||
      while (i--) {
 | 
			
		||||
        id += alphabet[bytes[i] & mask] || ''
 | 
			
		||||
        if (id.length === size) return Promise.resolve(id)
 | 
			
		||||
      }
 | 
			
		||||
    }
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
let nanoid = (size = 21) => {
 | 
			
		||||
  let id = ''
 | 
			
		||||
  let bytes = crypto.getRandomValues(new Uint8Array(size))
 | 
			
		||||
  while (size--) {
 | 
			
		||||
    let byte = bytes[size] & 63
 | 
			
		||||
    if (byte < 36) {
 | 
			
		||||
      id += byte.toString(36)
 | 
			
		||||
    } else if (byte < 62) {
 | 
			
		||||
      id += (byte - 26).toString(36).toUpperCase()
 | 
			
		||||
    } else if (byte < 63) {
 | 
			
		||||
      id += '_'
 | 
			
		||||
    } else {
 | 
			
		||||
      id += '-'
 | 
			
		||||
    }
 | 
			
		||||
  }
 | 
			
		||||
  return Promise.resolve(id)
 | 
			
		||||
}
 | 
			
		||||
module.exports = { nanoid, customAlphabet, random }
 | 
			
		||||
							
								
								
									
										35
									
								
								node_modules/nanoid/async/index.browser.js
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										35
									
								
								node_modules/nanoid/async/index.browser.js
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							@@ -0,0 +1,35 @@
 | 
			
		||||
let random = bytes =>
 | 
			
		||||
  Promise.resolve(crypto.getRandomValues(new Uint8Array(bytes)))
 | 
			
		||||
let customAlphabet = (alphabet, size) => {
 | 
			
		||||
  let mask = (2 << (Math.log(alphabet.length - 1) / Math.LN2)) - 1
 | 
			
		||||
  let step = -~((1.6 * mask * size) / alphabet.length)
 | 
			
		||||
  return () => {
 | 
			
		||||
    let id = ''
 | 
			
		||||
    while (true) {
 | 
			
		||||
      let bytes = crypto.getRandomValues(new Uint8Array(step))
 | 
			
		||||
      let i = step
 | 
			
		||||
      while (i--) {
 | 
			
		||||
        id += alphabet[bytes[i] & mask] || ''
 | 
			
		||||
        if (id.length === size) return Promise.resolve(id)
 | 
			
		||||
      }
 | 
			
		||||
    }
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
let nanoid = (size = 21) => {
 | 
			
		||||
  let id = ''
 | 
			
		||||
  let bytes = crypto.getRandomValues(new Uint8Array(size))
 | 
			
		||||
  while (size--) {
 | 
			
		||||
    let byte = bytes[size] & 63
 | 
			
		||||
    if (byte < 36) {
 | 
			
		||||
      id += byte.toString(36)
 | 
			
		||||
    } else if (byte < 62) {
 | 
			
		||||
      id += (byte - 26).toString(36).toUpperCase()
 | 
			
		||||
    } else if (byte < 63) {
 | 
			
		||||
      id += '_'
 | 
			
		||||
    } else {
 | 
			
		||||
      id += '-'
 | 
			
		||||
    }
 | 
			
		||||
  }
 | 
			
		||||
  return Promise.resolve(id)
 | 
			
		||||
}
 | 
			
		||||
export { nanoid, customAlphabet, random }
 | 
			
		||||
							
								
								
									
										35
									
								
								node_modules/nanoid/async/index.cjs
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										35
									
								
								node_modules/nanoid/async/index.cjs
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							@@ -0,0 +1,35 @@
 | 
			
		||||
let crypto = require('crypto')
 | 
			
		||||
let { urlAlphabet } = require('../url-alphabet/index.cjs')
 | 
			
		||||
let random = bytes =>
 | 
			
		||||
  new Promise((resolve, reject) => {
 | 
			
		||||
    crypto.randomFill(Buffer.allocUnsafe(bytes), (err, buf) => {
 | 
			
		||||
      if (err) {
 | 
			
		||||
        reject(err)
 | 
			
		||||
      } else {
 | 
			
		||||
        resolve(buf)
 | 
			
		||||
      }
 | 
			
		||||
    })
 | 
			
		||||
  })
 | 
			
		||||
let customAlphabet = (alphabet, size) => {
 | 
			
		||||
  let mask = (2 << (31 - Math.clz32((alphabet.length - 1) | 1))) - 1
 | 
			
		||||
  let step = Math.ceil((1.6 * mask * size) / alphabet.length)
 | 
			
		||||
  let tick = id =>
 | 
			
		||||
    random(step).then(bytes => {
 | 
			
		||||
      let i = step
 | 
			
		||||
      while (i--) {
 | 
			
		||||
        id += alphabet[bytes[i] & mask] || ''
 | 
			
		||||
        if (id.length === size) return id
 | 
			
		||||
      }
 | 
			
		||||
      return tick(id)
 | 
			
		||||
    })
 | 
			
		||||
  return () => tick('')
 | 
			
		||||
}
 | 
			
		||||
let nanoid = (size = 21) =>
 | 
			
		||||
  random(size).then(bytes => {
 | 
			
		||||
    let id = ''
 | 
			
		||||
    while (size--) {
 | 
			
		||||
      id += urlAlphabet[bytes[size] & 63]
 | 
			
		||||
    }
 | 
			
		||||
    return id
 | 
			
		||||
  })
 | 
			
		||||
module.exports = { nanoid, customAlphabet, random }
 | 
			
		||||
							
								
								
									
										56
									
								
								node_modules/nanoid/async/index.d.ts
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										56
									
								
								node_modules/nanoid/async/index.d.ts
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							@@ -0,0 +1,56 @@
 | 
			
		||||
/**
 | 
			
		||||
 * Generate secure URL-friendly unique ID. The non-blocking version.
 | 
			
		||||
 *
 | 
			
		||||
 * By default, the ID will have 21 symbols to have a collision probability
 | 
			
		||||
 * similar to UUID v4.
 | 
			
		||||
 *
 | 
			
		||||
 * ```js
 | 
			
		||||
 * import { nanoid } from 'nanoid/async'
 | 
			
		||||
 * nanoid().then(id => {
 | 
			
		||||
 *   model.id = id
 | 
			
		||||
 * })
 | 
			
		||||
 * ```
 | 
			
		||||
 *
 | 
			
		||||
 * @param size Size of the ID. The default size is 21.
 | 
			
		||||
 * @returns A promise with a random string.
 | 
			
		||||
 */
 | 
			
		||||
export function nanoid(size?: number): Promise<string>
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * A low-level function.
 | 
			
		||||
 * Generate secure unique ID with custom alphabet. The non-blocking version.
 | 
			
		||||
 *
 | 
			
		||||
 * Alphabet must contain 256 symbols or less. Otherwise, the generator
 | 
			
		||||
 * will not be secure.
 | 
			
		||||
 *
 | 
			
		||||
 * @param alphabet Alphabet used to generate the ID.
 | 
			
		||||
 * @param size Size of the ID.
 | 
			
		||||
 * @returns A promise with a random string.
 | 
			
		||||
 *
 | 
			
		||||
 * ```js
 | 
			
		||||
 * import { customAlphabet } from 'nanoid/async'
 | 
			
		||||
 * const nanoid = customAlphabet('0123456789абвгдеё', 5)
 | 
			
		||||
 * nanoid().then(id => {
 | 
			
		||||
 *   model.id = id //=> "8ё56а"
 | 
			
		||||
 * })
 | 
			
		||||
 * ```
 | 
			
		||||
 */
 | 
			
		||||
export function customAlphabet(
 | 
			
		||||
  alphabet: string,
 | 
			
		||||
  size: number
 | 
			
		||||
): () => Promise<string>
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * Generate an array of random bytes collected from hardware noise.
 | 
			
		||||
 *
 | 
			
		||||
 * ```js
 | 
			
		||||
 * import { random } from 'nanoid/async'
 | 
			
		||||
 * random(5).then(bytes => {
 | 
			
		||||
 *   bytes //=> [10, 67, 212, 67, 89]
 | 
			
		||||
 * })
 | 
			
		||||
 * ```
 | 
			
		||||
 *
 | 
			
		||||
 * @param bytes Size of the array.
 | 
			
		||||
 * @returns A promise with a random bytes array.
 | 
			
		||||
 */
 | 
			
		||||
export function random(bytes: number): Promise<Uint8Array>
 | 
			
		||||
							
								
								
									
										35
									
								
								node_modules/nanoid/async/index.js
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										35
									
								
								node_modules/nanoid/async/index.js
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							@@ -0,0 +1,35 @@
 | 
			
		||||
import crypto from 'crypto'
 | 
			
		||||
import { urlAlphabet } from '../url-alphabet/index.js'
 | 
			
		||||
let random = bytes =>
 | 
			
		||||
  new Promise((resolve, reject) => {
 | 
			
		||||
    crypto.randomFill(Buffer.allocUnsafe(bytes), (err, buf) => {
 | 
			
		||||
      if (err) {
 | 
			
		||||
        reject(err)
 | 
			
		||||
      } else {
 | 
			
		||||
        resolve(buf)
 | 
			
		||||
      }
 | 
			
		||||
    })
 | 
			
		||||
  })
 | 
			
		||||
let customAlphabet = (alphabet, size) => {
 | 
			
		||||
  let mask = (2 << (31 - Math.clz32((alphabet.length - 1) | 1))) - 1
 | 
			
		||||
  let step = Math.ceil((1.6 * mask * size) / alphabet.length)
 | 
			
		||||
  let tick = id =>
 | 
			
		||||
    random(step).then(bytes => {
 | 
			
		||||
      let i = step
 | 
			
		||||
      while (i--) {
 | 
			
		||||
        id += alphabet[bytes[i] & mask] || ''
 | 
			
		||||
        if (id.length === size) return id
 | 
			
		||||
      }
 | 
			
		||||
      return tick(id)
 | 
			
		||||
    })
 | 
			
		||||
  return () => tick('')
 | 
			
		||||
}
 | 
			
		||||
let nanoid = (size = 21) =>
 | 
			
		||||
  random(size).then(bytes => {
 | 
			
		||||
    let id = ''
 | 
			
		||||
    while (size--) {
 | 
			
		||||
      id += urlAlphabet[bytes[size] & 63]
 | 
			
		||||
    }
 | 
			
		||||
    return id
 | 
			
		||||
  })
 | 
			
		||||
export { nanoid, customAlphabet, random }
 | 
			
		||||
							
								
								
									
										26
									
								
								node_modules/nanoid/async/index.native.js
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										26
									
								
								node_modules/nanoid/async/index.native.js
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							@@ -0,0 +1,26 @@
 | 
			
		||||
import { getRandomBytesAsync } from 'expo-random'
 | 
			
		||||
import { urlAlphabet } from '../url-alphabet/index.js'
 | 
			
		||||
let random = getRandomBytesAsync
 | 
			
		||||
let customAlphabet = (alphabet, size) => {
 | 
			
		||||
  let mask = (2 << (31 - Math.clz32((alphabet.length - 1) | 1))) - 1
 | 
			
		||||
  let step = Math.ceil((1.6 * mask * size) / alphabet.length)
 | 
			
		||||
  let tick = id =>
 | 
			
		||||
    random(step).then(bytes => {
 | 
			
		||||
      let i = step
 | 
			
		||||
      while (i--) {
 | 
			
		||||
        id += alphabet[bytes[i] & mask] || ''
 | 
			
		||||
        if (id.length === size) return id
 | 
			
		||||
      }
 | 
			
		||||
      return tick(id)
 | 
			
		||||
    })
 | 
			
		||||
  return () => tick('')
 | 
			
		||||
}
 | 
			
		||||
let nanoid = (size = 21) =>
 | 
			
		||||
  random(size).then(bytes => {
 | 
			
		||||
    let id = ''
 | 
			
		||||
    while (size--) {
 | 
			
		||||
      id += urlAlphabet[bytes[size] & 63]
 | 
			
		||||
    }
 | 
			
		||||
    return id
 | 
			
		||||
  })
 | 
			
		||||
export { nanoid, customAlphabet, random }
 | 
			
		||||
							
								
								
									
										12
									
								
								node_modules/nanoid/async/package.json
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										12
									
								
								node_modules/nanoid/async/package.json
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							@@ -0,0 +1,12 @@
 | 
			
		||||
{
 | 
			
		||||
  "type": "module",
 | 
			
		||||
  "main": "index.cjs",
 | 
			
		||||
  "module": "index.js",
 | 
			
		||||
  "react-native": {
 | 
			
		||||
    "./index.js": "./index.native.js"
 | 
			
		||||
  },
 | 
			
		||||
  "browser": {
 | 
			
		||||
    "./index.js": "./index.browser.js",
 | 
			
		||||
    "./index.cjs": "./index.browser.cjs"
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										5
									
								
								node_modules/nanoid/bin/nanoid.cjs
									
									
									
										generated
									
									
										vendored
									
									
										Executable file
									
								
							
							
						
						
									
										5
									
								
								node_modules/nanoid/bin/nanoid.cjs
									
									
									
										generated
									
									
										vendored
									
									
										Executable file
									
								
							@@ -0,0 +1,5 @@
 | 
			
		||||
#!/usr/bin/env node
 | 
			
		||||
 | 
			
		||||
let { nanoid } = require('..')
 | 
			
		||||
 | 
			
		||||
process.stdout.write(nanoid() + '\n')
 | 
			
		||||
							
								
								
									
										62
									
								
								node_modules/nanoid/index.browser.cjs
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										62
									
								
								node_modules/nanoid/index.browser.cjs
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							@@ -0,0 +1,62 @@
 | 
			
		||||
let { urlAlphabet } = require('./url-alphabet/index.cjs')
 | 
			
		||||
if (process.env.NODE_ENV !== 'production') {
 | 
			
		||||
  if (
 | 
			
		||||
    typeof navigator !== 'undefined' &&
 | 
			
		||||
    navigator.product === 'ReactNative' &&
 | 
			
		||||
    typeof crypto === 'undefined'
 | 
			
		||||
  ) {
 | 
			
		||||
    throw new Error(
 | 
			
		||||
      'React Native does not have a built-in secure random generator. ' +
 | 
			
		||||
        'If you don’t need unpredictable IDs use `nanoid/non-secure`. ' +
 | 
			
		||||
        'For secure IDs, import `react-native-get-random-values` ' +
 | 
			
		||||
        'before Nano ID.'
 | 
			
		||||
    )
 | 
			
		||||
  }
 | 
			
		||||
  if (typeof msCrypto !== 'undefined' && typeof crypto === 'undefined') {
 | 
			
		||||
    throw new Error(
 | 
			
		||||
      'Import file with `if (!window.crypto) window.crypto = window.msCrypto`' +
 | 
			
		||||
        ' before importing Nano ID to fix IE 11 support'
 | 
			
		||||
    )
 | 
			
		||||
  }
 | 
			
		||||
  if (typeof crypto === 'undefined') {
 | 
			
		||||
    throw new Error(
 | 
			
		||||
      'Your browser does not have secure random generator. ' +
 | 
			
		||||
        'If you don’t need unpredictable IDs, you can use nanoid/non-secure.'
 | 
			
		||||
    )
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
let random = bytes => crypto.getRandomValues(new Uint8Array(bytes))
 | 
			
		||||
let customRandom = (alphabet, size, getRandom) => {
 | 
			
		||||
  let mask = (2 << (Math.log(alphabet.length - 1) / Math.LN2)) - 1
 | 
			
		||||
  let step = -~((1.6 * mask * size) / alphabet.length)
 | 
			
		||||
  return () => {
 | 
			
		||||
    let id = ''
 | 
			
		||||
    while (true) {
 | 
			
		||||
      let bytes = getRandom(step)
 | 
			
		||||
      let j = step
 | 
			
		||||
      while (j--) {
 | 
			
		||||
        id += alphabet[bytes[j] & mask] || ''
 | 
			
		||||
        if (id.length === size) return id
 | 
			
		||||
      }
 | 
			
		||||
    }
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
let customAlphabet = (alphabet, size) => customRandom(alphabet, size, random)
 | 
			
		||||
let nanoid = (size = 21) => {
 | 
			
		||||
  let id = ''
 | 
			
		||||
  let bytes = crypto.getRandomValues(new Uint8Array(size))
 | 
			
		||||
  while (size--) {
 | 
			
		||||
    let byte = bytes[size] & 63
 | 
			
		||||
    if (byte < 36) {
 | 
			
		||||
      id += byte.toString(36)
 | 
			
		||||
    } else if (byte < 62) {
 | 
			
		||||
      id += (byte - 26).toString(36).toUpperCase()
 | 
			
		||||
    } else if (byte < 63) {
 | 
			
		||||
      id += '_'
 | 
			
		||||
    } else {
 | 
			
		||||
      id += '-'
 | 
			
		||||
    }
 | 
			
		||||
  }
 | 
			
		||||
  return id
 | 
			
		||||
}
 | 
			
		||||
module.exports = { nanoid, customAlphabet, customRandom, urlAlphabet, random }
 | 
			
		||||
							
								
								
									
										62
									
								
								node_modules/nanoid/index.browser.js
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										62
									
								
								node_modules/nanoid/index.browser.js
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							@@ -0,0 +1,62 @@
 | 
			
		||||
import { urlAlphabet } from './url-alphabet/index.js'
 | 
			
		||||
if (process.env.NODE_ENV !== 'production') {
 | 
			
		||||
  if (
 | 
			
		||||
    typeof navigator !== 'undefined' &&
 | 
			
		||||
    navigator.product === 'ReactNative' &&
 | 
			
		||||
    typeof crypto === 'undefined'
 | 
			
		||||
  ) {
 | 
			
		||||
    throw new Error(
 | 
			
		||||
      'React Native does not have a built-in secure random generator. ' +
 | 
			
		||||
        'If you don’t need unpredictable IDs use `nanoid/non-secure`. ' +
 | 
			
		||||
        'For secure IDs, import `react-native-get-random-values` ' +
 | 
			
		||||
        'before Nano ID.'
 | 
			
		||||
    )
 | 
			
		||||
  }
 | 
			
		||||
  if (typeof msCrypto !== 'undefined' && typeof crypto === 'undefined') {
 | 
			
		||||
    throw new Error(
 | 
			
		||||
      'Import file with `if (!window.crypto) window.crypto = window.msCrypto`' +
 | 
			
		||||
        ' before importing Nano ID to fix IE 11 support'
 | 
			
		||||
    )
 | 
			
		||||
  }
 | 
			
		||||
  if (typeof crypto === 'undefined') {
 | 
			
		||||
    throw new Error(
 | 
			
		||||
      'Your browser does not have secure random generator. ' +
 | 
			
		||||
        'If you don’t need unpredictable IDs, you can use nanoid/non-secure.'
 | 
			
		||||
    )
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
let random = bytes => crypto.getRandomValues(new Uint8Array(bytes))
 | 
			
		||||
let customRandom = (alphabet, size, getRandom) => {
 | 
			
		||||
  let mask = (2 << (Math.log(alphabet.length - 1) / Math.LN2)) - 1
 | 
			
		||||
  let step = -~((1.6 * mask * size) / alphabet.length)
 | 
			
		||||
  return () => {
 | 
			
		||||
    let id = ''
 | 
			
		||||
    while (true) {
 | 
			
		||||
      let bytes = getRandom(step)
 | 
			
		||||
      let j = step
 | 
			
		||||
      while (j--) {
 | 
			
		||||
        id += alphabet[bytes[j] & mask] || ''
 | 
			
		||||
        if (id.length === size) return id
 | 
			
		||||
      }
 | 
			
		||||
    }
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
let customAlphabet = (alphabet, size) => customRandom(alphabet, size, random)
 | 
			
		||||
let nanoid = (size = 21) => {
 | 
			
		||||
  let id = ''
 | 
			
		||||
  let bytes = crypto.getRandomValues(new Uint8Array(size))
 | 
			
		||||
  while (size--) {
 | 
			
		||||
    let byte = bytes[size] & 63
 | 
			
		||||
    if (byte < 36) {
 | 
			
		||||
      id += byte.toString(36)
 | 
			
		||||
    } else if (byte < 62) {
 | 
			
		||||
      id += (byte - 26).toString(36).toUpperCase()
 | 
			
		||||
    } else if (byte < 63) {
 | 
			
		||||
      id += '_'
 | 
			
		||||
    } else {
 | 
			
		||||
      id += '-'
 | 
			
		||||
    }
 | 
			
		||||
  }
 | 
			
		||||
  return id
 | 
			
		||||
}
 | 
			
		||||
export { nanoid, customAlphabet, customRandom, urlAlphabet, random }
 | 
			
		||||
							
								
								
									
										44
									
								
								node_modules/nanoid/index.cjs
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										44
									
								
								node_modules/nanoid/index.cjs
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							@@ -0,0 +1,44 @@
 | 
			
		||||
let crypto = require('crypto')
 | 
			
		||||
let { urlAlphabet } = require('./url-alphabet/index.cjs')
 | 
			
		||||
const POOL_SIZE_MULTIPLIER = 128
 | 
			
		||||
let pool, poolOffset
 | 
			
		||||
let fillPool = bytes => {
 | 
			
		||||
  if (!pool || pool.length < bytes) {
 | 
			
		||||
    pool = Buffer.allocUnsafe(bytes * POOL_SIZE_MULTIPLIER)
 | 
			
		||||
    crypto.randomFillSync(pool)
 | 
			
		||||
    poolOffset = 0
 | 
			
		||||
  } else if (poolOffset + bytes > pool.length) {
 | 
			
		||||
    crypto.randomFillSync(pool)
 | 
			
		||||
    poolOffset = 0
 | 
			
		||||
  }
 | 
			
		||||
  poolOffset += bytes
 | 
			
		||||
}
 | 
			
		||||
let random = bytes => {
 | 
			
		||||
  fillPool(bytes)
 | 
			
		||||
  return pool.subarray(poolOffset - bytes, poolOffset)
 | 
			
		||||
}
 | 
			
		||||
let customRandom = (alphabet, size, getRandom) => {
 | 
			
		||||
  let mask = (2 << (31 - Math.clz32((alphabet.length - 1) | 1))) - 1
 | 
			
		||||
  let step = Math.ceil((1.6 * mask * size) / alphabet.length)
 | 
			
		||||
  return () => {
 | 
			
		||||
    let id = ''
 | 
			
		||||
    while (true) {
 | 
			
		||||
      let bytes = getRandom(step)
 | 
			
		||||
      let i = step
 | 
			
		||||
      while (i--) {
 | 
			
		||||
        id += alphabet[bytes[i] & mask] || ''
 | 
			
		||||
        if (id.length === size) return id
 | 
			
		||||
      }
 | 
			
		||||
    }
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
let customAlphabet = (alphabet, size) => customRandom(alphabet, size, random)
 | 
			
		||||
let nanoid = (size = 21) => {
 | 
			
		||||
  fillPool(size)
 | 
			
		||||
  let id = ''
 | 
			
		||||
  for (let i = poolOffset - size; i < poolOffset; i++) {
 | 
			
		||||
    id += urlAlphabet[pool[i] & 63]
 | 
			
		||||
  }
 | 
			
		||||
  return id
 | 
			
		||||
}
 | 
			
		||||
module.exports = { nanoid, customAlphabet, customRandom, urlAlphabet, random }
 | 
			
		||||
							
								
								
									
										88
									
								
								node_modules/nanoid/index.d.ts
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										88
									
								
								node_modules/nanoid/index.d.ts
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							@@ -0,0 +1,88 @@
 | 
			
		||||
/**
 | 
			
		||||
 * Generate secure URL-friendly unique ID.
 | 
			
		||||
 *
 | 
			
		||||
 * By default, the ID will have 21 symbols to have a collision probability
 | 
			
		||||
 * similar to UUID v4.
 | 
			
		||||
 *
 | 
			
		||||
 * ```js
 | 
			
		||||
 * import { nanoid } from 'nanoid'
 | 
			
		||||
 * model.id = nanoid() //=> "Uakgb_J5m9g-0JDMbcJqL"
 | 
			
		||||
 * ```
 | 
			
		||||
 *
 | 
			
		||||
 * @param size Size of the ID. The default size is 21.
 | 
			
		||||
 * @returns A random string.
 | 
			
		||||
 */
 | 
			
		||||
export function nanoid(size?: number): string
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * Generate secure unique ID with custom alphabet.
 | 
			
		||||
 *
 | 
			
		||||
 * Alphabet must contain 256 symbols or less. Otherwise, the generator
 | 
			
		||||
 * will not be secure.
 | 
			
		||||
 *
 | 
			
		||||
 * @param alphabet Alphabet used to generate the ID.
 | 
			
		||||
 * @param size Size of the ID.
 | 
			
		||||
 * @returns A random string generator.
 | 
			
		||||
 *
 | 
			
		||||
 * ```js
 | 
			
		||||
 * const { customAlphabet } = require('nanoid')
 | 
			
		||||
 * const nanoid = customAlphabet('0123456789абвгдеё', 5)
 | 
			
		||||
 * nanoid() //=> "8ё56а"
 | 
			
		||||
 * ```
 | 
			
		||||
 */
 | 
			
		||||
export function customAlphabet(alphabet: string, size: number): () => string
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * Generate unique ID with custom random generator and alphabet.
 | 
			
		||||
 *
 | 
			
		||||
 * Alphabet must contain 256 symbols or less. Otherwise, the generator
 | 
			
		||||
 * will not be secure.
 | 
			
		||||
 *
 | 
			
		||||
 * ```js
 | 
			
		||||
 * import { customRandom } from 'nanoid/format'
 | 
			
		||||
 *
 | 
			
		||||
 * const nanoid = customRandom('abcdef', 5, size => {
 | 
			
		||||
 *   const random = []
 | 
			
		||||
 *   for (let i = 0; i < size; i++) {
 | 
			
		||||
 *     random.push(randomByte())
 | 
			
		||||
 *   }
 | 
			
		||||
 *   return random
 | 
			
		||||
 * })
 | 
			
		||||
 *
 | 
			
		||||
 * nanoid() //=> "fbaef"
 | 
			
		||||
 * ```
 | 
			
		||||
 *
 | 
			
		||||
 * @param alphabet Alphabet used to generate a random string.
 | 
			
		||||
 * @param size Size of the random string.
 | 
			
		||||
 * @param random A random bytes generator.
 | 
			
		||||
 * @returns A random string generator.
 | 
			
		||||
 */
 | 
			
		||||
export function customRandom(
 | 
			
		||||
  alphabet: string,
 | 
			
		||||
  size: number,
 | 
			
		||||
  random: (bytes: number) => Uint8Array
 | 
			
		||||
): () => string
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * URL safe symbols.
 | 
			
		||||
 *
 | 
			
		||||
 * ```js
 | 
			
		||||
 * import { urlAlphabet } from 'nanoid'
 | 
			
		||||
 * const nanoid = customAlphabet(urlAlphabet, 10)
 | 
			
		||||
 * nanoid() //=> "Uakgb_J5m9"
 | 
			
		||||
 * ```
 | 
			
		||||
 */
 | 
			
		||||
export const urlAlphabet: string
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * Generate an array of random bytes collected from hardware noise.
 | 
			
		||||
 *
 | 
			
		||||
 * ```js
 | 
			
		||||
 * import { customRandom, random } from 'nanoid'
 | 
			
		||||
 * const nanoid = customRandom("abcdef", 5, random)
 | 
			
		||||
 * ```
 | 
			
		||||
 *
 | 
			
		||||
 * @param bytes Size of the array.
 | 
			
		||||
 * @returns An array of random bytes.
 | 
			
		||||
 */
 | 
			
		||||
export function random(bytes: number): Uint8Array
 | 
			
		||||
							
								
								
									
										62
									
								
								node_modules/nanoid/index.dev.js
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										62
									
								
								node_modules/nanoid/index.dev.js
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							@@ -0,0 +1,62 @@
 | 
			
		||||
import { urlAlphabet } from './url-alphabet/index.js'
 | 
			
		||||
if (true) {
 | 
			
		||||
  if (
 | 
			
		||||
    typeof navigator !== 'undefined' &&
 | 
			
		||||
    navigator.product === 'ReactNative' &&
 | 
			
		||||
    typeof crypto === 'undefined'
 | 
			
		||||
  ) {
 | 
			
		||||
    throw new Error(
 | 
			
		||||
      'React Native does not have a built-in secure random generator. ' +
 | 
			
		||||
        'If you don’t need unpredictable IDs use `nanoid/non-secure`. ' +
 | 
			
		||||
        'For secure IDs, import `react-native-get-random-values` ' +
 | 
			
		||||
        'before Nano ID.'
 | 
			
		||||
    )
 | 
			
		||||
  }
 | 
			
		||||
  if (typeof msCrypto !== 'undefined' && typeof crypto === 'undefined') {
 | 
			
		||||
    throw new Error(
 | 
			
		||||
      'Import file with `if (!window.crypto) window.crypto = window.msCrypto`' +
 | 
			
		||||
        ' before importing Nano ID to fix IE 11 support'
 | 
			
		||||
    )
 | 
			
		||||
  }
 | 
			
		||||
  if (typeof crypto === 'undefined') {
 | 
			
		||||
    throw new Error(
 | 
			
		||||
      'Your browser does not have secure random generator. ' +
 | 
			
		||||
        'If you don’t need unpredictable IDs, you can use nanoid/non-secure.'
 | 
			
		||||
    )
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
let random = bytes => crypto.getRandomValues(new Uint8Array(bytes))
 | 
			
		||||
let customRandom = (alphabet, size, getRandom) => {
 | 
			
		||||
  let mask = (2 << (Math.log(alphabet.length - 1) / Math.LN2)) - 1
 | 
			
		||||
  let step = -~((1.6 * mask * size) / alphabet.length)
 | 
			
		||||
  return () => {
 | 
			
		||||
    let id = ''
 | 
			
		||||
    while (true) {
 | 
			
		||||
      let bytes = getRandom(step)
 | 
			
		||||
      let j = step
 | 
			
		||||
      while (j--) {
 | 
			
		||||
        id += alphabet[bytes[j] & mask] || ''
 | 
			
		||||
        if (id.length === size) return id
 | 
			
		||||
      }
 | 
			
		||||
    }
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
let customAlphabet = (alphabet, size) => customRandom(alphabet, size, random)
 | 
			
		||||
let nanoid = (size = 21) => {
 | 
			
		||||
  let id = ''
 | 
			
		||||
  let bytes = crypto.getRandomValues(new Uint8Array(size))
 | 
			
		||||
  while (size--) {
 | 
			
		||||
    let byte = bytes[size] & 63
 | 
			
		||||
    if (byte < 36) {
 | 
			
		||||
      id += byte.toString(36)
 | 
			
		||||
    } else if (byte < 62) {
 | 
			
		||||
      id += (byte - 26).toString(36).toUpperCase()
 | 
			
		||||
    } else if (byte < 63) {
 | 
			
		||||
      id += '_'
 | 
			
		||||
    } else {
 | 
			
		||||
      id += '-'
 | 
			
		||||
    }
 | 
			
		||||
  }
 | 
			
		||||
  return id
 | 
			
		||||
}
 | 
			
		||||
export { nanoid, customAlphabet, customRandom, urlAlphabet, random }
 | 
			
		||||
							
								
								
									
										44
									
								
								node_modules/nanoid/index.js
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										44
									
								
								node_modules/nanoid/index.js
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							@@ -0,0 +1,44 @@
 | 
			
		||||
import crypto from 'crypto'
 | 
			
		||||
import { urlAlphabet } from './url-alphabet/index.js'
 | 
			
		||||
const POOL_SIZE_MULTIPLIER = 128
 | 
			
		||||
let pool, poolOffset
 | 
			
		||||
let fillPool = bytes => {
 | 
			
		||||
  if (!pool || pool.length < bytes) {
 | 
			
		||||
    pool = Buffer.allocUnsafe(bytes * POOL_SIZE_MULTIPLIER)
 | 
			
		||||
    crypto.randomFillSync(pool)
 | 
			
		||||
    poolOffset = 0
 | 
			
		||||
  } else if (poolOffset + bytes > pool.length) {
 | 
			
		||||
    crypto.randomFillSync(pool)
 | 
			
		||||
    poolOffset = 0
 | 
			
		||||
  }
 | 
			
		||||
  poolOffset += bytes
 | 
			
		||||
}
 | 
			
		||||
let random = bytes => {
 | 
			
		||||
  fillPool(bytes)
 | 
			
		||||
  return pool.subarray(poolOffset - bytes, poolOffset)
 | 
			
		||||
}
 | 
			
		||||
let customRandom = (alphabet, size, getRandom) => {
 | 
			
		||||
  let mask = (2 << (31 - Math.clz32((alphabet.length - 1) | 1))) - 1
 | 
			
		||||
  let step = Math.ceil((1.6 * mask * size) / alphabet.length)
 | 
			
		||||
  return () => {
 | 
			
		||||
    let id = ''
 | 
			
		||||
    while (true) {
 | 
			
		||||
      let bytes = getRandom(step)
 | 
			
		||||
      let i = step
 | 
			
		||||
      while (i--) {
 | 
			
		||||
        id += alphabet[bytes[i] & mask] || ''
 | 
			
		||||
        if (id.length === size) return id
 | 
			
		||||
      }
 | 
			
		||||
    }
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
let customAlphabet = (alphabet, size) => customRandom(alphabet, size, random)
 | 
			
		||||
let nanoid = (size = 21) => {
 | 
			
		||||
  fillPool(size)
 | 
			
		||||
  let id = ''
 | 
			
		||||
  for (let i = poolOffset - size; i < poolOffset; i++) {
 | 
			
		||||
    id += urlAlphabet[pool[i] & 63]
 | 
			
		||||
  }
 | 
			
		||||
  return id
 | 
			
		||||
}
 | 
			
		||||
export { nanoid, customAlphabet, customRandom, urlAlphabet, random }
 | 
			
		||||
							
								
								
									
										62
									
								
								node_modules/nanoid/index.prod.js
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										62
									
								
								node_modules/nanoid/index.prod.js
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							@@ -0,0 +1,62 @@
 | 
			
		||||
import { urlAlphabet } from './url-alphabet/index.js'
 | 
			
		||||
if (false) {
 | 
			
		||||
  if (
 | 
			
		||||
    typeof navigator !== 'undefined' &&
 | 
			
		||||
    navigator.product === 'ReactNative' &&
 | 
			
		||||
    typeof crypto === 'undefined'
 | 
			
		||||
  ) {
 | 
			
		||||
    throw new Error(
 | 
			
		||||
      'React Native does not have a built-in secure random generator. ' +
 | 
			
		||||
        'If you don’t need unpredictable IDs use `nanoid/non-secure`. ' +
 | 
			
		||||
        'For secure IDs, import `react-native-get-random-values` ' +
 | 
			
		||||
        'before Nano ID.'
 | 
			
		||||
    )
 | 
			
		||||
  }
 | 
			
		||||
  if (typeof msCrypto !== 'undefined' && typeof crypto === 'undefined') {
 | 
			
		||||
    throw new Error(
 | 
			
		||||
      'Import file with `if (!window.crypto) window.crypto = window.msCrypto`' +
 | 
			
		||||
        ' before importing Nano ID to fix IE 11 support'
 | 
			
		||||
    )
 | 
			
		||||
  }
 | 
			
		||||
  if (typeof crypto === 'undefined') {
 | 
			
		||||
    throw new Error(
 | 
			
		||||
      'Your browser does not have secure random generator. ' +
 | 
			
		||||
        'If you don’t need unpredictable IDs, you can use nanoid/non-secure.'
 | 
			
		||||
    )
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
let random = bytes => crypto.getRandomValues(new Uint8Array(bytes))
 | 
			
		||||
let customRandom = (alphabet, size, getRandom) => {
 | 
			
		||||
  let mask = (2 << (Math.log(alphabet.length - 1) / Math.LN2)) - 1
 | 
			
		||||
  let step = -~((1.6 * mask * size) / alphabet.length)
 | 
			
		||||
  return () => {
 | 
			
		||||
    let id = ''
 | 
			
		||||
    while (true) {
 | 
			
		||||
      let bytes = getRandom(step)
 | 
			
		||||
      let j = step
 | 
			
		||||
      while (j--) {
 | 
			
		||||
        id += alphabet[bytes[j] & mask] || ''
 | 
			
		||||
        if (id.length === size) return id
 | 
			
		||||
      }
 | 
			
		||||
    }
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
let customAlphabet = (alphabet, size) => customRandom(alphabet, size, random)
 | 
			
		||||
let nanoid = (size = 21) => {
 | 
			
		||||
  let id = ''
 | 
			
		||||
  let bytes = crypto.getRandomValues(new Uint8Array(size))
 | 
			
		||||
  while (size--) {
 | 
			
		||||
    let byte = bytes[size] & 63
 | 
			
		||||
    if (byte < 36) {
 | 
			
		||||
      id += byte.toString(36)
 | 
			
		||||
    } else if (byte < 62) {
 | 
			
		||||
      id += (byte - 26).toString(36).toUpperCase()
 | 
			
		||||
    } else if (byte < 63) {
 | 
			
		||||
      id += '_'
 | 
			
		||||
    } else {
 | 
			
		||||
      id += '-'
 | 
			
		||||
    }
 | 
			
		||||
  }
 | 
			
		||||
  return id
 | 
			
		||||
}
 | 
			
		||||
export { nanoid, customAlphabet, customRandom, urlAlphabet, random }
 | 
			
		||||
							
								
								
									
										1
									
								
								node_modules/nanoid/nanoid.js
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								node_modules/nanoid/nanoid.js
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							@@ -0,0 +1 @@
 | 
			
		||||
export let nanoid=(t=21)=>{let e="",r=crypto.getRandomValues(new Uint8Array(t));for(;t--;){let n=63&r[t];e+=n<36?n.toString(36):n<62?(n-26).toString(36).toUpperCase():n<63?"_":"-"}return e};
 | 
			
		||||
							
								
								
									
										21
									
								
								node_modules/nanoid/non-secure/index.cjs
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										21
									
								
								node_modules/nanoid/non-secure/index.cjs
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							@@ -0,0 +1,21 @@
 | 
			
		||||
let urlAlphabet =
 | 
			
		||||
  'useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict'
 | 
			
		||||
let customAlphabet = (alphabet, size) => {
 | 
			
		||||
  return () => {
 | 
			
		||||
    let id = ''
 | 
			
		||||
    let i = size
 | 
			
		||||
    while (i--) {
 | 
			
		||||
      id += alphabet[(Math.random() * alphabet.length) | 0]
 | 
			
		||||
    }
 | 
			
		||||
    return id
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
let nanoid = (size = 21) => {
 | 
			
		||||
  let id = ''
 | 
			
		||||
  let i = size
 | 
			
		||||
  while (i--) {
 | 
			
		||||
    id += urlAlphabet[(Math.random() * 64) | 0]
 | 
			
		||||
  }
 | 
			
		||||
  return id
 | 
			
		||||
}
 | 
			
		||||
module.exports = { nanoid, customAlphabet }
 | 
			
		||||
							
								
								
									
										30
									
								
								node_modules/nanoid/non-secure/index.d.ts
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										30
									
								
								node_modules/nanoid/non-secure/index.d.ts
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							@@ -0,0 +1,30 @@
 | 
			
		||||
/**
 | 
			
		||||
 * Generate URL-friendly unique ID. This method uses the non-secure
 | 
			
		||||
 * predictable random generator with bigger collision probability.
 | 
			
		||||
 *
 | 
			
		||||
 * ```js
 | 
			
		||||
 * import { nanoid } from 'nanoid/non-secure'
 | 
			
		||||
 * model.id = nanoid() //=> "Uakgb_J5m9g-0JDMbcJqL"
 | 
			
		||||
 * ```
 | 
			
		||||
 *
 | 
			
		||||
 * @param size Size of the ID. The default size is 21.
 | 
			
		||||
 * @returns A random string.
 | 
			
		||||
 */
 | 
			
		||||
export function nanoid(size?: number): string
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * Generate URL-friendly unique ID based on the custom alphabet.
 | 
			
		||||
 * This method uses the non-secure predictable random generator
 | 
			
		||||
 * with bigger collision probability.
 | 
			
		||||
 *
 | 
			
		||||
 * @param alphabet Alphabet used to generate the ID.
 | 
			
		||||
 * @param size Size of the ID.
 | 
			
		||||
 * @returns A random string.
 | 
			
		||||
 *
 | 
			
		||||
 * ```js
 | 
			
		||||
 * import { customAlphabet } from 'nanoid/non-secure'
 | 
			
		||||
 * const nanoid = customAlphabet('0123456789абвгдеё', 5)
 | 
			
		||||
 * model.id = //=> "8ё56а"
 | 
			
		||||
 * ```
 | 
			
		||||
 */
 | 
			
		||||
export function customAlphabet(alphabet: string, size: number): () => string
 | 
			
		||||
							
								
								
									
										21
									
								
								node_modules/nanoid/non-secure/index.js
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										21
									
								
								node_modules/nanoid/non-secure/index.js
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							@@ -0,0 +1,21 @@
 | 
			
		||||
let urlAlphabet =
 | 
			
		||||
  'useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict'
 | 
			
		||||
let customAlphabet = (alphabet, size) => {
 | 
			
		||||
  return () => {
 | 
			
		||||
    let id = ''
 | 
			
		||||
    let i = size
 | 
			
		||||
    while (i--) {
 | 
			
		||||
      id += alphabet[(Math.random() * alphabet.length) | 0]
 | 
			
		||||
    }
 | 
			
		||||
    return id
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
let nanoid = (size = 21) => {
 | 
			
		||||
  let id = ''
 | 
			
		||||
  let i = size
 | 
			
		||||
  while (i--) {
 | 
			
		||||
    id += urlAlphabet[(Math.random() * 64) | 0]
 | 
			
		||||
  }
 | 
			
		||||
  return id
 | 
			
		||||
}
 | 
			
		||||
export { nanoid, customAlphabet }
 | 
			
		||||
							
								
								
									
										6
									
								
								node_modules/nanoid/non-secure/package.json
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										6
									
								
								node_modules/nanoid/non-secure/package.json
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							@@ -0,0 +1,6 @@
 | 
			
		||||
{
 | 
			
		||||
  "type": "module",
 | 
			
		||||
  "main": "index.cjs",
 | 
			
		||||
  "module": "index.js",
 | 
			
		||||
  "react-native": "index.js"
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										64
									
								
								node_modules/nanoid/package.json
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										64
									
								
								node_modules/nanoid/package.json
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							@@ -0,0 +1,64 @@
 | 
			
		||||
{
 | 
			
		||||
  "name": "nanoid",
 | 
			
		||||
  "version": "3.1.30",
 | 
			
		||||
  "description": "A tiny (130 bytes), secure URL-friendly unique string ID generator",
 | 
			
		||||
  "keywords": [
 | 
			
		||||
    "uuid",
 | 
			
		||||
    "random",
 | 
			
		||||
    "id",
 | 
			
		||||
    "url"
 | 
			
		||||
  ],
 | 
			
		||||
  "engines": {
 | 
			
		||||
    "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1"
 | 
			
		||||
  },
 | 
			
		||||
  "author": "Andrey Sitnik <andrey@sitnik.ru>",
 | 
			
		||||
  "license": "MIT",
 | 
			
		||||
  "repository": "ai/nanoid",
 | 
			
		||||
  "browser": {
 | 
			
		||||
    "./index.js": "./index.browser.js",
 | 
			
		||||
    "./async/index.js": "./async/index.browser.js",
 | 
			
		||||
    "./async/index.cjs": "./async/index.browser.cjs",
 | 
			
		||||
    "./index.cjs": "./index.browser.cjs"
 | 
			
		||||
  },
 | 
			
		||||
  "react-native": "index.js",
 | 
			
		||||
  "bin": "./bin/nanoid.cjs",
 | 
			
		||||
  "sideEffects": false,
 | 
			
		||||
  "types": "./index.d.ts",
 | 
			
		||||
  "type": "module",
 | 
			
		||||
  "main": "index.cjs",
 | 
			
		||||
  "module": "index.js",
 | 
			
		||||
  "exports": {
 | 
			
		||||
    ".": {
 | 
			
		||||
      "browser": {
 | 
			
		||||
        "development": "./index.dev.js",
 | 
			
		||||
        "production": "./index.prod.js",
 | 
			
		||||
        "default": "./index.prod.js"
 | 
			
		||||
      },
 | 
			
		||||
      "require": "./index.cjs",
 | 
			
		||||
      "import": "./index.js",
 | 
			
		||||
      "default": "./index.js",
 | 
			
		||||
      "types": "./index.d.ts"
 | 
			
		||||
    },
 | 
			
		||||
    "./package.json": "./package.json",
 | 
			
		||||
    "./async/package.json": "./async/package.json",
 | 
			
		||||
    "./async": {
 | 
			
		||||
      "browser": "./async/index.browser.js",
 | 
			
		||||
      "require": "./async/index.cjs",
 | 
			
		||||
      "import": "./async/index.js",
 | 
			
		||||
      "default": "./async/index.js"
 | 
			
		||||
    },
 | 
			
		||||
    "./non-secure/package.json": "./non-secure/package.json",
 | 
			
		||||
    "./non-secure": {
 | 
			
		||||
      "require": "./non-secure/index.cjs",
 | 
			
		||||
      "import": "./non-secure/index.js",
 | 
			
		||||
      "default": "./non-secure/index.js"
 | 
			
		||||
    },
 | 
			
		||||
    "./url-alphabet/package.json": "./url-alphabet/package.json",
 | 
			
		||||
    "./url-alphabet": {
 | 
			
		||||
      "require": "./url-alphabet/index.cjs",
 | 
			
		||||
      "import": "./url-alphabet/index.js",
 | 
			
		||||
      "default": "./url-alphabet/index.js"
 | 
			
		||||
    },
 | 
			
		||||
    "./index.d.ts": "./index.d.ts"
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										3
									
								
								node_modules/nanoid/url-alphabet/index.cjs
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										3
									
								
								node_modules/nanoid/url-alphabet/index.cjs
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							@@ -0,0 +1,3 @@
 | 
			
		||||
let urlAlphabet =
 | 
			
		||||
  'useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict'
 | 
			
		||||
module.exports = { urlAlphabet }
 | 
			
		||||
							
								
								
									
										3
									
								
								node_modules/nanoid/url-alphabet/index.js
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										3
									
								
								node_modules/nanoid/url-alphabet/index.js
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							@@ -0,0 +1,3 @@
 | 
			
		||||
let urlAlphabet =
 | 
			
		||||
  'useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict'
 | 
			
		||||
export { urlAlphabet }
 | 
			
		||||
							
								
								
									
										6
									
								
								node_modules/nanoid/url-alphabet/package.json
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										6
									
								
								node_modules/nanoid/url-alphabet/package.json
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							@@ -0,0 +1,6 @@
 | 
			
		||||
{
 | 
			
		||||
  "type": "module",
 | 
			
		||||
  "main": "index.cjs",
 | 
			
		||||
  "module": "index.js",
 | 
			
		||||
  "react-native": "index.js"
 | 
			
		||||
}
 | 
			
		||||
		Reference in New Issue
	
	Block a user